@snowcone-app/canvas 0.22.0 → 0.26.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.
Files changed (59) hide show
  1. package/ERROR_CONTRACT.md +600 -0
  2. package/README.md +2 -1
  3. package/STYLING_CONTRACT.md +173 -93
  4. package/dist/{ContextualToolbars-BDEt9ND0.js → ContextualToolbars-DUhBKVxe.js} +3 -3
  5. package/dist/{ContextualToolbars-BDEt9ND0.js.map → ContextualToolbars-DUhBKVxe.js.map} +1 -1
  6. package/dist/{EditorCanvasImpl-BH_bKy-F.js → EditorCanvasImpl-BLZV_el0.js} +6 -6
  7. package/dist/{EditorCanvasImpl-BH_bKy-F.js.map → EditorCanvasImpl-BLZV_el0.js.map} +1 -1
  8. package/dist/{ImagePanel-BwqFDKvW.js → ImagePanel-sLSjaPWS.js} +3 -3
  9. package/dist/{ImagePanel-BwqFDKvW.js.map → ImagePanel-sLSjaPWS.js.map} +1 -1
  10. package/dist/{SnowconeCanvas-Cx7nXlBI.js → SnowconeCanvas-4ef4a61J.js} +6 -6
  11. package/dist/{SnowconeCanvas-Cx7nXlBI.js.map → SnowconeCanvas-4ef4a61J.js.map} +1 -1
  12. package/dist/{UnifiedFontService-CC3CSmH5.js → UnifiedFontService-Bx2MxFfy.js} +867 -834
  13. package/dist/{UnifiedFontService-CC3CSmH5.js.map → UnifiedFontService-Bx2MxFfy.js.map} +1 -1
  14. package/dist/advanced.mjs +7 -7
  15. package/dist/api/embed.d.ts +4 -4
  16. package/dist/components/editor/EditorLoadingOverlay.d.ts +12 -0
  17. package/dist/components/editor/EditorPlacements.d.ts +14 -0
  18. package/dist/components/editor/EditorPreview.d.ts +32 -8
  19. package/dist/components/editor/EditorRoot.d.ts +12 -0
  20. package/dist/components/editor/PreviewPrismOverlay.d.ts +23 -0
  21. package/dist/components/editor/RootInternals.d.ts +31 -0
  22. package/dist/components/editor/editorAudit.d.ts +66 -0
  23. package/dist/components/editor/index.d.ts +14 -0
  24. package/dist/components/editor/usePlacements.d.ts +14 -0
  25. package/dist/components/embed-realtime/context.d.ts +11 -2
  26. package/dist/components/embed-realtime/validateEmbed.d.ts +20 -1
  27. package/dist/{custom-icons-BW6hqmkL.js → custom-icons-DeYIrTK1.js} +7 -7
  28. package/dist/{custom-icons-BW6hqmkL.js.map → custom-icons-DeYIrTK1.js.map} +1 -1
  29. package/dist/design/design-builder.d.ts +108 -15
  30. package/dist/design/product-config.d.ts +10 -0
  31. package/dist/design-builder-U7Su9MMC.js +470 -0
  32. package/dist/design-builder-U7Su9MMC.js.map +1 -0
  33. package/dist/editorErrors-B2mb1sVN.js.map +1 -1
  34. package/dist/embed-DXGydZOT.js +1586 -0
  35. package/dist/embed-DXGydZOT.js.map +1 -0
  36. package/dist/embed.mjs +34 -31
  37. package/dist/errors/editorError.d.ts +27 -1
  38. package/dist/hooks/bindingGuards.d.ts +16 -0
  39. package/dist/hooks/useColorBinding.d.ts +2 -1
  40. package/dist/hooks/useFontBinding.d.ts +2 -1
  41. package/dist/hooks/useImageBinding.d.ts +2 -1
  42. package/dist/hooks/useTextBinding.d.ts +2 -1
  43. package/dist/index.mjs +6 -6
  44. package/dist/style.css +1 -1
  45. package/dist/template-fields-DJ157D3E.js +548 -0
  46. package/dist/template-fields-DJ157D3E.js.map +1 -0
  47. package/dist/testing/failureFixtures.d.ts +2 -2
  48. package/dist/testing.mjs +1 -1
  49. package/dist/{validation-C9Fe9ahK.js → validation-DnAkXdUg.js} +7 -7
  50. package/dist/{validation-C9Fe9ahK.js.map → validation-DnAkXdUg.js.map} +1 -1
  51. package/example/package.json +1 -1
  52. package/llms.txt +3 -0
  53. package/package.json +6 -3
  54. package/dist/design-builder-CT4DHIPe.js +0 -367
  55. package/dist/design-builder-CT4DHIPe.js.map +0 -1
  56. package/dist/embed-8ecUMMH-.js +0 -1226
  57. package/dist/embed-8ecUMMH-.js.map +0 -1
  58. package/dist/template-fields-C2pSfMBh.js +0 -494
  59. package/dist/template-fields-C2pSfMBh.js.map +0 -1
package/dist/advanced.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { D as te, T as M, h as D, B as re, I as q, i as I, j as ne, e as se } from "./UnifiedFontService-CC3CSmH5.js";
2
- import { k as at, L as it, M as ct, l as lt, S as dt, m as ut, s as mt, n as ft } from "./UnifiedFontService-CC3CSmH5.js";
3
- import { r as oe, v as ae } from "./validation-C9Fe9ahK.js";
4
- import { a as pt, b as xt, c as gt, d as bt, D as yt, e as vt, f as wt, G as St, K as Ct, g as Tt, L as Et, S as $t, T as kt, Z as At, h as Ft, i as Pt, j as Nt, k as Rt, l as Bt, m as Mt, n as Dt, u as It, o as zt, p as Ot } from "./validation-C9Fe9ahK.js";
5
- import { ImagePanel as Wt } from "./ImagePanel-BwqFDKvW.js";
6
- import { P as ie, a as ce, b as le } from "./ContextualToolbars-BDEt9ND0.js";
7
- import { A as Gt, B as _t, c as Ut, C as jt, d as Jt, e as qt, F as Zt, f as Vt, I as Xt, g as Yt, M as Ht, h as Qt, S as er, T as tr, i as rr, j as nr, k as sr, U as or, l as ar, u as ir, m as cr } from "./ContextualToolbars-BDEt9ND0.js";
1
+ import { D as te, T as M, h as D, B as re, I as q, i as I, j as ne, e as se } from "./UnifiedFontService-Bx2MxFfy.js";
2
+ import { k as at, L as it, M as ct, l as lt, S as dt, m as ut, s as mt, n as ft } from "./UnifiedFontService-Bx2MxFfy.js";
3
+ import { r as oe, v as ae } from "./validation-DnAkXdUg.js";
4
+ import { a as pt, b as xt, c as gt, d as bt, D as yt, e as vt, f as wt, G as St, K as Ct, g as Tt, L as Et, S as $t, T as kt, Z as At, h as Ft, i as Pt, j as Nt, k as Rt, l as Bt, m as Mt, n as Dt, u as It, o as zt, p as Ot } from "./validation-DnAkXdUg.js";
5
+ import { ImagePanel as Wt } from "./ImagePanel-sLSjaPWS.js";
6
+ import { P as ie, a as ce, b as le } from "./ContextualToolbars-DUhBKVxe.js";
7
+ import { A as Gt, B as _t, c as Ut, C as jt, d as Jt, e as qt, F as Zt, f as Vt, I as Xt, g as Yt, M as Ht, h as Qt, S as er, T as tr, i as rr, j as nr, k as sr, U as or, l as ar, u as ir, m as cr } from "./ContextualToolbars-DUhBKVxe.js";
8
8
  import { u as Z } from "./editorErrors-B2mb1sVN.js";
9
9
  import { E as dr, P as ur, p as mr, s as fr, b as hr, c as pr, d as xr, e as gr, f as br, a as yr } from "./editorErrors-B2mb1sVN.js";
10
10
  import { T as wr, u as Sr } from "./ThemeContext-Rjz25x9X.js";
@@ -34,8 +34,8 @@
34
34
  *
35
35
  * @packageDocumentation
36
36
  */
37
- export { Editor, DesignStateStore, useProductSelection } from '../components/editor/index.js';
38
- export type { EditorRootProps, EditorRootBaseProps, EditorCanvasProps, EditorPreviewProps, EditorTextFieldProps, EditorBuyProps, EditorBuyPayload, BuyMissingReason, DesignState, EditorLayersProps, EditorControlsProps, EditorHistoryProps, EditorMenuProps, EditorAddProps, ProductSelectionApi, ProductOptionChoice, ProductSelectionAttribute, } from '../components/editor/index.js';
37
+ export { Editor, DesignStateStore, useProductSelection, usePlacements, auditEditor } from '../components/editor/index.js';
38
+ export type { EditorAuditReport, EditorAuditFinding, EditorAuditFindingCode, EditorRootProps, EditorRootBaseProps, EditorCanvasProps, EditorPlacementsProps, PlacementInfo, UsePlacementsReturn, EditorPreviewProps, EditorLoadingOverlayProps, EditorTextFieldProps, EditorBuyProps, EditorBuyPayload, BuyMissingReason, DesignState, EditorLayersProps, EditorControlsProps, EditorHistoryProps, EditorMenuProps, EditorAddProps, ProductSelectionApi, ProductOptionChoice, ProductSelectionAttribute, } from '../components/editor/index.js';
39
39
  export { EditorError, isEditorError } from '../errors/editorError.js';
