@fluxus-ui/icons 0.0.0-stage → 0.2.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/dist/index.cjs ADDED
@@ -0,0 +1,673 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ REST: () => REST,
24
+ arrowDown: () => arrowDown,
25
+ arrowLeft: () => arrowLeft,
26
+ arrowRight: () => arrowRight,
27
+ arrowUp: () => arrowUp,
28
+ attachIcon: () => attachIcon,
29
+ bell: () => bell,
30
+ calendar: () => calendar,
31
+ check: () => check,
32
+ chevron: () => chevron,
33
+ close: () => close,
34
+ copy: () => copy,
35
+ error: () => error,
36
+ iconMarkup: () => iconMarkup,
37
+ image: () => image,
38
+ inbox: () => inbox,
39
+ list: () => list,
40
+ lock: () => lock,
41
+ login: () => login,
42
+ logout: () => logout,
43
+ menu: () => menu,
44
+ mic: () => mic,
45
+ partsMarkup: () => partsMarkup,
46
+ pencil: () => pencil,
47
+ play: () => play,
48
+ plus: () => plus,
49
+ refresh: () => refresh,
50
+ shield: () => shield,
51
+ sidebar: () => sidebar,
52
+ stack: () => stack,
53
+ tick: () => tick,
54
+ trash: () => trash,
55
+ upload: () => upload,
56
+ user: () => user,
57
+ validateIcon: () => validateIcon,
58
+ wand: () => wand
59
+ });
60
+ module.exports = __toCommonJS(src_exports);
61
+
62
+ // src/attach.ts
63
+ var import_base = require("@fluxus-ui/core/base");
64
+
65
+ // src/pose.ts
66
+ var REST = "rest";
67
+ var poseOf = (part, state, progress) => {
68
+ const p = { ...part.rest, ...state ? part.on?.[state] : void 0 };
69
+ return { d: p.d ?? part.d, x: p.x ?? 0, y: p.y ?? 0, r: p.r ?? 0, s: p.s ?? 1, draw: p.draw === "p" ? progress : p.draw ?? 1, o: p.o ?? 1 };
70
+ };
71
+ var draws = (part) => [part.rest, ...Object.values(part.on ?? {})].some((p) => p?.draw !== void 0);
72
+ var n = (v) => String(+v.toFixed(2));
73
+ var attrsOf = (part, pose) => {
74
+ const [cx, cy] = part.c ?? [8, 8];
75
+ const t = (pose.x || pose.y ? `translate(${n(pose.x)} ${n(pose.y)})` : "") + (pose.r ? `rotate(${n(pose.r)} ${cx} ${cy})` : "") + (pose.s !== 1 ? `translate(${cx} ${cy})scale(${n(pose.s)})translate(${-cx} ${-cy})` : "");
76
+ const hidden = pose.draw < 1e-3 || pose.o < 1e-3;
77
+ return {
78
+ d: pose.d,
79
+ transform: t || null,
80
+ // With round caps a dash of 0 still paints a dot: a part not drawn at all is hidden instead.
81
+ "stroke-dasharray": pose.draw > 0.999 || hidden ? null : `${n(pose.draw)} 2`,
82
+ visibility: hidden ? "hidden" : null,
83
+ opacity: pose.o > 0.999 || hidden ? null : n(pose.o)
84
+ };
85
+ };
86
+ var esc = (s) => s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;");
87
+ var partsMarkup = (def, state, progress = 0) => def.parts.map((part) => {
88
+ const attrs = attrsOf(part, poseOf(part, state, progress));
89
+ let out = `<path data-p="${part.id}"`;
90
+ if (draws(part)) out += ' pathLength="1"';
91
+ if (part.fill) out += ' fill="currentColor"';
92
+ for (const [k, v] of Object.entries(attrs)) if (v !== null) out += ` ${k}="${v}"`;
93
+ return `${out}/>`;
94
+ }).join("");
95
+ var iconMarkup = (def, { state, progress, label, className } = {}) => `<svg class="${esc(className ? `fx-i ${className}` : "fx-i")}" data-fx-icon="${def.name}"` + (state ? ` data-state="${esc(state)}"` : "") + (progress !== void 0 ? ` data-progress="${n(progress)}"` : "") + ' viewBox="0 0 16 16" width="1em" height="1em" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"' + (label ? ` role="img" aria-label="${esc(label)}"` : ' aria-hidden="true"') + `>${partsMarkup(def, state, progress)}</svg>`;
96
+ var parse = (d) => (d.match(/[A-Z]|-?[\d.]+/g) ?? []).map((t) => /[A-Z]/.test(t) ? t : Number(t));
97
+ var mix = (a, b, t) => a.map((v, i) => typeof v === "number" ? n(v + (b[i] - v) * t) : v).join(" ");
98
+ var ARGS = { M: 2, L: 2, H: 1, V: 1, C: 6, S: 4, Q: 4, T: 2, A: 7, Z: 0 };
99
+ var shape = (d) => {
100
+ const num = "-?\\d+(?:\\.\\d+)?";
101
+ const cmd = `[MLHVCSQTAZ](?:${num}(?: ${num})*)?`;
102
+ if (!new RegExp(`^${cmd}(?: ${cmd})*$`).test(d)) return "absolute commands and numbers apart by single spaces";
103
+ let cmds = "";
104
+ let flags = "";
105
+ for (const chunk of d.split(/ (?=[A-Z])/)) {
106
+ const cmd2 = chunk[0];
107
+ const args = chunk.slice(1).split(" ").filter(Boolean);
108
+ const per = ARGS[cmd2];
109
+ if (per === 0 ? args.length !== 0 : args.length === 0 || args.length % per !== 0) return `${cmd2} takes ${per} numbers`;
110
+ cmds += `${cmd2}${args.length}`;
111
+ if (cmd2 === "A") for (let i = 0; i < args.length; i += 7) flags += `${args[i + 3]}${args[i + 4]}`;
112
+ }
113
+ return { cmds, flags };
114
+ };
115
+ function validateIcon(def) {
116
+ const out = [];
117
+ const bad = (what) => void out.push(`${def.name}: ${what}`);
118
+ if (!/^[a-z][a-z0-9-]*$/.test(def.name)) bad("its name is not kebab-case");
119
+ const ids = /* @__PURE__ */ new Set();
120
+ for (const part of def.parts) {
121
+ if (!part.id || ids.has(part.id)) bad(`part id "${part.id}" is empty or repeated`);
122
+ ids.add(part.id);
123
+ const base = shape(part.d);
124
+ if (typeof base === "string") bad(`${part.id}: ${base}`);
125
+ if (part.lag !== void 0 && (part.lag < 0 || part.lag > 0.5)) bad(`${part.id}: lag is 0\u20130.5`);
126
+ for (const [state, pose] of [["rest", part.rest], ...Object.entries(part.on ?? {})]) {
127
+ if (!pose) continue;
128
+ if (pose.d !== void 0) {
129
+ const other = shape(pose.d);
130
+ if (typeof other === "string") bad(`${part.id}@${state}: ${other}`);
131
+ else if (typeof base !== "string" && other.cmds !== base.cmds) bad(`${part.id}@${state}: not the same commands as at rest`);
132
+ else if (typeof base !== "string" && other.flags !== base.flags) bad(`${part.id}@${state}: arc flags differ from the ones at rest`);
133
+ }
134
+ if (typeof pose.draw === "number" && (pose.draw < 0 || pose.draw > 1)) bad(`${part.id}@${state}: draw is 0\u20131`);
135
+ if (pose.o !== void 0 && (pose.o < 0 || pose.o > 1)) bad(`${part.id}@${state}: o is 0\u20131`);
136
+ }
137
+ }
138
+ for (const [name, kicks] of Object.entries(def.kicks ?? {})) {
139
+ for (const kick of kicks) {
140
+ if (kick.p !== "*" && !ids.has(kick.p)) bad(`kick ${name}: no part "${kick.p}"`);
141
+ if (!"xyrs".includes(kick.k) || kick.k.length !== 1) bad(`kick ${name}: "${kick.k}" is not x, y, r or s`);
142
+ }
143
+ }
144
+ return out;
145
+ }
146
+
147
+ // src/attach.ts
148
+ var NUMS = ["x", "y", "r", "s", "draw", "o"];
149
+ var CONTROL = "[aria-pressed],[aria-expanded],[aria-checked]";
150
+ var HOST = 'a,button,summary,label,[role="button"],[role="menuitem"],[role="tab"],[role="switch"],[role="checkbox"]';
151
+ var WATCHED = ["aria-pressed", "aria-expanded", "aria-checked"];
152
+ function attachIcon(svg, def, options = {}) {
153
+ const reduced = () => (options.respectReducedMotion ?? true) && (0, import_base.prefersReducedMotion)();
154
+ const control = svg.closest(CONTROL);
155
+ const target = svg.closest(HOST) ?? control ?? svg;
156
+ const stateOf = () => svg.dataset.state ?? (control && WATCHED.some((a) => control.getAttribute(a) === "true") ? "on" : REST);
157
+ const progressOf = () => Math.min(1, Math.max(0, Number(svg.dataset.progress) || 0));
158
+ let state = stateOf();
159
+ let ends = [state, state];
160
+ let aim = 1;
161
+ let g = 1;
162
+ let motion = null;
163
+ const timers = /* @__PURE__ */ new Set();
164
+ const lives = [];
165
+ for (const part of def.parts) {
166
+ const el = svg.querySelector(`[data-p="${part.id}"]`);
167
+ if (!el) continue;
168
+ const pose = poseOf(part, state, progressOf());
169
+ lives.push({ part, el, from: pose, to: pose, off: { x: 0, y: 0, r: 0, s: 0 }, pushes: {} });
170
+ }
171
+ const now = (live) => {
172
+ const lag = live.part.lag ?? 0;
173
+ const t = lag ? Math.max(0, (g - lag) / (1 - lag)) : g;
174
+ const { from, to } = live;
175
+ const pose = { ...to, d: from.d === to.d ? to.d : t >= 1 ? to.d : t <= 0 ? from.d : mix(parse(from.d), parse(to.d), t) };
176
+ for (const k of NUMS) pose[k] = from[k] + (to[k] - from[k]) * t;
177
+ pose.draw = Math.min(1, Math.max(0, pose.draw));
178
+ pose.o = Math.min(1, Math.max(0, pose.o));
179
+ return pose;
180
+ };
181
+ const paint = () => {
182
+ for (const live of lives) {
183
+ const pose = now(live);
184
+ const { off } = live;
185
+ const attrs = attrsOf(live.part, { ...pose, x: pose.x + off.x, y: pose.y + off.y, r: pose.r + off.r, s: pose.s + off.s });
186
+ for (const [k, v] of Object.entries(attrs)) {
187
+ if (v === null) live.el.removeAttribute(k);
188
+ else if (live.el.getAttribute(k) !== v) live.el.setAttribute(k, v);
189
+ }
190
+ }
191
+ };
192
+ const settle = () => {
193
+ for (const live of lives) live.from = live.to = aim ? live.to : live.from;
194
+ ends = [state, state];
195
+ aim = 1;
196
+ g = 1;
197
+ paint();
198
+ };
199
+ const go = (next, force = false) => {
200
+ if (next === state && !force) return;
201
+ const running = motion !== null && !motion.done;
202
+ if (reduced()) {
203
+ motion?.stop();
204
+ motion = null;
205
+ state = next;
206
+ aim = 1;
207
+ for (const live of lives) live.to = poseOf(live.part, next, progressOf());
208
+ settle();
209
+ return;
210
+ }
211
+ if (running && !force && next === ends[1 - aim]) {
212
+ aim = aim ? 0 : 1;
213
+ state = next;
214
+ motion.retarget(aim);
215
+ } else {
216
+ for (const live of lives) {
217
+ live.from = now(live);
218
+ live.to = poseOf(live.part, next, progressOf());
219
+ }
220
+ motion?.stop();
221
+ ends = [running || force ? null : state, next];
222
+ state = next;
223
+ aim = 1;
224
+ g = 0;
225
+ motion = (0, import_base.spring)({
226
+ from: 0,
227
+ to: 1,
228
+ stiffness: 320,
229
+ damping: 26,
230
+ restDelta: 2e-3,
231
+ onUpdate: (v) => {
232
+ g = v;
233
+ paint();
234
+ },
235
+ onRest: settle
236
+ });
237
+ }
238
+ if (!force) kick(next);
239
+ };
240
+ const kick = (name) => {
241
+ if (reduced()) return;
242
+ for (const k of def.kicks?.[name] ?? []) {
243
+ const start = () => {
244
+ for (const live of lives) {
245
+ if (k.p !== "*" && k.p !== live.part.id) continue;
246
+ const old = live.pushes[k.k];
247
+ const carried = old && !old.done ? old.velocity : 0;
248
+ old?.stop();
249
+ const to = k.to ?? 0;
250
+ live.pushes[k.k] = (0, import_base.spring)({
251
+ from: live.off[k.k],
252
+ to,
253
+ velocity: carried + (k.v ?? 0),
254
+ ...to ? { stiffness: 120, damping: 20 } : { stiffness: 180, damping: 12 },
255
+ restDelta: k.k === "s" ? 2e-3 : 0.05,
256
+ restSpeed: 0.05,
257
+ onUpdate: (v) => {
258
+ live.off[k.k] = v;
259
+ if (!motion || motion.done) paint();
260
+ },
261
+ onRest: () => {
262
+ live.off[k.k] = 0;
263
+ paint();
264
+ }
265
+ });
266
+ }
267
+ };
268
+ if (k.wait) {
269
+ const timer = window.setTimeout(() => {
270
+ timers.delete(timer);
271
+ start();
272
+ }, k.wait);
273
+ timers.add(timer);
274
+ } else start();
275
+ }
276
+ };
277
+ paint();
278
+ const watcher = new MutationObserver((records) => {
279
+ go(stateOf(), records.some((r) => r.attributeName === "data-progress"));
280
+ });
281
+ watcher.observe(svg, { attributes: true, attributeFilter: ["data-state", "data-progress"] });
282
+ if (control) watcher.observe(control, { attributes: true, attributeFilter: WATCHED });
283
+ const onEnter = (e) => {
284
+ if (e.pointerType === "mouse") kick("hover");
285
+ };
286
+ const onClick = () => kick("press");
287
+ target.addEventListener("pointerenter", onEnter);
288
+ target.addEventListener("click", onClick);
289
+ return {
290
+ kick,
291
+ destroy() {
292
+ watcher.disconnect();
293
+ target.removeEventListener("pointerenter", onEnter);
294
+ target.removeEventListener("click", onClick);
295
+ motion?.stop();
296
+ for (const timer of timers) clearTimeout(timer);
297
+ for (const live of lives) {
298
+ for (const push of Object.values(live.pushes)) push.stop();
299
+ live.off = { x: 0, y: 0, r: 0, s: 0 };
300
+ }
301
+ settle();
302
+ }
303
+ };
304
+ }
305
+
306
+ // src/icons/arrow-down.ts
307
+ var arrowDown = {
308
+ name: "arrow-down",
309
+ parts: [{ id: "a", d: "M8 3 L8 13 M4 9 L8 13 L12 9" }],
310
+ kicks: { hover: [{ p: "*", k: "y", v: 28 }] }
311
+ };
312
+
313
+ // src/icons/arrow-left.ts
314
+ var arrowLeft = {
315
+ name: "arrow-left",
316
+ parts: [{ id: "a", d: "M13 8 L3 8 M7 4 L3 8 L7 12" }],
317
+ kicks: { hover: [{ p: "*", k: "x", v: -28 }] }
318
+ };
319
+
320
+ // src/icons/arrow-right.ts
321
+ var arrowRight = {
322
+ name: "arrow-right",
323
+ parts: [{ id: "a", d: "M3 8 L13 8 M9 4 L13 8 L9 12" }],
324
+ kicks: { hover: [{ p: "*", k: "x", v: 28 }] }
325
+ };
326
+
327
+ // src/icons/arrow-up.ts
328
+ var arrowUp = {
329
+ name: "arrow-up",
330
+ parts: [{ id: "a", d: "M8 13 L8 3 M4 7 L8 3 L12 7" }],
331
+ kicks: { hover: [{ p: "*", k: "y", v: -28 }] }
332
+ };
333
+
334
+ // src/icons/bell.ts
335
+ var bell = {
336
+ name: "bell",
337
+ parts: [
338
+ { id: "body", d: "M3.5 11.5 L4.5 10.5 V7 A3.5 3.5 0 0 1 11.5 7 V10.5 L12.5 11.5 Z", c: [8, 3] },
339
+ { id: "clapper", d: "M6.75 13.5 A1.3 1.3 0 0 0 9.25 13.5", c: [8, 3] },
340
+ { id: "dot", d: "M12 3.5 V3.51", c: [12, 3.5], rest: { o: 0, s: 0 }, on: { on: { o: 1, s: 1 } } }
341
+ ],
342
+ kicks: {
343
+ hover: [
344
+ { p: "body", k: "r", v: 210 },
345
+ { p: "clapper", k: "r", v: 330, wait: 40 }
346
+ ],
347
+ on: [
348
+ { p: "body", k: "r", v: 300 },
349
+ { p: "clapper", k: "r", v: 460, wait: 40 }
350
+ ]
351
+ }
352
+ };
353
+
354
+ // src/icons/calendar.ts
355
+ var calendar = {
356
+ name: "calendar",
357
+ parts: [
358
+ { id: "p1", d: "M4 3.5 H12 A1.5 1.5 0 0 1 13.5 5 V12 A1.5 1.5 0 0 1 12 13.5 H4 A1.5 1.5 0 0 1 2.5 12 V5 A1.5 1.5 0 0 1 4 3.5 Z" },
359
+ { id: "p2", d: "M2.5 6.5 H13.5 M5.5 2 V5 M10.5 2 V5" }
360
+ ]
361
+ };
362
+
363
+ // src/icons/check.ts
364
+ var check = {
365
+ name: "check",
366
+ parts: [
367
+ { id: "ring", d: "M8 2.5 A5.5 5.5 0 1 1 8 13.5 A5.5 5.5 0 1 1 8 2.5 Z", on: { off: { draw: 0 } } },
368
+ { id: "tick", d: "M5.4 8.2 L7.2 10 L10.6 6.2", lag: 0.35, on: { off: { draw: 0 } } }
369
+ ],
370
+ kicks: { rest: [{ p: "*", k: "s", v: 1.2, wait: 160 }] }
371
+ };
372
+
373
+ // src/icons/chevron.ts
374
+ var chevron = {
375
+ name: "chevron",
376
+ parts: [{ id: "v", d: "M4.5 6.25 L8 9.75 L11.5 6.25", on: { on: { r: -180 } } }]
377
+ };
378
+
379
+ // src/icons/close.ts
380
+ var close = {
381
+ name: "close",
382
+ parts: [{ id: "x", d: "M4 4 L12 12 M12 4 L4 12" }],
383
+ kicks: {
384
+ hover: [{ p: "*", k: "r", v: 240 }],
385
+ press: [{ p: "*", k: "s", v: -2.5 }]
386
+ }
387
+ };
388
+
389
+ // src/icons/copy.ts
390
+ var copy = {
391
+ name: "copy",
392
+ parts: [
393
+ { id: "back", d: "M5.5 5.5 V3.5 A1 1 0 0 1 6.5 2.5 H12.5 A1 1 0 0 1 13.5 3.5 V9.5 A1 1 0 0 1 12.5 10.5 H10.5", on: { done: { draw: 0 } } },
394
+ { id: "front", d: "M3.5 5.5 H9.5 A1 1 0 0 1 10.5 6.5 V12.5 A1 1 0 0 1 9.5 13.5 H3.5 A1 1 0 0 1 2.5 12.5 V6.5 A1 1 0 0 1 3.5 5.5 Z" },
395
+ { id: "tick", d: "M4.5 9.6 L6 11.1 L8.6 8", lag: 0.3, rest: { draw: 0 }, on: { done: { draw: 1 } } }
396
+ ],
397
+ kicks: { done: [{ p: "front", k: "s", v: 1.6 }] }
398
+ };
399
+
400
+ // src/icons/error.ts
401
+ var error = {
402
+ name: "error",
403
+ parts: [
404
+ { id: "ring", d: "M8 2.5 A5.5 5.5 0 1 1 8 13.5 A5.5 5.5 0 1 1 8 2.5 Z", on: { off: { draw: 0 } } },
405
+ { id: "bar", d: "M8 5 V8.5", lag: 0.3, on: { off: { draw: 0 } } },
406
+ { id: "dot", d: "M8 11 V11.01", lag: 0.4, on: { off: { o: 0 } } }
407
+ ],
408
+ kicks: { rest: [{ p: "*", k: "x", v: 36, wait: 120 }] }
409
+ };
410
+
411
+ // src/icons/image.ts
412
+ var image = {
413
+ name: "image",
414
+ parts: [
415
+ { id: "p1", d: "M4 2.5 H12 A1.5 1.5 0 0 1 13.5 4 V12 A1.5 1.5 0 0 1 12 13.5 H4 A1.5 1.5 0 0 1 2.5 12 V4 A1.5 1.5 0 0 1 4 2.5 Z" },
416
+ { id: "p2", d: "M6 4.8 A1.2 1.2 0 1 1 6 7.2 A1.2 1.2 0 1 1 6 4.8 Z" },
417
+ { id: "p3", d: "M3 12 L6.5 8.5 L8.5 10.5 L11 8 L13.5 10.5" }
418
+ ]
419
+ };
420
+
421
+ // src/icons/inbox.ts
422
+ var inbox = {
423
+ name: "inbox",
424
+ parts: [
425
+ { id: "p1", d: "M2.5 9 H5.5 L6.5 11 H9.5 L10.5 9 H13.5" },
426
+ { id: "p2", d: "M4 3.5 H12 L13.5 9 V12.5 A1 1 0 0 1 12.5 13.5 H3.5 A1 1 0 0 1 2.5 12.5 V9 Z" }
427
+ ]
428
+ };
429
+
430
+ // src/icons/list.ts
431
+ var list = {
432
+ name: "list",
433
+ parts: [
434
+ { id: "p1", d: "M3 4 H13 M3 8 H13 M3 12 H9" }
435
+ ]
436
+ };
437
+
438
+ // src/icons/lock.ts
439
+ var lock = {
440
+ name: "lock",
441
+ parts: [
442
+ { id: "body", d: "M4.5 7.5 H11.5 A1 1 0 0 1 12.5 8.5 V12.5 A1 1 0 0 1 11.5 13.5 H4.5 A1 1 0 0 1 3.5 12.5 V8.5 A1 1 0 0 1 4.5 7.5 Z" },
443
+ { id: "shackle", d: "M5.5 7.5 V5.5 A2.5 2.5 0 0 1 10.5 5.5 V7.5", on: { open: { y: -1.25, d: "M5.5 8.75 V5.5 A2.5 2.5 0 0 1 10.5 5.5 V6.5" } } }
444
+ ],
445
+ kicks: { hover: [{ p: "shackle", k: "y", v: -16 }] }
446
+ };
447
+
448
+ // src/icons/login.ts
449
+ var login = {
450
+ name: "login",
451
+ parts: [
452
+ { id: "door", d: "M9.5 2.5 H12.5 A1 1 0 0 1 13.5 3.5 V12.5 A1 1 0 0 1 12.5 13.5 H9.5" },
453
+ { id: "arrow", d: "M6.5 5 L9.5 8 L6.5 11 M9.5 8 L2.5 8" }
454
+ ],
455
+ kicks: { hover: [{ p: "arrow", k: "x", v: 24 }] }
456
+ };
457
+
458
+ // src/icons/logout.ts
459
+ var logout = {
460
+ name: "logout",
461
+ parts: [
462
+ { id: "p1", d: "M6.5 13.5 H3.5 A1 1 0 0 1 2.5 12.5 V3.5 A1 1 0 0 1 3.5 2.5 H6.5" },
463
+ { id: "p2", d: "M10.5 11 L13.5 8 L10.5 5 M13.5 8 H6" }
464
+ ]
465
+ };
466
+
467
+ // src/icons/menu.ts
468
+ var menu = {
469
+ name: "menu",
470
+ parts: [
471
+ { id: "top", d: "M3 4.5 L13 4.5", on: { on: { d: "M4 4 L12 12" } } },
472
+ { id: "mid", d: "M3 8 L13 8", on: { on: { s: 0.2, o: 0 } } },
473
+ { id: "low", d: "M3 11.5 L13 11.5", on: { on: { d: "M4 12 L12 4" } } }
474
+ ]
475
+ };
476
+
477
+ // src/icons/mic.ts
478
+ var CAPSULE = "M8 2.5 A2 2 0 0 1 10 4.5 V7.5 A2 2 0 0 1 6 7.5 V4.5 A2 2 0 0 1 8 2.5 Z";
479
+ var mic = {
480
+ name: "mic",
481
+ parts: [
482
+ { id: "capsule", d: CAPSULE },
483
+ { id: "level", d: CAPSULE, fill: true, c: [8, 9.5], rest: { o: 0, s: 0.6 }, on: { on: { o: 1, s: 1 } } },
484
+ { id: "cradle", d: "M4 7.5 A4 4 0 0 0 12 7.5", c: [8, 7.5] },
485
+ { id: "stem", d: "M8 11.5 V13.5" }
486
+ ],
487
+ kicks: { on: [{ p: "cradle", k: "s", v: 1.4 }] }
488
+ };
489
+
490
+ // src/icons/pencil.ts
491
+ var pencil = {
492
+ name: "pencil",
493
+ parts: [
494
+ { id: "body", d: "M10.75 3.25 L12.75 5.25 L5.75 12.25 L3 13 L3.75 10.25 Z", c: [3, 13] },
495
+ { id: "band", d: "M9.25 4.75 L11.25 6.75", c: [3, 13] }
496
+ ],
497
+ kicks: { hover: [{ p: "*", k: "r", v: 150 }] }
498
+ };
499
+
500
+ // src/icons/play.ts
501
+ var play = {
502
+ name: "play",
503
+ parts: [
504
+ { id: "left", fill: true, d: "M5 3.5 L8.75 5.75 L8.75 10.25 L5 12.5 Z", on: { on: { d: "M4.5 3.5 L6.5 3.5 L6.5 12.5 L4.5 12.5 Z" } } },
505
+ { id: "right", fill: true, d: "M8.75 5.75 L12.5 8 L12.5 8 L8.75 10.25 Z", on: { on: { d: "M9.5 3.5 L11.5 3.5 L11.5 12.5 L9.5 12.5 Z" } } }
506
+ ]
507
+ };
508
+
509
+ // src/icons/plus.ts
510
+ var plus = {
511
+ name: "plus",
512
+ parts: [{ id: "cross", d: "M8 3 L8 13 M3 8 L13 8" }],
513
+ kicks: {
514
+ hover: [{ p: "*", k: "r", v: 200 }],
515
+ press: [{ p: "*", k: "r", to: 90 }]
516
+ }
517
+ };
518
+
519
+ // src/icons/refresh.ts
520
+ var refresh = {
521
+ name: "refresh",
522
+ parts: [
523
+ { id: "arc", d: "M13.5 8 A5.5 5.5 0 1 1 8 2.5 C9.5 2.5 10.9 3.1 11.9 4.1 L13.5 5.5" },
524
+ { id: "head", d: "M13.5 2.5 V5.5 H10.5" }
525
+ ],
526
+ kicks: {
527
+ hover: [{ p: "*", k: "r", v: 240 }],
528
+ press: [{ p: "*", k: "r", to: 360 }]
529
+ }
530
+ };
531
+
532
+ // src/icons/shield.ts
533
+ var shield = {
534
+ name: "shield",
535
+ parts: [
536
+ { id: "shell", d: "M8 2.5 L12.5 4.25 L12.5 8 C12.5 10.75 10.5 12.75 8 13.5 C5.5 12.75 3.5 10.75 3.5 8 L3.5 4.25 Z" },
537
+ { id: "tick", d: "M6 8 L7.5 9.5 L10 6.5" }
538
+ ],
539
+ kicks: { hover: [{ p: "*", k: "s", v: 1.2 }] }
540
+ };
541
+
542
+ // src/icons/sidebar.ts
543
+ var sidebar = {
544
+ name: "sidebar",
545
+ parts: [
546
+ { id: "frame", d: "M3.5 2.5 H12.5 A1 1 0 0 1 13.5 3.5 V12.5 A1 1 0 0 1 12.5 13.5 H3.5 A1 1 0 0 1 2.5 12.5 V3.5 A1 1 0 0 1 3.5 2.5 Z" },
547
+ { id: "bar", d: "M5 2.5 V13.5", on: { on: { x: 1.5 } } },
548
+ { id: "arrow", d: "M8.5 6.25 L10.25 8 L8.5 9.75", lag: 0.15, on: { on: { d: "M10.75 6.25 L9 8 L10.75 9.75" } } }
549
+ ]
550
+ };
551
+
552
+ // src/icons/stack.ts
553
+ var stack = {
554
+ name: "stack",
555
+ parts: [
556
+ { id: "p1", d: "M3.5 2.5 H12.5 A1 1 0 0 1 13.5 3.5 V5.5 A1 1 0 0 1 12.5 6.5 H3.5 A1 1 0 0 1 2.5 5.5 V3.5 A1 1 0 0 1 3.5 2.5 Z" },
557
+ { id: "p2", d: "M3.5 9.5 H12.5 A1 1 0 0 1 13.5 10.5 V12.5 A1 1 0 0 1 12.5 13.5 H3.5 A1 1 0 0 1 2.5 12.5 V10.5 A1 1 0 0 1 3.5 9.5 Z" }
558
+ ]
559
+ };
560
+
561
+ // src/icons/tick.ts
562
+ var tick = {
563
+ name: "tick",
564
+ parts: [{ id: "v", d: "M3.5 8.5 L6.5 11.5 L12.5 4.5", on: { off: { draw: 0 }, mixed: { d: "M4 8 L8 8 L12 8" } } }],
565
+ kicks: {
566
+ hover: [{ p: "*", k: "s", v: 1.5 }],
567
+ press: [{ p: "*", k: "s", v: 2.5 }]
568
+ }
569
+ };
570
+
571
+ // src/icons/trash.ts
572
+ var trash = {
573
+ name: "trash",
574
+ parts: [
575
+ { id: "lid", d: "M2.5 4.5 H13.5 M6 4.5 V3.5 A1 1 0 0 1 7 2.5 H9 A1 1 0 0 1 10 3.5 V4.5", c: [13.5, 4.5] },
576
+ { id: "body", d: "M4 4.5 L4.6 12.6 A1 1 0 0 0 5.6 13.5 H10.4 A1 1 0 0 0 11.4 12.6 L12 4.5" },
577
+ { id: "ribs", d: "M6.75 7.25 V10.75 M9.25 7.25 V10.75" }
578
+ ],
579
+ kicks: {
580
+ hover: [{ p: "lid", k: "r", v: 190 }],
581
+ press: [
582
+ { p: "lid", k: "r", v: 380 },
583
+ { p: "lid", k: "y", v: -14 }
584
+ ]
585
+ }
586
+ };
587
+
588
+ // src/icons/upload.ts
589
+ var TRAY = "M2.5 10.5 V12.5 A1 1 0 0 0 3.5 13.5 H12.5 A1 1 0 0 0 13.5 12.5 V10.5";
590
+ var upload = {
591
+ name: "upload",
592
+ parts: [
593
+ { id: "tray", d: TRAY, on: { busy: { o: 0.35 } } },
594
+ { id: "fill", d: TRAY, rest: { draw: 0 }, on: { busy: { draw: "p" }, done: { draw: 0 } } },
595
+ { id: "stem", d: "M8 10.5 V3", on: { done: { draw: 0 } } },
596
+ { id: "head", d: "M5 6 L8 3 L11 6", on: { done: { draw: 0, y: -2 } } },
597
+ { id: "tick", d: "M5 6 L7.3 8.3 L11 4", lag: 0.3, rest: { draw: 0 }, on: { done: { draw: 1 } } }
598
+ ],
599
+ kicks: { busy: [{ p: "head", k: "y", v: -22 }, { p: "stem", k: "y", v: -22 }] }
600
+ };
601
+
602
+ // src/icons/user.ts
603
+ var user = {
604
+ name: "user",
605
+ parts: [
606
+ { id: "p1", d: "M8 3 A2.5 2.5 0 1 1 8 8 A2.5 2.5 0 1 1 8 3 Z" },
607
+ { id: "p2", d: "M3 13.5 C3.6 11.1 5.6 9.5 8 9.5 C10.4 9.5 12.4 11.1 13 13.5" }
608
+ ]
609
+ };
610
+
611
+ // src/icons/wand.ts
612
+ var wand = {
613
+ name: "wand",
614
+ parts: [
615
+ { id: "stick", d: "M3 13 L9.25 6.75" },
616
+ { id: "spark", d: "M11.5 2.5 V5.5 M10 4 H13", c: [11.5, 4] },
617
+ { id: "small", d: "M13 8.25 V9.75 M12.25 9 H13.75", c: [13, 9] },
618
+ { id: "tiny", d: "M6 2.75 V4.25 M5.25 3.5 H6.75", c: [6, 3.5] }
619
+ ],
620
+ kicks: {
621
+ hover: [
622
+ { p: "spark", k: "s", v: 5 },
623
+ { p: "spark", k: "r", v: 420 },
624
+ { p: "small", k: "s", v: 6, wait: 70 },
625
+ { p: "tiny", k: "s", v: 6, wait: 140 }
626
+ ],
627
+ press: [
628
+ { p: "stick", k: "r", v: -160 },
629
+ { p: "spark", k: "s", v: 8, wait: 60 },
630
+ { p: "small", k: "s", v: 8, wait: 120 },
631
+ { p: "tiny", k: "s", v: 8, wait: 180 }
632
+ ]
633
+ }
634
+ };
635
+ // Annotate the CommonJS export names for ESM import in node:
636
+ 0 && (module.exports = {
637
+ REST,
638
+ arrowDown,
639
+ arrowLeft,
640
+ arrowRight,
641
+ arrowUp,
642
+ attachIcon,
643
+ bell,
644
+ calendar,
645
+ check,
646
+ chevron,
647
+ close,
648
+ copy,
649
+ error,
650
+ iconMarkup,
651
+ image,
652
+ inbox,
653
+ list,
654
+ lock,
655
+ login,
656
+ logout,
657
+ menu,
658
+ mic,
659
+ partsMarkup,
660
+ pencil,
661
+ play,
662
+ plus,
663
+ refresh,
664
+ shield,
665
+ sidebar,
666
+ stack,
667
+ tick,
668
+ trash,
669
+ upload,
670
+ user,
671
+ validateIcon,
672
+ wand
673
+ });