From 2bf20db4bfe3fabd4ac04cd3e03b7631ef28d259 Mon Sep 17 00:00:00 2001 From: Staffan Mowitz Date: Tue, 9 Jan 2024 11:25:03 +0100 Subject: [PATCH 01/97] Update CONTRIBUTING.md (#1787) Update link for creating a new icon request issue --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c85df7158..d3732e39a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ Seperate them by two PRs; 'pr-01' `arrow`, `arrow-down` and 'pr-02' `bicycle`. Before creating an icon request, please search to see if someone has requested the icon already. If there is an open request, please add a :+1:. -If the icon has not already been requested, [create an issue](https://github.com/lucide-icons/lucide/issues/new?title=Icon%20Request:) with a title of `Icon request: ` and add as much information as possible. +If the icon has not already been requested, [create an icon request issue](https://github.com/lucide-icons/lucide/issues/new?assignees=&labels=%F0%9F%99%8C+icon+request&projects=&template=01_icon_request.yml) and add as much information as possible. ### Icon Requests from Feather From 32a6187d695a79372d0e82b8662f66ef2807a588 Mon Sep 17 00:00:00 2001 From: Karsa Date: Tue, 9 Jan 2024 15:42:14 +0100 Subject: [PATCH 02/97] Fixes `pen-square` (#1784) --- icons/{pen-square.json => square-pen.json} | 5 +++-- icons/{pen-square.svg => square-pen.svg} | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) rename icons/{pen-square.json => square-pen.json} (92%) rename icons/{pen-square.svg => square-pen.svg} (62%) diff --git a/icons/pen-square.json b/icons/square-pen.json similarity index 92% rename from icons/pen-square.json rename to icons/square-pen.json index cdd720b07..4b66f494b 100644 --- a/icons/pen-square.json +++ b/icons/square-pen.json @@ -27,6 +27,7 @@ ], "aliases": [ "pen-box", - "edit" + "edit", + "pen-square" ] -} \ No newline at end of file +} diff --git a/icons/pen-square.svg b/icons/square-pen.svg similarity index 62% rename from icons/pen-square.svg rename to icons/square-pen.svg index 848eaeea3..11bd351f4 100644 --- a/icons/pen-square.svg +++ b/icons/square-pen.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + From c9ffa4033fc6c3bb2483399c7b10bd1f311f52a6 Mon Sep 17 00:00:00 2001 From: ocavue Date: Wed, 10 Jan 2024 17:12:13 +0800 Subject: [PATCH 03/97] Add `list-collapse` icon (#1790) * Add `list-collapse` icon * Update icons/list-collapse.json Co-authored-by: Karsa --------- Co-authored-by: Karsa --- icons/list-collapse.json | 24 ++++++++++++++++++++++++ icons/list-collapse.svg | 17 +++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 icons/list-collapse.json create mode 100644 icons/list-collapse.svg diff --git a/icons/list-collapse.json b/icons/list-collapse.json new file mode 100644 index 000000000..afca9b1a2 --- /dev/null +++ b/icons/list-collapse.json @@ -0,0 +1,24 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "ocavue" + ], + "tags": [ + "items", + "collapse", + "expand", + "details", + "disclosure", + "show", + "hide", + "toggle", + "accordion", + "more", + "less", + "fold", + "unfold" + ], + "categories": [ + "text" + ] +} diff --git a/icons/list-collapse.svg b/icons/list-collapse.svg new file mode 100644 index 000000000..01beaf7b9 --- /dev/null +++ b/icons/list-collapse.svg @@ -0,0 +1,17 @@ + + + + + + + From 7e936c8803ed0ee1c1081cfd224071b26216245d Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Sat, 13 Jan 2024 10:10:43 +0100 Subject: [PATCH 04/97] Update stale action --- .github/workflows/close-stale-prs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/close-stale-prs.yml b/.github/workflows/close-stale-prs.yml index 5992c94ac..b074a6055 100644 --- a/.github/workflows/close-stale-prs.yml +++ b/.github/workflows/close-stale-prs.yml @@ -14,5 +14,4 @@ jobs: close-pr-message: This PR was closed because it has been stalled for 5 days with no activity. close-pr-label: 🧶 stale days-before-stale: 30 - days-before-close: 5 - days-before-pr-close: -1 + days-before-close: -1 From e56b09d4000d77fa523d42837b1e903f7e831bab Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Sat, 13 Jan 2024 15:32:18 +0100 Subject: [PATCH 05/97] Add cache header site assets (#1801) --- docs/vercel.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/vercel.json b/docs/vercel.json index d9fc5199f..e66c75a80 100644 --- a/docs/vercel.json +++ b/docs/vercel.json @@ -35,5 +35,16 @@ "destination": "/icons", "permanent": false } + ], + "headers": [ + { + "source": "/assets/:path*", + "headers": [ + { + "key": "Cache-Control", + "value": "cache-control: public, max-age=31536000, immutable" + } + ] + } ] } From be3ccc8ece10ad772fea9e44fea2891b974878b6 Mon Sep 17 00:00:00 2001 From: Daniel Bayley Date: Tue, 16 Jan 2024 14:42:22 +0000 Subject: [PATCH 06/97] Add/optimise `swatch-book`/`aperture`/`blend`/`eclipse` (dark/light) mode/`paint-roller` icons and improve `palette`/`brush` metadata (#1280) * Add `swatch-book` icon * Improve `palette`/`brush` icons metadata * Update icons/swatch-book.svg Co-authored-by: Karsa * Add `color-wheel` icon * Improve `palette`/`swatch-book` icons metadata * Update icons/color-wheel.svg Co-authored-by: Jakob Guddas * Add `paint-roller` icon * Improve metadata * Add `contrast` alternate icon * Add `eclipse` (dark/light mode toggle) icon * Add `blend` icon * Refine `color-wheel` icon * Optimise `aperture` icon * Add `aperture` variant * Drop `color-wheel` icon * Refine `paint-roller` icon * Fix `aperture-2` optimisation * Update icons/aperture.svg Co-authored-by: Karsa * Fix `aperture` variant optimisation * Rename `contrast-2` to `circle-line-vertical` * Remove aperture-2 and circle-line-vertical --------- Co-authored-by: Karsa Co-authored-by: Jakob Guddas Co-authored-by: Eric Fennis --- icons/aperture.json | 5 ++++- icons/aperture.svg | 12 ++++++------ icons/blend.json | 29 +++++++++++++++++++++++++++++ icons/blend.svg | 14 ++++++++++++++ icons/brush.json | 3 ++- icons/eclipse.json | 35 +++++++++++++++++++++++++++++++++++ icons/eclipse.svg | 14 ++++++++++++++ icons/paint-bucket.json | 6 ++++-- icons/paint-roller.json | 16 ++++++++++++++++ icons/paint-roller.svg | 15 +++++++++++++++ icons/paintbrush-2.json | 9 +++++++-- icons/paintbrush.json | 9 +++++++-- icons/palette.json | 10 ++++++++-- icons/swatch-book.json | 26 ++++++++++++++++++++++++++ icons/swatch-book.svg | 16 ++++++++++++++++ 15 files changed, 203 insertions(+), 16 deletions(-) create mode 100644 icons/blend.json create mode 100644 icons/blend.svg create mode 100644 icons/eclipse.json create mode 100644 icons/eclipse.svg create mode 100644 icons/paint-roller.json create mode 100644 icons/paint-roller.svg create mode 100644 icons/swatch-book.json create mode 100644 icons/swatch-book.svg diff --git a/icons/aperture.json b/icons/aperture.json index 502644d42..0586ac533 100644 --- a/icons/aperture.json +++ b/icons/aperture.json @@ -6,7 +6,10 @@ ], "tags": [ "camera", - "photo" + "photo", + "pictures", + "shutter", + "exposure" ], "categories": [ "photography" diff --git a/icons/aperture.svg b/icons/aperture.svg index c3d4c9177..433b96ed2 100644 --- a/icons/aperture.svg +++ b/icons/aperture.svg @@ -10,10 +10,10 @@ stroke-linejoin="round" > - - - - - - + + + + + + diff --git a/icons/blend.json b/icons/blend.json new file mode 100644 index 000000000..2d94addf6 --- /dev/null +++ b/icons/blend.json @@ -0,0 +1,29 @@ +{ + "$schema": "../icon.schema.json", + "tags": [ + "mode", + "overlay", + "multiply", + "screen", + "opacity", + "transparency", + "alpha", + "filters", + "lenses", + "mixed", + "shades", + "tints", + "hues", + "saturation", + "brightness", + "overlap", + "colors", + "colours" + ], + "categories": [ + "design", + "photography", + "tools", + "development" + ] +} diff --git a/icons/blend.svg b/icons/blend.svg new file mode 100644 index 000000000..7433e6fcf --- /dev/null +++ b/icons/blend.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/brush.json b/icons/brush.json index e4f27ac2e..91d5bc21b 100644 --- a/icons/brush.json +++ b/icons/brush.json @@ -6,7 +6,8 @@ "tags": [ "draw", "paint", - "color" + "color", + "artist" ], "categories": [ "text", diff --git a/icons/eclipse.json b/icons/eclipse.json new file mode 100644 index 000000000..5c9fc9e93 --- /dev/null +++ b/icons/eclipse.json @@ -0,0 +1,35 @@ +{ + "$schema": "../icon.schema.json", + "tags": [ + "lunar", + "solar", + "crescent moon", + "sun", + "earth", + "day", + "night", + "planet", + "space", + "mode", + "dark", + "light", + "toggle", + "switch", + "color", + "css", + "styles", + "display", + "accessibility", + "contrast", + "brightness", + "blend", + "shade" + ], + "categories": [ + "science", + "design", + "development", + "accessibility", + "photography" + ] +} \ No newline at end of file diff --git a/icons/eclipse.svg b/icons/eclipse.svg new file mode 100644 index 000000000..701c43fdb --- /dev/null +++ b/icons/eclipse.svg @@ -0,0 +1,14 @@ + + + + diff --git a/icons/paint-bucket.json b/icons/paint-bucket.json index 3c93251eb..bfc9ef9c5 100644 --- a/icons/paint-bucket.json +++ b/icons/paint-bucket.json @@ -8,9 +8,11 @@ "fill", "paint", "bucket", - "design" + "color", + "colour" ], "categories": [ - "design" + "design", + "tools" ] } \ No newline at end of file diff --git a/icons/paint-roller.json b/icons/paint-roller.json new file mode 100644 index 000000000..511def873 --- /dev/null +++ b/icons/paint-roller.json @@ -0,0 +1,16 @@ +{ + "$schema": "../icon.schema.json", + "tags": [ + "brush", + "color", + "colour", + "decoration", + "diy" + ], + "categories": [ + "text", + "design", + "home", + "tools" + ] +} \ No newline at end of file diff --git a/icons/paint-roller.svg b/icons/paint-roller.svg new file mode 100644 index 000000000..539862397 --- /dev/null +++ b/icons/paint-roller.svg @@ -0,0 +1,15 @@ + + + + + diff --git a/icons/paintbrush-2.json b/icons/paintbrush-2.json index b19f4d827..654c76315 100644 --- a/icons/paintbrush-2.json +++ b/icons/paintbrush-2.json @@ -8,11 +8,16 @@ "brush", "paintbrush", "design", - "color" + "color", + "colour", + "decoration", + "diy" ], "categories": [ "text", "design", - "photography" + "photography", + "home", + "tools" ] } \ No newline at end of file diff --git a/icons/paintbrush.json b/icons/paintbrush.json index 025f0c538..4a00848f4 100644 --- a/icons/paintbrush.json +++ b/icons/paintbrush.json @@ -7,11 +7,16 @@ "brush", "paintbrush", "design", - "color" + "color", + "colour", + "decoration", + "diy" ], "categories": [ "text", "design", - "photography" + "photography", + "home", + "tools" ] } \ No newline at end of file diff --git a/icons/palette.json b/icons/palette.json index c25724e82..dd8c9932c 100644 --- a/icons/palette.json +++ b/icons/palette.json @@ -5,8 +5,14 @@ "csandman" ], "tags": [ - "color", - "theme" + "colors", + "colours", + "theme", + "scheme", + "paint", + "watercolor", + "watercolour", + "artist" ], "categories": [ "text", diff --git a/icons/swatch-book.json b/icons/swatch-book.json new file mode 100644 index 000000000..16202fb7f --- /dev/null +++ b/icons/swatch-book.json @@ -0,0 +1,26 @@ +{ + "$schema": "../icon.schema.json", + "tags": [ + "colors", + "colours", + "swatches", + "pantone", + "shades", + "tint", + "hue", + "saturation", + "brightness", + "theme", + "scheme", + "palette", + "samples", + "textile", + "carpet" + ], + "categories": [ + "design", + "home", + "furniture", + "photography" + ] +} diff --git a/icons/swatch-book.svg b/icons/swatch-book.svg new file mode 100644 index 000000000..c0dd5cb45 --- /dev/null +++ b/icons/swatch-book.svg @@ -0,0 +1,16 @@ + + + + + + From d4cbe899fb15c0aeff479ed9a4270cfb60ee637a Mon Sep 17 00:00:00 2001 From: Karsa Date: Tue, 16 Jan 2024 16:21:57 +0100 Subject: [PATCH 07/97] Remove aliasesSupport flag from rollup.config.mjs (#1794) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove aliasesSupport flag from rollup.config.mjs and add always add aliases * Update rollup.config.mjs * Update rollup.config.mjs * Update rollup.config.mjs * Update rollup.config.mjs --------- Co-authored-by: Rigó József Karsa --- packages/lucide-preact/rollup.config.mjs | 19 ++----------------- packages/lucide-react/rollup.config.mjs | 19 ++----------------- packages/lucide-vue-next/rollup.config.mjs | 20 ++------------------ packages/lucide-vue/rollup.config.mjs | 19 ++----------------- 4 files changed, 8 insertions(+), 69 deletions(-) diff --git a/packages/lucide-preact/rollup.config.mjs b/packages/lucide-preact/rollup.config.mjs index 9d82bbbfa..64c9876b6 100644 --- a/packages/lucide-preact/rollup.config.mjs +++ b/packages/lucide-preact/rollup.config.mjs @@ -22,34 +22,20 @@ const bundles = [ format: 'cjs', inputs, outputDir, - aliasesSupport: true }, { format: 'esm', inputs, outputDir, preserveModules: true, - aliasesSupport: true }, ]; const configs = bundles - .map(({ inputs, outputDir, format, minify, preserveModules, aliasesSupport }) => + .map(({ inputs, outputDir, format, minify, preserveModules }) => inputs.map(input => ({ input, - plugins: [ - ...( - !aliasesSupport ? [ - replace({ - "export * from './aliases';": '', - "export * as icons from './icons';": '', - delimiters: ['', ''], - preventAssignment: false, - }), - ] : [] - ), - ...plugins(pkg, minify) - ], + plugins: plugins(pkg, minify), external: ['preact'], output: { name: packageName, @@ -81,4 +67,3 @@ const configs = bundles }, ...configs ]; - diff --git a/packages/lucide-react/rollup.config.mjs b/packages/lucide-react/rollup.config.mjs index 80ce8ca7b..e4a153f13 100644 --- a/packages/lucide-react/rollup.config.mjs +++ b/packages/lucide-react/rollup.config.mjs @@ -25,7 +25,6 @@ const bundles = [ format: 'cjs', inputs, outputDir, - aliasesSupport: true, }, { format: 'esm', @@ -35,13 +34,11 @@ const bundles = [ ], outputDir, preserveModules: true, - aliasesSupport: true, }, { format: 'esm', inputs: ['src/dynamicIconImports.ts'], outputFile: 'dynamicIconImports.js', - aliasesSupport: true, external: [/src/], paths: (id) => { if (id.match(/src/)) { @@ -54,22 +51,10 @@ const bundles = [ ]; const configs = bundles - .map(({ inputs, outputDir, outputFile, format, minify, preserveModules, aliasesSupport, entryFileNames, external = [], paths }) => + .map(({ inputs, outputDir, outputFile, format, minify, preserveModules, entryFileNames, external = [], paths }) => inputs.map(input => ({ input, - plugins: [ - ...( - !aliasesSupport ? [ - replace({ - "export * from './aliases';": '', - "export * as icons from './icons';": '', - delimiters: ['', ''], - preventAssignment: false, - }), - ] : [] - ), - ...plugins(pkg, minify) - ], + plugins: plugins(pkg, minify), external: [ 'react', 'prop-types', diff --git a/packages/lucide-vue-next/rollup.config.mjs b/packages/lucide-vue-next/rollup.config.mjs index d1b236944..030d2f3b3 100644 --- a/packages/lucide-vue-next/rollup.config.mjs +++ b/packages/lucide-vue-next/rollup.config.mjs @@ -22,35 +22,20 @@ const bundles = [ format: 'cjs', inputs, outputDir, - aliasesSupport: true }, { format: 'esm', inputs, outputDir, preserveModules: true, - aliasesSupport: true }, ]; const configs = bundles - .map(({ inputs, outputDir, format, minify, preserveModules, aliasesSupport }) => + .map(({ inputs, outputDir, format, minify, preserveModules }) => inputs.map(input => ({ input, - plugins: [ - // This for aliases, only for esm - ...( - !aliasesSupport ? [ - replace({ - "export * from './aliases';": '', - "export * as icons from './icons';": '', - delimiters: ['', ''], - preventAssignment: false, - }), - ] : [] - ), - ...plugins(pkg, minify) - ], + plugins: plugins(pkg, minify), external: ['vue'], output: { name: packageName, @@ -88,4 +73,3 @@ const configs = bundles }, ...configs ]; - diff --git a/packages/lucide-vue/rollup.config.mjs b/packages/lucide-vue/rollup.config.mjs index 16f8e2eb7..911bacfe3 100644 --- a/packages/lucide-vue/rollup.config.mjs +++ b/packages/lucide-vue/rollup.config.mjs @@ -21,35 +21,20 @@ const bundles = [ format: 'cjs', inputs, outputDir, - aliasesSupport: true }, { format: 'esm', inputs, outputDir, preserveModules: true, - aliasesSupport: true }, ]; const configs = bundles - .map(({ inputs, outputDir, format, minify, preserveModules, aliasesSupport }) => + .map(({ inputs, outputDir, format, minify, preserveModules }) => inputs.map(input => ({ input, - plugins: [ - // This for aliases, only for esm - ...( - !aliasesSupport ? [ - replace({ - "export * from './aliases';": '', - "export * as icons from './icons';": '', - delimiters: ['', ''], - preventAssignment: false, - }), - ] : [] - ), - ...plugins(pkg, minify) - ], + plugins: plugins(pkg, minify), external: ['vue'], output: { name: packageName, From b0e825cb5759585b0628bec6b9909bff96afa2b3 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Tue, 16 Jan 2024 16:22:09 +0100 Subject: [PATCH 08/97] Site improvements and update site dependencies (#1805) * try to speed up build times * Update deps * Update site deps and fix search issue * Small improvements * fix imports * Remove unused var --- CONTRIBUTING.md | 6 +- docs/.vitepress/sidebar.ts | 8 - .../theme/components/base/Badge.vue | 6 +- .../theme/components/base/ButtonMenu.vue | 12 +- .../theme/components/base/CodeGroup.vue | 2 +- .../theme/components/base/FakeInput.vue | 2 +- .../components/icons/CategoryListItem.vue | 1 - .../theme/components/icons/CopyCodeButton.vue | 2 +- .../components/icons/IconDetailOverlay.vue | 2 +- .../theme/components/icons/IconGrid.vue | 7 +- .../theme/components/icons/IconItem.vue | 6 +- .../icons/IconsCategoryOverview.vue | 1 - .../theme/composables/useSearchInput.ts | 13 +- docs/guide/packages/lucide-react.md | 3 +- docs/license.md | 1 + docs/nitro.config.ts | 2 +- docs/package.json | 27 +- pnpm-lock.yaml | 640 ++++++++++++------ 18 files changed, 468 insertions(+), 273 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3732e39a..90d5a685d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,8 +72,8 @@ pnpm install # Install dependencies, including the workspace packages To distribute different packages we use PNPM workspaces. Before you start make sure you are familiar with this concept. The concept of working in workspaces is created by Yarn, they have a well written introduction: [yarn workspaces](https://classic.yarnpkg.com/lang/enhttps://lucide.dev/docs/workspaces). -The configured directory for workspaces is the [packages](./packages) directory, located in the root directory. There you will find all the current packages from lucide. -There are more workspaces defined, see [`pnpm-workspace.yaml`](./pnpm-workspace.yaml). +The configured directory for workspaces is the [packages](https://github.com/lucide-icons/lucide/tree/main/packages) directory, located in the root directory. There you will find all the current packages from lucide. +There are more workspaces defined, see [`pnpm-workspace.yaml`](https://github.com/lucide-icons/lucide/blob/main/pnpm-workspace.yaml). > Note: One package is not managed by pnpm: **lucide-flutter**, this package is written in Dart and used pub for publishing. @@ -153,7 +153,7 @@ lucide ### Docs -The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory. +The lucide.dev website is using [vitepress](https://vitepress.dev/) to generate the static website. The markdown files are located in the docs directory. ### Guides diff --git a/docs/.vitepress/sidebar.ts b/docs/.vitepress/sidebar.ts index d7eec57a5..762427aa9 100644 --- a/docs/.vitepress/sidebar.ts +++ b/docs/.vitepress/sidebar.ts @@ -74,10 +74,6 @@ const sidebar: UserConfig['themeConfig']['sidebar'] = { }, { text: 'Lucide Vue', - link: '/guide/packages/lucide-vue' - }, - { - text: 'Lucide Vue Next (Vue 3)', link: '/guide/packages/lucide-vue-next' }, { @@ -100,10 +96,6 @@ const sidebar: UserConfig['themeConfig']['sidebar'] = { text: 'Lucide Static', link: '/guide/packages/lucide-static' }, - { - text: 'Lucide Flutter', - link: '/guide/packages/lucide-flutter' - }, ] }, { diff --git a/docs/.vitepress/theme/components/base/Badge.vue b/docs/.vitepress/theme/components/base/Badge.vue index 2bf52174e..aabe58c56 100644 --- a/docs/.vitepress/theme/components/base/Badge.vue +++ b/docs/.vitepress/theme/components/base/Badge.vue @@ -9,8 +9,6 @@ const props = defineProps<{ }>() const component = computed(() => props.href ? 'a' : 'div') - - diff --git a/docs/.vitepress/theme/components/base/ButtonMenu.vue b/docs/.vitepress/theme/components/base/ButtonMenu.vue index 506195d6c..6580c8fdb 100644 --- a/docs/.vitepress/theme/components/base/ButtonMenu.vue +++ b/docs/.vitepress/theme/components/base/ButtonMenu.vue @@ -94,8 +94,7 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) .menu { position: relative; } -.menu-items { - --menu-offset: 44px; +ul.menu-items { position: absolute; display: flex; flex-direction: column; @@ -103,7 +102,7 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) padding: 12px; min-width: 128px; border: 1px solid var(--vp-c-divider); - background-color: var(--vp-c-bg); + background-color: var(--vp-c-bg-elv); box-shadow: var(--vp-shadow-3); transition: background-color 0.5s; max-height: calc(100vh - var(--vp-nav-height)); @@ -124,11 +123,12 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) color: var(--vp-c-text-1); white-space: nowrap; transition: background-color .25s,color .25s; + list-style: none; } .menu-item:hover { color: var(--vp-c-brand); - background-color: var(--vp-c-bg-elv-mute); + background-color: var(--vp-c-default-soft); } .menu-item:active { @@ -170,11 +170,11 @@ const ChevronUp = createLucideIcon('ChevronUp', chevronUp) } .menu-items.bottom { - top: var(--menu-offset); + top: 32px; } .menu-items.top { - bottom: var(--menu-offset); + bottom: 48px; } .arrow-up-button.top::before { diff --git a/docs/.vitepress/theme/components/base/CodeGroup.vue b/docs/.vitepress/theme/components/base/CodeGroup.vue index d5b6d62b6..498b27053 100644 --- a/docs/.vitepress/theme/components/base/CodeGroup.vue +++ b/docs/.vitepress/theme/components/base/CodeGroup.vue @@ -1,5 +1,5 @@ From 28686b5bd5714a7a62d88d934cc54457d49b6984 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Thu, 25 Jan 2024 08:54:18 +0100 Subject: [PATCH 24/97] feat: added webhook-off icon (#1566) Co-authored-by: Eric Fennis --- icons/webhook-off.json | 17 +++++++++++++++++ icons/webhook-off.svg | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 icons/webhook-off.json create mode 100644 icons/webhook-off.svg diff --git a/icons/webhook-off.json b/icons/webhook-off.json new file mode 100644 index 000000000..f2cbac17b --- /dev/null +++ b/icons/webhook-off.json @@ -0,0 +1,17 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere", + "jguddas" + ], + "tags": [ + "push api", + "interface", + "callback" + ], + "categories": [ + "development", + "social", + "account" + ] +} diff --git a/icons/webhook-off.svg b/icons/webhook-off.svg new file mode 100644 index 000000000..3bf198003 --- /dev/null +++ b/icons/webhook-off.svg @@ -0,0 +1,19 @@ + + + + + + + + + From 0f25ee86a011091dc53f77c1bd20ca4e6e487c26 Mon Sep 17 00:00:00 2001 From: Karsa Date: Fri, 26 Jan 2024 09:58:05 +0100 Subject: [PATCH 25/97] Fix fills in smaller dots (#1436) * Fixes palette * Fixing fill on circles * Fixing fills * Revert tractor fill --------- Co-authored-by: Eric Fennis --- icons/guitar.svg | 2 +- icons/key-round.svg | 2 +- icons/palette.svg | 8 ++++---- icons/scatter-chart.svg | 10 +++++----- icons/vault.svg | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/icons/guitar.svg b/icons/guitar.svg index d2f86707f..129613cd4 100644 --- a/icons/guitar.svg +++ b/icons/guitar.svg @@ -11,7 +11,7 @@ > - + diff --git a/icons/key-round.svg b/icons/key-round.svg index 5749f92e1..16819eaf6 100644 --- a/icons/key-round.svg +++ b/icons/key-round.svg @@ -10,5 +10,5 @@ stroke-linejoin="round" > - + diff --git a/icons/palette.svg b/icons/palette.svg index 113ebe106..74ae30402 100644 --- a/icons/palette.svg +++ b/icons/palette.svg @@ -9,9 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + diff --git a/icons/scatter-chart.svg b/icons/scatter-chart.svg index f0e46ba64..4beec1f15 100644 --- a/icons/scatter-chart.svg +++ b/icons/scatter-chart.svg @@ -9,10 +9,10 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - + + + + + diff --git a/icons/vault.svg b/icons/vault.svg index 95e51027a..0cb6662f5 100644 --- a/icons/vault.svg +++ b/icons/vault.svg @@ -10,13 +10,13 @@ stroke-linejoin="round" > - + - + - + - + From 3302870983d39894e60ca6e70ce61e719d9554eb Mon Sep 17 00:00:00 2001 From: Daniel Bayley Date: Fri, 26 Jan 2024 09:10:19 +0000 Subject: [PATCH 26/97] Refine `helping-hand`/add `hand-*` icons (#1328) * Refine `helping-hand` icon * Add `hand-platter` icon * Add `hand-coins` (savings) icon * Add `hand-heart` icon * Fix/optimise `helping-hand` icon * Fix/optimise `hand-coins` icon * Fix/optimise `hand-heart` icon * Rename `helping-hand` to `hand-helping` * Fix/optimise `hand-platter` icon * Add `thumbs-up-down` icon * Improve `thumbs-up`/`down` icons metadata * Improve metadata * Delete thumbs-up-down icons --------- Co-authored-by: Eric Fennis --- icons/hand-coins.json | 27 +++++++++++++++++++ icons/hand-coins.svg | 17 ++++++++++++ icons/hand-heart.json | 15 +++++++++++ icons/hand-heart.svg | 16 +++++++++++ .../{helping-hand.json => hand-helping.json} | 6 ++++- icons/{helping-hand.svg => hand-helping.svg} | 5 ++-- icons/hand-platter.json | 22 +++++++++++++++ icons/hand-platter.svg | 18 +++++++++++++ icons/thumbs-down.json | 3 ++- icons/thumbs-up.json | 3 ++- 10 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 icons/hand-coins.json create mode 100644 icons/hand-coins.svg create mode 100644 icons/hand-heart.json create mode 100644 icons/hand-heart.svg rename icons/{helping-hand.json => hand-helping.json} (75%) rename icons/{helping-hand.svg => hand-helping.svg} (51%) create mode 100644 icons/hand-platter.json create mode 100644 icons/hand-platter.svg diff --git a/icons/hand-coins.json b/icons/hand-coins.json new file mode 100644 index 000000000..5671a0622 --- /dev/null +++ b/icons/hand-coins.json @@ -0,0 +1,27 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "danielbayley", + "kayleyhill" + ], + "tags": [ + "savings", + "banking", + "money", + "finance", + "offers", + "mortgage", + "payment", + "received", + "wage", + "payroll", + "allowance", + "pocket money", + "handout", + "pennies" + ], + "categories": [ + "money", + "account" + ] +} \ No newline at end of file diff --git a/icons/hand-coins.svg b/icons/hand-coins.svg new file mode 100644 index 000000000..6751e8bdd --- /dev/null +++ b/icons/hand-coins.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/hand-heart.json b/icons/hand-heart.json new file mode 100644 index 000000000..30a798207 --- /dev/null +++ b/icons/hand-heart.json @@ -0,0 +1,15 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "danielbayley", + "kayleyhill" + ], + "tags": [ + "love", + "like", + "emotion" + ], + "categories": [ + "social" + ] +} \ No newline at end of file diff --git a/icons/hand-heart.svg b/icons/hand-heart.svg new file mode 100644 index 000000000..812c713b1 --- /dev/null +++ b/icons/hand-heart.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/helping-hand.json b/icons/hand-helping.json similarity index 75% rename from icons/helping-hand.json rename to icons/hand-helping.json index 46a3997e2..7b6b33650 100644 --- a/icons/helping-hand.json +++ b/icons/hand-helping.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "karsa-mistmere", - "jguddas" + "jguddas", + "danielbayley" ], "tags": [ "agreement", @@ -14,5 +15,8 @@ ], "categories": [ "emoji" + ], + "aliases": [ + "helping-hand" ] } \ No newline at end of file diff --git a/icons/helping-hand.svg b/icons/hand-helping.svg similarity index 51% rename from icons/helping-hand.svg rename to icons/hand-helping.svg index 2b68c816f..a1dd4b3a8 100644 --- a/icons/helping-hand.svg +++ b/icons/hand-helping.svg @@ -9,6 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + + diff --git a/icons/hand-platter.json b/icons/hand-platter.json new file mode 100644 index 000000000..c5b971d10 --- /dev/null +++ b/icons/hand-platter.json @@ -0,0 +1,22 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "danielbayley" + ], + "tags": [ + "waiter", + "waitress", + "restaurant", + "table service", + "served", + "dinner", + "dining", + "meal", + "course", + "luxury" + ], + "categories": [ + "food-beverage", + "people" + ] +} \ No newline at end of file diff --git a/icons/hand-platter.svg b/icons/hand-platter.svg new file mode 100644 index 000000000..2ec7245e3 --- /dev/null +++ b/icons/hand-platter.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/thumbs-down.json b/icons/thumbs-down.json index ec3f8d748..11c0c2354 100644 --- a/icons/thumbs-down.json +++ b/icons/thumbs-down.json @@ -13,6 +13,7 @@ ], "categories": [ "account", - "social" + "social", + "emoji" ] } \ No newline at end of file diff --git a/icons/thumbs-up.json b/icons/thumbs-up.json index 62618fecd..b068dec95 100644 --- a/icons/thumbs-up.json +++ b/icons/thumbs-up.json @@ -13,6 +13,7 @@ ], "categories": [ "account", - "social" + "social", + "emoji" ] } \ No newline at end of file From 54c8d4078d9acf67f5d0f20418c1c717d817a699 Mon Sep 17 00:00:00 2001 From: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com> Date: Mon, 29 Jan 2024 13:48:14 -0500 Subject: [PATCH 27/97] fix: Add the license banner inside of the script tag instead of an HTML comment (#1811) * add banner inside of the script tag instead * renamed script * Update packages/lucide-svelte/scripts/license.mjs Co-authored-by: Jakob Guddas * Update packages/lucide-svelte/scripts/appendLicense.mjs Co-authored-by: Eric Fennis * renamed file --------- Co-authored-by: Jakob Guddas Co-authored-by: Eric Fennis --- packages/lucide-svelte/package.json | 2 +- ...addLicense.mjs => appendBlockComments.mjs} | 41 +++++-------------- .../lucide-svelte/scripts/exportTemplate.mjs | 2 + packages/lucide-svelte/scripts/license.mjs | 11 +++++ 4 files changed, 24 insertions(+), 32 deletions(-) rename packages/lucide-svelte/scripts/{addLicense.mjs => appendBlockComments.mjs} (64%) create mode 100644 packages/lucide-svelte/scripts/license.mjs diff --git a/packages/lucide-svelte/package.json b/packages/lucide-svelte/package.json index 6c1d42c4c..4a0c1b64e 100644 --- a/packages/lucide-svelte/package.json +++ b/packages/lucide-svelte/package.json @@ -50,7 +50,7 @@ "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:package": "svelte-package --input ./src", - "build:license": "node ./scripts/addLicense.mjs", + "build:license": "node ./scripts/appendBlockComments.mjs", "test": "vitest run", "version": "pnpm version --git-tag-version=false" }, diff --git a/packages/lucide-svelte/scripts/addLicense.mjs b/packages/lucide-svelte/scripts/appendBlockComments.mjs similarity index 64% rename from packages/lucide-svelte/scripts/addLicense.mjs rename to packages/lucide-svelte/scripts/appendBlockComments.mjs index b31c87e8b..d6d6e3ae1 100644 --- a/packages/lucide-svelte/scripts/addLicense.mjs +++ b/packages/lucide-svelte/scripts/appendBlockComments.mjs @@ -1,13 +1,8 @@ -import { getCurrentDirPath } from '../../../scripts/helpers.mjs'; import { lstatSync } from 'fs'; import { readdir, readFile, writeFile } from 'fs/promises'; import path from 'path'; -import pkg from '../package.json' assert { type: 'json' }; - -const BANNER = `@license ${pkg.name} v${pkg.version} - ${pkg.license} - -This source code is licensed under the ${pkg.license} license. -See the LICENSE file in the root directory of this source tree.`; +import { getCurrentDirPath } from '../../../scripts/helpers.mjs'; +import { getJSBanner } from './license.mjs'; const currentDir = getCurrentDirPath(import.meta.url); const targetDirectory = path.join(currentDir, '../dist'); @@ -32,21 +27,16 @@ for (const file of files) { license = getJSBanner(); } - if (/\.svelte/.test(ext)) { - license = getSvelteBanner(); - } - if (license) { newContents = license + contents; - } // Places icon block comment at the top of the Svelte component class - if(/icons\/(.*?)\.svelte\.d\.ts/.test(filepath)) { - const svelteFilepath = filepath.replace('.d.ts', '') + if (/icons\/(.*?)\.svelte\.d\.ts/.test(filepath)) { + const svelteFilepath = filepath.replace('.d.ts', ''); let svelteFileContents = await readFile(svelteFilepath, { encoding: 'utf-8' }); - const blockCommentRegex = /\/\*\*[\s\S]*?\*\//; + const blockCommentRegex = /\/\*\*\n\s\*\s(@component\s@name)[\s\S]*?\*\//; const blockCommentMatch = blockCommentRegex.exec(svelteFileContents); if (blockCommentMatch !== null) { @@ -55,26 +45,15 @@ for (const file of files) { const exportClassRegex = /export default class (\w+) extends SvelteComponentTyped<(.*?)> {/; if (exportClassRegex.test(newContents)) { - newContents = newContents.replace(exportClassRegex, `${blockComment}\nexport default class $1 extends SvelteComponentTyped<$2> {`); + newContents = newContents.replace( + exportClassRegex, + `${blockComment}\nexport default class $1 extends SvelteComponentTyped<$2> {` + ); } } } - if(newContents !== contents) { + if (newContents !== contents) { await writeFile(filepath, newContents, { encoding: 'utf-8' }); } } - -function getJSBanner() { - return `/** - * ${BANNER} - */ -\n`; -} - -function getSvelteBanner() { - return ` -\n`; -} diff --git a/packages/lucide-svelte/scripts/exportTemplate.mjs b/packages/lucide-svelte/scripts/exportTemplate.mjs index 131a9c397..afeff30a3 100644 --- a/packages/lucide-svelte/scripts/exportTemplate.mjs +++ b/packages/lucide-svelte/scripts/exportTemplate.mjs @@ -1,5 +1,6 @@ /* eslint-disable import/no-extraneous-dependencies */ import base64SVG from '@lucide/build-icons/utils/base64SVG.mjs'; +import { getJSBanner } from './license.mjs'; export default ({ iconName, children, componentName, getSvg, deprecated }) => { const svgContents = getSvg(); @@ -7,6 +8,7 @@ export default ({ iconName, children, componentName, getSvg, deprecated }) => { return `\ +
diff --git a/packages/lucide-figma/src/interface/interface.scss b/packages/lucide-figma/src/interface/interface.scss index 532583da2..35ad229b9 100644 --- a/packages/lucide-figma/src/interface/interface.scss +++ b/packages/lucide-figma/src/interface/interface.scss @@ -3,10 +3,9 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url('https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.9') - format('woff2'), - url('https://rsms.me/inter/font-files/Inter-Regular.woff?v=3.9') - format('woff'); + src: + url('https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.9') format('woff2'), + url('https://rsms.me/inter/font-files/Inter-Regular.woff?v=3.9') format('woff'); } @font-face { @@ -14,10 +13,9 @@ font-style: normal; font-weight: 500; font-display: swap; - src: url('https://rsms.me/inter/font-files/Inter-Medium.woff2?v=3.9') - format('woff2'), - url('https://rsms.me/inter/font-files/Inter-Medium.woff?v=3.9') - format('woff'); + src: + url('https://rsms.me/inter/font-files/Inter-Medium.woff2?v=3.9') format('woff2'), + url('https://rsms.me/inter/font-files/Inter-Medium.woff?v=3.9') format('woff'); } :root { diff --git a/packages/lucide-figma/src/interface/interface.tsx b/packages/lucide-figma/src/interface/interface.tsx index cba8958d4..1271ea2f0 100644 --- a/packages/lucide-figma/src/interface/interface.tsx +++ b/packages/lucide-figma/src/interface/interface.tsx @@ -1,54 +1,57 @@ -import { useEffect, useMemo, useState } from 'react' -import ReactDOM from 'react-dom' -import * as views from '../views' +import { useEffect, useMemo, useState } from 'react'; +import ReactDOM from 'react-dom'; +import * as views from '../views'; -type Views = typeof views +type Views = typeof views; -import useSearch, { Icon } from '../hooks/useSearch' +import useSearch, { Icon } from '../hooks/useSearch'; -import { getIcons, iconFetchListener, LucideIcons } from '../api/fetchIcons' -import './interface.scss' -import Menu from '../components/Menu' +import { getIcons, iconFetchListener, LucideIcons } from '../api/fetchIcons'; +import './interface.scss'; +import Menu from '../components/Menu'; function App() { - const [page, setPage] = useState('icons') - const [query, setQuery] = useState('') - const [icons, setIcons] = useState([]) - const [tags, setTags] = useState({}) - const [version, setVersion ] = useState('') + const [page, setPage] = useState('icons'); + const [query, setQuery] = useState(''); + const [icons, setIcons] = useState([]); + const [tags, setTags] = useState({}); + const [version, setVersion] = useState(''); - const searchResults = useMemo(() => useSearch(icons, tags, query), [icons, query]) + const searchResults = useMemo(() => useSearch(icons, tags, query), [icons, query]); const handleFetchResponse = async (lucideIcons: LucideIcons) => { - const icons = Object.entries(lucideIcons.iconNodes) + const icons = Object.entries(lucideIcons.iconNodes); - setIcons(icons) - setTags(lucideIcons.tags) - setVersion(lucideIcons.version) - } + setIcons(icons); + setTags(lucideIcons.tags); + setVersion(lucideIcons.version); + }; useEffect(() => { - const removeListener = iconFetchListener(handleFetchResponse) + const removeListener = iconFetchListener(handleFetchResponse); - return removeListener - }, []) + return removeListener; + }, []); - const View = views?.[page as keyof Views] ?? views.icons + const View = views?.[page as keyof Views] ?? views.icons; return (
- +
- ) + ); } -ReactDOM.render(, document.getElementById('root')) +ReactDOM.render(, document.getElementById('root')); diff --git a/packages/lucide-figma/src/main.ts b/packages/lucide-figma/src/main.ts index 596bf35d4..7815642f1 100644 --- a/packages/lucide-figma/src/main.ts +++ b/packages/lucide-figma/src/main.ts @@ -1,26 +1,34 @@ -import type { LucideIcons } from "./api/fetchIcons"; -import filterIcons from "./helpers/filterIcons"; +import type { LucideIcons } from './api/fetchIcons'; +import filterIcons from './helpers/filterIcons'; -figma.showUI(__uiFiles__.worker, { visible: false }) +figma.showUI(__uiFiles__.worker, { visible: false }); -let cachedIcons: LucideIcons +let cachedIcons: LucideIcons; -type InsertableNodes = FrameNode | GroupNode +type InsertableNodes = FrameNode | GroupNode; -function isInsertableNode (node: SceneNode): node is InsertableNodes { - return ['FRAME', 'GROUP'].includes(node.type) +function isInsertableNode(node: SceneNode): node is InsertableNodes { + return ['FRAME', 'GROUP'].includes(node.type); } -const setResults = ({result, query, lucideIcons} : { result: SuggestionResults, query: string, lucideIcons: LucideIcons }) => { +const setResults = ({ + result, + query, + lucideIcons, +}: { + result: SuggestionResults; + query: string; + lucideIcons: LucideIcons; +}) => { const icons = Object.entries(lucideIcons.iconNodes); const suggestions = filterIcons(icons, lucideIcons.tags, query.toLowerCase()).map(([name]) => ({ name, - icon: lucideIcons.svgs[name] - })) + icon: lucideIcons.svgs[name], + })); - result.setSuggestions(suggestions) -} + result.setSuggestions(suggestions); +}; // const styles = figma.getLocalPaintStyles(); // const styleNames = styles.map((style) => style.name); @@ -28,112 +36,114 @@ const setResults = ({result, query, lucideIcons} : { result: SuggestionResults, figma.parameters.on('input', async ({ parameters, key, query, result }) => { if (key === 'icon-name') { - cachedIcons = await figma.clientStorage.getAsync(`lucide-icons`) + cachedIcons = await figma.clientStorage.getAsync(`lucide-icons`); - if(cachedIcons && cachedIcons.iconNodes && cachedIcons.tags) { - setResults({result, query, lucideIcons: cachedIcons}) + if (cachedIcons && cachedIcons.iconNodes && cachedIcons.tags) { + setResults({ result, query, lucideIcons: cachedIcons }); } } - if(key === 'size') { - const iconSizes = [24,36,48,72] - result.setSuggestions(iconSizes.map((size)=>({ - name: size.toString(), - data: size - }))) + if (key === 'size') { + const iconSizes = [24, 36, 48, 72]; + result.setSuggestions( + iconSizes.map((size) => ({ + name: size.toString(), + data: size, + })), + ); } -}) +}); -const drawIcon = ({icon: {name, svg, size }}: any) => { - const min = 0 - const max = 100 - const randomPosition = () => Math.floor(Math.random() * (max - min + 1) + min) +const drawIcon = ({ icon: { name, svg, size } }: any) => { + const min = 0; + const max = 100; + const randomPosition = () => Math.floor(Math.random() * (max - min + 1) + min); - const icon = figma.createNodeFromSvg(svg) - icon.setPluginData('isLucideIcon', 'true') - icon.setPluginData('iconName', name) + const icon = figma.createNodeFromSvg(svg); + icon.setPluginData('isLucideIcon', 'true'); + icon.setPluginData('iconName', name); - const pluginData = icon.getPluginData('isLucideIcon') + const pluginData = icon.getPluginData('isLucideIcon'); - icon.name = name - icon.x = Math.round(figma.viewport.center.x + randomPosition()) - icon.y = Math.round(figma.viewport.center.y + randomPosition()) + icon.name = name; + icon.x = Math.round(figma.viewport.center.x + randomPosition()); + icon.y = Math.round(figma.viewport.center.y + randomPosition()); - if(figma.currentPage.selection.length) { - let currentSelection = figma.currentPage.selection[0] - const isLucideIcon = currentSelection.getPluginData('isLucideIcon') + if (figma.currentPage.selection.length) { + let currentSelection = figma.currentPage.selection[0]; + const isLucideIcon = currentSelection.getPluginData('isLucideIcon'); // if(isLucideIcon && currentSelection?.parent) { // return // // currentSelection = currentSelection.parent as SceneNode // } - if(!isLucideIcon && isInsertableNode(currentSelection)) { - icon.x = currentSelection.type === 'GROUP' ? currentSelection.x : 0 - icon.y = currentSelection.type === 'GROUP' ? currentSelection.y : 0 + if (!isLucideIcon && isInsertableNode(currentSelection)) { + icon.x = currentSelection.type === 'GROUP' ? currentSelection.x : 0; + icon.y = currentSelection.type === 'GROUP' ? currentSelection.y : 0; - currentSelection.appendChild(icon) + currentSelection.appendChild(icon); } } - figma.currentPage.selection = [icon] + figma.currentPage.selection = [icon]; // lock children // icon.children.forEach((vectorNode, key) => { // icon.children[key].locked = true // }); -} +}; const setCachedIcons = async (pluginMessage: any) => { - if(pluginMessage.lucideIcons) { - await figma.clientStorage.setAsync(`lucide-icons`, pluginMessage.lucideIcons) + if (pluginMessage.lucideIcons) { + await figma.clientStorage.setAsync(`lucide-icons`, pluginMessage.lucideIcons); } -} +}; const getCachedIcons = async () => { - cachedIcons = await figma.clientStorage.getAsync(`lucide-icons`) + cachedIcons = await figma.clientStorage.getAsync(`lucide-icons`); - const response = { type: 'cachedIcons' } + const response = { type: 'cachedIcons' }; - if(cachedIcons) { - Object.assign(response, { cachedIcons }) + if (cachedIcons) { + Object.assign(response, { cachedIcons }); } - figma.ui.postMessage(response) -} + figma.ui.postMessage(response); +}; -getCachedIcons() +getCachedIcons(); figma.ui.onmessage = (event) => { switch (event.type) { - case "drawIcon": - drawIcon(event) + case 'drawIcon': + drawIcon(event); break; - case "getCachedIcons": - getCachedIcons() + case 'getCachedIcons': + getCachedIcons(); break; - case "setCachedIcons": - setCachedIcons(event) + case 'setCachedIcons': + setCachedIcons(event); break; - case "close": - figma.closePlugin() + case 'close': + figma.closePlugin(); break; default: break; } -} +}; -figma.on('run', event => { - if(event.parameters) { +figma.on('run', (event) => { + if (event.parameters) { figma.ui.postMessage({ type: 'getSvg', iconName: event.parameters['icon-name'], size: event.parameters['size'], - cachedIcons - }) + cachedIcons, + }); } else { - figma.showUI(__uiFiles__.interface, { width: 300, height: 400 }) + figma.showUI(__uiFiles__.interface, { width: 300, height: 400 }); } -}) +}); diff --git a/packages/lucide-figma/src/theme.ts b/packages/lucide-figma/src/theme.ts index 8a3cb6ff2..7363c7d19 100644 --- a/packages/lucide-figma/src/theme.ts +++ b/packages/lucide-figma/src/theme.ts @@ -5,4 +5,4 @@ export default { blue: '#18a0fb', }, radii: [0, 2], -} +}; diff --git a/packages/lucide-figma/src/views/Icons.tsx b/packages/lucide-figma/src/views/Icons.tsx index 9645ebdcd..2248b68d3 100644 --- a/packages/lucide-figma/src/views/Icons.tsx +++ b/packages/lucide-figma/src/views/Icons.tsx @@ -1,59 +1,52 @@ -import IconButton from '../components/IconButton' -import SearchInput from '../components/SearchInput' -import createIconComponent from '../helpers/createIconComponent' -import { Icon } from '../hooks/useSearch' -import Skeleton from '../components/Skeleton/Skeleton' +import IconButton from '../components/IconButton'; +import SearchInput from '../components/SearchInput'; +import createIconComponent from '../helpers/createIconComponent'; +import { Icon } from '../hooks/useSearch'; +import Skeleton from '../components/Skeleton/Skeleton'; interface PageProps { - query: string - setQuery: (query:string) => void - searchResults: Icon[] - icons: Icon[] - version: string + query: string; + setQuery: (query: string) => void; + searchResults: Icon[]; + icons: Icon[]; + version: string; } -const Icons = ({ - query, - setQuery, - searchResults, - icons, - version -}: PageProps) => { +const Icons = ({ query, setQuery, searchResults, icons, version }: PageProps) => { return ( <> setQuery(event.target.value)} - placeholder={icons.length ? `Search ${icons.length} icons`: 'Loading icons ..'} + onChange={(event) => setQuery(event.target.value)} + placeholder={icons.length ? `Search ${icons.length} icons` : 'Loading icons ..'} /> -
-
- {icons.length ? ( - searchResults.map(([name, iconNode]: any) => ( - - )) - ) : ( - - )} - -
- -
+
+
+ {icons.length ? ( + searchResults.map(([name, iconNode]: any) => ( + + )) + ) : ( + + )} +
+ +
- ) -} + ); +}; -export default Icons +export default Icons; diff --git a/packages/lucide-figma/src/views/Info.tsx b/packages/lucide-figma/src/views/Info.tsx index 082d7b4db..fc41474a6 100644 --- a/packages/lucide-figma/src/views/Info.tsx +++ b/packages/lucide-figma/src/views/Info.tsx @@ -1,64 +1,70 @@ -import { SyntheticEvent } from "react" +import { SyntheticEvent } from 'react'; interface PageProps { - version: string + version: string; } const Info = ({ version }: PageProps) => { const menuItems = [ { name: 'Report a bug', - url: 'https://github.com/lucide-icons/lucide/issues' + url: 'https://github.com/lucide-icons/lucide/issues', }, { name: 'Contribute an icon', - url: 'https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md' + url: 'https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md', }, { name: 'Website', - url: 'https://lucide.dev' + url: 'https://lucide.dev', }, { name: 'Repository', - url: 'https://github.com/lucide-icons/lucide' + url: 'https://github.com/lucide-icons/lucide', }, { name: 'License', - url: 'https://lucide.dev/license' + url: 'https://lucide.dev/license', }, { name: 'Community Page', - url: 'https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons' + url: 'https://www.figma.com/community/plugin/939567362549682242/Lucide-Icons', }, { name: 'Supported Frameworks', - url: 'https://lucide.dev/packages' - } - ] + url: 'https://lucide.dev/packages', + }, + ]; const onClick = (url: string) => (event: SyntheticEvent) => { - event.preventDefault() + event.preventDefault(); - window.open(url,'_blank') - } + window.open(url, '_blank'); + }; return (
- Lucide Logo -

- v{version} -

+ Lucide Logo +

v{version}

- { - menuItems.map(({ name, url }) => ( - - {name} - - )) - } + {menuItems.map(({ name, url }) => ( + + {name} + + ))}
- ) -} + ); +}; -export default Info +export default Info; diff --git a/packages/lucide-figma/src/views/index.ts b/packages/lucide-figma/src/views/index.ts index f880a75bb..daed83c5e 100644 --- a/packages/lucide-figma/src/views/index.ts +++ b/packages/lucide-figma/src/views/index.ts @@ -1,2 +1,2 @@ -export { default as icons } from './Icons' -export { default as info } from './Info' +export { default as icons } from './Icons'; +export { default as info } from './Info'; diff --git a/packages/lucide-figma/src/worker/worker.html b/packages/lucide-figma/src/worker/worker.html index c848e9ef4..1a11e9f5c 100644 --- a/packages/lucide-figma/src/worker/worker.html +++ b/packages/lucide-figma/src/worker/worker.html @@ -1 +1,4 @@ - \ No newline at end of file + diff --git a/packages/lucide-figma/src/worker/worker.ts b/packages/lucide-figma/src/worker/worker.ts index 6f1e1f7c7..97ce86ea7 100644 --- a/packages/lucide-figma/src/worker/worker.ts +++ b/packages/lucide-figma/src/worker/worker.ts @@ -1,64 +1,85 @@ -import { fetchIcons, LucideIcons } from "../api/fetchIcons" -import createIconComponent from "../helpers/createIconComponent" -import { renderToString } from 'react-dom/server' -import { createElement } from "react" +import { fetchIcons, LucideIcons } from '../api/fetchIcons'; +import createIconComponent from '../helpers/createIconComponent'; +import { renderToString } from 'react-dom/server'; +import { createElement } from 'react'; const getLatestIcons = async ({ cachedIcons }: any) => { - const lucideIcons = await fetchIcons(cachedIcons) + const lucideIcons = await fetchIcons(cachedIcons); - parent.postMessage({ - pluginMessage: { - type: "latestIcons", - lucideIcons, - } - }, "*") -} + parent.postMessage( + { + pluginMessage: { + type: 'latestIcons', + lucideIcons, + }, + }, + '*', + ); +}; -const getSvg = async ({ cachedIcons, iconName, size = 24 }: { cachedIcons: LucideIcons, iconName: string, size: number }) => { +const getSvg = async ({ + cachedIcons, + iconName, + size = 24, +}: { + cachedIcons: LucideIcons; + iconName: string; + size: number; +}) => { if (!cachedIcons) { return; } - console.log( iconName, size) + console.log(iconName, size); const iconNode = cachedIcons.iconNodes[iconName]; if (iconNode) { - const IconComponent = createIconComponent(iconName, iconNode) + const IconComponent = createIconComponent(iconName, iconNode); const svg = renderToString(createElement(IconComponent, { size })); - parent.postMessage({ pluginMessage: { - type: 'drawIcon', - icon: { - name: iconName, - svg, - size - } - }}, '*') + parent.postMessage( + { + pluginMessage: { + type: 'drawIcon', + icon: { + name: iconName, + svg, + size, + }, + }, + }, + '*', + ); - parent.postMessage({ pluginMessage: { - type: 'close', - }}, '*') + parent.postMessage( + { + pluginMessage: { + type: 'close', + }, + }, + '*', + ); } -} +}; window.onmessage = async (event) => { if (!event?.data?.pluginMessage) { - return + return; } - const { pluginMessage } = event.data + const { pluginMessage } = event.data; switch (pluginMessage.type) { - case "getLatestIcons": - getLatestIcons(pluginMessage) + case 'getLatestIcons': + getLatestIcons(pluginMessage); break; - case "getSvg": - getSvg(pluginMessage) + case 'getSvg': + getSvg(pluginMessage); break; default: break; } -} +}; diff --git a/packages/lucide-figma/tsconfig.json b/packages/lucide-figma/tsconfig.json index 5f288ca6f..c03a4f8d6 100644 --- a/packages/lucide-figma/tsconfig.json +++ b/packages/lucide-figma/tsconfig.json @@ -15,10 +15,7 @@ "isolatedModules": false, "noEmit": true, "jsx": "react-jsx", - "typeRoots": [ - "./node_modules/@types", - "./node_modules/@figma" - ], + "typeRoots": ["./node_modules/@types", "./node_modules/@figma"], }, - "include": ["src"] + "include": ["src"], } diff --git a/packages/lucide-figma/vite.config.ts b/packages/lucide-figma/vite.config.ts index 26bee3b28..e59053073 100644 --- a/packages/lucide-figma/vite.config.ts +++ b/packages/lucide-figma/vite.config.ts @@ -1,40 +1,40 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import { viteSingleFile } from "vite-plugin-singlefile" -import { resolve } from 'path' +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import { viteSingleFile } from 'vite-plugin-singlefile'; +import { resolve } from 'path'; const entries = { main: resolve(__dirname, 'src/main.ts'), interface: resolve(__dirname, './src/interface/interface.html'), worker: resolve(__dirname, './src/worker/worker.html'), -} +}; const input = {}; -if(process.env['INPUT']) { +if (process.env['INPUT']) { const entry = process.env['INPUT']; - input[entry] = entries[entry] + input[entry] = entries[entry]; } // https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), viteSingleFile()], - build: { - target: "esnext", - assetsInlineLimit: 100000000, - chunkSizeWarningLimit: 100000000, - cssCodeSplit: false, - brotliSize: false, + build: { + target: 'esnext', + assetsInlineLimit: 100000000, + chunkSizeWarningLimit: 100000000, + cssCodeSplit: false, + brotliSize: false, emptyOutDir: false, - rollupOptions: { + rollupOptions: { input, - inlineDynamicImports: true, - output: { - manualChunks: (chunk) => "all.js", + inlineDynamicImports: true, + output: { + manualChunks: (chunk) => 'all.js', entryFileNames: `assets/[name].js`, chunkFileNames: `assets/[name].js`, - assetFileNames: `assets/[name].[ext]` - }, - }, - }, -}) + assetFileNames: `assets/[name].[ext]`, + }, + }, + }, +}); diff --git a/packages/lucide-preact/rollup.config.mjs b/packages/lucide-preact/rollup.config.mjs index 64c9876b6..f0ec4a71c 100644 --- a/packages/lucide-preact/rollup.config.mjs +++ b/packages/lucide-preact/rollup.config.mjs @@ -1,6 +1,6 @@ import plugins, { replace } from '@lucide/rollup-plugins'; -import dts from "rollup-plugin-dts"; -import pkg from './package.json' assert { type: "json" }; +import dts from 'rollup-plugin-dts'; +import pkg from './package.json' assert { type: 'json' }; const packageName = 'LucidePreact'; const outputFileName = 'lucide-preact'; @@ -33,7 +33,7 @@ const bundles = [ const configs = bundles .map(({ inputs, outputDir, format, minify, preserveModules }) => - inputs.map(input => ({ + inputs.map((input) => ({ input, plugins: plugins(pkg, minify), external: ['preact'], @@ -57,13 +57,16 @@ const configs = bundles ) .flat(); - export default [ - { - input: inputs[0], - output: [{ - file: `dist/${outputFileName}.d.ts`, format: "es" - }], - plugins: [dts()], - }, - ...configs - ]; +export default [ + { + input: inputs[0], + output: [ + { + file: `dist/${outputFileName}.d.ts`, + format: 'es', + }, + ], + plugins: [dts()], + }, + ...configs, +]; diff --git a/packages/lucide-preact/src/createLucideIcon.ts b/packages/lucide-preact/src/createLucideIcon.ts index b4238c95d..080583eb4 100644 --- a/packages/lucide-preact/src/createLucideIcon.ts +++ b/packages/lucide-preact/src/createLucideIcon.ts @@ -1,16 +1,16 @@ import { type FunctionComponent, h, type JSX, toChildArray } from 'preact'; import defaultAttributes from './defaultAttributes'; -export type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record][] +export type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record][]; -export interface LucideProps extends Partial> { - color?: string - size?: string | number - strokeWidth?: string | number - absoluteStrokeWidth?: boolean +export interface LucideProps extends Partial> { + color?: string; + size?: string | number; + strokeWidth?: string | number; + absoluteStrokeWidth?: boolean; } -export type LucideIcon = FunctionComponent +export type LucideIcon = FunctionComponent; /** * Converts string to KebabCase @@ -20,20 +20,29 @@ export type LucideIcon = FunctionComponent * @param {string} string * @returns {string} A kebabized string */ -export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); +export const toKebabCase = (string: string) => + string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => { - const Component = ( - { color = 'currentColor', size = 24, strokeWidth = 2, absoluteStrokeWidth, children, class: classes = '', ...rest }: LucideProps - ) => + const Component = ({ + color = 'currentColor', + size = 24, + strokeWidth = 2, + absoluteStrokeWidth, + children, + class: classes = '', + ...rest + }: LucideProps) => h( 'svg', { ...defaultAttributes, - width: String(size), + width: String(size), height: size, stroke: color, - ['stroke-width' as 'strokeWidth']: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, + ['stroke-width' as 'strokeWidth']: absoluteStrokeWidth + ? (Number(strokeWidth) * 24) / Number(size) + : strokeWidth, class: ['lucide', `lucide-${toKebabCase(iconName)}`, classes].join(' '), ...rest, }, @@ -45,4 +54,4 @@ const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => { return Component; }; -export default createLucideIcon +export default createLucideIcon; diff --git a/packages/lucide-preact/src/defaultAttributes.ts b/packages/lucide-preact/src/defaultAttributes.ts index 9f1b78dbf..6e633a7c6 100644 --- a/packages/lucide-preact/src/defaultAttributes.ts +++ b/packages/lucide-preact/src/defaultAttributes.ts @@ -1,4 +1,4 @@ -import type { JSX } from 'preact' +import type { JSX } from 'preact'; export default { xmlns: 'http://www.w3.org/2000/svg', diff --git a/packages/lucide-preact/tests/lucide-preact.spec.tsx b/packages/lucide-preact/tests/lucide-preact.spec.tsx index 1341aad32..c0e6d06eb 100644 --- a/packages/lucide-preact/tests/lucide-preact.spec.tsx +++ b/packages/lucide-preact/tests/lucide-preact.spec.tsx @@ -1,14 +1,14 @@ import { describe, it, expect } from 'vitest'; -import { render, cleanup } from '@testing-library/preact' +import { render, cleanup } from '@testing-library/preact'; import { Pen, Edit2, Grid, Droplet } from '../src/lucide-preact'; -type AttributesAssertion = { attributes: Record} +type AttributesAssertion = { attributes: Record }; describe('Using lucide icon components', () => { it('should render an component', () => { - const { container } = render( ); + const { container } = render(); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should adjust the size, stroke color and stroke width', () => { @@ -27,7 +27,7 @@ describe('Using lucide icon components', () => { expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('4'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should render the alias icon', () => { @@ -41,9 +41,9 @@ describe('Using lucide icon components', () => { />, ); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); const { container: Edit2Container } = render( { />, ); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); }); it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { @@ -74,17 +74,15 @@ describe('Using lucide icon components', () => { expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('1'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should apply all classes to the element', () => { const testClass = 'my-class'; - const { container } = render( - , - ); + const { container } = render(); expect(container.firstChild).toHaveClass(testClass); expect(container.firstChild).toHaveClass('lucide'); expect(container.firstChild).toHaveClass('lucide-droplet'); }); -}) +}); diff --git a/packages/lucide-preact/tests/setupVitest.js b/packages/lucide-preact/tests/setupVitest.js index 7dfeb1c3b..ccd53195b 100644 --- a/packages/lucide-preact/tests/setupVitest.js +++ b/packages/lucide-preact/tests/setupVitest.js @@ -1,5 +1,5 @@ -import { expect } from 'vitest' +import { expect } from 'vitest'; import '@testing-library/jest-dom'; -import htmlSerializer from 'jest-serializer-html' +import htmlSerializer from 'jest-serializer-html'; -expect.addSnapshotSerializer(htmlSerializer) +expect.addSnapshotSerializer(htmlSerializer); diff --git a/packages/lucide-preact/tsconfig.json b/packages/lucide-preact/tsconfig.json index b59f7ee3a..61ae11e69 100644 --- a/packages/lucide-preact/tsconfig.json +++ b/packages/lucide-preact/tsconfig.json @@ -21,5 +21,5 @@ "jsxImportSource": "preact", "types": ["@testing-library/jest-dom"], }, - "exclude": ["**/node_modules"] + "exclude": ["**/node_modules"], } diff --git a/packages/lucide-react-native/__mocks__/react-native-svg/index.ts b/packages/lucide-react-native/__mocks__/react-native-svg/index.ts index 942db0e57..8ebb9b6dc 100644 --- a/packages/lucide-react-native/__mocks__/react-native-svg/index.ts +++ b/packages/lucide-react-native/__mocks__/react-native-svg/index.ts @@ -3,14 +3,14 @@ import React from 'react'; import type { LucideProps } from '../../src/createReactComponent'; export type { SvgProps } from 'react-native-svg'; -const createComponent = function(name: string) { +const createComponent = function (name: string) { const component = (props: LucideProps) => { return React.createElement(name, props, props.children); - } + }; component.displayName = name; - return component + return component; }; // Mock all react-native-svg exports diff --git a/packages/lucide-react-native/lucide-react-native.d.ts b/packages/lucide-react-native/lucide-react-native.d.ts index ec234923b..6d9842675 100644 --- a/packages/lucide-react-native/lucide-react-native.d.ts +++ b/packages/lucide-react-native/lucide-react-native.d.ts @@ -1,13 +1,16 @@ /// -declare module 'lucide-react-native' +declare module 'lucide-react-native'; // Create interface extending SVGProps export interface LucideProps extends Partial> { - size?: string | number + size?: string | number; } -export declare const createLucideIcon: (iconName: string, iconNode: any[]) => (props: LucideProps) => JSX.Element; +export declare const createLucideIcon: ( + iconName: string, + iconNode: any[], +) => (props: LucideProps) => JSX.Element; export type Icon = React.FC; diff --git a/packages/lucide-react-native/rollup.config.mjs b/packages/lucide-react-native/rollup.config.mjs index 948b21ae6..9bde99da1 100644 --- a/packages/lucide-react-native/rollup.config.mjs +++ b/packages/lucide-react-native/rollup.config.mjs @@ -1,5 +1,5 @@ import plugins from '@lucide/rollup-plugins'; -import dts from "rollup-plugin-dts"; +import dts from 'rollup-plugin-dts'; import pkg from './package.json' assert { type: 'json' }; const packageName = 'LucideReact'; @@ -23,7 +23,7 @@ const bundles = [ const configs = bundles .map(({ inputs, outputDir, format, minify, preserveModules }) => - inputs.map(input => ({ + inputs.map((input) => ({ input, plugins: plugins(pkg, minify), external: ['react', 'react-native-svg'], @@ -49,13 +49,16 @@ const configs = bundles ) .flat(); - export default [ - { - input: inputs[0], - output: [{ - file: `dist/${outputFileName}.d.ts`, format: "es" - }], - plugins: [dts()], - }, - ...configs - ]; +export default [ + { + input: inputs[0], + output: [ + { + file: `dist/${outputFileName}.d.ts`, + format: 'es', + }, + ], + plugins: [dts()], + }, + ...configs, +]; diff --git a/packages/lucide-react-native/src/createLucideIcon.ts b/packages/lucide-react-native/src/createLucideIcon.ts index 9a080895c..e824659bd 100644 --- a/packages/lucide-react-native/src/createLucideIcon.ts +++ b/packages/lucide-react-native/src/createLucideIcon.ts @@ -1,21 +1,38 @@ -import { forwardRef, createElement, ReactSVG, FunctionComponent, ForwardRefExoticComponent } from 'react'; +import { + forwardRef, + createElement, + ReactSVG, + FunctionComponent, + ForwardRefExoticComponent, +} from 'react'; import * as NativeSvg from 'react-native-svg'; import defaultAttributes, { childDefaultAttributes } from './defaultAttributes'; import type { SvgProps } from 'react-native-svg'; -export type IconNode = [elementName: keyof ReactSVG, attrs: Record][] +export type IconNode = [elementName: keyof ReactSVG, attrs: Record][]; export interface LucideProps extends SvgProps { - size?: string | number - absoluteStrokeWidth?: boolean - 'data-testid'?: string + size?: string | number; + absoluteStrokeWidth?: boolean; + 'data-testid'?: string; } export type LucideIcon = ForwardRefExoticComponent; const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => { const Component = forwardRef( - ({ color = 'currentColor', size = 24, strokeWidth = 2, absoluteStrokeWidth, children, 'data-testid': dataTestId, ...rest }: LucideProps, ref) => { + ( + { + color = 'currentColor', + size = 24, + strokeWidth = 2, + absoluteStrokeWidth, + children, + 'data-testid': dataTestId, + ...rest + }: LucideProps, + ref, + ) => { const customAttrs = { stroke: color, strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth, @@ -42,12 +59,10 @@ const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => { { ...childDefaultAttributes, ...customAttrs, ...attrs } as LucideProps, ); }), - ...( - (Array.isArray(children) ? children : [children]) || [] - ), + ...((Array.isArray(children) ? children : [children]) || []), ], ); - } + }, ); Component.displayName = `${iconName}`; diff --git a/packages/lucide-react-native/tests/lucide-react-native.spec.tsx b/packages/lucide-react-native/tests/lucide-react-native.spec.tsx index 1be83b746..c86d0576d 100644 --- a/packages/lucide-react-native/tests/lucide-react-native.spec.tsx +++ b/packages/lucide-react-native/tests/lucide-react-native.spec.tsx @@ -1,16 +1,16 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { cleanup, render } from '@testing-library/react' -import { Edit2, Grid, Pen } from '../src/lucide-react-native' +import { cleanup, render } from '@testing-library/react'; +import { Edit2, Grid, Pen } from '../src/lucide-react-native'; -vi.mock('react-native-svg') +vi.mock('react-native-svg'); -type Attributes = Record +type Attributes = Record; describe('Using lucide icon components', () => { it('should render an component', () => { - const { container } = render( ); + const { container } = render(); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should adjust the size, stroke color and stroke width', () => { @@ -30,7 +30,7 @@ describe('Using lucide icon components', () => { expect((attributes as unknown as Attributes).height.value).toBe('48'); expect((attributes as unknown as Attributes)['stroke-width'].value).toBe('4'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should render the alias icon', () => { @@ -44,9 +44,9 @@ describe('Using lucide icon components', () => { />, ); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); const { container: Edit2Container } = render( { />, ); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); }); - it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { const testId = 'grid-icon'; const { container, getByTestId } = render( @@ -72,50 +71,52 @@ describe('Using lucide icon components', () => { />, ); - const { attributes } = getByTestId(testId) as unknown as{ attributes: Record}; + const { attributes } = getByTestId(testId) as unknown as { + attributes: Record; + }; expect(attributes.stroke.value).toBe('red'); expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('1'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should work with a single child component', () => { - const testId = "single-child"; - const childId = "child"; + const testId = 'single-child'; + const childId = 'child'; const { container, getByTestId } = render( - - + + , ); - const { children} = getByTestId(testId) as unknown as{ children: HTMLCollection}; - const lastChild = children[children.length -1]; + const { children } = getByTestId(testId) as unknown as { children: HTMLCollection }; + const lastChild = children[children.length - 1]; expect(lastChild).toEqual(getByTestId(childId)); expect(container.innerHTML).toMatchSnapshot(); - }) + }); it('should work with several children components', () => { - const testId = "multiple-children"; - const childId1 = "child1"; - const childId2 = "child2"; + const testId = 'multiple-children'; + const childId1 = 'child1'; + const childId2 = 'child2'; const { container, getByTestId } = render( - - - + + + , ); - const {children} = getByTestId(testId) as unknown as{ children: HTMLCollection}; + const { children } = getByTestId(testId) as unknown as { children: HTMLCollection }; const child1 = children[children.length - 2]; const child2 = children[children.length - 1]; expect(child1).toEqual(getByTestId(childId1)); expect(child2).toEqual(getByTestId(childId2)); expect(container.innerHTML).toMatchSnapshot(); - }) + }); it('should duplicate properties to children components', () => { const testId = 'multiple-children'; @@ -125,7 +126,12 @@ describe('Using lucide icon components', () => { const strokeWidth = 10; const { container, getByTestId } = render( - + , ); const { children = [] } = getByTestId(testId) as unknown as { children: HTMLCollection }; for (let i = 0; i < children.length; i++) { @@ -136,5 +142,5 @@ describe('Using lucide icon components', () => { } expect(container.innerHTML).toMatchSnapshot(); - }) -}) + }); +}); diff --git a/packages/lucide-react-native/tests/setupVitest.js b/packages/lucide-react-native/tests/setupVitest.js index 4c913f798..337c9211e 100644 --- a/packages/lucide-react-native/tests/setupVitest.js +++ b/packages/lucide-react-native/tests/setupVitest.js @@ -2,9 +2,9 @@ import '@testing-library/jest-dom'; import { expect, afterEach } from 'vitest'; import { cleanup } from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; -import htmlSerializer from 'jest-serializer-html' +import htmlSerializer from 'jest-serializer-html'; -expect.addSnapshotSerializer(htmlSerializer) +expect.addSnapshotSerializer(htmlSerializer); afterEach(() => { cleanup(); diff --git a/packages/lucide-react-native/tsconfig.json b/packages/lucide-react-native/tsconfig.json index 5ef9e56f0..757dfc8e4 100644 --- a/packages/lucide-react-native/tsconfig.json +++ b/packages/lucide-react-native/tsconfig.json @@ -2,10 +2,7 @@ "compilerOptions": { "target": "esnext", "module": "ESNext", - "lib": [ - "es2019", - "DOM" - ], + "lib": ["es2019", "DOM"], "allowJs": true, "jsx": "react-jsx", "noEmit": true, @@ -16,9 +13,7 @@ "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "esModuleInterop": true, - "skipLibCheck": false + "skipLibCheck": false, }, - "exclude": [ - "node_modules", - ] + "exclude": ["node_modules"], } diff --git a/packages/lucide-react/rollup.config.mjs b/packages/lucide-react/rollup.config.mjs index e4a153f13..650bde4c5 100644 --- a/packages/lucide-react/rollup.config.mjs +++ b/packages/lucide-react/rollup.config.mjs @@ -1,9 +1,9 @@ import plugins, { replace } from '@lucide/rollup-plugins'; import pkg from './package.json' assert { type: 'json' }; -import dts from "rollup-plugin-dts"; +import dts from 'rollup-plugin-dts'; import getAliasesEntryNames from './scripts/getAliasesEntryNames.mjs'; -const aliasesEntries = await getAliasesEntryNames() +const aliasesEntries = await getAliasesEntryNames(); const packageName = 'LucideReact'; const outputFileName = 'lucide-react'; @@ -28,10 +28,7 @@ const bundles = [ }, { format: 'esm', - inputs: [ - ...inputs, - ...aliasesEntries - ], + inputs: [...inputs, ...aliasesEntries], outputDir, preserveModules: true, }, @@ -42,61 +39,76 @@ const bundles = [ external: [/src/], paths: (id) => { if (id.match(/src/)) { - const [, modulePath] = id.match(/src\/(.*)\.ts/) + const [, modulePath] = id.match(/src\/(.*)\.ts/); - return `dist/esm/${modulePath}.js` + return `dist/esm/${modulePath}.js`; } - } + }, }, ]; const configs = bundles - .map(({ inputs, outputDir, outputFile, format, minify, preserveModules, entryFileNames, external = [], paths }) => - inputs.map(input => ({ - input, - plugins: plugins(pkg, minify), - external: [ - 'react', - 'prop-types', - ...external - ], - output: { - name: packageName, - ...(preserveModules - ? { - dir:`${outputDir}/${format}`, - } - : { - file: outputFile ?? `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`, - }), - paths, - entryFileNames, - format, - sourcemap: true, - preserveModules, - globals: { - react: 'react', - 'prop-types': 'PropTypes' + .map( + ({ + inputs, + outputDir, + outputFile, + format, + minify, + preserveModules, + entryFileNames, + external = [], + paths, + }) => + inputs.map((input) => ({ + input, + plugins: plugins(pkg, minify), + external: ['react', 'prop-types', ...external], + output: { + name: packageName, + ...(preserveModules + ? { + dir: `${outputDir}/${format}`, + } + : { + file: + outputFile ?? + `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`, + }), + paths, + entryFileNames, + format, + sourcemap: true, + preserveModules, + globals: { + react: 'react', + 'prop-types': 'PropTypes', + }, }, - }, - })), + })), ) .flat(); export default [ { input: 'src/dynamicIconImports.ts', - output: [{ - file: `dynamicIconImports.d.ts`, format: "es" - }], + output: [ + { + file: `dynamicIconImports.d.ts`, + format: 'es', + }, + ], plugins: [dts()], }, { input: inputs[0], - output: [{ - file: `dist/${outputFileName}.d.ts`, format: "es" - }], + output: [ + { + file: `dist/${outputFileName}.d.ts`, + format: 'es', + }, + ], plugins: [dts()], }, - ...configs + ...configs, ]; diff --git a/packages/lucide-react/src/createLucideIcon.ts b/packages/lucide-react/src/createLucideIcon.ts index b7c2b7c1f..172a509f9 100644 --- a/packages/lucide-react/src/createLucideIcon.ts +++ b/packages/lucide-react/src/createLucideIcon.ts @@ -35,8 +35,18 @@ export const toKebabCase = (string: string) => const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => { const Component = forwardRef( - ({ color = 'currentColor', size = 24, strokeWidth = 2, absoluteStrokeWidth, className = '', children, ...rest }, ref) =>{ - + ( + { + color = 'currentColor', + size = 24, + strokeWidth = 2, + absoluteStrokeWidth, + className = '', + children, + ...rest + }, + ref, + ) => { return createElement( 'svg', { @@ -45,16 +55,18 @@ const createLucideIcon = (iconName: string, iconNode: IconNode): LucideIcon => { width: size, height: size, stroke: color, - strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, + strokeWidth: absoluteStrokeWidth + ? (Number(strokeWidth) * 24) / Number(size) + : strokeWidth, className: ['lucide', `lucide-${toKebabCase(iconName)}`, className].join(' '), ...rest, }, [ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)), ...(Array.isArray(children) ? children : [children]), - ] - ) - } + ], + ); + }, ); Component.displayName = `${iconName}`; diff --git a/packages/lucide-react/tests/lucide-react.spec.tsx b/packages/lucide-react/tests/lucide-react.spec.tsx index d5da181e4..5d282290a 100644 --- a/packages/lucide-react/tests/lucide-react.spec.tsx +++ b/packages/lucide-react/tests/lucide-react.spec.tsx @@ -1,14 +1,14 @@ import { describe, it, expect } from 'vitest'; -import { render, cleanup, waitFor } from '@testing-library/react' +import { render, cleanup, waitFor } from '@testing-library/react'; import { Pen, Edit2, Grid, LucideProps, Droplet } from '../src/lucide-react'; import { Suspense, lazy } from 'react'; import dynamicIconImports from '../src/dynamicIconImports'; describe('Using lucide icon components', () => { it('should render an component', () => { - const { container } = render( ); + const { container } = render(); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should adjust the size, stroke color and stroke width', () => { @@ -22,13 +22,15 @@ describe('Using lucide icon components', () => { />, ); - const { attributes } = getByTestId(testId) as unknown as{ attributes: Record}; + const { attributes } = getByTestId(testId) as unknown as { + attributes: Record; + }; expect(attributes.stroke.value).toBe('red'); expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('4'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should render the alias icon', () => { @@ -40,9 +42,9 @@ describe('Using lucide icon components', () => { />, ); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); const { container: Edit2Container } = render( { />, ); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); }); - it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { const testId = 'grid-icon'; const { container, getByTestId } = render( @@ -67,20 +68,20 @@ describe('Using lucide icon components', () => { />, ); - const { attributes } = getByTestId(testId) as unknown as{ attributes: Record}; + const { attributes } = getByTestId(testId) as unknown as { + attributes: Record; + }; expect(attributes.stroke.value).toBe('red'); expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('1'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should apply all classNames to the element', () => { const testClass = 'my-class'; - const { container } = render( - , - ); + const { container } = render(); expect(container.firstChild).toHaveClass(testClass); expect(container.firstChild).toHaveClass('lucide'); @@ -100,7 +101,7 @@ describe('Using lucide icon components', () => { ); - } + }; const { container, getByLabelText } = render( { />, ); - await waitFor(() => getByLabelText('smile')) - - expect( container.innerHTML ).toMatchSnapshot(); + await waitFor(() => getByLabelText('smile')); + expect(container.innerHTML).toMatchSnapshot(); }); -}) +}); diff --git a/packages/lucide-react/tests/setupVitest.js b/packages/lucide-react/tests/setupVitest.js index 24cc3a9bc..a60463ed8 100644 --- a/packages/lucide-react/tests/setupVitest.js +++ b/packages/lucide-react/tests/setupVitest.js @@ -1,9 +1,9 @@ import { expect, afterEach } from 'vitest'; import { cleanup } from '@testing-library/react'; import '@testing-library/jest-dom/vitest'; -import htmlSerializer from 'jest-serializer-html' +import htmlSerializer from 'jest-serializer-html'; -expect.addSnapshotSerializer(htmlSerializer) +expect.addSnapshotSerializer(htmlSerializer); afterEach(() => { cleanup(); diff --git a/packages/lucide-react/tsconfig.json b/packages/lucide-react/tsconfig.json index f25a9a7eb..61ee72b00 100644 --- a/packages/lucide-react/tsconfig.json +++ b/packages/lucide-react/tsconfig.json @@ -20,5 +20,5 @@ "jsx": "react-jsx", "types": ["@testing-library/jest-dom"], }, - "exclude": ["**/node_modules"] + "exclude": ["**/node_modules"], } diff --git a/packages/lucide-solid/scripts/replaceVersion.mjs b/packages/lucide-solid/scripts/replaceVersion.mjs index eff6ddf4e..01fad2a8e 100644 --- a/packages/lucide-solid/scripts/replaceVersion.mjs +++ b/packages/lucide-solid/scripts/replaceVersion.mjs @@ -1,18 +1,13 @@ -import fs from 'fs' -import path from 'path' +import fs from 'fs'; +import path from 'path'; import pkg from '../package.json' assert { type: 'json' }; -const files = [ - 'dist/source/lucide-solid.js', - 'dist/types/lucide-solid.d.ts' -] +const files = ['dist/source/lucide-solid.js', 'dist/types/lucide-solid.d.ts']; files.forEach((file) => { const fileContents = fs.readFileSync(path.resolve(file), 'utf-8'); - const newFileContents = fileContents.replace('{{version}}', pkg.version) - - fs.writeFileSync(path.resolve(file), newFileContents, 'utf-8') -}) - + const newFileContents = fileContents.replace('{{version}}', pkg.version); + fs.writeFileSync(path.resolve(file), newFileContents, 'utf-8'); +}); diff --git a/packages/lucide-solid/src/Icon.tsx b/packages/lucide-solid/src/Icon.tsx index 5d6f456ca..c01747765 100644 --- a/packages/lucide-solid/src/Icon.tsx +++ b/packages/lucide-solid/src/Icon.tsx @@ -11,11 +11,12 @@ import { IconNode, LucideProps } from './types'; * @param {string} string * @returns {string} A kebabized string */ -export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); +export const toKebabCase = (string: string) => + string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); interface IconProps { - name: string - iconNode: IconNode + name: string; + iconNode: IconNode; } const Icon = (props: LucideProps & IconProps) => { @@ -27,34 +28,38 @@ const Icon = (props: LucideProps & IconProps) => { 'class', 'name', 'iconNode', - 'absoluteStrokeWidth' + 'absoluteStrokeWidth', ]); return ( {([elementName, attrs]) => { return ( - + ); }} - ) -} + ); +}; -export default Icon +export default Icon; diff --git a/packages/lucide-solid/src/defaultAttributes.ts b/packages/lucide-solid/src/defaultAttributes.ts index 1a3542ad4..092994586 100644 --- a/packages/lucide-solid/src/defaultAttributes.ts +++ b/packages/lucide-solid/src/defaultAttributes.ts @@ -1,5 +1,5 @@ -import { JSX } from "solid-js/jsx-runtime"; -import { SVGAttributes } from "./types"; +import { JSX } from 'solid-js/jsx-runtime'; +import { SVGAttributes } from './types'; const defaultAttributes: SVGAttributes = { xmlns: 'http://www.w3.org/2000/svg', @@ -13,4 +13,4 @@ const defaultAttributes: SVGAttributes = { 'stroke-linejoin': 'round', }; -export default defaultAttributes +export default defaultAttributes; diff --git a/packages/lucide-solid/src/types.ts b/packages/lucide-solid/src/types.ts index 3435c5a21..80ad93fe7 100644 --- a/packages/lucide-solid/src/types.ts +++ b/packages/lucide-solid/src/types.ts @@ -1,13 +1,13 @@ -import { JSX } from "solid-js/jsx-runtime"; +import { JSX } from 'solid-js/jsx-runtime'; -export type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record][] -export type SVGAttributes = Partial> +export type IconNode = [elementName: keyof JSX.IntrinsicElements, attrs: Record][]; +export type SVGAttributes = Partial>; export interface LucideProps extends SVGAttributes { key?: string | number; - color?: string - size?: string | number - strokeWidth?: string | number - class?: string - absoluteStrokeWidth?: boolean + color?: string; + size?: string | number; + strokeWidth?: string | number; + class?: string; + absoluteStrokeWidth?: boolean; } diff --git a/packages/lucide-solid/tests/lucide-solid.spec.tsx b/packages/lucide-solid/tests/lucide-solid.spec.tsx index 8e26bb5d1..3a01b8ac7 100644 --- a/packages/lucide-solid/tests/lucide-solid.spec.tsx +++ b/packages/lucide-solid/tests/lucide-solid.spec.tsx @@ -1,89 +1,90 @@ import { describe, it, expect } from 'vitest'; -import { render, cleanup } from '@solidjs/testing-library' -import { Edit2, Grid, Pen, Droplet } from '../src/lucide-solid' +import { render, cleanup } from '@solidjs/testing-library'; +import { Edit2, Grid, Pen, Droplet } from '../src/lucide-solid'; describe('Using lucide icon components', () => { it('should render a component', () => { - const { container } = render(() => ); + const { container } = render(() => ); expect(container.innerHTML).toMatchSnapshot(); }); it('should adjust the size, stroke color and stroke width', async () => { const testId = 'grid-icon'; - const { container, getByTestId } = render(() => + const { container, getByTestId } = render(() => ( , - ); + /> + )); - const { attributes } = await getByTestId(testId) as unknown as{ attributes: Record}; + const { attributes } = (await getByTestId(testId)) as unknown as { + attributes: Record; + }; expect(attributes.stroke.value).toBe('red'); expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('4'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should render the alias icon', () => { const testId = 'pen-icon'; - const { container } = render(() => + const { container } = render(() => ( , - ); + /> + )); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); - const { container: Edit2Container } = render(() => + const { container: Edit2Container } = render(() => ( , - ); + /> + )); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); }); - it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { const testId = 'grid-icon'; - const { container, getByTestId } = render(() => + const { container, getByTestId } = render(() => ( , - ); + /> + )); - const { attributes } = getByTestId(testId) as unknown as{ attributes: Record}; + const { attributes } = getByTestId(testId) as unknown as { + attributes: Record; + }; expect(attributes.stroke.value).toBe('red'); expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('1'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); it('should add all classes to the element', () => { const testClass = 'my-class'; - const { container } = render(() => - , - ); + const { container } = render(() => ); expect(container.firstChild).toHaveClass(testClass); expect(container.firstChild).toHaveClass('lucide'); expect(container.firstChild).toHaveClass('lucide-droplet'); }); -}) +}); diff --git a/packages/lucide-solid/tests/setupVitest.js b/packages/lucide-solid/tests/setupVitest.js index f04cb95ce..eee9d60f6 100644 --- a/packages/lucide-solid/tests/setupVitest.js +++ b/packages/lucide-solid/tests/setupVitest.js @@ -1,9 +1,9 @@ import { expect, afterEach } from 'vitest'; import { cleanup } from '@solidjs/testing-library'; import '@testing-library/jest-dom/vitest'; -import htmlSerializer from 'jest-serializer-html' +import htmlSerializer from 'jest-serializer-html'; -expect.addSnapshotSerializer(htmlSerializer) +expect.addSnapshotSerializer(htmlSerializer); afterEach(() => { cleanup(); diff --git a/packages/lucide-solid/tsconfig.json b/packages/lucide-solid/tsconfig.json index 67fa6ed9c..a3de0786c 100644 --- a/packages/lucide-solid/tsconfig.json +++ b/packages/lucide-solid/tsconfig.json @@ -11,6 +11,6 @@ "types": ["vite/client", "@testing-library/jest-dom"], "noEmit": true, "isolatedModules": true, - "outDir": "dist" - } + "outDir": "dist", + }, } diff --git a/packages/lucide-static/rollup.config.mjs b/packages/lucide-static/rollup.config.mjs index fd90a5299..18d82c7fb 100644 --- a/packages/lucide-static/rollup.config.mjs +++ b/packages/lucide-static/rollup.config.mjs @@ -21,18 +21,18 @@ const bundles = [ const configs = bundles .map(({ inputs, outputDir, format, minify, preserveModules }) => - inputs.map(input => ({ + inputs.map((input) => ({ input, plugins: plugins(pkg, minify), output: { name: outputFileName, ...(preserveModules ? { - dir: `${outputDir}/${format}`, - } + dir: `${outputDir}/${format}`, + } : { - file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`, - }), + file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`, + }), format, sourcemap: true, preserveModules, diff --git a/packages/lucide-static/scripts/buildLib.mjs b/packages/lucide-static/scripts/buildLib.mjs index 7c5beb08b..3c74df19f 100644 --- a/packages/lucide-static/scripts/buildLib.mjs +++ b/packages/lucide-static/scripts/buildLib.mjs @@ -4,10 +4,7 @@ import path from 'path'; import getArgumentOptions from 'minimist'; import { parseSync } from 'svgson'; -import { - readSvgDirectory, - getCurrentDirPath, -} from '../../../scripts/helpers.mjs'; +import { readSvgDirectory, getCurrentDirPath } from '../../../scripts/helpers.mjs'; import readSvgs from './readSvgs.mjs'; import generateSprite from './generateSprite.mjs'; import generateIconNodes from './generateIconNodes.mjs'; diff --git a/packages/lucide-static/src/lucide-static.ts b/packages/lucide-static/src/lucide-static.ts index 4ce404ebe..098bba469 100644 --- a/packages/lucide-static/src/lucide-static.ts +++ b/packages/lucide-static/src/lucide-static.ts @@ -1,2 +1,2 @@ -export * from './icons' +export * from './icons'; export * from './aliases'; diff --git a/packages/lucide-static/tsconfig.json b/packages/lucide-static/tsconfig.json index dac748969..7fdaedbf6 100644 --- a/packages/lucide-static/tsconfig.json +++ b/packages/lucide-static/tsconfig.json @@ -13,5 +13,5 @@ "resolveJsonModule": true, "sourceMap": true, "outDir": "./dist", - } + }, } diff --git a/packages/lucide-svelte/scripts/appendBlockComments.mjs b/packages/lucide-svelte/scripts/appendBlockComments.mjs index d6d6e3ae1..a9666cc73 100644 --- a/packages/lucide-svelte/scripts/appendBlockComments.mjs +++ b/packages/lucide-svelte/scripts/appendBlockComments.mjs @@ -47,7 +47,7 @@ for (const file of files) { if (exportClassRegex.test(newContents)) { newContents = newContents.replace( exportClassRegex, - `${blockComment}\nexport default class $1 extends SvelteComponentTyped<$2> {` + `${blockComment}\nexport default class $1 extends SvelteComponentTyped<$2> {`, ); } } diff --git a/packages/lucide-svelte/tests/lucide-svelte.spec.ts b/packages/lucide-svelte/tests/lucide-svelte.spec.ts index 667a32946..643d3e153 100644 --- a/packages/lucide-svelte/tests/lucide-svelte.spec.ts +++ b/packages/lucide-svelte/tests/lucide-svelte.spec.ts @@ -1,10 +1,10 @@ import { describe, it, expect, afterEach } from 'vitest'; import { render, cleanup } from '@testing-library/svelte'; -import { Smile, Pen, Edit2 } from '../src/lucide-svelte' -import TestSlots from './TestSlots.svelte' +import { Smile, Pen, Edit2 } from '../src/lucide-svelte'; +import TestSlots from './TestSlots.svelte'; describe('Using lucide icon components', () => { - afterEach(() => cleanup()) + afterEach(() => cleanup()); it('should render an component', () => { const { container } = render(Smile); expect(container).toMatchSnapshot(); @@ -15,8 +15,8 @@ describe('Using lucide icon components', () => { props: { size: 48, color: 'red', - strokeWidth: 4 - } + strokeWidth: 4, + }, }); expect(container).toMatchSnapshot(); @@ -26,8 +26,8 @@ describe('Using lucide icon components', () => { const testClass = 'my-icon'; render(Smile, { props: { - class: testClass - } + class: testClass, + }, }); const [icon] = document.getElementsByClassName(testClass); @@ -42,8 +42,8 @@ describe('Using lucide icon components', () => { it('should add a style attribute to the element', () => { render(Smile, { props: { - style: "position: absolute;" - } + style: 'position: absolute;', + }, }); const [icon] = document.getElementsByClassName('lucide'); @@ -61,30 +61,32 @@ describe('Using lucide icon components', () => { it('should render the alias icon', () => { const { container } = render(Pen); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); const { container: Edit2Container } = render(Edit2); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); }); it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { const testId = 'smile-icon'; const { container, getByTestId } = render(Smile, { - 'data-testid':testId, + 'data-testid': testId, color: 'red', size: 48, - absoluteStrokeWidth: true + absoluteStrokeWidth: true, }); - const { attributes } = getByTestId(testId) as unknown as{ attributes: Record}; + const { attributes } = getByTestId(testId) as unknown as { + attributes: Record; + }; expect(attributes.stroke.value).toBe('red'); expect(attributes.width.value).toBe('48'); expect(attributes.height.value).toBe('48'); expect(attributes['stroke-width'].value).toBe('1'); - expect( container.innerHTML ).toMatchSnapshot(); + expect(container.innerHTML).toMatchSnapshot(); }); }); diff --git a/packages/lucide-svelte/tests/setupVitest.ts b/packages/lucide-svelte/tests/setupVitest.ts index fe9e03b67..03a0244af 100644 --- a/packages/lucide-svelte/tests/setupVitest.ts +++ b/packages/lucide-svelte/tests/setupVitest.ts @@ -1,5 +1,5 @@ import { expect } from 'vitest'; import '@testing-library/jest-dom/vitest'; -import htmlSerializer from 'jest-serializer-html' +import htmlSerializer from 'jest-serializer-html'; -expect.addSnapshotSerializer(htmlSerializer) +expect.addSnapshotSerializer(htmlSerializer); diff --git a/packages/lucide-svelte/tsconfig.json b/packages/lucide-svelte/tsconfig.json index e7e0c7acd..068c3322f 100644 --- a/packages/lucide-svelte/tsconfig.json +++ b/packages/lucide-svelte/tsconfig.json @@ -10,11 +10,5 @@ "isolatedModules": true, "types": ["@testing-library/jest-dom"], }, - "include": [ - "src/**/*.d.ts", - "src/**/*.ts", - "src/**/*.js", - "src/**/*.svelte", - "tests/**/*.ts" - ], + "include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte", "tests/**/*.ts"], } diff --git a/packages/lucide-svelte/vitest.config.ts b/packages/lucide-svelte/vitest.config.ts index 397d447e2..0763e3912 100644 --- a/packages/lucide-svelte/vitest.config.ts +++ b/packages/lucide-svelte/vitest.config.ts @@ -1,18 +1,16 @@ -import { defineConfig } from 'vitest/config' -import { svelte } from '@sveltejs/vite-plugin-svelte' +import { defineConfig } from 'vitest/config'; +import { svelte } from '@sveltejs/vite-plugin-svelte'; export default defineConfig({ plugins: [ svelte({ hot: false, - }) + }), ], test: { globals: true, environment: 'jsdom', setupFiles: './tests/setupVitest.ts', - alias: [ - { find: /^svelte$/, replacement: "svelte/internal" } - ] + alias: [{ find: /^svelte$/, replacement: 'svelte/internal' }], }, }); diff --git a/packages/lucide-vue-next/rollup.config.mjs b/packages/lucide-vue-next/rollup.config.mjs index 030d2f3b3..e458bf440 100644 --- a/packages/lucide-vue-next/rollup.config.mjs +++ b/packages/lucide-vue-next/rollup.config.mjs @@ -1,6 +1,6 @@ import plugins, { replace } from '@lucide/rollup-plugins'; import pkg from './package.json' assert { type: 'json' }; -import dts from "rollup-plugin-dts"; +import dts from 'rollup-plugin-dts'; const packageName = 'LucideVueNext'; const outputFileName = 'lucide-vue-next'; @@ -33,7 +33,7 @@ const bundles = [ const configs = bundles .map(({ inputs, outputDir, format, minify, preserveModules }) => - inputs.map(input => ({ + inputs.map((input) => ({ input, plugins: plugins(pkg, minify), external: ['vue'], @@ -57,19 +57,22 @@ const configs = bundles ) .flat(); - export default [ - { - input: inputs[0], - output: [{ - file: `dist/${outputFileName}.d.ts`, format: "es" - }], - plugins: [ - dts({ - compilerOptions: { - preserveSymlinks: false - } - }) - ], - }, - ...configs - ]; +export default [ + { + input: inputs[0], + output: [ + { + file: `dist/${outputFileName}.d.ts`, + format: 'es', + }, + ], + plugins: [ + dts({ + compilerOptions: { + preserveSymlinks: false, + }, + }), + ], + }, + ...configs, +]; diff --git a/packages/lucide-vue-next/src/createLucideIcon.ts b/packages/lucide-vue-next/src/createLucideIcon.ts index 13bbf3e92..dd042f518 100644 --- a/packages/lucide-vue-next/src/createLucideIcon.ts +++ b/packages/lucide-vue-next/src/createLucideIcon.ts @@ -4,14 +4,13 @@ import defaultAttributes from './defaultAttributes'; // Create interface extending SVGAttributes export interface SVGProps extends Partial { - size?: 24 | number - strokeWidth?: number | string - absoluteStrokeWidth?: boolean + size?: 24 | number; + strokeWidth?: number | string; + absoluteStrokeWidth?: boolean; } - -export type IconNode = [elementName: string, attrs: Record][] -export type Icon = FunctionalComponent +export type IconNode = [elementName: string, attrs: Record][]; +export type Icon = FunctionalComponent; /** * Converts string to KebabCase * Copied from scripts/helper. If anyone knows how to properly import it here @@ -20,29 +19,31 @@ export type Icon = FunctionalComponent * @param {string} string * @returns {string} A kebabized string */ -export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); +export const toKebabCase = (string: string) => + string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); -const createLucideIcon = (iconName: string, iconNode: IconNode): Icon => ( - { size, strokeWidth = 2, absoluteStrokeWidth, color, class: classes, ...props }, // props - { attrs, slots } // context +const createLucideIcon = + (iconName: string, iconNode: IconNode): Icon => + ( + { size, strokeWidth = 2, absoluteStrokeWidth, color, class: classes, ...props }, // props + { attrs, slots }, // context ) => { - return h( - 'svg', - { - ...defaultAttributes, - width: size || defaultAttributes.width, - height: size || defaultAttributes.height, - stroke: color || defaultAttributes.stroke, - 'stroke-width': absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, - ...attrs, - class: ['lucide', `lucide-${toKebabCase(iconName)}`], - ...props, - }, - [ - ...iconNode.map(child => h(...child)), - ...(slots.default ? [slots.default()] : []) - ], - ); -}; + return h( + 'svg', + { + ...defaultAttributes, + width: size || defaultAttributes.width, + height: size || defaultAttributes.height, + stroke: color || defaultAttributes.stroke, + 'stroke-width': absoluteStrokeWidth + ? (Number(strokeWidth) * 24) / Number(size) + : strokeWidth, + ...attrs, + class: ['lucide', `lucide-${toKebabCase(iconName)}`], + ...props, + }, + [...iconNode.map((child) => h(...child)), ...(slots.default ? [slots.default()] : [])], + ); + }; export default createLucideIcon; diff --git a/packages/lucide-vue-next/tests/lucide-vue-next.spec.ts b/packages/lucide-vue-next/tests/lucide-vue-next.spec.ts index 483965a61..130b5d784 100644 --- a/packages/lucide-vue-next/tests/lucide-vue-next.spec.ts +++ b/packages/lucide-vue-next/tests/lucide-vue-next.spec.ts @@ -1,94 +1,93 @@ import { describe, it, expect, vi, afterEach } from 'vitest'; -import {render, fireEvent, cleanup } from '@testing-library/vue' -import { Smile, Edit2, Pen } from '../src/lucide-vue-next' +import { render, fireEvent, cleanup } from '@testing-library/vue'; +import { Smile, Edit2, Pen } from '../src/lucide-vue-next'; describe('Using lucide icon components', () => { - afterEach(() => cleanup()) + afterEach(() => cleanup()); it('should render an component', () => { - const { container } = render(Smile) + const { container } = render(Smile); expect(container).toMatchSnapshot(); }); it('should adjust the size, stroke color and stroke width', () => { - const {container} = render(Smile, { + const { container } = render(Smile, { props: { size: 48, color: 'red', - 'stroke-width': 4 - } - }) + 'stroke-width': 4, + }, + }); const [icon] = document.getElementsByClassName('lucide'); - expect(icon.getAttribute('width')).toBe('48') - expect(icon.getAttribute('stroke')).toBe('red') - expect(icon.getAttribute('stroke-width')).toBe('4') + expect(icon.getAttribute('width')).toBe('48'); + expect(icon.getAttribute('stroke')).toBe('red'); + expect(icon.getAttribute('stroke-width')).toBe('4'); expect(container).toMatchSnapshot(); }); - it('should add a class to the element', () => { - const {container} = render(Smile, { + const { container } = render(Smile, { attrs: { - class: "my-icon" - } - }) + class: 'my-icon', + }, + }); expect(container).toMatchSnapshot(); const [icon] = document.getElementsByClassName('my-icon'); - expect(icon).toHaveClass('my-icon') - expect(icon).toHaveClass('lucide') - expect(icon).toHaveClass('lucide-smile-icon') + expect(icon).toHaveClass('my-icon'); + expect(icon).toHaveClass('lucide'); + expect(icon).toHaveClass('lucide-smile-icon'); }); it('should add a style attribute to the element', () => { - const {container} = render(Smile, { + const { container } = render(Smile, { attrs: { style: 'position: absolute', - } - }) + }, + }); expect(container).toMatchSnapshot(); const [icon] = document.getElementsByClassName('lucide'); - expect(icon).toHaveStyle({ position: 'absolute' }) + expect(icon).toHaveStyle({ position: 'absolute' }); }); it('should call the onClick event', async () => { - const onClick = vi.fn() + const onClick = vi.fn(); render(Smile, { attrs: { onClick, - } - }) + }, + }); const [icon] = document.getElementsByClassName('lucide'); - await fireEvent.click(icon) + await fireEvent.click(icon); - expect(onClick).toHaveBeenCalled() + expect(onClick).toHaveBeenCalled(); }); it('should pass children to the icon slot', () => { - const testText = 'Hello World' + const testText = 'Hello World'; const template = { name: 'Stub', - template: `${testText}` - } + template: `${testText}`, + }; const { getByText, container } = render(Smile, { slots: { - default: template - } - }) + default: template, + }, + }); - const textElement = getByText(testText) + const textElement = getByText(testText); - expect(textElement).toBeInTheDocument() + expect(textElement).toBeInTheDocument(); expect(container).toMatchSnapshot(); }); @@ -97,38 +96,38 @@ describe('Using lucide icon components', () => { props: { size: 48, color: 'red', - 'stroke-width': 4 - } - }) + 'stroke-width': 4, + }, + }); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); const { container: Edit2Container } = render(Edit2, { props: { size: 48, color: 'red', - 'stroke-width': 4 - } - }) + 'stroke-width': 4, + }, + }); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) - }) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); + }); it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { render(Pen, { props: { size: 48, color: 'red', - absoluteStrokeWidth: true - } - }) + absoluteStrokeWidth: true, + }, + }); const [icon] = document.getElementsByClassName('lucide'); - expect(icon.getAttribute('width')).toBe('48') - expect(icon.getAttribute('stroke')).toBe('red') - expect(icon.getAttribute('stroke-width')).toBe('1') - }) + expect(icon.getAttribute('width')).toBe('48'); + expect(icon.getAttribute('stroke')).toBe('red'); + expect(icon.getAttribute('stroke-width')).toBe('1'); + }); }); diff --git a/packages/lucide-vue-next/tsconfig.json b/packages/lucide-vue-next/tsconfig.json index e605a4cde..baaea9601 100644 --- a/packages/lucide-vue-next/tsconfig.json +++ b/packages/lucide-vue-next/tsconfig.json @@ -12,5 +12,5 @@ "lib": ["ESNext", "DOM"], "skipLibCheck": true, "noEmit": true, - } + }, } diff --git a/packages/lucide-vue/rollup.config.mjs b/packages/lucide-vue/rollup.config.mjs index 911bacfe3..ad83bbd4d 100644 --- a/packages/lucide-vue/rollup.config.mjs +++ b/packages/lucide-vue/rollup.config.mjs @@ -32,7 +32,7 @@ const bundles = [ const configs = bundles .map(({ inputs, outputDir, format, minify, preserveModules }) => - inputs.map(input => ({ + inputs.map((input) => ({ input, plugins: plugins(pkg, minify), external: ['vue'], diff --git a/packages/lucide-vue/src/createLucideIcon.ts b/packages/lucide-vue/src/createLucideIcon.ts index 694c2c8ee..6392ae6f5 100644 --- a/packages/lucide-vue/src/createLucideIcon.ts +++ b/packages/lucide-vue/src/createLucideIcon.ts @@ -4,7 +4,7 @@ import defaultAttributes from './defaultAttributes'; var showDeprecationWarning = true; -type IconNode = [elementName: string, attrs: Record][] +type IconNode = [elementName: string, attrs: Record][]; /** * Converts string to KebabCase @@ -14,7 +14,8 @@ type IconNode = [elementName: string, attrs: Record][] * @param {string} string * @returns {string} A kebabized string */ -export const toKebabCase = (string: string) => string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); +export const toKebabCase = (string: string) => + string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(); export default (iconName: string, iconNode: IconNode): Component => ({ name: iconName, @@ -43,11 +44,7 @@ export default (iconName: string, iconNode: IconNode): Component => ({ }, render( createElement, - { - props: { color, size, strokeWidth, absoluteStrokeWidth, defaultClass }, - data, - children = [], - }, + { props: { color, size, strokeWidth, absoluteStrokeWidth, defaultClass }, data, children = [] }, ) { if (showDeprecationWarning) { console.warn( @@ -67,18 +64,14 @@ export default (iconName: string, iconNode: IconNode): Component => ({ width: size, height: size, stroke: color, - 'stroke-width': - absoluteStrokeWidth - ? Number(strokeWidth) * 24 / Number(size) - : strokeWidth, + 'stroke-width': absoluteStrokeWidth + ? (Number(strokeWidth) * 24) / Number(size) + : strokeWidth, ...data.attrs, }, - on: data?.on || {} + on: data?.on || {}, }, - [ - ...iconNode.map(([tag, attrs]) => createElement(String(tag), { attrs })), - ...children - ], + [...iconNode.map(([tag, attrs]) => createElement(String(tag), { attrs })), ...children], ); }, }); diff --git a/packages/lucide-vue/src/defaultAttributes.ts b/packages/lucide-vue/src/defaultAttributes.ts index 989a5aa89..f25994ae7 100644 --- a/packages/lucide-vue/src/defaultAttributes.ts +++ b/packages/lucide-vue/src/defaultAttributes.ts @@ -10,4 +10,4 @@ const defaultAttributes = { 'stroke-linejoin': 'round', }; -export default defaultAttributes +export default defaultAttributes; diff --git a/packages/lucide-vue/tests/lucide-vue.spec.ts b/packages/lucide-vue/tests/lucide-vue.spec.ts index 53ea689b0..61b154636 100644 --- a/packages/lucide-vue/tests/lucide-vue.spec.ts +++ b/packages/lucide-vue/tests/lucide-vue.spec.ts @@ -1,93 +1,92 @@ import { describe, it, expect, vi } from 'vitest'; -import { render, fireEvent, cleanup } from '@testing-library/vue' -import { Smile, Pen, Edit2 } from '../src/lucide-vue' +import { render, fireEvent, cleanup } from '@testing-library/vue'; +import { Smile, Pen, Edit2 } from '../src/lucide-vue'; import { afterEach } from 'vitest'; import { VueClass } from '@vue/test-utils'; describe('Using lucide icon components', () => { - afterEach(() => cleanup()) + afterEach(() => cleanup()); it('should render an component', () => { - const {container} = render(Smile as VueClass) + const { container } = render(Smile as VueClass); expect(container).toMatchSnapshot(); }); it('should adjust the size, stroke color and stroke width', () => { - const {container} = render(Smile as VueClass, { + const { container } = render(Smile as VueClass, { props: { size: 48, color: 'red', - strokeWidth: 4 - } - }) + strokeWidth: 4, + }, + }); const [icon] = document.getElementsByClassName('lucide'); - expect(icon.getAttribute('width')).toBe('48') - expect(icon.getAttribute('stroke')).toBe('red') - expect(icon.getAttribute('stroke-width')).toBe('4') + expect(icon.getAttribute('width')).toBe('48'); + expect(icon.getAttribute('stroke')).toBe('red'); + expect(icon.getAttribute('stroke-width')).toBe('4'); expect(container).toMatchSnapshot(); }); - it('should add a class to the element', () => { - const {container} = render(Smile as VueClass, { + const { container } = render(Smile as VueClass, { attrs: { - class: "my-icon" - } - }) + class: 'my-icon', + }, + }); expect(container).toMatchSnapshot(); const [icon] = document.getElementsByClassName('lucide'); - expect(icon).toHaveClass('my-icon') - expect(icon).toHaveClass('lucide-smile') - expect(icon).toHaveClass('lucide') + expect(icon).toHaveClass('my-icon'); + expect(icon).toHaveClass('lucide-smile'); + expect(icon).toHaveClass('lucide'); }); it('should add a style attribute to the element', () => { - const {container} = render(Smile as VueClass, { + const { container } = render(Smile as VueClass, { attrs: { style: 'position: absolute', - } - }) + }, + }); expect(container).toMatchSnapshot(); const [icon] = document.getElementsByClassName('lucide'); - expect(icon).toHaveStyle({ position: 'absolute' }) + expect(icon).toHaveStyle({ position: 'absolute' }); }); it('should call the onClick event', async () => { - const onClick = vi.fn() - render(Smile as VueClass, { + const onClick = vi.fn(); + render(Smile as VueClass, { listeners: { - click: onClick - } - }) + click: onClick, + }, + }); const [icon] = document.getElementsByClassName('lucide'); - await fireEvent.click(icon) + await fireEvent.click(icon); - expect(onClick).toHaveBeenCalled() + expect(onClick).toHaveBeenCalled(); }); it('should pass children to the icon slot', () => { - const testText = 'Hello World' - const template = `${testText}` + const testText = 'Hello World'; + const template = `${testText}`; const { getByText, container } = render(Smile as VueClass, { slots: { - default: { template } - } - }) + default: { template }, + }, + }); - const textElement = getByText(testText) + const textElement = getByText(testText); - expect(textElement).toBeInTheDocument() + expect(textElement).toBeInTheDocument(); expect(container).toMatchSnapshot(); }); @@ -96,38 +95,38 @@ describe('Using lucide icon components', () => { props: { size: '48', color: 'red', - strokeWidth: '4' - } - }) + strokeWidth: '4', + }, + }); - const PenIconRenderedHTML = container.innerHTML + const PenIconRenderedHTML = container.innerHTML; - cleanup() + cleanup(); const { container: Edit2Container } = render(Edit2 as VueClass, { props: { size: '48', color: 'red', - strokeWidth: '4' - } - }) + strokeWidth: '4', + }, + }); - expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML) - }) + expect(PenIconRenderedHTML).toBe(Edit2Container.innerHTML); + }); it('should not scale the strokeWidth when absoluteStrokeWidth is set', () => { const { getByText, container } = render(Pen as VueClass, { props: { size: '48', color: 'red', - absoluteStrokeWidth: true - } - }) + absoluteStrokeWidth: true, + }, + }); const [icon] = document.getElementsByClassName('lucide'); - expect(icon.getAttribute('width')).toBe('48') - expect(icon.getAttribute('stroke')).toBe('red') - expect(icon.getAttribute('stroke-width')).toBe('1') - }) + expect(icon.getAttribute('width')).toBe('48'); + expect(icon.getAttribute('stroke')).toBe('red'); + expect(icon.getAttribute('stroke-width')).toBe('1'); + }); }); diff --git a/packages/lucide-vue/tsconfig.json b/packages/lucide-vue/tsconfig.json index e683b6c91..27a4a9798 100644 --- a/packages/lucide-vue/tsconfig.json +++ b/packages/lucide-vue/tsconfig.json @@ -11,7 +11,7 @@ "esModuleInterop": true, "lib": ["ESNext", "DOM"], "skipLibCheck": true, - "noEmit": true + "noEmit": true, }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], } diff --git a/packages/lucide-vue/vitest.config.ts b/packages/lucide-vue/vitest.config.ts index 50a973317..33e1e069e 100644 --- a/packages/lucide-vue/vitest.config.ts +++ b/packages/lucide-vue/vitest.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'vitest/config' -import vue from '@vitejs/plugin-vue2' +import { defineConfig } from 'vitest/config'; +import vue from '@vitejs/plugin-vue2'; export default defineConfig({ plugins: [vue()], diff --git a/packages/lucide/rollup.config.mjs b/packages/lucide/rollup.config.mjs index 5d77520b8..2ca645642 100644 --- a/packages/lucide/rollup.config.mjs +++ b/packages/lucide/rollup.config.mjs @@ -33,30 +33,30 @@ const bundles = [ const configs = bundles .map(({ inputs, outputDir, format, minify, preserveModules }) => - inputs.map(input => ({ + inputs.map((input) => ({ input, plugins: [ // This is for lucide plugin to replace an argument in createIcons so it is easier to use with UMD. - ...( - format === 'umd' ? [ - replace({ - 'icons = {}': 'icons = iconAndAliases', - delimiters: ['', ''], - preventAssignment: false, - }), - ] : [] - ), - ...plugins(pkg, minify) + ...(format === 'umd' + ? [ + replace({ + 'icons = {}': 'icons = iconAndAliases', + delimiters: ['', ''], + preventAssignment: false, + }), + ] + : []), + ...plugins(pkg, minify), ], output: { name: outputFileName, ...(preserveModules ? { - dir: `${outputDir}/${format}`, - } + dir: `${outputDir}/${format}`, + } : { - file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`, - }), + file: `${outputDir}/${format}/${outputFileName}${minify ? '.min' : ''}.js`, + }), format, sourcemap: true, preserveModules, diff --git a/packages/lucide/src/attributeTypes.ts b/packages/lucide/src/attributeTypes.ts index 99eced111..d64bbed2c 100644 --- a/packages/lucide/src/attributeTypes.ts +++ b/packages/lucide/src/attributeTypes.ts @@ -10,7 +10,16 @@ interface AriaAttributes { 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; - 'aria-current'?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time' | undefined; + 'aria-current'?: + | boolean + | 'false' + | 'true' + | 'page' + | 'step' + | 'location' + | 'date' + | 'time' + | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: Booleanish | undefined; @@ -19,7 +28,16 @@ interface AriaAttributes { 'aria-expanded'?: Booleanish | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: Booleanish | undefined; - 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined; + 'aria-haspopup'?: + | boolean + | 'false' + | 'true' + | 'menu' + | 'listbox' + | 'tree' + | 'grid' + | 'dialog' + | undefined; 'aria-hidden'?: Booleanish | undefined; 'aria-invalid'?: boolean | 'false' | 'true' | 'grammar' | 'spelling' | undefined; 'aria-keyshortcuts'?: string | undefined; @@ -36,7 +54,18 @@ interface AriaAttributes { 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | 'false' | 'mixed' | 'true' | undefined; 'aria-readonly'?: Booleanish | undefined; - 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals' | undefined; + 'aria-relevant'?: + | 'additions' + | 'additions removals' + | 'additions text' + | 'all' + | 'removals' + | 'removals additions' + | 'removals text' + | 'text' + | 'text additions' + | 'text removals' + | undefined; 'aria-required'?: Booleanish | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; diff --git a/packages/lucide/src/createElement.ts b/packages/lucide/src/createElement.ts index f29d0eab3..fcb4a4da3 100644 --- a/packages/lucide/src/createElement.ts +++ b/packages/lucide/src/createElement.ts @@ -1,5 +1,4 @@ -import { IconNode, IconNodeChild, SVGProps } from "./types"; - +import { IconNode, IconNodeChild, SVGProps } from './types'; /** * Creates a new HTMLElement from icon node @@ -16,7 +15,7 @@ const createElement = (tag: string, attrs: SVGProps, children: IconNodeChild[] = }); if (children.length) { - children.forEach(child => { + children.forEach((child) => { const childElement = createElement(...child); element.appendChild(childElement); diff --git a/packages/lucide/src/defaultAttributes.ts b/packages/lucide/src/defaultAttributes.ts index 5ed81b30b..a24d5fdf6 100644 --- a/packages/lucide/src/defaultAttributes.ts +++ b/packages/lucide/src/defaultAttributes.ts @@ -1,4 +1,4 @@ -import { SVGProps } from "./types"; +import { SVGProps } from './types'; const defaultAttributes: SVGProps = { xmlns: 'http://www.w3.org/2000/svg', @@ -12,4 +12,4 @@ const defaultAttributes: SVGProps = { 'stroke-linejoin': 'round', }; -export default defaultAttributes +export default defaultAttributes; diff --git a/packages/lucide/src/iconsAndAliases.ts b/packages/lucide/src/iconsAndAliases.ts index 9ace9e4ce..098bba469 100644 --- a/packages/lucide/src/iconsAndAliases.ts +++ b/packages/lucide/src/iconsAndAliases.ts @@ -1,2 +1,2 @@ -export * from './icons' -export * from './aliases' +export * from './icons'; +export * from './aliases'; diff --git a/packages/lucide/src/lucide.ts b/packages/lucide/src/lucide.ts index 922a77c81..cdd8ec87e 100644 --- a/packages/lucide/src/lucide.ts +++ b/packages/lucide/src/lucide.ts @@ -8,7 +8,7 @@ import * as iconAndAliases from './iconsAndAliases'; const createIcons = ({ icons = {}, nameAttr = 'data-lucide', attrs = {} } = {}) => { if (!Object.values(icons).length) { throw new Error( - "Please provide an icons object.\nIf you want to use all the icons you can import it like:\n `import { createIcons, icons } from 'lucide';\nlucide.createIcons({icons});`" + "Please provide an icons object.\nIf you want to use all the icons you can import it like:\n `import { createIcons, icons } from 'lucide';\nlucide.createIcons({icons});`", ); } @@ -18,7 +18,7 @@ const createIcons = ({ icons = {}, nameAttr = 'data-lucide', attrs = {} } = {}) const elementsToReplace = document.querySelectorAll(`[${nameAttr}]`); Array.from(elementsToReplace).forEach((element) => - replaceElement(element, { nameAttr, icons, attrs }) + replaceElement(element, { nameAttr, icons, attrs }), ); /** @todo: remove this block in v1.0 */ @@ -26,10 +26,10 @@ const createIcons = ({ icons = {}, nameAttr = 'data-lucide', attrs = {} } = {}) const deprecatedElements = document.querySelectorAll('[icon-name]'); if (deprecatedElements.length > 0) { console.warn( - '[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide' + '[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide', ); Array.from(deprecatedElements).forEach((element) => - replaceElement(element, { nameAttr: 'icon-name', icons, attrs }) + replaceElement(element, { nameAttr: 'icon-name', icons, attrs }), ); } } diff --git a/packages/lucide/src/replaceElement.ts b/packages/lucide/src/replaceElement.ts index 6b585bf5a..75aabb2e2 100644 --- a/packages/lucide/src/replaceElement.ts +++ b/packages/lucide/src/replaceElement.ts @@ -1,7 +1,7 @@ import createElement from './createElement'; import { Icons } from './types'; -export type CustomAttrs = { [attr:string]: any } +export type CustomAttrs = { [attr: string]: any }; /** * Get the attributes of an HTML element. @@ -36,9 +36,7 @@ export const getClassNames = (attrs: Record | string): string | * @param {array} arrayOfClassnames * @returns {string} */ -export const combineClassNames = ( - arrayOfClassnames: (string | Record)[] -) => { +export const combineClassNames = (arrayOfClassnames: (string | Record)[]) => { const classNameArray = arrayOfClassnames.flatMap(getClassNames); return classNameArray @@ -52,9 +50,9 @@ const toPascalCase = (string: string): string => string.replace(/(\w)(\w*)(_|-|\s*)/g, (g0, g1, g2) => g1.toUpperCase() + g2.toLowerCase()); interface ReplaceElementOptions { - nameAttr: string - icons: Icons, - attrs: Record + nameAttr: string; + icons: Icons; + attrs: Record; } /** @@ -66,7 +64,7 @@ interface ReplaceElementOptions { const replaceElement = (element: Element, { nameAttr, icons, attrs }: ReplaceElementOptions) => { const iconName = element.getAttribute(nameAttr); - if (iconName == null) return + if (iconName == null) return; const ComponentName = toPascalCase(iconName); @@ -92,8 +90,8 @@ const replaceElement = (element: Element, { nameAttr, icons, attrs }: ReplaceEle if (classNames) { Object.assign(iconAttrs, { - class: classNames - }) + class: classNames, + }); } const svgElement = createElement([tag, iconAttrs, children]); @@ -101,4 +99,4 @@ const replaceElement = (element: Element, { nameAttr, icons, attrs }: ReplaceEle return element.parentNode?.replaceChild(svgElement, element); }; -export default replaceElement +export default replaceElement; diff --git a/packages/lucide/src/types.ts b/packages/lucide/src/types.ts index 6048c9346..3b040d604 100644 --- a/packages/lucide/src/types.ts +++ b/packages/lucide/src/types.ts @@ -1,7 +1,6 @@ - // className is not supported in svg elements -export type SVGProps = Record +export type SVGProps = Record; export type IconNodeChild = readonly [tag: string, attrs: SVGProps]; export type IconNode = readonly [tag: string, attrs: SVGProps, children?: IconNodeChild[]]; -export type Icons = { [key: string]: IconNode } +export type Icons = { [key: string]: IconNode }; diff --git a/packages/lucide/tests/lucide.spec.js b/packages/lucide/tests/lucide.spec.js index b9bc24108..4d4a26394 100644 --- a/packages/lucide/tests/lucide.spec.js +++ b/packages/lucide/tests/lucide.spec.js @@ -20,12 +20,12 @@ describe('createIcons', () => { it('should read elements from DOM and replace it with icons', () => { document.body.innerHTML = ``; - createIcons({icons}); + createIcons({ icons }); const svg = getOriginalSvg('volume-2'); - expect(document.body.innerHTML).toBe(svg) - expect(document.body.innerHTML).toMatchSnapshot() + expect(document.body.innerHTML).toBe(svg); + expect(document.body.innerHTML).toMatchSnapshot(); }); it('should customize the name attribute', () => { @@ -33,12 +33,12 @@ describe('createIcons', () => { createIcons({ icons, - nameAttr: 'data-custom-name' + nameAttr: 'data-custom-name', }); const hasSvg = !!document.querySelector('svg'); - expect(hasSvg).toBeTruthy() + expect(hasSvg).toBeTruthy(); }); it('should add custom attributes', () => { @@ -58,7 +58,7 @@ describe('createIcons', () => { acc[item] = element.getAttribute(item); return acc; - },{}) + }, {}); expect(document.body.innerHTML).toMatchSnapshot(); @@ -69,7 +69,7 @@ describe('createIcons', () => { document.body.innerHTML = ``; const attrs = { - 'data-theme-switcher':'light', + 'data-theme-switcher': 'light', }; createIcons({ icons }); @@ -81,7 +81,7 @@ describe('createIcons', () => { acc[item] = element.getAttribute(item); return acc; - },{}) + }, {}); expect(attributesAndValues).toEqual(expect.objectContaining(attrs)); }); @@ -93,7 +93,7 @@ describe('createIcons', () => { const svg = getOriginalSvg('grid-3x3', 'grid'); - expect(document.body.innerHTML).toBe(svg) - expect(document.body.innerHTML).toMatchSnapshot() + expect(document.body.innerHTML).toBe(svg); + expect(document.body.innerHTML).toMatchSnapshot(); }); }); diff --git a/packages/lucide/tests/replaceElement.spec.js b/packages/lucide/tests/replaceElement.spec.js index e664f6f8c..654b716d7 100644 --- a/packages/lucide/tests/replaceElement.spec.js +++ b/packages/lucide/tests/replaceElement.spec.js @@ -25,20 +25,20 @@ describe('getAtts', () => { describe('getClassNames', () => { it('should returns an array when giving class property of string', () => { const elementAttrs = { - class: 'item1 item2 item3' + class: 'item1 item2 item3', }; const attrs = getClassNames(elementAttrs); - expect(JSON.stringify(attrs)).toBe(JSON.stringify(['item1','item2','item3'])); + expect(JSON.stringify(attrs)).toBe(JSON.stringify(['item1', 'item2', 'item3'])); }); it('should returns an array when givind class property with an array', () => { const elementAttrs = { - class: ['item1','item2','item3'] + class: ['item1', 'item2', 'item3'], }; const attrs = getClassNames(elementAttrs); - expect(JSON.stringify(attrs)).toBe(JSON.stringify(['item1','item2','item3'])); + expect(JSON.stringify(attrs)).toBe(JSON.stringify(['item1', 'item2', 'item3'])); }); }); @@ -47,14 +47,14 @@ describe('combineClassNames', () => { const arrayOfClassnames = [ 'item', { - class: ['item1','item2','item3'] + class: ['item1', 'item2', 'item3'], }, { - class: ['item4','item5','item6'] + class: ['item4', 'item5', 'item6'], }, { - class: ['item7','item8','item9'] - } + class: ['item7', 'item8', 'item9'], + }, ]; const combinedClassNames = combineClassNames(arrayOfClassnames); diff --git a/packages/lucide/tests/setupVitest.js b/packages/lucide/tests/setupVitest.js index b407e0fd2..03a0244af 100644 --- a/packages/lucide/tests/setupVitest.js +++ b/packages/lucide/tests/setupVitest.js @@ -1,6 +1,5 @@ -import { expect } from 'vitest' +import { expect } from 'vitest'; import '@testing-library/jest-dom/vitest'; -import htmlSerializer from 'jest-serializer-html' +import htmlSerializer from 'jest-serializer-html'; - -expect.addSnapshotSerializer(htmlSerializer) +expect.addSnapshotSerializer(htmlSerializer); diff --git a/packages/lucide/tsconfig.json b/packages/lucide/tsconfig.json index dac748969..7fdaedbf6 100644 --- a/packages/lucide/tsconfig.json +++ b/packages/lucide/tsconfig.json @@ -13,5 +13,5 @@ "resolveJsonModule": true, "sourceMap": true, "outDir": "./dist", - } + }, } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c55942ce1..7644f246f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,8 +68,8 @@ importers: specifier: ^7.1.1 version: 7.1.1 prettier: - specifier: 3.1.1 - version: 3.1.1 + specifier: 3.2.4 + version: 3.2.4 semver: specifier: ^7.5.4 version: 7.5.4 @@ -18161,8 +18161,8 @@ packages: hasBin: true dev: true - /prettier@3.1.1: - resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + /prettier@3.2.4: + resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} engines: {node: '>=14'} hasBin: true dev: true diff --git a/prettier.config.mjs b/prettier.config.mjs index ca4c70878..ecdf22fcd 100644 --- a/prettier.config.mjs +++ b/prettier.config.mjs @@ -3,6 +3,7 @@ const config = { singleQuote: true, trailingComma: 'all', printWidth: 100, + singleAttributePerLine: true, overrides: [ { files: ['icons/*.json', 'categories/*.json'], diff --git a/scripts/addMissingIconJsonFiles.mjs b/scripts/addMissingIconJsonFiles.mjs index c0ac7cfd7..910b1fab2 100644 --- a/scripts/addMissingIconJsonFiles.mjs +++ b/scripts/addMissingIconJsonFiles.mjs @@ -1,5 +1,5 @@ import path from 'path'; -import {getCurrentDirPath, readAllMetadata, readSvgDirectory, writeFile} from './helpers.mjs'; +import { getCurrentDirPath, readAllMetadata, readSvgDirectory, writeFile } from './helpers.mjs'; const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../icons'); @@ -9,13 +9,17 @@ const svgFiles = readSvgDirectory(ICONS_DIR); const iconNames = svgFiles.map((icon) => icon.split('.')[0]); -iconNames.forEach(iconName => { +iconNames.forEach((iconName) => { if (typeof icons[iconName] === 'undefined') { - const iconContent = JSON.stringify({ - "$schema": "../icon.schema.json", - "tags": [], - "categories": [] - }, null, 2); + const iconContent = JSON.stringify( + { + $schema: '../icon.schema.json', + tags: [], + categories: [], + }, + null, + 2, + ); writeFile(iconContent, `${iconName}.json`, path.resolve(currentDir, '..')); } }); diff --git a/scripts/checkIconsAndCategories.mjs b/scripts/checkIconsAndCategories.mjs index ff7018b5c..39b237e8e 100644 --- a/scripts/checkIconsAndCategories.mjs +++ b/scripts/checkIconsAndCategories.mjs @@ -1,33 +1,33 @@ import path from 'path'; import { readSvgDirectory, getCurrentDirPath, readAllMetadata } from './helpers.mjs'; -const currentDir = getCurrentDirPath(import.meta.url) +const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../icons'); const icons = readAllMetadata(ICONS_DIR); const CATEGORIES_DIR = path.resolve(currentDir, '../categories'); const categories = readAllMetadata(CATEGORIES_DIR); -console.log('Reading all icons') +console.log('Reading all icons'); const svgFiles = readSvgDirectory(ICONS_DIR); -const iconNames = svgFiles.map(icon => icon.split('.')[0]); +const iconNames = svgFiles.map((icon) => icon.split('.')[0]); let error = false; -iconNames.forEach(iconName => { +iconNames.forEach((iconName) => { if (typeof icons[iconName] === 'undefined') { console.error(`'${iconName}.svg' does not have a matching JSON file.`); error = true; } }); -Object.keys(icons).forEach(iconName => { +Object.keys(icons).forEach((iconName) => { const icon = icons[iconName]; if (iconNames.indexOf(iconName) === -1) { console.error(`'${iconName}.svg' does not exist.`); error = true; } - icon.categories.forEach(categoryName => { + icon.categories.forEach((categoryName) => { if (typeof categories[categoryName] === 'undefined') { console.error(`Icon '${iconName}' refers to the non-existing category '${categoryName}'.`); error = true; @@ -35,7 +35,7 @@ Object.keys(icons).forEach(iconName => { }); }); -Object.keys(categories).forEach(categoryName => { +Object.keys(categories).forEach((categoryName) => { const category = categories[categoryName]; if (!category.icon) { console.error(`Category '${categoryName}' does not use an icon '${category.icon}'.`); diff --git a/scripts/generate/generateIcons.mjs b/scripts/generate/generateIcons.mjs index 30882b8d0..672c2d30b 100644 --- a/scripts/generate/generateIcons.mjs +++ b/scripts/generate/generateIcons.mjs @@ -1,5 +1,5 @@ import path from 'path'; -import {getCurrentDirPath, writeFileIfNotExists} from "../helpers.mjs"; +import { getCurrentDirPath, writeFileIfNotExists } from '../helpers.mjs'; const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../../icons'); @@ -29,7 +29,7 @@ const iconJsonTemplate = `{ } `; -iconNames.forEach(iconName => { +iconNames.forEach((iconName) => { writeFileIfNotExists(iconSvgTemplate, `${iconName}.svg`, ICONS_DIR); writeFileIfNotExists(iconJsonTemplate, `${iconName}.json`, ICONS_DIR); }); diff --git a/scripts/generateChangedIconsCommentMarkup.mjs b/scripts/generateChangedIconsCommentMarkup.mjs index 179c74fec..db44a5b60 100644 --- a/scripts/generateChangedIconsCommentMarkup.mjs +++ b/scripts/generateChangedIconsCommentMarkup.mjs @@ -17,8 +17,8 @@ const getImageTagsByFiles = (files, getBaseUrl, width) => files .map((file) => { const svgContent = fs.readFileSync(path.join(process.cwd(), file), 'utf-8'); - const strippedAttrsSVG = svgContent.replace(/]*>/, '') - const minifiedSvg = minifySvg(strippedAttrsSVG) + const strippedAttrsSVG = svgContent.replace(/]*>/, ''); + const minifiedSvg = minifySvg(strippedAttrsSVG); const base64 = Buffer.from(minifiedSvg).toString('base64'); const url = getBaseUrl(file); diff --git a/scripts/generateSuperSVG.mjs b/scripts/generateSuperSVG.mjs index 78b5730f1..5c0f4f44d 100644 --- a/scripts/generateSuperSVG.mjs +++ b/scripts/generateSuperSVG.mjs @@ -37,7 +37,10 @@ async function generateSprite(svgs, packageDir) { }; const spriteSvg = stringify(spriteSvgObject); - const prettifiedSprite = (await prettier.format(spriteSvg, { parser: 'babel' })).replace(/;/g, ''); + const prettifiedSprite = (await prettier.format(spriteSvg, { parser: 'babel' })).replace( + /;/g, + '', + ); const xmlMeta = `\n`; diff --git a/scripts/helpers.mjs b/scripts/helpers.mjs index 14ac3a428..146ac3af5 100644 --- a/scripts/helpers.mjs +++ b/scripts/helpers.mjs @@ -215,10 +215,11 @@ export const shuffle = (array) => { * @param {string} string * @returns string */ -export function minifySvg(string){ - return string ? string - .replace(/\>[\r\n ]+<") - .replace(/(<.*?>)|\s+/g, (m, $1) => $1 || ' ') - .trim() - : "" +export function minifySvg(string) { + return string + ? string + .replace(/\>[\r\n ]+<') + .replace(/(<.*?>)|\s+/g, (m, $1) => $1 || ' ') + .trim() + : ''; } diff --git a/scripts/migrateCategoriesToIcons.mjs b/scripts/migrateCategoriesToIcons.mjs index 99cf9ea63..30b9e9671 100644 --- a/scripts/migrateCategoriesToIcons.mjs +++ b/scripts/migrateCategoriesToIcons.mjs @@ -2,18 +2,17 @@ import path from 'path'; import categories from '../categories.json' assert { type: 'json' }; import { mergeArrays, writeFile, readAllMetadata, getCurrentDirPath } from './helpers.mjs'; -const currentDir = getCurrentDirPath(import.meta.url) +const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../icons'); const icons = readAllMetadata(ICONS_DIR); -Object.keys(categories).forEach(categoryName => { - categories[categoryName].forEach(iconName => { +Object.keys(categories).forEach((categoryName) => { + categories[categoryName].forEach((iconName) => { icons[iconName].categories = mergeArrays(icons[iconName].categories, [categoryName]); }); }); -Object.keys(icons).forEach(iconName => { +Object.keys(icons).forEach((iconName) => { const iconContent = JSON.stringify(icons[iconName], null, 2); writeFile(iconContent, `${iconName}.json`, path.resolve(currentDir, '../icons')); -}) - +}); diff --git a/scripts/migrateIconsToCategories.mjs b/scripts/migrateIconsToCategories.mjs index 86103ff32..f2bab1d73 100644 --- a/scripts/migrateIconsToCategories.mjs +++ b/scripts/migrateIconsToCategories.mjs @@ -1,25 +1,24 @@ import path from 'path'; import { writeFile, getCurrentDirPath, readAllMetadata } from './helpers.mjs'; -const currentDir = getCurrentDirPath(import.meta.url) +const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../icons'); const icons = readAllMetadata(ICONS_DIR); const newCategories = {}; -Object.keys(icons).forEach(iconName => { - icons[iconName].categories.forEach(categoryName => { +Object.keys(icons).forEach((iconName) => { + icons[iconName].categories.forEach((categoryName) => { newCategories[categoryName] = newCategories[categoryName] || []; newCategories[categoryName].push(iconName); }); }); -const ordered = Object.keys(newCategories).sort().reduce( - (obj, key) => { +const ordered = Object.keys(newCategories) + .sort() + .reduce((obj, key) => { obj[key] = newCategories[key]; return obj; - }, - {} -); + }, {}); const categoriesContent = JSON.stringify(ordered, null, 2); diff --git a/scripts/migrateTagsToIcons.mjs b/scripts/migrateTagsToIcons.mjs index 56ad77ace..a632da06b 100644 --- a/scripts/migrateTagsToIcons.mjs +++ b/scripts/migrateTagsToIcons.mjs @@ -1,21 +1,27 @@ import path from 'path'; import tags from '../tags.json' assert { type: 'json' }; -import { readSvgDirectory, readAllMetadata, writeFile, mergeArrays, getCurrentDirPath } from './helpers.mjs'; +import { + readSvgDirectory, + readAllMetadata, + writeFile, + mergeArrays, + getCurrentDirPath, +} from './helpers.mjs'; -const currentDir = getCurrentDirPath(import.meta.url) +const currentDir = getCurrentDirPath(import.meta.url); const ICONS_DIR = path.resolve(currentDir, '../icons'); const icons = readAllMetadata(ICONS_DIR); const svgFiles = readSvgDirectory(ICONS_DIR); const iconNames = svgFiles.map((icon) => icon.split('.')[0]); -iconNames.forEach(iconName => { +iconNames.forEach((iconName) => { icons[iconName] = icons[iconName] || { - "$schema": "../icon.schema.json", - "tags": [], - "categories": [] + $schema: '../icon.schema.json', + tags: [], + categories: [], }; icons[iconName].tags = mergeArrays(icons[iconName].tags, tags[iconName]); const iconContent = JSON.stringify(icons[iconName], null, 2); writeFile(iconContent, `${iconName}.json`, path.resolve(currentDir, '../icons')); -}) +}); diff --git a/scripts/optimizeStagedSvgs.mjs b/scripts/optimizeStagedSvgs.mjs index 265acdb6c..f9c719d14 100644 --- a/scripts/optimizeStagedSvgs.mjs +++ b/scripts/optimizeStagedSvgs.mjs @@ -4,7 +4,7 @@ import processSvg from './render/processSvg.mjs'; const svgFiles = process.argv.slice(2); svgFiles.forEach(async (svgFile) => { - console.log('Optimizing staged SVG file:', svgFile) + console.log('Optimizing staged SVG file:', svgFile); const content = fs.readFileSync(svgFile); const svg = await processSvg(content, svgFile); fs.writeFileSync(svgFile, svg, 'utf-8'); diff --git a/scripts/render/processSvg.mjs b/scripts/render/processSvg.mjs index f404eb3b6..293dc8704 100644 --- a/scripts/render/processSvg.mjs +++ b/scripts/render/processSvg.mjs @@ -1,6 +1,6 @@ -import {optimize} from 'svgo'; +import { optimize } from 'svgo'; import * as prettier from 'prettier'; -import {parseSync, stringify} from 'svgson'; +import { parseSync, stringify } from 'svgson'; import DEFAULT_ATTRS from './default-attrs.json' assert { type: 'json' }; /** @@ -25,8 +25,8 @@ async function optimizeSvg(svg, path) { name: 'removeAttrs', params: { attrs: '(fill|stroke.*)', - } - } + }, + }, ], }); @@ -55,9 +55,7 @@ function processSvg(svg, path) { return ( optimizeSvg(svg, path) .then(setAttrs) - .then((optimizedSvg) => - prettier.format(optimizedSvg, {parser: 'babel'}), - ) + .then((optimizedSvg) => prettier.format(optimizedSvg, { parser: 'babel' })) // remove semicolon inserted by prettier // because prettier thinks it's formatting JSX not HTML .then((svg) => svg.replace(/;/g, '')) diff --git a/scripts/writeIconRelatedIcons.mjs b/scripts/writeIconRelatedIcons.mjs index 6a1c9e698..0fca01f19 100644 --- a/scripts/writeIconRelatedIcons.mjs +++ b/scripts/writeIconRelatedIcons.mjs @@ -16,7 +16,7 @@ const nameWeight = 5; const tagWeight = 4; const categoryWeight = 3; -const MAX_RELATED_ICONS = 4 * 17 // grid of 4x17 icons, = 68 icons +const MAX_RELATED_ICONS = 4 * 17; // grid of 4x17 icons, = 68 icons const arrayMatches = (a, b) => { // let matches = 0; @@ -26,49 +26,48 @@ const arrayMatches = (a, b) => { // } // } // return matches; - return a.filter(item => b.includes(item)).length; -} + return a.filter((item) => b.includes(item)).length; +}; -const nameParts = (icon) => [icon.name, ...icon.aliases ?? []] +const nameParts = (icon) => + [icon.name, ...(icon.aliases ?? [])] .join('-') .split('-') - .filter(word => word.length > 2) + .filter((word) => word.length > 2); const getRelatedIcons = (currentIcon, icons) => { const iconSimilarity = (item) => - nameWeight * arrayMatches(nameParts(item), nameParts(currentIcon)) - + categoryWeight * arrayMatches(item.categories, currentIcon.categories) - + tagWeight * arrayMatches(item.tags, currentIcon.tags) - ; + nameWeight * arrayMatches(nameParts(item), nameParts(currentIcon)) + + categoryWeight * arrayMatches(item.categories, currentIcon.categories) + + tagWeight * arrayMatches(item.tags, currentIcon.tags); return icons - .filter(i => i.name !== currentIcon.name) - .map(icon => ({icon, similarity: iconSimilarity(icon)})) - .filter(a => a.similarity > 0) // @todo: maybe require a minimal non-zero similarity + .filter((i) => i.name !== currentIcon.name) + .map((icon) => ({ icon, similarity: iconSimilarity(icon) })) + .filter((a) => a.similarity > 0) // @todo: maybe require a minimal non-zero similarity .sort((a, b) => b.similarity - a.similarity) - .map(i => i.icon) - .slice(0, MAX_RELATED_ICONS) - ; -} + .map((i) => i.icon) + .slice(0, MAX_RELATED_ICONS); +}; const iconsMetaDataPromises = svgFiles.map(async (iconName) => { // eslint-disable-next-line import/no-dynamic-require, global-require const metaData = await import(`../icons/${iconName}`, { - assert: { type: 'json' } + assert: { type: 'json' }, }); const name = iconName.replace('.json', ''); return { name, - ...metaData.default + ...metaData.default, }; }); const iconsMetaData = await Promise.all(iconsMetaDataPromises); -const relatedIcons = iconsMetaData.map(icon => { +const relatedIcons = iconsMetaData.map((icon) => { const iconRelatedIcons = getRelatedIcons(icon, iconsMetaData); - return [icon.name, iconRelatedIcons.map(i => i.name)]; + return [icon.name, iconRelatedIcons.map((i) => i.name)]; }); fs.promises diff --git a/tools/build-icons/package.json b/tools/build-icons/package.json index e9ad967e2..56e70c0cd 100644 --- a/tools/build-icons/package.json +++ b/tools/build-icons/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "description": "", "main": "index.mjs", - "type":"module", + "type": "module", "scripts": { "start": "node ./main.mjs" }, diff --git a/tools/build-icons/utils/getIconMetaData.mjs b/tools/build-icons/utils/getIconMetaData.mjs index e1ae610b0..2ad8fb4e9 100644 --- a/tools/build-icons/utils/getIconMetaData.mjs +++ b/tools/build-icons/utils/getIconMetaData.mjs @@ -5,12 +5,12 @@ async function getIconMetaData(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' } }); - return [path.basename(jsonFile, '.json'), file.default] - }) - ) + const file = await import(path.join(iconDirectory, jsonFile), { assert: { type: 'json' } }); + return [path.basename(jsonFile, '.json'), file.default]; + }), + ); return Object.fromEntries(aliasesEntries); } -export default getIconMetaData +export default getIconMetaData; diff --git a/tsconfig.json b/tsconfig.json index 887645cc8..292f22632 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,5 +16,5 @@ "allowSyntheticDefaultImports": true, "downlevelIteration": true, "sourceMap": true, - } + }, } From 9182c519624fc28520be41630f20c30e7b5b23e7 Mon Sep 17 00:00:00 2001 From: CokaKoala <31664583+AdrianGonz97@users.noreply.github.com> Date: Thu, 1 Feb 2024 10:36:27 -0500 Subject: [PATCH 37/97] feat: Adds Svelte 5 support (#1748) * adds svelte 5 support * Update package.json --------- Co-authored-by: Eric Fennis --- packages/lucide-svelte/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lucide-svelte/package.json b/packages/lucide-svelte/package.json index 4a0c1b64e..3b9bab8eb 100644 --- a/packages/lucide-svelte/package.json +++ b/packages/lucide-svelte/package.json @@ -71,6 +71,6 @@ "vitest": "^1.1.1" }, "peerDependencies": { - "svelte": ">=3 <5" + "svelte": "^3 || ^4 || ^5.0.0-next.42" } } From ee3483eb1b6913f44f4cf9610e66e63d4984ca89 Mon Sep 17 00:00:00 2001 From: Karsa Date: Thu, 1 Feb 2024 16:37:10 +0100 Subject: [PATCH 38/97] Adds `handshake` icon (#1835) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds handshake icon * update handshake icon * Update handshake.svg * Update icons/handshake.json Co-authored-by: Jakob Guddas --------- Co-authored-by: Rigó József Karsa Co-authored-by: Eric Fennis Co-authored-by: Jakob Guddas --- icons/handshake.json | 25 +++++++++++++++++++++++++ icons/handshake.svg | 17 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 icons/handshake.json create mode 100644 icons/handshake.svg diff --git a/icons/handshake.json b/icons/handshake.json new file mode 100644 index 000000000..13454d16f --- /dev/null +++ b/icons/handshake.json @@ -0,0 +1,25 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere", + "ericfennis" + ], + "tags": [ + "agreement", + "partnership", + "deal", + "business", + "assistance", + "cooperation", + "friendship", + "union", + "terms" + ], + "categories": [ + "account", + "social", + "communication", + "money", + "security" + ] +} diff --git a/icons/handshake.svg b/icons/handshake.svg new file mode 100644 index 000000000..448f058d9 --- /dev/null +++ b/icons/handshake.svg @@ -0,0 +1,17 @@ + + + + + + + From 772c5be03428ac54fd1a160c7f11110bf8c75535 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 5 Feb 2024 15:08:13 +0100 Subject: [PATCH 39/97] Fixes scaling, tag and tags to have the necessary rounding. (#1850) * Fixes scaling, tag and tags to have the necessary rounding. * Update tags.svg * Update tag.svg --------- Co-authored-by: Karsa --- icons/scaling.svg | 6 +++--- icons/tag.svg | 4 ++-- icons/tags.svg | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/icons/scaling.svg b/icons/scaling.svg index d214cb9fa..6c10bcdd0 100644 --- a/icons/scaling.svg +++ b/icons/scaling.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + diff --git a/icons/tag.svg b/icons/tag.svg index efbbdb033..7a073e9f3 100644 --- a/icons/tag.svg +++ b/icons/tag.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/tags.svg b/icons/tags.svg index d3c3a1115..afe87a859 100644 --- a/icons/tags.svg +++ b/icons/tags.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + From 5c494962e151aed7e05e45d4516b8e9bb73fc085 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 5 Feb 2024 19:11:34 +0100 Subject: [PATCH 40/97] Various contributor fixes (#1844) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Various manual contributor fixes * Remove myself from a few dozen more icons I took practically no part in. * Remove danielbayley from some icons as per https://github.com/lucide-icons/lucide/pull/1844 --------- Co-authored-by: Rigó József Karsa --- icons/alarm-smoke.json | 3 ++- icons/anvil.json | 1 + icons/arrow-down-0-1.json | 3 ++- icons/arrow-down-1-0.json | 3 ++- icons/arrow-down-a-z.json | 3 ++- icons/arrow-down-square.json | 1 - icons/arrow-down-to-dot.json | 3 +-- icons/arrow-down-z-a.json | 3 ++- icons/arrow-left-right.json | 3 +-- icons/arrow-left-square.json | 1 - icons/arrow-right-square.json | 1 - icons/arrow-up-0-1.json | 3 ++- icons/arrow-up-1-0.json | 3 ++- icons/arrow-up-a-z.json | 3 ++- icons/arrow-up-from-dot.json | 3 +-- icons/arrow-up-square.json | 1 - icons/arrow-up-z-a.json | 3 ++- icons/axis-3d.json | 4 +--- icons/beef.json | 3 ++- icons/biohazard.json | 1 + icons/brick-wall.json | 1 + icons/bus-front.json | 3 ++- icons/candy-cane.json | 3 ++- icons/car-front.json | 3 ++- icons/car-taxi-front.json | 3 ++- icons/case-upper.json | 3 +-- icons/cast.json | 3 +-- icons/cat.json | 3 +-- icons/cctv.json | 3 ++- icons/check-check.json | 4 +--- icons/cone.json | 3 ++- icons/cooking-pot.json | 4 ++++ icons/diameter.json | 3 ++- icons/dog.json | 3 +-- icons/dollar-sign.json | 3 +-- icons/dot-square.json | 1 - icons/dot.json | 3 +-- icons/drafting-compass.json | 3 ++- icons/dribbble.json | 3 +-- icons/equal-square.json | 1 - icons/fire-extinguisher.json | 3 ++- icons/fold-horizontal.json | 3 +-- icons/fold-vertical.json | 3 +-- icons/frame.json | 1 - icons/goal.json | 3 +++ icons/heading-1.json | 4 +--- icons/heading-3.json | 3 +-- icons/heading-5.json | 3 +-- icons/heading.json | 4 +--- icons/info.json | 3 +-- icons/keyboard-music.json | 3 ++- icons/list-todo.json | 4 ++++ icons/lock-keyhole.json | 8 ++++++++ icons/paint-roller.json | 3 ++- icons/palette.json | 3 ++- icons/piano.json | 3 ++- icons/pocket-knife.json | 3 ++- icons/presentation.json | 1 + icons/pyramid.json | 3 ++- icons/radiation.json | 1 + icons/radius.json | 3 ++- icons/scroll-text.json | 3 ++- icons/signal-low.json | 4 +--- icons/signal-zero.json | 2 -- icons/slash-square.json | 1 - icons/snail.json | 3 ++- icons/space.json | 3 +-- icons/spray-can.json | 3 ++- icons/star-half.json | 4 +--- icons/tangent.json | 3 ++- icons/test-tube-2.json | 3 ++- icons/undo-dot.json | 3 +-- icons/unfold-horizontal.json | 3 +-- icons/unfold-vertical.json | 3 +-- icons/unlock-keyhole.json | 8 ++++++++ icons/utility-pole.json | 3 +++ 76 files changed, 122 insertions(+), 97 deletions(-) diff --git a/icons/alarm-smoke.json b/icons/alarm-smoke.json index 90607d57e..241d7941e 100644 --- a/icons/alarm-smoke.json +++ b/icons/alarm-smoke.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "fire", diff --git a/icons/anvil.json b/icons/anvil.json index d8dc16412..0f77473ad 100644 --- a/icons/anvil.json +++ b/icons/anvil.json @@ -1,6 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ + "karsa-mistmere", "danielbayley" ], "tags": [ diff --git a/icons/arrow-down-0-1.json b/icons/arrow-down-0-1.json index 18bff2f11..032d9a0de 100644 --- a/icons/arrow-down-0-1.json +++ b/icons/arrow-down-0-1.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-down-1-0.json b/icons/arrow-down-1-0.json index 9025aea06..102706d59 100644 --- a/icons/arrow-down-1-0.json +++ b/icons/arrow-down-1-0.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-down-a-z.json b/icons/arrow-down-a-z.json index 29669350c..a311d9bb8 100644 --- a/icons/arrow-down-a-z.json +++ b/icons/arrow-down-a-z.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-down-square.json b/icons/arrow-down-square.json index 970804e48..52b4ac50f 100644 --- a/icons/arrow-down-square.json +++ b/icons/arrow-down-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/arrow-down-to-dot.json b/icons/arrow-down-to-dot.json index de217882a..465d7afcb 100644 --- a/icons/arrow-down-to-dot.json +++ b/icons/arrow-down-to-dot.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "direction", diff --git a/icons/arrow-down-z-a.json b/icons/arrow-down-z-a.json index e3dfe1d9b..0bad09895 100644 --- a/icons/arrow-down-z-a.json +++ b/icons/arrow-down-z-a.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-left-right.json b/icons/arrow-left-right.json index eb85de907..ebb3d9234 100644 --- a/icons/arrow-left-right.json +++ b/icons/arrow-left-right.json @@ -2,8 +2,7 @@ "$schema": "../icon.schema.json", "contributors": [ "wojtekmaj", - "ericfennis", - "karsa-mistmere" + "ericfennis" ], "tags": [ "bidirectional", diff --git a/icons/arrow-left-square.json b/icons/arrow-left-square.json index f7311a053..79876744a 100644 --- a/icons/arrow-left-square.json +++ b/icons/arrow-left-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/arrow-right-square.json b/icons/arrow-right-square.json index 93aa2e0c7..a46ead555 100644 --- a/icons/arrow-right-square.json +++ b/icons/arrow-right-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/arrow-up-0-1.json b/icons/arrow-up-0-1.json index f6cf19afb..c08093ebf 100644 --- a/icons/arrow-up-0-1.json +++ b/icons/arrow-up-0-1.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-up-1-0.json b/icons/arrow-up-1-0.json index f82f835b6..fb0749ecc 100644 --- a/icons/arrow-up-1-0.json +++ b/icons/arrow-up-1-0.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-up-a-z.json b/icons/arrow-up-a-z.json index 993445caa..e8fa97713 100644 --- a/icons/arrow-up-a-z.json +++ b/icons/arrow-up-a-z.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/arrow-up-from-dot.json b/icons/arrow-up-from-dot.json index b9542a1aa..0b3ff50e1 100644 --- a/icons/arrow-up-from-dot.json +++ b/icons/arrow-up-from-dot.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "direction", diff --git a/icons/arrow-up-square.json b/icons/arrow-up-square.json index f2db89e77..3947df4ee 100644 --- a/icons/arrow-up-square.json +++ b/icons/arrow-up-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/arrow-up-z-a.json b/icons/arrow-up-z-a.json index a327cee92..e46f7ac47 100644 --- a/icons/arrow-up-z-a.json +++ b/icons/arrow-up-z-a.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "danielbayley" ], "tags": [ "filter", diff --git a/icons/axis-3d.json b/icons/axis-3d.json index 4e9ff43b8..e43ab304b 100644 --- a/icons/axis-3d.json +++ b/icons/axis-3d.json @@ -1,9 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "lscheibel", - "danielbayley", - "karsa-mistmere" + "lscheibel" ], "tags": [ "gizmo", diff --git a/icons/beef.json b/icons/beef.json index fc81ca36e..6543f7cbc 100644 --- a/icons/beef.json +++ b/icons/beef.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "kemie", - "ericfennis" + "ericfennis", + "karsa-mistmere" ], "tags": [ "food", diff --git a/icons/biohazard.json b/icons/biohazard.json index 15ed22ac8..040405528 100644 --- a/icons/biohazard.json +++ b/icons/biohazard.json @@ -1,6 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ + "karsa-mistmere", "danielbayley", "ericfennis" ], diff --git a/icons/brick-wall.json b/icons/brick-wall.json index 90fc3411f..f857fcbb7 100644 --- a/icons/brick-wall.json +++ b/icons/brick-wall.json @@ -1,6 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ + "karsa-mistmere", "danielbayley" ], "tags": [ diff --git a/icons/bus-front.json b/icons/bus-front.json index 04aa159eb..bda9da67d 100644 --- a/icons/bus-front.json +++ b/icons/bus-front.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "coach", diff --git a/icons/candy-cane.json b/icons/candy-cane.json index e5ece6d8f..67e3e61a7 100644 --- a/icons/candy-cane.json +++ b/icons/candy-cane.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "sugar", diff --git a/icons/car-front.json b/icons/car-front.json index 367fbfb84..c6dd51773 100644 --- a/icons/car-front.json +++ b/icons/car-front.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "vehicle", diff --git a/icons/car-taxi-front.json b/icons/car-taxi-front.json index c54167c4f..c36548d26 100644 --- a/icons/car-taxi-front.json +++ b/icons/car-taxi-front.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "cab", diff --git a/icons/case-upper.json b/icons/case-upper.json index c29989758..8b4aa0458 100644 --- a/icons/case-upper.json +++ b/icons/case-upper.json @@ -2,8 +2,7 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "jguddas", - "karsa-mistmere" + "jguddas" ], "tags": [ "text", diff --git a/icons/cast.json b/icons/cast.json index 023646a75..59d8e3e73 100644 --- a/icons/cast.json +++ b/icons/cast.json @@ -3,8 +3,7 @@ "contributors": [ "colebemis", "csandman", - "ericfennis", - "karsa-mistmere" + "ericfennis" ], "tags": [ "chromecast", diff --git a/icons/cat.json b/icons/cat.json index 8a4d7d65a..c4a8c8546 100644 --- a/icons/cat.json +++ b/icons/cat.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "kemie", - "karsa-mistmere" + "kemie" ], "tags": [ "animal", diff --git a/icons/cctv.json b/icons/cctv.json index 87575765d..ae97ff1ce 100644 --- a/icons/cctv.json +++ b/icons/cctv.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "camera", diff --git a/icons/check-check.json b/icons/check-check.json index a64dd9c64..a01188568 100644 --- a/icons/check-check.json +++ b/icons/check-check.json @@ -1,9 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "ericfennis", - "karsa-mistmere", - "danielbayley" + "ericfennis" ], "tags": [ "done", diff --git a/icons/cone.json b/icons/cone.json index 8c38625f2..db7653e23 100644 --- a/icons/cone.json +++ b/icons/cone.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "conical", diff --git a/icons/cooking-pot.json b/icons/cooking-pot.json index 591c2bc2e..742089493 100644 --- a/icons/cooking-pot.json +++ b/icons/cooking-pot.json @@ -1,5 +1,9 @@ { "$schema": "../icon.schema.json", + "contributors": [ + "guillermo-angeles", + "ericfennis" + ], "tags": [ "pod", "cooking", diff --git a/icons/diameter.json b/icons/diameter.json index 49042920a..5cbeb3fd0 100644 --- a/icons/diameter.json +++ b/icons/diameter.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "shape", diff --git a/icons/dog.json b/icons/dog.json index 0ede66aa3..cef07324e 100644 --- a/icons/dog.json +++ b/icons/dog.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "kemie", - "karsa-mistmere" + "kemie" ], "tags": [ "animal", diff --git a/icons/dollar-sign.json b/icons/dollar-sign.json index aa01b2053..9d0a4469b 100644 --- a/icons/dollar-sign.json +++ b/icons/dollar-sign.json @@ -3,8 +3,7 @@ "contributors": [ "colebemis", "csandman", - "ericfennis", - "karsa-mistmere" + "ericfennis" ], "tags": [ "currency", diff --git a/icons/dot-square.json b/icons/dot-square.json index 5bcd5f22a..9fcab3122 100644 --- a/icons/dot-square.json +++ b/icons/dot-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/dot.json b/icons/dot.json index 9ebdc60b5..3d9ee134f 100644 --- a/icons/dot.json +++ b/icons/dot.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "interpunct", diff --git a/icons/drafting-compass.json b/icons/drafting-compass.json index 0d56461cb..c3854f112 100644 --- a/icons/drafting-compass.json +++ b/icons/drafting-compass.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "geometry", diff --git a/icons/dribbble.json b/icons/dribbble.json index 41b57423f..bf97ae40d 100644 --- a/icons/dribbble.json +++ b/icons/dribbble.json @@ -2,8 +2,7 @@ "$schema": "../icon.schema.json", "deprecated": true, "contributors": [ - "ahtohbi4", - "karsa-mistmere" + "ahtohbi4" ], "tags": [ "design", diff --git a/icons/equal-square.json b/icons/equal-square.json index 1729668ba..97d85c322 100644 --- a/icons/equal-square.json +++ b/icons/equal-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/fire-extinguisher.json b/icons/fire-extinguisher.json index 1632e78a5..197a56909 100644 --- a/icons/fire-extinguisher.json +++ b/icons/fire-extinguisher.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "flames", diff --git a/icons/fold-horizontal.json b/icons/fold-horizontal.json index 3a796795b..26797ae8c 100644 --- a/icons/fold-horizontal.json +++ b/icons/fold-horizontal.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "arrow", diff --git a/icons/fold-vertical.json b/icons/fold-vertical.json index 3a796795b..26797ae8c 100644 --- a/icons/fold-vertical.json +++ b/icons/fold-vertical.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "arrow", diff --git a/icons/frame.json b/icons/frame.json index 1a2f84af8..22662e2c6 100644 --- a/icons/frame.json +++ b/icons/frame.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "Bowero", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/goal.json b/icons/goal.json index c86826ff1..5531e21ab 100644 --- a/icons/goal.json +++ b/icons/goal.json @@ -1,5 +1,8 @@ { "$schema": "../icon.schema.json", + "contributors": [ + "guillermo-angeles" + ], "tags": [ "flag", "bullseye" diff --git a/icons/heading-1.json b/icons/heading-1.json index b8b8e3595..b45bd7222 100644 --- a/icons/heading-1.json +++ b/icons/heading-1.json @@ -1,9 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "ericfennis", - "danielbayley", - "karsa-mistmere" + "ericfennis" ], "tags": [ "h1", diff --git a/icons/heading-3.json b/icons/heading-3.json index 04818265d..987659e3e 100644 --- a/icons/heading-3.json +++ b/icons/heading-3.json @@ -2,8 +2,7 @@ "$schema": "../icon.schema.json", "contributors": [ "ericfennis", - "jguddas", - "karsa-mistmere" + "jguddas" ], "tags": [ "h3", diff --git a/icons/heading-5.json b/icons/heading-5.json index 4955ee662..3ec5dedd5 100644 --- a/icons/heading-5.json +++ b/icons/heading-5.json @@ -2,8 +2,7 @@ "$schema": "../icon.schema.json", "contributors": [ "ericfennis", - "jguddas", - "karsa-mistmere" + "jguddas" ], "tags": [ "h5", diff --git a/icons/heading.json b/icons/heading.json index b8b8e3595..b45bd7222 100644 --- a/icons/heading.json +++ b/icons/heading.json @@ -1,9 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "ericfennis", - "danielbayley", - "karsa-mistmere" + "ericfennis" ], "tags": [ "h1", diff --git a/icons/info.json b/icons/info.json index 1fd19d846..b54c40547 100644 --- a/icons/info.json +++ b/icons/info.json @@ -3,8 +3,7 @@ "contributors": [ "colebemis", "ericfennis", - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "help" diff --git a/icons/keyboard-music.json b/icons/keyboard-music.json index 1a4932eb2..9febf7c1e 100644 --- a/icons/keyboard-music.json +++ b/icons/keyboard-music.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "music", diff --git a/icons/list-todo.json b/icons/list-todo.json index 379196d3a..a48f8841b 100644 --- a/icons/list-todo.json +++ b/icons/list-todo.json @@ -1,5 +1,9 @@ { "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere", + "danielbayley" + ], "tags": [ "todo", "done", diff --git a/icons/lock-keyhole.json b/icons/lock-keyhole.json index a88e7da19..5ff117012 100644 --- a/icons/lock-keyhole.json +++ b/icons/lock-keyhole.json @@ -1,5 +1,13 @@ { "$schema": "../icon.schema.json", + "contributors": [ + "colebemis", + "csandman", + "ericfennis", + "cd16b", + "danielbayley", + "karsa-mistmere" + ], "tags": [ "security", "password", diff --git a/icons/paint-roller.json b/icons/paint-roller.json index baf77033a..2ced2c2f6 100644 --- a/icons/paint-roller.json +++ b/icons/paint-roller.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "brush", diff --git a/icons/palette.json b/icons/palette.json index 4afc8f878..a084bfa23 100644 --- a/icons/palette.json +++ b/icons/palette.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "ericfennis", - "csandman" + "csandman", + "karsa-mistmere" ], "tags": [ "colors", diff --git a/icons/piano.json b/icons/piano.json index ad3d16f05..f3c179e18 100644 --- a/icons/piano.json +++ b/icons/piano.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "music", diff --git a/icons/pocket-knife.json b/icons/pocket-knife.json index 9437184a8..21e5ba3fe 100644 --- a/icons/pocket-knife.json +++ b/icons/pocket-knife.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "swiss army knife", diff --git a/icons/presentation.json b/icons/presentation.json index 6e817a36c..7d0f8be29 100644 --- a/icons/presentation.json +++ b/icons/presentation.json @@ -1,6 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ + "karsa-mistmere", "danielbayley" ], "tags": [ diff --git a/icons/pyramid.json b/icons/pyramid.json index 63967f720..4367598e3 100644 --- a/icons/pyramid.json +++ b/icons/pyramid.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "prism", diff --git a/icons/radiation.json b/icons/radiation.json index 0a8b41def..5fb949886 100644 --- a/icons/radiation.json +++ b/icons/radiation.json @@ -1,6 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ + "karsa-mistmere", "danielbayley", "ericfennis" ], diff --git a/icons/radius.json b/icons/radius.json index 4fae09812..a621b4ffd 100644 --- a/icons/radius.json +++ b/icons/radius.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "shape", diff --git a/icons/scroll-text.json b/icons/scroll-text.json index 3a1d46acc..2b1539f47 100644 --- a/icons/scroll-text.json +++ b/icons/scroll-text.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "paper", diff --git a/icons/signal-low.json b/icons/signal-low.json index e5493fb03..bcc9ffd26 100644 --- a/icons/signal-low.json +++ b/icons/signal-low.json @@ -1,9 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "ericfennis", - "danielbayley", - "karsa-mistmere" + "ericfennis" ], "tags": [ "connection", diff --git a/icons/signal-zero.json b/icons/signal-zero.json index 2f431b5d3..4306bfad8 100644 --- a/icons/signal-zero.json +++ b/icons/signal-zero.json @@ -2,8 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "ericfennis", - "danielbayley", - "karsa-mistmere", "azdle" ], "tags": [ diff --git a/icons/slash-square.json b/icons/slash-square.json index 50fc743b4..c7d3991c2 100644 --- a/icons/slash-square.json +++ b/icons/slash-square.json @@ -2,7 +2,6 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "karsa-mistmere", "ericfennis" ], "tags": [ diff --git a/icons/snail.json b/icons/snail.json index c9e981d71..aa5d4e06e 100644 --- a/icons/snail.json +++ b/icons/snail.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "animal", diff --git a/icons/space.json b/icons/space.json index d2be2abeb..eca01518f 100644 --- a/icons/space.json +++ b/icons/space.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "text", diff --git a/icons/spray-can.json b/icons/spray-can.json index 6ddae0818..4a621a582 100644 --- a/icons/spray-can.json +++ b/icons/spray-can.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "paint", diff --git a/icons/star-half.json b/icons/star-half.json index bfe0945ee..b8d8d4138 100644 --- a/icons/star-half.json +++ b/icons/star-half.json @@ -2,9 +2,7 @@ "$schema": "../icon.schema.json", "contributors": [ "mittalyashu", - "ericfennis", - "danielbayley", - "karsa-mistmere" + "ericfennis" ], "tags": [ "bookmark", diff --git a/icons/tangent.json b/icons/tangent.json index 91d3e1436..4cc2bb9f7 100644 --- a/icons/tangent.json +++ b/icons/tangent.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "tangential", diff --git a/icons/test-tube-2.json b/icons/test-tube-2.json index 52ae012ae..a037775cd 100644 --- a/icons/test-tube-2.json +++ b/icons/test-tube-2.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "tube", diff --git a/icons/undo-dot.json b/icons/undo-dot.json index 38058fc6e..b6773b7ff 100644 --- a/icons/undo-dot.json +++ b/icons/undo-dot.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "redo", diff --git a/icons/unfold-horizontal.json b/icons/unfold-horizontal.json index 3a796795b..26797ae8c 100644 --- a/icons/unfold-horizontal.json +++ b/icons/unfold-horizontal.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "arrow", diff --git a/icons/unfold-vertical.json b/icons/unfold-vertical.json index 58eaa6b58..dc4da86a1 100644 --- a/icons/unfold-vertical.json +++ b/icons/unfold-vertical.json @@ -1,8 +1,7 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley", - "karsa-mistmere" + "danielbayley" ], "tags": [ "arrow", diff --git a/icons/unlock-keyhole.json b/icons/unlock-keyhole.json index b3350a902..2125790d2 100644 --- a/icons/unlock-keyhole.json +++ b/icons/unlock-keyhole.json @@ -1,5 +1,13 @@ { "$schema": "../icon.schema.json", + "contributors": [ + "colebemis", + "csandman", + "ericfennis", + "cd16b", + "danielbayley", + "karsa-mistmere" + ], "tags": [ "security" ], diff --git a/icons/utility-pole.json b/icons/utility-pole.json index 587002634..97160995a 100644 --- a/icons/utility-pole.json +++ b/icons/utility-pole.json @@ -1,5 +1,8 @@ { "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere" + ], "tags": [ "electricity", "energy", From b9fdde2d091d9218eaa2a5e79da3fc72a40d9fbd Mon Sep 17 00:00:00 2001 From: DefaultLP <29122114+DefaultLP@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:34:34 +0100 Subject: [PATCH 41/97] Add caption icons (#1799) * Add caption icons * Add subtitle category * Changed corner radius to 2px * Fixed metadata for caption icons * Took suggestions to heart * Removed trailing spaces * Fixed captions-off violations * Fixed name and added aliases * Removed subtitles svg and json * Removed alias from captions-off * format --------- Co-authored-by: Eric Fennis --- icons/captions-off.json | 18 ++++++++++++++++++ icons/captions-off.svg | 18 ++++++++++++++++++ icons/captions.json | 21 +++++++++++++++++++++ icons/{subtitles.svg => captions.svg} | 9 +++------ icons/subtitles.json | 13 ------------- 5 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 icons/captions-off.json create mode 100644 icons/captions-off.svg create mode 100644 icons/captions.json rename icons/{subtitles.svg => captions.svg} (53%) delete mode 100644 icons/subtitles.json diff --git a/icons/captions-off.json b/icons/captions-off.json new file mode 100644 index 000000000..0da7b8844 --- /dev/null +++ b/icons/captions-off.json @@ -0,0 +1,18 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "DefaultLP" + ], + "tags": [ + "closed captions", + "subtitles", + "subhead", + "transcription", + "transcribe", + "dialogue", + "accessibility" + ], + "categories": [ + "multimedia" + ] +} diff --git a/icons/captions-off.svg b/icons/captions-off.svg new file mode 100644 index 000000000..5552fe368 --- /dev/null +++ b/icons/captions-off.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/captions.json b/icons/captions.json new file mode 100644 index 000000000..70884bc2a --- /dev/null +++ b/icons/captions.json @@ -0,0 +1,21 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "DefaultLP" + ], + "tags": [ + "closed captions", + "subtitles", + "subhead", + "transcription", + "transcribe", + "dialogue", + "accessibility" + ], + "categories": [ + "multimedia" + ], + "aliases": [ + "subtitles" + ] +} diff --git a/icons/subtitles.svg b/icons/captions.svg similarity index 53% rename from icons/subtitles.svg rename to icons/captions.svg index e9bc08553..fdf03617b 100644 --- a/icons/subtitles.svg +++ b/icons/captions.svg @@ -9,9 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - + + + \ No newline at end of file diff --git a/icons/subtitles.json b/icons/subtitles.json deleted file mode 100644 index ea390db94..000000000 --- a/icons/subtitles.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../icon.schema.json", - "contributors": [ - "it-is-not", - "karsa-mistmere" - ], - "tags": [ - "captions", - "closed captions", - "accessibility" - ], - "categories": [] -} From 86f2dc12f49a6c9f8719868caed14eb8c42566e6 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 16:59:54 +0100 Subject: [PATCH 42/97] Update `arrow-big-down-dash` icon (#1876) * Updated icons/arrow-big-down-dash.svg * Updated icons/arrow-big-down-dash.json --- icons/arrow-big-down-dash.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icons/arrow-big-down-dash.svg b/icons/arrow-big-down-dash.svg index 54be6f36b..270e493ea 100644 --- a/icons/arrow-big-down-dash.svg +++ b/icons/arrow-big-down-dash.svg @@ -10,5 +10,5 @@ stroke-linejoin="round" > - + From 99acf4102caa08f8063bb434e309ba8dcb9f545f Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 17:01:19 +0100 Subject: [PATCH 43/97] Update `wifi` icon (#1877) * Updated icons/wifi.svg * Updated icons/wifi.json * Updated icons/wifi.svg * Updated icons/wifi.json * Update wifi-off.svg --------- Co-authored-by: Karsa --- icons/wifi-off.svg | 14 +++++++------- icons/wifi.json | 3 ++- icons/wifi.svg | 6 +++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/icons/wifi-off.svg b/icons/wifi-off.svg index fade284ef..6bb8ddfa6 100644 --- a/icons/wifi-off.svg +++ b/icons/wifi-off.svg @@ -9,11 +9,11 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - + + + + + + + diff --git a/icons/wifi.json b/icons/wifi.json index 13514e0f7..acee7ef64 100644 --- a/icons/wifi.json +++ b/icons/wifi.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "colebemis", - "ericfennis" + "ericfennis", + "jguddas" ], "tags": [ "connection", diff --git a/icons/wifi.svg b/icons/wifi.svg index 749bab126..e46d6d32c 100644 --- a/icons/wifi.svg +++ b/icons/wifi.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - - + - + + From 91c95600f35544dd6db4c39653869bfb8399abaf Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 17:01:50 +0100 Subject: [PATCH 44/97] Update `rss` icon metadata (#1873) * Updated icons/rss.svg * Updated icons/rss.json --- icons/rss.json | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/icons/rss.json b/icons/rss.json index 6f612f0b5..e55f734e2 100644 --- a/icons/rss.json +++ b/icons/rss.json @@ -7,7 +7,26 @@ ], "tags": [ "feed", - "subscribe" + "subscribe", + "news", + "updates", + "notifications", + "content", + "blog", + "articles", + "broadcast", + "syndication", + "reader", + "channels", + "posts", + "publishing", + "digest", + "alert", + "following", + "inbox", + "newsletter", + "weblog", + "podcast" ], "categories": [ "development", From a789c912135a1fc6fdea1da8a105c212dc154ce3 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 17:02:13 +0100 Subject: [PATCH 45/97] Optimized `shopping-basket` icon (#1871) * Updated icons/shopping-basket.svg * Updated icons/shopping-basket.json * Updated icons/shopping-basket.svg * Updated icons/shopping-basket.json --- icons/shopping-basket.svg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icons/shopping-basket.svg b/icons/shopping-basket.svg index a5b72c437..1ae4b2b8f 100644 --- a/icons/shopping-basket.svg +++ b/icons/shopping-basket.svg @@ -9,11 +9,11 @@ stroke-linecap="round" stroke-linejoin="round" > - + - - + - + + From 2e0af66d8a03be5f69ab1ba451e75aac03556179 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 17:04:35 +0100 Subject: [PATCH 46/97] Update `school` icon (#1872) * Updated icons/school.svg * Updated icons/school.json --- icons/school.json | 21 ++++++++++++++++++++- icons/school.svg | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/icons/school.json b/icons/school.json index e98cac803..9f459021e 100644 --- a/icons/school.json +++ b/icons/school.json @@ -7,7 +7,26 @@ "building", "education", "childhood", - "university" + "university", + "learning", + "campus", + "scholar", + "student", + "lecture", + "degree", + "course", + "academia", + "study", + "knowledge", + "classroom", + "research", + "diploma", + "graduation", + "professor", + "tutorial", + "homework", + "assignment", + "exam" ], "categories": [ "buildings", diff --git a/icons/school.svg b/icons/school.svg index fed884dbb..3347d8aa5 100644 --- a/icons/school.svg +++ b/icons/school.svg @@ -9,10 +9,10 @@ stroke-linecap="round" stroke-linejoin="round" > - + - + From 981c3309ced745479e6ec20c947be19cd6db6c17 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 17:58:43 +0100 Subject: [PATCH 47/97] Rounded corners of `graduation-cap` icon (#1870) * Updated icons/graduation-cap.svg * Updated icons/graduation-cap.json * Updated icons/graduation-cap.svg * Updated icons/graduation-cap.json --- icons/graduation-cap.json | 4 +++- icons/graduation-cap.svg | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/icons/graduation-cap.json b/icons/graduation-cap.json index b65615052..41adb1ace 100644 --- a/icons/graduation-cap.json +++ b/icons/graduation-cap.json @@ -2,7 +2,9 @@ "$schema": "../icon.schema.json", "contributors": [ "Tummerhore", - "ericfennis" + "ericfennis", + "karsa-mistmere", + "jguddas" ], "tags": [ "school", diff --git a/icons/graduation-cap.svg b/icons/graduation-cap.svg index 464ae8fca..1c0009b66 100644 --- a/icons/graduation-cap.svg +++ b/icons/graduation-cap.svg @@ -9,6 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + + From 08c040a57dd736951588f65e53323f31cf6634ff Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sun, 11 Feb 2024 18:07:39 +0100 Subject: [PATCH 48/97] Update `anchor` icon (#1875) * Updated icons/anchor.svg * Updated icons/anchor.json --- icons/anchor.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icons/anchor.svg b/icons/anchor.svg index 97ab7bb22..67f40a13a 100644 --- a/icons/anchor.svg +++ b/icons/anchor.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + From e3923f87c26ee66d30604055d1b0470f4c9c6c08 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 11 Feb 2024 23:42:03 +0100 Subject: [PATCH 49/97] Add `radical` icon (square root) (#1847) * Add `square-root`icon * Update square-root.svg * Fix square icon SVG Co-authored-by: Jakob Guddas * Rename `square-root` `radical` * Rename radical-square.json to square-radical.json * Rename radical-square.svg to square-radical.svg * Update radical.json * Match activity height Co-authored-by: Karsa --------- Co-authored-by: Jakob Guddas Co-authored-by: Eric Fennis Co-authored-by: Karsa --- icons/radical.json | 19 +++++++++++++++++++ icons/radical.svg | 13 +++++++++++++ icons/square-radical.json | 20 ++++++++++++++++++++ icons/square-radical.svg | 14 ++++++++++++++ 4 files changed, 66 insertions(+) create mode 100644 icons/radical.json create mode 100644 icons/radical.svg create mode 100644 icons/square-radical.json create mode 100644 icons/square-radical.svg diff --git a/icons/radical.json b/icons/radical.json new file mode 100644 index 000000000..7365e8559 --- /dev/null +++ b/icons/radical.json @@ -0,0 +1,19 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "smnandre" + ], + "tags": [ + "calculate", + "formula", + "maths", + "operator", + "root", + "square", + "symbol" + ], + "categories": [ + "development", + "maths" + ] +} diff --git a/icons/radical.svg b/icons/radical.svg new file mode 100644 index 000000000..2a97d8190 --- /dev/null +++ b/icons/radical.svg @@ -0,0 +1,13 @@ + + + diff --git a/icons/square-radical.json b/icons/square-radical.json new file mode 100644 index 000000000..7e2b4dfae --- /dev/null +++ b/icons/square-radical.json @@ -0,0 +1,20 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "smnandre" + ], + "tags": [ + "calculate", + "formula", + "maths", + "operator", + "root", + "square", + "symbol" + ], + "categories": [ + "development", + "maths", + "shapes" + ] +} diff --git a/icons/square-radical.svg b/icons/square-radical.svg new file mode 100644 index 000000000..70bd53f61 --- /dev/null +++ b/icons/square-radical.svg @@ -0,0 +1,14 @@ + + + + From 33189a81acc5b225a9734f62266e60e29e157206 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 14:33:04 +0100 Subject: [PATCH 50/97] fix: updateContributors adds trailing line to icon.json (#1885) --- scripts/updateContributors.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/updateContributors.mjs b/scripts/updateContributors.mjs index 0c978e507..e313815b9 100644 --- a/scripts/updateContributors.mjs +++ b/scripts/updateContributors.mjs @@ -25,7 +25,7 @@ const getUserName = pMemoize( } return fetchedCommit?.author?.login; }, - { cacheKey: ([commit]) => commit.author_email, cache }, + { cacheKey: ([commit]) => commit.author_email, cache } ); // Check that a commit changes more than just the icon name @@ -51,7 +51,7 @@ const getContributors = async (file, includeCoAuthors) => { } if (includeCoAuthors) { const matches = commit.body.matchAll( - /(^Author:|^Co-authored-by:)\s+(?[^<]+)\s+<(?[^>]+)>/gm, + /(^Author:|^Co-authored-by:)\s+(?[^<]+)\s+<(?[^>]+)>/gm ); // eslint-disable-next-line no-restricted-syntax for (const match of matches) { @@ -99,8 +99,8 @@ await Promise.all( ...rest, }, null, - 2, - ), + 2 + ) + '\n' ); - }), + }) ); From 71aef258121326aa2a5a1a73e3351e2f65c13ed3 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 16:13:45 +0100 Subject: [PATCH 51/97] Update `circle-dashed` icon (#1884) * Updated icons/circle-dashed.svg * Updated icons/circle-dashed.json * Update icons/circle-dashed.svg Co-authored-by: Karsa --------- Co-authored-by: Karsa --- icons/circle-dashed.json | 3 ++- icons/circle-dashed.svg | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/icons/circle-dashed.json b/icons/circle-dashed.json index fd25bf157..ad36c3f14 100644 --- a/icons/circle-dashed.json +++ b/icons/circle-dashed.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "jguddas" ], "tags": [ "pending", diff --git a/icons/circle-dashed.svg b/icons/circle-dashed.svg index 3a6eabac7..4ae53eed6 100644 --- a/icons/circle-dashed.svg +++ b/icons/circle-dashed.svg @@ -9,12 +9,12 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - - + + + + + + + + From 7a9233f4a7432ebdcfc2a71bfb2985c7d96ad510 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 16:14:07 +0100 Subject: [PATCH 52/97] Update `clover` icon (#1883) * Updated icons/clover.svg * Updated icons/clover.json * Updated icons/clover.svg * Update icons/clover.svg Co-authored-by: Karsa --------- Co-authored-by: Karsa --- icons/clover.json | 3 ++- icons/clover.svg | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/icons/clover.json b/icons/clover.json index 0e64d14a1..c57f48c44 100644 --- a/icons/clover.json +++ b/icons/clover.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "ericfennis", - "csandman" + "csandman", + "jguddas" ], "tags": [ "leaf", diff --git a/icons/clover.svg b/icons/clover.svg index 9880c30c1..7a0452cf0 100644 --- a/icons/clover.svg +++ b/icons/clover.svg @@ -9,9 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - + + + From 8a7e6ba3436619148f0ba3d74789578c8e19b4a8 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 16:15:05 +0100 Subject: [PATCH 53/97] Update `file-symlink` icon (#1878) * Updated icons/file-symlink.svg * Updated icons/file-symlink.json --- icons/file-symlink.json | 3 ++- icons/file-symlink.svg | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/icons/file-symlink.json b/icons/file-symlink.json index 188c124c0..5a6d27641 100644 --- a/icons/file-symlink.json +++ b/icons/file-symlink.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "karsa-mistmere", - "danielbayley" + "danielbayley", + "jguddas" ], "tags": [ "symlink", diff --git a/icons/file-symlink.svg b/icons/file-symlink.svg index 9c40d9876..967a486b9 100644 --- a/icons/file-symlink.svg +++ b/icons/file-symlink.svg @@ -9,8 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + From a2e8ea32d27f340b4920499a6d92fb566e271969 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 16:16:03 +0100 Subject: [PATCH 54/97] feat: folder symlink (#1618) Co-authored-by: Eric Fennis --- icons/folder-symlink.svg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/icons/folder-symlink.svg b/icons/folder-symlink.svg index 2b9fd7f32..129b468c8 100644 --- a/icons/folder-symlink.svg +++ b/icons/folder-symlink.svg @@ -9,7 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - + - From 0cfdfa21818a9933adf0c9b4e00f33031822c5af Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 12 Feb 2024 16:17:22 +0100 Subject: [PATCH 55/97] Adds `images` and (updates `file-image` to match) (#1852) * Adds images and updates file-image to match * Improve pixel perfection --------- Co-authored-by: Karsa --- icons/file-image.svg | 4 ++-- icons/images.json | 23 +++++++++++++++++++++++ icons/images.svg | 16 ++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 icons/images.json create mode 100644 icons/images.svg diff --git a/icons/file-image.svg b/icons/file-image.svg index b10e2974b..eb2f905b0 100644 --- a/icons/file-image.svg +++ b/icons/file-image.svg @@ -11,6 +11,6 @@ > - - + + diff --git a/icons/images.json b/icons/images.json new file mode 100644 index 000000000..020484fad --- /dev/null +++ b/icons/images.json @@ -0,0 +1,23 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere" + ], + "tags": [ + "picture", + "photo", + "multiple", + "copy", + "gallery", + "album", + "collection", + "slideshow", + "showcase" + ], + "categories": [ + "photography", + "text", + "multimedia", + "files" + ] +} diff --git a/icons/images.svg b/icons/images.svg new file mode 100644 index 000000000..02fb5a89c --- /dev/null +++ b/icons/images.svg @@ -0,0 +1,16 @@ + + + + + + From a0b130525825f630b6b057850d37ea18330c1806 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 16:18:39 +0100 Subject: [PATCH 56/97] feat: folder output (#1619) --- icons/folder-output.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icons/folder-output.svg b/icons/folder-output.svg index 422b1a79d..518a32b1b 100644 --- a/icons/folder-output.svg +++ b/icons/folder-output.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + From 01cff578e539980a4b12386a1de98c05470bbdd7 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 12 Feb 2024 16:18:48 +0100 Subject: [PATCH 57/97] Update `file-output` icon (#1879) * Updated icons/file-output.svg * Updated icons/file-output.json --- icons/file-output.json | 3 ++- icons/file-output.svg | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/icons/file-output.json b/icons/file-output.json index 6fba8b503..b410b2c7a 100644 --- a/icons/file-output.json +++ b/icons/file-output.json @@ -4,7 +4,8 @@ "Andreto", "ericfennis", "karsa-mistmere", - "danielbayley" + "danielbayley", + "jguddas" ], "tags": [ "document" diff --git a/icons/file-output.svg b/icons/file-output.svg index 30c20bc50..e4806a83a 100644 --- a/icons/file-output.svg +++ b/icons/file-output.svg @@ -9,8 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + + From 9bf8a653a3b91743a36b10cd9ea9bda007e03d60 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 12 Feb 2024 18:59:06 +0100 Subject: [PATCH 58/97] Ran prettier on updateContributors.mjs (#1887) Co-authored-by: Karsa --- scripts/updateContributors.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/updateContributors.mjs b/scripts/updateContributors.mjs index e313815b9..90dbe8c49 100644 --- a/scripts/updateContributors.mjs +++ b/scripts/updateContributors.mjs @@ -25,7 +25,7 @@ const getUserName = pMemoize( } return fetchedCommit?.author?.login; }, - { cacheKey: ([commit]) => commit.author_email, cache } + { cacheKey: ([commit]) => commit.author_email, cache }, ); // Check that a commit changes more than just the icon name @@ -51,7 +51,7 @@ const getContributors = async (file, includeCoAuthors) => { } if (includeCoAuthors) { const matches = commit.body.matchAll( - /(^Author:|^Co-authored-by:)\s+(?[^<]+)\s+<(?[^>]+)>/gm + /(^Author:|^Co-authored-by:)\s+(?[^<]+)\s+<(?[^>]+)>/gm, ); // eslint-disable-next-line no-restricted-syntax for (const match of matches) { @@ -99,8 +99,8 @@ await Promise.all( ...rest, }, null, - 2 - ) + '\n' + 2, + ) + '\n', ); - }) + }), ); From 42b494f8534f8349743a0ac02810bd53d82c2b4a Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 12 Feb 2024 19:04:03 +0100 Subject: [PATCH 59/97] Updated naming guidelines with element order and modifier naming scheme (#1874) * Update icon-design-guide.md * Update docs/guide/design/icon-design-guide.md --------- Co-authored-by: Karsa Co-authored-by: Eric Fennis --- docs/guide/design/icon-design-guide.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/guide/design/icon-design-guide.md b/docs/guide/design/icon-design-guide.md index 007863e07..82e37b08d 100644 --- a/docs/guide/design/icon-design-guide.md +++ b/docs/guide/design/icon-design-guide.md @@ -106,6 +106,15 @@ Here are rules that should be followed to keep quality and consistency when maki 6. Names containing numerals are not allowed, unless the number itself is represented in the icon.\ For example: `arrow-down-0-to-1` contains both numerals. +7. Icons depicting multiple elements (e.g. a person and a circle) of different sizes must list these elements in decreasing order of size.\ + For example: if the circle is bigger, it should be `circle-person`, if the person is bigger, it should be `person-circle`. + +8. Icons depicting multiple elements of roughly equal sizes (e.g. a `ruler` and a `pencil`) must list these elements in English reading order.\ + For example: if the `pencil` is either above or left of `ruler`, it should be `pencil-ruler`, otherwise, it should be `ruler-pencil`. + +9. Icons depicting some sort of variation of an element must use the `[element]-[modifier]` naming scheme, with modifiers being applied to each element respectively.\ + For example: a dashed circle must be named `circle-dashed`, not `dashed-circle`, and in coordination with the previous guidelines, a dashed circle containing a broken heart would be named `circle-dashed-heart-broken`, due to the heart being smaller than the circle. + ## Code Conventions Before an icon is added to the library, we like to have readable and optimized SVG code. From 42c1faed7597021baff4aed7f807483beb8971c6 Mon Sep 17 00:00:00 2001 From: Karsa Date: Thu, 15 Feb 2024 13:34:42 +0100 Subject: [PATCH 60/97] Adds telescope icon (#1889) Co-authored-by: Karsa --- icons/telescope.json | 24 ++++++++++++++++++++++++ icons/telescope.svg | 19 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 icons/telescope.json create mode 100644 icons/telescope.svg diff --git a/icons/telescope.json b/icons/telescope.json new file mode 100644 index 000000000..d07d33028 --- /dev/null +++ b/icons/telescope.json @@ -0,0 +1,24 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere" + ], + "tags": [ + "astronomy", + "space", + "discovery", + "exploration", + "explore", + "vision", + "perspective", + "focus", + "stargazing", + "observe", + "view" + ], + "categories": [ + "science", + "development", + "tools" + ] +} diff --git a/icons/telescope.svg b/icons/telescope.svg new file mode 100644 index 000000000..afd54e648 --- /dev/null +++ b/icons/telescope.svg @@ -0,0 +1,19 @@ + + + + + + + + + From d575743d3ac8a7d34d7efe4a40aa9841ded4e93d Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 19 Feb 2024 08:11:15 +0100 Subject: [PATCH 61/97] Fix siren rounding (#1896) Co-authored-by: Karsa --- icons/siren.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icons/siren.svg b/icons/siren.svg index 527976a98..7bb94a3fb 100644 --- a/icons/siren.svg +++ b/icons/siren.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + From 804906dcd8af6fc960f94e8d56021ed37ad2c515 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Mon, 19 Feb 2024 08:11:24 +0100 Subject: [PATCH 62/97] Update `tractor` icon (#1894) * Updated icons/tractor.svg * Updated icons/tractor.json --- icons/tractor.json | 3 ++- icons/tractor.svg | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/icons/tractor.json b/icons/tractor.json index 4d5fdf00e..ef00cec23 100644 --- a/icons/tractor.json +++ b/icons/tractor.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "jguddas" ], "tags": [ "farming", diff --git a/icons/tractor.svg b/icons/tractor.svg index 2930ad951..2541524b7 100644 --- a/icons/tractor.svg +++ b/icons/tractor.svg @@ -9,13 +9,13 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - + + + + + + From 0c2a8d774f016220a6832144bbf0126823f9d846 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 19 Feb 2024 08:11:29 +0100 Subject: [PATCH 63/97] Fix `anvil` rounding (#1895) * Fix anvil rounding * Add rounding to spike --------- Co-authored-by: Karsa --- icons/anvil.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icons/anvil.svg b/icons/anvil.svg index 3371cbe33..6cf6d9ba5 100644 --- a/icons/anvil.svg +++ b/icons/anvil.svg @@ -9,9 +9,9 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + - + From 5e5fe0085fb6fc8c60a12b65dc708c719b246267 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 19 Feb 2024 08:12:47 +0100 Subject: [PATCH 64/97] Update tractor.svg --- icons/tractor.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icons/tractor.svg b/icons/tractor.svg index 2541524b7..cff171f86 100644 --- a/icons/tractor.svg +++ b/icons/tractor.svg @@ -11,8 +11,8 @@ > - - + + From b5dc96d2c2fb1fc31fc30473427e7082ba83bd7c Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 19 Feb 2024 09:00:51 +0100 Subject: [PATCH 65/97] Optimise hammer (#1893) * Optimize and fix guideline violation in hammer * Further adjustments to pixel perfection * Nudge things around a bit more * Elongate front part of head --------- Co-authored-by: Karsa --- icons/hammer.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icons/hammer.svg b/icons/hammer.svg index 838fe6a8d..a4c6a0864 100644 --- a/icons/hammer.svg +++ b/icons/hammer.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + From ca53b06af25d04bb4034d23e5708d1e93b30cda4 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 19 Feb 2024 09:01:32 +0100 Subject: [PATCH 66/97] Adds `pickaxe` icon (#1890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds pickaxe icon * Replace missing icon, haha 😅 --------- Co-authored-by: Karsa --- icons/pickaxe.json | 24 ++++++++++++++++++++++++ icons/pickaxe.svg | 16 ++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 icons/pickaxe.json create mode 100644 icons/pickaxe.svg diff --git a/icons/pickaxe.json b/icons/pickaxe.json new file mode 100644 index 000000000..ea5c3cee4 --- /dev/null +++ b/icons/pickaxe.json @@ -0,0 +1,24 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "karsa-mistmere" + ], + "tags": [ + "mining", + "mine", + "land worker", + "extraction", + "labor", + "construction", + "progress", + "advancement", + "crafting", + "building", + "creation" + ], + "categories": [ + "tools", + "maps", + "gaming" + ] +} diff --git a/icons/pickaxe.svg b/icons/pickaxe.svg new file mode 100644 index 000000000..fd134ab99 --- /dev/null +++ b/icons/pickaxe.svg @@ -0,0 +1,16 @@ + + + + + + From 6fa51d2a22365a141d683beb32d54ec798521e53 Mon Sep 17 00:00:00 2001 From: Karsa Date: Tue, 20 Feb 2024 15:32:43 +0100 Subject: [PATCH 67/97] Optimise hop (#1897) Co-authored-by: Karsa --- icons/hop-off.svg | 17 +++++++++-------- icons/hop.svg | 16 ++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/icons/hop-off.svg b/icons/hop-off.svg index a9a7d4e09..d2db146bb 100644 --- a/icons/hop-off.svg +++ b/icons/hop-off.svg @@ -9,12 +9,13 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - - + + + + + + + + + diff --git a/icons/hop.svg b/icons/hop.svg index 5eac5f130..eae2af0fc 100644 --- a/icons/hop.svg +++ b/icons/hop.svg @@ -9,12 +9,12 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - - - - + + + + + + + + From d542da0a1c31a5a70861f463cbfbaaddec488754 Mon Sep 17 00:00:00 2001 From: Kyle Angelo Galendez <137697011+chessurisme@users.noreply.github.com> Date: Thu, 22 Feb 2024 05:47:20 +0800 Subject: [PATCH 68/97] Add `table-cells-merge`, `table-cells-split`, `table-rows-split`, and `table-columns-split` icons (#1856) * Add split-table icon * Add split-table.json * Add split-rows icon * Add split-rows.json * Add merge-rows icon * Add merge-rows.json * Update icons/merge-rows.svg Co-authored-by: Karsa * Update split-rows.svg * Update split-table.svg * Fix by add padding to split-table icon - Accidentally exported the whole icon from Inkscape, but not the entire page, which creates no padding * Update split-table icon - Add 1px to the row borders down below * Rename split-table.svg to table-row-split.svg * Update and rename split-table.json to table-row-split.json * Rename merge-rows to table-cells-merge * Rename split-rows to table-cells-split * Rename table-row-split to table-split * Add `table-columns-split` icon * Add table-columns-split.json * Delete table-split icon and json * Add `table-rows-split` json and icon * Update icons/table-cells-split.json Co-authored-by: Karsa * Update icons/table-rows-split.json Co-authored-by: Karsa * Update icons/table-cells-merge.json Co-authored-by: Karsa * Update icons/table-columns-split.json Co-authored-by: Karsa --------- Co-authored-by: Karsa --- icons/table-cells-merge.json | 15 +++++++++++++++ icons/table-cells-merge.svg | 17 +++++++++++++++++ icons/table-cells-split.json | 15 +++++++++++++++ icons/table-cells-split.svg | 16 ++++++++++++++++ icons/table-columns-split.json | 19 +++++++++++++++++++ icons/table-columns-split.svg | 23 +++++++++++++++++++++++ icons/table-rows-split.json | 19 +++++++++++++++++++ icons/table-rows-split.svg | 23 +++++++++++++++++++++++ 8 files changed, 147 insertions(+) create mode 100644 icons/table-cells-merge.json create mode 100644 icons/table-cells-merge.svg create mode 100644 icons/table-cells-split.json create mode 100644 icons/table-cells-split.svg create mode 100644 icons/table-columns-split.json create mode 100644 icons/table-columns-split.svg create mode 100644 icons/table-rows-split.json create mode 100644 icons/table-rows-split.svg diff --git a/icons/table-cells-merge.json b/icons/table-cells-merge.json new file mode 100644 index 000000000..a03d2ffa4 --- /dev/null +++ b/icons/table-cells-merge.json @@ -0,0 +1,15 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "chessurisme" + ], + "tags": [ + "spreadsheet", + "grid", + "row" + ], + "categories": [ + "text", + "files" + ] +} diff --git a/icons/table-cells-merge.svg b/icons/table-cells-merge.svg new file mode 100644 index 000000000..a5292defc --- /dev/null +++ b/icons/table-cells-merge.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/icons/table-cells-split.json b/icons/table-cells-split.json new file mode 100644 index 000000000..a03d2ffa4 --- /dev/null +++ b/icons/table-cells-split.json @@ -0,0 +1,15 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "chessurisme" + ], + "tags": [ + "spreadsheet", + "grid", + "row" + ], + "categories": [ + "text", + "files" + ] +} diff --git a/icons/table-cells-split.svg b/icons/table-cells-split.svg new file mode 100644 index 000000000..ffd3434d7 --- /dev/null +++ b/icons/table-cells-split.svg @@ -0,0 +1,16 @@ + + + + + + diff --git a/icons/table-columns-split.json b/icons/table-columns-split.json new file mode 100644 index 000000000..496ae8bb8 --- /dev/null +++ b/icons/table-columns-split.json @@ -0,0 +1,19 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "chessurisme" + ], + "tags": [ + "spreadsheet", + "grid", + "cut", + "break", + "divide", + "separate", + "segment" + ], + "categories": [ + "text", + "files" + ] +} diff --git a/icons/table-columns-split.svg b/icons/table-columns-split.svg new file mode 100644 index 000000000..af735a0d3 --- /dev/null +++ b/icons/table-columns-split.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/icons/table-rows-split.json b/icons/table-rows-split.json new file mode 100644 index 000000000..496ae8bb8 --- /dev/null +++ b/icons/table-rows-split.json @@ -0,0 +1,19 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "chessurisme" + ], + "tags": [ + "spreadsheet", + "grid", + "cut", + "break", + "divide", + "separate", + "segment" + ], + "categories": [ + "text", + "files" + ] +} diff --git a/icons/table-rows-split.svg b/icons/table-rows-split.svg new file mode 100644 index 000000000..d2e85d110 --- /dev/null +++ b/icons/table-rows-split.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + From ca7a87112c6ee18a1622376ffd1835364f07336e Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Fri, 23 Feb 2024 09:58:13 +0100 Subject: [PATCH 69/97] Fixed gap issues in `flower` icon (#1650) * Fixed gap issues in `flower` icon * Update flower.json * Update flower.json * Update icons/flower.svg Co-authored-by: Karsa --------- Co-authored-by: Eric Fennis Co-authored-by: Karsa --- icons/flower.json | 3 ++- icons/flower.svg | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/icons/flower.json b/icons/flower.json index 86390381b..8d6b6e9e7 100644 --- a/icons/flower.json +++ b/icons/flower.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "karsa-mistmere" + "karsa-mistmere", + "jguddas" ], "tags": [ "sustainability", diff --git a/icons/flower.svg b/icons/flower.svg index 9eedfe8e8..9d22e323d 100644 --- a/icons/flower.svg +++ b/icons/flower.svg @@ -9,10 +9,14 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - - + + + + + + + + + From 7f1e95c6e70d6f15ff491bcdb54c1d6674bdc2ae Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Fri, 23 Feb 2024 11:20:42 +0100 Subject: [PATCH 70/97] Update `image-down` icon (#1910) * Updated icons/image-down.svg * Updated icons/image-down.json --- icons/image-down.json | 5 ++++- icons/image-down.svg | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/icons/image-down.json b/icons/image-down.json index ad8bd8f9e..71cb33159 100644 --- a/icons/image-down.json +++ b/icons/image-down.json @@ -8,7 +8,10 @@ ], "tags": [ "picture", - "photo" + "photo", + "download", + "save", + "export" ], "categories": [ "photography", diff --git a/icons/image-down.svg b/icons/image-down.svg index cdd6084ab..c977e52a0 100644 --- a/icons/image-down.svg +++ b/icons/image-down.svg @@ -9,9 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > + + + - - - - From bafad1c62598a159968fe8d144f3207186650043 Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Fri, 23 Feb 2024 11:25:17 +0100 Subject: [PATCH 71/97] Add `image-up` icon (#1909) * Added icons/image-up.svg * Added icons/image-up.json --- icons/image-up.json | 21 +++++++++++++++++++++ icons/image-up.svg | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 icons/image-up.json create mode 100644 icons/image-up.svg diff --git a/icons/image-up.json b/icons/image-up.json new file mode 100644 index 000000000..fc0264607 --- /dev/null +++ b/icons/image-up.json @@ -0,0 +1,21 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "colebemis", + "karsa-mistmere", + "ericfennis", + "jguddas" + ], + "tags": [ + "picture", + "photo", + "upload", + "import" + ], + "categories": [ + "photography", + "text", + "multimedia", + "files" + ] +} diff --git a/icons/image-up.svg b/icons/image-up.svg new file mode 100644 index 000000000..01b11ba87 --- /dev/null +++ b/icons/image-up.svg @@ -0,0 +1,16 @@ + + + + + + From db222d45918527aba5ed474f354870ac85c0091a Mon Sep 17 00:00:00 2001 From: Jakob Guddas Date: Sat, 24 Feb 2024 18:31:04 +0100 Subject: [PATCH 72/97] Optimized and fixed alignment issues in `package-open` icon (#1648) * Optimized and fixed alignment issues in `package-open` icon * Update icons/package-open.svg --------- Co-authored-by: Eric Fennis --- icons/package-open.svg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icons/package-open.svg b/icons/package-open.svg index b9c630fbe..645f56723 100644 --- a/icons/package-open.svg +++ b/icons/package-open.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + From 4657ccbfffbad6f2d63eeb7d9b4caa0313471804 Mon Sep 17 00:00:00 2001 From: Karsa Date: Sun, 25 Feb 2024 10:27:22 +0100 Subject: [PATCH 73/97] fix(icons/concierge-bell): Adds missing rounding from bottom part (#1923) Co-authored-by: Karsa --- icons/concierge-bell.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icons/concierge-bell.svg b/icons/concierge-bell.svg index 0f49fa91a..dffb6f792 100644 --- a/icons/concierge-bell.svg +++ b/icons/concierge-bell.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + From f297765a133a35dbd2cea4450021e040254dd72d Mon Sep 17 00:00:00 2001 From: Karsa Date: Sun, 25 Feb 2024 11:28:31 +0100 Subject: [PATCH 74/97] Update shield to have better centre of gravity (#1905) Co-authored-by: Karsa --- icons/shield-alert.json | 3 ++- icons/shield-alert.svg | 2 +- icons/shield-ban.json | 3 ++- icons/shield-ban.svg | 4 ++-- icons/shield-check.json | 3 ++- icons/shield-check.svg | 2 +- icons/shield-ellipsis.json | 3 ++- icons/shield-ellipsis.svg | 8 ++++---- icons/shield-half.json | 3 ++- icons/shield-half.svg | 2 +- icons/shield-minus.json | 3 ++- icons/shield-minus.svg | 4 ++-- icons/shield-off.svg | 4 ++-- icons/shield-plus.json | 3 ++- icons/shield-plus.svg | 6 +++--- icons/shield-question.json | 3 ++- icons/shield-question.svg | 2 +- icons/shield-x.json | 3 ++- icons/shield-x.svg | 6 +++--- icons/shield.json | 3 ++- icons/shield.svg | 2 +- 21 files changed, 41 insertions(+), 31 deletions(-) diff --git a/icons/shield-alert.json b/icons/shield-alert.json index 44e9688fb..90e9389e2 100644 --- a/icons/shield-alert.json +++ b/icons/shield-alert.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "mittalyashu", - "ericfennis" + "ericfennis", + "karsa-mistmere" ], "tags": [ "unshielded", diff --git a/icons/shield-alert.svg b/icons/shield-alert.svg index ee592c55a..b245aa665 100644 --- a/icons/shield-alert.svg +++ b/icons/shield-alert.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/shield-ban.json b/icons/shield-ban.json index 11246d923..d23572cab 100644 --- a/icons/shield-ban.json +++ b/icons/shield-ban.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "unshielded", diff --git a/icons/shield-ban.svg b/icons/shield-ban.svg index 051a0b757..d6a61c825 100644 --- a/icons/shield-ban.svg +++ b/icons/shield-ban.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/shield-check.json b/icons/shield-check.json index 26db56aa6..0f2fcddaf 100644 --- a/icons/shield-check.json +++ b/icons/shield-check.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "mittalyashu", - "ericfennis" + "ericfennis", + "karsa-mistmere" ], "tags": [ "cybersecurity", diff --git a/icons/shield-check.svg b/icons/shield-check.svg index 816fa3e21..da48f664e 100644 --- a/icons/shield-check.svg +++ b/icons/shield-check.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/shield-ellipsis.json b/icons/shield-ellipsis.json index a39bbe1a2..c97fc0515 100644 --- a/icons/shield-ellipsis.json +++ b/icons/shield-ellipsis.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "cybersecurity", diff --git a/icons/shield-ellipsis.svg b/icons/shield-ellipsis.svg index 3e86c7335..158a90db3 100644 --- a/icons/shield-ellipsis.svg +++ b/icons/shield-ellipsis.svg @@ -9,8 +9,8 @@ stroke-linecap="round" stroke-linejoin="round" > - - - - + + + + diff --git a/icons/shield-half.json b/icons/shield-half.json index d3f5e23a6..90e3b6d08 100644 --- a/icons/shield-half.json +++ b/icons/shield-half.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "cybersecurity", diff --git a/icons/shield-half.svg b/icons/shield-half.svg index e2ab3bc79..d787eb45c 100644 --- a/icons/shield-half.svg +++ b/icons/shield-half.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/shield-minus.json b/icons/shield-minus.json index 9acad1e36..53736495b 100644 --- a/icons/shield-minus.json +++ b/icons/shield-minus.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "unshield", diff --git a/icons/shield-minus.svg b/icons/shield-minus.svg index 9a59dc885..d884d9b3e 100644 --- a/icons/shield-minus.svg +++ b/icons/shield-minus.svg @@ -9,6 +9,6 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/shield-off.svg b/icons/shield-off.svg index a46a344e1..d7cc4443d 100644 --- a/icons/shield-off.svg +++ b/icons/shield-off.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - + + diff --git a/icons/shield-plus.json b/icons/shield-plus.json index d62092c23..87035457c 100644 --- a/icons/shield-plus.json +++ b/icons/shield-plus.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "danielbayley" + "danielbayley", + "karsa-mistmere" ], "tags": [ "cybersecurity", diff --git a/icons/shield-plus.svg b/icons/shield-plus.svg index 9e1c15101..3ced759cd 100644 --- a/icons/shield-plus.svg +++ b/icons/shield-plus.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + diff --git a/icons/shield-question.json b/icons/shield-question.json index f258f6f36..79273fa99 100644 --- a/icons/shield-question.json +++ b/icons/shield-question.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "danielbayley", - "jguddas" + "jguddas", + "karsa-mistmere" ], "tags": [ "unshielded", diff --git a/icons/shield-question.svg b/icons/shield-question.svg index 407af5821..34e922b07 100644 --- a/icons/shield-question.svg +++ b/icons/shield-question.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - + diff --git a/icons/shield-x.json b/icons/shield-x.json index a36e81d32..932c25287 100644 --- a/icons/shield-x.json +++ b/icons/shield-x.json @@ -2,7 +2,8 @@ "$schema": "../icon.schema.json", "contributors": [ "mittalyashu", - "ericfennis" + "ericfennis", + "karsa-mistmere" ], "tags": [ "unshielded", diff --git a/icons/shield-x.svg b/icons/shield-x.svg index 77162ecfd..dd9136676 100644 --- a/icons/shield-x.svg +++ b/icons/shield-x.svg @@ -9,7 +9,7 @@ stroke-linecap="round" stroke-linejoin="round" > - - - + + + diff --git a/icons/shield.json b/icons/shield.json index fbd486c6b..e130fd8bc 100644 --- a/icons/shield.json +++ b/icons/shield.json @@ -1,7 +1,8 @@ { "$schema": "../icon.schema.json", "contributors": [ - "colebemis" + "colebemis", + "karsa-mistmere" ], "tags": [ "cybersecurity", diff --git a/icons/shield.svg b/icons/shield.svg index e186fc6f7..e40d7d2ba 100644 --- a/icons/shield.svg +++ b/icons/shield.svg @@ -9,5 +9,5 @@ stroke-linecap="round" stroke-linejoin="round" > - + From ca4a38ba85531ab1cf7a664840a0d05eb1a3e8b7 Mon Sep 17 00:00:00 2001 From: Chaoying <32626585+Chaoyingz@users.noreply.github.com> Date: Mon, 26 Feb 2024 02:04:23 +0800 Subject: [PATCH 75/97] Fix import statements (#1922) --- packages/lucide-react/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/lucide-react/README.md b/packages/lucide-react/README.md index 10a9b33d7..beeb4b9c4 100644 --- a/packages/lucide-react/README.md +++ b/packages/lucide-react/README.md @@ -83,7 +83,8 @@ Example with React suspense: ```tsx import React, { lazy, Suspense } from 'react'; -import { dynamicIconImports, LucideProps } from 'lucide-react'; +import { LucideProps } from 'lucide-react'; +import dynamicIconImports from 'lucide-react/dynamicIconImports'; const fallback =
From 148bae88d85ee344d75f68ec38209b91f58c9690 Mon Sep 17 00:00:00 2001 From: Karsa Date: Mon, 26 Feb 2024 09:53:04 +0100 Subject: [PATCH 76/97] feat(icons): added globe-lock icon (#1587) * Added globe-lock icon * feat(icons): Added globe-lock, renamed globe-2 to earth, and added earth-lock * feat(icons): Added globe as a tag to earth --------- Co-authored-by: Eric Fennis Co-authored-by: Karsa --- icons/earth-lock.json | 25 +++++++++++++++++++++++++ icons/earth-lock.svg | 18 ++++++++++++++++++ icons/{globe-2.json => earth.json} | 6 +++++- icons/{globe-2.svg => earth.svg} | 0 icons/globe-lock.json | 26 ++++++++++++++++++++++++++ icons/globe-lock.svg | 16 ++++++++++++++++ 6 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 icons/earth-lock.json create mode 100644 icons/earth-lock.svg rename icons/{globe-2.json => earth.json} (78%) rename icons/{globe-2.svg => earth.svg} (100%) create mode 100644 icons/globe-lock.json create mode 100644 icons/globe-lock.svg diff --git a/icons/earth-lock.json b/icons/earth-lock.json new file mode 100644 index 000000000..17a2ef541 --- /dev/null +++ b/icons/earth-lock.json @@ -0,0 +1,25 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "mittalyashu", + "ericfennis", + "karsa-mistmere" + ], + "tags": [ + "vpn", + "private", + "privacy", + "network", + "world", + "browser", + "security", + "encryption", + "protection", + "connection" + ], + "categories": [ + "security", + "development", + "devices" + ] +} diff --git a/icons/earth-lock.svg b/icons/earth-lock.svg new file mode 100644 index 000000000..59aa03803 --- /dev/null +++ b/icons/earth-lock.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/icons/globe-2.json b/icons/earth.json similarity index 78% rename from icons/globe-2.json rename to icons/earth.json index bf2af7298..a97ab90d2 100644 --- a/icons/globe-2.json +++ b/icons/earth.json @@ -9,10 +9,14 @@ "world", "browser", "language", - "translate" + "translate", + "globe" ], "categories": [ "maps", "navigation" + ], + "aliases": [ + "globe-2" ] } diff --git a/icons/globe-2.svg b/icons/earth.svg similarity index 100% rename from icons/globe-2.svg rename to icons/earth.svg diff --git a/icons/globe-lock.json b/icons/globe-lock.json new file mode 100644 index 000000000..a83961715 --- /dev/null +++ b/icons/globe-lock.json @@ -0,0 +1,26 @@ +{ + "$schema": "../icon.schema.json", + "contributors": [ + "colebemis", + "csandman", + "ericfennis", + "karsa-mistmere" + ], + "tags": [ + "vpn", + "private", + "privacy", + "network", + "world", + "browser", + "security", + "encryption", + "protection", + "connection" + ], + "categories": [ + "security", + "development", + "devices" + ] +} diff --git a/icons/globe-lock.svg b/icons/globe-lock.svg new file mode 100644 index 000000000..55b729277 --- /dev/null +++ b/icons/globe-lock.svg @@ -0,0 +1,16 @@ + + + + + + From ab3a31367aa0aaac1d325c4d3db5037385323608 Mon Sep 17 00:00:00 2001 From: Eric Fennis Date: Tue, 27 Feb 2024 10:09:52 +0100 Subject: [PATCH 77/97] feat(site): adds virtual scrolling to icons grid and categories (#1911) * Add virtual scrolling icons page * improve scrolling * Small fixes in the routing * Cleanup * Fix routing issue * Remove log * Cleanup * Cleanup * Show search results in sidebar * Improve alphabetical list * Add whitespace * Extract logic into a composable and fix icon selection * Formatting --- .../theme/components/icons/CategoryList.vue | 15 ++- .../components/icons/CategoryListItem.vue | 42 +++--- .../theme/components/icons/IconGrid.vue | 3 +- .../theme/components/icons/IconsCategory.vue | 69 +++++----- .../icons/IconsCategoryOverview.vue | 118 +++++++++++++---- .../theme/components/icons/IconsOverview.vue | 125 +++++++++--------- .../theme/components/icons/NoResults.vue | 51 ++++--- .../theme/composables/useActiveAnchor.ts | 14 +- .../theme/composables/useCategoryView.ts | 19 ++- .../theme/composables/useScrollToCategory.ts | 52 ++++++++ .../.vitepress/theme/composables/useSearch.ts | 12 +- docs/.vitepress/theme/style.css | 4 + docs/.vitepress/theme/utils/chunkArray.ts | 9 ++ 13 files changed, 364 insertions(+), 169 deletions(-) create mode 100644 docs/.vitepress/theme/composables/useScrollToCategory.ts create mode 100644 docs/.vitepress/theme/utils/chunkArray.ts diff --git a/docs/.vitepress/theme/components/icons/CategoryList.vue b/docs/.vitepress/theme/components/icons/CategoryList.vue index 6e645ab5e..56dc570cf 100644 --- a/docs/.vitepress/theme/components/icons/CategoryList.vue +++ b/docs/.vitepress/theme/components/icons/CategoryList.vue @@ -1,13 +1,15 @@