40
40
  export type { EditorErrorCode, EditorErrorData } from '../errors/editorError.js';
41
41
  export { RealtimeEmbed } from '../components/embed-realtime/RealtimeEmbed.js';
@@ -51,8 +51,8 @@ export { validateEmbed, collectEmbedIssues } from '../components/embed-realtime/
51
51
  export type { ValidateEmbedInput, EmbedIssue } from '../components/embed-realtime/validateEmbed.js';
52
52
  export { productToRenderConfig } from '../design/product-config.js';
53
53
  export type { ProductRenderConfig, ProductRenderConfigOptions } from '../design/product-config.js';
54
- export { design, DesignBuilder, isLayerToken } from '../design/design-builder.js';
55
- export type { Anchor, ShapeKind, DesignArtboard, StateArtboard, FromStateOptions, AnyDesign, LayerKind, LayerToken, } from '../design/design-builder.js';
54
+ export { design, DesignBuilder, isLayerToken, isColorToken } from '../design/design-builder.js';
55
+ export type { Anchor, ShapeKind, DesignArtboard, StateArtboard, FromStateOptions, AnyDesign, LayerKind, LayerToken, ColorToken, } from '../design/design-builder.js';
56
56
  export { useEditor } from '../contexts/EditorContext.js';
57
57
  export type { EditorContextValue, EditorProviderProps } from '../contexts/EditorContext.js';
58
58
  export { useLayers } from '../hooks/useLayers.js';
@@ -0,0 +1,12 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+ export interface EditorLoadingOverlayProps {
3
+ /** "dark" (default): screen-blended neon bands for image/dark surfaces.
4
+ * "light": multiply-blended candy bands for light cards. */
5
+ variant?: 'dark' | 'light';
6
+ className?: string;
7
+ style?: CSSProperties;
8
+ }
9
+ /**
10
+ * Stable since ADR-0085 P4 (additive); part name: `loading-overlay`.
11
+ */
12
+ export declare function EditorLoadingOverlay({ variant, className, style, }: EditorLoadingOverlayProps): React.ReactElement | null;
@@ -0,0 +1,14 @@
1
+ import { default as React, CSSProperties } from 'react';
2
+ export interface EditorPlacementsProps {
3
+ className?: string;
4
+ style?: CSSProperties;
5
+ }
6
+ /**
7
+ * Placement tabs for a multi-placement design.
8
+ *
9
+ * Styling contract: `data-sc-part="placements"` on the row,
10
+ * `data-sc-part="placements-item"` + `data-sc-active="true|false"` +
11
+ * `aria-pressed` per tab — restyle via those hooks and the `.sc-root` tokens;
12
+ * the built-in styling is deliberately minimal.
13
+ */
14
+ export declare function EditorPlacements({ className, style }: EditorPlacementsProps): React.ReactElement | null;
@@ -1,4 +1,4 @@
1
- import { default as React, CSSProperties, ReactNode } from 'react';
1
+ import { default as React, CSSProperties, ReactElement, ReactNode } from 'react';
2
2
  export interface EditorPreviewProps {
3
3
  /** Which mockup scene to show (a `product.mockupIds` entry). Defaults to the
4
4
  * first mockup that has rendered. */
@@ -8,6 +8,36 @@ export interface EditorPreviewProps {
8
8
  fallback?: ReactNode;
9
9
  /** Alt text for the rendered image. */
10
10
  alt?: string;
11
+ /**
12
+ * The render-in-flight loading treatment. A mockup preview ALWAYS has one:
13
+ * a server render takes real time, and the loader paints OVER the
14
+ * still-visible previous mockup — it never blanks or replaces it.
15
+ *
16
+ * **Defaults to `"dark"`** — the snowcone rainbow (the www PDP's prism
17
+ * loader): screen-blended neon bands shimmering over the previous mockup,
18
+ * with a 200ms show-delay (cached/instant renders never flash it) and a
19
+ * 400ms post-render linger. `"light"`: multiply-blended candy bands on an
20
+ * opaque light plate, for previews on light cards. Pass a custom
21
+ * `ReactElement` to render your own indicator instead — it mounts inside
22
+ * the frame (absolutely positioned over the image) with the same
23
+ * show-delay/linger choreography.
24
+ *
25
+ * In all of the above the part is a positioned stage:
26
+ * `data-sc-part="preview"` is a `.sc-preview-frame` div (which receives
27
+ * `className`/`style`), the `<img>` inside is
28
+ * `data-sc-part="preview-image"`, and the loading layer is
29
+ * `data-sc-part="preview-loading"`.
30
+ *
31
+ * `"host-owned"` reverts to the bare `<img>` DOM with no overlay — pass it
32
+ * ONLY when the host renders its own indicator, via the styling contract
33
+ * (`data-sc-preview-state="rendering"`) or the standalone
34
+ * `<Editor.LoadingOverlay>` part.
35
+ *
36
+ * Anything else (`false`, `"none"`, …) throws `E_PREVIEW_NO_LOADER`, dev
37
+ * AND prod: a mockup surface with no loading affordance is a composition
38
+ * mistake (silent emptiness, then pop-in), not a preference.
39
+ */
40
+ loadingOverlay?: true | 'dark' | 'light' | 'host-owned' | ReactElement;
11
41
  className?: string;
12
42
  style?: CSSProperties;
13
43
  }
@@ -31,10 +61,4 @@ export declare function suggestRenderWidth(devicePx: number): number;
31
61
  * {@link RESOLUTION_MISMATCH_RATIO}) or either measurement is unusable.
32
62
  */
33
63
  export declare function resolutionMismatchHint(naturalWidth: number, devicePx: number): string | null;
34
- /**
35
- * The live product mockup. Mount as many as you need under one Root.
36
- *
37
- * Stable since ADR-0085 P4 (the default editor is rebuilt from this public
38
- * surface, CI-gated); additive-only from here.
39
- */
40
- export declare function EditorPreview({ mockupId, fallback, alt, className, style, }: EditorPreviewProps): React.ReactElement;
64
+ export declare function EditorPreview({ mockupId, fallback, alt, loadingOverlay, className, style, }: EditorPreviewProps): React.ReactElement;
@@ -3,6 +3,7 @@ import { RenderProduct, MockupResult, RealtimeGrant } from '@snowcone-app/sdk';
3
3
  import { AnyDesign } from '../../design/design-builder.js';
4
4
  import { CanvasServices } from '../../contexts/CanvasServicesContext.js';
5
5
  import { EmbedIssue } from '../embed-realtime/validateEmbed.js';
6
+ import { EditorAuditReport } from './editorAudit.js';
6
7
  /**
7
8
  * How the session authorizes. Provide exactly one — the discriminated union makes
8
9
  * "I forgot the grant" a compile error rather than a silent runtime hang.
@@ -52,6 +53,17 @@ export type EditorRootBaseProps = {
52
53
  * boundary.)
53
54
  */
54
55
  onIssue?: (issue: EmbedIssue) => void;
56
+ /**
57
+ * The composition-audit channel (`Editor.audit()`, agentic-DX #10): fires
58
+ * ONCE after mount settles (every part's layout-effect registration is in,
59
+ * the design store holds its first snapshot), dev AND prod — like
60
+ * `onIssue`, a machine-readable callback, never console output. The report
61
+ * lists structured findings (stable `A_*` codes, each with the fix) plus a
62
+ * census of mounted parts. It fires even when a composition mistake throws
63
+ * into Root's boundary, carrying the registry state the throw saw. For a
64
+ * fresh report after interacting, call `auditEditor()`.
65
+ */
66
+ onAudit?: (report: EditorAuditReport) => void;
55
67
  /** Override the realtime WS endpoint (defaults to the SDK's prod URL). */
56
68
  wsUrl?: string;
57
69
  /**
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ export interface PreviewPrismOverlayProps {
3
+ /** When false, fade out then call onExited (use it to unmount). */
4
+ visible?: boolean;
5
+ onExited?: () => void;
6
+ /** "dark" (default): screen-blended neon bands for image/dark stages.
7
+ * "light": multiply-blended candy bands on an opaque light plate. */
8
+ variant?: 'dark' | 'light';
9
+ }
10
+ export declare const PreviewPrismOverlay: React.NamedExoticComponent<PreviewPrismOverlayProps>;
11
+ /**
12
+ * Show/hide choreography for a render-in-flight overlay: show-delayed mount
13
+ * (fast renders never flash it), post-render linger, fade-out unmount.
14
+ * Mirrors @snowcone-app/ui's `useLoadingOverlay` + the PDP hero's linger.
15
+ */
16
+ export declare function useRenderLoadingOverlay(isLoading: boolean): {
17
+ /** Mount the overlay? */
18
+ showOverlay: boolean;
19
+ /** The overlay's `visible` prop (false starts the fade-out). */
20
+ overlayVisible: boolean;
21
+ /** Pass as `onExited` — unmounts after the fade. */
22
+ handleExited: () => void;
23
+ };
@@ -14,11 +14,24 @@ export interface TextFieldRegistration {
14
14
  name: string;
15
15
  optional: boolean;
16
16
  }
