Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1980e3d59b | ||
|
|
aa0b77386c | ||
|
|
7bb15b80a3 | ||
|
|
4b203ec9b6 | ||
|
|
58c85b4758 | ||
|
|
b196797ede | ||
|
|
7ebbb6abc3 | ||
|
|
5beea9bf83 | ||
|
|
c06c5f0703 | ||
|
|
588113e359 | ||
|
|
08193b1ef5 | ||
|
|
e5e55d2b65 | ||
|
|
01d130afdd |
@@ -12,6 +12,6 @@
|
||||
"@octokit/rest": "^22.0.1",
|
||||
"dotenv": "^17.4.2",
|
||||
"openai": "^7.9.0",
|
||||
"zod": "^4.5.4"
|
||||
"zod": "^4.6.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ When checking or adding a `$group:` marker:
|
||||
|
||||
- A marker must be exactly `"$group:"` followed by the name of an existing file in `groups/`, without the `.json` extension, in lowercase kebab-case.
|
||||
- `$group:` is allowed **only** inside `tags`. It is not valid in `categories` or `contributors`.
|
||||
- Groups are named after the variant suffix: `file-plus` uses `$group:plus`, `file-question-mark` uses `$group:question-mark`. Suffixes with the same meaning share a group: `mail-warning` uses `$group:exclamation-mark`, and every currency suffix uses `$group:currency`.
|
||||
- Groups are named after the variant suffix: `file-plus` uses `$group:plus`, `file-question-mark` uses `$group:question-mark`. Suffixes with the same meaning share a group: `mail-exclamation-point` uses `$group:exclamation-mark`, and every currency suffix uses `$group:currency`.
|
||||
- The same suffix can mean different things in different contexts — `-off` means "disabled" on `wifi-off` but "allergy free" on `wheat-off` — so only use the group when the icon carries the group's meaning, and keep context-specific tags as literals.
|
||||
- Do not repeat a tag a group already provides, and do not use the same group twice in one array.
|
||||
- Conventional order: the `$extends:` base icon first, then `$group:` markers, then the icon's own literal tags.
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
"$schema": "../category.schema.json",
|
||||
"title": "Notifications",
|
||||
"description": "Icons for alerts, status updates, reminders, approvals, and attention states.",
|
||||
"icon": "triangle-alert"
|
||||
"icon": "triangle-exclamation-point"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import Calendar from '../../../data/iconDetails/calendar.ts';
|
||||
import Clock from '../../../data/iconDetails/clock.ts';
|
||||
import Bug from '../../../data/iconDetails/bug.ts';
|
||||
import Rocket from '../../../data/iconDetails/rocket.ts';
|
||||
import TriangleAlert from '../../../data/iconDetails/triangle-alert.ts';
|
||||
import TriangleExclamationPoint from '../../../data/iconDetails/triangle-exclamation-point.ts';
|
||||
import PartyPopper from '../../../data/iconDetails/party-popper.ts';
|
||||
import Scissors from '../../../data/iconDetails/scissors.ts';
|
||||
import Copy from '../../../data/iconDetails/copy.ts';
|
||||
@@ -41,7 +41,7 @@ const CalendarIcon = createLucideIcon('calendar', Calendar.iconNode);
|
||||
const ClockIcon = createLucideIcon('clock', Clock.iconNode);
|
||||
const BugIcon = createLucideIcon('bug', Bug.iconNode);
|
||||
const RocketIcon = createLucideIcon('rocket', Rocket.iconNode);
|
||||
const AlertTriangleIcon = createLucideIcon('alert-triangle', TriangleAlert.iconNode);
|
||||
const TriangleExclamationPointIcon = createLucideIcon('triangle-exclamation-point', TriangleExclamationPoint.iconNode);
|
||||
const ScissorsIcon = createLucideIcon('scissors', Scissors.iconNode);
|
||||
const CopyIcon = createLucideIcon('copy', Copy.iconNode);
|
||||
const SaveIcon = createLucideIcon('save', Save.iconNode);
|
||||
@@ -128,7 +128,7 @@ const prettyName = props.name
|
||||
>
|
||||
<div class="placeholder"></div>
|
||||
<div class="badge badge-red">
|
||||
<AlertTriangleIcon :size="20" />
|
||||
<TriangleExclamationPointIcon :size="20" />
|
||||
Alert
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,8 +117,6 @@ function scrollTrack(direction: 1 | -1) {
|
||||
.tiers {
|
||||
padding-top: 96px;
|
||||
padding-bottom: 48px;
|
||||
/* The track bleeds to the right edge of the viewport. */
|
||||
overflow-x: clip;
|
||||
}
|
||||
|
||||
.tiers-header {
|
||||
@@ -165,7 +163,6 @@ function scrollTrack(direction: 1 | -1) {
|
||||
|
||||
.track-wrapper {
|
||||
position: relative;
|
||||
margin-right: min(-24px, calc((1152px - 100vw) / 2));
|
||||
}
|
||||
|
||||
.track {
|
||||
@@ -178,12 +175,16 @@ function scrollTrack(direction: 1 | -1) {
|
||||
padding-bottom: 12px;
|
||||
padding-right: 24px;
|
||||
scroll-padding-right: 24px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-width: none;
|
||||
scroll-snap-align: center;
|
||||
scroll-padding-left: 24px;
|
||||
scroll-padding-right: 24px;
|
||||
}
|
||||
|
||||
.track::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.track:focus-visible {
|
||||
outline: 2px solid var(--vp-c-brand-1);
|
||||
outline-offset: 4px;
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Learn the best practices for writing use cases for Lucide icons.
|
||||
---
|
||||
|
||||
<script setup>
|
||||
import { batteryLow, creditCard, crop, handshake, heading2, microchip, search, squareLetterP, triangleAlert, wifiOff } from '~/.vitepress/data/iconNodes';
|
||||
import { batteryLow, creditCard, crop, handshake, heading2, microchip, search, squareLetterP, triangleExclamationPoint, wifiOff } from '~/.vitepress/data/iconNodes';
|
||||
import LucideIcon from '~/.vitepress/theme/components/base/LucideIcon.vue';
|
||||
</script>
|
||||
|
||||
@@ -120,10 +120,10 @@ The period adds **unnecessary punctuation** and makes entries inconsistent.
|
||||
Use plain text only. Formatting belongs in documentation, not metadata values.
|
||||
|
||||
:::: example
|
||||
::: do <LucideIcon name="triangle-alert" :iconNode="triangleAlert" /> Warning users about a destructive action
|
||||
::: do <LucideIcon name="triangle-exclamation-point" :iconNode="triangleExclamationPoint" /> Warning users about a destructive action
|
||||
This works in search, generated pages, and other places that use metadata.
|
||||
:::
|
||||
::: dont <LucideIcon name="triangle-alert" :iconNode="triangleAlert" /> <span>**Warning** users about a destructive action ⚠️</span>
|
||||
::: dont <LucideIcon name="triangle-exclamation-point" :iconNode="triangleExclamationPoint" /> <span>**Warning** users about a destructive action ⚠️</span>
|
||||
Markdown and emoji can **show up in generated UI** and make metadata **harder to reuse**.
|
||||
:::
|
||||
::::
|
||||
|
||||
@@ -31,7 +31,7 @@ You can then reference the registered icons by name:
|
||||
|
||||
```html [app.html]
|
||||
<svg lucideIcon="square-check"></svg>
|
||||
<svg lucideIcon="circle-alert"></svg>
|
||||
<svg lucideIcon="circle-exclamation-point"></svg>
|
||||
```
|
||||
|
||||
## How names are resolved
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
"h3": "^1.15.11",
|
||||
"markdown-it": "^15.0.3",
|
||||
"markdown-it-container": "^4.0.0",
|
||||
"nitropack": "^2.13.4",
|
||||
"nitropack": "^2.13.5",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
"semver": "^7.8.5",
|
||||
"sharp": "^0.35.5",
|
||||
"shiki": "^4.4.3",
|
||||
"simple-git": "^4.0.1",
|
||||
"shiki": "^4.5.0",
|
||||
"simple-git": "^4.0.2",
|
||||
"sitemap": "^9.0.1",
|
||||
"svg-path-commander": "^2.3.3",
|
||||
"svg-pathdata": "^9.0.0",
|
||||
|
||||
@@ -15,5 +15,10 @@
|
||||
"categories": [
|
||||
"account",
|
||||
"social"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "badge-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
@@ -12,5 +12,10 @@
|
||||
],
|
||||
"categories": [
|
||||
"$extends:battery"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "battery-warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 393 B |
@@ -15,5 +15,10 @@
|
||||
],
|
||||
"categories": [
|
||||
"$extends:book"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "book-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
@@ -16,6 +16,9 @@
|
||||
"name": "alert-circle",
|
||||
"deprecationReason": "alias.name",
|
||||
"deprecated": true
|
||||
},
|
||||
{
|
||||
"name": "circle-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
@@ -13,5 +13,10 @@
|
||||
],
|
||||
"categories": [
|
||||
"$extends:clock"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "clock-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
@@ -19,5 +19,10 @@
|
||||
"development",
|
||||
"notifications",
|
||||
"weather"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "cloud-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
@@ -13,5 +13,13 @@
|
||||
"categories": [
|
||||
"mail",
|
||||
"notifications"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "mail-warning"
|
||||
},
|
||||
{
|
||||
"name": "mail-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 393 B |
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"Prsenapati09",
|
||||
"rrod497"
|
||||
],
|
||||
"use-cases": [
|
||||
"Representing tropical fruit in food and grocery apps",
|
||||
"Indicating produce sections in shopping interfaces",
|
||||
"Labeling tropical fruit filters in recipe and nutrition apps",
|
||||
"Highlighting seasonal fruit in marketplaces"
|
||||
],
|
||||
"tags": [
|
||||
"fruit",
|
||||
"food",
|
||||
"tropical",
|
||||
"summer",
|
||||
"exotic",
|
||||
"healthy",
|
||||
"ripe",
|
||||
"yellow",
|
||||
"juice",
|
||||
"smoothie",
|
||||
"snack",
|
||||
"produce"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m17 6 3-3" />
|
||||
<path d="M7 22a4 4 0 01-2.62-7.023A2 2 0 005 13.383V10a8 8 0 1116 0A12 12 0 019 22z" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 323 B |
@@ -17,5 +17,13 @@
|
||||
"categories": [
|
||||
"$extends:message-circle",
|
||||
"notifications"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "message-circle-warning"
|
||||
},
|
||||
{
|
||||
"name": "message-circle-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 396 B |
@@ -16,5 +16,13 @@
|
||||
"categories": [
|
||||
"$extends:message-square",
|
||||
"notifications"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "message-square-warning"
|
||||
},
|
||||
{
|
||||
"name": "message-square-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 388 B After Width: | Height: | Size: 388 B |
@@ -18,6 +18,9 @@
|
||||
"name": "alert-octagon",
|
||||
"deprecationReason": "alias.name",
|
||||
"deprecated": true
|
||||
},
|
||||
{
|
||||
"name": "octagon-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 510 B |
@@ -15,5 +15,10 @@
|
||||
],
|
||||
"categories": [
|
||||
"$extends:search"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "search-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
@@ -59,5 +59,10 @@
|
||||
"development",
|
||||
"notifications",
|
||||
"gaming"
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"name": "shield-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 435 B After Width: | Height: | Size: 435 B |
@@ -21,6 +21,9 @@
|
||||
"name": "alert-triangle",
|
||||
"deprecationReason": "alias.name",
|
||||
"deprecated": true
|
||||
},
|
||||
{
|
||||
"name": "triangle-alert"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 345 B |
@@ -19,9 +19,9 @@
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-react": "2.3.0"
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@react-router/dev": "8.3.1",
|
||||
"@types/node": "^26.1.1",
|
||||
"@types/node": "^26.4.1",
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-react": "2.3.0"
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-react": "2.3.0"
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
"react-dom": "19.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^26.1.1",
|
||||
"@types/node": "^26.4.1",
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-react": "2.3.0"
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
"@types/react": "19.3.0",
|
||||
"@types/react-dom": "19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"playwright": "1.64.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-react": "2.3.0"
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
"solid-js": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@solidjs/testing-library": "1.0.0-beta.3",
|
||||
"@solidjs/testing-library": "1.0.0-rc.2",
|
||||
"@solidjs/vite-plugin": "3.0.0-next.47",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"filesystem-routing": "0.4.0",
|
||||
"playwright": "1.64.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
"@solidjs/start": "2.0.5",
|
||||
"lucide-solid": "workspace:*",
|
||||
"nitro": "3.0.260903-beta",
|
||||
"solid-js": "1.9.15"
|
||||
"solid-js": "1.9.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite-plugin-solid": "^2.11.14",
|
||||
"vite": "^8.3.5",
|
||||
"vite-plugin-solid": "^2.11.15",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-solid": "1.0.1"
|
||||
},
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"lucide-solid": "workspace:*",
|
||||
"solid-js": "1.9.15"
|
||||
"solid-js": "1.9.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"playwright": "1.64.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite-plugin-solid": "^2.11.14",
|
||||
"vite": "^8.3.5",
|
||||
"vite-plugin-solid": "^2.11.15",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-solid": "1.0.1"
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
"@sveltejs/adapter-auto": "^8.0.0",
|
||||
"@sveltejs/kit": "^3.1.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"playwright": "1.64.1",
|
||||
"svelte-check": "^4.7.7",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-svelte": "3.1.0"
|
||||
}
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
"devDependencies": {
|
||||
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
||||
"@tsconfig/svelte": "^5.0.8",
|
||||
"@types/node": "^26.1.1",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@types/node": "^26.4.1",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"playwright": "1.64.1",
|
||||
"svelte-check": "^4.7.7",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-svelte": "3.1.0"
|
||||
}
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@lucide/vue": "workspace:*",
|
||||
"nuxt": "4.6.2",
|
||||
"nuxt": "4.6.3",
|
||||
"vue": "3.5.44",
|
||||
"vue-router": "5.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-vue": "3.1.0",
|
||||
"vue-tsc": "^3.3.11"
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-vue": "3.1.0",
|
||||
"vue-tsc": "^3.3.11"
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tsconfig/node24": "^24.0.5",
|
||||
"@types/node": "^26.1.1",
|
||||
"@types/node": "^26.4.1",
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"@vitest/browser-playwright": "5.0.3",
|
||||
"@vitest/browser-playwright": "5.0.5",
|
||||
"@vue/tsconfig": "^0.9.1",
|
||||
"playwright": "1.64.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5",
|
||||
"vitest-browser-vue": "3.1.0",
|
||||
"vue-tsc": "^3.3.11"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"karsa-mistmere",
|
||||
"DrashtiC07"
|
||||
],
|
||||
"tags": [
|
||||
"drink",
|
||||
"tea",
|
||||
"boba",
|
||||
"bubble tea",
|
||||
"tapioca",
|
||||
"milk tea",
|
||||
"cafe",
|
||||
"straw",
|
||||
"pearls",
|
||||
"beverage",
|
||||
"cold drink"
|
||||
],
|
||||
"categories": [
|
||||
"food-beverage"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M11 14h.01" />
|
||||
<path d="M11 18h.01" />
|
||||
<path d="M14 16h.01" />
|
||||
<path d="m14 2-2 2.5" />
|
||||
<path d="M5 10h14" />
|
||||
<path d="m6 10 1.5 10.2a2 2 0 002 1.8h5a2 2 0 002-1.8L18 10" />
|
||||
<path d="M6.5 10a1 1 0 0111 0" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 439 B |
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"jwlinqx",
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"use-cases": [
|
||||
"Labeling titration procedures in lab information management systems",
|
||||
"Marking assay workflows like Karl Fischer or potentiometric titration in pharmaceutical QC dashboards",
|
||||
"Marking acid-base or redox titration lessons on chemistry e-learning platforms",
|
||||
"Indicating chlorine residual, alkalinity, or hardness titration tests in water treatment monitoring tools",
|
||||
"Denoting titratable acidity or free-SO₂ titration tools in brewing and winemaking apps",
|
||||
"Marking the water-testing section for drop-count titration kit results in pool, spa, and aquarium care apps",
|
||||
"Flagging TAN/TBN titration steps in oil analysis reports",
|
||||
"Logging fat or acidity titration entries in food and dairy QA systems",
|
||||
"Representing dissolved oxygen or soil pH titration workflows in environmental field-study apps"
|
||||
],
|
||||
"tags": [
|
||||
"chemical",
|
||||
"reaction",
|
||||
"measurement",
|
||||
"volume",
|
||||
"solution",
|
||||
"precision",
|
||||
"droplet",
|
||||
"pipette",
|
||||
"lab",
|
||||
"chemistry",
|
||||
"beaker",
|
||||
"erlenmeyer",
|
||||
"experiment",
|
||||
"test"
|
||||
],
|
||||
"categories": [
|
||||
"science",
|
||||
"medical"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M12 4v2" />
|
||||
<path d="M14 10v4a2 2 0 00.245.96l2.51 4.08A2 2 0 0115 22H9a2 2 0 01-1.755-2.96l2.51-4.08A2 2 0 0010 14v-4" />
|
||||
<path d="M14 2a2 2 0 01-4 0" />
|
||||
<path d="M9 10h6" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 401 B |
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "../icon.schema.json",
|
||||
"contributors": [
|
||||
"psjdev",
|
||||
"karsa-mistmere"
|
||||
],
|
||||
"use-cases": [
|
||||
"Representing electronics assembly and repair",
|
||||
"Indicating circuit-board rework or modification",
|
||||
"Marking soldering steps in repair instructions",
|
||||
"Marking hot-tip hazards in safety documentation"
|
||||
],
|
||||
"tags": [
|
||||
"electronics",
|
||||
"repair",
|
||||
"circuit",
|
||||
"heat",
|
||||
"workshop",
|
||||
"assembly",
|
||||
"pcb",
|
||||
"flux",
|
||||
"desolder",
|
||||
"rework",
|
||||
"smd",
|
||||
"diy"
|
||||
],
|
||||
"categories": [
|
||||
"tools"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M11.356 9.356a1.2 1.2 0 010-1.712l.351-.351A1 1 0 0112.414 7h1.172a1 1 0 00.707-.293l3.351-3.351a1.2 1.2 0 011.712 0l1.288 1.288a1.2 1.2 0 010 1.712l-3.351 3.351a1 1 0 00-.293.707v1.172a1 1 0 01-.293.707l-.351.351a1.2 1.2 0 01-1.712 0z" />
|
||||
<path d="m11.5 9.5-7.243 7.244a2 2 0 00-.407.586l-1.798 3.956a.5.5 0 00.662.662L6.67 20.15a2 2 0 00.586-.406L14.5 12.5" />
|
||||
<path d="m20 4 .293-.293A2.4 2.4 0 0122 3" />
|
||||
<path d="M3 2q2 2.5 0 5 -2 2.5 0 5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 673 B |
@@ -84,13 +84,13 @@
|
||||
"prettier": "3.9.6",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"semver": "^7.8.5",
|
||||
"simple-git": "^4.0.1",
|
||||
"simple-git": "^4.0.2",
|
||||
"svgo": "^4.1.0",
|
||||
"svgson": "^5.3.1",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.69.0",
|
||||
"vitest": "5.0.5",
|
||||
"yargs": "^18.1.0"
|
||||
"yargs": "^18.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.11.1"
|
||||
|
||||
@@ -42,23 +42,23 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-eslint/builder": "~22.5.0",
|
||||
"@angular-eslint/schematics": "~22.5.0",
|
||||
"@angular/build": "^22.2.2",
|
||||
"@angular/cli": "^22.2.2",
|
||||
"@angular/common": "^22.2.2",
|
||||
"@angular/compiler": "^22.2.2",
|
||||
"@angular/compiler-cli": "^22.2.2",
|
||||
"@angular/core": "^22.2.2",
|
||||
"@angular/forms": "^22.2.2",
|
||||
"@angular/platform-browser": "^22.2.2",
|
||||
"@angular/platform-server": "^22.2.2",
|
||||
"@angular/router": "^22.2.2",
|
||||
"@angular-eslint/builder": "~22.6.0",
|
||||
"@angular-eslint/schematics": "~22.6.0",
|
||||
"@angular/build": "^22.2.5",
|
||||
"@angular/cli": "^22.2.5",
|
||||
"@angular/common": "^22.2.4",
|
||||
"@angular/compiler": "^22.2.4",
|
||||
"@angular/compiler-cli": "^22.2.4",
|
||||
"@angular/core": "^22.2.4",
|
||||
"@angular/forms": "^22.2.4",
|
||||
"@angular/platform-browser": "^22.2.4",
|
||||
"@angular/platform-server": "^22.2.4",
|
||||
"@angular/router": "^22.2.4",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@lucide/helpers": "workspace:*",
|
||||
"@vitest/browser-playwright": "^5.0.3",
|
||||
"angular-eslint": "22.5.0",
|
||||
"ng-packagr": "^22.2.4",
|
||||
"@vitest/browser-playwright": "^5.0.5",
|
||||
"angular-eslint": "22.6.0",
|
||||
"ng-packagr": "^22.2.5",
|
||||
"rxjs": "~7.8.2",
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^6.0.3"
|
||||
|
||||
@@ -3,20 +3,20 @@ import { bootstrapApplication, provideClientHydration } from '@angular/platform-
|
||||
import { provideServerRendering, renderApplication } from '@angular/platform-server';
|
||||
import { LucideDynamicIcon } from './lucide-dynamic-icon';
|
||||
import { provideLucideIcons } from './lucide-icons';
|
||||
import { LucideBadgeAlert } from './icons/badge-alert';
|
||||
import { LucideBadgeExclamationPoint } from './icons/badge-exclamation-point';
|
||||
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: 'lucide-static-hydration-root',
|
||||
template: `<svg lucideBadgeAlert [nonScalingStroke]="true"></svg>`,
|
||||
imports: [LucideBadgeAlert],
|
||||
template: `<svg lucideBadgeExclamationPoint [nonScalingStroke]="true"></svg>`,
|
||||
imports: [LucideBadgeExclamationPoint],
|
||||
})
|
||||
class StaticHydrationRootComponent {}
|
||||
|
||||
@Component({
|
||||
// eslint-disable-next-line @angular-eslint/component-selector
|
||||
selector: 'lucide-dynamic-hydration-root',
|
||||
template: `<svg [lucideIcon]="'badge-alert'"></svg>`,
|
||||
template: `<svg [lucideIcon]="'badge-exclamation-point'"></svg>`,
|
||||
imports: [LucideDynamicIcon],
|
||||
})
|
||||
class DynamicHydrationRootComponent {}
|
||||
@@ -60,7 +60,7 @@ describe('Lucide hydration', () => {
|
||||
);
|
||||
(globalThis as { ngServerMode?: boolean }).ngServerMode = false;
|
||||
const serverDocument = new DOMParser().parseFromString(html, 'text/html');
|
||||
expectBadgeAlertShapeNodes(serverDocument.querySelector('svg') as SVGSVGElement);
|
||||
expectBadgeExclamationPointShapeNodes(serverDocument.querySelector('svg') as SVGSVGElement);
|
||||
document.head.innerHTML = serverDocument.head.innerHTML;
|
||||
document.body.innerHTML = serverDocument.body.innerHTML;
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('Lucide hydration', () => {
|
||||
return document.querySelector('svg') as SVGSVGElement;
|
||||
}
|
||||
|
||||
function expectBadgeAlertShapeNodes(svg: SVGSVGElement) {
|
||||
function expectBadgeExclamationPointShapeNodes(svg: SVGSVGElement) {
|
||||
expect(Array.from(svg.children).map((child) => child.tagName.toLowerCase())).toEqual([
|
||||
'path',
|
||||
'line',
|
||||
@@ -89,7 +89,7 @@ describe('Lucide hydration', () => {
|
||||
'lucide-static-hydration-root',
|
||||
);
|
||||
|
||||
expectBadgeAlertShapeNodes(svg);
|
||||
expectBadgeExclamationPointShapeNodes(svg);
|
||||
for (const child of Array.from(svg.children)) {
|
||||
expect(child.getAttribute('vector-effect')).toBe('non-scaling-stroke');
|
||||
}
|
||||
@@ -99,9 +99,9 @@ describe('Lucide hydration', () => {
|
||||
const svg = await renderAndHydrate(
|
||||
DynamicHydrationRootComponent,
|
||||
'lucide-dynamic-hydration-root',
|
||||
[provideLucideIcons(LucideBadgeAlert)],
|
||||
[provideLucideIcons(LucideBadgeExclamationPoint)],
|
||||
);
|
||||
|
||||
expectBadgeAlertShapeNodes(svg);
|
||||
expectBadgeExclamationPointShapeNodes(svg);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
"@rollup/plugin-replace": "^6.0.3",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"rollup-plugin-preserve-directives": "^0.4.0",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vitest": "5.0.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@types/node": "^26.4.1",
|
||||
"prettier": "3.9.6",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"svgson": "^5.3.1",
|
||||
"typescript": "^6.0.3"
|
||||
|
||||
@@ -56,10 +56,10 @@
|
||||
"@testing-library/preact": "^3.2.6",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"preact": "^11.1.0",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"preact": "^10.27.2 || ^11.0.0-0"
|
||||
|
||||
@@ -77,12 +77,12 @@
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1",
|
||||
"react-native": "^0.88.0",
|
||||
"react-native": "^0.88.1",
|
||||
"react-native-svg": "^15.16.0",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
|
||||
@@ -108,17 +108,17 @@
|
||||
"@lucide/shared": "workspace:*",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"@testing-library/react": "^16.3.3",
|
||||
"@types/node": "^25.9.1",
|
||||
"@types/node": "^25.9.5",
|
||||
"@types/react": "^19.3.0",
|
||||
"@vitejs/plugin-react": "^6.1.2",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"react": "19.3.1",
|
||||
"react-dom": "19.3.1",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"rollup-plugin-preserve-directives": "^0.4.0",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
// @vitest-environment node
|
||||
|
||||
import { afterEach, expect, it } from 'vitest';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const fixtureDirectories: string[] = [];
|
||||
|
||||
afterEach(() => {
|
||||
fixtureDirectories.splice(0).forEach((directory) => {
|
||||
rmSync(directory, { recursive: true, force: true });
|
||||
});
|
||||
});
|
||||
|
||||
it('builds icons with templates and metadata in paths containing URL characters', () => {
|
||||
const directory = mkdtempSync(path.join(tmpdir(), 'lucide-build-icons #%-'));
|
||||
fixtureDirectories.push(directory);
|
||||
const input = path.join(directory, 'input');
|
||||
const output = path.join(directory, 'output');
|
||||
const template = path.join(directory, 'template.mjs');
|
||||
mkdirSync(input);
|
||||
writeFileSync(
|
||||
path.join(input, 'sample.svg'),
|
||||
'<svg xmlns="http://www.w3.org/2000/svg"><path d="M1 1h2" /></svg>',
|
||||
);
|
||||
writeFileSync(path.join(input, 'sample.json'), JSON.stringify({ aliases: ['sample-alias'] }));
|
||||
writeFileSync(
|
||||
template,
|
||||
'export default ({ iconData }) => "export default " + JSON.stringify(iconData);',
|
||||
);
|
||||
|
||||
const cli = fileURLToPath(new URL('../../../tools/build-icons/cli.ts', import.meta.url));
|
||||
const result = spawnSync(
|
||||
process.execPath,
|
||||
[
|
||||
cli,
|
||||
`--input=${input}`,
|
||||
`--output=${output}`,
|
||||
`--templateSrc=${template}`,
|
||||
'--pretty=false',
|
||||
'--silent',
|
||||
],
|
||||
{ encoding: 'utf8', timeout: 30_000 },
|
||||
);
|
||||
|
||||
expect(result.error).toBeUndefined();
|
||||
expect(result.status, result.stderr).toBe(0);
|
||||
expect(result.stderr).toBe('');
|
||||
const generatedIcon = readFileSync(path.join(output, 'icons', 'sample.js'), 'utf8');
|
||||
expect(JSON.parse(generatedIcon.replace(/^export default /, ''))).toMatchObject({
|
||||
name: 'sample',
|
||||
aliases: ['sample-alias'],
|
||||
node: [['path', { d: 'M1 1h2' }]],
|
||||
});
|
||||
expect(readFileSync(path.join(output, 'icons', 'index.js'), 'utf8')).toContain('sample');
|
||||
});
|
||||
@@ -68,24 +68,24 @@
|
||||
"test:watch": "vitest watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/preset-env": "^7.29.7",
|
||||
"@babel/preset-typescript": "^7.29.7",
|
||||
"@babel/core": "^8.0.10",
|
||||
"@babel/preset-env": "^8.0.7",
|
||||
"@babel/preset-typescript": "^8.0.7",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/shared": "workspace:*",
|
||||
"@rollup/plugin-babel": "^6.1.0",
|
||||
"@rollup/plugin-babel": "^7.1.0",
|
||||
"@solidjs/testing-library": "^0.8.10",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"babel-preset-solid": "^1.9.15",
|
||||
"esbuild": "^0.28.2",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"rollup": "^4.65.0",
|
||||
"solid-js": "^1.9.15",
|
||||
"solid-js": "^1.9.18",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite-plugin-solid": "^2.11.14"
|
||||
"vite": "^8.3.5",
|
||||
"vite-plugin-solid": "^2.11.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"solid-js": "^1.4.7"
|
||||
|
||||
@@ -43,8 +43,11 @@ const configs = bundles
|
||||
presets: [
|
||||
'babel-preset-solid',
|
||||
'@babel/preset-typescript',
|
||||
['@babel/preset-env', { bugfixes: true, targets: 'last 2 years' }],
|
||||
['@babel/preset-env', { targets: 'last 2 years' }],
|
||||
],
|
||||
// Babel 8's @babel/preset-typescript no longer enables JSX parsing for .tsx files,
|
||||
// and babel-preset-solid's Babel 7 JSX syntax plugin skips it when TypeScript is enabled.
|
||||
overrides: [{ test: /\.[jt]sx$/, parserOpts: { plugins: ['jsx'] } }],
|
||||
}),
|
||||
...plugins({
|
||||
pkg,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@types/node": "^26.4.1",
|
||||
"prettier": "3.9.6",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"svgson": "^5.3.1"
|
||||
}
|
||||
|
||||
@@ -48,11 +48,11 @@
|
||||
"@lucide/shared": "workspace:*",
|
||||
"@rollup/plugin-replace": "^6.0.3",
|
||||
"@testing-library/jest-dom": "^7.0.1",
|
||||
"@types/node": "^25.9.1",
|
||||
"@types/node": "^25.9.5",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^26.4.1",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@
|
||||
"test:watch": "vitest watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.29.7",
|
||||
"@babel/preset-env": "^7.29.7",
|
||||
"@babel/preset-typescript": "^7.29.7",
|
||||
"@babel/core": "^8.0.10",
|
||||
"@babel/preset-env": "^8.0.7",
|
||||
"@babel/preset-typescript": "^8.0.7",
|
||||
"@lucide/build-icons": "workspace:*",
|
||||
"@lucide/rollup-plugins": "workspace:*",
|
||||
"@lucide/shared": "workspace:*",
|
||||
"@rollup/plugin-babel": "^6.1.0",
|
||||
"@rollup/plugin-babel": "^7.1.0",
|
||||
"@solidjs/testing-library": "next",
|
||||
"@solidjs/vite-plugin": "next",
|
||||
"@solidjs/web": "next",
|
||||
@@ -82,11 +82,11 @@
|
||||
"babel-preset-solid": "next",
|
||||
"esbuild": "^0.28.2",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"rollup": "^4.65.0",
|
||||
"solid-js": "next",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"solid-js": "^2.0.0-rc.0"
|
||||
|
||||
@@ -43,8 +43,11 @@ const configs = bundles
|
||||
presets: [
|
||||
'babel-preset-solid',
|
||||
'@babel/preset-typescript',
|
||||
['@babel/preset-env', { bugfixes: true, targets: 'last 2 years' }],
|
||||
['@babel/preset-env', { targets: 'last 2 years' }],
|
||||
],
|
||||
// Babel 8's @babel/preset-typescript no longer enables JSX parsing for .tsx files,
|
||||
// and babel-preset-solid's Babel 7 JSX syntax plugin skips it when TypeScript is enabled.
|
||||
overrides: [{ test: /\.[jt]sx$/, parserOpts: { plugins: ['jsx'] } }],
|
||||
}),
|
||||
...plugins({
|
||||
pkg,
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"svelte-check": "^4.7.7",
|
||||
"svelte-preprocess": "^6.0.5",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3"
|
||||
"vite": "^8.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^5"
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
"@testing-library/vue": "^8.1.0",
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"@vue/test-utils": "2.5.1",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-dts": "^6.5.1",
|
||||
"typescript": "^6.0.3",
|
||||
"vite": "^8.3.3",
|
||||
"vite": "^8.3.5",
|
||||
"vue": "^3.5.44"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -12,10 +12,16 @@ overrides:
|
||||
semver: ^7.7.3
|
||||
vite-prerender-plugin: 0.5.12
|
||||
webpack-dev-middleware: ^5.3.4
|
||||
vitest: '5.0.3'
|
||||
vitest: '5.0.5'
|
||||
vite: '^8.3.3'
|
||||
minimatch@>=9.0.0 <9.0.6: ^9.0.6
|
||||
minimatch@>=9.0.0 <9.0.7: ^9.0.7
|
||||
zod@<4.6.6: ^4.6.6
|
||||
brace-expansion@<1.1.21: ^1.1.21
|
||||
decode-uri-component@<=0.5.0: ^0.5.1
|
||||
deepmerge@>=4.2.0 <=4.3.1: ^4.3.1
|
||||
file-type@>=13.0.0 <21.3.1: ^21.3.1
|
||||
'@jimp/core>file-type': ^16.5.4
|
||||
glob@>=9.0.0 <=14.0.1: ^14.0.2
|
||||
hono@>=4.12.4 <4.13.11: ^4.13.11
|
||||
|
||||
allowBuilds:
|
||||
'@parcel/watcher': false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { promisify } from 'util';
|
||||
import simpleGit from 'simple-git';
|
||||
import { simpleGit } from 'simple-git';
|
||||
import { type IconMetadata } from '../../tools/build-icons/types.ts';
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
"description": "A internal used package with helpers.",
|
||||
"main": "helpers.ts",
|
||||
"types": "helpers.ts",
|
||||
"scripts": {
|
||||
"test": "vitest run"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"type": "module",
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { toCamelCase } from './toCamelCase.ts';
|
||||
|
||||
describe('toCamelCase', () => {
|
||||
it('converts kebab-case icon names', () => {
|
||||
expect(toCamelCase('arrow-up')).toBe('arrowUp');
|
||||
expect(toCamelCase('circle-arrow-out-down-left')).toBe('circleArrowOutDownLeft');
|
||||
expect(toCamelCase('arrow-up-0-1')).toBe('arrowUp01');
|
||||
});
|
||||
|
||||
it('treats whitespace, hyphens and underscores as separators', () => {
|
||||
expect(toCamelCase('foo_bar')).toBe('fooBar');
|
||||
expect(toCamelCase('foo bar')).toBe('fooBar');
|
||||
expect(toCamelCase('foo\tbar')).toBe('fooBar');
|
||||
expect(toCamelCase('foo - _\tbar')).toBe('fooBar');
|
||||
expect(toCamelCase('-foo')).toBe('Foo');
|
||||
});
|
||||
|
||||
it('lowercases only a leading capital letter', () => {
|
||||
expect(toCamelCase('Foo-bar')).toBe('fooBar');
|
||||
expect(toCamelCase('FooBar')).toBe('fooBar');
|
||||
expect(toCamelCase('alreadyCamelCase')).toBe('alreadyCamelCase');
|
||||
});
|
||||
|
||||
it('keeps separators that are not followed by a word character', () => {
|
||||
expect(toCamelCase('foo-')).toBe('foo-');
|
||||
expect(toCamelCase('foo__')).toBe('foo__');
|
||||
expect(toCamelCase('foo\t!')).toBe('foo\t!');
|
||||
expect(toCamelCase('')).toBe('');
|
||||
});
|
||||
|
||||
it('handles long runs of tabs in linear time', () => {
|
||||
const input = `a${'\t'.repeat(100_000)}!`;
|
||||
|
||||
const start = performance.now();
|
||||
const result = toCamelCase(input);
|
||||
const duration = performance.now() - start;
|
||||
|
||||
expect(result).toBe(input);
|
||||
expect(duration).toBeLessThan(100);
|
||||
});
|
||||
});
|
||||
@@ -5,6 +5,6 @@
|
||||
* @returns {string} A camelized string
|
||||
*/
|
||||
export const toCamelCase = (string: string): string =>
|
||||
string.replace(/^([A-Z])|[\s-_]+(\w)/g, (match, p1, p2) =>
|
||||
p2 ? p2.toUpperCase() : p1.toLowerCase(),
|
||||
string.replace(/^([A-Z])|[\s-_]+(\w)?/g, (match, p1, p2) =>
|
||||
p1 ? p1.toLowerCase() : p2 ? p2.toUpperCase() : match,
|
||||
);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@rollup/plugin-replace": "^6.0.3",
|
||||
"esbuild": "^0.28.2",
|
||||
"rollup": "^4.65.0",
|
||||
"rollup": "^4.65.1",
|
||||
"rollup-plugin-esbuild": "^6.2.1",
|
||||
"rollup-plugin-license": "^3.7.1",
|
||||
"rollup-plugin-summary": "^3.0.1",
|
||||
|
||||