@adea-ai/ui 0.97.2 → 0.97.3

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 (32) hide show
  1. package/dist/components/composites/about-dialog/about-dialog.d.ts.map +1 -1
  2. package/dist/components/composites/about-dialog/about-dialog.js +2 -1
  3. package/dist/components/composites/about-dialog/about-dialog.js.map +1 -1
  4. package/dist/components/composites/appearance-editor/appearance-choices.d.ts.map +1 -1
  5. package/dist/components/composites/appearance-editor/appearance-choices.js +44 -42
  6. package/dist/components/composites/appearance-editor/appearance-choices.js.map +1 -1
  7. package/dist/components/composites/appearance-editor/appearance-editor.d.ts.map +1 -1
  8. package/dist/components/composites/appearance-editor/appearance-editor.js +23 -1
  9. package/dist/components/composites/appearance-editor/appearance-editor.js.map +1 -1
  10. package/dist/components/composites/appearance-editor/appearance-rows.d.ts +22 -5
  11. package/dist/components/composites/appearance-editor/appearance-rows.d.ts.map +1 -1
  12. package/dist/components/composites/appearance-editor/appearance-rows.js +249 -152
  13. package/dist/components/composites/appearance-editor/appearance-rows.js.map +1 -1
  14. package/dist/components/composites/appearance-editor/appearance-types.d.ts +7 -0
  15. package/dist/components/composites/appearance-editor/appearance-types.d.ts.map +1 -1
  16. package/dist/components/composites/appearance-editor/theme-preview.d.ts +10 -0
  17. package/dist/components/composites/appearance-editor/theme-preview.d.ts.map +1 -1
  18. package/dist/components/composites/appearance-editor/theme-preview.js +61 -12
  19. package/dist/components/composites/appearance-editor/theme-preview.js.map +1 -1
  20. package/dist/r/src/components/composites/about-dialog/about-dialog.tsx +6 -1
  21. package/dist/r/src/components/composites/appearance-editor/appearance-choices.tsx +19 -14
  22. package/dist/r/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  23. package/dist/r/src/components/composites/appearance-editor/appearance-rows.tsx +270 -160
  24. package/dist/r/src/components/composites/appearance-editor/appearance-types.ts +7 -0
  25. package/dist/r/src/components/composites/appearance-editor/theme-preview.tsx +58 -0
  26. package/package.json +1 -1
  27. package/src/components/composites/about-dialog/about-dialog.tsx +6 -1
  28. package/src/components/composites/appearance-editor/appearance-choices.tsx +19 -14
  29. package/src/components/composites/appearance-editor/appearance-editor.tsx +13 -1
  30. package/src/components/composites/appearance-editor/appearance-rows.tsx +270 -160
  31. package/src/components/composites/appearance-editor/appearance-types.ts +7 -0
  32. package/src/components/composites/appearance-editor/theme-preview.tsx +58 -0
@@ -1 +1 @@
1
- {"version":3,"file":"about-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/about-dialog/about-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,UAAU,CAAA;AAOjB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACpD,CAAA;AAED,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kCAkIlD"}
1
+ {"version":3,"file":"about-dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/about-dialog/about-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,QAAQ,EACd,MAAM,UAAU,CAAA;AAOjB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,eAAe,CAAC,EAAE,QAAQ,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CACpD,CAAA;AAED,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kCAuIlD"}
@@ -5,7 +5,7 @@ import { createComponent, effect, insert, setAttribute, template } from "solid-j
5
5
  import { ExternalLink } from "lucide-solid";
6
6
  import { Show, createEffect, createMemo, createSignal, on, onCleanup } from "solid-js";
7
7
  //#region src/components/composites/about-dialog/about-dialog.tsx
8
- var _tmpl$ = /*#__PURE__*/ template(`<div class="flex flex-col items-center gap-3 px-6 py-8 text-center"><img alt class=size-16 aria-hidden=true><p class="text-sm text-primary"></p><p class="text-xs text-muted-foreground"></p><div class="flex flex-wrap items-center justify-center gap-3">`);
8
+ var _tmpl$ = /*#__PURE__*/ template(`<div class="flex flex-col items-center gap-3 px-6 py-8 text-center"><img alt class=size-16 aria-hidden=true><p class="text-sm text-foreground"></p><p class="text-xs text-muted-foreground"></p><div class="flex flex-wrap items-center justify-center gap-3">`);
9
9
  /** Compact app identity and support details, with clipboard and native-browser adapters. */
