Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lucide-icons/lucide
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.378.0
Choose a base ref
...
head repository: lucide-icons/lucide
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.379.0
Choose a head ref
  • 8 commits
  • 15 files changed
  • 4 contributors

Commits on May 3, 2024

  1. fix(icons): fix incorrect category name for diamond-plus/minus (#2125)

    Co-authored-by: Karsa <karsa@sztaki.hu>
    karsa-mistmere and Karsa authored May 3, 2024
    Copy the full SHA
    34dddb8 View commit details

Commits on May 13, 2024

  1. Copy the full SHA
    155ff33 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2843a76 View commit details

Commits on May 14, 2024

  1. feat(figma): add data API endpoint for new plugin (#2018)

    * feat(figma): add data API endpoint with every metadata needed by new Figma plugin
    
    * chore(docs/api): extract data as static const
    
    ---------
    
    Co-authored-by: Karsa <karsa@sztaki.hu>
    karsa-mistmere and Karsa authored May 14, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    824bb89 View commit details
  2. fix(docs): Fix data api

    ericfennis committed May 14, 2024
    Copy the full SHA
    f32ffcd View commit details

Commits on May 21, 2024

  1. fix(icons): arcified key icon (#2067)

    * Updated icons/key.svg
    
    * Updated icons/key.json
    
    * Update icons/key.svg
    
    Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
    
    * Add space before close key.svg
    
    ---------
    
    Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
    jguddas and ericfennis authored May 21, 2024
    Copy the full SHA
    6abae7c View commit details
  2. fix(lucide-svelte): Remove export mergeClasses in svelte Icon (#2119)

    * Remove export svelte icon
    
    * formatting
    ericfennis authored May 21, 2024
    Copy the full SHA
    d5f4275 View commit details
  3. fix(icons): arcified and renamed paintbrush-2 (#2146)

    Co-authored-by: Karsa <karsa@sztaki.hu>
    karsa-mistmere and Karsa authored May 21, 2024
    Copy the full SHA
    1b3173b View commit details
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -34,6 +34,7 @@ docs/.vitepress/data/iconNodes
docs/.vitepress/data/iconMetaData.ts
docs/.vitepress/data/releaseMetaData.json
docs/.vitepress/data/releaseMetaData
docs/.vitepress/data/categoriesData.json
docs/.vitepress/data/iconDetails
docs/.vitepress/data/relatedIcons.json
docs/.vercel
1 change: 0 additions & 1 deletion docs/.vitepress/api/categories/index.get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { eventHandler, setResponseHeader } from 'h3';
import iconMetaData from '../../data/iconMetaData';

export default eventHandler((event) => {
40 changes: 40 additions & 0 deletions docs/.vitepress/api/figma/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import iconNodes from '../../data/iconNodes/index.ts';
import { IconNodeWithKeys } from '../../theme/types';
import iconMetaData from '../../data/iconMetaData';
import releaseMeta from '../../data/releaseMetaData.json';
import categories from '../../data/categoriesData.json';

const dataResponse = {
icons: Object.entries(iconNodes).reduce((acc, [name, iconNode]) => {
const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs }]) => {
return [name, attrs];
});

acc[name] = {
iconNode: newIconNode,
aliases: (iconMetaData[name]?.aliases ?? []).map((alias) =>
typeof alias === 'string' ? alias : alias.name,
),
tags: iconMetaData[name].tags ?? [],
categories: iconMetaData[name].categories ?? [],
...releaseMeta[name],
};

return acc;
}, {}),
aliases: Object.entries(iconNodes).reduce((acc, [name]) => {
for (const alias of iconMetaData[name]?.aliases ?? []) {
acc[typeof alias === 'string' ? alias : alias.name] = name;
}

return acc;
}, {}),
categories,
};

export default eventHandler((event) => {
setResponseHeader(event, 'Cache-Control', 'public, max-age=86400');
setResponseHeader(event, 'Access-Control-Allow-Origin', '*');

return dataResponse;
});
1 change: 0 additions & 1 deletion docs/.vitepress/api/tags/index.get.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { eventHandler, setResponseHeader } from 'h3';
import iconMetaData from '../../data/iconMetaData';

export default eventHandler((event) => {
4 changes: 2 additions & 2 deletions docs/.vitepress/data/teamData.json
Original file line number Diff line number Diff line change
@@ -31,8 +31,8 @@
]
},
{
"name": "jguddas",
"title": "Maintainer of Lucide & Software engineer @lego",
"name": "Jakob Guddas",
"title": "Maintainer of Lucide & Software engineer @LEGO",
"image": "https://github.com/jguddas.png?size=192",
"socialLinks": [
{
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
"prebuild:iconNodes": "node ../scripts/writeIconNodes.mjs",
"prebuild:metaJson": "node ../scripts/writeIconMetaIndex.mjs",
"prebuild:releaseJson": "node ../scripts/writeReleaseMetadata.mjs",
"prebuild:categoriesJson": "node ./scripts/writeCategoriesMetadata.mjs",
"prebuild:relatedIcons": "node ../scripts/writeIconRelatedIcons.mjs",
"prebuild:iconDetails": "node ../scripts/writeIconDetails.mjs",
"postbuild:vercelJson": "node ../scripts/writeVercelOutput.mjs",
36 changes: 36 additions & 0 deletions docs/scripts/writeCategoriesMetadata.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import fs from 'fs';
import path from 'path';

const currentDir = process.cwd();
const dataDirectory = path.resolve(currentDir, '.vitepress/data');
const directory = path.join(process.cwd(), '../categories');

function getAllCategoryFiles() {
const fileNames = fs.readdirSync(directory).filter((file) => path.extname(file) === '.json');

return fileNames.map((fileName) => {
const name = path.basename(fileName, '.json');
const fileContent = fs.readFileSync(path.join(directory, fileName), 'utf8');

const parsedFileContent = JSON.parse(fileContent);

return {
name,
title: parsedFileContent.title,
};
});
}

const categoriesFile = path.resolve(dataDirectory, `categoriesData.json`);

const categoriesData = getAllCategoryFiles()

fs.promises
.writeFile(categoriesFile, JSON.stringify(categoriesData, null, 2), 'utf-8')
.then(() => {
console.log('Successfully written categoriesData.json file');
})
.catch((error) => {
throw new Error(`Something went wrong generating the categoriesData.json file,\n ${error}`);
});

2 changes: 1 addition & 1 deletion icons/diamond-minus.json
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
],
"categories": [
"multimedia",
"shape",
"shapes",
"photography",
"tools",
"devices"
2 changes: 1 addition & 1 deletion icons/diamond-plus.json
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
],
"categories": [
"multimedia",
"shape",
"shapes",
"photography",
"tools",
"devices"
3 changes: 1 addition & 2 deletions icons/key.json
Original file line number Diff line number Diff line change
@@ -4,8 +4,7 @@
"ashygee",
"csandman",
"mittalyashu",
"ericfennis",
"jguddas"
"ericfennis"
],
"tags": [
"password",
4 changes: 2 additions & 2 deletions icons/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/paintbrush-2.json → icons/paintbrush-vertical.json
Original file line number Diff line number Diff line change
@@ -19,5 +19,8 @@
"photography",
"home",
"tools"
],
"aliases": [
"paintbrush-2"
]
}
6 changes: 3 additions & 3 deletions icons/paintbrush-2.svg → icons/paintbrush-vertical.svg

Unable to render rich display

Invalid image source.

2 changes: 1 addition & 1 deletion packages/lucide-svelte/src/Icon.svelte
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
export let absoluteStrokeWidth: boolean = false
export let iconNode: IconNode
export const mergeClasses = <ClassType = string | undefined | null>(
const mergeClasses = <ClassType = string | undefined | null>(
...classes: ClassType[]
) => classes.filter((className, index, array) => {
return Boolean(className) && array.indexOf(className) === index;
1 change: 1 addition & 0 deletions scripts/generateChangedIconsCommentMarkup.mjs
Original file line number Diff line number Diff line change
@@ -112,6 +112,7 @@ ${changeFilesLowDPIImageTags}<br/>
<summary>Icon X-rays</summary>
${changeFilesXRayImageTags}
</details>
<details>
<summary>Icons as code</summary>
Works for: \`lucide-react\`, \`lucide-react-native\`, \`lucide-preact\`, \`lucide-vue-next\`