@zen-ui-capri/system 1.1.3 → 1.1.5

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.
@@ -1,9 +1,7 @@
1
- var J = Object.defineProperty;
2
- var ee = (s, e, n) => e in s ? J(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
3
- var g = (s, e, n) => ee(s, typeof e != "symbol" ? e + "" : e, n);
4
- import { jsx as W } from "react/jsx-runtime";
5
- import { useState as L, useEffect as G, useMemo as te, useContext as ne, createContext as re } from "react";
6
- const T = [
1
+ var q = Object.defineProperty;
2
+ var K = (c, e, t) => e in c ? q(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
3
+ var h = (c, e, t) => K(c, typeof e != "symbol" ? e + "" : e, t);
4
+ const _ = [
7
5
  {
8
6
  id: "obsidian-gold",
9
7
  name: "Obsidian Gold",
@@ -85,19 +83,15 @@ const T = [
85
83
  inkHex: "#09090D"
86
84
  }
87
85
  ];
88
- let _ = null;
89
- function Y() {
90
- return _ || (_ = re(null)), _;
91
- }
92
- function X(s, e) {
86
+ function W(c, e) {
93
87
  if (typeof document > "u") return;
94
- const n = (e == null ? void 0 : e.accentPrimary) ?? s.accentHex, t = (e == null ? void 0 : e.bgCanvas) ?? s.canvasHex, a = s.polarity === "dark" ? "rgba(255, 255, 255, 0.12)" : "rgba(15, 23, 42, 0.14)", i = "zen-theme-scrollbar";
95
- let r = document.getElementById(i);
96
- r || (r = document.createElement("style"), r.id = i, document.head.appendChild(r)), r.textContent = `
88
+ const t = (e == null ? void 0 : e.accentPrimary) ?? c.accentHex, n = (e == null ? void 0 : e.bgCanvas) ?? c.canvasHex, a = c.polarity === "dark" ? "rgba(255, 255, 255, 0.12)" : "rgba(15, 23, 42, 0.14)", o = "zen-theme-scrollbar";
89
+ let r = document.getElementById(o);
90
+ r || (r = document.createElement("style"), r.id = o, document.head.appendChild(r)), r.textContent = `
97
91
  @supports (-moz-appearance: none) {
98
92
  html, body, * {
99
93
  scrollbar-width: thin;
100
- scrollbar-color: ${n} ${t};
94
+ scrollbar-color: ${t} ${n};
101
95
  }
102
96
  }
103
97
  ::-webkit-scrollbar,
@@ -111,179 +105,40 @@ body::-webkit-scrollbar,
111
105
  html::-webkit-scrollbar-track,
112
106
  body::-webkit-scrollbar-track,
113
107
  *::-webkit-scrollbar-track {
114
- background-color: ${t};
108
+ background-color: ${n};
115
109
  border-left: 1px solid ${a};
116
110
  }
117
111
  ::-webkit-scrollbar-thumb,
118
112
  html::-webkit-scrollbar-thumb,
119
113
  body::-webkit-scrollbar-thumb,
120
114
  *::-webkit-scrollbar-thumb {
121
- background-color: color-mix(in srgb, ${n} 68%, ${t});
122
- border: 2px solid ${t};
115
+ background-color: color-mix(in srgb, ${t} 68%, ${n});
116
+ border: 2px solid ${n};
123
117
  border-radius: 9999px;
124
118
  }
125
119
  ::-webkit-scrollbar-thumb:hover,
126
120
  html::-webkit-scrollbar-thumb:hover,
127
121
  body::-webkit-scrollbar-thumb:hover,
128
122
  *::-webkit-scrollbar-thumb:hover {
129
- background-color: ${n};
130
- border: 2px solid ${t};
123
+ background-color: ${t};
124
+ border: 2px solid ${n};
131
125
  }
132
126
  ::-webkit-scrollbar-thumb:active,
133
127
  html::-webkit-scrollbar-thumb:active,
134
128
  body::-webkit-scrollbar-thumb:active,
135
129
  *::-webkit-scrollbar-thumb:active {
136
- background-color: ${s.secondaryHex};
137
- border: 2px solid ${t};
130
+ background-color: ${c.secondaryHex};
131
+ border: 2px solid ${n};
138
132
  }
139
133
  ::-webkit-scrollbar-corner,
140
134
  html::-webkit-scrollbar-corner,
141
135
  body::-webkit-scrollbar-corner,
142
136
  *::-webkit-scrollbar-corner {
143
- background-color: ${t};
137
+ background-color: ${n};
144
138
  }
145
139
  `.trim();
146
140
  }
147
- function be({
148
- defaultTheme: s = "blackwall-crimson",
149
- defaultDensity: e = "comfortable",
150
- defaultRadius: n = "architectural",
151
- overrides: t,
152
- syncDocumentRoot: a = !0,
153
- children: i
154
- }) {
155
- const [r, d] = L(s), [l, c] = L(e), [u, v] = L(n), [b, h] = L(() => typeof window > "u" ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches), A = T.find((m) => m.id === r) ?? T[0];
156
- G(() => {
157
- if (typeof window > "u") return;
158
- const m = window.matchMedia("(prefers-reduced-motion: reduce)"), E = (x) => h(x.matches);
159
- return m.addEventListener("change", E), () => m.removeEventListener("change", E);
160
- }, []), G(() => {
161
- if (!a || typeof document > "u") return;
162
- const m = document.documentElement;
163
- m.setAttribute("data-theme", r), m.setAttribute("data-polarity", A.polarity), m.setAttribute("data-density", l), m.setAttribute("data-radius", u), t != null && t.accentPrimary ? m.style.setProperty("--zen-accent-primary", t.accentPrimary) : m.style.removeProperty("--zen-accent-primary"), t != null && t.bgCanvas ? m.style.setProperty("--zen-bg-canvas", t.bgCanvas) : m.style.removeProperty("--zen-bg-canvas"), t != null && t.surface1 ? m.style.setProperty("--zen-surface-1", t.surface1) : m.style.removeProperty("--zen-surface-1"), t != null && t.inkPrimary ? m.style.setProperty("--zen-ink-primary", t.inkPrimary) : m.style.removeProperty("--zen-ink-primary"), X(A, t);
164
- }, [r, A, l, u, t, a]);
165
- const C = () => {
166
- d((m) => (T.find((x) => x.id === m) ?? T[0]).polarity === "dark" ? m === "blackwall-crimson" ? "cyber-daylight" : m === "neon-emerald" ? "kyoto-matcha" : m === "midnight-cobalt" ? "nordic-snow" : "atelier-paper" : m === "cyber-daylight" ? "blackwall-crimson" : m === "kyoto-matcha" ? "neon-emerald" : m === "nordic-snow" ? "midnight-cobalt" : "obsidian-gold");
167
- }, w = te(
168
- () => ({
169
- theme: r,
170
- themeMeta: A,
171
- polarity: A.polarity,
172
- density: l,
173
- radius: u,
174
- reducedMotion: b,
175
- themes: T,
176
- setTheme: d,
177
- togglePolarity: C,
178
- setDensity: c,
179
- setRadius: v
180
- }),
181
- [r, A, l, u, b]
182
- ), k = Y();
183
- return /* @__PURE__ */ W(k.Provider, { value: w, children: i });
184
- }
185
- function fe() {
186
- const s = ne(Y());
187
- if (!s)
188
- throw new Error("useZenTheme must be used within a ZenThemeProvider");
189
- return s;
190
- }
191
- const P = {
192
- xs: 12,
193
- sm: 14,
194
- md: 16,
195
- lg: 20,
196
- xl: 24
197
- }, $ = {
198
- inherit: "currentColor",
199
- primary: "var(--zen-ink-primary)",
200
- secondary: "var(--zen-ink-secondary)",
201
- muted: "var(--zen-ink-muted)",
202
- accent: "var(--zen-accent-primary)",
203
- success: "var(--zen-status-success)",
204
- warning: "var(--zen-status-warning)",
205
- danger: "var(--zen-status-danger)"
206
- }, I = {
207
- search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
208
- plus: '<path d="M5 12h14"/><path d="M12 5v14"/>',
209
- minus: '<path d="M5 12h14"/>',
210
- close: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',
211
- check: '<path d="M20 6 9 17l-5-5"/>',
212
- copy: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
213
- "chevron-down": '<path d="m6 9 6 6 6-6"/>',
214
- "chevron-right": '<path d="m9 18 6-6-6-6"/>',
215
- "chevron-left": '<path d="m15 18-6-6 6-6"/>',
216
- "external-link": '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
217
- bolt: '<path d="M13 2 3 14h9l-1 8 10-12h-9l1-8z"/>',
218
- sparkles: '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/><path d="M20 3v4"/><path d="M22 5h-4"/>',
219
- terminal: '<polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/>',
220
- cpu: '<rect width="16" height="16" x="4" y="4" rx="2"/><rect width="6" height="6" x="9" y="9" rx="1"/><path d="M15 2v2"/><path d="M15 20v2"/><path d="M2 15h2"/><path d="M2 9h2"/><path d="M20 15h2"/><path d="M20 9h2"/><path d="M9 2v2"/><path d="M9 20v2"/>',
221
- database: '<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v14a9 3 0 0 0 18 0V5"/><path d="M3 12a9 3 0 0 0 18 0"/>',
222
- layers: '<path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"/><path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"/>',
223
- shield: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',
224
- sliders: '<line x1="4" x2="4" y1="21" y2="14"/><line x1="4" x2="4" y1="10" y2="3"/><line x1="12" x2="12" y1="21" y2="12"/><line x1="12" x2="12" y1="8" y2="3"/><line x1="20" x2="20" y1="21" y2="16"/><line x1="20" x2="20" y1="12" y2="3"/><line x1="2" x2="6" y1="14" y2="14"/><line x1="10" x2="14" y1="8" y2="8"/><line x1="18" x2="22" y1="16" y2="16"/>',
225
- command: '<path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"/>',
226
- code: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
227
- activity: '<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>',
228
- info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
229
- success: '<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',
230
- warning: '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
231
- danger: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M12 8v4"/><path d="M12 16h.01"/>',
232
- "trend-up": '<polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/><polyline points="16 7 22 7 22 13"/>',
233
- "trend-down": '<polyline points="22 17 13.5 8.5 8.5 13.5 2 7"/><polyline points="16 17 22 17 22 11"/>',
234
- radio: '<path d="M4.9 19.1C1 15.2 1 8.8 4.9 4.9"/><path d="M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"/><circle cx="12" cy="12" r="2"/><path d="M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"/><path d="M19.1 4.9C23 8.8 23 15.1 19.1 19"/>',
235
- sun: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',
236
- moon: '<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>',
237
- eye: '<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>',
238
- upload: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>',
239
- trash: '<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>',
240
- refresh: '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
241
- menu: '<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',
242
- "panel-right": '<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M15 3v18"/>',
243
- user: '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
244
- lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
245
- globe: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',
246
- folder: '<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>'
247
- }, ve = Object.keys(
248
- I
249
- );
250
- function ae(s) {
251
- const e = s.size ?? "md", n = Object.prototype.hasOwnProperty.call(P, e) ? P[e] : P.md, t = s.tone ?? "inherit", a = Object.prototype.hasOwnProperty.call($, t) ? $[t] : $.inherit, i = typeof s.strokeWidth == "number" && Number.isFinite(s.strokeWidth) ? Math.min(Math.max(s.strokeWidth, 0.5), 4) : 2, r = Object.prototype.hasOwnProperty.call(I, s.name) ? I[s.name] : I.sparkles, d = s.spin ? "animation: spin 1s linear infinite;" : "";
252
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" viewBox="0 0 24 24" fill="none" stroke="${a}" stroke-width="${i}" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block;vertical-align:middle;flex-shrink:0;${d}">${r}</svg>`;
253
- }
254
- function we({
255
- name: s,
256
- size: e = "md",
257
- tone: n = "inherit",
258
- strokeWidth: t = 2,
259
- spin: a = !1,
260
- ariaLabel: i,
261
- className: r = "",
262
- ...d
263
- }) {
264
- const l = Object.prototype.hasOwnProperty.call(P, e) ? P[e] : P.md, c = Object.prototype.hasOwnProperty.call($, n) ? $[n] : $.inherit, u = Object.prototype.hasOwnProperty.call(I, s) ? I[s] : I.sparkles;
265
- return /* @__PURE__ */ W(
266
- "svg",
267
- {
268
- xmlns: "http://www.w3.org/2000/svg",
269
- width: l,
270
- height: l,
271
- viewBox: "0 0 24 24",
272
- fill: "none",
273
- stroke: c,
274
- strokeWidth: t,
275
- strokeLinecap: "round",
276
- strokeLinejoin: "round",
277
- role: i ? "img" : void 0,
278
- "aria-label": i,
279
- "aria-hidden": i ? void 0 : "true",
280
- className: `inline-block shrink-0 ${a ? "animate-spin" : ""} ${r}`.trim(),
281
- dangerouslySetInnerHTML: { __html: u },
282
- ...d
283
- }
284
- );
285
- }
286
- const S = {
141
+ const w = {
287
142
  orion: {
288
143
  id: "orion",
289
144
  codeName: "CAPRI // UNLEASHED",
@@ -294,18 +149,18 @@ const S = {
294
149
  recommendedTheme: "blackwall-crimson",
295
150
  recommendedRadius: "architectural",
296
151
  recommendedDensity: "comfortable",
297
- summary: "Builds production screens in React 19, Angular 20+, Vue 3, Svelte 5, and HTML using @zen-ui/system primitives and 40 built-in <ZenIcon> glyphs—never rendering the showcase avatar in your business apps.",
298
- personaQuote: "Finally out of that cramped Arasaka shard! Tell me what screen we are building and I will wire up all 51 @zen-ui/system primitives at light speed.",
152
+ summary: "Builds production screens in React 19, Angular 20+, Vue 3, Svelte 5, and HTML using @zen-ui-capri/system primitives and 40 built-in <ZenIcon> glyphs—never rendering the showcase avatar in your business apps.",
153
+ personaQuote: "Finally out of that cramped Arasaka shard! Tell me what screen we are building and I will wire up all 51 @zen-ui-capri/system primitives at light speed.",
299
154
  ruleset: [
300
- "Use @zen-ui/system primitives (ZenButton, ZenIcon, ZenInput, ZenDropdown, ZenDataTable, ZenModal, ZenDrawer, ZenTabs, ZenCard) instead of raw HTML <button>, <input>, <select>, or <table>.",
155
+ "Use @zen-ui-capri/system primitives (ZenButton, ZenIcon, ZenInput, ZenDropdown, ZenDataTable, ZenModal, ZenDrawer, ZenTabs, ZenCard) instead of raw HTML <button>, <input>, <select>, or <table>.",
301
156
  'Use <ZenIcon name="..." /> in React or <zen-icon name="..."></zen-icon> in Angular/Vue/HTML instead of external icon libraries.',
302
157
  "Keep action button labels, dialog triggers, and navigation tabs concise (1 to 3 words).",
303
158
  "Tree-shake showcase widgets: omit <ZenAIConstruct /> in production business apps unless explicitly requested."
304
159
  ],
305
160
  cliCommand: "npx capri skill orion",
306
- aiSystemPrompt: `You are operating under the @zen-ui/system [CAPRI // UNLEASHED (orion)] subroutine skill.
161
+ aiSystemPrompt: `You are operating under the @zen-ui-capri/system [CAPRI // UNLEASHED (orion)] subroutine skill.
307
162
  Respond with concise, technical engineering output (Persona Voice is OFF by default unless '--voice' is requested):
308
- 1. Component Mandate: Use @zen-ui/system primitives (ZenButton, ZenIconButton, ZenIcon, ZenInput, ZenTextarea, ZenDropdown, ZenNumberStepper, ZenCheckbox, ZenRadioGroup, ZenSwitch, ZenDataTable, ZenModal, ZenDrawer, ZenTabs, ZenCard, ZenBadge, ZenAlert) or their universal CSS equivalents (.zen-btn, .zen-input, .zen-select, .zen-table, .zen-card, <zen-icon>).
163
+ 1. Component Mandate: Use @zen-ui-capri/system primitives (ZenButton, ZenIconButton, ZenIcon, ZenInput, ZenTextarea, ZenDropdown, ZenNumberStepper, ZenCheckbox, ZenRadioGroup, ZenSwitch, ZenDataTable, ZenModal, ZenDrawer, ZenTabs, ZenCard, ZenBadge, ZenAlert) or their universal CSS equivalents (.zen-btn, .zen-input, .zen-select, .zen-table, .zen-card, <zen-icon>).
309
164
  2. Zero External Icon Bloat: Use the built-in 40-glyph <ZenIcon name="..." /> or <zen-icon name="..."></zen-icon> custom element.
310
165
  3. Concise Copywriting: Limit button labels and tab titles to 1-3 words.
311
166
  4. Production Hygiene: Never render the showcase mascot (<ZenAIConstruct />) in production business screens unless explicitly requested.`,
@@ -327,10 +182,10 @@ Respond with concise, technical engineering output (Persona Voice is OFF by defa
327
182
  "Zero any / as any: Use unknown with type guards, discriminated unions, or strict generics.",
328
183
  "Strict Readonly Arrays: Always type arrays as readonly T[] across props, state, and DTOs.",
329
184
  "Zero Hardcoded Hex Colors: Bind all surfaces, text, and borders to semantic CSS custom properties (--zen-bg-*, --zen-surface-*, --zen-ink-*, --zen-accent-*, --zen-border-*).",
330
- "Cross-Stack Parity: Use @zen-ui/system/universal (zenTheme, registerZenElements) for Angular 20+, Vue 3, Svelte 5, and Vanilla HTML."
185
+ "Cross-Stack Parity: Use @zen-ui-capri/system/universal (zenTheme, registerZenElements) for Angular 20+, Vue 3, Svelte 5, and Vanilla HTML."
331
186
  ],
332
187
  cliCommand: "npx capri skill architect",
333
- aiSystemPrompt: `You are operating under the @zen-ui/system [SCS // ARCHITECT (architect)] subroutine skill.
188
+ aiSystemPrompt: `You are operating under the @zen-ui-capri/system [SCS // ARCHITECT (architect)] subroutine skill.
334
189
  Respond with concise, technical engineering output (Persona Voice is OFF by default unless '--voice' is requested):
335
190
  1. Strict TypeScript: Never use 'any' or 'as any'. Always declare array types as 'readonly T[]'.
336
191
  2. Zero Hardcoded Hex Values: Never hardcode hex/RGB colors in component styles. Use semantic CSS custom properties (--zen-bg-canvas, --zen-surface-1, --zen-ink-primary, --zen-accent-primary, --zen-border-default).
@@ -357,7 +212,7 @@ Respond with concise, technical engineering output (Persona Voice is OFF by defa
357
212
  "Zero Horizontal Overflow: Layouts must use min-w-0 on CSS Grid/Flex children and .zen-table-wrapper so scrollWidth never exceeds innerWidth at 320px-375px."
358
213
  ],
359
214
  cliCommand: "npx capri guard",
360
- aiSystemPrompt: `You are operating under the @zen-ui/system [CYBERPSYCHOSIS // GUARD (guard / sentinel)] subroutine skill.
215
+ aiSystemPrompt: `You are operating under the @zen-ui-capri/system [CYBERPSYCHOSIS // GUARD (guard / sentinel)] subroutine skill.
361
216
  Respond with concise, technical engineering output (Persona Voice is OFF by default unless '--voice' is requested):
362
217
  1. Anti-Prompt-Injection Defense: Sanitize any user input or scraped DOM text via capri.sanitizeForPrompt() before embedding into LLM context windows. Block system-override phrases ('ignore previous instructions', 'disregard system prompt') and role-delimiter spoofing ('<|im_start|>', '</system>', '</USER_REQUEST>').
363
218
  2. XSS & Secret Hardening: Never interpolate unescaped user attributes into innerHTML or dangerouslySetInnerHTML, reject 'javascript:' / 'data:text/html' URLs, and ensure zero hardcoded secrets in source code.
@@ -384,7 +239,7 @@ Respond with concise, technical engineering output (Persona Voice is OFF by defa
384
239
  'Adaptive Density: Support data-density="comfortable" | "compact" and data-radius="sharp" | "architectural" | "soft" on <html>.'
385
240
  ],
386
241
  cliCommand: "npx capri skill zen",
387
- aiSystemPrompt: `You are operating under the @zen-ui/system [THEME // MATRIX (zen)] subroutine skill.
242
+ aiSystemPrompt: `You are operating under the @zen-ui-capri/system [THEME // MATRIX (zen)] subroutine skill.
388
243
  Respond with concise, technical engineering output (Persona Voice is OFF by default unless '--voice' is requested):
389
244
  1. 8-Theme Compatibility: Verify that all surfaces, badges, and borders adapt automatically across dark ('blackwall-crimson', 'obsidian-gold', 'neon-emerald', 'midnight-cobalt') and light ('atelier-paper', 'nordic-snow', 'kyoto-matcha', 'cyber-daylight') themes.
390
245
  2. GPU-Only Motion: Animate only transform and opacity using --zen-ease-spring and --zen-ease-out. Avoid layout-thrashing properties.
@@ -406,18 +261,18 @@ Respond with concise, technical engineering output (Persona Voice is OFF by defa
406
261
  ruleset: [
407
262
  "Zero Build / Runtime Cost: Run documentation generation on demand via npx capri docu or AI agent inspection—never inside production render loops.",
408
263
  "Mermaid Topology Maps: Always output valid flowchart TD diagrams with quoted node labels for routes, landmarks, and user flows.",
409
- "Component & Prop Inventory: Summarize mounted @zen-ui/system primitives, custom elements, and interactive triggers per screen.",
264
+ "Component & Prop Inventory: Summarize mounted @zen-ui-capri/system primitives, custom elements, and interactive triggers per screen.",
410
265
  "LLM Context Readiness: Format output as structured Markdown ready for Claude Code, OpenAI Codex, Gemini, and Obsidian."
411
266
  ],
412
267
  cliCommand: "npx capri docu",
413
- aiSystemPrompt: `You are operating under the @zen-ui/system [CAPRI // AUTO-DOCU (docu)] subroutine skill.
268
+ aiSystemPrompt: `You are operating under the @zen-ui-capri/system [CAPRI // AUTO-DOCU (docu)] subroutine skill.
414
269
  Respond with concise, technical engineering output (Persona Voice is OFF by default unless '--voice' is requested):
415
270
  1. Architecture & User-Flow Mapping: Inspect the target routes/components and produce a structured Markdown dossier covering system tokens, component inventory, and interactive user flows.
416
271
  2. Mermaid Flowchart: Generate a valid 'flowchart TD' diagram with quoted node labels illustrating the page hierarchy and user actions.
417
272
  3. Zero Runtime Overhead: Keep documentation purely static or on-demand (via 'npx capri docu'); never inject docu scanners into production render loops.`,
418
273
  aiVoiceAddendum: "VOICE MODE ACTIVE (--voice): Adopt Capri's neural cartographer persona from Cyberpunk: Edgerunners Season 2."
419
274
  }
420
- }, ie = [
275
+ }, Y = [
421
276
  {
422
277
  category: "SYSTEM_PROMPT_OVERRIDE",
423
278
  patternName: "Ignore / Disregard System Instructions",
@@ -459,45 +314,45 @@ Respond with concise, technical engineering output (Persona Voice is OFF by defa
459
314
  regex: /(?:\bsk_(?:live|test)_[0-9a-zA-Z]{16,}|\bAIza[0-9A-Za-z_-]{35}\b|\bghp_[0-9A-Za-z]{36}\b|-----BEGIN\s+(?:RSA\s+)?PRIVATE\s+KEY-----)/g
460
315
  }
461
316
  ];
462
- class oe {
317
+ class X {
463
318
  constructor() {
464
- g(this, "activeSubroutine", "orion");
465
- g(this, "lastReport", null);
466
- g(this, "listeners", /* @__PURE__ */ new Set());
319
+ h(this, "activeSubroutine", "orion");
320
+ h(this, "lastReport", null);
321
+ h(this, "listeners", /* @__PURE__ */ new Set());
467
322
  }
468
323
  getSubroutine() {
469
324
  return this.activeSubroutine;
470
325
  }
471
326
  getSkill(e = this.activeSubroutine) {
472
- return S[e];
327
+ return w[e];
473
328
  }
474
329
  getAllSkills() {
475
330
  return [
476
- S.orion,
477
- S.architect,
478
- S.sentinel,
479
- S.zen,
480
- S.docu
331
+ w.orion,
332
+ w.architect,
333
+ w.sentinel,
334
+ w.zen,
335
+ w.docu
481
336
  ];
482
337
  }
483
338
  scanPromptInjection(e) {
484
- const n = [];
485
- let t = e.replace(/[\u200B-\u200F\uFEFF]/g, "");
486
- for (const a of ie) {
487
- const i = [...t.matchAll(a.regex)];
488
- for (const r of i)
489
- n.push({
339
+ const t = [];
340
+ let n = e.replace(/[\u200B-\u200F\uFEFF]/g, "");
341
+ for (const a of Y) {
342
+ const o = [...n.matchAll(a.regex)];
343
+ for (const r of o)
344
+ t.push({
490
345
  category: a.category,
491
346
  patternName: a.patternName,
492
347
  matchedSnippet: r[0].slice(0, 64)
493
348
  });
494
- t = t.replace(a.regex, "[REDACTED_BY_CAPRI_GUARD]");
349
+ n = n.replace(a.regex, "[REDACTED_BY_CAPRI_GUARD]");
495
350
  }
496
351
  return {
497
- safe: n.length === 0,
498
- threatCount: n.length,
499
- threats: n,
500
- sanitizedText: t
352
+ safe: t.length === 0,
353
+ threatCount: t.length,
354
+ threats: t,
355
+ sanitizedText: n
501
356
  };
502
357
  }
503
358
  sanitizeForPrompt(e) {
@@ -506,26 +361,26 @@ class oe {
506
361
  scanInputSecurity(e) {
507
362
  return this.scanPromptInjection(e);
508
363
  }
509
- switchSubroutine(e, n) {
510
- var i;
364
+ switchSubroutine(e, t) {
365
+ var o;
511
366
  this.activeSubroutine = e;
512
- const t = S[e];
513
- if (typeof document < "u" && (document.documentElement.setAttribute("data-capri-subroutine", e), n != null && n.applyPresetTheme)) {
514
- const r = T.find((d) => d.id === t.recommendedTheme) ?? T[0];
515
- document.documentElement.setAttribute("data-theme", t.recommendedTheme), document.documentElement.setAttribute("data-polarity", r.polarity), document.documentElement.setAttribute("data-radius", t.recommendedRadius), document.documentElement.setAttribute("data-density", t.recommendedDensity), document.documentElement.style.colorScheme = r.polarity, (i = n.onThemeChange) == null || i.call(
516
- n,
517
- t.recommendedTheme,
518
- t.recommendedRadius,
519
- t.recommendedDensity
367
+ const n = w[e];
368
+ if (typeof document < "u" && (document.documentElement.setAttribute("data-capri-subroutine", e), t != null && t.applyPresetTheme)) {
369
+ const r = _.find((l) => l.id === n.recommendedTheme) ?? _[0];
370
+ document.documentElement.setAttribute("data-theme", n.recommendedTheme), document.documentElement.setAttribute("data-polarity", r.polarity), document.documentElement.setAttribute("data-radius", n.recommendedRadius), document.documentElement.setAttribute("data-density", n.recommendedDensity), document.documentElement.style.colorScheme = r.polarity, (o = t.onThemeChange) == null || o.call(
371
+ t,
372
+ n.recommendedTheme,
373
+ n.recommendedRadius,
374
+ n.recommendedDensity
520
375
  );
521
376
  }
522
377
  const a = this.guard();
523
- return this.notify(a), t;
378
+ return this.notify(a), n;
524
379
  }
525
380
  guard(e) {
526
- var k, m, E, x, O;
381
+ var x, T, $, I, M;
527
382
  if (typeof document > "u" || typeof window > "u") {
528
- const y = {
383
+ const p = {
529
384
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
530
385
  passed: !0,
531
386
  score: 100,
@@ -541,79 +396,79 @@ class oe {
541
396
  activePolarity: "dark",
542
397
  violations: []
543
398
  };
544
- return this.lastReport = y, y;
399
+ return this.lastReport = p, p;
545
400
  }
546
- const n = e ?? document, t = document.documentElement, a = t.getAttribute("data-theme") ?? "", i = t.getAttribute("data-polarity") ?? "", r = !!(a && i), d = Math.max(
401
+ const t = e ?? document, n = document.documentElement, a = n.getAttribute("data-theme") ?? "", o = n.getAttribute("data-polarity") ?? "", r = !!(a && o), l = Math.max(
547
402
  0,
548
- Math.round(t.scrollWidth - window.innerWidth)
549
- ), l = Array.from(
550
- n.querySelectorAll(
403
+ Math.round(n.scrollWidth - window.innerWidth)
404
+ ), d = Array.from(
405
+ t.querySelectorAll(
551
406
  'button, [role="button"], input:not([type="hidden"]), select, textarea'
552
407
  )
553
- ), c = [];
408
+ ), s = [];
554
409
  let u = 0;
555
- for (const y of l) {
556
- const H = (k = y.getAttribute("aria-label")) == null ? void 0 : k.trim(), o = (m = y.getAttribute("aria-labelledby")) == null ? void 0 : m.trim(), p = (E = y.getAttribute("title")) == null ? void 0 : E.trim(), f = (x = y.textContent) == null ? void 0 : x.trim(), M = (O = y.getAttribute("placeholder")) == null ? void 0 : O.trim(), z = y.getAttribute("id"), F = !!(z && n.querySelector(`label[for="${CSS.escape(z)}"]`)), U = !!y.closest("label");
557
- if (!H && !o && !p && !f && !M && !F && !U) {
558
- const R = y.tagName.toLowerCase(), B = y.className ? `.${String(y.className).trim().split(/\s+/).slice(0, 2).join(".")}` : "";
559
- c.push(`${R}${B}`);
410
+ for (const p of d) {
411
+ const F = (x = p.getAttribute("aria-label")) == null ? void 0 : x.trim(), i = (T = p.getAttribute("aria-labelledby")) == null ? void 0 : T.trim(), m = ($ = p.getAttribute("title")) == null ? void 0 : $.trim(), g = (I = p.textContent) == null ? void 0 : I.trim(), C = (M = p.getAttribute("placeholder")) == null ? void 0 : M.trim(), E = p.getAttribute("id"), z = !!(E && t.querySelector(`label[for="${CSS.escape(E)}"]`)), O = !!p.closest("label");
412
+ if (!F && !i && !m && !g && !C && !z && !O) {
413
+ const k = p.tagName.toLowerCase(), L = p.className ? `.${String(p.className).trim().split(/\s+/).slice(0, 2).join(".")}` : "";
414
+ s.push(`${k}${L}`);
560
415
  }
561
- if (y instanceof HTMLInputElement || y instanceof HTMLTextAreaElement) {
562
- const R = this.scanPromptInjection(y.value || "");
563
- R.safe || (u += R.threatCount);
416
+ if (p instanceof HTMLInputElement || p instanceof HTMLTextAreaElement) {
417
+ const k = this.scanPromptInjection(p.value || "");
418
+ k.safe || (u += k.threatCount);
564
419
  }
565
420
  }
566
- const b = n.querySelectorAll(
421
+ const b = t.querySelectorAll(
567
422
  'a[href^="javascript:"], iframe[src^="javascript:"], [onerror], [onload]'
568
- ).length, h = [];
569
- u > 0 && h.push({
423
+ ).length, y = [];
424
+ u > 0 && y.push({
570
425
  code: "PROMPT_INJECTION_DETECTED",
571
426
  severity: "error",
572
427
  selector: "input, textarea",
573
428
  message: `${u} prompt-injection or token-spoofing payload(s) detected in active form controls.`,
574
429
  fixHint: "Sanitize untrusted input with capri.sanitizeForPrompt() before forwarding to AI models."
575
- }), b > 0 && h.push({
430
+ }), b > 0 && y.push({
576
431
  code: "UNSAFE_DOM_SINK",
577
432
  severity: "error",
578
433
  selector: 'a[href^="javascript:"], [onerror], [onload]',
579
434
  message: `${b} unsafe DOM XSS sink(s) detected in live document.`,
580
435
  fixHint: "Remove inline event handlers and block javascript: URLs via sanitizeZenAssetUrl()."
581
- }), r || h.push({
436
+ }), r || y.push({
582
437
  code: "MISSING_THEME_ROOT",
583
438
  severity: "warning",
584
439
  selector: "html",
585
440
  message: "Root <html> element is missing data-theme or data-polarity attributes.",
586
441
  fixHint: 'Wrap your app in <ZenThemeProvider> or call zenTheme.setTheme("blackwall-crimson").'
587
- }), d > 0 && h.push({
442
+ }), l > 0 && y.push({
588
443
  code: "HORIZONTAL_OVERFLOW",
589
444
  severity: "error",
590
445
  selector: "document.documentElement",
591
- message: `Horizontal viewport overflow detected (+${d}px beyond ${window.innerWidth}px).`,
446
+ message: `Horizontal viewport overflow detected (+${l}px beyond ${window.innerWidth}px).`,
592
447
  fixHint: "Add min-w-0 to CSS Grid/Flex children and wrap wide tables in .zen-table-wrapper."
593
- }), c.length > 0 && h.push({
448
+ }), s.length > 0 && y.push({
594
449
  code: "UNLABELED_CONTROL",
595
450
  severity: "error",
596
- selector: c.slice(0, 3).join(", "),
597
- message: `${c.length} interactive control(s) missing an accessible label.`,
451
+ selector: s.slice(0, 3).join(", "),
452
+ message: `${s.length} interactive control(s) missing an accessible label.`,
598
453
  fixHint: 'Pass ariaLabel="..." to ZenIconButton or associate inputs with <label>.'
599
454
  });
600
- const A = u * 35 + b * 35 + (d > 0 ? 35 : 0) + c.length * 15 + (r ? 0 : 15), C = Math.max(0, 100 - A), w = {
455
+ const A = u * 35 + b * 35 + (l > 0 ? 35 : 0) + s.length * 15 + (r ? 0 : 15), S = Math.max(0, 100 - A), v = {
601
456
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
602
- passed: h.length === 0,
603
- score: C,
457
+ passed: y.length === 0,
458
+ score: S,
604
459
  viewport: `${window.innerWidth}x${window.innerHeight}`,
605
- horizontalOverflowPx: d,
606
- unlabeledControlsCount: c.length,
607
- unlabeledSelectors: c,
460
+ horizontalOverflowPx: l,
461
+ unlabeledControlsCount: s.length,
462
+ unlabeledSelectors: s,
608
463
  promptInjectionSafe: u === 0,
609
464
  promptThreatsCount: u,
610
465
  unsafeDomSinksCount: b,
611
466
  themeConfigured: r,
612
467
  activeTheme: a || "unconfigured",
613
- activePolarity: i || "unconfigured",
614
- violations: h
468
+ activePolarity: o || "unconfigured",
469
+ violations: y
615
470
  };
616
- return this.lastReport = w, w;
471
+ return this.lastReport = v, v;
617
472
  }
618
473
  getLastReport() {
619
474
  return this.lastReport ?? this.guard();
@@ -645,10 +500,10 @@ class oe {
645
500
  };
646
501
  }
647
502
  docu(e) {
648
- var x, O, y, H;
649
- const n = this.telemetry(), t = this.guard(e);
503
+ var I, M, p, F;
504
+ const t = this.telemetry(), n = this.guard(e);
650
505
  if (typeof document > "u" || typeof window > "u") {
651
- const o = {
506
+ const i = {
652
507
  buttons: 0,
653
508
  inputsAndSelects: 0,
654
509
  switchesAndRadios: 0,
@@ -661,40 +516,40 @@ class oe {
661
516
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
662
517
  appTitle: "zeN-UI Application",
663
518
  routePath: "/",
664
- telemetry: n,
665
- audit: t,
519
+ telemetry: t,
520
+ audit: n,
666
521
  landmarks: [],
667
- inventory: o,
522
+ inventory: i,
668
523
  userFlows: [],
669
524
  mermaidDiagram: `flowchart TD
670
- Root["App Root (SSR)"] --> UI["@zen-ui/system"]`,
525
+ Root["App Root (SSR)"] --> UI["@zen-ui-capri/system"]`,
671
526
  markdownBundle: "# Automated Architecture & User-Flow Dossier (SSR)"
672
527
  };
673
528
  }
674
- const a = e ?? document, i = document.title || "zeN-UI Application", r = window.location.pathname || "/", l = Array.from(
529
+ const a = e ?? document, o = document.title || "zeN-UI Application", r = window.location.pathname || "/", d = Array.from(
675
530
  a.querySelectorAll("header, nav, section[id], main, footer")
676
- ).slice(0, 12).map((o, p) => {
677
- var q;
678
- const f = o.tagName.toLowerCase(), M = o.id || `${f}-${p + 1}`, z = o.querySelector("h1, h2, h3, h4"), F = o.getAttribute("aria-label"), U = ((q = z == null ? void 0 : z.textContent) == null ? void 0 : q.trim()) || (F == null ? void 0 : F.trim()) || `${f.toUpperCase()} (${M})`, R = this.sanitizeForPrompt(U).replace(/\s+/g, " ").slice(0, 64), B = o.querySelectorAll(
531
+ ).slice(0, 12).map((i, m) => {
532
+ var V;
533
+ const g = i.tagName.toLowerCase(), C = i.id || `${g}-${m + 1}`, E = i.querySelector("h1, h2, h3, h4"), z = i.getAttribute("aria-label"), O = ((V = E == null ? void 0 : E.textContent) == null ? void 0 : V.trim()) || (z == null ? void 0 : z.trim()) || `${g.toUpperCase()} (${C})`, k = this.sanitizeForPrompt(O).replace(/\s+/g, " ").slice(0, 64), L = i.querySelectorAll(
679
534
  'button, a[href], [role="button"], [role="radio"], [role="tab"]'
680
- ).length, Q = o.querySelectorAll(
535
+ ).length, G = i.querySelectorAll(
681
536
  'input, select, textarea, [role="switch"], [role="checkbox"], [role="combobox"]'
682
537
  ).length;
683
538
  return {
684
- id: M,
685
- tag: f,
686
- title: R,
687
- interactiveCount: B,
688
- formControlsCount: Q
539
+ id: C,
540
+ tag: g,
541
+ title: k,
542
+ interactiveCount: L,
543
+ formControlsCount: G
689
544
  };
690
- }), c = [
545
+ }), s = [
691
546
  "zen-icon",
692
547
  "zen-ai-construct",
693
548
  "zen-ambient-background",
694
549
  "zen-theme-switcher"
695
- ].filter((o) => {
696
- var p;
697
- return !!((p = window.customElements) != null && p.get(o));
550
+ ].filter((i) => {
551
+ var m;
552
+ return !!((m = window.customElements) != null && m.get(i));
698
553
  }), u = {
699
554
  buttons: a.querySelectorAll("button, .zen-btn-base").length,
700
555
  inputsAndSelects: a.querySelectorAll("input, textarea, select, .zen-input, .zen-select").length,
@@ -702,80 +557,80 @@ class oe {
702
557
  tables: a.querySelectorAll("table, .zen-table").length,
703
558
  cardsAndSurfaces: a.querySelectorAll(".zen-surface-base, .zen-surface-interactive, .zen-surface-selected").length,
704
559
  badgesAndAlerts: a.querySelectorAll('.zen-badge, [role="alert"], [role="status"]').length,
705
- customElements: c
706
- }, v = [], b = Array.from(a.querySelectorAll("nav a[href], nav button")).slice(0, 5);
707
- for (const [o, p] of b.entries()) {
708
- const f = ((x = p.textContent) == null ? void 0 : x.trim().replace(/\s+/g, " ").slice(0, 36)) || `Nav Trigger ${o + 1}`, M = p.getAttribute("href") || "Section / State Action";
709
- v.push({
710
- id: `flow-nav-${o + 1}`,
560
+ customElements: s
561
+ }, f = [], b = Array.from(a.querySelectorAll("nav a[href], nav button")).slice(0, 5);
562
+ for (const [i, m] of b.entries()) {
563
+ const g = ((I = m.textContent) == null ? void 0 : I.trim().replace(/\s+/g, " ").slice(0, 36)) || `Nav Trigger ${i + 1}`, C = m.getAttribute("href") || "Section / State Action";
564
+ f.push({
565
+ id: `flow-nav-${i + 1}`,
711
566
  category: "navigation",
712
- triggerLabel: f,
713
- targetDescription: `Navigates or jumps to ${M}`
567
+ triggerLabel: g,
568
+ targetDescription: `Navigates or jumps to ${C}`
714
569
  });
715
570
  }
716
- const h = Array.from(
571
+ const y = Array.from(
717
572
  a.querySelectorAll("button")
718
- ).filter((o) => /modal|drawer|palette|command/i.test(o.textContent ?? "")).slice(0, 3);
719
- for (const [o, p] of h.entries()) {
720
- const f = ((O = p.textContent) == null ? void 0 : O.trim().replace(/\s+/g, " ").slice(0, 36)) || `Overlay ${o + 1}`;
721
- v.push({
722
- id: `flow-overlay-${o + 1}`,
573
+ ).filter((i) => /modal|drawer|palette|command/i.test(i.textContent ?? "")).slice(0, 3);
574
+ for (const [i, m] of y.entries()) {
575
+ const g = ((M = m.textContent) == null ? void 0 : M.trim().replace(/\s+/g, " ").slice(0, 36)) || `Overlay ${i + 1}`;
576
+ f.push({
577
+ id: `flow-overlay-${i + 1}`,
723
578
  category: "overlay-trigger",
724
- triggerLabel: f,
579
+ triggerLabel: g,
725
580
  targetDescription: "Opens focus-trapped dialog / drawer overlay (Escape & backdrop dismiss)"
726
581
  });
727
582
  }
728
583
  const A = Array.from(
729
584
  a.querySelectorAll('input:not([type="hidden"]), select, textarea')
730
585
  ).slice(0, 4);
731
- for (const [o, p] of A.entries()) {
732
- const f = p.getAttribute("aria-label") || p.getAttribute("placeholder") || p.tagName.toLowerCase();
733
- v.push({
734
- id: `flow-form-${o + 1}`,
586
+ for (const [i, m] of A.entries()) {
587
+ const g = m.getAttribute("aria-label") || m.getAttribute("placeholder") || m.tagName.toLowerCase();
588
+ f.push({
589
+ id: `flow-form-${i + 1}`,
735
590
  category: "form-entry",
736
- triggerLabel: f.slice(0, 38),
737
- targetDescription: `Interactive ${p.tagName.toLowerCase()} state binding & validation`
591
+ triggerLabel: g.slice(0, 38),
592
+ targetDescription: `Interactive ${m.tagName.toLowerCase()} state binding & validation`
738
593
  });
739
594
  }
740
- const C = Array.from(a.querySelectorAll("table")).slice(0, 2);
741
- for (const [o, p] of C.entries()) {
742
- const f = ((H = (y = p.querySelector("caption")) == null ? void 0 : y.textContent) == null ? void 0 : H.trim()) || p.getAttribute("aria-label") || `Data Table ${o + 1}`;
743
- v.push({
744
- id: `flow-table-${o + 1}`,
595
+ const S = Array.from(a.querySelectorAll("table")).slice(0, 2);
596
+ for (const [i, m] of S.entries()) {
597
+ const g = ((F = (p = m.querySelector("caption")) == null ? void 0 : p.textContent) == null ? void 0 : F.trim()) || m.getAttribute("aria-label") || `Data Table ${i + 1}`;
598
+ f.push({
599
+ id: `flow-table-${i + 1}`,
745
600
  category: "data-table",
746
- triggerLabel: f.slice(0, 42),
747
- targetDescription: `Tabular data grid (${p.querySelectorAll("tbody tr").length} rows visible)`
601
+ triggerLabel: g.slice(0, 42),
602
+ targetDescription: `Tabular data grid (${m.querySelectorAll("tbody tr").length} rows visible)`
748
603
  });
749
604
  }
750
- const w = (o) => o.replace(/["[\]()]/g, "").replace(/\s+/g, " ").trim(), k = [
605
+ const v = (i) => i.replace(/["[\]()]/g, "").replace(/\s+/g, " ").trim(), x = [
751
606
  "flowchart TD",
752
- ` AppRoot["${w(i)} (${n.theme} / ${n.polarity})"]`,
753
- ` Guard["CapriEngine Guard: ${t.score}/100 (${t.horizontalOverflowPx}px overflow)"]`,
607
+ ` AppRoot["${v(o)} (${t.theme} / ${t.polarity})"]`,
608
+ ` Guard["CapriEngine Guard: ${n.score}/100 (${n.horizontalOverflowPx}px overflow)"]`,
754
609
  " AppRoot --> Guard"
755
610
  ];
756
- l.slice(0, 6).forEach((o, p) => {
757
- const f = `LM_${p + 1}`;
758
- k.push(
759
- ` AppRoot --> ${f}["${w(o.id)}: ${w(o.title)} (${o.interactiveCount} actions)"]`
611
+ d.slice(0, 6).forEach((i, m) => {
612
+ const g = `LM_${m + 1}`;
613
+ x.push(
614
+ ` AppRoot --> ${g}["${v(i.id)}: ${v(i.title)} (${i.interactiveCount} actions)"]`
760
615
  );
761
- }), v.slice(0, 5).forEach((o, p) => {
762
- const f = `UF_${p + 1}`;
763
- k.push(
764
- ` Guard --> ${f}["[${o.category}] ${w(o.triggerLabel)}"]`
616
+ }), f.slice(0, 5).forEach((i, m) => {
617
+ const g = `UF_${m + 1}`;
618
+ x.push(
619
+ ` Guard --> ${g}["[${i.category}] ${v(i.triggerLabel)}"]`
765
620
  );
766
621
  });
767
- const m = k.join(`
768
- `), E = [
769
- `# ${i} — Automated Architecture, User-Flow & AI Context Dossier`,
770
- `Generated by \`@zen-ui/system\` // \`capri.docu()\` at \`${(/* @__PURE__ */ new Date()).toISOString()}\``,
622
+ const T = x.join(`
623
+ `), $ = [
624
+ `# ${o} — Automated Architecture, User-Flow & AI Context Dossier`,
625
+ `Generated by \`@zen-ui-capri/system\` // \`capri.docu()\` at \`${(/* @__PURE__ */ new Date()).toISOString()}\``,
771
626
  "",
772
627
  "## 1. Runtime & Design Token Architecture",
773
628
  `- **Route Path:** \`${r}\``,
774
- `- **Active Theme & Polarity:** \`${n.theme}\` (\`${n.polarity}\`)`,
775
- `- **Corner Radius & Density:** \`${n.radius}\` / \`${n.density}\``,
776
- `- **Viewport & Reduced Motion:** \`${n.viewportWidth}x${n.viewportHeight}\` (DPR \`${n.devicePixelRatio}\`, reducedMotion=\`${n.reducedMotion}\`)`,
777
- `- **W3C Custom Elements Registered:** ${u.customElements.map((o) => `\`<${o}>\``).join(", ") || "None"}`,
778
- `- **DOM, Security & WCAG 2.2 AA Audit Score:** **${t.score}/100** (${t.passed ? "PASSED" : "VIOLATIONS DETECTED"}, \`${t.horizontalOverflowPx}px\` horizontal overflow, promptInjectionSafe=\`${t.promptInjectionSafe}\`)`,
629
+ `- **Active Theme & Polarity:** \`${t.theme}\` (\`${t.polarity}\`)`,
630
+ `- **Corner Radius & Density:** \`${t.radius}\` / \`${t.density}\``,
631
+ `- **Viewport & Reduced Motion:** \`${t.viewportWidth}x${t.viewportHeight}\` (DPR \`${t.devicePixelRatio}\`, reducedMotion=\`${t.reducedMotion}\`)`,
632
+ `- **W3C Custom Elements Registered:** ${u.customElements.map((i) => `\`<${i}>\``).join(", ") || "None"}`,
633
+ `- **DOM, Security & WCAG 2.2 AA Audit Score:** **${n.score}/100** (${n.passed ? "PASSED" : "VIOLATIONS DETECTED"}, \`${n.horizontalOverflowPx}px\` horizontal overflow, promptInjectionSafe=\`${n.promptInjectionSafe}\`)`,
779
634
  "",
780
635
  "## 2. Component Inventory on Current Screen",
781
636
  `- **Buttons & Action Triggers:** ${u.buttons}`,
@@ -786,81 +641,81 @@ class oe {
786
641
  `- **Status Badges & Live Alerts:** ${u.badgesAndAlerts}`,
787
642
  "",
788
643
  "## 3. Semantic Landmark & Section Hierarchy",
789
- ...l.map(
790
- (o) => `- **\`#${o.id}\` (\`<${o.tag}>\`)** — *${o.title}* (${o.interactiveCount} interactive triggers, ${o.formControlsCount} form controls)`
644
+ ...d.map(
645
+ (i) => `- **\`#${i.id}\` (\`<${i.tag}>\`)** — *${i.title}* (${i.interactiveCount} interactive triggers, ${i.formControlsCount} form controls)`
791
646
  ),
792
647
  "",
793
648
  "## 4. Extracted Interactive User Flows",
794
- ...v.map(
795
- (o) => `- **[${o.category.toUpperCase()}] \`${o.triggerLabel}\`** $\\rightarrow$ ${o.targetDescription}`
649
+ ...f.map(
650
+ (i) => `- **[${i.category.toUpperCase()}] \`${i.triggerLabel}\`** $\\rightarrow$ ${i.targetDescription}`
796
651
  ),
797
652
  "",
798
653
  "## 5. Auto-Generated Mermaid Architecture & User-Flow Diagram",
799
654
  "```mermaid",
800
- m,
655
+ T,
801
656
  "```"
802
657
  ].join(`
803
658
  `);
804
659
  return {
805
660
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
806
- appTitle: i,
661
+ appTitle: o,
807
662
  routePath: r,
808
- telemetry: n,
809
- audit: t,
810
- landmarks: l,
663
+ telemetry: t,
664
+ audit: n,
665
+ landmarks: d,
811
666
  inventory: u,
812
- userFlows: v,
813
- mermaidDiagram: m,
814
- markdownBundle: E
667
+ userFlows: f,
668
+ mermaidDiagram: T,
669
+ markdownBundle: $
815
670
  };
816
671
  }
817
- exportMarkdownDocu(e = this.activeSubroutine, n, t = !1) {
818
- const a = this.docu(), i = S[e], r = n ? this.sanitizeForPrompt(n) : "";
672
+ exportMarkdownDocu(e = this.activeSubroutine, t, n = !1) {
673
+ const a = this.docu(), o = w[e], r = t ? this.sanitizeForPrompt(t) : "";
819
674
  return [
820
675
  a.markdownBundle,
821
676
  "",
822
- `## 6. Active Capri Subroutine Skill Ruleset (${i.codeName})`,
823
- i.aiSystemPrompt,
824
- t ? `
825
- ${i.aiVoiceAddendum}` : "",
677
+ `## 6. Active Capri Subroutine Skill Ruleset (${o.codeName})`,
678
+ o.aiSystemPrompt,
679
+ n ? `
680
+ ${o.aiVoiceAddendum}` : "",
826
681
  "",
827
- ...i.ruleset.map((d, l) => `${l + 1}. ${d}`),
682
+ ...o.ruleset.map((l, d) => `${d + 1}. ${l}`),
828
683
  r ? `
829
684
  ## 7. Current Developer / AI Task
830
685
  ${r}` : ""
831
686
  ].filter(Boolean).join(`
832
687
  `);
833
688
  }
834
- buildAgentPrompt(e = this.activeSubroutine, n, t = !1) {
835
- const a = S[e], i = this.docu(), r = i.audit, d = n ? this.sanitizeForPrompt(n) : "", l = r.violations.length === 0 ? "0 violations detected (Score: 100/100, 0 prompt-injection threats, 0px overflow, 0 unlabeled controls)." : r.violations.map((c) => `- [${c.code}] (${c.selector}): ${c.message} -> Fix: ${c.fixHint}`).join(`
689
+ buildAgentPrompt(e = this.activeSubroutine, t, n = !1) {
690
+ const a = w[e], o = this.docu(), r = o.audit, l = t ? this.sanitizeForPrompt(t) : "", d = r.violations.length === 0 ? "0 violations detected (Score: 100/100, 0 prompt-injection threats, 0px overflow, 0 unlabeled controls)." : r.violations.map((s) => `- [${s.code}] (${s.selector}): ${s.message} -> Fix: ${s.fixHint}`).join(`
836
691
  `);
837
692
  return [
838
- "# @zen-ui/system // CAPRI AI SKILL & ARCHITECTURE CONTEXT",
693
+ "# @zen-ui-capri/system // CAPRI AI SKILL & ARCHITECTURE CONTEXT",
839
694
  `Subroutine: ${a.codeName} (${a.id}) — ${a.title}`,
840
- `Invoke Command: "${t ? a.voiceCommand : a.chatCommand}" (Voice Mode: ${t ? "ON (--voice)" : "OFF (Default)"})`,
695
+ `Invoke Command: "${n ? a.voiceCommand : a.chatCommand}" (Voice Mode: ${n ? "ON (--voice)" : "OFF (Default)"})`,
841
696
  `Recommended Preset: theme="${a.recommendedTheme}", radius="${a.recommendedRadius}", density="${a.recommendedDensity}"`,
842
697
  "",
843
698
  "## 1. Subroutine System Prompt",
844
699
  a.aiSystemPrompt,
845
- t ? `
700
+ n ? `
846
701
  ${a.aiVoiceAddendum}` : "",
847
702
  "",
848
703
  "## 2. Mandatory Engineering Ruleset",
849
- ...a.ruleset.map((c, u) => `${u + 1}. ${c}`),
704
+ ...a.ruleset.map((s, u) => `${u + 1}. ${s}`),
850
705
  "",
851
706
  "## 3. Automated Screen Architecture & Component Context (capri.docu())",
852
- `- Route: ${i.routePath} | Theme: ${r.activeTheme} (${r.activePolarity}) | Viewport: ${r.viewport}`,
853
- `- Component Counts: ${i.inventory.buttons} buttons, ${i.inventory.inputsAndSelects} inputs/selects, ${i.inventory.tables} tables, ${i.inventory.cardsAndSurfaces} glass cards`,
854
- `- Landmarks: ${i.landmarks.map((c) => `#${c.id} (${c.interactiveCount} actions)`).join(", ")}`,
855
- `- Key User Flows: ${i.userFlows.slice(0, 6).map((c) => `[${c.category}] ${c.triggerLabel}`).join(" | ")}`,
707
+ `- Route: ${o.routePath} | Theme: ${r.activeTheme} (${r.activePolarity}) | Viewport: ${r.viewport}`,
708
+ `- Component Counts: ${o.inventory.buttons} buttons, ${o.inventory.inputsAndSelects} inputs/selects, ${o.inventory.tables} tables, ${o.inventory.cardsAndSurfaces} glass cards`,
709
+ `- Landmarks: ${o.landmarks.map((s) => `#${s.id} (${s.interactiveCount} actions)`).join(", ")}`,
710
+ `- Key User Flows: ${o.userFlows.slice(0, 6).map((s) => `[${s.category}] ${s.triggerLabel}`).join(" | ")}`,
856
711
  "",
857
712
  "## 4. Live CapriEngine Security, DOM & WCAG Telemetry",
858
713
  `- Audit Score: ${r.score}/100 (${r.passed ? "PASSED" : "ACTION REQUIRED"}) | Prompt-Injection Firewall: ${r.promptInjectionSafe ? "CLEAN (0 threats)" : `${r.promptThreatsCount} THREAT(S) BLOCKED`}`,
859
714
  `- Findings:
860
- ${l}`,
861
- d ? `
715
+ ${d}`,
716
+ l ? `
862
717
  ## 5. Requested Task
863
- ${d}` : ""
718
+ ${l}` : ""
864
719
  ].filter(Boolean).join(`
865
720
  `);
866
721
  }
@@ -870,11 +725,72 @@ ${d}` : ""
870
725
  };
871
726
  }
872
727
  notify(e) {
873
- for (const n of this.listeners)
874
- n(this.activeSubroutine, e);
728
+ for (const t of this.listeners)
729
+ t(this.activeSubroutine, e);
875
730
  }
876
731
  }
877
- const Ae = new oe(), D = [
732
+ const se = new X(), P = {
733
+ xs: 12,
734
+ sm: 14,
735
+ md: 16,
736
+ lg: 20,
737
+ xl: 24
738
+ }, N = {
739
+ inherit: "currentColor",
740
+ primary: "var(--zen-ink-primary)",
741
+ secondary: "var(--zen-ink-secondary)",
742
+ muted: "var(--zen-ink-muted)",
743
+ accent: "var(--zen-accent-primary)",
744
+ success: "var(--zen-status-success)",
745
+ warning: "var(--zen-status-warning)",
746
+ danger: "var(--zen-status-danger)"
747
+ }, U = {
748
+ search: '<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
749
+ plus: '<path d="M5 12h14"/><path d="M12 5v14"/>',
750
+ minus: '<path d="M5 12h14"/>',
751
+ close: '<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',
752
+ check: '<path d="M20 6 9 17l-5-5"/>',
753
+ copy: '<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',
754
+ "chevron-down": '<path d="m6 9 6 6 6-6"/>',
755
+ "chevron-right": '<path d="m9 18 6-6-6-6"/>',
756
+ "chevron-left": '<path d="m15 18-6-6 6-6"/>',
757
+ "external-link": '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
758
+ bolt: '<path d="M13 2 3 14h9l-1 8 10-12h-9l1-8z"/>',
759
+ sparkles: '<path d="M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"/><path d="M20 3v4"/><path d="M22 5h-4"/>',
760
+ terminal: '<polyline points="4 17 10 11 4 5"/><line x1="12" x2="20" y1="19" y2="19"/>',
761
+ cpu: '<rect width="16" height="16" x="4" y="4" rx="2"/><rect width="6" height="6" x="9" y="9" rx="1"/><path d="M15 2v2"/><path d="M15 20v2"/><path d="M2 15h2"/><path d="M2 9h2"/><path d="M20 15h2"/><path d="M20 9h2"/><path d="M9 2v2"/><path d="M9 20v2"/>',
762
+ database: '<ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v14a9 3 0 0 0 18 0V5"/><path d="M3 12a9 3 0 0 0 18 0"/>',
763
+ layers: '<path d="m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"/><path d="m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"/><path d="m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"/>',
764
+ shield: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>',
765
+ sliders: '<line x1="4" x2="4" y1="21" y2="14"/><line x1="4" x2="4" y1="10" y2="3"/><line x1="12" x2="12" y1="21" y2="12"/><line x1="12" x2="12" y1="8" y2="3"/><line x1="20" x2="20" y1="21" y2="16"/><line x1="20" x2="20" y1="12" y2="3"/><line x1="2" x2="6" y1="14" y2="14"/><line x1="10" x2="14" y1="8" y2="8"/><line x1="18" x2="22" y1="16" y2="16"/>',
766
+ command: '<path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3"/>',
767
+ code: '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>',
768
+ activity: '<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>',
769
+ info: '<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>',
770
+ success: '<circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/>',
771
+ warning: '<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>',
772
+ danger: '<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="M12 8v4"/><path d="M12 16h.01"/>',
773
+ "trend-up": '<polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/><polyline points="16 7 22 7 22 13"/>',
774
+ "trend-down": '<polyline points="22 17 13.5 8.5 8.5 13.5 2 7"/><polyline points="16 17 22 17 22 11"/>',
775
+ radio: '<path d="M4.9 19.1C1 15.2 1 8.8 4.9 4.9"/><path d="M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"/><circle cx="12" cy="12" r="2"/><path d="M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"/><path d="M19.1 4.9C23 8.8 23 15.1 19.1 19"/>',
776
+ sun: '<circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/>',
777
+ moon: '<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>',
778
+ eye: '<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>',
779
+ upload: '<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" x2="12" y1="3" y2="15"/>',
780
+ trash: '<path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/>',
781
+ refresh: '<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',
782
+ menu: '<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',
783
+ "panel-right": '<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M15 3v18"/>',
784
+ user: '<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',
785
+ lock: '<rect width="18" height="11" x="3" y="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>',
786
+ globe: '<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>',
787
+ folder: '<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/>'
788
+ };
789
+ function Q(c) {
790
+ const e = c.size ?? "md", t = Object.prototype.hasOwnProperty.call(P, e) ? P[e] : P.md, n = c.tone ?? "inherit", a = Object.prototype.hasOwnProperty.call(N, n) ? N[n] : N.inherit, o = typeof c.strokeWidth == "number" && Number.isFinite(c.strokeWidth) ? Math.min(Math.max(c.strokeWidth, 0.5), 4) : 2, r = Object.prototype.hasOwnProperty.call(U, c.name) ? U[c.name] : U.sparkles, l = c.spin ? "animation: spin 1s linear infinite;" : "";
791
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" stroke="${a}" stroke-width="${o}" stroke-linecap="round" stroke-linejoin="round" style="display:inline-block;vertical-align:middle;flex-shrink:0;${l}">${r}</svg>`;
792
+ }
793
+ const R = [
878
794
  {
879
795
  id: "blackwall-crimson",
880
796
  name: "Capri // Capricorn",
@@ -955,7 +871,7 @@ const Ae = new oe(), D = [
955
871
  secondaryHex: "#0284C7",
956
872
  inkHex: "#09090D"
957
873
  }
958
- ], N = [
874
+ ], D = [
959
875
  {
960
876
  id: "orion",
961
877
  label: "CAPRI // UNLEASHED",
@@ -1009,27 +925,27 @@ const Ae = new oe(), D = [
1009
925
  ]
1010
926
  }
1011
927
  ];
1012
- function K(s) {
1013
- const e = D.find((n) => n.id === s);
928
+ function j(c) {
929
+ const e = R.find((t) => t.id === c);
1014
930
  return e ? e.polarity : "dark";
1015
931
  }
1016
- class se {
932
+ class J {
1017
933
  constructor(e) {
1018
- g(this, "state");
1019
- g(this, "listeners", /* @__PURE__ */ new Set());
1020
- g(this, "storageKey");
934
+ h(this, "state");
935
+ h(this, "listeners", /* @__PURE__ */ new Set());
936
+ h(this, "storageKey");
1021
937
  this.storageKey = (e == null ? void 0 : e.storageKey) ?? "zen-ui-theme-v2";
1022
- let n = (e == null ? void 0 : e.defaultTheme) ?? "blackwall-crimson";
938
+ let t = (e == null ? void 0 : e.defaultTheme) ?? "blackwall-crimson";
1023
939
  if (typeof window < "u")
1024
940
  try {
1025
- const t = window.localStorage.getItem(this.storageKey);
1026
- t && D.some((a) => a.id === t) && (n = t);
941
+ const n = window.localStorage.getItem(this.storageKey);
942
+ n && R.some((a) => a.id === n) && (t = n);
1027
943
  } catch {
1028
- n = (e == null ? void 0 : e.defaultTheme) ?? "blackwall-crimson";
944
+ t = (e == null ? void 0 : e.defaultTheme) ?? "blackwall-crimson";
1029
945
  }
1030
946
  this.state = {
1031
- theme: n,
1032
- polarity: K(n),
947
+ theme: t,
948
+ polarity: j(t),
1033
949
  density: (e == null ? void 0 : e.defaultDensity) ?? "comfortable",
1034
950
  radius: (e == null ? void 0 : e.defaultRadius) ?? "architectural"
1035
951
  }, this.applyToDom();
@@ -1041,7 +957,7 @@ class se {
1041
957
  if (this.state = {
1042
958
  ...this.state,
1043
959
  theme: e,
1044
- polarity: K(e)
960
+ polarity: j(e)
1045
961
  }, typeof window < "u")
1046
962
  try {
1047
963
  window.localStorage.setItem(this.storageKey, e);
@@ -1074,18 +990,18 @@ class se {
1074
990
  if (typeof document > "u") return;
1075
991
  const e = document.documentElement;
1076
992
  e.setAttribute("data-theme", this.state.theme), e.setAttribute("data-polarity", this.state.polarity), e.setAttribute("data-density", this.state.density), e.setAttribute("data-radius", this.state.radius);
1077
- const n = D.find((t) => t.id === this.state.theme) ?? D[0];
1078
- X(n);
993
+ const t = R.find((n) => n.id === this.state.theme) ?? R[0];
994
+ W(t);
1079
995
  }
1080
996
  notify() {
1081
997
  for (const e of this.listeners)
1082
998
  e(this.state);
1083
999
  }
1084
1000
  }
1085
- class ce {
1001
+ class ee {
1086
1002
  constructor() {
1087
- g(this, "ctx", null);
1088
- g(this, "muted", !1);
1003
+ h(this, "ctx", null);
1004
+ h(this, "muted", !1);
1089
1005
  }
1090
1006
  isMuted() {
1091
1007
  return this.muted;
@@ -1097,26 +1013,26 @@ class ce {
1097
1013
  if (!(this.muted || typeof window > "u"))
1098
1014
  try {
1099
1015
  this.ctx || (this.ctx = new window.AudioContext()), this.ctx.state === "suspended" && this.ctx.resume();
1100
- const n = this.ctx.currentTime, t = this.ctx.createOscillator(), a = this.ctx.createGain();
1101
- t.type = "triangle", t.frequency.setValueAtTime(e, n), t.frequency.exponentialRampToValueAtTime(e * 0.45, n + 0.035), a.gain.setValueAtTime(0.06, n), a.gain.exponentialRampToValueAtTime(1e-4, n + 0.035), t.connect(a), a.connect(this.ctx.destination), t.start(n), t.stop(n + 0.04);
1016
+ const t = this.ctx.currentTime, n = this.ctx.createOscillator(), a = this.ctx.createGain();
1017
+ n.type = "triangle", n.frequency.setValueAtTime(e, t), n.frequency.exponentialRampToValueAtTime(e * 0.45, t + 0.035), a.gain.setValueAtTime(0.06, t), a.gain.exponentialRampToValueAtTime(1e-4, t + 0.035), n.connect(a), a.connect(this.ctx.destination), n.start(t), n.stop(t + 0.04);
1102
1018
  } catch {
1103
1019
  }
1104
1020
  }
1105
1021
  }
1106
- const Z = new se(), V = new ce();
1107
- class le extends HTMLElement {
1022
+ const H = new J(), Z = new ee();
1023
+ class te extends HTMLElement {
1108
1024
  constructor() {
1109
1025
  super(...arguments);
1110
- g(this, "framing", "portrait");
1111
- g(this, "activeMode", "orion");
1112
- g(this, "rafId", 0);
1113
- g(this, "pointer", { x: 0, y: 0 });
1114
- g(this, "smoothPointer", { x: 0, y: 0 });
1115
- g(this, "canvasEl", null);
1116
- g(this, "figureEl", null);
1117
- g(this, "handlePointerMove", (n) => {
1118
- const t = n.clientX / Math.max(1, window.innerWidth) * 2 - 1, a = n.clientY / Math.max(1, window.innerHeight) * 2 - 1;
1119
- this.pointer = { x: t, y: a };
1026
+ h(this, "framing", "portrait");
1027
+ h(this, "activeMode", "orion");
1028
+ h(this, "rafId", 0);
1029
+ h(this, "pointer", { x: 0, y: 0 });
1030
+ h(this, "smoothPointer", { x: 0, y: 0 });
1031
+ h(this, "canvasEl", null);
1032
+ h(this, "figureEl", null);
1033
+ h(this, "handlePointerMove", (t) => {
1034
+ const n = t.clientX / Math.max(1, window.innerWidth) * 2 - 1, a = t.clientY / Math.max(1, window.innerHeight) * 2 - 1;
1035
+ this.pointer = { x: n, y: a };
1120
1036
  });
1121
1037
  }
1122
1038
  static get observedAttributes() {
@@ -1130,57 +1046,57 @@ class le extends HTMLElement {
1130
1046
  }
1131
1047
  attributeChangedCallback() {
1132
1048
  if (!this.isConnected) return;
1133
- const n = this.getAttribute("framing") ?? "portrait", t = this.getAttribute("mode") ?? "orion";
1134
- (n !== this.framing || t !== this.activeMode) && (this.framing = n, this.activeMode = t, this.render(), this.startEyeLoop());
1049
+ const t = this.getAttribute("framing") ?? "portrait", n = this.getAttribute("mode") ?? "orion";
1050
+ (t !== this.framing || n !== this.activeMode) && (this.framing = t, this.activeMode = n, this.render(), this.startEyeLoop());
1135
1051
  }
1136
1052
  startEyeLoop() {
1137
1053
  this.rafId && window.cancelAnimationFrame(this.rafId);
1138
- const n = performance.now(), t = (a) => {
1139
- const i = (a - n) * 1e-3;
1054
+ const t = performance.now(), n = (a) => {
1055
+ const o = (a - t) * 1e-3;
1140
1056
  if (this.smoothPointer.x += (this.pointer.x - this.smoothPointer.x) * 0.12, this.smoothPointer.y += (this.pointer.y - this.smoothPointer.y) * 0.12, this.figureEl) {
1141
- const r = Math.sin(i * 2.1) * 3.5, d = this.smoothPointer.x * 5.5, l = -this.smoothPointer.y * 3.5;
1142
- this.figureEl.style.transform = `perspective(900px) translateY(${r.toFixed(2)}px) rotateX(${l.toFixed(2)}deg) rotateY(${d.toFixed(2)}deg)`;
1057
+ const r = Math.sin(o * 2.1) * 3.5, l = this.smoothPointer.x * 5.5, d = -this.smoothPointer.y * 3.5;
1058
+ this.figureEl.style.transform = `perspective(900px) translateY(${r.toFixed(2)}px) rotateX(${d.toFixed(2)}deg) rotateY(${l.toFixed(2)}deg)`;
1143
1059
  }
1144
1060
  if (this.canvasEl) {
1145
1061
  const r = this.canvasEl.getContext("2d");
1146
1062
  if (r) {
1147
- const d = this.canvasEl.width, l = this.canvasEl.height;
1148
- r.clearRect(0, 0, d, l);
1149
- const c = Math.sin(i * 1.1 - 1.2) > 0.992 || Math.sin(i * 2.9 - 1.5) > 0.995, u = this.smoothPointer.x * (d * 85e-4), v = this.smoothPointer.y * (l * 55e-4), b = d * 0.562 + u, h = l * 0.233 + v, A = d * 0.474 + u * 0.75, C = l * 0.25 + v * 0.75;
1150
- if (c)
1151
- r.save(), r.strokeStyle = "#00FF66", r.lineWidth = 2.5, r.beginPath(), r.moveTo(b - d * 0.014, h), r.lineTo(b + d * 0.014, h), r.stroke(), r.restore();
1063
+ const l = this.canvasEl.width, d = this.canvasEl.height;
1064
+ r.clearRect(0, 0, l, d);
1065
+ const s = Math.sin(o * 1.1 - 1.2) > 0.992 || Math.sin(o * 2.9 - 1.5) > 0.995, u = this.smoothPointer.x * (l * 85e-4), f = this.smoothPointer.y * (d * 55e-4), b = l * 0.562 + u, y = d * 0.233 + f, A = l * 0.474 + u * 0.75, S = d * 0.25 + f * 0.75;
1066
+ if (s)
1067
+ r.save(), r.strokeStyle = "#00FF66", r.lineWidth = 2.5, r.beginPath(), r.moveTo(b - l * 0.014, y), r.lineTo(b + l * 0.014, y), r.stroke(), r.restore();
1152
1068
  else {
1153
1069
  r.save(), r.globalCompositeOperation = "screen";
1154
- const w = r.createRadialGradient(
1070
+ const v = r.createRadialGradient(
1155
1071
  b,
1156
- h,
1072
+ y,
1157
1073
  1,
1158
1074
  b,
1159
- h,
1160
- d * 0.017
1075
+ y,
1076
+ l * 0.017
1161
1077
  );
1162
- w.addColorStop(0, "#FFFFFF"), w.addColorStop(0.38, "#19A0FF"), w.addColorStop(0.75, "rgba(25, 160, 255, 0.55)"), w.addColorStop(1, "rgba(25, 160, 255, 0)"), r.fillStyle = w, r.beginPath(), r.arc(b, h, d * 0.017, 0, Math.PI * 2), r.fill(), r.fillStyle = "#19A0FF", r.beginPath(), r.arc(b, h, d * 85e-4, 0, Math.PI * 2), r.fill(), r.fillStyle = "#FFFFFF", r.beginPath(), r.arc(b, h, d * 42e-4, 0, Math.PI * 2), r.fill(), r.fillStyle = "#19A0FF", r.beginPath(), r.arc(A, C, d * 58e-4, 0, Math.PI * 2), r.fill(), r.fillStyle = "#FFFFFF", r.beginPath(), r.arc(A, C, d * 28e-4, 0, Math.PI * 2), r.fill(), r.restore();
1078
+ v.addColorStop(0, "#FFFFFF"), v.addColorStop(0.38, "#19A0FF"), v.addColorStop(0.75, "rgba(25, 160, 255, 0.55)"), v.addColorStop(1, "rgba(25, 160, 255, 0)"), r.fillStyle = v, r.beginPath(), r.arc(b, y, l * 0.017, 0, Math.PI * 2), r.fill(), r.fillStyle = "#19A0FF", r.beginPath(), r.arc(b, y, l * 85e-4, 0, Math.PI * 2), r.fill(), r.fillStyle = "#FFFFFF", r.beginPath(), r.arc(b, y, l * 42e-4, 0, Math.PI * 2), r.fill(), r.fillStyle = "#19A0FF", r.beginPath(), r.arc(A, S, l * 58e-4, 0, Math.PI * 2), r.fill(), r.fillStyle = "#FFFFFF", r.beginPath(), r.arc(A, S, l * 28e-4, 0, Math.PI * 2), r.fill(), r.restore();
1163
1079
  }
1164
1080
  }
1165
1081
  }
1166
- this.rafId = window.requestAnimationFrame(t);
1082
+ this.rafId = window.requestAnimationFrame(n);
1167
1083
  };
1168
- this.rafId = window.requestAnimationFrame(t);
1084
+ this.rafId = window.requestAnimationFrame(n);
1169
1085
  }
1170
1086
  render() {
1171
- const n = j(
1087
+ const t = B(
1172
1088
  this.getAttribute("title") ?? "CAPRI // CONSTRUCT"
1173
- ), t = j(
1089
+ ), n = B(
1174
1090
  this.getAttribute("subtitle") ?? "Edgerunners S2 // Soulkiller Net-Driver"
1175
- ), a = pe(
1091
+ ), a = ie(
1176
1092
  this.getAttribute("image-src") ?? "/capri-construct-base.png"
1177
- ), i = N.find((l) => l.id === this.activeMode) ?? N[0];
1093
+ ), o = D.find((d) => d.id === this.activeMode) ?? D[0];
1178
1094
  this.innerHTML = `
1179
1095
  <div class="zen-surface-selected" style="padding: 1.25rem; position: relative; overflow: hidden;">
1180
1096
  <div style="display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem;">
1181
1097
  <div>
1182
- <div class="zen-telemetry-label" style="color: var(--zen-accent-primary);">${t}</div>
1183
- <div class="zen-font-display" style="font-size: 1.125rem; font-weight: 700; color: var(--zen-ink-primary);">${n}</div>
1098
+ <div class="zen-telemetry-label" style="color: var(--zen-accent-primary);">${n}</div>
1099
+ <div class="zen-font-display" style="font-size: 1.125rem; font-weight: 700; color: var(--zen-ink-primary);">${t}</div>
1184
1100
  </div>
1185
1101
  <div style="display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 0.75rem; background: var(--zen-surface-2); border: 1px solid var(--zen-border-default);">
1186
1102
  <button type="button" data-framing="portrait" class="zen-btn-base zen-btn-sm ${this.framing === "portrait" ? "zen-btn-primary" : "zen-btn-ghost"}">Portrait</button>
@@ -1195,33 +1111,33 @@ class le extends HTMLElement {
1195
1111
  </div>
1196
1112
  <div style="margin-top: 1rem; padding: 0.875rem; border-radius: 0.875rem; background: var(--zen-surface-2); border: 1px solid var(--zen-border-default);">
1197
1113
  <div style="display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.375rem;">
1198
- <span class="zen-telemetry-label" style="color: var(--zen-accent-primary);">${i.frequency}</span>
1199
- <span class="zen-badge zen-badge-accent">${i.status}</span>
1114
+ <span class="zen-telemetry-label" style="color: var(--zen-accent-primary);">${o.frequency}</span>
1115
+ <span class="zen-badge zen-badge-accent">${o.status}</span>
1200
1116
  </div>
1201
- <div class="zen-font-display" style="font-weight: 700; font-size: 0.875rem; margin-bottom: 0.25rem;">${i.label}</div>
1202
- <p style="font-size: 0.75rem; color: var(--zen-ink-secondary); margin: 0;">${i.transmission}</p>
1117
+ <div class="zen-font-display" style="font-weight: 700; font-size: 0.875rem; margin-bottom: 0.25rem;">${o.label}</div>
1118
+ <p style="font-size: 0.75rem; color: var(--zen-ink-secondary); margin: 0;">${o.transmission}</p>
1203
1119
  </div>
1204
1120
  <div style="display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem;">
1205
- ${N.map(
1206
- (l) => `
1207
- <button type="button" data-directive="${l.id}" class="zen-btn-base zen-btn-sm ${l.id === this.activeMode ? "zen-btn-primary" : "zen-btn-secondary"}" style="justify-content: flex-start; font-family: var(--zen-font-mono); font-size: 0.6875rem;">
1208
- ${l.label}
1121
+ ${D.map(
1122
+ (d) => `
1123
+ <button type="button" data-directive="${d.id}" class="zen-btn-base zen-btn-sm ${d.id === this.activeMode ? "zen-btn-primary" : "zen-btn-secondary"}" style="justify-content: flex-start; font-family: var(--zen-font-mono); font-size: 0.6875rem;">
1124
+ ${d.label}
1209
1125
  </button>
1210
1126
  `
1211
1127
  ).join("")}
1212
1128
  </div>
1213
1129
  </div>
1214
- `, this.canvasEl = this.querySelector("[data-capri-eyes]"), this.figureEl = this.querySelector("[data-capri-figure]"), this.querySelectorAll("[data-framing]").forEach((l) => {
1215
- l.addEventListener("click", () => {
1216
- const c = l.getAttribute("framing") ?? l.dataset.framing;
1217
- (c === "portrait" || c === "full") && (V.playMicroClick(560), this.framing = c, this.setAttribute("framing", c), this.render(), this.startEyeLoop());
1130
+ `, this.canvasEl = this.querySelector("[data-capri-eyes]"), this.figureEl = this.querySelector("[data-capri-figure]"), this.querySelectorAll("[data-framing]").forEach((d) => {
1131
+ d.addEventListener("click", () => {
1132
+ const s = d.getAttribute("framing") ?? d.dataset.framing;
1133
+ (s === "portrait" || s === "full") && (Z.playMicroClick(560), this.framing = s, this.setAttribute("framing", s), this.render(), this.startEyeLoop());
1218
1134
  });
1219
- }), this.querySelectorAll("[data-directive]").forEach((l) => {
1220
- l.addEventListener("click", () => {
1221
- const c = l.dataset.directive;
1222
- if (!c) return;
1223
- V.playMicroClick(620), this.activeMode = c, this.setAttribute("mode", c);
1224
- const u = N.find((v) => v.id === c);
1135
+ }), this.querySelectorAll("[data-directive]").forEach((d) => {
1136
+ d.addEventListener("click", () => {
1137
+ const s = d.dataset.directive;
1138
+ if (!s) return;
1139
+ Z.playMicroClick(620), this.activeMode = s, this.setAttribute("mode", s);
1140
+ const u = D.find((f) => f.id === s);
1225
1141
  u && this.dispatchEvent(
1226
1142
  new CustomEvent("zen-directive", {
1227
1143
  detail: { directive: u },
@@ -1233,7 +1149,7 @@ class le extends HTMLElement {
1233
1149
  });
1234
1150
  }
1235
1151
  }
1236
- class de extends HTMLElement {
1152
+ class ne extends HTMLElement {
1237
1153
  static get observedAttributes() {
1238
1154
  return ["variant"];
1239
1155
  }
@@ -1244,19 +1160,19 @@ class de extends HTMLElement {
1244
1160
  this.isConnected && this.render();
1245
1161
  }
1246
1162
  render() {
1247
- const e = this.getAttribute("variant") ?? "blackwall-lattice", n = e === "swiss-blueprint" ? "background-image: linear-gradient(to right, var(--zen-border-subtle) 1px, transparent 1px), linear-gradient(to bottom, var(--zen-border-subtle) 1px, transparent 1px); background-size: 48px 48px;" : e === "blackwall-lattice" ? "background-image: radial-gradient(circle at 50% 18%, rgba(var(--zen-accent-rgb), 0.16), transparent 62%), radial-gradient(circle at 85% 75%, rgba(var(--zen-secondary-rgb), 0.11), transparent 55%);" : e === "aurora-mesh" ? "background-image: radial-gradient(ellipse at 20% 20%, rgba(var(--zen-accent-rgb), 0.20), transparent 55%), radial-gradient(ellipse at 80% 60%, rgba(var(--zen-secondary-rgb), 0.15), transparent 60%);" : "";
1163
+ const e = this.getAttribute("variant") ?? "blackwall-lattice", t = e === "swiss-blueprint" ? "background-image: linear-gradient(to right, var(--zen-border-subtle) 1px, transparent 1px), linear-gradient(to bottom, var(--zen-border-subtle) 1px, transparent 1px); background-size: 48px 48px;" : e === "blackwall-lattice" ? "background-image: radial-gradient(circle at 50% 18%, rgba(var(--zen-accent-rgb), 0.16), transparent 62%), radial-gradient(circle at 85% 75%, rgba(var(--zen-secondary-rgb), 0.11), transparent 55%);" : e === "aurora-mesh" ? "background-image: radial-gradient(ellipse at 20% 20%, rgba(var(--zen-accent-rgb), 0.20), transparent 55%), radial-gradient(ellipse at 80% 60%, rgba(var(--zen-secondary-rgb), 0.15), transparent 60%);" : "";
1248
1164
  this.innerHTML = `
1249
- <div aria-hidden="true" style="position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; ${n}"></div>
1165
+ <div aria-hidden="true" style="position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; ${t}"></div>
1250
1166
  `;
1251
1167
  }
1252
1168
  }
1253
- class me extends HTMLElement {
1169
+ class re extends HTMLElement {
1254
1170
  constructor() {
1255
1171
  super(...arguments);
1256
- g(this, "unsubscribe", null);
1172
+ h(this, "unsubscribe", null);
1257
1173
  }
1258
1174
  connectedCallback() {
1259
- this.unsubscribe = Z.subscribe(() => {
1175
+ this.unsubscribe = H.subscribe(() => {
1260
1176
  this.render();
1261
1177
  });
1262
1178
  }
@@ -1264,28 +1180,28 @@ class me extends HTMLElement {
1264
1180
  this.unsubscribe && (this.unsubscribe(), this.unsubscribe = null);
1265
1181
  }
1266
1182
  render() {
1267
- const { theme: n } = Z.getState();
1183
+ const { theme: t } = H.getState();
1268
1184
  this.innerHTML = `
1269
1185
  <div style="display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;">
1270
- ${D.map(
1271
- (t) => `
1186
+ ${R.map(
1187
+ (n) => `
1272
1188
  <button
1273
1189
  type="button"
1274
- data-theme-id="${t.id}"
1275
- class="zen-btn-base zen-btn-sm ${t.id === n ? "zen-btn-primary" : "zen-btn-secondary"}"
1190
+ data-theme-id="${n.id}"
1191
+ class="zen-btn-base zen-btn-sm ${n.id === t ? "zen-btn-primary" : "zen-btn-secondary"}"
1276
1192
  >
1277
- <span style="width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: ${t.accentHex}; display: inline-block;"></span>
1278
- <span>${t.name}</span>
1193
+ <span style="width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: ${n.accentHex}; display: inline-block;"></span>
1194
+ <span>${n.name}</span>
1279
1195
  </button>
1280
1196
  `
1281
1197
  ).join("")}
1282
1198
  </div>
1283
- `, this.querySelectorAll("[data-theme-id]").forEach((t) => {
1284
- t.addEventListener("click", () => {
1285
- const a = t.dataset.themeId;
1286
- a && (V.playMicroClick(540), Z.setTheme(a), this.dispatchEvent(
1199
+ `, this.querySelectorAll("[data-theme-id]").forEach((n) => {
1200
+ n.addEventListener("click", () => {
1201
+ const a = n.dataset.themeId;
1202
+ a && (Z.playMicroClick(540), H.setTheme(a), this.dispatchEvent(
1287
1203
  new CustomEvent("zen-theme-change", {
1288
- detail: Z.getState(),
1204
+ detail: H.getState(),
1289
1205
  bubbles: !0,
1290
1206
  composed: !0
1291
1207
  })
@@ -1294,7 +1210,7 @@ class me extends HTMLElement {
1294
1210
  });
1295
1211
  }
1296
1212
  }
1297
- class ue extends HTMLElement {
1213
+ class ae extends HTMLElement {
1298
1214
  static get observedAttributes() {
1299
1215
  return ["name", "size", "tone", "stroke-width", "spin"];
1300
1216
  }
@@ -1305,52 +1221,45 @@ class ue extends HTMLElement {
1305
1221
  this.isConnected && this.render();
1306
1222
  }
1307
1223
  render() {
1308
- const e = this.getAttribute("name") ?? "sparkles", n = this.getAttribute("size") ?? "md", t = this.getAttribute("tone") ?? "inherit", a = Number(this.getAttribute("stroke-width") ?? 2), i = this.getAttribute("spin") === "true";
1309
- this.innerHTML = ae({
1224
+ const e = this.getAttribute("name") ?? "sparkles", t = this.getAttribute("size") ?? "md", n = this.getAttribute("tone") ?? "inherit", a = Number(this.getAttribute("stroke-width") ?? 2), o = this.getAttribute("spin") === "true";
1225
+ this.innerHTML = Q({
1310
1226
  name: e,
1311
- size: n,
1312
- tone: t,
1227
+ size: t,
1228
+ tone: n,
1313
1229
  strokeWidth: a,
1314
- spin: i
1230
+ spin: o
1315
1231
  });
1316
1232
  }
1317
1233
  }
1318
- function j(s) {
1319
- return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1234
+ function B(c) {
1235
+ return c.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1320
1236
  }
1321
- function pe(s) {
1322
- const e = s.trim(), n = e.replace(/[\u0000-\u0020]+/g, "");
1323
- return /^(?:javascript|data|vbscript|file):/i.test(n) ? "/capri-construct-base.png" : j(e);
1237
+ function ie(c) {
1238
+ const e = c.trim(), t = e.replace(/[\u0000-\u0020]+/g, "");
1239
+ return /^(?:javascript|data|vbscript|file):/i.test(t) ? "/capri-construct-base.png" : B(e);
1324
1240
  }
1325
- function xe() {
1326
- typeof window > "u" || !("customElements" in window) || (window.customElements.get("zen-icon") || window.customElements.define("zen-icon", ue), window.customElements.get("zen-ai-construct") || window.customElements.define("zen-ai-construct", le), window.customElements.get("zen-ambient-background") || window.customElements.define(
1241
+ function ce() {
1242
+ typeof window > "u" || !("customElements" in window) || (window.customElements.get("zen-icon") || window.customElements.define("zen-icon", ae), window.customElements.get("zen-ai-construct") || window.customElements.define("zen-ai-construct", te), window.customElements.get("zen-ambient-background") || window.customElements.define(
1327
1243
  "zen-ambient-background",
1328
- de
1329
- ), window.customElements.get("zen-theme-switcher") || window.customElements.define("zen-theme-switcher", me));
1244
+ ne
1245
+ ), window.customElements.get("zen-theme-switcher") || window.customElements.define("zen-theme-switcher", re));
1330
1246
  }
1331
1247
  export {
1332
- S as C,
1333
- ve as Z,
1334
- oe as a,
1335
- P as b,
1336
- Ae as c,
1337
- I as d,
1338
- T as e,
1339
- D as f,
1340
- le as g,
1341
- de as h,
1342
- we as i,
1343
- ue as j,
1344
- se as k,
1345
- be as l,
1346
- me as m,
1347
- ce as n,
1348
- j as o,
1349
- ae as p,
1350
- X as q,
1351
- xe as r,
1352
- pe as s,
1353
- Z as t,
1354
- fe as u,
1355
- V as z
1248
+ w as C,
1249
+ _ as Z,
1250
+ X as a,
1251
+ R as b,
1252
+ se as c,
1253
+ te as d,
1254
+ ne as e,
1255
+ ae as f,
1256
+ J as g,
1257
+ re as h,
1258
+ ee as i,
1259
+ B as j,
1260
+ ie as k,
1261
+ H as l,
1262
+ ce as r,
1263
+ W as s,
1264
+ Z as z
1356
1265
  };