diff --git a/.eslintignore b/.eslintignore index 925b234bd..ffae92223 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,6 +6,5 @@ tests node_modules .eslintrc.js docs/images -docs/guide/basics/examples -docs/guide/advanced/examples +docs/**/examples/ packages/lucide-react/dynamicIconImports.js diff --git a/.eslintrc.js b/.eslintrc.js index 049c95d76..6378b679d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,20 +7,12 @@ module.exports = { node: true, }, extends: ['airbnb-base', 'prettier'], - plugins: ['import', 'prettier', '@html-eslint'], + plugins: ['import', '@html-eslint'], rules: { 'no-console': 'off', 'no-param-reassign': 'off', 'no-shadow': 'off', 'no-use-before-define': 'off', - 'prettier/prettier': [ - 'error', - { - singleQuote: true, - trailingComma: 'all', - printWidth: 100 - }, - ], 'import/no-extraneous-dependencies': [ 'error', { devDependencies: ['**/*.test.js', '**/*.spec.js', './scripts/**'] }, @@ -46,17 +38,19 @@ module.exports = { files: ['./icons/*.svg'], parser: '@html-eslint/parser', rules: { - 'prettier/prettier': 'off', '@html-eslint/require-doctype': 'off', '@html-eslint/no-duplicate-attrs': 'error', '@html-eslint/no-inline-styles': 'error', '@html-eslint/require-attrs': [ - 'error', - ...Object.entries(DEFAULT_ATTRS) - .map(([attr, value]) => ({ tag: 'svg', attr, value: String(value) })) + 'error', + ...Object.entries(DEFAULT_ATTRS).map(([attr, value]) => ({ + tag: 'svg', + attr, + value: String(value), + })), ], '@html-eslint/indent': ['error', 2], - "@html-eslint/no-multiple-empty-lines": ["error", { "max": 0 }], + '@html-eslint/no-multiple-empty-lines': ['error', { max: 0 }], '@html-eslint/no-extra-spacing-attrs': [ 'error', { @@ -73,7 +67,7 @@ module.exports = { '@html-eslint/element-newline': 'error', '@html-eslint/no-trailing-spaces': 'error', '@html-eslint/quotes': 'error', - } + }, }, ], }; diff --git a/.github/actions/build-and-test.yml b/.github/actions/build-and-test.yml index 47c3293eb..5b5a4675f 100644 --- a/.github/actions/build-and-test.yml +++ b/.github/actions/build-and-test.yml @@ -1,5 +1,5 @@ -name: "Build and Test" -description: "Builds and test a package" +name: 'Build and Test' +description: 'Builds and test a package' inputs: name: @@ -7,7 +7,7 @@ inputs: required: true runs: - using: "composite" + using: 'composite' steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -18,7 +18,7 @@ runs: name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false - name: Get pnpm store directory diff --git a/.github/actions/check-icons.yml b/.github/actions/check-icons.yml index 369918355..0850a17ac 100644 --- a/.github/actions/check-icons.yml +++ b/.github/actions/check-icons.yml @@ -1,5 +1,5 @@ -name: "Check icons" -description: "Cross-checks icon and category references in JSON descriptors" +name: 'Check icons' +description: 'Cross-checks icon and category references in JSON descriptors' inputs: name: @@ -7,7 +7,7 @@ inputs: required: true runs: - using: "composite" + using: 'composite' steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -18,7 +18,7 @@ runs: name: Install pnpm id: pnpm-install with: - version: 7 + version: 8 run_install: false - name: Get pnpm store directory diff --git a/.github/labeler.yml b/.github/labeler.yml index 696122eff..2023caf3d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,92 +1,92 @@ # For changed dependencies ๐Ÿ“ฆ dependencies: -- changed-files: - - any-glob-to-any-file: - - pnpm-lock.yaml + - changed-files: + - any-glob-to-any-file: + - pnpm-lock.yaml # For changes in documentation ๐Ÿ“– documentation: -- changed-files: - - any-glob-to-any-file: - - docs/*.md - - docs/**/*.md + - changed-files: + - any-glob-to-any-file: + - docs/*.md + - docs/**/*.md # For changes in the site, but not markdown files ๐ŸŒ site: -- changed-files: - - any-glob-to-any-file: - - 'docs/**' + - changed-files: + - any-glob-to-any-file: + - 'docs/**' # For changes in the metadata ๐Ÿซง metadata: -- changed-files: - - any-glob-to-any-file: - - 'icons/*.json' - - categories/* + - changed-files: + - any-glob-to-any-file: + - 'icons/*.json' + - categories/* # For changes or added icons ๐ŸŽจ icon: -- changed-files: - - any-glob-to-any-file: - - 'icons/*.svg' + - changed-files: + - any-glob-to-any-file: + - 'icons/*.svg' # For changes in the lucide package ๐Ÿงณ lucide package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide/*' # For changes in the lucide React package โš›๏ธ react package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-react/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-react/*' # For changes in the lucide React Native package โš›๏ธ react native package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-react-native/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-react-native/*' # For changes in the lucide vue packages ๐Ÿ’Ž vue package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-vue/*' - - 'packages/lucide-vue-next/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-vue/*' + - 'packages/lucide-vue-next/*' # For changes in the lucide angular package ๐Ÿ…ฐ๏ธ angular package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-angular/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-angular/*' # For changes in the lucide preact package โš›๏ธ preact package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-preact/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-preact/*' # For changes in the lucide svelte package ๐Ÿงฃ svelte package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-svelte/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-svelte/*' # For changes in the lucide solid package ๐Ÿช solid package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-solid/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-solid/*' # For changes in the lucide static package ๐Ÿชจ static package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-static/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-static/*' # For changes in the lucide flutter package ๐Ÿน flutter package: -- changed-files: - - any-glob-to-any-file: - - 'packages/lucide-flutter/*' + - changed-files: + - any-glob-to-any-file: + - 'packages/lucide-flutter/*' diff --git a/.github/workflows/close-stale-prs.yml b/.github/workflows/close-stale-prs.yml index 5992c94ac..0b47315f4 100644 --- a/.github/workflows/close-stale-prs.yml +++ b/.github/workflows/close-stale-prs.yml @@ -1,11 +1,13 @@ name: Close stale issues and PR on: schedule: - - cron: "45 1 * * *" + - cron: '45 1 * * *' jobs: stale: runs-on: ubuntu-latest + permissions: + pull-requests: write steps: - uses: actions/stale@v9 with: @@ -14,5 +16,5 @@ 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-issue-stale: -1 + days-before-close: -1 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 2a340279e..bf474c478 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,6 +1,6 @@ -name: "Pull Request Labeler" +name: 'Pull Request Labeler' on: -- pull_request_target + - pull_request_target jobs: triage: @@ -9,4 +9,4 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v5 + - uses: actions/labeler@v5 diff --git a/.github/workflows/lucide-font.yml b/.github/workflows/lucide-font.yml index c12be90b6..5f183f813 100644 --- a/.github/workflows/lucide-font.yml +++ b/.github/workflows/lucide-font.yml @@ -29,7 +29,7 @@ jobs: - name: Create font in ./lucide-font run: pnpm build:font - - name: "Upload to Artifacts" + - name: 'Upload to Artifacts' uses: actions/upload-artifact@v3 with: name: lucide-font diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f74019305..bfefa436e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,17 +41,18 @@ jobs: strategy: fail-fast: false matrix: - package: [ - 'lucide', - 'lucide-react', - 'lucide-react-native', - 'lucide-vue', - 'lucide-vue-next', - 'lucide-angular', - 'lucide-preact', - 'lucide-solid', - 'lucide-svelte', - ] + package: + [ + 'lucide', + 'lucide-react', + 'lucide-react-native', + 'lucide-vue', + 'lucide-vue-next', + 'lucide-angular', + 'lucide-preact', + 'lucide-solid', + 'lucide-svelte', + ] steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 @@ -136,7 +137,7 @@ jobs: - name: Create font in ./lucide-font run: pnpm build:font - - name: "Upload to Artifacts" + - name: 'Upload to Artifacts' uses: actions/upload-artifact@v3 with: name: lucide-font @@ -145,10 +146,7 @@ jobs: post-release: if: github.repository == 'lucide-icons/lucide' runs-on: ubuntu-latest - needs: [ - pre-release, - lucide-font, - ] + needs: [pre-release, lucide-font] steps: - uses: actions/checkout@v4 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..4a40c2a72 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,19 @@ +pnpm-lock.yaml + +# docs examples +docs/**/examples/ + +# lucide-angular +packages/lucide-angular/.angular/cache + +# lucide-static +packages/lucide-static/icons +packages/lucide-static/lib +packages/lucide-static/sprite.svg +packages/lucide-static/tags.json +packages/lucide-static/icon-nodes.json +packages/lucide-static/font + +# lucide-svelte +packages/lucide-svelte/src/icons/*.svelte +packages/lucide-svelte/.svelte-kit diff --git a/.vscode/launch.json b/.vscode/launch.json index b23d58751..177bc7dfa 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,4 +12,4 @@ "webRoot": "${workspaceFolder}" } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 59e014f60..f179cbc07 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,6 @@ { - "cSpell.words": [ - "devs", - "preact", - "Preact" - ], + "cSpell.words": ["devs", "preact", "Preact"], "eslint.enable": true, - "eslint.validate": [ - "javascript", - "svg" - ], + "eslint.validate": ["javascript", "svg"], "svg.preview.background": "transparent" } diff --git a/.vscode/svg.code-snippets b/.vscode/svg.code-snippets index 3c491c3b8..52cbb23c1 100644 --- a/.vscode/svg.code-snippets +++ b/.vscode/svg.code-snippets @@ -49,7 +49,7 @@ "circle", "" + "body": "" }, "Ellipse": { "scope": "xml", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c85df7158..90d5a685d 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 @@ -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/categories/accessibility.json b/categories/accessibility.json index 95da8cf05..a668d3ee3 100644 --- a/categories/accessibility.json +++ b/categories/accessibility.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Accessibility", "icon": "accessibility" -} \ No newline at end of file +} diff --git a/categories/account.json b/categories/account.json index 284b764cb..95a80ad40 100644 --- a/categories/account.json +++ b/categories/account.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Accounts & access", "icon": "user" -} \ No newline at end of file +} diff --git a/categories/animals.json b/categories/animals.json index 251c93a81..85fafda5f 100644 --- a/categories/animals.json +++ b/categories/animals.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Animals", "icon": "dog" -} \ No newline at end of file +} diff --git a/categories/arrows.json b/categories/arrows.json index 5b84413b6..3258378f9 100644 --- a/categories/arrows.json +++ b/categories/arrows.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Arrows", "icon": "arrow-left-right" -} \ No newline at end of file +} diff --git a/categories/brands.json b/categories/brands.json index 5ff30efca..c48c4b3b0 100644 --- a/categories/brands.json +++ b/categories/brands.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Brands", "icon": "facebook" -} \ No newline at end of file +} diff --git a/categories/buildings.json b/categories/buildings.json index 71df7f6ea..13f24b08f 100644 --- a/categories/buildings.json +++ b/categories/buildings.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Buildings", "icon": "building" -} \ No newline at end of file +} diff --git a/categories/charts.json b/categories/charts.json index 6f94a14bd..22beb849e 100644 --- a/categories/charts.json +++ b/categories/charts.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Charts", "icon": "pie-chart" -} \ No newline at end of file +} diff --git a/categories/communication.json b/categories/communication.json index 7fd8bb175..3b9a899d7 100644 --- a/categories/communication.json +++ b/categories/communication.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Communication", "icon": "message-circle" -} \ No newline at end of file +} diff --git a/categories/connectivity.json b/categories/connectivity.json index 17b4c7bee..b566a84ec 100644 --- a/categories/connectivity.json +++ b/categories/connectivity.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Connectivity", "icon": "wifi" -} \ No newline at end of file +} diff --git a/categories/currency.json b/categories/currency.json index 31e2846fb..0879774d1 100644 --- a/categories/currency.json +++ b/categories/currency.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Currency", "icon": "dollar-sign" -} \ No newline at end of file +} diff --git a/categories/cursors.json b/categories/cursors.json index 16dddb96a..9522faa16 100644 --- a/categories/cursors.json +++ b/categories/cursors.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Cursors", "icon": "mouse-pointer-2" -} \ No newline at end of file +} diff --git a/categories/design.json b/categories/design.json index 312c2048d..e32592560 100644 --- a/categories/design.json +++ b/categories/design.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Design", "icon": "palette" -} \ No newline at end of file +} diff --git a/categories/devices.json b/categories/devices.json index cb2639fc3..3bb54f180 100644 --- a/categories/devices.json +++ b/categories/devices.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Devices", "icon": "smartphone" -} \ No newline at end of file +} diff --git a/categories/emoji.json b/categories/emoji.json index 14afb25ab..78442db1d 100644 --- a/categories/emoji.json +++ b/categories/emoji.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Emoji", "icon": "smile" -} \ No newline at end of file +} diff --git a/categories/files.json b/categories/files.json index 4d1fa3ad9..073a09beb 100644 --- a/categories/files.json +++ b/categories/files.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "File icons", "icon": "panels-top-left" -} \ No newline at end of file +} diff --git a/categories/food-beverage.json b/categories/food-beverage.json index 2b67eaeea..7456558b6 100644 --- a/categories/food-beverage.json +++ b/categories/food-beverage.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Food & beverage", "icon": "coffee" -} \ No newline at end of file +} diff --git a/categories/furniture.json b/categories/furniture.json index 27a03034a..56cf3fa30 100644 --- a/categories/furniture.json +++ b/categories/furniture.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Furniture", "icon": "rocking-chair" -} \ No newline at end of file +} diff --git a/categories/gaming.json b/categories/gaming.json index 9bf0a6daa..2c90f4c9d 100644 --- a/categories/gaming.json +++ b/categories/gaming.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Gaming", "icon": "gamepad-2" -} \ No newline at end of file +} diff --git a/categories/home.json b/categories/home.json index e11aae412..9a58d2171 100644 --- a/categories/home.json +++ b/categories/home.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Home", "icon": "home" -} \ No newline at end of file +} diff --git a/categories/layout.json b/categories/layout.json index 034ea4be9..22a163f95 100644 --- a/categories/layout.json +++ b/categories/layout.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Layout", "icon": "panels-top-left" -} \ No newline at end of file +} diff --git a/categories/mail.json b/categories/mail.json index 4ebda7c34..3dd1d3026 100644 --- a/categories/mail.json +++ b/categories/mail.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Mail", "icon": "mail" -} \ No newline at end of file +} diff --git a/categories/maps.json b/categories/maps.json index 4832c5f97..1a948f119 100644 --- a/categories/maps.json +++ b/categories/maps.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Maps", "icon": "map" -} \ No newline at end of file +} diff --git a/categories/maths.json b/categories/maths.json index f32aed6dc..f80691908 100644 --- a/categories/maths.json +++ b/categories/maths.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Maths", "icon": "divide" -} \ No newline at end of file +} diff --git a/categories/medical.json b/categories/medical.json index 05ee12324..e745df697 100644 --- a/categories/medical.json +++ b/categories/medical.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Medical", "icon": "heart" -} \ No newline at end of file +} diff --git a/categories/money.json b/categories/money.json index 2d9eadc55..fd706dee5 100644 --- a/categories/money.json +++ b/categories/money.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Money", "icon": "piggy-bank" -} \ No newline at end of file +} diff --git a/categories/multimedia.json b/categories/multimedia.json index 2c523a712..c49f823e3 100644 --- a/categories/multimedia.json +++ b/categories/multimedia.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Multimedia", "icon": "play-circle" -} \ No newline at end of file +} diff --git a/categories/nature.json b/categories/nature.json index 836f45f08..aa41fd8dd 100644 --- a/categories/nature.json +++ b/categories/nature.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Nature", "icon": "sprout" -} \ No newline at end of file +} diff --git a/categories/navigation.json b/categories/navigation.json index 78f0cc7f2..0cb9e209d 100644 --- a/categories/navigation.json +++ b/categories/navigation.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Navigation", "icon": "compass" -} \ No newline at end of file +} diff --git a/categories/notifications.json b/categories/notifications.json index be39626c7..5986b507e 100644 --- a/categories/notifications.json +++ b/categories/notifications.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Notifications", "icon": "alert-triangle" -} \ No newline at end of file +} diff --git a/categories/people.json b/categories/people.json index 15dc4c8ae..be028e4b5 100644 --- a/categories/people.json +++ b/categories/people.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "People", "icon": "person-standing" -} \ No newline at end of file +} diff --git a/categories/photography.json b/categories/photography.json index 4d3ffe3b3..a4ad5bff1 100644 --- a/categories/photography.json +++ b/categories/photography.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Photography", "icon": "camera" -} \ No newline at end of file +} diff --git a/categories/science.json b/categories/science.json index 889b7c206..720983fb3 100644 --- a/categories/science.json +++ b/categories/science.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Science", "icon": "flask-conical" -} \ No newline at end of file +} diff --git a/categories/seasons.json b/categories/seasons.json index 3a2a7a1e0..0c4fff3cc 100644 --- a/categories/seasons.json +++ b/categories/seasons.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Seasons", "icon": "leaf" -} \ No newline at end of file +} diff --git a/categories/security.json b/categories/security.json index 00371462b..8372554fe 100644 --- a/categories/security.json +++ b/categories/security.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Security", "icon": "shield" -} \ No newline at end of file +} diff --git a/categories/shapes.json b/categories/shapes.json index ed4434f8e..c968b222b 100644 --- a/categories/shapes.json +++ b/categories/shapes.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Shapes", "icon": "triangle" -} \ No newline at end of file +} diff --git a/categories/shopping.json b/categories/shopping.json index b224f2312..5e6b05ff5 100644 --- a/categories/shopping.json +++ b/categories/shopping.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Shopping", "icon": "shopping-bag" -} \ No newline at end of file +} diff --git a/categories/social.json b/categories/social.json index 4c8fee7f8..ee87f8574 100644 --- a/categories/social.json +++ b/categories/social.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Social", "icon": "thumbs-up" -} \ No newline at end of file +} diff --git a/categories/sports.json b/categories/sports.json index 7c3cb0135..25440ad6f 100644 --- a/categories/sports.json +++ b/categories/sports.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Sports", "icon": "type" -} \ No newline at end of file +} diff --git a/categories/sustainability.json b/categories/sustainability.json index 1c22a5e85..a0730f6fa 100644 --- a/categories/sustainability.json +++ b/categories/sustainability.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Sustainability", "icon": "recycle" -} \ No newline at end of file +} diff --git a/categories/time.json b/categories/time.json index 75f119816..2b85210de 100644 --- a/categories/time.json +++ b/categories/time.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Time & calendar", "icon": "calendar" -} \ No newline at end of file +} diff --git a/categories/tools.json b/categories/tools.json index 456213ad5..48cf0a96a 100644 --- a/categories/tools.json +++ b/categories/tools.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Tools", "icon": "hammer" -} \ No newline at end of file +} diff --git a/categories/transportation.json b/categories/transportation.json index 0515475d3..984da071c 100644 --- a/categories/transportation.json +++ b/categories/transportation.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Transportation", "icon": "train-front" -} \ No newline at end of file +} diff --git a/categories/travel.json b/categories/travel.json index a85cd27c4..3d78c06e3 100644 --- a/categories/travel.json +++ b/categories/travel.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Travel", "icon": "backpack" -} \ No newline at end of file +} diff --git a/categories/weather.json b/categories/weather.json index faa956239..a08cc5d66 100644 --- a/categories/weather.json +++ b/categories/weather.json @@ -2,4 +2,4 @@ "$schema": "../category.schema.json", "title": "Weather", "icon": "cloud-sun" -} \ No newline at end of file +} diff --git a/docs/.vitepress/api/categories/index.get.ts b/docs/.vitepress/api/categories/index.get.ts index a1fb097ca..0ac20a3e5 100644 --- a/docs/.vitepress/api/categories/index.get.ts +++ b/docs/.vitepress/api/categories/index.get.ts @@ -1,11 +1,11 @@ -import { eventHandler, setResponseHeader } from 'h3' -import iconMetaData from '../../data/iconMetaData' +import { eventHandler, setResponseHeader } from 'h3'; +import iconMetaData from '../../data/iconMetaData'; export default eventHandler((event) => { - setResponseHeader(event, 'Cache-Control', 'public, max-age=86400') - setResponseHeader(event, 'Access-Control-Allow-Origin', '*') + setResponseHeader(event, 'Cache-Control', 'public, max-age=86400'); + setResponseHeader(event, 'Access-Control-Allow-Origin', '*'); return Object.fromEntries( - Object.entries(iconMetaData).map(([name, { categories }]) => [ name, categories ]) - ) -}) + Object.entries(iconMetaData).map(([name, { categories }]) => [name, categories]), + ); +}); diff --git a/docs/.vitepress/api/gh-icon/[...data].get.ts b/docs/.vitepress/api/gh-icon/[...data].get.ts index eacfb498f..204b132b6 100644 --- a/docs/.vitepress/api/gh-icon/[...data].get.ts +++ b/docs/.vitepress/api/gh-icon/[...data].get.ts @@ -37,13 +37,13 @@ export default eventHandler((event) => { backdropString, src, color: name in iconNodes ? 'red' : '#777', - }) + }), ); } const svg = Buffer.from( // We can't use jsx here, is not supported here by nitro. - renderToString(createElement(SvgPreview, { src, showGrid: true }, children)) + renderToString(createElement(SvgPreview, { src, showGrid: true }, children)), ).toString('utf8'); defaultContentType(event, 'image/svg+xml'); diff --git a/docs/.vitepress/api/gh-icon/dpi/[...data].get.ts b/docs/.vitepress/api/gh-icon/dpi/[...data].get.ts index a09fcb2af..2e5d4ebe4 100644 --- a/docs/.vitepress/api/gh-icon/dpi/[...data].get.ts +++ b/docs/.vitepress/api/gh-icon/dpi/[...data].get.ts @@ -28,7 +28,7 @@ export default eventHandler(async (event) => { stroke-width="2" stroke-linecap="round" stroke-linejoin="round" -` +`, ); const resvg = new Resvg(svg, { background: '#000' }); diff --git a/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.ts b/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.ts index 1354b1ae4..db029f643 100644 --- a/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.ts +++ b/docs/.vitepress/api/gh-icon/stroke-width/[...data].get.ts @@ -1,12 +1,12 @@ -import { eventHandler, setResponseHeader, defaultContentType } from 'h3' -import { renderToString } from 'react-dom/server' -import { createElement } from 'react' +import { eventHandler, setResponseHeader, defaultContentType } from 'h3'; +import { renderToString } from 'react-dom/server'; +import { createElement } from 'react'; import SvgPreview from '../../../lib/SvgPreview/index.tsx'; -import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon' +import createLucideIcon, { IconNode } from 'lucide-react/src/createLucideIcon'; import { parseSync } from 'svgson'; export default eventHandler((event) => { - const { params } = event.context + const { params } = event.context; const [strokeWidth, svgData] = params.data.split('/'); const data = svgData.slice(0, -4); @@ -16,8 +16,8 @@ export default eventHandler((event) => { const Icon = createLucideIcon( 'icon', parseSync(src.includes('${src}`).children.map( - ({ name, attributes }) => [name, attributes] - ) as IconNode + ({ name, attributes }) => [name, attributes], + ) as IconNode, ); const svg = Buffer.from( @@ -33,12 +33,12 @@ export default eventHandler((event) => { @media screen and (prefers-color-scheme: dark) { svg { stroke: #fff; fill: transparent !important; } } - ` - ) + `, + ), ).toString('utf8'); - defaultContentType(event, 'image/svg+xml') - setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000') + defaultContentType(event, 'image/svg+xml'); + setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000'); - return svg -}) + return svg; +}); diff --git a/docs/.vitepress/api/icon-nodes/index.get.ts b/docs/.vitepress/api/icon-nodes/index.get.ts index a8623661c..8ab634c78 100644 --- a/docs/.vitepress/api/icon-nodes/index.get.ts +++ b/docs/.vitepress/api/icon-nodes/index.get.ts @@ -1,30 +1,30 @@ -import { eventHandler, getQuery, setResponseHeader } from 'h3' -import iconNodes from '../../data/iconNodes' -import { IconNodeWithKeys } from '../../theme/types' +import { eventHandler, getQuery, setResponseHeader } from 'h3'; +import iconNodes from '../../data/iconNodes'; +import { IconNodeWithKeys } from '../../theme/types'; export default eventHandler((event) => { - const query = getQuery(event) + const query = getQuery(event); - const withUniqueKeys = query.withUniqueKeys === 'true' + const withUniqueKeys = query.withUniqueKeys === 'true'; - setResponseHeader(event, 'Cache-Control', 'public, max-age=86400') - setResponseHeader(event, 'Access-Control-Allow-Origin', '*') + setResponseHeader(event, 'Cache-Control', 'public, max-age=86400'); + setResponseHeader(event, 'Access-Control-Allow-Origin', '*'); if (withUniqueKeys) { - return iconNodes + return iconNodes; } return Object.entries(iconNodes).reduce((acc, [name, iconNode]) => { if (withUniqueKeys) { - return [name, iconNode] + return [name, iconNode]; } - const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs}]) => { - return [name, attrs] - }) + const newIconNode = (iconNode as IconNodeWithKeys).map(([name, { key, ...attrs }]) => { + return [name, attrs]; + }); - acc[name] = newIconNode + acc[name] = newIconNode; - return acc - }, {}) -}) + return acc; + }, {}); +}); diff --git a/docs/.vitepress/api/icons/[iconName].get.ts b/docs/.vitepress/api/icons/[iconName].get.ts index 50fa8107a..e2d2091bb 100644 --- a/docs/.vitepress/api/icons/[iconName].get.ts +++ b/docs/.vitepress/api/icons/[iconName].get.ts @@ -1,29 +1,29 @@ -import { eventHandler, getQuery, setResponseHeader, createError } from 'h3' -import iconNodes from '../../data/iconNodes' -import createLucideIcon from 'lucide-react/src/createLucideIcon' -import { renderToString } from 'react-dom/server' -import { createElement } from 'react' +import { eventHandler, getQuery, setResponseHeader, createError } from 'h3'; +import iconNodes from '../../data/iconNodes'; +import createLucideIcon from 'lucide-react/src/createLucideIcon'; +import { renderToString } from 'react-dom/server'; +import { createElement } from 'react'; export default eventHandler((event) => { - const { params } = event.context + const { params } = event.context; - const iconNode = iconNodes[params.iconName] + const iconNode = iconNodes[params.iconName]; if (iconNode == null) { const error = createError({ statusCode: 404, message: `Icon "${params.iconName}" not found`, - }) + }); - return sendError(event, error) + return sendError(event, error); } - const width = getQuery(event).width || undefined - const height = getQuery(event).height || undefined - const color = getQuery(event).color || undefined - const strokeWidth = getQuery(event).strokeWidth || undefined + const width = getQuery(event).width || undefined; + const height = getQuery(event).height || undefined; + const color = getQuery(event).color || undefined; + const strokeWidth = getQuery(event).strokeWidth || undefined; - const LucideIcon = createLucideIcon(params.iconName, iconNode) + const LucideIcon = createLucideIcon(params.iconName, iconNode); const svg = Buffer.from( renderToString( @@ -32,14 +32,13 @@ export default eventHandler((event) => { height, color: color ? `#${color}` : undefined, strokeWidth, - } - )) + }), + ), ).toString('utf8'); - defaultContentType(event, 'image/svg+xml') - setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000') - setResponseHeader(event, 'Access-Control-Allow-Origin', '*') + defaultContentType(event, 'image/svg+xml'); + setResponseHeader(event, 'Cache-Control', 'public,max-age=31536000'); + setResponseHeader(event, 'Access-Control-Allow-Origin', '*'); - return svg - -}) + return svg; +}); diff --git a/docs/.vitepress/api/tags/index.get.ts b/docs/.vitepress/api/tags/index.get.ts index ab3c94ca5..b2314c4f4 100644 --- a/docs/.vitepress/api/tags/index.get.ts +++ b/docs/.vitepress/api/tags/index.get.ts @@ -1,11 +1,9 @@ -import { eventHandler, setResponseHeader } from 'h3' -import iconMetaData from '../../data/iconMetaData' +import { eventHandler, setResponseHeader } from 'h3'; +import iconMetaData from '../../data/iconMetaData'; export default eventHandler((event) => { - setResponseHeader(event, 'Cache-Control', 'public, max-age=86400') - setResponseHeader(event, 'Access-Control-Allow-Origin', '*') + setResponseHeader(event, 'Cache-Control', 'public, max-age=86400'); + setResponseHeader(event, 'Access-Control-Allow-Origin', '*'); - return Object.fromEntries( - Object.entries(iconMetaData).map(([name, { tags }]) => [ name, tags ]) - ) -}) + return Object.fromEntries(Object.entries(iconMetaData).map(([name, { tags }]) => [name, tags])); +}); diff --git a/docs/.vitepress/api/test.ts b/docs/.vitepress/api/test.ts index ebd7b8801..a3f2b67f3 100644 --- a/docs/.vitepress/api/test.ts +++ b/docs/.vitepress/api/test.ts @@ -1,3 +1,3 @@ export default eventHandler(() => { - return { nitro: 'Is Awesome! asda' } -}) + return { nitro: 'Is Awesome! asda' }; +}); diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 173ed778b..17023ef93 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,10 +1,10 @@ -import { fileURLToPath, URL } from 'node:url' -import { defineConfig } from 'vitepress' +import { fileURLToPath, URL } from 'node:url'; +import { defineConfig } from 'vitepress'; import sidebar from './sidebar'; -const title = "Lucide"; -const socialTitle = "Lucide Icons"; -const description = "Beautiful & consistent icon toolkit made by the community." +const title = 'Lucide'; +const socialTitle = 'Lucide Icons'; +const description = 'Beautiful & consistent icon toolkit made by the community.'; // https://vitepress.dev/reference/site-config export default defineConfig({ @@ -19,86 +19,131 @@ export default defineConfig({ { find: /^.*\/VPIconAlignLeft\.vue$/, replacement: fileURLToPath( - new URL('./theme/components/overrides/VPIconAlignLeft.vue', import.meta.url) - ) + new URL('./theme/components/overrides/VPIconAlignLeft.vue', import.meta.url), + ), }, { find: /^.*\/VPFooter\.vue$/, replacement: fileURLToPath( - new URL('./theme/components/overrides/VPFooter.vue', import.meta.url) - ) - } - ] + new URL('./theme/components/overrides/VPFooter.vue', import.meta.url), + ), + }, + ], }, }, head: [ - [ 'script', { - src: 'https://analytics.lucide.dev/js/script.js', - 'data-domain': 'lucide.dev', - defer: '' - }], - [ 'meta', { - property:"og:locale", - content:"en_US" - }], - [ 'meta', { - property:"og:type", - content:"website" - }], - [ 'meta', { - property:"og:site_name", - content: title, - }], - [ 'meta', { - property:"og:title", - content: socialTitle, - }], - [ 'meta', { - property:"og:description", - content: description - }], - [ 'meta', { - property:"og:url", - content:"https://lucide.dev" - }], - [ 'meta', { - property:"og:image", - content: "https://lucide.dev/og.png" - }], - [ 'meta', { - property:"og:image:width", - content:"1200" - }], - [ 'meta', { - property:"og:image:height", - content:"630" - }], - [ 'meta', { - property:"og:image:type", - content:"image/png" - }], - [ 'meta', { - property:"twitter:card", - content:"summary_large_image" - }], - [ 'meta', { - property:"twitter:title", - content: socialTitle, - }], - [ 'meta', { - property:"twitter:description", - content: description - }], - [ 'meta', { - property:"twitter:image", - content:"https://lucide.dev/og.png" - }], + [ + 'script', + { + src: 'https://analytics.lucide.dev/js/script.js', + 'data-domain': 'lucide.dev', + defer: '', + }, + ], + [ + 'meta', + { + property: 'og:locale', + content: 'en_US', + }, + ], + [ + 'meta', + { + property: 'og:type', + content: 'website', + }, + ], + [ + 'meta', + { + property: 'og:site_name', + content: title, + }, + ], + [ + 'meta', + { + property: 'og:title', + content: socialTitle, + }, + ], + [ + 'meta', + { + property: 'og:description', + content: description, + }, + ], + [ + 'meta', + { + property: 'og:url', + content: 'https://lucide.dev', + }, + ], + [ + 'meta', + { + property: 'og:image', + content: 'https://lucide.dev/og.png', + }, + ], + [ + 'meta', + { + property: 'og:image:width', + content: '1200', + }, + ], + [ + 'meta', + { + property: 'og:image:height', + content: '630', + }, + ], + [ + 'meta', + { + property: 'og:image:type', + content: 'image/png', + }, + ], + [ + 'meta', + { + property: 'twitter:card', + content: 'summary_large_image', + }, + ], + [ + 'meta', + { + property: 'twitter:title', + content: socialTitle, + }, + ], + [ + 'meta', + { + property: 'twitter:description', + content: description, + }, + ], + [ + 'meta', + { + property: 'twitter:image', + content: 'https://lucide.dev/og.png', + }, + ], ], themeConfig: { // https://vitepress.dev/reference/default-theme-config logo: { light: '/logo.light.svg', - dark: '/logo.dark.svg' + dark: '/logo.dark.svg', }, nav: [ { text: 'Icons', link: '/icons/' }, @@ -110,21 +155,21 @@ export default defineConfig({ sidebar, socialLinks: [ { icon: 'github', link: 'https://github.com/lucide-icons/lucide' }, - { icon: 'discord', link: 'https://discord.gg/EH6nSts' } + { icon: 'discord', link: 'https://discord.gg/EH6nSts' }, ], footer: { message: 'Released under the ISC License.', - copyright: `Copyright ยฉ ${new Date().getFullYear()} Lucide Contributors` + copyright: `Copyright ยฉ ${new Date().getFullYear()} Lucide Contributors`, }, editLink: { - pattern: 'https://github.com/lucide-icons/lucide/edit/main/docs/:path' + pattern: 'https://github.com/lucide-icons/lucide/edit/main/docs/:path', }, carbonAds: { code: 'CWYIC53U', - placement: 'lucidedev' - } + placement: 'lucidedev', + }, }, sitemap: { - hostname: 'https://lucide.dev/' - } -}) + hostname: 'https://lucide.dev/', + }, +}); diff --git a/docs/.vitepress/data/packageData.json b/docs/.vitepress/data/packageData.json index e15de0eee..2e9bc22e9 100644 --- a/docs/.vitepress/data/packageData.json +++ b/docs/.vitepress/data/packageData.json @@ -3,87 +3,171 @@ "order": 0, "icon": "js", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide", "href": "https://www.npmjs.com/package/lucide" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide", "href": "https://www.npmjs.com/package/lucide" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide", + "href": "https://www.npmjs.com/package/lucide" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide", + "href": "https://www.npmjs.com/package/lucide" + } ] }, "lucide-react": { "order": 1, "icon": "react", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-react", "href": "https://www.npmjs.com/package/lucide-react" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-react", "href": "https://www.npmjs.com/package/lucide-react" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-react", + "href": "https://www.npmjs.com/package/lucide-react" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-react", + "href": "https://www.npmjs.com/package/lucide-react" + } ] }, "lucide-vue": { "order": 2, "icon": "vue", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-vue", "href": "https://www.npmjs.com/package/lucide-vue" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-vue", "href": "https://www.npmjs.com/package/lucide-vue" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-vue", + "href": "https://www.npmjs.com/package/lucide-vue" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-vue", + "href": "https://www.npmjs.com/package/lucide-vue" + } ] }, "lucide-vue-next": { "order": 3, "icon": "vue-next", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-vue-next", "href": "https://www.npmjs.com/package/lucide-vue-next" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-vue-next", "href": "https://www.npmjs.com/package/lucide-vue-next" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-vue-next", + "href": "https://www.npmjs.com/package/lucide-vue-next" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-vue-next", + "href": "https://www.npmjs.com/package/lucide-vue-next" + } ] }, "lucide-svelte": { "order": 4, "icon": "svelte", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-svelte", "href": "https://www.npmjs.com/package/lucide-svelte" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-svelte", "href": "https://www.npmjs.com/package/lucide-svelte" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-svelte", + "href": "https://www.npmjs.com/package/lucide-svelte" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-svelte", + "href": "https://www.npmjs.com/package/lucide-svelte" + } ] }, "lucide-solid": { "order": 4, "icon": "solid", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-solid", "href": "https://www.npmjs.com/package/lucide-solid" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-solid", "href": "https://www.npmjs.com/package/lucide-solid" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-solid", + "href": "https://www.npmjs.com/package/lucide-solid" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-solid", + "href": "https://www.npmjs.com/package/lucide-solid" + } ] }, "lucide-preact": { "order": 5, "icon": "preact", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-preact", "href": "https://www.npmjs.com/package/lucide-preact" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-preact", "href": "https://www.npmjs.com/package/lucide-preact" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-preact", + "href": "https://www.npmjs.com/package/lucide-preact" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-preact", + "href": "https://www.npmjs.com/package/lucide-preact" + } ] }, "lucide-react-native": { "order": 6, "icon": "react-native", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-react-native", "href": "https://www.npmjs.com/package/lucide-react-native" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-react-native", "href": "https://www.npmjs.com/package/lucide-react-native" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-react-native", + "href": "https://www.npmjs.com/package/lucide-react-native" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-react-native", + "href": "https://www.npmjs.com/package/lucide-react-native" + } ] }, "lucide-angular": { "order": 7, "icon": "angular", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-angular", "href": "https://www.npmjs.com/package/lucide-angular" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-angular", "href": "https://www.npmjs.com/package/lucide-angular" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-angular", + "href": "https://www.npmjs.com/package/lucide-angular" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-angular", + "href": "https://www.npmjs.com/package/lucide-angular" + } ] }, "lucide-static": { "order": 8, "icon": "svg", "shields": [ - { "alt": "npm", "src": "https://img.shields.io/npm/v/lucide-static", "href": "https://www.npmjs.com/package/lucide-static" }, - { "alt": "npm", "src": "https://img.shields.io/npm/dw/lucide-static", "href": "https://www.npmjs.com/package/lucide-static" } + { + "alt": "npm", + "src": "https://img.shields.io/npm/v/lucide-static", + "href": "https://www.npmjs.com/package/lucide-static" + }, + { + "alt": "npm", + "src": "https://img.shields.io/npm/dw/lucide-static", + "href": "https://www.npmjs.com/package/lucide-static" + } ] }, "lucide-flutter": { "order": 9, "icon": "flutter", "shields": [ - { "alt": "flutter", "src": "https://img.shields.io/pub/v/lucide_icons", "href": "https://img.shields.io/pub/v/lucide_icons" } + { + "alt": "flutter", + "src": "https://img.shields.io/pub/v/lucide_icons", + "href": "https://img.shields.io/pub/v/lucide_icons" + } ] } } diff --git a/docs/.vitepress/lib/SvgPreview/Backdrop.tsx b/docs/.vitepress/lib/SvgPreview/Backdrop.tsx index be9362523..4fa9b9b13 100644 --- a/docs/.vitepress/lib/SvgPreview/Backdrop.tsx +++ b/docs/.vitepress/lib/SvgPreview/Backdrop.tsx @@ -17,21 +17,62 @@ const Backdrop = ({ src, color = 'red', backdropString }: BackdropProps): JSX.El patternUnits="userSpaceOnUse" patternTransform="rotate(45 50 50)" > - - + + - - - + + + - - - - + + + + - - + + ) => ( - + [ + .map((_, i) => i) + .filter((i) => i % 3 !== 2) + .flatMap((i) => [ + `M${props.strokeWidth} ${i + 1}h${24 - props.strokeWidth * 2}`, + `M${i + 1} ${props.strokeWidth}v${24 - props.strokeWidth * 2}`, + ]) + .join('') + } + /> + i) + .filter((i) => i % 3 === 2) + .flatMap((i) => [ `M${props.strokeWidth} ${i + 1}h${24 - props.strokeWidth * 2}`, `M${i + 1} ${props.strokeWidth}v${24 - props.strokeWidth * 2}`, ]) @@ -44,15 +66,21 @@ const Shadow = ({ paths: Path[]; } & PathProps<'stroke' | 'strokeWidth' | 'strokeOpacity', 'd'>) => { const groupedPaths = Object.entries( - paths.reduce((groups, val) => { - const key = val.c.id; - groups[key] = [...(groups[key] || []), val]; - return groups; - }, {} as Record) + paths.reduce( + (groups, val) => { + const key = val.c.id; + groups[key] = [...(groups[key] || []), val]; + return groups; + }, + {} as Record, + ), ); return ( <> - + {groupedPaths.map(([id, paths]) => ( - + [ @@ -74,9 +110,16 @@ const Shadow = ({ ))} - + {paths.map(({ d, c: { id } }, i) => ( - + ))} ) => ( - + {paths.map(({ d, c }, i) => ( - + ))} ); @@ -138,7 +188,15 @@ const ControlPath = ({ key={i} maskUnits="userSpaceOnUse" > - + @@ -146,7 +204,10 @@ const ControlPath = ({ ); })} - + {controlPaths.map(({ d, showMarker }, i) => ( ))} - + - showMarker ? [`M${prev.x} ${prev.y}h.01`, `M${next.x} ${next.y}h.01`] : [] + showMarker ? [`M${prev.x} ${prev.y}h.01`, `M${next.x} ${next.y}h.01`] : [], ) .join('')} /> {controlPaths.map(({ d, prev, next, startMarker, endMarker }, i) => ( - {startMarker && } - {endMarker && } + {startMarker && ( + + )} + {endMarker && ( + + )} ))} @@ -182,15 +258,16 @@ const Radii = ({ any >) => { return ( - + {paths.map( ({ c, prev, next, circle }, i) => circle && ( - {c.name !== "circle" && ( - + {c.name !== 'circle' && ( + )} @@ -208,11 +285,7 @@ const Radii = ({ cy={circle.y} cx={circle.x} r={circle.r} - stroke={ - (Math.round(circle.r * 1000) / 1000) % 1 !== 0 - ? "red" - : undefined - } + stroke={(Math.round(circle.r * 1000) / 1000) % 1 !== 0 ? 'red' : undefined} /> ), @@ -230,13 +303,28 @@ const Handles = ({ >) => { console.log(paths); return ( - + {paths.map(({ c, prev, next, cp1, cp2 }) => ( <> {cp1 && } - {cp1 && } + {cp1 && ( + + )} {cp2 && } - {cp2 && } + {cp2 && ( + + )} ))} @@ -280,9 +368,27 @@ const SvgPreview = React.forwardRef< {...props} > - {showGrid && } - - + {showGrid && ( + + )} + + - - + + {children} ); diff --git a/docs/.vitepress/lib/SvgPreview/types.ts b/docs/.vitepress/lib/SvgPreview/types.ts index b36df0ca6..8c1b8f4ed 100644 --- a/docs/.vitepress/lib/SvgPreview/types.ts +++ b/docs/.vitepress/lib/SvgPreview/types.ts @@ -16,7 +16,7 @@ export type Path = { export type PathProps< RequiredProps extends keyof SVGProps, - NeverProps extends keyof SVGProps + NeverProps extends keyof SVGProps, > = Required, RequiredProps>> & Omit< React.SVGProps, diff --git a/docs/.vitepress/lib/SvgPreview/utils.ts b/docs/.vitepress/lib/SvgPreview/utils.ts index 2a9974a91..9dfb1a6f7 100644 --- a/docs/.vitepress/lib/SvgPreview/utils.ts +++ b/docs/.vitepress/lib/SvgPreview/utils.ts @@ -51,7 +51,7 @@ export const getCommands = (src: string) => getNodes(src) .map(convertToPathNode) .flatMap(({ d, name }, idx) => - new SVGPathData(d).toAbs().commands.map((c, cIdx) => ({ ...c, id: idx, idx: cIdx, name })) + new SVGPathData(d).toAbs().commands.map((c, cIdx) => ({ ...c, id: idx, idx: cIdx, name })), ); export const getPaths = (src: string) => { @@ -60,10 +60,10 @@ export const getPaths = (src: string) => { let prev: Point | undefined = undefined; let start: Point | undefined = undefined; const addPath = ( - c: typeof commands[number], + c: (typeof commands)[number], next: Point, d?: string, - extras?: { circle?: Path['circle']; cp1?: Path['cp1']; cp2?: Path['cp2'] } + extras?: { circle?: Path['circle']; cp1?: Path['cp1']; cp2?: Path['cp2'] }, ) => { assert(prev); paths.push({ @@ -153,7 +153,7 @@ export const getPaths = (src: string) => { { cp1: { x: prev.x - reflectedCp1.x, y: prev.y - reflectedCp1.y }, cp2: { x: c.x2, y: c.y2 }, - } + }, ); break; } @@ -169,7 +169,7 @@ export const getPaths = (src: string) => { assert(prev); const backTrackCP = ( index: number, - currentPoint: { x: number; y: number } + currentPoint: { x: number; y: number }, ): { x: number; y: number } => { const previousCommand = commands[index - 1]; if (!previousCommand) { @@ -211,7 +211,7 @@ export const getPaths = (src: string) => { { cp1: { x: prevCP.x, y: prevCP.y }, cp2: { x: prevCP.x, y: prevCP.y }, - } + }, ); break; } @@ -226,13 +226,13 @@ export const getPaths = (src: string) => { c.lArcFlag, c.sweepFlag, c.x, - c.y + c.y, ); addPath( c, c, `M ${prev.x} ${prev.y} A${c.rX} ${c.rY} ${c.xRot} ${c.lArcFlag} ${c.sweepFlag} ${c.x} ${c.y}`, - { circle: c.rX === c.rY ? { ...center, r: c.rX } : undefined } + { circle: c.rX === c.rY ? { ...center, r: c.rX } : undefined }, ); break; } @@ -253,7 +253,7 @@ export const arcEllipseCenter = ( fa: number, fs: number, x2: number, - y2: number + y2: number, ) => { const phi = (a * Math.PI) / 180; @@ -280,7 +280,7 @@ export const arcEllipseCenter = ( sign * Math.sqrt( Math.max(rx * rx * ry * ry - rx * rx * y1p * y1p - ry * ry * x1p * x1p, 0) / - (rx * rx * y1p * y1p + ry * ry * x1p * x1p) + (rx * rx * y1p * y1p + ry * ry * x1p * x1p), ); const V2 = [(rx * y1p) / ry, (-ry * x1p) / rx]; diff --git a/docs/.vitepress/lib/categories.ts b/docs/.vitepress/lib/categories.ts index 2e14bbe71..dfc0268b6 100644 --- a/docs/.vitepress/lib/categories.ts +++ b/docs/.vitepress/lib/categories.ts @@ -1,28 +1,34 @@ -import fs from "fs"; -import path from "path"; -import {Category, IconEntity} from "../theme/types"; +import fs from 'fs'; +import path from 'path'; +import { Category, IconEntity } from '../theme/types'; -const directory = path.join(process.cwd(), "../categories"); +const directory = path.join(process.cwd(), '../categories'); export function getAllCategoryFiles(): Category[] { const fileNames = fs.readdirSync(directory).filter((file) => path.extname(file) === '.json'); return fileNames.map((fileName) => { - const name = path.basename(fileName, '.json') - const fileContent = fs.readFileSync(path.join(directory, fileName), 'utf8') + const name = path.basename(fileName, '.json'); + const fileContent = fs.readFileSync(path.join(directory, fileName), 'utf8'); - const parsedFileContent = JSON.parse(fileContent) + const parsedFileContent = JSON.parse(fileContent); return { name, title: parsedFileContent.title, - } + }; }); } -export function mapCategoryIconCount(categories: Category[], icons: { categories: IconEntity['categories'] }[]) { +export function mapCategoryIconCount( + categories: Category[], + icons: { categories: IconEntity['categories'] }[], +) { return categories.map((category) => ({ ...category, - iconCount: icons.reduce((acc, curr) => (curr.categories.includes(category.name) ? ++acc : acc), 0) - })) + iconCount: icons.reduce( + (acc, curr) => (curr.categories.includes(category.name) ? ++acc : acc), + 0, + ), + })); } diff --git a/docs/.vitepress/lib/createCodeExamples.ts b/docs/.vitepress/lib/createCodeExamples.ts index 41c75551c..ee9e4bd4f 100644 --- a/docs/.vitepress/lib/createCodeExamples.ts +++ b/docs/.vitepress/lib/createCodeExamples.ts @@ -1,24 +1,18 @@ -import { - bundledLanguages, - type ThemeRegistration -} from 'shikiji' -import { - getHighlighter, -} from 'shikiji' - +import { bundledLanguages, type ThemeRegistration } from 'shikiji'; +import { getHighlighter } from 'shikiji'; type CodeExampleType = { - title: string, - language: string, - code: string, -}[] + title: string; + language: string; + code: string; +}[]; const getIconCodes = (): CodeExampleType => { return [ { language: 'html', title: 'HTML', - code: `` + code: ``, }, { language: 'tsx', @@ -109,36 +103,37 @@ import { LucideAngularModule, PascalCase } from 'lucide-angular';
`, - } - ] -} + }, + ]; +}; export type ThemeOptions = | ThemeRegistration - | { light: ThemeRegistration; dark: ThemeRegistration } + | { light: ThemeRegistration; dark: ThemeRegistration }; const highLightCode = async (code: string, lang: string, active?: boolean) => { const highlighter = await getHighlighter({ themes: ['github-light', 'github-dark'], - langs: Object.keys(bundledLanguages) - }) + langs: Object.keys(bundledLanguages), + }); - const highlightedCode = highlighter.codeToHtml(code, { - lang, - themes: { - light: 'github-light', - dark: 'github-dark' - }, - defaultColor: false - }).replace('shiki-themes', 'shiki-themes vp-code') + const highlightedCode = highlighter + .codeToHtml(code, { + lang, + themes: { + light: 'github-light', + dark: 'github-dark', + }, + defaultColor: false, + }) + .replace('shiki-themes', 'shiki-themes vp-code'); return `
${lang} ${highlightedCode} -
` -} - + `; +}; export default async function createCodeExamples() { const codes = getIconCodes(); @@ -153,7 +148,7 @@ export default async function createCodeExamples() { language: language, code: codeString, }; - }) + }); return Promise.all(codeExamplePromises); } diff --git a/docs/.vitepress/lib/fetchPackages.ts b/docs/.vitepress/lib/fetchPackages.ts index 0bf1a7e65..9f6796547 100644 --- a/docs/.vitepress/lib/fetchPackages.ts +++ b/docs/.vitepress/lib/fetchPackages.ts @@ -1,38 +1,42 @@ import { promises as fs, constants } from 'fs'; import path from 'path'; -import yaml from 'js-yaml' +import yaml from 'js-yaml'; import { PackageItem } from '../theme/types'; -const fileExist = (filePath) => fs.access(filePath, constants.F_OK).then(() => true).catch(() => false) +const fileExist = (filePath) => + fs + .access(filePath, constants.F_OK) + .then(() => true) + .catch(() => false); const fetchPackages = async (): Promise => { const docsDir = path.resolve(process.cwd(), '../packages'); - const fileNames = await (await fs.readdir(docsDir)).map(filename => ({filename, directory: docsDir})) + const fileNames = await ( + await fs.readdir(docsDir) + ).map((filename) => ({ filename, directory: docsDir })); - const packageJsons = await Promise.all(fileNames.map( async ({filename, directory}) => { - const filePath = path.resolve(directory, filename) - const fileStat = await fs.lstat(filePath); + const packageJsons = await Promise.all( + fileNames.map(async ({ filename, directory }) => { + const filePath = path.resolve(directory, filename); + const fileStat = await fs.lstat(filePath); - if(!fileStat.isDirectory()) return null; + if (!fileStat.isDirectory()) return null; - const jsonFilePath = path.resolve(filePath, 'package.json') - if (await fileExist(jsonFilePath)) { - return JSON.parse( - await fs.readFile(jsonFilePath, 'utf-8') - ) - } + const jsonFilePath = path.resolve(filePath, 'package.json'); + if (await fileExist(jsonFilePath)) { + return JSON.parse(await fs.readFile(jsonFilePath, 'utf-8')); + } - const ymlFilePath = path.resolve(filePath, 'pubspec.yaml') - if(await fileExist(ymlFilePath)) { - return yaml.load( - await fs.readFile(ymlFilePath, 'utf-8') - ); - } + const ymlFilePath = path.resolve(filePath, 'pubspec.yaml'); + if (await fileExist(ymlFilePath)) { + return yaml.load(await fs.readFile(ymlFilePath, 'utf-8')); + } - return null - })) + return null; + }), + ); - return packageJsons -} + return packageJsons; +}; export default fetchPackages; diff --git a/docs/.vitepress/lib/generateZip.ts b/docs/.vitepress/lib/generateZip.ts index e647eab63..7b95011fd 100644 --- a/docs/.vitepress/lib/generateZip.ts +++ b/docs/.vitepress/lib/generateZip.ts @@ -1,17 +1,15 @@ -export type IconContent = [icon: string, src:string]; +export type IconContent = [icon: string, src: string]; async function generateZip(icons: IconContent[]) { - const JSZip = (await import('jszip')).default + const JSZip = (await import('jszip')).default; const zip = new JSZip(); - const addingZipPromises = icons.map(([name, src]) => - zip.file(`${name}.svg`, src), - ); + const addingZipPromises = icons.map(([name, src]) => zip.file(`${name}.svg`, src)); - await Promise.all(addingZipPromises) + await Promise.all(addingZipPromises); return zip.generateAsync({ type: 'blob' }); } -export default generateZip +export default generateZip; diff --git a/docs/.vitepress/lib/getFallbackZip.tsx b/docs/.vitepress/lib/getFallbackZip.tsx index 82f3bbdaf..9760697e9 100644 --- a/docs/.vitepress/lib/getFallbackZip.tsx +++ b/docs/.vitepress/lib/getFallbackZip.tsx @@ -1,17 +1,15 @@ -import { createLucideIcon } from "lucide-react/src/lucide-react" -import { type LucideProps, type IconNode } from "lucide-react/src/createLucideIcon" -import { IconEntity } from "../theme/types" +import { createLucideIcon } from 'lucide-react/src/lucide-react'; +import { type LucideProps, type IconNode } from 'lucide-react/src/createLucideIcon'; +import { IconEntity } from '../theme/types'; import { renderToStaticMarkup } from 'react-dom/server'; -import { IconContent } from "./generateZip"; +import { IconContent } from './generateZip'; const getFallbackZip = (icons: IconEntity[], params: LucideProps) => { - return icons - .map((icon) => { - const Icon = createLucideIcon(icon.name, icon.iconNode as IconNode) - const src = renderToStaticMarkup() - return [icon.name, src] - }) -} + return icons.map((icon) => { + const Icon = createLucideIcon(icon.name, icon.iconNode as IconNode); + const src = renderToStaticMarkup(); + return [icon.name, src]; + }); +}; - -export default getFallbackZip +export default getFallbackZip; diff --git a/docs/.vitepress/lib/icons.ts b/docs/.vitepress/lib/icons.ts index ac1c6c94c..ece3f9bfd 100644 --- a/docs/.vitepress/lib/icons.ts +++ b/docs/.vitepress/lib/icons.ts @@ -1,34 +1,34 @@ -import fs from "fs"; -import path from "path"; -import { IconNodeWithKeys } from "../theme/types"; -import iconNodes from '../data/iconNodes' -import releaseMeta from "../data/releaseMetaData.json"; +import fs from 'fs'; +import path from 'path'; +import { IconNodeWithKeys } from '../theme/types'; +import iconNodes from '../data/iconNodes'; +import releaseMeta from '../data/releaseMetaData.json'; const DATE_OF_FORK = '2020-06-08T16:39:52+0100'; -const directory = path.join(process.cwd(), "../icons"); +const directory = path.join(process.cwd(), '../icons'); export interface GetDataOptions { - withChildKeys?: boolean + withChildKeys?: boolean; } export async function getData(name: string) { const jsonPath = path.join(directory, `${name}.json`); - const jsonContent = fs.readFileSync(jsonPath, "utf8"); + const jsonContent = fs.readFileSync(jsonPath, 'utf8'); const { tags, categories, contributors } = JSON.parse(jsonContent); - const iconNode = iconNodes[name] + const iconNode = iconNodes[name]; const releaseData = releaseMeta?.[name] ?? { - "createdRelease": { - "version": "0.0.0", - "date": DATE_OF_FORK + createdRelease: { + version: '0.0.0', + date: DATE_OF_FORK, }, - "changedRelease": { - "version": "0.0.0", - "date": DATE_OF_FORK - } - } + changedRelease: { + version: '0.0.0', + date: DATE_OF_FORK, + }, + }; return { name, @@ -36,11 +36,11 @@ export async function getData(name: string) { categories, iconNode, contributors, - ...releaseData + ...releaseData, }; } -export async function getAllData(): Promise<{ name: string, iconNode: IconNodeWithKeys}[]> { +export async function getAllData(): Promise<{ name: string; iconNode: IconNodeWithKeys }[]> { const names = Object.keys(iconNodes); return Promise.all(names.map((name) => getData(name))); diff --git a/docs/.vitepress/sidebar.ts b/docs/.vitepress/sidebar.ts index d7eec57a5..5bb387176 100644 --- a/docs/.vitepress/sidebar.ts +++ b/docs/.vitepress/sidebar.ts @@ -1,31 +1,31 @@ -import { DefaultTheme, UserConfig } from "vitepress" +import { DefaultTheme, UserConfig } from 'vitepress'; const sidebar: UserConfig['themeConfig']['sidebar'] = { - 'guide':[ + guide: [ { text: 'Introduction', items: [ { text: 'What is lucide?', link: '/guide/' }, { text: 'Installation', link: '/guide/installation' }, - { text: 'Comparison', link: '/guide/comparison' } - ] + { text: 'Comparison', link: '/guide/comparison' }, + ], }, { text: 'Basics', items: [ { text: 'Color', - link: '/guide/basics/color' + link: '/guide/basics/color', }, { text: 'Sizing', - link: '/guide/basics/sizing' + link: '/guide/basics/sizing', }, { text: 'Stroke width', - link: '/guide/basics/stroke-width' + link: '/guide/basics/stroke-width', }, - ] + ], }, // TODO: Add this section { @@ -37,14 +37,14 @@ const sidebar: UserConfig['themeConfig']['sidebar'] = { // }, { text: 'Global styling', - link: '/guide/advanced/global-styling' + link: '/guide/advanced/global-styling', }, // { // text: 'Animations', // }, { text: 'Filled icons', - link: '/guide/advanced/filled-icons' + link: '/guide/advanced/filled-icons', }, // { // text: 'Combining icons', @@ -55,83 +55,73 @@ const sidebar: UserConfig['themeConfig']['sidebar'] = { // { // text: 'Auto importing' // }, - ] + ], }, { text: 'Packages', items: [ { text: 'Lucide', - link: '/guide/packages/lucide' + link: '/guide/packages/lucide', }, { text: 'Lucide React', - link: '/guide/packages/lucide-react' + link: '/guide/packages/lucide-react', }, { text: 'Lucide React Native', - link: '/guide/packages/lucide-react-native' + link: '/guide/packages/lucide-react-native', }, { text: 'Lucide Vue', - link: '/guide/packages/lucide-vue' - }, - { - text: 'Lucide Vue Next (Vue 3)', - link: '/guide/packages/lucide-vue-next' + link: '/guide/packages/lucide-vue-next', }, { text: 'Lucide Svelte', - link: '/guide/packages/lucide-svelte' + link: '/guide/packages/lucide-svelte', }, { text: 'Lucide Solid', - link: '/guide/packages/lucide-solid' + link: '/guide/packages/lucide-solid', }, { text: 'Lucide Preact', - link: '/guide/packages/lucide-preact' + link: '/guide/packages/lucide-preact', }, { text: 'Lucide Angular', - link: '/guide/packages/lucide-angular' + link: '/guide/packages/lucide-angular', }, { text: 'Lucide Static', - link: '/guide/packages/lucide-static' + link: '/guide/packages/lucide-static', }, - { - text: 'Lucide Flutter', - link: '/guide/packages/lucide-flutter' - }, - ] + ], }, { text: 'Contributing', items: [ { text: 'Icon Design Principles', - link: '/guide/design/icon-design-guide' + link: '/guide/design/icon-design-guide', }, { text: 'Designing in Illustrator', - link: '/guide/design/illustrator-guide' + link: '/guide/design/illustrator-guide', }, { text: 'Designing in InkScape', - link: '/guide/design/inkscape-guide' + link: '/guide/design/inkscape-guide', }, { text: 'Designing in Figma', - link: '/guide/design/figma-guide' + link: '/guide/design/figma-guide', }, - ] + ], }, ], // This should be here to keep the sidebar shown on the icons page - 'icons': [ - { text: '', link: '/' }, - ], -} + icons: [{ text: '', link: '/' }], +}; -export default sidebar +export default sidebar; 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 @@