diff --git a/docs/.vitepress/theme/components/home/HomeIconCustomizer.vue b/docs/.vitepress/theme/components/home/HomeIconCustomizer.vue index 14dc775503..9765413663 100644 --- a/docs/.vitepress/theme/components/home/HomeIconCustomizer.vue +++ b/docs/.vitepress/theme/components/home/HomeIconCustomizer.vue @@ -171,16 +171,14 @@ watch(absoluteStrokeWidth, (enabled) => { margin-top: 32px; padding: 0; background: none; - max-width: 280px; } @media (min-width: 640px) { - .card { display: grid; grid-template-columns: 8fr 10fr; } -/* + /* .card-column { flex: 1; } */ diff --git a/docs/guide/packages/lucide-svelte.md b/docs/guide/packages/lucide-svelte.md index 428fc4d4b4..77e07ea6b6 100644 --- a/docs/guide/packages/lucide-svelte.md +++ b/docs/guide/packages/lucide-svelte.md @@ -7,7 +7,7 @@ Implementation of the lucide icon library for svelte applications. ::: code-group ```sh [pnpm] -pnpm install lucide-svelte +pnpm add lucide-svelte ``` ```sh [yarn] diff --git a/icons/bath.json b/icons/bath.json index 5059c9e62a..a82e427a6b 100644 --- a/icons/bath.json +++ b/icons/bath.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "karsa-mistmere", - "ericfennis" + "ericfennis", + "jamiemlaw" ], "tags": [ "amenities", diff --git a/icons/bath.svg b/icons/bath.svg index e917352690..a52407ecba 100644 --- a/icons/bath.svg +++ b/icons/bath.svg @@ -9,9 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - + + + + + diff --git a/icons/cloud-alert.json b/icons/cloud-alert.json new file mode 100644 index 0000000000..19b6c59312 --- /dev/null +++ b/icons/cloud-alert.json @@ -0,0 +1,23 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "colebemis", + "csandman", + "ericfennis", + "karsa-mistmere", + "lscheibel" + ], + "tags": [ + "weather", + "danger", + "warning", + "alert", + "error", + "sync", + "network", + "exclamation" + ], + "categories": [ + "development" + ] +} diff --git a/icons/cloud-alert.svg b/icons/cloud-alert.svg new file mode 100644 index 0000000000..53fc4f4a72 --- /dev/null +++ b/icons/cloud-alert.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/cross.svg b/icons/cross.svg index c0eb3007f1..fddf3f2893 100644 --- a/icons/cross.svg +++ b/icons/cross.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/drill.json b/icons/drill.json index e676bf3e6b..6669ad03a6 100644 --- a/icons/drill.json +++ b/icons/drill.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "jguddas" ], "tags": [ "power", diff --git a/icons/drill.svg b/icons/drill.svg index b20ba5dad3..330d2213a8 100644 --- a/icons/drill.svg +++ b/icons/drill.svg @@ -9,11 +9,10 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + + - - diff --git a/icons/equal-approximately.json b/icons/equal-approximately.json new file mode 100644 index 0000000000..e40a9d6219 --- /dev/null +++ b/icons/equal-approximately.json @@ -0,0 +1,15 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "ksk3110" + ], + "tags": [ + "about", + "calculate", + "maths", + "operater" + ], + "categories": [ + "maths" + ] +} diff --git a/icons/equal-approximately.svg b/icons/equal-approximately.svg new file mode 100644 index 0000000000..cedc57c64c --- /dev/null +++ b/icons/equal-approximately.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/hard-hat.svg b/icons/hard-hat.svg index 50056a6f23..106926d699 100644 --- a/icons/hard-hat.svg +++ b/icons/hard-hat.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/heading-4.json b/icons/heading-4.json index 6783030613..582870e190 100644 --- a/icons/heading-4.json +++ b/icons/heading-4.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "ericfennis" + "ericfennis", + "jguddas" ], "tags": [ "h4", diff --git a/icons/heading-4.svg b/icons/heading-4.svg index 2f6cc2b00d..ab9f59a287 100644 --- a/icons/heading-4.svg +++ b/icons/heading-4.svg @@ -9,9 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + diff --git a/icons/laptop-minimal-check.json b/icons/laptop-minimal-check.json new file mode 100644 index 0000000000..4f8ab5f793 --- /dev/null +++ b/icons/laptop-minimal-check.json @@ -0,0 +1,22 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "ericfennis", + "jguddas" + ], + "tags": [ + "computer", + "screen", + "remote", + "success", + "done", + "todo", + "tick", + "complete", + "task" + ], + "categories": [ + "devices", + "notifications" + ] +} diff --git a/icons/laptop-minimal-check.svg b/icons/laptop-minimal-check.svg new file mode 100644 index 0000000000..8475d4eb8f --- /dev/null +++ b/icons/laptop-minimal-check.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/puzzle.json b/icons/puzzle.json index 91536ef353..97d095abd4 100644 --- a/icons/puzzle.json +++ b/icons/puzzle.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "karsa-mistmere", - "ericfennis" + "ericfennis", + "jamiemlaw" ], "tags": [ "component", diff --git a/icons/puzzle.svg b/icons/puzzle.svg index 11822cf46e..bc7ea8e9e5 100644 --- a/icons/puzzle.svg +++ b/icons/puzzle.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/school.svg b/icons/school.svg index 3347d8aa52..1b3d7099a8 100644 --- a/icons/school.svg +++ b/icons/school.svg @@ -10,9 +10,9 @@ stroke-linejoin="round" > - + - + diff --git a/icons/toilet.json b/icons/toilet.json new file mode 100644 index 0000000000..e24f84357e --- /dev/null +++ b/icons/toilet.json @@ -0,0 +1,19 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "EthanHazel", + "staffanmowitz", + "karsa-mistmere", + "jguddas" + ], + "tags": [ + "toilet", + "potty", + "bathroom", + "washroom" + ], + "categories": [ + "devices", + "home" + ] +} diff --git a/icons/toilet.svg b/icons/toilet.svg new file mode 100644 index 0000000000..9ce94841fb --- /dev/null +++ b/icons/toilet.svg @@ -0,0 +1,14 @@ + + + + \ No newline at end of file diff --git a/icons/vegan.svg b/icons/vegan.svg index 113cbc23df..230803a3d1 100644 --- a/icons/vegan.svg +++ b/icons/vegan.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > + + - - diff --git a/packages/lucide-svelte/package.json b/packages/lucide-svelte/package.json index 6b4b4bcd4c..c7d7975383 100644 --- a/packages/lucide-svelte/package.json +++ b/packages/lucide-svelte/package.json @@ -36,7 +36,8 @@ }, "./icons/*": { "types": "./dist/icons/*.svelte.d.ts", - "svelte": "./dist/icons/*.svelte" + "svelte": "./dist/icons/*.js", + "default": "./dist/icons/*.js" } }, "typings": "dist/lucide-svelte.d.ts", @@ -48,7 +49,7 @@ "build": "pnpm clean && pnpm copy:license && pnpm build:icons && pnpm build:package && pnpm build:license", "copy:license": "cp ../../LICENSE ./LICENSE", "clean": "rm -rf dist && rm -rf stats && rm -rf ./src/icons/*.svelte && rm -f index.js", - "build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --exportFileName=index.ts --iconFileExtension=.svelte --importImportFileExtension=.svelte --withAliases --aliasesFileExtension=.ts --aliasImportFileExtension=.svelte --pretty=false", + "build:icons": "build-icons --output=./src --templateSrc=./scripts/exportTemplate.mjs --exportFileName=index.ts --iconFileExtension=.svelte --importImportFileExtension=.svelte --separateIconFileExport --separateIconFileExportExtension=.ts --withAliases --aliasesFileExtension=.ts --separateAliasesFile --separateAliasesFileExtension=.ts --aliasImportFileExtension=.js --pretty=false", "build:package": "svelte-package --input ./src", "build:license": "node ./scripts/appendBlockComments.mjs", "test": "pnpm build:icons && vitest run", diff --git a/packages/lucide-svelte/scripts/license.mjs b/packages/lucide-svelte/scripts/license.mjs index 3c39a02b6f..3ef4f0306c 100644 --- a/packages/lucide-svelte/scripts/license.mjs +++ b/packages/lucide-svelte/scripts/license.mjs @@ -1,4 +1,4 @@ -import pkg from '../package.json' assert { type: 'json' }; +import pkg from '../package.json' with { type: 'json' }; export function getJSBanner() { return `/** diff --git a/packages/lucide/rollup.config.mjs b/packages/lucide/rollup.config.mjs index 3d64d9d0e5..a4840c024b 100644 --- a/packages/lucide/rollup.config.mjs +++ b/packages/lucide/rollup.config.mjs @@ -1,7 +1,7 @@ import plugins from '@lucide/rollup-plugins'; import replace from '@rollup/plugin-replace'; import dts from 'rollup-plugin-dts'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; const outputFileName = pkg.name; const outputDir = 'dist'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84a29d1c29..935fabbf27 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5072,6 +5072,7 @@ packages: acorn-import-assertions@1.9.0: resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + deprecated: package has been renamed to acorn-import-attributes peerDependencies: acorn: ^8 @@ -16793,7 +16794,7 @@ snapshots: '@swc-node/sourcemap-support': 0.5.1 '@swc/core': 1.7.23 colorette: 2.0.20 - debug: 4.3.6 + debug: 4.3.7 oxc-resolver: 1.11.0 pirates: 4.0.6 tslib: 2.6.3 @@ -25367,7 +25368,7 @@ snapshots: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 20.4.5 - acorn: 8.14.0 + acorn: 8.12.1 acorn-walk: 8.3.3 arg: 4.1.3 create-require: 1.1.1 diff --git a/tools/build-icons/building/aliases/generateAliasesFiles.mjs b/tools/build-icons/building/aliases/generateAliasesFiles.mjs index 52927e7a08..043613475a 100644 --- a/tools/build-icons/building/aliases/generateAliasesFiles.mjs +++ b/tools/build-icons/building/aliases/generateAliasesFiles.mjs @@ -14,6 +14,7 @@ export default async function generateAliasesFiles({ aliasImportFileExtension, aliasNamesOnly = false, separateAliasesFile = false, + separateAliasesFileExtension, showLog = true, }) { const iconsDistDirectory = path.join(outputDirectory, `icons`); @@ -96,8 +97,13 @@ export default async function generateAliasesFiles({ : ''; if (separateAliasesFile) { - const output = `export { default } from "./${iconName}"`; - const location = path.join(iconsDistDirectory, `${alias.name}${iconFileExtension}`); + const output = `export { default } from "./${iconName}${ + separateAliasesFileExtension ? iconFileExtension : '' + }";\n`; + const location = path.join( + iconsDistDirectory, + `${alias.name}${separateAliasesFileExtension ?? iconFileExtension}`, + ); await fs.promises.writeFile(location, output, 'utf-8'); } diff --git a/tools/build-icons/building/generateIconFiles.mjs b/tools/build-icons/building/generateIconFiles.mjs index 0a8aadd4df..691729e591 100644 --- a/tools/build-icons/building/generateIconFiles.mjs +++ b/tools/build-icons/building/generateIconFiles.mjs @@ -10,6 +10,8 @@ export default ({ template, showLog = true, iconFileExtension = '.js', + separateIconFileExport = false, + separateIconFileExportExtension, pretty = true, iconsDir, iconMetaData, @@ -46,6 +48,7 @@ export default ({ deprecated, deprecationReason, }); + const output = pretty ? prettier.format(elementTemplate, { singleQuote: true, @@ -56,6 +59,16 @@ export default ({ : elementTemplate; await fs.promises.writeFile(location, output, 'utf-8'); + + if (separateIconFileExport) { + const output = `export { default } from "./${iconName}${iconFileExtension}";\n`; + const location = path.join( + iconsDistDirectory, + `${iconName}${separateIconFileExportExtension ?? iconFileExtension}`, + ); + + await fs.promises.writeFile(location, output, 'utf-8'); + } }); Promise.all(writeIconFiles) diff --git a/tools/build-icons/cli.mjs b/tools/build-icons/cli.mjs index 31e4830155..c710cf7076 100755 --- a/tools/build-icons/cli.mjs +++ b/tools/build-icons/cli.mjs @@ -34,6 +34,9 @@ const { aliasNamesOnly = false, withDynamicImports = false, separateAliasesFile = false, + separateAliasesFileExtension = undefined, + separateIconFileExport = false, + separateIconFileExportExtension = undefined, aliasesFileExtension = '.js', aliasImportFileExtension = '', pretty = true, @@ -59,6 +62,8 @@ async function buildIcons() { template: iconFileTemplate, showLog: !silent, iconFileExtension, + separateIconFileExport, + separateIconFileExportExtension, pretty: JSON.parse(pretty), iconsDir: ICONS_DIR, iconMetaData, @@ -75,6 +80,7 @@ async function buildIcons() { exportModuleNameCasing, aliasImportFileExtension, separateAliasesFile, + separateAliasesFileExtension, showLog: !silent, }); } diff --git a/tools/build-icons/utils/getAliases.mjs b/tools/build-icons/utils/getAliases.mjs index 342741acdd..1d469fc06b 100644 --- a/tools/build-icons/utils/getAliases.mjs +++ b/tools/build-icons/utils/getAliases.mjs @@ -5,7 +5,7 @@ async function getAliases(iconDirectory) { const iconJsons = readSvgDirectory(iconDirectory, '.json'); const aliasesEntries = await Promise.all( iconJsons.map(async (jsonFile) => { - const file = await import(path.join(iconDirectory, jsonFile), { assert: { type: 'json' } }); + const file = await import(path.join(iconDirectory, jsonFile), { with: { type: 'json' } }); return [path.basename(jsonFile, '.json'), file.default]; }), ); diff --git a/tools/build-icons/utils/getIconMetaData.mjs b/tools/build-icons/utils/getIconMetaData.mjs index 7c8c149cae..e03bdaa027 100644 --- a/tools/build-icons/utils/getIconMetaData.mjs +++ b/tools/build-icons/utils/getIconMetaData.mjs @@ -6,7 +6,7 @@ async function getIconMetaData(iconDirectory) { const aliasesEntries = await Promise.all( iconJsons.map(async (jsonFile) => { /** eslint-disable */ - const file = await import(path.join(iconDirectory, jsonFile), { assert: { type: 'json' } }); + const file = await import(path.join(iconDirectory, jsonFile), { with: { type: 'json' } }); return [path.basename(jsonFile, '.json'), file.default]; }), );