@prismora/icons 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aravind Kumar and Prismora contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,15 @@
1
- # Temporary Holding Version
1
+ # @prismora/icons
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Prismora icons: tree-shakable SVG icons on a 24 px grid, as named exports.
4
+
5
+ ```sh
6
+ npm install @prismora/icons
7
+ ```
8
+
9
+ ```ts
10
+ import { registerIcons } from '@prismora/elements/icon';
11
+ import { check, moon, sun } from '@prismora/icons';
12
+ registerIcons([check, moon, sun]); // then <pm-icon name="check"> or icon-start="moon"
13
+ ```
14
+
15
+ Documentation: [prismora.design/docs/icons](https://prismora.design/docs/icons) · Part of [Prismora](https://github.com/axxra/prismora), one seed, every theme. MIT licence.
package/dist/all.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { IconData } from './types.js';
2
+ export declare const ICONS: Readonly<Record<string, IconData>>;
3
+ export declare const ICON_NAMES: readonly string[];
4
+ export declare function iconByName(name: string): IconData;
package/dist/all.js ADDED
@@ -0,0 +1,10 @@
1
+ /** The whole icon set, addressable by name. Ships every icon — prefer named imports from '@prismora/icons'. */
2
+ import * as ALL from './icons.js';
3
+ export const ICONS = Object.fromEntries(Object.values(ALL).map((d) => [d.name, d]));
4
+ export const ICON_NAMES = Object.keys(ICONS);
5
+ export function iconByName(name) {
6
+ const d = ICONS[name];
7
+ if (!d)
8
+ throw new Error(`Unknown icon "${name}"`);
9
+ return d;
10
+ }
@@ -0,0 +1,121 @@
1
+ /** Icon data: one named export per icon, so bundlers keep only the icons you import. Generated from the list below — keep alphabetical-free order stable. */
2
+ import type { IconData } from './types.js';
3
+ export declare const check: IconData;
4
+ export declare const x: IconData;
5
+ export declare const plus: IconData;
6
+ export declare const minus: IconData;
7
+ export declare const chevronDown: IconData;
8
+ export declare const chevronUp: IconData;
9
+ export declare const chevronLeft: IconData;
10
+ export declare const chevronRight: IconData;
11
+ export declare const arrowRight: IconData;
12
+ export declare const arrowLeft: IconData;
13
+ export declare const arrowUp: IconData;
14
+ export declare const arrowDown: IconData;
15
+ export declare const externalLink: IconData;
16
+ export declare const menu: IconData;
17
+ export declare const moreHorizontal: IconData;
18
+ export declare const search: IconData;
19
+ export declare const info: IconData;
20
+ export declare const alertCircle: IconData;
21
+ export declare const alertTriangle: IconData;
22
+ export declare const checkCircle: IconData;
23
+ export declare const xCircle: IconData;
24
+ export declare const sun: IconData;
25
+ export declare const moon: IconData;
26
+ export declare const monitor: IconData;
27
+ export declare const user: IconData;
28
+ export declare const users: IconData;
29
+ export declare const home: IconData;
30
+ export declare const settings: IconData;
31
+ export declare const bell: IconData;
32
+ export declare const mail: IconData;
33
+ export declare const calendar: IconData;
34
+ export declare const clock: IconData;
35
+ export declare const heart: IconData;
36
+ export declare const star: IconData;
37
+ export declare const trash: IconData;
38
+ export declare const edit: IconData;
39
+ export declare const copy: IconData;
40
+ export declare const download: IconData;
41
+ export declare const upload: IconData;
42
+ export declare const link: IconData;
43
+ export declare const eye: IconData;
44
+ export declare const eyeOff: IconData;
45
+ export declare const lock: IconData;
46
+ export declare const filter: IconData;
47
+ export declare const sparkles: IconData;
48
+ export declare const palette: IconData;
49
+ export declare const grid: IconData;
50
+ export declare const logOut: IconData;
51
+ export declare const moreVertical: IconData;
52
+ export declare const chevronsUpDown: IconData;
53
+ export declare const arrowUpRight: IconData;
54
+ export declare const refresh: IconData;
55
+ export declare const rotateCcw: IconData;
56
+ export declare const helpCircle: IconData;
57
+ export declare const unlock: IconData;
58
+ export declare const shield: IconData;
59
+ export declare const shieldCheck: IconData;
60
+ export declare const key: IconData;
61
+ export declare const logIn: IconData;
62
+ export declare const userPlus: IconData;
63
+ export declare const folder: IconData;
64
+ export declare const file: IconData;
65
+ export declare const fileText: IconData;
66
+ export declare const image: IconData;
67
+ export declare const paperclip: IconData;
68
+ export declare const bookmark: IconData;
69
+ export declare const tag: IconData;
70
+ export declare const share: IconData;
71
+ export declare const send: IconData;
72
+ export declare const messageCircle: IconData;
73
+ export declare const messageSquare: IconData;
74
+ export declare const phone: IconData;
75
+ export declare const mapPin: IconData;
76
+ export declare const globe: IconData;
77
+ export declare const creditCard: IconData;
78
+ export declare const shoppingCart: IconData;
79
+ export declare const box: IconData;
80
+ export declare const barChart: IconData;
81
+ export declare const pieChart: IconData;
82
+ export declare const trendingUp: IconData;
83
+ export declare const trendingDown: IconData;
84
+ export declare const activity: IconData;
85
+ export declare const zap: IconData;
86
+ export declare const code: IconData;
87
+ export declare const terminal: IconData;
88
+ export declare const database: IconData;
89
+ export declare const server: IconData;
90
+ export declare const cloud: IconData;
91
+ export declare const wifi: IconData;
92
+ export declare const list: IconData;
93
+ export declare const layout: IconData;
94
+ export declare const columns: IconData;
95
+ export declare const sliders: IconData;
96
+ export declare const maximize: IconData;
97
+ export declare const minimize: IconData;
98
+ export declare const play: IconData;
99
+ export declare const pause: IconData;
100
+ export declare const volume: IconData;
101
+ export declare const camera: IconData;
102
+ export declare const mic: IconData;
103
+ export declare const thumbsUp: IconData;
104
+ export declare const gift: IconData;
105
+ export declare const wallet: IconData;
106
+ export declare const briefcase: IconData;
107
+ export declare const flag: IconData;
108
+ export declare const inbox: IconData;
109
+ export declare const archive: IconData;
110
+ export declare const circle: IconData;
111
+ export declare const loader: IconData;
112
+ export declare const bold: IconData;
113
+ export declare const italic: IconData;
114
+ export declare const underline: IconData;
115
+ export declare const strikethrough: IconData;
116
+ export declare const alignLeft: IconData;
117
+ export declare const alignCenter: IconData;
118
+ export declare const alignRight: IconData;
119
+ export declare const gripVertical: IconData;
120
+ export declare const panelLeft: IconData;
121
+ export declare const pipette: IconData;
package/dist/icons.js ADDED
@@ -0,0 +1,119 @@
1
+ export const check = { name: 'check', body: '<path d="M5 12.5l4.5 4.5L19 7.5"/>' };
2
+ export const x = { name: 'x', body: '<path d="M6 6l12 12M18 6L6 18"/>' };
3
+ export const plus = { name: 'plus', body: '<path d="M12 5v14M5 12h14"/>' };
4
+ export const minus = { name: 'minus', body: '<path d="M5 12h14"/>' };
5
+ export const chevronDown = { name: 'chevron-down', body: '<path d="M6 9l6 6 6-6"/>' };
6
+ export const chevronUp = { name: 'chevron-up', body: '<path d="M6 15l6-6 6 6"/>' };
7
+ export const chevronLeft = { name: 'chevron-left', body: '<path d="M15 6l-6 6 6 6"/>' };
8
+ export const chevronRight = { name: 'chevron-right', body: '<path d="M9 6l6 6-6 6"/>' };
9
+ export const arrowRight = { name: 'arrow-right', body: '<path d="M5 12h14M13 6l6 6-6 6"/>' };
10
+ export const arrowLeft = { name: 'arrow-left', body: '<path d="M19 12H5M11 6l-6 6 6 6"/>' };
11
+ export const arrowUp = { name: 'arrow-up', body: '<path d="M12 19V5M6 11l6-6 6 6"/>' };
12
+ export const arrowDown = { name: 'arrow-down', body: '<path d="M12 5v14M6 13l6 6 6-6"/>' };
13
+ export const externalLink = { name: 'external-link', body: '<path d="M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"/>' };
14
+ export const menu = { name: 'menu', body: '<path d="M4 6h16M4 12h16M4 18h16"/>' };
15
+ export const moreHorizontal = { name: 'more-horizontal', body: '<circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/>' };
16
+ export const search = { name: 'search', body: '<circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/>' };
17
+ export const info = { name: 'info', body: '<circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>' };
18
+ export const alertCircle = { name: 'alert-circle', body: '<circle cx="12" cy="12" r="9"/><path d="M12 7.5v5M12 16h.01"/>' };
19
+ export const alertTriangle = { name: 'alert-triangle', body: '<path d="M10.3 4.2L2.6 17.5A2 2 0 0 0 4.3 20.5h15.4a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z"/><path d="M12 9.5v4M12 17h.01"/>' };
20
+ export const checkCircle = { name: 'check-circle', body: '<circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/>' };
21
+ export const xCircle = { name: 'x-circle', body: '<circle cx="12" cy="12" r="9"/><path d="M9 9l6 6M15 9l-6 6"/>' };
22
+ export const sun = { name: 'sun', body: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/>' };
23
+ export const moon = { name: 'moon', body: '<path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z"/>' };
24
+ export const monitor = { name: 'monitor', body: '<rect x="3" y="4" width="18" height="12" rx="1.5"/><path d="M8 20h8M12 16v4"/>' };
25
+ export const user = { name: 'user', body: '<circle cx="12" cy="8" r="4"/><path d="M4 20a8 8 0 0 1 16 0"/>' };
26
+ export const users = { name: 'users', body: '<circle cx="9" cy="8" r="3.5"/><path d="M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14a6.5 6.5 0 0 1 3.5 6"/>' };
27
+ export const home = { name: 'home', body: '<path d="M4 10.5L12 4l8 6.5V19a1 1 0 0 1-1 1h-4.5v-6h-5v6H5a1 1 0 0 1-1-1z"/>' };
28
+ export const settings = { name: 'settings', body: '<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"/>' };
29
+ export const bell = { name: 'bell', body: '<path d="M6 16V11a6 6 0 0 1 12 0v5l1.5 2h-15z"/><path d="M10 21h4"/>' };
30
+ export const mail = { name: 'mail', body: '<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3.5 6.5L12 13l8.5-6.5"/>' };
31
+ export const calendar = { name: 'calendar', body: '<rect x="3.5" y="5" width="17" height="15" rx="2"/><path d="M3.5 10h17M8 3v4M16 3v4"/>' };
32
+ export const clock = { name: 'clock', body: '<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>' };
33
+ export const heart = { name: 'heart', body: '<path d="M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.4 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10z"/>' };
34
+ export const star = { name: 'star', body: '<path d="M12 3.5l2.6 5.4 5.9.8-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.8z"/>' };
35
+ export const trash = { name: 'trash', body: '<path d="M4 7h16M10 11v6M14 11v6M6 7l1 12.5a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5L18 7M9 7V4.5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1V7"/>' };
36
+ export const edit = { name: 'edit', body: '<path d="M4 20h4L19 9a2.1 2.1 0 0 0-3-3L5 17z"/><path d="M14.5 7.5l2 2"/>' };
37
+ export const copy = { name: 'copy', body: '<rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5.5A1.5 1.5 0 0 0 14.5 4h-9A1.5 1.5 0 0 0 4 5.5v9A1.5 1.5 0 0 0 5.5 16H8"/>' };
38
+ export const download = { name: 'download', body: '<path d="M12 4v11M7 10l5 5 5-5M5 20h14"/>' };
39
+ export const upload = { name: 'upload', body: '<path d="M12 15V4M7 9l5-5 5 5M5 20h14"/>' };
40
+ export const link = { name: 'link', body: '<path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/>' };
41
+ export const eye = { name: 'eye', body: '<path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12z"/><circle cx="12" cy="12" r="3"/>' };
42
+ export const eyeOff = { name: 'eye-off', body: '<path d="M4 4l16 16M10.6 6A8.6 8.6 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a16 16 0 0 1-2.6 3.4M6.6 7.6A15.6 15.6 0 0 0 2.5 12S6 18.5 12 18.5a8.7 8.7 0 0 0 4.4-1.2M9.9 9.9a3 3 0 0 0 4.2 4.2"/>' };
43
+ export const lock = { name: 'lock', body: '<rect x="5" y="11" width="14" height="9.5" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/>' };
44
+ export const filter = { name: 'filter', body: '<path d="M4 5h16l-6 7.5V19l-4 1.5v-8z"/>' };
45
+ export const sparkles = { name: 'sparkles', body: '<path d="M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8zM19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z"/>' };
46
+ export const palette = { name: 'palette', body: '<path d="M12 3.5a8.5 8.5 0 0 0 0 17c1.1 0 1.5-.8 1.5-1.5 0-1.6-1.2-1.8-1.2-3 0-.9.7-1.5 1.7-1.5h2.5A4 4 0 0 0 20.5 10.5c0-3.9-3.8-7-8.5-7z"/><circle cx="7.5" cy="11.5" r="1"/><circle cx="10" cy="7.5" r="1"/><circle cx="14.5" cy="7.5" r="1"/>' };
47
+ export const grid = { name: 'grid', body: '<rect x="4" y="4" width="7" height="7" rx="1"/><rect x="13" y="4" width="7" height="7" rx="1"/><rect x="4" y="13" width="7" height="7" rx="1"/><rect x="13" y="13" width="7" height="7" rx="1"/>' };
48
+ export const logOut = { name: 'log-out', body: '<path d="M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 16l-4-4 4-4M6 12h10"/>' };
49
+ export const moreVertical = { name: 'more-vertical', body: '<circle cx="12" cy="5" r="1.2"/><circle cx="12" cy="12" r="1.2"/><circle cx="12" cy="19" r="1.2"/>' };
50
+ export const chevronsUpDown = { name: 'chevrons-up-down', body: '<path d="M7 9l5-5 5 5M7 15l5 5 5-5"/>' };
51
+ export const arrowUpRight = { name: 'arrow-up-right', body: '<path d="M7 17L17 7M8 7h9v9"/>' };
52
+ export const refresh = { name: 'refresh', body: '<path d="M20 11a8 8 0 0 0-14.6-4.5L4 8M4 4v4h4M4 13a8 8 0 0 0 14.6 4.5L20 16M20 20v-4h-4"/>' };
53
+ export const rotateCcw = { name: 'rotate-ccw', body: '<path d="M4 4v5h5"/><path d="M4.6 9A8 8 0 1 1 4 13"/>' };
54
+ export const helpCircle = { name: 'help-circle', body: '<circle cx="12" cy="12" r="9"/><path d="M9.5 9.2a2.6 2.6 0 0 1 5 .9c0 1.7-2.5 2.3-2.5 3.9M12 17h.01"/>' };
55
+ export const unlock = { name: 'unlock', body: '<rect x="4.5" y="11" width="15" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 7.7-1.5"/>' };
56
+ export const shield = { name: 'shield', body: '<path d="M12 3l7.5 3v5.5c0 4.6-3.2 8.3-7.5 9.5-4.3-1.2-7.5-4.9-7.5-9.5V6z"/>' };
57
+ export const shieldCheck = { name: 'shield-check', body: '<path d="M12 3l7.5 3v5.5c0 4.6-3.2 8.3-7.5 9.5-4.3-1.2-7.5-4.9-7.5-9.5V6z"/><path d="M8.8 12.2l2.2 2.2 4.3-4.4"/>' };
58
+ export const key = { name: 'key', body: '<circle cx="8" cy="15" r="4"/><path d="M10.9 12.1L20 3M16 7l3 3M18 5l2 2"/>' };
59
+ export const logIn = { name: 'log-in', body: '<path d="M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 17l5-5-5-5M15 12H4"/>' };
60
+ export const userPlus = { name: 'user-plus', body: '<circle cx="9" cy="8" r="4"/><path d="M2.5 20a6.5 6.5 0 0 1 13 0M19 8v6M16 11h6"/>' };
61
+ export const folder = { name: 'folder', body: '<path d="M3 7a2 2 0 0 1 2-2h4l2 2.5h8a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>' };
62
+ export const file = { name: 'file', body: '<path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/>' };
63
+ export const fileText = { name: 'file-text', body: '<path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5M9 13h6M9 17h6"/>' };
64
+ export const image = { name: 'image', body: '<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="9" cy="9.5" r="1.8"/><path d="M21 16l-5-5-9 9"/>' };
65
+ export const paperclip = { name: 'paperclip', body: '<path d="M20.5 11.5l-8.2 8.2a5 5 0 0 1-7.1-7.1l8.5-8.5a3.4 3.4 0 0 1 4.8 4.8l-8.5 8.5a1.7 1.7 0 0 1-2.4-2.4l7.8-7.8"/>' };
66
+ export const bookmark = { name: 'bookmark', body: '<path d="M6 4a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v17l-6-4-6 4z"/>' };
67
+ export const tag = { name: 'tag', body: '<path d="M3 12V4a1 1 0 0 1 1-1h8l9 9-9 9z"/><circle cx="7.5" cy="7.5" r="1.3"/>' };
68
+ export const share = { name: 'share', body: '<circle cx="18" cy="5" r="2.5"/><circle cx="6" cy="12" r="2.5"/><circle cx="18" cy="19" r="2.5"/><path d="M8.2 10.8l7.6-4.4M8.2 13.2l7.6 4.4"/>' };
69
+ export const send = { name: 'send', body: '<path d="M21 3L10 14M21 3l-7 18-4-7-7-4z"/>' };
70
+ export const messageCircle = { name: 'message-circle', body: '<path d="M21 11.5a8.5 8.5 0 0 1-12.4 7.6L3 21l1.9-5.6A8.5 8.5 0 1 1 21 11.5z"/>' };
71
+ export const messageSquare = { name: 'message-square', body: '<path d="M20 15a2 2 0 0 1-2 2H8l-4 4V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z"/>' };
72
+ export const phone = { name: 'phone', body: '<path d="M21 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 1.1 4.2 2 2 0 0 1 3.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L7.1 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z"/>' };
73
+ export const mapPin = { name: 'map-pin', body: '<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0z"/><circle cx="12" cy="10" r="3"/>' };
74
+ export const globe = { name: 'globe', body: '<circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/>' };
75
+ export const creditCard = { name: 'credit-card', body: '<rect x="2.5" y="5" width="19" height="14" rx="2"/><path d="M2.5 10h19M6 15h4"/>' };
76
+ export const shoppingCart = { name: 'shopping-cart', body: '<circle cx="9" cy="20" r="1.3"/><circle cx="18" cy="20" r="1.3"/><path d="M2 3h3l2.7 12.4a2 2 0 0 0 2 1.6h8.6a2 2 0 0 0 2-1.5L22 7H6"/>' };
77
+ export const box = { name: 'box', body: '<path d="M21 8l-9-5-9 5v8l9 5 9-5z"/><path d="M3 8l9 5 9-5M12 13v8M7.5 5.5l9 5"/>' };
78
+ export const barChart = { name: 'bar-chart', body: '<path d="M4 20V10M10 20V4M16 20v-7M22 20H2"/>' };
79
+ export const pieChart = { name: 'pie-chart', body: '<path d="M21 12a9 9 0 1 1-9-9v9z"/><path d="M15 3.5A9 9 0 0 1 20.5 9H15z"/>' };
80
+ export const trendingUp = { name: 'trending-up', body: '<path d="M3 17l6-6 4 4 8-8M15 7h6v6"/>' };
81
+ export const trendingDown = { name: 'trending-down', body: '<path d="M3 7l6 6 4-4 8 8M15 17h6v-6"/>' };
82
+ export const activity = { name: 'activity', body: '<path d="M3 12h4l3-8 4 16 3-8h4"/>' };
83
+ export const zap = { name: 'zap', body: '<path d="M13 2L4 14h7l-1 8 9-12h-7z"/>' };
84
+ export const code = { name: 'code', body: '<path d="M8 7l-5 5 5 5M16 7l5 5-5 5"/>' };
85
+ export const terminal = { name: 'terminal', body: '<path d="M4 17l6-5-6-5M12 19h8"/>' };
86
+ export const database = { name: 'database', body: '<ellipse cx="12" cy="5.5" rx="8" ry="3"/><path d="M4 5.5v13c0 1.7 3.6 3 8 3s8-1.3 8-3v-13M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/>' };
87
+ export const server = { name: 'server', body: '<rect x="3" y="3.5" width="18" height="7" rx="2"/><rect x="3" y="13.5" width="18" height="7" rx="2"/><path d="M7 7h.01M7 17h.01"/>' };
88
+ export const cloud = { name: 'cloud', body: '<path d="M17.5 19a4.5 4.5 0 0 0 .6-9 6.5 6.5 0 0 0-12.6 1.6A4 4 0 0 0 6 19z"/>' };
89
+ export const wifi = { name: 'wifi', body: '<path d="M2 8.8a15 15 0 0 1 20 0M5 12.5a10 10 0 0 1 14 0M8.5 16a5 5 0 0 1 7 0M12 19.5h.01"/>' };
90
+ export const list = { name: 'list', body: '<path d="M9 6h12M9 12h12M9 18h12M4 6h.01M4 12h.01M4 18h.01"/>' };
91
+ export const layout = { name: 'layout', body: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M9 21V9"/>' };
92
+ export const columns = { name: 'columns', body: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 3v18"/>' };
93
+ export const sliders = { name: 'sliders', body: '<path d="M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0"/><circle cx="16" cy="6" r="2"/><circle cx="10" cy="12" r="2"/><circle cx="18" cy="18" r="2"/>' };
94
+ export const maximize = { name: 'maximize', body: '<path d="M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3"/>' };
95
+ export const minimize = { name: 'minimize', body: '<path d="M8 3v3a2 2 0 0 1-2 2H3M16 3v3a2 2 0 0 0 2 2h3M8 21v-3a2 2 0 0 0-2-2H3M16 21v-3a2 2 0 0 1 2-2h3"/>' };
96
+ export const play = { name: 'play', body: '<path d="M7 4.5v15l12-7.5z"/>' };
97
+ export const pause = { name: 'pause', body: '<path d="M8 5v14M16 5v14"/>' };
98
+ export const volume = { name: 'volume', body: '<path d="M11 5L6 9H3v6h3l5 4zM15.5 8.5a5 5 0 0 1 0 7M18.5 5.5a9 9 0 0 1 0 13"/>' };
99
+ export const camera = { name: 'camera', body: '<path d="M3 8a2 2 0 0 1 2-2h2.5l1.5-2h6l1.5 2H19a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><circle cx="12" cy="13" r="3.5"/>' };
100
+ export const mic = { name: 'mic', body: '<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0M12 18v3"/>' };
101
+ export const thumbsUp = { name: 'thumbs-up', body: '<path d="M7 10v11M7 10l4-7a2.5 2.5 0 0 1 2.5 2.5V9h5.3a2 2 0 0 1 2 2.3l-1.4 8a2 2 0 0 1-2 1.7H7M7 10H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h3"/>' };
102
+ export const gift = { name: 'gift', body: '<rect x="3" y="8" width="18" height="5" rx="1"/><path d="M5 13v7a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-7M12 8v13M12 8S10.5 3 8 3.5 6.5 8 12 8zM12 8s1.5-5 4-4.5S17.5 8 12 8z"/>' };
103
+ export const wallet = { name: 'wallet', body: '<path d="M19 7V5a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V6"/><path d="M17 14h.01"/>' };
104
+ export const briefcase = { name: 'briefcase', body: '<rect x="3" y="7" width="18" height="13" rx="2"/><path d="M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2M3 13h18"/>' };
105
+ export const flag = { name: 'flag', body: '<path d="M5 21V4M5 4h11l-2 4 2 4H5"/>' };
106
+ export const inbox = { name: 'inbox', body: '<path d="M3 13l2.5-8h13L21 13v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"/><path d="M3 13h5l1.5 2.5h5L16 13h5"/>' };
107
+ export const archive = { name: 'archive', body: '<rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v11a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8M10 12h4"/>' };
108
+ export const circle = { name: 'circle', body: '<circle cx="12" cy="12" r="9"/>' };
109
+ export const loader = { name: 'loader', body: '<path d="M12 3v3M12 18v3M4.2 7.5l2.6 1.5M17.2 15l2.6 1.5M4.2 16.5l2.6-1.5M17.2 9l2.6-1.5"/>' };
110
+ export const bold = { name: 'bold', body: '<path d="M7 5h6a3.5 3.5 0 0 1 0 7H7zM7 12h7a3.5 3.5 0 0 1 0 7H7z"/>' };
111
+ export const italic = { name: 'italic', body: '<path d="M10 5h8M6 19h8M14 5l-4 14"/>' };
112
+ export const underline = { name: 'underline', body: '<path d="M7 4v7a5 5 0 0 0 10 0V4M5 20h14"/>' };
113
+ export const strikethrough = { name: 'strikethrough', body: '<path d="M4 12h16M16.5 7.5C16 5.5 14.2 4.5 12 4.5c-2.7 0-4.5 1.4-4.5 3.4 0 1.3.7 2.3 2.3 2.9M8 16c.5 2 2.3 3.5 4.5 3.5 2.7 0 4.5-1.5 4.5-3.5 0-.9-.3-1.6-.9-2.2"/>' };
114
+ export const alignLeft = { name: 'align-left', body: '<path d="M4 6h16M4 12h10M4 18h13"/>' };
115
+ export const alignCenter = { name: 'align-center', body: '<path d="M4 6h16M7 12h10M5.5 18h13"/>' };
116
+ export const alignRight = { name: 'align-right', body: '<path d="M4 6h16M10 12h10M7 18h13"/>' };
117
+ export const gripVertical = { name: 'grip-vertical', body: '<circle cx="9" cy="6" r="1"/><circle cx="15" cy="6" r="1"/><circle cx="9" cy="12" r="1"/><circle cx="15" cy="12" r="1"/><circle cx="9" cy="18" r="1"/><circle cx="15" cy="18" r="1"/>' };
118
+ export const panelLeft = { name: 'panel-left', body: '<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16"/>' };
119
+ export const pipette = { name: 'pipette', body: '<path d="m2 22 1-1h3l9-9M3 21v-3l9-9"/><path d="m15 6 3.4-3.4a2.1 2.1 0 1 1 3 3L18 9l.4.4a2.1 2.1 0 1 1-3 3l-3.8-3.8a2.1 2.1 0 1 1 3-3l.4.4Z"/>' };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @prismora/icons — 24×24 stroke icons. Each icon is a named export, so your bundle contains only
3
+ * the icons you import:
4
+ *
5
+ * import { icon, check, trash } from '@prismora/icons';
6
+ * el.innerHTML = icon(trash, { label: 'Delete' });
7
+ *
8
+ * Need lookup by name (CMS content, icon pickers)? `import { iconByName } from '@prismora/icons/all'`
9
+ * (ships the whole set). Icons inherit `currentColor`, size to `1em`, and read `--pm-icon-stroke` (default 2).
10
+ */
11
+ import type { IconData } from './types.js';
12
+ export * from './icons.js';
13
+ export type { IconData };
14
+ export interface IconOptions {
15
+ /** CSS size (default `1em`). */
16
+ size?: string | number;
17
+ /** Accessible name. Omit for decorative icons (aria-hidden). */
18
+ label?: string;
19
+ /** Extra class names. */
20
+ class?: string;
21
+ /** Stroke width override. */
22
+ strokeWidth?: number;
23
+ }
24
+ /** SVG markup for an icon (safe for innerHTML / SSR). */
25
+ export declare function icon(data: IconData, opts?: IconOptions): string;
26
+ /** Same as `icon()` but returns an SVGElement (browser only). */
27
+ export declare function iconElement(data: IconData, opts?: IconOptions): SVGSVGElement;
28
+ /** CSS `mask-image` value, for icons in pure CSS (e.g. `mask: var(--x) center / contain no-repeat`). */
29
+ export declare function iconDataUrl(data: IconData, strokeWidth?: number): string;
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ export * from './icons.js';
2
+ const esc = (s) => s.replace(/[&<>"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' })[c]);
3
+ /** SVG markup for an icon (safe for innerHTML / SSR). */
4
+ export function icon(data, opts = {}) {
5
+ if (!data?.body)
6
+ throw new Error('icon(): pass icon data, e.g. icon(check). For names use iconByName from @prismora/icons/all.');
7
+ const size = typeof opts.size === 'number' ? `${opts.size}px` : (opts.size ?? '1em');
8
+ const a11y = opts.label ? `role="img" aria-label="${esc(opts.label)}"` : 'aria-hidden="true" focusable="false"';
9
+ const sw = opts.strokeWidth ?? 'var(--pm-icon-stroke, 2)';
10
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="${esc(size)}" height="${esc(size)}" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" class="pm-icon${opts.class ? ` ${esc(opts.class)}` : ''}" data-icon="${data.name}" style="stroke-width:${sw};flex:none" ${a11y}>${data.body}</svg>`;
11
+ }
12
+ /** Same as `icon()` but returns an SVGElement (browser only). */
13
+ export function iconElement(data, opts = {}) {
14
+ const t = document.createElement('template');
15
+ t.innerHTML = icon(data, opts);
16
+ return t.content.firstElementChild;
17
+ }
18
+ /** CSS `mask-image` value, for icons in pure CSS (e.g. `mask: var(--x) center / contain no-repeat`). */
19
+ export function iconDataUrl(data, strokeWidth = 2) {
20
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="${strokeWidth}" stroke-linecap="round" stroke-linejoin="round">${data.body}</svg>`;
21
+ return `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
22
+ }
@@ -0,0 +1,6 @@
1
+ export interface IconData {
2
+ /** Kebab-case name, e.g. `chevron-down`. */
3
+ readonly name: string;
4
+ /** SVG children for a 24×24 viewBox, stroke = currentColor. */
5
+ readonly body: string;
6
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,42 @@
1
1
  {
2
2
  "name": "@prismora/icons",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Tree-shakable stroke icons for Prismora (24×24, currentColor, CSS-sizable). One named export per icon.",
5
+ "keywords": [
6
+ "prismora",
7
+ "design-system",
8
+ "icons",
9
+ "svg"
10
+ ],
11
+ "homepage": "https://prismora.design",
12
+ "bugs": {
13
+ "url": "https://github.com/axxra/prismora/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/axxra/prismora.git",
18
+ "directory": "packages/icons"
19
+ },
20
+ "license": "MIT",
21
+ "author": "Aravind Kumar",
22
+ "type": "module",
23
+ "main": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "default": "./dist/index.js"
29
+ },
30
+ "./all": {
31
+ "types": "./dist/all.d.ts",
32
+ "default": "./dist/all.js"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist"
37
+ ],
38
+ "sideEffects": false,
39
+ "publishConfig": {
40
+ "access": "public"
41
+ }
42
+ }