17
+ /** Audit-relevant facts a part declares alongside its census registration
18
+ * (`Editor.audit()`, #10). Every key is optional — most parts have none. */
19
+ export interface EditorPartMeta {
20
+ /** `Editor.Preview`: the pinned mockup scene, when the prop was given. */
21
+ mockupId?: string;
22
+ /** `Editor.Canvas`: the `floatingToolbar` prop value (default `true`). */
23
+ floatingToolbar?: boolean;
24
+ }
25
+ export interface EditorPartRegistration {
26
+ name: string;
27
+ meta: EditorPartMeta;
28
+ }
17
29
  export declare class EditorPartsRegistry {
18
30
  private canvasIds;
19
31
  private requirements;
20
32
  private textFields;
21
33
  private controls;
34
+ private parts;
22
35
  private bridge;
23
36
  private listeners;
24
37
  private version;
@@ -51,6 +64,15 @@ export declare class EditorPartsRegistry {
51
64
  * suppressing (it declares today's default explicitly). */
52
65
  registerControls(instanceId: string, placement: 'docked' | 'floating'): () => void;
53
66
  hasDockedControls(): boolean;
67
+ /** Census registration (`Editor.audit()`, #10): every mounted part records
68
+ * its public name + audit-relevant meta. Purely observational — nothing
69
+ * validates through this map. */
70
+ registerPart(instanceId: string, name: string, meta?: EditorPartMeta): () => void;
71
+ /** Every mounted part's census entry (audit input). */
72
+ getParts(): EditorPartRegistration[];
73
+ /** Unique public names of mounted parts that declared a canvas requirement
74
+ * (audit input — same data `validate()` throws `E_REQUIRES_CANVAS` from). */
75
+ requiresCanvasPartNames(): string[];
54
76
  registerCanvasBridge(bridge: CanvasBridge): () => void;
55
77
  getCanvasBridge(): CanvasBridge | null;
56
78
  private bump;
@@ -89,6 +111,15 @@ export declare function useEditorRootInternals(partName: string): EditorRootInte
89
111
  * `E_REQUIRES_CANVAS`, validated race-free by Root once per commit).
90
112
  */
91
113
  export declare function useRequiresCanvas(partName: string): void;
114
+ /**
115
+ * Census registration for the composition audit (`Editor.audit()`, #10):
116
+ * every `Editor.*` part calls this with its public name (+ audit-relevant
117
+ * meta) so the audit report can list what is mounted. Deliberately TOLERANT
118
+ * of a missing Root (no `E_OUTSIDE_ROOT` here): the parts that require a Root
119
+ * already enforce it through their own hooks, and `Editor.Preview` stays
120
+ * mountable under the legacy wrappers without a new throw path.
121
+ */
122
+ export declare function useRegisterEditorPart(partName: string, meta?: EditorPartMeta): void;
92
123
  /** Shared impl of the invariant channel. @internal */
93
124
  export declare function makeInvariantReporter(routeToErrorState: (error: EditorError) => void): {
94
125
  reportInvariant: (error: EditorError) => void;
@@ -0,0 +1,66 @@
1
+ import { RenderProduct } from '@snowcone-app/sdk';
2
+ import { DesignStateStore } from './designStateStore.js';
3
+ import { EditorPartsRegistry } from './RootInternals.js';
4
+ /** Stable audit finding codes — the test/agent contract. */
5
+ export type EditorAuditFindingCode =
6
+ /** Requires-canvas parts (Controls/History/Menu/Add) are mounted with no
7
+ * `Editor.Canvas` — the same composition `E_REQUIRES_CANVAS` throws on. */
8
+ 'A_REQUIRES_CANVAS'
9
+ /** A docked `Editor.Controls` is mounted while `Editor.Canvas` still has
10
+ * `floatingToolbar` true (the default) — contextual-zone ownership is
11
+ * implied by mount order (spooky), not declared in the type surface. */
12
+ | 'A_CONTROLS_INERT'
13
+ /** `Editor.Preview` without `mockupId` while the product renders more than
14
+ * one mockup scene — which scene the preview shows is ambiguous. */
15
+ | 'A_PREVIEW_AMBIGUOUS'
16
+ /** `Editor.TextField` parts are mounted but no `Editor.Buy` — there is no
17
+ * commerce gate enforcing completeness before checkout. */
18
+ | 'A_NO_BUY'
19
+ /** A mounted `Editor.TextField`'s layer matches zero elements in the
20
+ * CURRENT design snapshot — the binding is dead; writes will fail. */
21
+ | 'A_LAYER_UNMATCHED'
22
+ /** Every required (non-`optional`) `Editor.TextField` still equals its
23
+ * seed value — Buy's completeness rule C3 gates checkout until edited. */
24
+ | 'A_TEXT_AT_SEED'
25
+ /** Zero renderable elements in the design — every mockup renders blank. */
26
+ | 'A_EMPTY_DESIGN';
27
+ export interface EditorAuditFinding {
28
+ code: EditorAuditFindingCode;
29
+ severity: 'error' | 'warn' | 'info';
30
+ /** What is wrong, with the facts (part names, layer names, scene ids). */
31
+ message: string;
32
+ /** The exact prop/part change that resolves the finding. */
33
+ fix: string;
34
+ }
35
+ export interface EditorAuditReport {
36
+ findings: EditorAuditFinding[];
37
+ /** Census of mounted parts, e.g. `{ name: 'Editor.Preview', count: 2 }`.
38
+ * Sorted by name for determinism. */
39
+ parts: Array<{
40
+ name: string;
41
+ count: number;
42
+ }>;
43
+ }
44
+ /** @internal */
45
+ export interface EditorAuditInput {
46
+ registry: EditorPartsRegistry;
47
+ store: DesignStateStore;
48
+ product: RenderProduct;
49
+ }
50
+ /** Compute the audit report from a Root's live registry + design state.
51
+ * Pure — no logging, no throwing. @internal */
52
+ export declare function computeEditorAudit({ registry, store, product }: EditorAuditInput): EditorAuditReport;
53
+ interface RootAuditEntry {
54
+ compute: () => EditorAuditReport;
55
+ }
56
+ /** Register a mounted Root as an audit target (most-recent wins). @internal */
57
+ export declare function registerRootForAudit(entry: RootAuditEntry): () => void;
58
+ /**
59
+ * Audit the most-recent mounted `<Editor.Root>`'s composition NOW — a fresh
60
+ * report from the live part registry + design state, so it reflects whatever
61
+ * has happened since mount (fields edited, parts mounted/unmounted).
62
+ *
63
+ * Throws `E_AUDIT_NO_ROOT` when no Root is mounted.
64
+ */
65
+ export declare function auditEditor(): EditorAuditReport;
66
+ export {};
@@ -1,4 +1,5 @@
1
1
  import { EditorRoot } from './EditorRoot.js';
2
+ import { EditorPlacements } from './EditorPlacements.js';
2
3
  import { EditorPreview } from './EditorPreview.js';
3
4
  import { EditorTextField } from './EditorTextField.js';
4
5
  import { EditorBuy } from './EditorBuy.js';
@@ -7,6 +8,7 @@ import { EditorControls } from './EditorControls.js';
7
8
  import { EditorHistory } from './EditorHistory.js';
8
9
  import { EditorMenu } from './EditorMenu.js';
9
10
  import { EditorAdd } from './EditorAdd.js';
11
+ import { EditorLoadingOverlay } from './EditorLoadingOverlay.js';
10
12
  export declare const Editor: {
11
13
  /** The one provider boundary — session, design, live state, error boundary. */
12
14
  readonly Root: typeof EditorRoot;
@@ -14,6 +16,9 @@ export declare const Editor: {
14
16
  readonly Canvas: import('react').ForwardRefExoticComponent<import('./EditorCanvas.js').EditorCanvasProps & import('react').RefAttributes<import('./EditorCanvasImpl.js').SnowconeCanvasHandle>>;
15
17
  /** Live product mockup. ×N under one Root is valid. */
16
18
  readonly Preview: typeof EditorPreview;
19
+ /** Placement switcher tabs (ADR-0088). Renders nothing for a
20
+ * single-placement design; headless floor = usePlacements(). */
21
+ readonly Placements: typeof EditorPlacements;
17
22
  /** Form input bound to a design text layer by typed token (T1). */
18
23
  readonly TextField: typeof EditorTextField;
19
24
  /** Smart commerce part: completeness + payload assembly; submit = host callback. */
@@ -28,10 +33,17 @@ export declare const Editor: {
28
33
  readonly Menu: typeof EditorMenu;
29
34
  /** The ⊕ add-element menu. Requires Editor.Canvas. */
30
35
  readonly Add: typeof EditorAdd;
36
+ /** Standalone render-in-flight rainbow for host-owned preview surfaces.
37
+ * Fills its positioned parent; rides the session (canvas-free). */
38
+ readonly LoadingOverlay: typeof EditorLoadingOverlay;
31
39
  };
32
40
  export type { EditorRootProps, EditorRootBaseProps, GrantSource } from './EditorRoot.js';
33
41
  export type { EditorCanvasProps } from './EditorCanvas.js';
42
+ export type { EditorPlacementsProps } from './EditorPlacements.js';
43
+ export { usePlacements } from './usePlacements.js';
44
+ export type { PlacementInfo, UsePlacementsReturn } from './usePlacements.js';
34
45
  export type { EditorPreviewProps } from './EditorPreview.js';
46
+ export type { EditorLoadingOverlayProps } from './EditorLoadingOverlay.js';
35
47
  export type { EditorTextFieldProps } from './EditorTextField.js';
36
48
  export type { EditorBuyProps, EditorBuyPayload, BuyMissingReason } from './EditorBuy.js';
37
49
  export type { DesignState } from './designStateStore.js';
@@ -40,6 +52,8 @@ export { useProductSelection } from './useProductSelection.js';
40
52
  export type { ProductSelectionApi } from './useProductSelection.js';
41
53
  export { CommerceStateStore } from './commerceStore.js';
42
54
  export type { ProductOptionChoice, ProductSelectionAttribute } from './commerceStore.js';
55
+ export { auditEditor } from './editorAudit.js';
56
+ export type { EditorAuditReport, EditorAuditFinding, EditorAuditFindingCode } from './editorAudit.js';
43
57
  export type { EditorLayersProps } from './EditorLayers.js';
44
58
  export type { EditorControlsProps } from './EditorControls.js';
45
59
  export type { EditorHistoryProps } from './EditorHistory.js';
@@ -0,0 +1,14 @@
1
+ export interface PlacementInfo {
2
+ /** The placement label (= the design artboard name, e.g. 'Front'). */
3
+ label: string;
4
+ active: boolean;
5
+ }
6
+ export interface UsePlacementsReturn {
7
+ /** Every placement in the design, in author order. */
8
+ placements: PlacementInfo[];
9
+ activePlacement: string;
10
+ /** Switch the active placement. Throws `EditorError E_UNKNOWN_PLACEMENT`
11
+ * for a label that names no design artboard. */
12
+ select: (label: string) => void;
13
+ }
14
+ export declare function usePlacements(): UsePlacementsReturn;
@@ -10,9 +10,18 @@ export interface EmbedContextValue {
10
10
  /** The design the embed was seeded with — single source of truth for both the
11
11
  * canvas seed and the seed render. */
12
12
  design: AnyDesign;
13
- /** The placement name (= the design's artboard name). Both the canvas artboard
14
- * and every `renderState` call use this; derived once so it can't drift. */
13
+ /** The ACTIVE placement name (= the design's currently-edited artboard).
14
+ * The canvas follows it as its controlled artboard. Initially the design's
15
+ * active artboard; moved by {@link selectPlacement} (ADR-0088). For a
16
+ * single-placement design this never changes — the pre-0088 behavior. */
15
17
  placement: string;
18
+ /** Every placement (artboard name) in the design, in author order. A
19
+ * single-placement design has exactly one entry (ADR-0088). */
20
+ placements: string[];
21
+ /** Switch the active placement. Throws `EditorError E_UNKNOWN_PLACEMENT`
22
+ * for a label that names no design artboard (ADR-0088). Costs zero session
23
+ * work — renders already target every artboard per placement. */
24
+ selectPlacement: (label: string) => void;
16
25
  /** The product being rendered against. */
17
26
  product: RenderProduct;
18
27
  /** Latest mockups from the session. Reactive — updates re-render consumers. */
@@ -14,7 +14,26 @@ export interface ValidateEmbedInput {
14
14
  export interface EmbedIssue {
15
15
  severity: 'error' | 'warn';
16
16
  /** Stable issue key, carried into `EditorError.data.issue` in throw mode. */
17
- issue: 'missing-shop' | 'missing-grant' | 'empty-mockup-ids' | 'variant-required' | 'multi-placement' | 'placement-mismatch' | 'duplicate-layer-names'
17
+ issue:
18
+ /** No `shop` (the publishable shop id) was passed. */
19
+ 'missing-shop'
20
+ /** No grant source (`grantUrl`/`grant`) — the session can never
21
+ * authorize, so no mockup ever renders. */
22
+ | 'missing-grant'
23
+ /** `product.mockupIds` is empty — nothing to render. */
24
+ | 'empty-mockup-ids'
25
+ /** The product has a variant axis but no `variantId` — the render
26
+ * would hang ~30s waiting on a color blob that never comes. */
27
+ | 'variant-required'
28
+ /** The product requires several placements but this embed renders ONE —
29
+ * the server times out waiting on the rest (needs the eject path). */
30
+ | 'multi-placement'
31
+ /** The design's placement isn't one of the product's placements —
32
+ * the server renders a blank mockup. */
33
+ | 'placement-mismatch'
34
+ /** Two layers share a name — name-bound hooks bind the FIRST match,
35
+ * so a control may edit the wrong layer. */
36
+ | 'duplicate-layer-names'
18
37
  /** Runtime (not mount-time): a render has been in flight past
19
38
  * `SLOW_RENDER_HINT_MS` with no mockup and no error — the silent-hang
20
39
  * class. The render may still arrive; this is a heads-up. */
@@ -1,6 +1,6 @@
1
1
  import { jsx as i, jsxs as h } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { n as T, y, N as w } from "./UnifiedFontService-CC3CSmH5.js";
3
+ import { n as T, z as y, O as w } from "./UnifiedFontService-Bx2MxFfy.js";
4
4
  import * as R from "@radix-ui/react-label";
5
5
  import { cva as S } from "class-variance-authority";
6
6
  import * as g from "@radix-ui/react-tabs";
@@ -55,8 +55,8 @@ const E = c.forwardRef(
55
55
  E.displayName = "Input";
56
56
  const C = S(
57
57
  "sc:block sc:text-sm sc:leading-none sc:text-foreground sc:peer-disabled:cursor-not-allowed sc:peer-disabled:opacity-70 sc:font-label"
58
- ), j = c.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ i(R.Root, { ref: a, className: y(C(), s), ...e }));
59
- j.displayName = R.Root.displayName;
58
+ ), O = c.forwardRef(({ className: s, ...e }, a) => /* @__PURE__ */ i(R.Root, { ref: a, className: y(C(), s), ...e }));
59
+ O.displayName = R.Root.displayName;
60
60
  const L = c.forwardRef(
61
61
  ({ value: s, onValueChange: e, ...a }, t) => /* @__PURE__ */ i(g.Root, { ref: t, value: s, onValueChange: e, ...a })
62
62
  );
@@ -170,10 +170,10 @@ const I = c.forwardRef(
170
170
  ({ className: s, ...e }, a) => /* @__PURE__ */ i("div", { ref: a, className: s, ...e })
171
171
  );
172
172
  I.displayName = "TabsListContainer";
173
- const O = x, B = N, P = () => null, q = L, z = Object.assign(q, {
173
+ const j = x, B = N, P = () => null, q = L, z = Object.assign(q, {
174
174
  List: k,
175
175
  ListContainer: I,
176
- Tab: O,
176
+ Tab: j,
177
177
  Trigger: x,
178
178
  Panel: B,
179
179
  Content: N,
@@ -227,10 +227,10 @@ const D = ({ className: s, size: e = 24 }) => /* @__PURE__ */ h(
227
227
  );
228
228
  export {
229
229
  E as I,
230
- j as L,
230
+ O as L,
231
231
  D as R,
232
232
  W as S,
233
233
  z as T,
234
234
  A as a
235
235
  };
236
- //# sourceMappingURL=custom-icons-BW6hqmkL.js.map
236
+ //# sourceMappingURL=custom-icons-DeYIrTK1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-icons-BW6hqmkL.js","sources":["../src/vendor/ui/primitives/input.tsx","../src/vendor/ui/primitives/label.tsx","../src/vendor/ui/primitives/tabs.tsx","../src/vendor/ui/primitives/text-field.tsx","../src/components/ui/custom-icons.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/utils';\nimport { useSurface } from './surface';\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /** Whether the input is in an invalid state */\n isInvalid?: boolean;\n /** Content to display at the start of the input */\n startContent?: React.ReactNode;\n /** Content to display at the end of the input */\n endContent?: React.ReactNode;\n /**\n * Visual variant - auto-detected from Surface context, or can be set explicitly\n * - `default`: Standard field styling for forms (bg-field)\n * - `filled`: Field on elevated surface (bg-field-on-surface)\n * - `subtle`: Blends with buttons/tabs in toolbars (bg-default)\n */\n variant?: 'default' | 'filled' | 'subtle';\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n type,\n isInvalid,\n startContent,\n endContent,\n disabled,\n readOnly,\n required,\n variant,\n ...props\n },\n ref\n ) => {\n // Auto-detect variant from Surface context\n const surface = useSurface();\n const isOnSurface = surface.variant === 'default' || surface.variant === 'secondary';\n const effectiveVariant = variant ?? (isOnSurface ? 'filled' : 'default');\n\n const inputElement = (\n <input\n type={type}\n className={cn(\n 'sc:flex sc:h-10 sc:w-full sc:rounded-input sc:px-2.5 sc:py-1.5 sc:text-sm sc:appearance-none',\n 'sc:text-foreground sc:border-none',\n 'sc:file:border-0 sc:file:bg-transparent sc:file:text-sm sc:file:font-medium sc:file:text-foreground',\n 'sc:placeholder:text-foreground/50',\n 'sc:transition-shadow sc:duration-200 sc:ease-out sc:focus-visible:outline-none sc:focus:ring-2 sc:focus:ring-focus sc:focus:ring-offset-1 sc:focus:ring-offset-background',\n 'sc:disabled:cursor-not-allowed sc:disabled:opacity-50',\n // Variant styles - semantic: field on page vs field on surface vs toolbar\n effectiveVariant === 'default' && 'sc:bg-field sc:shadow-soft sc:dark:shadow-none',\n effectiveVariant === 'filled' && 'sc:bg-[var(--color-field-on-surface)]',\n effectiveVariant === 'subtle' && 'sc:bg-default sc:dark:bg-[var(--color-default-on-surface)]',\n isInvalid && 'sc:ring-2 sc:ring-danger sc:focus-visible:ring-danger',\n startContent && 'sc:pl-10',\n endContent && 'sc:pr-10',\n className\n )}\n ref={ref}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n aria-invalid={isInvalid}\n {...props}\n />\n );\n\n if (startContent || endContent) {\n return (\n <div className=\"sc:relative\">\n {startContent && (\n <div className=\"sc:absolute sc:left-3 sc:top-1/2 sc:-translate-y-1/2 sc:text-foreground sc:opacity-40\">{startContent}</div>\n )}\n {inputElement}\n {endContent && (\n <div className=\"sc:absolute sc:right-3 sc:top-1/2 sc:-translate-y-1/2 sc:text-foreground sc:opacity-40\">{endContent}</div>\n )}\n </div>\n );\n }\n\n return inputElement;\n }\n);\nInput.displayName = 'Input';\n\nexport { Input };\n","'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst labelVariants = cva(\n 'sc:block sc:text-sm sc:leading-none sc:text-foreground sc:peer-disabled:cursor-not-allowed sc:peer-disabled:opacity-70 sc:font-label'\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","\"use client\";\n\n'use client';\n\nimport * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { cn } from '../lib/utils';\nimport { useSurface } from './surface';\n\ninterface TabsProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'value' | 'onValueChange'> {\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst TabsRoot = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Root>, TabsProps>(\n ({ value, onValueChange, ...props }, ref) => (\n <TabsPrimitive.Root ref={ref} value={value} onValueChange={onValueChange} {...props} />\n )\n);\nTabsRoot.displayName = 'Tabs';\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, children, ...props }, ref) => {\n const listRef = React.useRef<HTMLDivElement>(null);\n const [indicatorStyle, setIndicatorStyle] = React.useState<React.CSSProperties>({\n opacity: 0,\n });\n\n // Update indicator position when active tab changes\n React.useEffect(() => {\n const listElement = listRef.current;\n if (!listElement) return;\n\n const updateIndicator = () => {\n const activeTab = listElement.querySelector('[data-state=\"active\"]') as HTMLElement;\n if (activeTab) {\n const listRect = listElement.getBoundingClientRect();\n const tabRect = activeTab.getBoundingClientRect();\n\n setIndicatorStyle({\n width: tabRect.width,\n height: tabRect.height,\n left: tabRect.left - listRect.left,\n opacity: 1,\n });\n }\n };\n\n // Initial position\n updateIndicator();\n\n // Use MutationObserver to detect when active tab changes\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-state') {\n updateIndicator();\n break;\n }\n }\n });\n\n // Observe all trigger elements for data-state changes\n const triggers = listElement.querySelectorAll('[role=\"tab\"]');\n triggers.forEach((trigger) => {\n observer.observe(trigger, { attributes: true, attributeFilter: ['data-state'] });\n });\n\n // Also update on resize\n const resizeObserver = new ResizeObserver(updateIndicator);\n resizeObserver.observe(listElement);\n\n return () => {\n observer.disconnect();\n resizeObserver.disconnect();\n };\n }, [children]);\n\n return (\n <TabsPrimitive.List\n ref={(node) => {\n // Handle both refs\n (listRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n }}\n className={cn(\n 'sc:relative sc:inline-flex sc:h-10 sc:items-center sc:justify-center sc:rounded-full sc:px-1 sc:text-muted-foreground',\n // Consistent bg-default matches Button secondary variant for toolbar harmony\n 'sc:bg-default sc:dark:bg-[var(--color-default-on-surface)]',\n className\n )}\n {...props}\n >\n {/* Animated sliding indicator. In dark mode the previous `bg-muted`\n value resolved to the same color as `bg-default` on the container,\n so the active tab was invisible without relying purely on\n shadow-md. `bg-popover` lands ~0.08 lightness above `bg-default`\n in dark mode for a clearly visible elevation. */}\n <span\n className=\"sc:absolute sc:top-1/2 sc:-translate-y-1/2 sc:rounded-full sc:bg-surface sc:dark:bg-popover sc:shadow-md sc:transition-[left,width,opacity]\"\n style={{\n ...indicatorStyle,\n transitionDuration: '350ms',\n transitionTimingFunction: 'cubic-bezier(0.22, 1, 0.36, 1)',\n }}\n aria-hidden=\"true\"\n />\n {children}\n </TabsPrimitive.List>\n );\n});\nTabsList.displayName = TabsPrimitive.List.displayName;\n\ninterface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>, 'value'> {\n // HeroUI uses 'id' for tab identification, Radix uses 'value'\n // At least one must be provided\n id?: string;\n value?: string;\n}\n\nconst TabsTrigger = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigger>, TabsTriggerProps>(\n ({ className, id, value, ...props }, ref) => {\n const { variant: surfaceVariant } = useSurface();\n const isOnSurface = surfaceVariant === 'default' || surfaceVariant === 'secondary';\n\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n value={id ?? value ?? ''}\n className={cn(\n 'sc:relative sc:z-10 sc:inline-flex sc:h-8 sc:items-center sc:justify-center sc:gap-2 sc:whitespace-nowrap sc:rounded-full sc:px-4 sc:text-sm sc:font-label',\n 'sc:transition-[color,opacity]',\n 'sc:focus-visible:outline-none sc:focus-visible:ring-2 sc:focus-visible:ring-focus sc:focus-visible:ring-offset-2',\n 'sc:disabled:pointer-events-none sc:disabled:opacity-50',\n 'sc:data-[state=active]:text-foreground sc:data-[state=active]:opacity-100',\n // Inactive tabs use element opacity (not color opacity) to avoid SVG path overlap issues\n isOnSurface\n ? 'sc:data-[state=inactive]:text-foreground sc:data-[state=inactive]:opacity-30 sc:data-[state=inactive]:hover:opacity-50'\n : 'sc:data-[state=inactive]:text-foreground sc:data-[state=inactive]:opacity-50 sc:data-[state=inactive]:hover:opacity-70',\n className\n )}\n {...props}\n />\n );\n }\n);\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\ninterface TabsContentProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, 'value'> {\n // HeroUI uses 'id' for panel identification, Radix uses 'value'\n // At least one must be provided\n id?: string;\n value?: string;\n}\n\nconst TabsContent = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Content>, TabsContentProps>(\n ({ className, id, value, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n value={id ?? value ?? ''}\n className={cn(\n 'sc:mt-2 sc:ring-offset-background sc:focus-visible:outline-none sc:focus-visible:ring-2 sc:focus-visible:ring-focus sc:focus-visible:ring-offset-2',\n className\n )}\n {...props}\n />\n )\n);\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\n// HeroUI ListContainer - wrapper for the tabs list (passthrough div)\nconst TabsListContainer = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={className} {...props} />\n);\nTabsListContainer.displayName = 'TabsListContainer';\n\n// HeroUI Tab - alias for TabsTrigger\nconst TabsTab = TabsTrigger;\n\n// HeroUI Panel - alias for TabsContent\nconst TabsPanel = TabsContent;\n\n// HeroUI Indicator - now rendered automatically by TabsList, this is a no-op\nconst TabsIndicator = () => null;\n\n// Create compound component with all aliases\nconst TabsBase = TabsRoot;\n\n// HeroUI-compatible compound component\nconst Tabs = Object.assign(TabsBase, {\n List: TabsList,\n ListContainer: TabsListContainer,\n Tab: TabsTab,\n Trigger: TabsTrigger,\n Panel: TabsPanel,\n Content: TabsContent,\n Indicator: TabsIndicator,\n});\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, TabsRoot };\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface TextFieldProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Accessible label for the input.\n * If not provided via children, use aria-label on the div.\n */\n 'aria-label'?: string;\n /**\n * Error state - applies error styling to children inputs\n */\n isInvalid?: boolean;\n /**\n * Disabled state - disables all children inputs\n */\n disabled?: boolean;\n /**\n * Required state - marks all children inputs as required\n */\n required?: boolean;\n}\n\n/**\n * TextField - A wrapper component that groups Label and Input together.\n *\n * Groups Label and Input with a convenient wrapper that can propagate\n * disabled, required, and invalid states to child inputs.\n *\n * @example\n * ```tsx\n * <TextField>\n * <Label>Email</Label>\n * <Input type=\"email\" placeholder=\"Enter email...\" />\n * </TextField>\n * ```\n */\nconst TextField = React.forwardRef<HTMLDivElement, TextFieldProps>(\n ({ className, children, isInvalid, disabled, required, ...props }, ref) => {\n // Clone children to pass through state props to Input/Textarea children\n const enhancedChildren = React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) return child;\n\n // Get the display name or type name to check if it's an input component\n const childType = child.type;\n const displayName =\n typeof childType === 'function'\n ? (childType as React.ComponentType).displayName || childType.name\n : typeof childType === 'string'\n ? childType\n : '';\n\n // Check if this is an input-like element that should receive state props\n const isInputElement =\n displayName === 'Input' ||\n displayName === 'Textarea' ||\n displayName === 'TextArea' ||\n displayName === 'input' ||\n displayName === 'textarea';\n\n if (isInputElement) {\n const childProps = child.props as Record<string, unknown>;\n return React.cloneElement(child as React.ReactElement<Record<string, unknown>>, {\n isInvalid: (childProps.isInvalid as boolean) ?? isInvalid,\n disabled: (childProps.disabled as boolean) ?? disabled,\n required: (childProps.required as boolean) ?? required,\n });\n }\n\n return child;\n });\n\n return (\n <div ref={ref} className={cn('sc:flex sc:flex-col sc:gap-1.5', className)} {...props}>\n {enhancedChildren}\n </div>\n );\n }\n);\nTextField.displayName = 'TextField';\n\nexport { TextField };\n","/**\n * Custom Icons - Centered versions of icons from various sets\n *\n * These are copies of icons with adjusted viewBox to center properly.\n * Use these instead of the original iconify versions for consistent alignment.\n */\n\nimport React from 'react';\nimport { cn } from '../../lib/utils';\n\ninterface IconProps {\n className?: string;\n size?: number | string;\n}\n\n/**\n * Rotate Left icon (lucide-style stroked version)\n */\nexport const RotateLeftIcon: React.FC<IconProps> = ({ className, size = 24 }) => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width={size}\n height={size}\n className={cn('sc:inline-block iconify', className)}\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n);\n\n/**\n * Rotate Right icon (lucide-style stroked version)\n */\nexport const RotateRightIcon: React.FC<IconProps> = ({ className, size = 24 }) => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width={size}\n height={size}\n className={cn('sc:inline-block iconify', className)}\n >\n <path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n </svg>\n);\n\n/**\n * Sparkles icon (based on gravity-ui:sparkles)\n * Two sparkle shapes - main 4-point star and smaller accent\n */\nexport const SparklesIcon: React.FC<IconProps> = ({ className, size = 24 }) => (\n <svg\n viewBox=\"0 0 28 28\"\n fill=\"currentColor\"\n width={size}\n height={size}\n className={cn('sc:inline-block', className)}\n >\n <path d=\"M10.06 18.701a1.628 1.628 0 0 0 2.43-.676l.77-2.34a3.82 3.82 0 0 1 2.416-2.418l2.238-.727a1.6 1.6 0 0 0 .786-.595a1.62 1.62 0 0 0-.849-2.489l-2.215-.72a3.82 3.82 0 0 1-2.42-2.414l-.727-2.237a1.62 1.62 0 0 0-.594-.785a1.655 1.655 0 0 0-1.879 0a1.63 1.63 0 0 0-.6.8L8.68 6.365a3.82 3.82 0 0 1-2.359 2.37l-2.24.726a1.626 1.626 0 0 0 .02 3.073l2.216.72a3.86 3.86 0 0 1 1.816 1.286c.266.343.471.728.606 1.14l.728 2.234c.112.318.32.593.595.787m-3.273-6.873l-2.22-.72s-.085-.038-.085-.108a.14.14 0 0 1 .084-.115L6.8 10.16a5.34 5.34 0 0 0 3.32-3.375l.721-2.219s.043-.084.114-.084s.113.084.113.084l.723 2.223a5.32 5.32 0 0 0 3.377 3.372l2.27.735a.13.13 0 0 1 .078.11a.15.15 0 0 1-.083.113l-2.225.722a5.32 5.32 0 0 0-3.374 3.374l-.715 2.2a.11.11 0 0 1-.115.093c-.104 0-.118-.075-.118-.075l-.723-2.22a5.32 5.32 0 0 0-3.376-3.385m13.017 12.954A1.2 1.2 0 0 0 20.5 25a1.2 1.2 0 0 0 .692-.216a1.2 1.2 0 0 0 .446-.6l.372-1.143a1.61 1.61 0 0 1 1.017-1.02l1.166-.378A1.21 1.21 0 0 0 25 20.505a1.2 1.2 0 0 0-.844-1.146l-1.144-.37a1.61 1.61 0 0 1-1.02-1.018l-.38-1.163a1.2 1.2 0 0 0-2.274.016l-.374 1.146a1.61 1.61 0 0 1-.993 1.017l-1.166.378a1.21 1.21 0 0 0-.807 1.139a1.2 1.2 0 0 0 .823 1.138l1.144.372a1.6 1.6 0 0 1 1.02 1.023l.379 1.163a1.2 1.2 0 0 0 .44.582m-1.371-4.194l-.27-.088l.283-.096a3.12 3.12 0 0 0 1.943-1.974l.088-.27l.089.272a3.11 3.11 0 0 0 1.974 1.975l.293.1l-.271.087a3.12 3.12 0 0 0-1.974 1.977l-.088.27l-.088-.272a3.12 3.12 0 0 0-1.98-1.98\" />\n </svg>\n);\n\n// Map of icon names to components for easy lookup\nexport const CustomIcons = {\n 'rotate-left': RotateLeftIcon,\n 'rotate-right': RotateRightIcon,\n 'sparkles': SparklesIcon,\n} as const;\n\nexport type CustomIconName = keyof typeof CustomIcons;\n"],"names":["Input","React","className","type","isInvalid","startContent","endContent","disabled","readOnly","required","variant","props","ref","surface","useSurface","isOnSurface","effectiveVariant","inputElement","jsx","cn","jsxs","labelVariants","cva","Label","LabelPrimitive","TabsRoot","value","onValueChange","TabsPrimitive","TabsList","children","listRef","indicatorStyle","setIndicatorStyle","listElement","updateIndicator","activeTab","listRect","tabRect","observer","mutations","mutation","trigger","resizeObserver","node","TabsTrigger","id","surfaceVariant","TabsContent","TabsListContainer","TabsTab","TabsPanel","TabsIndicator","TabsBase","Tabs","TextField","enhancedChildren","child","childType","displayName","childProps","RotateLeftIcon","size","SparklesIcon"],"mappings":";;;;;;AAsBA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AAEH,UAAMC,IAAUC,EAAA,GACVC,IAAcF,EAAQ,YAAY,aAAaA,EAAQ,YAAY,aACnEG,IAAmBN,MAAYK,IAAc,WAAW,YAExDE,IACJ,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAAf;AAAA,QACA,WAAWgB;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA,UAEAH,MAAqB,aAAa;AAAA,UAClCA,MAAqB,YAAY;AAAA,UACjCA,MAAqB,YAAY;AAAA,UACjCZ,K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AAsC,CAAC,EAAE,WAAA3D,GAAW,MAAA4D,IAAO,SACtE,gBAAA1C;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,QAAO;AAAA,IACP,aAAY;AAAA,IACZ,eAAc;AAAA,IACd,gBAAe;AAAA,IACf,OAAO0C;AAAA,IACP,QAAQA;AAAA,IACR,WAAW3C,EAAG,2BAA2BjB,CAAS;AAAA,IAElD,UAAA;AAAA,MAAA,gBAAAgB,EAAC,QAAA,EAAK,GAAE,oDAAA,CAAoD;AAAA,MAC5D,gBAAAA,EAAC,QAAA,EAAK,GAAE,WAAA,CAAW;AAAA,IAAA;AAAA,EAAA;AACrB,GA2BW6C,IAAoC,CAAC,EAAE,WAAA7D,GAAW,MAAA4D,IAAO,SACpE,gBAAA5C;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAO4C;AAAA,IACP,QAAQA;AAAA,IACR,WAAW3C,EAAG,mBAAmBjB,CAAS;AAAA,IAE1C,UAAA,gBAAAgB,EAAC,QAAA,EAAK,GAAE,m6CAAA,CAAm6C;AAAA,EAAA;AAC76C;"}
1
+ {"version":3,"file":"custom-icons-DeYIrTK1.js","sources":["../src/vendor/ui/primitives/input.tsx","../src/vendor/ui/primitives/label.tsx","../src/vendor/ui/primitives/tabs.tsx","../src/vendor/ui/primitives/text-field.tsx","../src/components/ui/custom-icons.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/utils';\nimport { useSurface } from './surface';\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {\n /** Whether the input is in an invalid state */\n isInvalid?: boolean;\n /** Content to display at the start of the input */\n startContent?: React.ReactNode;\n /** Content to display at the end of the input */\n endContent?: React.ReactNode;\n /**\n * Visual variant - auto-detected from Surface context, or can be set explicitly\n * - `default`: Standard field styling for forms (bg-field)\n * - `filled`: Field on elevated surface (bg-field-on-surface)\n * - `subtle`: Blends with buttons/tabs in toolbars (bg-default)\n */\n variant?: 'default' | 'filled' | 'subtle';\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n className,\n type,\n isInvalid,\n startContent,\n endContent,\n disabled,\n readOnly,\n required,\n variant,\n ...props\n },\n ref\n ) => {\n // Auto-detect variant from Surface context\n const surface = useSurface();\n const isOnSurface = surface.variant === 'default' || surface.variant === 'secondary';\n const effectiveVariant = variant ?? (isOnSurface ? 'filled' : 'default');\n\n const inputElement = (\n <input\n type={type}\n className={cn(\n 'sc:flex sc:h-10 sc:w-full sc:rounded-input sc:px-2.5 sc:py-1.5 sc:text-sm sc:appearance-none',\n 'sc:text-foreground sc:border-none',\n 'sc:file:border-0 sc:file:bg-transparent sc:file:text-sm sc:file:font-medium sc:file:text-foreground',\n 'sc:placeholder:text-foreground/50',\n 'sc:transition-shadow sc:duration-200 sc:ease-out sc:focus-visible:outline-none sc:focus:ring-2 sc:focus:ring-focus sc:focus:ring-offset-1 sc:focus:ring-offset-background',\n 'sc:disabled:cursor-not-allowed sc:disabled:opacity-50',\n // Variant styles - semantic: field on page vs field on surface vs toolbar\n effectiveVariant === 'default' && 'sc:bg-field sc:shadow-soft sc:dark:shadow-none',\n effectiveVariant === 'filled' && 'sc:bg-[var(--color-field-on-surface)]',\n effectiveVariant === 'subtle' && 'sc:bg-default sc:dark:bg-[var(--color-default-on-surface)]',\n isInvalid && 'sc:ring-2 sc:ring-danger sc:focus-visible:ring-danger',\n startContent && 'sc:pl-10',\n endContent && 'sc:pr-10',\n className\n )}\n ref={ref}\n disabled={disabled}\n readOnly={readOnly}\n required={required}\n aria-invalid={isInvalid}\n {...props}\n />\n );\n\n if (startContent || endContent) {\n return (\n <div className=\"sc:relative\">\n {startContent && (\n <div className=\"sc:absolute sc:left-3 sc:top-1/2 sc:-translate-y-1/2 sc:text-foreground sc:opacity-40\">{startContent}</div>\n )}\n {inputElement}\n {endContent && (\n <div className=\"sc:absolute sc:right-3 sc:top-1/2 sc:-translate-y-1/2 sc:text-foreground sc:opacity-40\">{endContent}</div>\n )}\n </div>\n );\n }\n\n return inputElement;\n }\n);\nInput.displayName = 'Input';\n\nexport { Input };\n","'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst labelVariants = cva(\n 'sc:block sc:text-sm sc:leading-none sc:text-foreground sc:peer-disabled:cursor-not-allowed sc:peer-disabled:opacity-70 sc:font-label'\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","\"use client\";\n\n'use client';\n\nimport * as React from 'react';\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\nimport { cn } from '../lib/utils';\nimport { useSurface } from './surface';\n\ninterface TabsProps\n extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>, 'value' | 'onValueChange'> {\n value?: string;\n onValueChange?: (value: string) => void;\n}\n\nconst TabsRoot = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Root>, TabsProps>(\n ({ value, onValueChange, ...props }, ref) => (\n <TabsPrimitive.Root ref={ref} value={value} onValueChange={onValueChange} {...props} />\n )\n);\nTabsRoot.displayName = 'Tabs';\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, children, ...props }, ref) => {\n const listRef = React.useRef<HTMLDivElement>(null);\n const [indicatorStyle, setIndicatorStyle] = React.useState<React.CSSProperties>({\n opacity: 0,\n });\n\n // Update indicator position when active tab changes\n React.useEffect(() => {\n const listElement = listRef.current;\n if (!listElement) return;\n\n const updateIndicator = () => {\n const activeTab = listElement.querySelector('[data-state=\"active\"]') as HTMLElement;\n if (activeTab) {\n const listRect = listElement.getBoundingClientRect();\n const tabRect = activeTab.getBoundingClientRect();\n\n setIndicatorStyle({\n width: tabRect.width,\n height: tabRect.height,\n left: tabRect.left - listRect.left,\n opacity: 1,\n });\n }\n };\n\n // Initial position\n updateIndicator();\n\n // Use MutationObserver to detect when active tab changes\n const observer = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-state') {\n updateIndicator();\n break;\n }\n }\n });\n\n // Observe all trigger elements for data-state changes\n const triggers = listElement.querySelectorAll('[role=\"tab\"]');\n triggers.forEach((trigger) => {\n observer.observe(trigger, { attributes: true, attributeFilter: ['data-state'] });\n });\n\n // Also update on resize\n const resizeObserver = new ResizeObserver(updateIndicator);\n resizeObserver.observe(listElement);\n\n return () => {\n observer.disconnect();\n resizeObserver.disconnect();\n };\n }, [children]);\n\n return (\n <TabsPrimitive.List\n ref={(node) => {\n // Handle both refs\n (listRef as React.MutableRefObject<HTMLDivElement | null>).current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n }}\n className={cn(\n 'sc:relative sc:inline-flex sc:h-10 sc:items-center sc:justify-center sc:rounded-full sc:px-1 sc:text-muted-foreground',\n // Consistent bg-default matches Button secondary variant for toolbar harmony\n 'sc:bg-default sc:dark:bg-[var(--color-default-on-surface)]',\n className\n )}\n {...props}\n >\n {/* Animated sliding indicator. In dark mode the previous `bg-muted`\n value resolved to the same color as `bg-default` on the container,\n so the active tab was invisible without relying purely on\n shadow-md. `bg-popover` lands ~0.08 lightness above `bg-default`\n in dark mode for a clearly visible elevation. */}\n <span\n className=\"sc:absolute sc:top-1/2 sc:-translate-y-1/2 sc:rounded-full sc:bg-surface sc:dark:bg-popover sc:shadow-md sc:transition-[left,width,opacity]\"\n style={{\n ...indicatorStyle,\n transitionDuration: '350ms',\n transitionTimingFunction: 'cubic-bezier(0.22, 1, 0.36, 1)',\n }}\n aria-hidden=\"true\"\n />\n {children}\n </TabsPrimitive.List>\n );\n});\nTabsList.displayName = TabsPrimitive.List.displayName;\n\ninterface TabsTriggerProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>, 'value'> {\n // HeroUI uses 'id' for tab identification, Radix uses 'value'\n // At least one must be provided\n id?: string;\n value?: string;\n}\n\nconst TabsTrigger = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Trigger>, TabsTriggerProps>(\n ({ className, id, value, ...props }, ref) => {\n const { variant: surfaceVariant } = useSurface();\n const isOnSurface = surfaceVariant === 'default' || surfaceVariant === 'secondary';\n\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n value={id ?? value ?? ''}\n className={cn(\n 'sc:relative sc:z-10 sc:inline-flex sc:h-8 sc:items-center sc:justify-center sc:gap-2 sc:whitespace-nowrap sc:rounded-full sc:px-4 sc:text-sm sc:font-label',\n 'sc:transition-[color,opacity]',\n 'sc:focus-visible:outline-none sc:focus-visible:ring-2 sc:focus-visible:ring-focus sc:focus-visible:ring-offset-2',\n 'sc:disabled:pointer-events-none sc:disabled:opacity-50',\n 'sc:data-[state=active]:text-foreground sc:data-[state=active]:opacity-100',\n // Inactive tabs use element opacity (not color opacity) to avoid SVG path overlap issues\n isOnSurface\n ? 'sc:data-[state=inactive]:text-foreground sc:data-[state=inactive]:opacity-30 sc:data-[state=inactive]:hover:opacity-50'\n : 'sc:data-[state=inactive]:text-foreground sc:data-[state=inactive]:opacity-50 sc:data-[state=inactive]:hover:opacity-70',\n className\n )}\n {...props}\n />\n );\n }\n);\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\ninterface TabsContentProps extends Omit<React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>, 'value'> {\n // HeroUI uses 'id' for panel identification, Radix uses 'value'\n // At least one must be provided\n id?: string;\n value?: string;\n}\n\nconst TabsContent = React.forwardRef<React.ElementRef<typeof TabsPrimitive.Content>, TabsContentProps>(\n ({ className, id, value, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n value={id ?? value ?? ''}\n className={cn(\n 'sc:mt-2 sc:ring-offset-background sc:focus-visible:outline-none sc:focus-visible:ring-2 sc:focus-visible:ring-focus sc:focus-visible:ring-offset-2',\n className\n )}\n {...props}\n />\n )\n);\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\n// HeroUI ListContainer - wrapper for the tabs list (passthrough div)\nconst TabsListContainer = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => <div ref={ref} className={className} {...props} />\n);\nTabsListContainer.displayName = 'TabsListContainer';\n\n// HeroUI Tab - alias for TabsTrigger\nconst TabsTab = TabsTrigger;\n\n// HeroUI Panel - alias for TabsContent\nconst TabsPanel = TabsContent;\n\n// HeroUI Indicator - now rendered automatically by TabsList, this is a no-op\nconst TabsIndicator = () => null;\n\n// Create compound component with all aliases\nconst TabsBase = TabsRoot;\n\n// HeroUI-compatible compound component\nconst Tabs = Object.assign(TabsBase, {\n List: TabsList,\n ListContainer: TabsListContainer,\n Tab: TabsTab,\n Trigger: TabsTrigger,\n Panel: TabsPanel,\n Content: TabsContent,\n Indicator: TabsIndicator,\n});\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, TabsRoot };\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface TextFieldProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Accessible label for the input.\n * If not provided via children, use aria-label on the div.\n */\n 'aria-label'?: string;\n /**\n * Error state - applies error styling to children inputs\n */\n isInvalid?: boolean;\n /**\n * Disabled state - disables all children inputs\n */\n disabled?: boolean;\n /**\n * Required state - marks all children inputs as required\n */\n required?: boolean;\n}\n\n/**\n * TextField - A wrapper component that groups Label and Input together.\n *\n * Groups Label and Input with a convenient wrapper that can propagate\n * disabled, required, and invalid states to child inputs.\n *\n * @example\n * ```tsx\n * <TextField>\n * <Label>Email</Label>\n * <Input type=\"email\" placeholder=\"Enter email...\" />\n * </TextField>\n * ```\n */\nconst TextField = React.forwardRef<HTMLDivElement, TextFieldProps>(\n ({ className, children, isInvalid, disabled, required, ...props }, ref) => {\n // Clone children to pass through state props to Input/Textarea children\n const enhancedChildren = React.Children.map(children, (child) => {\n if (!React.isValidElement(child)) return child;\n\n // Get the display name or type name to check if it's an input component\n const childType = child.type;\n const displayName =\n typeof childType === 'function'\n ? (childType as React.ComponentType).displayName || childType.name\n : typeof childType === 'string'\n ? childType\n : '';\n\n // Check if this is an input-like element that should receive state props\n const isInputElement =\n displayName === 'Input' ||\n displayName === 'Textarea' ||\n displayName === 'TextArea' ||\n displayName === 'input' ||\n displayName === 'textarea';\n\n if (isInputElement) {\n const childProps = child.props as Record<string, unknown>;\n return React.cloneElement(child as React.ReactElement<Record<string, unknown>>, {\n isInvalid: (childProps.isInvalid as boolean) ?? isInvalid,\n disabled: (childProps.disabled as boolean) ?? disabled,\n required: (childProps.required as boolean) ?? required,\n });\n }\n\n return child;\n });\n\n return (\n <div ref={ref} className={cn('sc:flex sc:flex-col sc:gap-1.5', className)} {...props}>\n {enhancedChildren}\n </div>\n );\n }\n);\nTextField.displayName = 'TextField';\n\nexport { TextField };\n","/**\n * Custom Icons - Centered versions of icons from various sets\n *\n * These are copies of icons with adjusted viewBox to center properly.\n * Use these instead of the original iconify versions for consistent alignment.\n */\n\nimport React from 'react';\nimport { cn } from '../../lib/utils';\n\ninterface IconProps {\n className?: string;\n size?: number | string;\n}\n\n/**\n * Rotate Left icon (lucide-style stroked version)\n */\nexport const RotateLeftIcon: React.FC<IconProps> = ({ className, size = 24 }) => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width={size}\n height={size}\n className={cn('sc:inline-block iconify', className)}\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </svg>\n);\n\n/**\n * Rotate Right icon (lucide-style stroked version)\n */\nexport const RotateRightIcon: React.FC<IconProps> = ({ className, size = 24 }) => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n width={size}\n height={size}\n className={cn('sc:inline-block iconify', className)}\n >\n <path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\" />\n <path d=\"M21 3v5h-5\" />\n </svg>\n);\n\n/**\n * Sparkles icon (based on gravity-ui:sparkles)\n * Two sparkle shapes - main 4-point star and smaller accent\n */\nexport const SparklesIcon: React.FC<IconProps> = ({ className, size = 24 }) => (\n <svg\n viewBox=\"0 0 28 28\"\n fill=\"currentColor\"\n width={size}\n height={size}\n className={cn('sc:inline-block', className)}\n >\n <path d=\"M10.06 18.701a1.628 1.628 0 0 0 2.43-.676l.77-2.34a3.82 3.82 0 0 1 2.416-2.418l2.238-.727a1.6 1.6 0 0 0 .786-.595a1.62 1.62 0 0 0-.849-2.489l-2.215-.72a3.82 3.82 0 0 1-2.42-2.414l-.727-2.237a1.62 1.62 0 0 0-.594-.785a1.655 1.655 0 0 0-1.879 0a1.63 1.63 0 0 0-.6.8L8.68 6.365a3.82 3.82 0 0 1-2.359 2.37l-2.24.726a1.626 1.626 0 0 0 .02 3.073l2.216.72a3.86 3.86 0 0 1 1.816 1.286c.266.343.471.728.606 1.14l.728 2.234c.112.318.32.593.595.787m-3.273-6.873l-2.22-.72s-.085-.038-.085-.108a.14.14 0 0 1 .084-.115L6.8 10.16a5.34 5.34 0 0 0 3.32-3.375l.721-2.219s.043-.084.114-.084s.113.084.113.084l.723 2.223a5.32 5.32 0 0 0 3.377 3.372l2.27.735a.13.13 0 0 1 .078.11a.15.15 0 0 1-.083.113l-2.225.722a5.32 5.32 0 0 0-3.374 3.374l-.715 2.2a.11.11 0 0 1-.115.093c-.104 0-.118-.075-.118-.075l-.723-2.22a5.32 5.32 0 0 0-3.376-3.385m13.017 12.954A1.2 1.2 0 0 0 20.5 25a1.2 1.2 0 0 0 .692-.216a1.2 1.2 0 0 0 .446-.6l.372-1.143a1.61 1.61 0 0 1 1.017-1.02l1.166-.378A1.21 1.21 0 0 0 25 20.505a1.2 1.2 0 0 0-.844-1.146l-1.144-.37a1.61 1.61 0 0 1-1.02-1.018l-.38-1.163a1.2 1.2 0 0 0-2.274.016l-.374 1.146a1.61 1.61 0 0 1-.993 1.017l-1.166.378a1.21 1.21 0 0 0-.807 1.139a1.2 1.2 0 0 0 .823 1.138l1.144.372a1.6 1.6 0 0 1 1.02 1.023l.379 1.163a1.2 1.2 0 0 0 .44.582m-1.371-4.194l-.27-.088l.283-.096a3.12 3.12 0 0 0 1.943-1.974l.088-.27l.089.272a3.11 3.11 0 0 0 1.974 1.975l.293.1l-.271.087a3.12 3.12 0 0 0-1.974 1.977l-.088.27l-.088-.272a3.12 3.12 0 0 0-1.98-1.98\" />\n </svg>\n);\n\n// Map of icon names to components for easy lookup\nexport const CustomIcons = {\n 'rotate-left': RotateLeftIcon,\n 'rotate-right': RotateRightIcon,\n 'sparkles': SparklesIcon,\n} as const;\n\nexport type CustomIconName = keyof typeof CustomIcons;\n"],"names":["Input","React","className","type","isInvalid","startContent","endContent","disabled","readOnly","required","variant","props","ref","surface","useSurface","isOnSurface","effectiveVariant","inputElement","jsx","cn","jsxs","labelVariants","cva","Label","LabelPrimitive","TabsRoot","value","onValueChange","TabsPrimitive","TabsList","children","listRef","indicatorStyle","setIndicatorStyle","listElement","updateIndicator","activeTab","listRect","tabRect","observer","mutations","mutation","trigger","resizeObserver","node","TabsTrigger","id","surfaceVariant","TabsContent","TabsListContainer","TabsTab","TabsPanel","TabsIndicator","TabsBase","Tabs","TextField","enhancedChildren","child","childType","displayName","childProps","RotateLeftIcon","size","SparklesIcon"],"mappings":";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