Compare commits

...
Author SHA1 Message Date
Yaswanth Pottigithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>Eric Fennis
c29c276f16 feat(icons): added circle-chevrons-down, circle-chevrons-left, circle-chevrons-right and 1 more icons (#5025)
* feat: add circle-double-chevron icons for left, right, up, and down directions

* chore(icons): add relevant suggested tags and use-cases

* Renamed the files from circle-double-chevrons to circle-chevrons

* Apply batched suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix formatting

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-20 09:25:57 +02:00
02eb9161b5 feat(svelte): export __iconData and __iconNode across per-icon modules (#4936) (#4957)
* feat(svelte): export __iconData and __iconNode across per-icon modules (#4936)

* Refactor imports in lucide-svelte.spec.ts

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix(build-icons): scope per-icon data re-exports behind exportIconData flag

- Problem: generateAliasesFiles unconditionally re-exported __iconData and __iconNode for all packages using separateAliasesFile. Packages like @lucide/solid and @lucide/icons do not export these names from their templates, causing missing export errors in downstream bundlers (e.g. solid vite integration).
- Solution: Add exportIconData flag (default false) to CLI, generateIconFiles, and generateAliasesFiles so named re-exports are opt-in and only emitted for packages that define them (@lucide/svelte).

* refactor(svelte): remove tools/build-icons changes per maintainer review

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-10-19 16:49:35 +02:00
10 changed files with 257 additions and 4 deletions
+41
View File
@@ -0,0 +1,41 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"ypotti",
"karsa-mistmere",
"ericfennis",
"jguddas",
"colebemis",
"AlexandrePhilibert"
],
"use-cases": [
"Navigating to the bottom of a page or feed",
"Fast-scrolling downwards in long document readers",
"Collapsing expanded panels or drawers downward",
"Jumping to the latest message in chat and activity feeds"
],
"tags": [
"bottom",
"descend",
"page",
"page down",
"scroll",
"jump",
"south",
"caret",
"button",
"skip",
"end",
"last page",
"latest",
"feed",
"chat",
"pagination",
"fast",
"media"
],
"categories": [
"arrows",
"navigation"
]
}
+15
View File
@@ -0,0 +1,15 @@
<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="M9 14L12 17L15 14" />
<path d="M9 8L12 11L15 8" />
<circle cx="12" cy="12" r="10" />
</svg>

After

Width:  |  Height:  |  Size: 308 B

+46
View File
@@ -0,0 +1,46 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"ypotti",
"karsa-mistmere",
"ericfennis",
"jguddas",
"colebemis",
"AlexandrePhilibert"
],
"use-cases": [
"Skipping to the first page in pagination controls",
"Rewinding playback in audio or video media players",
"Fast-navigating backward through steps in multi-step wizards",
"Jumping to the first track or chapter in playlists"
],
"tags": [
"previous",
"rewind",
"backward",
"first",
"beginning",
"start",
"west",
"music",
"caret",
"button",
"pagination",
"skip",
"skip-back",
"seek-back",
"media-controls",
"player",
"playlist",
"track",
"chapter",
"jump",
"timeline",
"controls"
],
"categories": [
"arrows",
"navigation",
"multimedia"
]
}
+15
View File
@@ -0,0 +1,15 @@
<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="M10 9L7 12L10 15" />
<path d="M16 9L13 12L16 15" />
<circle cx="12" cy="12" r="10" />
</svg>

After

Width:  |  Height:  |  Size: 309 B

+43
View File
@@ -0,0 +1,43 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"ypotti",
"karsa-mistmere",
"ericfennis",
"jguddas",
"colebemis",
"AlexandrePhilibert"
],
"use-cases": [
"Skipping to the last page in pagination controls",
"Fast-forwarding playback in audio or video media players",
"Fast-navigating forward through steps in multi-step wizards",
"Advancing to the final chapter or track in playlists and audiobooks"
],
"tags": [
"next",
"forward",
"skip",
"fast forward",
"last",
"end",
"east",
"music",
"caret",
"button",
"pagination",
"jump",
"seek",
"seek forward",
"player control",
"chapter",
"track",
"timeline",
"navigation control"
],
"categories": [
"arrows",
"navigation",
"multimedia"
]
}
+15
View File
@@ -0,0 +1,15 @@
<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="M14 15L17 12L14 9" />
<path d="M8 15L11 12L8 9" />
<circle cx="12" cy="12" r="10" />
</svg>

After

Width:  |  Height:  |  Size: 308 B

+42
View File
@@ -0,0 +1,42 @@
{
"$schema": "../icon.schema.json",
"contributors": [
"ypotti",
"karsa-mistmere",
"ericfennis",
"jguddas",
"colebemis",
"AlexandrePhilibert"
],
"use-cases": [
"Navigating to the top of a page or feed",
"Fast-scrolling upwards in long document readers",
"Expanding collapsed panels or drawers upward"
],
"tags": [
"top",
"ascend",
"page",
"page up",
"back to top",
"scroll",
"jump",
"north",
"caret",
"button",
"skip",
"pagination",
"first page",
"fast",
"fast scroll",
"rewind",
"jump to start",
"floating action button",
"anchor",
"timeline"
],
"categories": [
"arrows",
"navigation"
]
}
+15
View File
@@ -0,0 +1,15 @@
<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="M15 10L12 7L9 10" />
<path d="M15 16L12 13L9 16" />
<circle cx="12" cy="12" r="10" />
</svg>

After

Width:  |  Height:  |  Size: 309 B

+13 -4
View File
@@ -9,14 +9,23 @@ export default defineExportTemplate(
return `\
${getHTMLBanner()}
<script module lang="ts">
import type { LucideIconData, LucideIconNode } from '../types.js';
export const __iconData: LucideIconData = ${JSON.stringify(iconData)};
/**
* @deprecated Access \`__iconData\` instead.
*/
export const __iconNode: LucideIconNode[] = __iconData.node;
</script>
<script lang="ts">
import Icon from '../Icon.svelte';
import type { LucideProps, LucideIconData } from '../types.js';
import type { LucideProps } from '../types.js';
let props: LucideProps = $props();
const iconData: LucideIconData = ${JSON.stringify(iconData)};
</script>
<!--
@@ -29,7 +38,7 @@ Lucide SVG icon component, renders SVG Element with children.
${deprecated ? `\n@deprecated ${deprecationReason}\n` : ''}\
-->
<Icon {...props} icon={iconData} />
<Icon {...props} icon={__iconData} />
`;
},
);
@@ -1,6 +1,7 @@
import { describe, it, expect, afterEach } from 'vitest';
import { render, cleanup } from '@testing-library/svelte';
import { Smile, Pen, Edit2 } from '../src/lucide-svelte.js';
import { __iconData, __iconNode } from '../src/icons/face-slightly-smiling.svelte';
import TestSlots from './TestSlots.svelte';
import ContextWrapper from './ContextWrapper.svelte';
@@ -132,3 +133,14 @@ describe('Icon Component Accessibility', () => {
expect(container.firstChild).not.toHaveAttribute('aria-hidden');
});
});
describe('Per-icon data export', () => {
it('should export __iconData and __iconNode from the svelte component module', () => {
expect(__iconData).toBeDefined();
expect(__iconData.name).toBe('face-slightly-smiling');
expect(__iconData.size).toBe(24);
expect(Array.isArray(__iconData.node)).toBe(true);
expect(__iconData.node.length).toBeGreaterThan(0);
expect(__iconNode).toEqual(__iconData.node);
});
});