10
10
  function AboutDialog(props) {
11
11
  const versionLabel = () => props.version ? `Version ${props.version}` : "Version unavailable";
@@ -120,6 +120,7 @@ function AboutDialog(props) {
120
120
  as: "a",
121
121
  variant: "link",
122
122
  size: "sm",
123
+ "class": "text-foreground decoration-primary",
123
124
  get href() {
124
125
  return props.sourceUrl;
125
126
  },
@@ -1 +1 @@
1
- {"version":3,"file":"about-dialog.js","names":["createEffect","createMemo","createSignal","on","onCleanup","Show","Accessor","ExternalLink","ActionButton","Alert","AlertDescription","Dialog","DialogContent","DialogTitle","createDialogFocusRestoration","AboutDialogProps","appName","appIcon","version","platform","copyright","sourceUrl","open","onOpenChange","copyVersionInfo","text","Promise","openExternal","url","restoreFocusRef","HTMLElement","AboutDialog","props","versionLabel","versionInfo","join","copied","setCopied","error","setError","copying","setCopying","disposed","epoch","timer","ReturnType","setTimeout","clearTimeout","focus","copy","owner","active","navigator","clipboard","writeText","openSource","_$createComponent","children","onKeyDown","event","KeyboardEvent","key","defaultPrevented","preventDefault","aria-label","undefined","onOpenAutoFocus","currentTarget","preventScroll","onCloseAutoFocus","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_el$4","_el$5","_$insert","type","variant","size","busy","tooltip","onClick","as","href","target","rel","when","role","_$effect","_$setAttribute","_$createComponent","_$setAttribute"],"sources":["../../../../src/components/composites/about-dialog/about-dialog.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createSignal,\n on,\n onCleanup,\n Show,\n type Accessor,\n} from 'solid-js'\nimport { ExternalLink } from 'lucide-solid'\nimport { ActionButton } from '../action-button'\nimport { Alert, AlertDescription } from '../../ui/alert'\nimport { Dialog, DialogContent, DialogTitle } from '../../ui/dialog'\nimport { createDialogFocusRestoration } from '../../ui/dialog/dialog'\n\nexport type AboutDialogProps = {\n appName: string\n appIcon: string\n version?: string\n platform: string\n copyright: string\n sourceUrl: string\n open: boolean\n onOpenChange: (open: boolean) => void\n copyVersionInfo?: (text: string) => Promise<void>\n openExternal?: (url: string) => Promise<void>\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n}\n\n/** Compact app identity and support details, with clipboard and native-browser adapters. */\nexport function AboutDialog(props: AboutDialogProps) {\n const versionLabel = () => (props.version ? `Version ${props.version}` : 'Version unavailable')\n const versionInfo = createMemo(() =>\n [props.appName, versionLabel(), `Platform: ${props.platform}`].join('\\n')\n )\n const [copied, setCopied] = createSignal(false)\n const [error, setError] = createSignal('')\n const [copying, setCopying] = createSignal(false)\n let disposed = false\n let epoch = 0\n let timer: ReturnType<typeof setTimeout> | undefined\n onCleanup(() => {\n disposed = true\n epoch += 1\n clearTimeout(timer)\n })\n createEffect(\n on(\n () => props.open,\n () => {\n epoch += 1\n clearTimeout(timer)\n setCopied(false)\n setError('')\n setCopying(false)\n }\n )\n )\n const focus = createDialogFocusRestoration({\n open: () => props.open,\n restoreFocusRef: props.restoreFocusRef,\n })\n const copy = async () => {\n const owner = epoch\n const active = () => !disposed && props.open && owner === epoch\n setError('')\n setCopied(false)\n setCopying(true)\n try {\n if (props.copyVersionInfo) await props.copyVersionInfo(versionInfo())\n else await navigator.clipboard.writeText(versionInfo())\n if (!active()) return\n setCopied(true)\n clearTimeout(timer)\n timer = setTimeout(() => {\n if (active()) setCopied(false)\n }, 2000)\n } catch {\n if (active()) setError('Could not copy version info. Please try again.')\n } finally {\n if (active()) setCopying(false)\n }\n }\n const openSource = async () => {\n const owner = epoch\n setError('')\n try {\n await props.openExternal?.(props.sourceUrl)\n } catch {\n if (!disposed && props.open && owner === epoch)\n setError('Could not open the source repository. Please try again.')\n }\n }\n return (\n <Dialog open={props.open} onOpenChange={props.onOpenChange}>\n <DialogContent\n onKeyDown={(event: KeyboardEvent) => {\n // Tooltip help on the identity actions cannot trap Escape in this popup.\n if (event.key === 'Escape' && !event.defaultPrevented) {\n event.preventDefault()\n props.onOpenChange(false)\n }\n }}\n aria-label={`About ${props.appName}`}\n aria-labelledby=\"\"\n aria-describedby={undefined}\n onOpenAutoFocus={(event) => {\n focus.onOpenAutoFocus(event)\n // Let the identity be read before focus opens explanatory action help.\n if (!event.defaultPrevented && event.currentTarget instanceof HTMLElement) {\n event.preventDefault()\n event.currentTarget.focus({ preventScroll: true })\n }\n }}\n onCloseAutoFocus={focus.onCloseAutoFocus}\n >\n <div class=\"flex flex-col items-center gap-3 px-6 py-8 text-center\">\n <img src={props.appIcon} alt=\"\" class=\"size-16\" aria-hidden=\"true\" />\n <DialogTitle>{props.appName}</DialogTitle>\n <p class=\"text-sm text-primary\">{versionLabel()}</p>\n <p class=\"text-xs text-muted-foreground\">{props.copyright}</p>\n <div class=\"flex flex-wrap items-center justify-center gap-3\">\n <ActionButton\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n busy={copying()}\n tooltip=\"Copy the app version and runtime details for a support report.\"\n onClick={() => void copy()}\n >\n {copied() ? 'Copied' : 'Copy version info'}\n </ActionButton>\n <ActionButton\n as=\"a\"\n variant=\"link\"\n size=\"sm\"\n href={props.sourceUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n tooltip={`Open the ${props.appName} source repository in your browser.`}\n onClick={(event) => {\n if (props.openExternal) {\n event.preventDefault()\n void openSource()\n }\n }}\n >\n <ExternalLink aria-hidden=\"true\" />\n View source\n </ActionButton>\n </div>\n <Show when={error()}>\n <Alert variant=\"destructive\" role=\"alert\">\n <AlertDescription>{error()}</AlertDescription>\n </Alert>\n </Show>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":";;;;;;;;;AA8BA,SAAgB+B,YAAYC,OAAyB;CACnD,MAAMC,qBAAsBD,MAAMd,UAAU,WAAWc,MAAMd,YAAY;CACzE,MAAMgB,cAAcjC,iBAClB;EAAC+B,MAAMhB;EAASiB,aAAa;EAAG,aAAaD,MAAMb;CAAU,CAAC,CAACgB,KAAK,IAAI,CAC1E;CACA,MAAM,CAACC,QAAQC,aAAanC,aAAa,KAAK;CAC9C,MAAM,CAACoC,OAAOC,YAAYrC,aAAa,EAAE;CACzC,MAAM,CAACsC,SAASC,cAAcvC,aAAa,KAAK;CAChD,IAAIwC,WAAW;CACf,IAAIC,QAAQ;CACZ,IAAIC;CACJxC,gBAAgB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EoE,UAAUzB,UAAU;OAClB,IAAI3B,MAAML,cAAc;QACtBgC,MAAMI,eAAe;QACrB,WAAgB;OAClB;MACF;MAAC,IAAAN,WAAA;OAAA,OAAA,CAAAD,gBAEAjD,cAAY,EAAA,eAAA,OAAA,CAAA,GAAA,aAAA;MAAA;KAAA,CAAA,GAAA,IAAA;KAAAuE,OAAAR,MAAAd,gBAIhBnD,MAAI;MAAA,IAACoF,OAAI;OAAA,OAAEnD,MAAM;MAAC;MAAA,IAAAmB,WAAA;OAAA,OAAAD,gBAChB/C,OAAK;QAACuE,SAAO;QAAeU,MAAI;QAAA,IAAAjC,WAAA;SAAA,OAAAD,gBAC9B9C,kBAAgB,EAAA,IAAA+C,WAAA;UAAA,OAAEnB,MAAM;SAAC,EAAA,CAAA;QAAA;OAAA,CAAA;MAAA;KAAA,CAAA,GAAA,IAAA;KAAAqD,aAAAC,aAAApB,OAAA,OApCpBxC,MAAMf,OAAO,CAAA;KAAA,OAAAqD;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AA2CjC"}
1
+ {"version":3,"file":"about-dialog.js","names":["createEffect","createMemo","createSignal","on","onCleanup","Show","Accessor","ExternalLink","ActionButton","Alert","AlertDescription","Dialog","DialogContent","DialogTitle","createDialogFocusRestoration","AboutDialogProps","appName","appIcon","version","platform","copyright","sourceUrl","open","onOpenChange","copyVersionInfo","text","Promise","openExternal","url","restoreFocusRef","HTMLElement","AboutDialog","props","versionLabel","versionInfo","join","copied","setCopied","error","setError","copying","setCopying","disposed","epoch","timer","ReturnType","setTimeout","clearTimeout","focus","copy","owner","active","navigator","clipboard","writeText","openSource","_$createComponent","children","onKeyDown","event","KeyboardEvent","key","defaultPrevented","preventDefault","aria-label","undefined","onOpenAutoFocus","currentTarget","preventScroll","onCloseAutoFocus","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_el$4","_el$5","_$insert","type","variant","size","busy","tooltip","onClick","as","href","target","rel","when","role","_$effect","_$setAttribute","_$createComponent","_$setAttribute"],"sources":["../../../../src/components/composites/about-dialog/about-dialog.tsx"],"sourcesContent":["import {\n createEffect,\n createMemo,\n createSignal,\n on,\n onCleanup,\n Show,\n type Accessor,\n} from 'solid-js'\nimport { ExternalLink } from 'lucide-solid'\nimport { ActionButton } from '../action-button'\nimport { Alert, AlertDescription } from '../../ui/alert'\nimport { Dialog, DialogContent, DialogTitle } from '../../ui/dialog'\nimport { createDialogFocusRestoration } from '../../ui/dialog/dialog'\n\nexport type AboutDialogProps = {\n appName: string\n appIcon: string\n version?: string\n platform: string\n copyright: string\n sourceUrl: string\n open: boolean\n onOpenChange: (open: boolean) => void\n copyVersionInfo?: (text: string) => Promise<void>\n openExternal?: (url: string) => Promise<void>\n restoreFocusRef?: Accessor<HTMLElement | undefined>\n}\n\n/** Compact app identity and support details, with clipboard and native-browser adapters. */\nexport function AboutDialog(props: AboutDialogProps) {\n const versionLabel = () => (props.version ? `Version ${props.version}` : 'Version unavailable')\n const versionInfo = createMemo(() =>\n [props.appName, versionLabel(), `Platform: ${props.platform}`].join('\\n')\n )\n const [copied, setCopied] = createSignal(false)\n const [error, setError] = createSignal('')\n const [copying, setCopying] = createSignal(false)\n let disposed = false\n let epoch = 0\n let timer: ReturnType<typeof setTimeout> | undefined\n onCleanup(() => {\n disposed = true\n epoch += 1\n clearTimeout(timer)\n })\n createEffect(\n on(\n () => props.open,\n () => {\n epoch += 1\n clearTimeout(timer)\n setCopied(false)\n setError('')\n setCopying(false)\n }\n )\n )\n const focus = createDialogFocusRestoration({\n open: () => props.open,\n restoreFocusRef: props.restoreFocusRef,\n })\n const copy = async () => {\n const owner = epoch\n const active = () => !disposed && props.open && owner === epoch\n setError('')\n setCopied(false)\n setCopying(true)\n try {\n if (props.copyVersionInfo) await props.copyVersionInfo(versionInfo())\n else await navigator.clipboard.writeText(versionInfo())\n if (!active()) return\n setCopied(true)\n clearTimeout(timer)\n timer = setTimeout(() => {\n if (active()) setCopied(false)\n }, 2000)\n } catch {\n if (active()) setError('Could not copy version info. Please try again.')\n } finally {\n if (active()) setCopying(false)\n }\n }\n const openSource = async () => {\n const owner = epoch\n setError('')\n try {\n await props.openExternal?.(props.sourceUrl)\n } catch {\n if (!disposed && props.open && owner === epoch)\n setError('Could not open the source repository. Please try again.')\n }\n }\n return (\n <Dialog open={props.open} onOpenChange={props.onOpenChange}>\n <DialogContent\n onKeyDown={(event: KeyboardEvent) => {\n // Tooltip help on the identity actions cannot trap Escape in this popup.\n if (event.key === 'Escape' && !event.defaultPrevented) {\n event.preventDefault()\n props.onOpenChange(false)\n }\n }}\n aria-label={`About ${props.appName}`}\n aria-labelledby=\"\"\n aria-describedby={undefined}\n onOpenAutoFocus={(event) => {\n focus.onOpenAutoFocus(event)\n // Let the identity be read before focus opens explanatory action help.\n if (!event.defaultPrevented && event.currentTarget instanceof HTMLElement) {\n event.preventDefault()\n event.currentTarget.focus({ preventScroll: true })\n }\n }}\n onCloseAutoFocus={focus.onCloseAutoFocus}\n >\n <div class=\"flex flex-col items-center gap-3 px-6 py-8 text-center\">\n <img src={props.appIcon} alt=\"\" class=\"size-16\" aria-hidden=\"true\" />\n <DialogTitle>{props.appName}</DialogTitle>\n {/* Body text on the dialog's themed surface: primary ink measures\n below AA against the lighter dialog backgrounds across schemes,\n so the version and the source link carry foreground ink and keep\n primary as the link's underline accent (the text-link treatment). */}\n <p class=\"text-sm text-foreground\">{versionLabel()}</p>\n <p class=\"text-xs text-muted-foreground\">{props.copyright}</p>\n <div class=\"flex flex-wrap items-center justify-center gap-3\">\n <ActionButton\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n busy={copying()}\n tooltip=\"Copy the app version and runtime details for a support report.\"\n onClick={() => void copy()}\n >\n {copied() ? 'Copied' : 'Copy version info'}\n </ActionButton>\n <ActionButton\n as=\"a\"\n variant=\"link\"\n size=\"sm\"\n class=\"text-foreground decoration-primary\"\n href={props.sourceUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n tooltip={`Open the ${props.appName} source repository in your browser.`}\n onClick={(event) => {\n if (props.openExternal) {\n event.preventDefault()\n void openSource()\n }\n }}\n >\n <ExternalLink aria-hidden=\"true\" />\n View source\n </ActionButton>\n </div>\n <Show when={error()}>\n <Alert variant=\"destructive\" role=\"alert\">\n <AlertDescription>{error()}</AlertDescription>\n </Alert>\n </Show>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n"],"mappings":";;;;;;;;;AA8BA,SAAgB+B,YAAYC,OAAyB;CACnD,MAAMC,qBAAsBD,MAAMd,UAAU,WAAWc,MAAMd,YAAY;CACzE,MAAMgB,cAAcjC,iBAClB;EAAC+B,MAAMhB;EAASiB,aAAa;EAAG,aAAaD,MAAMb;CAAU,CAAC,CAACgB,KAAK,IAAI,CAC1E;CACA,MAAM,CAACC,QAAQC,aAAanC,aAAa,KAAK;CAC9C,MAAM,CAACoC,OAAOC,YAAYrC,aAAa,EAAE;CACzC,MAAM,CAACsC,SAASC,cAAcvC,aAAa,KAAK;CAChD,IAAIwC,WAAW;CACf,IAAIC,QAAQ;CACZ,IAAIC;CACJxC,gBAAgB;EACdsC,WAAW;EACXC,SAAS;EACTI,aAAaH,KAAK;CACpB,CAAC;CACD5C,aACEG,SACQ6B,MAAMV,YACN;EACJqB,SAAS;EACTI,aAAaH,KAAK;EAClBP,UAAU,KAAK;EACfE,SAAS,EAAE;EACXE,WAAW,KAAK;CAClB,CACF,CACF;CACA,MAAMO,QAAQlC,6BAA6B;EACzCQ,YAAYU,MAAMV;EAClBO,iBAAiBG,MAAMH;CACzB,CAAC;CACD,MAAMoB,OAAO,YAAY;EACvB,MAAMC,QAAQP;EACd,MAAMQ,eAAe,CAACT,YAAYV,MAAMV,QAAQ4B,UAAUP;EAC1DJ,SAAS,EAAE;EACXF,UAAU,KAAK;EACfI,WAAW,IAAI;EACf,IAAI;GACF,IAAIT,MAAMR,iBAAiB,MAAMQ,MAAMR,gBAAgBU,YAAY,CAAC;QAC/D,MAAMkB,UAAUC,UAAUC,UAAUpB,YAAY,CAAC;GAC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AAA,OAzCpBxC,MAAMf,OAAO,CAAA;KAAA,OAAAqD;IAAA;GAAA,CAAA;EAAA;CAAA,CAAA;AAgDjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-choices.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAc/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,kCAyCvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,qBAAqB,kCA2DzD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,kCA6BxD"}
1
+ {"version":3,"file":"appearance-choices.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAc/D,wBAAgB,WAAW,CAAC,KAAK,EAAE,qBAAqB,kCAyCvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,qBAAqB,kCAgEzD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,qBAAqB,kCA6BxD"}
@@ -5,9 +5,10 @@ import { RadioGroup } from "@kobalte/core/radio-group";
5
5
  //#region src/components/composites/appearance-editor/appearance-choices.tsx
6
6
  var _tmpl$ = /*#__PURE__*/ template(`<span class="block h-20 w-full">`);
7
7
  var _tmpl$2 = /*#__PURE__*/ template(`<span>`);
8
- var _tmpl$3 = /*#__PURE__*/ template(`<div class="flex max-w-full flex-wrap gap-2">`);
9
- var _tmpl$4 = /*#__PURE__*/ template(`<span class="block size-full rounded-full"aria-hidden=true>`);
10
- var _tmpl$5 = /*#__PURE__*/ template(`<span class=sr-only>`);
8
+ var _tmpl$3 = /*#__PURE__*/ template(`<div class="flex flex-col gap-2">`);
9
+ var _tmpl$4 = /*#__PURE__*/ template(`<div class="grid grid-cols-3 gap-2">`);
10
+ var _tmpl$5 = /*#__PURE__*/ template(`<span class="block size-full rounded-full"aria-hidden=true>`);
11
+ var _tmpl$6 = /*#__PURE__*/ template(`<span class=sr-only>`);
11
12
  var MODES = [
12
13
  {
13
14
  value: "system",
@@ -114,11 +115,12 @@ function AccentChoices(props) {
114
115
  },
115
116
  orientation: "horizontal",
116
117
  "aria-label": "Accent",
117
- "class": "flex flex-wrap items-center gap-2",
118
+ "class": "flex items-center gap-3",
118
119
  onChange: (accent) => props.onChange({ accent: accent === "custom" ? props.customAccentValue ?? "" : accent }),
119
120
  get children() {
120
- return [
121
- createComponent(RadioGroup.Item, {
121
+ return [(() => {
122
+ var _el$3 = _tmpl$3();
123
+ insert(_el$3, createComponent(RadioGroup.Item, {
122
124
  value: "theme",
123
125
  get children() {
124
126
  return [createComponent(RadioGroup.ItemInput, {}), createComponent(RadioGroup.ItemLabel, {
@@ -126,48 +128,48 @@ function AccentChoices(props) {
126
128
  children: "Theme default"
127
129
  })];
128
130
  }
129
- }),
130
- (() => {
131
- var _el$3 = _tmpl$3();
132
- insert(_el$3, createComponent(For, {
133
- get each() {
134
- return props.accentOptions;
135
- },
136
- children: (option) => createComponent(RadioGroup.Item, {
137
- get value() {
138
- return option.id;
139
- },
140
- "class": "rounded-full focus-within:ring-3 focus-within:ring-ring/50",
141
- get children() {
142
- return [createComponent(RadioGroup.ItemInput, {}), createComponent(RadioGroup.ItemLabel, {
143
- "class": "block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary",
144
- get children() {
145
- return [(() => {
146
- var _el$4 = _tmpl$4();
147
- effect((_$p) => setStyleProperty(_el$4, "background-color", (props.draft.mode === "system" ? props.resolvedAppearance : props.draft.mode) === "light" ? option.light : option.dark));
148
- return _el$4;
149
- })(), (() => {
150
- var _el$5 = _tmpl$5();
151
- insert(_el$5, () => option.label);
152
- return _el$5;
153
- })()];
154
- }
155
- })];
156
- }
157
- })
158
- }));
159
- return _el$3;
160
- })(),
161
- createComponent(RadioGroup.Item, {
131
+ }), null);
132
+ insert(_el$3, createComponent(RadioGroup.Item, {
162
133
  value: "custom",
163
134
  get children() {
164
135
  return [createComponent(RadioGroup.ItemInput, {}), createComponent(RadioGroup.ItemLabel, {
165
- "class": "flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary",
136
+ "class": "flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary",
166
137
  children: "Custom"
167
138
  })];
168
139
  }
169
- })
170
- ];
140
+ }), null);
141
+ return _el$3;
142
+ })(), (() => {
143
+ var _el$4 = _tmpl$4();
144
+ insert(_el$4, createComponent(For, {
145
+ get each() {
146
+ return props.accentOptions;
147
+ },
148
+ children: (option) => createComponent(RadioGroup.Item, {
149
+ get value() {
150
+ return option.id;
151
+ },
152
+ "class": "rounded-full focus-within:ring-3 focus-within:ring-ring/50",
153
+ get children() {
154
+ return [createComponent(RadioGroup.ItemInput, {}), createComponent(RadioGroup.ItemLabel, {
155
+ "class": "block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary",
156
+ get children() {
157
+ return [(() => {
158
+ var _el$5 = _tmpl$5();
159
+ effect((_$p) => setStyleProperty(_el$5, "background-color", (props.draft.mode === "system" ? props.resolvedAppearance : props.draft.mode) === "light" ? option.light : option.dark));
160
+ return _el$5;
161
+ })(), (() => {
162
+ var _el$6 = _tmpl$6();
163
+ insert(_el$6, () => option.label);
164
+ return _el$6;
165
+ })()];
166
+ }
167
+ })];
168
+ }
169
+ })
170
+ }));
171
+ return _el$4;
172
+ })()];
171
173
  }
172
174
  });
173
175
  }
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-choices.js","names":["RadioGroup","Radio","For","Show","AppearanceEditorProps","ThemeMiniature","ThemeMiniatureSplit","MODES","value","label","const","SURFACES","ModeChoices","props","_$createComponent","draft","mode","disabled","saving","orientation","onChange","option","find","candidate","children","each","Item","data-mode","ItemInput","ItemLabel","_el$","_tmpl$","_$insert","when","fallback","theme","_$memo","lightTheme","darkTheme","light","dark","_el$2","_tmpl$2","AccentChoices","custom","accent","accentOptions","some","id","accentSelection","customAccentValue","_el$3","_tmpl$3","_el$4","_tmpl$4","_$effect","_$p","_$setStyleProperty","resolvedAppearance","_el$5","_tmpl$5","GlassChoices","surface","surfaceCapability","frosted","_$createComponent","Radio","_$memo","_$setStyleProperty"],"sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Pinned mode-card, accent-swatch, and glass-chip composition. Kobalte replaces\n// the app port's manual roving focus; it does not replace the donor hierarchy.\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { For, Show } from 'solid-js'\nimport type { AppearanceEditorProps } from './appearance-types'\nimport { ThemeMiniature, ThemeMiniatureSplit } from './theme-preview'\n\nconst MODES = [\n { value: 'system', label: 'System' },\n { value: 'light', label: 'Light' },\n { value: 'dark', label: 'Dark' },\n] as const\nconst SURFACES = [\n { value: 'theme', label: 'Theme default' },\n { value: 'frosted', label: 'Frosted' },\n { value: 'opaque', label: 'Opaque' },\n] as const\n\nexport function ModeChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.mode}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Appearance mode\"\n onChange={(mode) => {\n const option = MODES.find((candidate) => candidate.value === mode)\n if (option) props.onChange({ mode: option.value })\n }}\n class=\"grid grid-cols-1 gap-3 px-4 py-4 sm:grid-cols-3\"\n >\n <For each={MODES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n data-mode={option.value}\n class=\"min-w-0 rounded-lg focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex cursor-pointer flex-col gap-2 rounded-lg border p-2 text-center text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n <span class=\"block h-20 w-full\">\n <Show\n when={option.value === 'system'}\n fallback={\n <ThemeMiniature\n theme={option.value === 'light' ? props.lightTheme : props.darkTheme}\n />\n }\n >\n <ThemeMiniatureSplit light={props.lightTheme} dark={props.darkTheme} />\n </Show>\n </span>\n <span>{option.label}</span>\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n\nexport function AccentChoices(props: AppearanceEditorProps) {\n const custom = () =>\n props.draft.accent !== 'theme' &&\n !props.accentOptions.some((option) => option.id === props.draft.accent)\n const accentSelection = () => (custom() ? 'custom' : props.draft.accent)\n return (\n <Radio\n value={accentSelection()}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n class=\"flex flex-wrap items-center gap-2\"\n onChange={(accent) =>\n props.onChange({\n accent: accent === 'custom' ? (props.customAccentValue ?? '') : accent,\n })\n }\n >\n <Radio.Item value=\"theme\">\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n Theme default\n </Radio.ItemLabel>\n </Radio.Item>\n <div class=\"flex max-w-full flex-wrap gap-2\">\n <For each={props.accentOptions}>\n {(option) => (\n <Radio.Item\n value={option.id}\n class=\"rounded-full focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{\n 'background-color':\n (props.draft.mode === 'system'\n ? props.resolvedAppearance\n : props.draft.mode) === 'light'\n ? option.light\n : option.dark,\n }}\n />\n <span class=\"sr-only\">{option.label}</span>\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </div>\n <Radio.Item value=\"custom\">\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n Custom\n </Radio.ItemLabel>\n </Radio.Item>\n </Radio>\n )\n}\n\nexport function GlassChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.surface}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Glass\"\n class=\"flex flex-wrap gap-1\"\n onChange={(surface) => {\n const option = SURFACES.find((candidate) => candidate.value === surface)\n if (option) props.onChange({ surface: option.value })\n }}\n >\n <For each={SURFACES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n disabled={option.value === 'frosted' && !props.surfaceCapability.frosted}\n class=\"rounded-md focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n {option.label}\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n"],"mappings":";;;;;;;;;;AA8BA,IAAMO,QAAQ;CACZ;EAAEC,OAAO;EAAUC,OAAO;CAAS;CACnC;EAAED,OAAO;EAASC,OAAO;CAAQ;CACjC;EAAED,OAAO;EAAQC,OAAO;CAAO;AAAC;AAElC,IAAME,WAAW;CACf;EAAEH,OAAO;EAASC,OAAO;CAAgB;CACzC;EAAED,OAAO;EAAWC,OAAO;CAAU;CACrC;EAAED,OAAO;EAAUC,OAAO;CAAS;AAAC;AAGtC,SAAgBG,YAAYC,OAA8B;CACxD,OAAAC,gBACGb,YAAK;EAAA,IACJO,QAAK;GAAA,OAAEK,MAAME,MAAMC;EAAI;EAAA,IACvBC,WAAQ;GAAA,OAAEJ,MAAMK;EAAM;EACtBC,aAAW;EAAA,cAAA;EAEXC,WAAWJ,SAAS;GAClB,MAAMK,SAASd,MAAMe,MAAMC,cAAcA,UAAUf,UAAUQ,IAAI;GACjE,IAAIK,QAAQR,MAAMO,SAAS,EAAEJ,MAAMK,OAAOb,MAAM,CAAC;EACnD;EAAC,SAAA;EAAA,IAAAgB,WAAA;GAAA,OAAAV,gBAGAZ,KAAG;IAACuB,MAAMlB;IAAKiB,WACZH,WAAMP,gBACLb,WAAMyB,MAAI;KAAA,IACTlB,QAAK;MAAA,OAAEa,OAAOb;KAAK;KAAA,KAAA,eAAA;MAAA,OACRa,OAAOb;KAAK;KAAA,SAAA;KAAA,IAAAgB,WAAA;MAAA,OAAA,CAAAV,gBAGtBb,WAAM2B,WAAS,CAAA,CAAA,GAAAd,gBACfb,WAAM4B,WAAS;OAAA,SAAA;OAAA,IAAAL,WAAA;QAAA,OAAA,QAAA;SAAA,IAAAM,OAAAC,OAAA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b,YAAK;EAAA,IACJO,QAAK;GAAA,OAAEK,MAAME,MAAM+C;EAAO;EAAA,IAC1B7C,WAAQ;GAAA,OAAEJ,MAAMK;EAAM;EACtBC,aAAW;EAAA,cAAA;EAAA,SAAA;EAGXC,WAAW0C,YAAY;GACrB,MAAMzC,SAASV,SAASW,MAAMC,cAAcA,UAAUf,UAAUsD,OAAO;GACvE,IAAIzC,QAAQR,MAAMO,SAAS,EAAE0C,SAASzC,OAAOb,MAAM,CAAC;EACtD;EAAC,IAAAgB,WAAA;GAAA,OAAAV,gBAEAZ,KAAG;IAACuB,MAAMd;IAAQa,WACfH,WAAMP,gBACLb,WAAMyB,MAAI;KAAA,IACTlB,QAAK;MAAA,OAAEa,OAAOb;KAAK;KAAA,IACnBS,WAAQ;MAAA,OAAEmB,WAAAf,OAAOb,UAAU,SAAS,CAAA,CAAA,KAAI,CAACK,MAAMkD,kBAAkBC;KAAO;KAAA,SAAA;KAAA,IAAAxC,WAAA;MAAA,OAAA,CAAAV,gBAGvEb,WAAM2B,WAAS,CAAA,CAAA,GAAAd,gBACfb,WAAM4B,WAAS;OAAA,SAAA;OAAA,IAAAL,WAAA;QAAA,OACbH,OAAOZ;OAAK;MAAA,CAAA,CAAA;KAAA;IAAA,CAAA;GAGlB,CAAA;EAAA;CAAA,CAAA;AAIT"}
1
+ {"version":3,"file":"appearance-choices.js","names":["RadioGroup","Radio","For","Show","AppearanceEditorProps","ThemeMiniature","ThemeMiniatureSplit","MODES","value","label","const","SURFACES","ModeChoices","props","_$createComponent","draft","mode","disabled","saving","orientation","onChange","option","find","candidate","children","each","Item","data-mode","ItemInput","ItemLabel","_el$","_tmpl$","_$insert","when","fallback","theme","_$memo","lightTheme","darkTheme","light","dark","_el$2","_tmpl$2","AccentChoices","custom","accent","accentOptions","some","id","accentSelection","customAccentValue","_el$3","_tmpl$3","_el$4","_tmpl$4","_el$5","_tmpl$5","_$effect","_$p","_$setStyleProperty","resolvedAppearance","_el$6","_tmpl$6","GlassChoices","surface","surfaceCapability","frosted","_$createComponent","Radio","_$memo","_$setStyleProperty"],"sources":["../../../../src/components/composites/appearance-editor/appearance-choices.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Pinned mode-card, accent-swatch, and glass-chip composition. Kobalte replaces\n// the app port's manual roving focus; it does not replace the donor hierarchy.\nimport { RadioGroup as Radio } from '@kobalte/core/radio-group'\nimport { For, Show } from 'solid-js'\nimport type { AppearanceEditorProps } from './appearance-types'\nimport { ThemeMiniature, ThemeMiniatureSplit } from './theme-preview'\n\nconst MODES = [\n { value: 'system', label: 'System' },\n { value: 'light', label: 'Light' },\n { value: 'dark', label: 'Dark' },\n] as const\nconst SURFACES = [\n { value: 'theme', label: 'Theme default' },\n { value: 'frosted', label: 'Frosted' },\n { value: 'opaque', label: 'Opaque' },\n] as const\n\nexport function ModeChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.mode}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Appearance mode\"\n onChange={(mode) => {\n const option = MODES.find((candidate) => candidate.value === mode)\n if (option) props.onChange({ mode: option.value })\n }}\n class=\"grid grid-cols-1 gap-3 px-4 py-4 sm:grid-cols-3\"\n >\n <For each={MODES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n data-mode={option.value}\n class=\"min-w-0 rounded-lg focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex cursor-pointer flex-col gap-2 rounded-lg border p-2 text-center text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n <span class=\"block h-20 w-full\">\n <Show\n when={option.value === 'system'}\n fallback={\n <ThemeMiniature\n theme={option.value === 'light' ? props.lightTheme : props.darkTheme}\n />\n }\n >\n <ThemeMiniatureSplit light={props.lightTheme} dark={props.darkTheme} />\n </Show>\n </span>\n <span>{option.label}</span>\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </Radio>\n )\n}\n\nexport function AccentChoices(props: AppearanceEditorProps) {\n const custom = () =>\n props.draft.accent !== 'theme' &&\n !props.accentOptions.some((option) => option.id === props.draft.accent)\n const accentSelection = () => (custom() ? 'custom' : props.draft.accent)\n return (\n <Radio\n value={accentSelection()}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Accent\"\n // Two chips in a column beside a 3x2 swatch grid: one line of six\n // swatches plus chips overflows the settings sidebar's control column,\n // and the column keeps both rows of the pair balanced (2 x 28px + gap).\n class=\"flex items-center gap-3\"\n onChange={(accent) =>\n props.onChange({\n accent: accent === 'custom' ? (props.customAccentValue ?? '') : accent,\n })\n }\n >\n <div class=\"flex flex-col gap-2\">\n <Radio.Item value=\"theme\">\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n Theme default\n </Radio.ItemLabel>\n </Radio.Item>\n <Radio.Item value=\"custom\">\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs whitespace-nowrap data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n Custom\n </Radio.ItemLabel>\n </Radio.Item>\n </div>\n <div class=\"grid grid-cols-3 gap-2\">\n <For each={props.accentOptions}>\n {(option) => (\n <Radio.Item\n value={option.id}\n class=\"rounded-full focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"block size-7 cursor-pointer rounded-full border p-0.5 data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary\">\n <span\n class=\"block size-full rounded-full\"\n aria-hidden=\"true\"\n style={{\n 'background-color':\n (props.draft.mode === 'system'\n ? props.resolvedAppearance\n : props.draft.mode) === 'light'\n ? option.light\n : option.dark,\n }}\n />\n <span class=\"sr-only\">{option.label}</span>\n </Radio.ItemLabel>\n </Radio.Item>\n )}\n </For>\n </div>\n </Radio>\n )\n}\n\nexport function GlassChoices(props: AppearanceEditorProps) {\n return (\n <Radio\n value={props.draft.surface}\n disabled={props.saving}\n orientation=\"horizontal\"\n aria-label=\"Glass\"\n class=\"flex flex-wrap gap-1\"\n onChange={(surface) => {\n const option = SURFACES.find((candidate) => candidate.value === surface)\n if (option) props.onChange({ surface: option.value })\n }}\n >\n <For each={SURFACES}>\n {(option) => (\n <Radio.Item\n value={option.value}\n disabled={option.value === 'frosted' && !props.surfaceCapability.frosted}\n class=\"rounded-md focus-within:ring-3 focus-within:ring-ring/50\"\n >\n <Radio.ItemInput />\n <Radio.ItemLabel class=\"flex h-7 cursor-pointer items-center rounded-md border px-2 text-xs data-[checked]:border-primary data-[checked]:ring-1 data-[checked]:ring-primary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\">\n {option.label}\n </Radio.ItemLabel>\n </Radio.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MAAME,MAAMiD;EAAO;EAAA,IAC1B/C,WAAQ;GAAA,OAAEJ,MAAMK;EAAM;EACtBC,aAAW;EAAA,cAAA;EAAA,SAAA;EAGXC,WAAW4C,YAAY;GACrB,MAAM3C,SAASV,SAASW,MAAMC,cAAcA,UAAUf,UAAUwD,OAAO;GACvE,IAAI3C,QAAQR,MAAMO,SAAS,EAAE4C,SAAS3C,OAAOb,MAAM,CAAC;EACtD;EAAC,IAAAgB,WAAA;GAAA,OAAAV,gBAEAZ,KAAG;IAACuB,MAAMd;IAAQa,WACfH,WAAMP,gBACLb,WAAMyB,MAAI;KAAA,IACTlB,QAAK;MAAA,OAAEa,OAAOb;KAAK;KAAA,IACnBS,WAAQ;MAAA,OAAEmB,WAAAf,OAAOb,UAAU,SAAS,CAAA,CAAA,KAAI,CAACK,MAAMoD,kBAAkBC;KAAO;KAAA,SAAA;KAAA,IAAA1C,WAAA;MAAA,OAAA,CAAAV,gBAGvEb,WAAM2B,WAAS,CAAA,CAAA,GAAAd,gBACfb,WAAM4B,WAAS;OAAA,SAAA;OAAA,IAAAL,WAAA;QAAA,OACbH,OAAOZ;OAAK;MAAA,CAAA,CAAA;KAAA;IAAA,CAAA;GAGlB,CAAA;EAAA;CAAA,CAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAIvF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kCAmJ5D;AAED;;6DAE6D;AAC7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,kCAyB9D"}
1
+ {"version":3,"file":"appearance-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAIvF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,kCA+J5D;AAED;;6DAE6D;AAC7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,kCAyB9D"}
@@ -4,7 +4,7 @@ import { Input } from "../../ui/input/input.js";
4
4
  import { Popover, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from "../../ui/popover/popover.js";
5
5
  import { Switch } from "../../ui/switch/switch.js";
6
6
  import { AccentChoices, GlassChoices, ModeChoices } from "./appearance-choices.js";
7
- import { SettingsRow, ThemeRow } from "./appearance-rows.js";
7
+ import { SettingsRow, TerminalRow, ThemeRow } from "./appearance-rows.js";
8
8
  import { className, createComponent, effect, insert, memo, setAttribute, template } from "solid-js/web";
9
9
  import { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from "lucide-solid";
10
10
  import { Show, createUniqueId } from "solid-js";
@@ -77,6 +77,28 @@ function AppearanceEditor(props) {
77
77
  },
78
78
  onSelect: (darkThemeId) => props.onChange({ darkThemeId })
79
79
  }), null);
80
+ insert(_el$3, createComponent(Show, {
81
+ get when() {
82
+ return props.draft.terminalThemeId !== void 0;
83
+ },
84
+ get children() {
85
+ return createComponent(TerminalRow, {
86
+ get selectedId() {
87
+ return props.draft.terminalThemeId ?? "theme";
88
+ },
89
+ get preview() {
90
+ return memo(() => props.resolvedAppearance === "dark")() ? props.darkTheme : props.lightTheme;
91
+ },
92
+ get themes() {
93
+ return props.themes;
94
+ },
95
+ get disabled() {
96
+ return props.saving;
97
+ },
98
+ onSelect: (terminalThemeId) => props.onChange({ terminalThemeId })
99
+ });
100
+ }
101
+ }), null);
80
102
  insert(_el$3, createComponent(SettingsRow, {
81
103
  title: "Accent",
82
104
  get icon() {
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-editor.js","names":["EyeOff","Palette","PanelsTopLeft","SlidersHorizontal","Show","createUniqueId","cn","Button","Input","Switch","Popover","PopoverContent","PopoverDescription","PopoverTitle","PopoverTrigger","AppearanceEditorProps","AppearancePopoverProps","ModeChoices","AccentChoices","GlassChoices","SettingsRow","ThemeRow","AppearanceEditor","props","errorId","saveReasonId","custom","draft","accent","accentOptions","some","option","id","accentDescription","name","find","label","glassDescription","surface","surfaceCapability","themeDefaultDescription","_el$","_tmpl$6","_el$3","firstChild","_el$9","nextSibling","_el$0","_$insert","_$createComponent","when","recoveryNotice","children","_el$2","_tmpl$","appearance","selectedId","lightThemeId","preview","lightTheme","themes","disabled","saving","onSelect","onChange","darkThemeId","darkTheme","title","icon","description","_el$4","_tmpl$3","_el$5","_$setAttribute","value","aria-invalid","customAccentError","aria-describedby","undefined","onInput","event","currentTarget","_el$6","_tmpl$2","_$memo","frosted","reason","_el$7","_tmpl$4","checked","reduceTransparency","onManageThemes","type","size","variant","onClick","saveDisabledReason","_el$8","_tmpl$5","onReset","onCancel","aria-busy","onSave","_$effect","_$className","class","AppearancePopover","open","modal","onOpenChange","onOpen","onDismiss","as","_$createComponent","_$memo","_$className"],"sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Composition substantially translated from Zeron settings/appearance.rs and\n * settings/widgets.rs, pinned at 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59,\n * preserving Adea's existing appearance-surface.tsx port: System/Light/Dark\n * miniatures, compact independent theme rows, accent swatches and helper copy,\n * glass chips, and theme library affordance. Kobalte replaces the port's manual\n * radio keyboard model. The controlled draft and explicit action ports replace\n * GPUI globals and app-specific storage/native authority. Save/Cancel/Reset and\n * custom accent/reduced-transparency are accepted Adea divergences (#425).\n */\nimport { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from 'lucide-solid'\nimport { Show, createUniqueId } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button/button'\nimport { Input } from '../../ui/input/input'\n\nimport { Switch } from '../../ui/switch/switch'\nimport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverTitle,\n PopoverTrigger,\n} from '../../ui/popover/popover'\nimport type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'\nimport { ModeChoices, AccentChoices, GlassChoices } from './appearance-choices'\nimport { SettingsRow, ThemeRow } from './appearance-rows'\n\n/**\n * A live editor whose persistence and preview authority belong to its host.\n * No ThemeProvider is required, and no catalogue, renderer engine or storage is\n * imported. Hosts normalize unknown IDs and custom colors, report recovery,\n * snapshot on open, preview on changes, commit on Save, and restore on dismissal.\n * Both theme rows remain mounted when mode changes. Typeface/density axes are\n * deliberately absent from Adea #425's accepted surface.\n */\nexport function AppearanceEditor(props: AppearanceEditorProps) {\n const errorId = createUniqueId()\n const saveReasonId = createUniqueId()\n const custom = () =>\n props.draft.accent !== 'theme' &&\n !props.accentOptions.some((option) => option.id === props.draft.accent)\n const accentDescription = () => {\n if (props.draft.accent === 'theme') return \"Theme default · Uses the palette's intended color.\"\n const name = props.accentOptions.find((option) => option.id === props.draft.accent)?.label\n return `${name ?? 'Custom'} · Controls, glyphs, selections, code, and activity.`\n }\n const glassDescription = () =>\n props.draft.surface === 'opaque'\n ? 'Solid surfaces for every theme.'\n : props.draft.surface === 'frosted'\n ? 'Theme-colored glass where supported.'\n : (props.surfaceCapability.themeDefaultDescription ?? \"Uses this theme's default surface.\")\n return (\n <div data-appearance-editor class={cn('min-w-0', props.class)}>\n <Show when={props.recoveryNotice}>\n <p role=\"status\" class=\"px-4 py-2 text-sm text-muted-foreground\">\n {props.recoveryNotice}\n </p>\n </Show>\n <ModeChoices {...props} />\n <div class=\"divide-y divide-border rounded-lg border\">\n <ThemeRow\n appearance=\"light\"\n selectedId={props.draft.lightThemeId}\n preview={props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(lightThemeId) => props.onChange({ lightThemeId })}\n />\n <ThemeRow\n appearance=\"dark\"\n selectedId={props.draft.darkThemeId}\n preview={props.darkTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(darkThemeId) => props.onChange({ darkThemeId })}\n />\n <SettingsRow title=\"Accent\" icon={<SlidersHorizontal />} description={accentDescription()}>\n <AccentChoices {...props} />\n </SettingsRow>\n <Show when={custom()}>\n <div class=\"px-4 py-3\">\n <label class=\"mb-2 block text-xs font-medium\" for={`${errorId}-input`}>\n Custom accent\n </label>\n <Input\n id={`${errorId}-input`}\n value={props.draft.accent}\n disabled={props.saving}\n aria-invalid={!!props.customAccentError}\n aria-describedby={props.customAccentError ? errorId : undefined}\n onInput={(event) => props.onChange({ accent: event.currentTarget.value })}\n />\n <Show when={props.customAccentError}>\n <p id={errorId} role=\"alert\" class=\"mt-1 text-xs text-foreground\">\n {props.customAccentError}\n </p>\n </Show>\n </div>\n </Show>\n <SettingsRow title=\"Glass\" icon={<PanelsTopLeft />} description={glassDescription()}>\n <GlassChoices {...props} />\n </SettingsRow>\n <Show when={!props.surfaceCapability.frosted && props.surfaceCapability.reason}>\n <p role=\"status\" class=\"px-4 py-2 text-xs text-muted-foreground\">\n {props.surfaceCapability.reason}\n </p>\n </Show>\n <SettingsRow\n title=\"Reduce transparency\"\n icon={<EyeOff />}\n description=\"Prefer solid surfaces, including during live preview.\"\n >\n <Switch\n checked={props.draft.reduceTransparency}\n disabled={props.saving}\n onChange={(reduceTransparency: boolean) => props.onChange({ reduceTransparency })}\n aria-label=\"Reduce transparency\"\n />\n </SettingsRow>\n <SettingsRow\n title=\"Theme library\"\n icon={<Palette />}\n description={\n props.onManageThemes\n ? 'Manage themes through the application.'\n : 'Theme import is unavailable.'\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!props.onManageThemes || props.saving}\n onClick={() => props.onManageThemes?.()}\n >\n Manage themes\n </Button>\n </SettingsRow>\n </div>\n <Show when={props.saveDisabledReason}>\n <p id={saveReasonId} role=\"status\" class=\"px-4 pt-3 text-xs text-muted-foreground\">\n {props.saveDisabledReason}\n </p>\n </Show>\n {/* Sticky so Save/Cancel stay reachable in a tall scroll container: the\n editor scrolls with its host panel, and actions parked at the bottom\n of a long form were unreachable without scrolling past every row. */}\n <div class=\"sticky bottom-0 z-10 mt-2 flex flex-wrap items-center gap-2 border-t bg-background px-4 py-3\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n disabled={props.saving}\n onClick={() => props.onReset()}\n >\n Reset\n </Button>\n <div class=\"ml-auto flex gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={props.saving}\n onClick={() => props.onCancel()}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={props.saving || !!props.customAccentError || !!props.saveDisabledReason}\n aria-busy={props.saving}\n aria-describedby={props.saveDisabledReason ? saveReasonId : undefined}\n onClick={() => props.onSave()}\n >\n {props.saving ? 'Saving…' : 'Save'}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\n/** Modal anchoring/dismissal and nested-menu behavior come from Kobalte.\n * Its measured available height also bounds scrolling, keeping footer actions\n * reachable when a narrow popup begins below its trigger. */\nexport function AppearancePopover(props: AppearancePopoverProps) {\n return (\n <Popover\n open={props.open}\n modal\n onOpenChange={(open) => (open ? props.onOpen() : props.onDismiss())}\n >\n <PopoverTrigger\n as={Button}\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Appearance settings\"\n >\n <Palette />\n </PopoverTrigger>\n <PopoverContent class=\"w-lg max-w-[calc(100vw-2rem)] max-h-(--kb-popper-content-available-height) overflow-y-auto\">\n <PopoverTitle>Appearance</PopoverTitle>\n <PopoverDescription>\n Changes preview immediately. Save keeps them; Cancel restores the previous appearance.\n </PopoverDescription>\n <AppearanceEditor {...props} />\n </PopoverContent>\n </Popover>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,SAAgBsB,iBAAiBC,OAA8B;CAC7D,MAAMC,UAAUnB,eAAe;CAC/B,MAAMoB,eAAepB,eAAe;CACpC,MAAMqB,eACJH,MAAMI,MAAMC,WAAW,WACvB,CAACL,MAAMM,cAAcC,MAAMC,WAAWA,OAAOC,OAAOT,MAAMI,MAAMC,MAAM;CACxE,MAAMK,0BAA0B;EAC9B,IAAIV,MAAMI,MAAMC,WAAW,SAAS,OAAO;EAE3C,OAAO,GADML,MAAMM,cAAcM,MAAMJ,WAAWA,OAAOC,OAAOT,MAAMI,MAAMC,MAAM,CAAC,EAAEQ,SACnE,SAAQ;CAC5B;CACA,MAAMC,yBACJd,MAAMI,MAAMW,YAAY,WACpB,oCACAf,MAAMI,MAAMW,YAAY,YACtB,yCACCf,MAAMgB,kBAAkBC,2BAA2B;CAC5D,cAAA;EAAA,IAAAC,OAAAC,QAAA,GAAAC,QAAAF,KAAAG,YAAAC,QAAAF,MAAAG,aAAAC,QAAAF,MAAAD;EAAAI,OAAAP,MAAAQ,gBAEK7C,MAAI;GAAA,IAAC8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AAIzG;IACJqF,MAAI;IACJE,SAAO;IACPD,MAAI;IAAA,cAAA;IAAA,IAAAzC,WAAA;KAAA,OAAAH,gBAGHhD,SAAO,CAAA,CAAA;IAAA;GAAA,CAAA,GAAAgD,gBAETtC,gBAAc;IAAA,SAAA;IAAA,IAAAyC,WAAA;KAAA,OAAA;MAAAH,gBACZpC,cAAY,EAAAuC,UAAA,aAAA,CAAA;MAAAH,gBACZrC,oBAAkB,EAAAwC,UAAA,yFAAA,CAAA;MAAAH,gBAGlB3B,kBAAqBC,KAAK;KAAA;IAAA;GAAA,CAAA,CAAA;EAAA;CAAA,CAAA;AAInC"}
1
+ {"version":3,"file":"appearance-editor.js","names":["EyeOff","Palette","PanelsTopLeft","SlidersHorizontal","Show","createUniqueId","cn","Button","Input","Switch","Popover","PopoverContent","PopoverDescription","PopoverTitle","PopoverTrigger","AppearanceEditorProps","AppearancePopoverProps","ModeChoices","AccentChoices","GlassChoices","SettingsRow","TerminalRow","ThemeRow","AppearanceEditor","props","errorId","saveReasonId","custom","draft","accent","accentOptions","some","option","id","accentDescription","name","find","label","glassDescription","surface","surfaceCapability","themeDefaultDescription","_el$","_tmpl$6","_el$3","firstChild","_el$9","nextSibling","_el$0","_$insert","_$createComponent","when","recoveryNotice","children","_el$2","_tmpl$","appearance","selectedId","lightThemeId","preview","lightTheme","themes","disabled","saving","onSelect","onChange","darkThemeId","darkTheme","terminalThemeId","undefined","_$memo","resolvedAppearance","title","icon","description","_el$4","_tmpl$3","_el$5","_$setAttribute","value","aria-invalid","customAccentError","aria-describedby","onInput","event","currentTarget","_el$6","_tmpl$2","frosted","reason","_el$7","_tmpl$4","checked","reduceTransparency","onManageThemes","type","size","variant","onClick","saveDisabledReason","_el$8","_tmpl$5","onReset","onCancel","aria-busy","onSave","_$effect","_$className","class","AppearancePopover","open","modal","onOpenChange","onOpen","onDismiss","as","_$createComponent","_$memo","_$className"],"sources":["../../../../src/components/composites/appearance-editor/appearance-editor.tsx"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2026 Wing\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/*\n * Composition substantially translated from Zeron settings/appearance.rs and\n * settings/widgets.rs, pinned at 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59,\n * preserving Adea's existing appearance-surface.tsx port: System/Light/Dark\n * miniatures, compact independent theme rows, accent swatches and helper copy,\n * glass chips, and theme library affordance. Kobalte replaces the port's manual\n * radio keyboard model. The controlled draft and explicit action ports replace\n * GPUI globals and app-specific storage/native authority. Save/Cancel/Reset and\n * custom accent/reduced-transparency are accepted Adea divergences (#425).\n */\nimport { EyeOff, Palette, PanelsTopLeft, SlidersHorizontal } from 'lucide-solid'\nimport { Show, createUniqueId } from 'solid-js'\nimport { cn } from '#lib/utils'\nimport { Button } from '../../ui/button/button'\nimport { Input } from '../../ui/input/input'\n\nimport { Switch } from '../../ui/switch/switch'\nimport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverTitle,\n PopoverTrigger,\n} from '../../ui/popover/popover'\nimport type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'\nimport { ModeChoices, AccentChoices, GlassChoices } from './appearance-choices'\nimport { SettingsRow, TerminalRow, ThemeRow } from './appearance-rows'\n\n/**\n * A live editor whose persistence and preview authority belong to its host.\n * No ThemeProvider is required, and no catalogue, renderer engine or storage is\n * imported. Hosts normalize unknown IDs and custom colors, report recovery,\n * snapshot on open, preview on changes, commit on Save, and restore on dismissal.\n * Both theme rows remain mounted when mode changes. Typeface/density axes are\n * deliberately absent from Adea #425's accepted surface.\n */\nexport function AppearanceEditor(props: AppearanceEditorProps) {\n const errorId = createUniqueId()\n const saveReasonId = createUniqueId()\n const custom = () =>\n props.draft.accent !== 'theme' &&\n !props.accentOptions.some((option) => option.id === props.draft.accent)\n const accentDescription = () => {\n if (props.draft.accent === 'theme') return \"Theme default · Uses the palette's intended color.\"\n const name = props.accentOptions.find((option) => option.id === props.draft.accent)?.label\n return `${name ?? 'Custom'} · Controls, glyphs, selections, code, and activity.`\n }\n const glassDescription = () =>\n props.draft.surface === 'opaque'\n ? 'Solid surfaces for every theme.'\n : props.draft.surface === 'frosted'\n ? 'Theme-colored glass where supported.'\n : (props.surfaceCapability.themeDefaultDescription ?? \"Uses this theme's default surface.\")\n return (\n <div data-appearance-editor class={cn('min-w-0', props.class)}>\n <Show when={props.recoveryNotice}>\n <p role=\"status\" class=\"px-4 py-2 text-sm text-muted-foreground\">\n {props.recoveryNotice}\n </p>\n </Show>\n <ModeChoices {...props} />\n <div class=\"divide-y divide-border rounded-lg border\">\n <ThemeRow\n appearance=\"light\"\n selectedId={props.draft.lightThemeId}\n preview={props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(lightThemeId) => props.onChange({ lightThemeId })}\n />\n <ThemeRow\n appearance=\"dark\"\n selectedId={props.draft.darkThemeId}\n preview={props.darkTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(darkThemeId) => props.onChange({ darkThemeId })}\n />\n {/* The row exists only when the host carries a terminal preference:\n the draft field is the show/hide switch, so the editor can never\n render a terminal row that writes nothing. */}\n <Show when={props.draft.terminalThemeId !== undefined}>\n <TerminalRow\n selectedId={props.draft.terminalThemeId ?? 'theme'}\n preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}\n themes={props.themes}\n disabled={props.saving}\n onSelect={(terminalThemeId) => props.onChange({ terminalThemeId })}\n />\n </Show>\n <SettingsRow title=\"Accent\" icon={<SlidersHorizontal />} description={accentDescription()}>\n <AccentChoices {...props} />\n </SettingsRow>\n <Show when={custom()}>\n <div class=\"px-4 py-3\">\n <label class=\"mb-2 block text-xs font-medium\" for={`${errorId}-input`}>\n Custom accent\n </label>\n <Input\n id={`${errorId}-input`}\n value={props.draft.accent}\n disabled={props.saving}\n aria-invalid={!!props.customAccentError}\n aria-describedby={props.customAccentError ? errorId : undefined}\n onInput={(event) => props.onChange({ accent: event.currentTarget.value })}\n />\n <Show when={props.customAccentError}>\n <p id={errorId} role=\"alert\" class=\"mt-1 text-xs text-foreground\">\n {props.customAccentError}\n </p>\n </Show>\n </div>\n </Show>\n <SettingsRow title=\"Glass\" icon={<PanelsTopLeft />} description={glassDescription()}>\n <GlassChoices {...props} />\n </SettingsRow>\n <Show when={!props.surfaceCapability.frosted && props.surfaceCapability.reason}>\n <p role=\"status\" class=\"px-4 py-2 text-xs text-muted-foreground\">\n {props.surfaceCapability.reason}\n </p>\n </Show>\n <SettingsRow\n title=\"Reduce transparency\"\n icon={<EyeOff />}\n description=\"Prefer solid surfaces, including during live preview.\"\n >\n <Switch\n checked={props.draft.reduceTransparency}\n disabled={props.saving}\n onChange={(reduceTransparency: boolean) => props.onChange({ reduceTransparency })}\n aria-label=\"Reduce transparency\"\n />\n </SettingsRow>\n <SettingsRow\n title=\"Theme library\"\n icon={<Palette />}\n description={\n props.onManageThemes\n ? 'Manage themes through the application.'\n : 'Theme import is unavailable.'\n }\n >\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={!props.onManageThemes || props.saving}\n onClick={() => props.onManageThemes?.()}\n >\n Manage themes\n </Button>\n </SettingsRow>\n </div>\n <Show when={props.saveDisabledReason}>\n <p id={saveReasonId} role=\"status\" class=\"px-4 pt-3 text-xs text-muted-foreground\">\n {props.saveDisabledReason}\n </p>\n </Show>\n {/* Sticky so Save/Cancel stay reachable in a tall scroll container: the\n editor scrolls with its host panel, and actions parked at the bottom\n of a long form were unreachable without scrolling past every row. */}\n <div class=\"sticky bottom-0 z-10 mt-2 flex flex-wrap items-center gap-2 border-t bg-background px-4 py-3\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n disabled={props.saving}\n onClick={() => props.onReset()}\n >\n Reset\n </Button>\n <div class=\"ml-auto flex gap-2\">\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={props.saving}\n onClick={() => props.onCancel()}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n disabled={props.saving || !!props.customAccentError || !!props.saveDisabledReason}\n aria-busy={props.saving}\n aria-describedby={props.saveDisabledReason ? saveReasonId : undefined}\n onClick={() => props.onSave()}\n >\n {props.saving ? 'Saving…' : 'Save'}\n </Button>\n </div>\n </div>\n </div>\n )\n}\n\n/** Modal anchoring/dismissal and nested-menu behavior come from Kobalte.\n * Its measured available height also bounds scrolling, keeping footer actions\n * reachable when a narrow popup begins below its trigger. */\nexport function AppearancePopover(props: AppearancePopoverProps) {\n return (\n <Popover\n open={props.open}\n modal\n onOpenChange={(open) => (open ? props.onOpen() : props.onDismiss())}\n >\n <PopoverTrigger\n as={Button}\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label=\"Appearance settings\"\n >\n <Palette />\n </PopoverTrigger>\n <PopoverContent class=\"w-lg max-w-[calc(100vw-2rem)] max-h-(--kb-popper-content-available-height) overflow-y-auto\">\n <PopoverTitle>Appearance</PopoverTitle>\n <PopoverDescription>\n Changes preview immediately. Save keeps them; Cancel restores the previous appearance.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0F,UAAU;EAAE,IAAA7D,WAAA;GAAA,OAAA,CAAAH,gBAElEpC,gBAAc;IACbqG,IAAI5G;IACJwF,MAAI;IACJE,SAAO;IACPD,MAAI;IAAA,cAAA;IAAA,IAAA3C,WAAA;KAAA,OAAAH,gBAGHjD,SAAO,CAAA,CAAA;IAAA;GAAA,CAAA,GAAAiD,gBAETvC,gBAAc;IAAA,SAAA;IAAA,IAAA0C,WAAA;KAAA,OAAA;MAAAH,gBACZrC,cAAY,EAAAwC,UAAA,aAAA,CAAA;MAAAH,gBACZtC,oBAAkB,EAAAyC,UAAA,yFAAA,CAAA;MAAAH,gBAGlB3B,kBAAqBC,KAAK;KAAA;IAAA;GAAA,CAAA,CAAA;EAAA;CAAA,CAAA;AAInC"}
@@ -7,12 +7,15 @@ export declare function SettingsRow(props: {
7
7
  stacked?: boolean;
8
8
  children: JSX.Element;
9
9
  }): JSX.Element;
10
+ /** One selectable palette in a theme menu. */
11
+ export type ThemeOption = {
12
+ id: string;
13
+ name: string;
14
+ description?: string;
15
+ preview: AdeaTheme;
16
+ };
10
17
  /**
11
- * A compact persistent theme choice. Kobalte handles menu navigation and
12
- * dismissal; this row moves Tab to the adjacent browser-reported stop because
13
- * menus consume Tab by default. Enumerating elements and checking their native
14
- * tabIndex keeps details summaries in the order while preserving explicit
15
- * tabindex overrides.
18
+ * A compact persistent theme choice for one appearance.
16
19
  */
17
20
  export declare function ThemeRow(props: {
18
21
  appearance: 'light' | 'dark';
@@ -22,4 +25,18 @@ export declare function ThemeRow(props: {
22
25
  disabled?: boolean;
23
26
  onSelect: (id: string) => void;
24
27
  }): JSX.Element;
28
+ /**
29
+ * A terminal palette choice independent of the light/dark rows. The first
30
+ * option (`'theme'`) follows the interface theme, painted with the resolved
31
+ * preview; every catalogue record follows, both appearances, because the
32
+ * terminal paints one fixed ANSI palette rather than an appearance axis.
33
+ */
34
+ export declare function TerminalRow(props: {
35
+ selectedId: string;
36
+ /** Resolved interface theme: the `theme` option's palette and the fallback. */
37
+ preview: AdeaTheme;
38
+ themes: readonly AdeaThemeRecord[];
39
+ disabled?: boolean;
40
+ onSelect: (id: string) => void;
41
+ }): JSX.Element;
25
42
  //# sourceMappingURL=appearance-rows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"appearance-rows.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-rows.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAkD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AA2BnF,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,GAAG,CAAC,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB,eA4BA;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE;IAC9B,UAAU,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,SAAS,CAAA;IAClB,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,eA6NA"}
1
+ {"version":3,"file":"appearance-rows.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/appearance-editor/appearance-rows.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAkD,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AA2BnF,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,MAAM,C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