@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
@@ -5,8 +5,9 @@ import { For } from "solid-js";
5
5
  var _tmpl$ = /*#__PURE__*/ template(`<span class="h-[5px] rounded-[3px]">`);
6
6
  var _tmpl$2 = /*#__PURE__*/ template(`<span data-theme-miniature aria-hidden=true><span class="flex h-full w-11 shrink-0 flex-col gap-[7px] overflow-hidden px-2 pt-3.5"></span><span class="my-2 mr-2 flex min-w-0 flex-1 flex-col gap-[7px] overflow-hidden rounded-md border border-(--appearance-preview-border) p-2.5">`);
7
7
  var _tmpl$3 = /*#__PURE__*/ template(`<span aria-hidden=true><span class="h-full w-1/2 overflow-hidden"></span><span class="h-full w-1/2 overflow-hidden">`);
8
- var _tmpl$4 = /*#__PURE__*/ template(`<span aria-hidden=true>`);
9
- var _tmpl$5 = /*#__PURE__*/ template(`<span class="h-full w-1/3">`);
8
+ var _tmpl$4 = /*#__PURE__*/ template(`<span data-theme-menu-preview aria-hidden=true><span class="flex w-5 shrink-0 flex-col items-center gap-1.5 border-e border-(--appearance-preview-border) pt-2"><span class="size-1.5 rounded-[3px]"></span><span class="size-1.5 rounded-[3px]"></span><span class="size-1.5 rounded-[3px]"></span></span><span class="m-1 flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-(--appearance-preview-border) p-1.5"><span class="h-1.5 w-8 rounded-full"></span><span class="h-1 w-full rounded-full"></span><span class="h-1 w-3/4 rounded-full"></span><span class="mt-auto flex items-center gap-1"><span class="h-2.5 w-7 rounded-[3px]"></span><span class="h-2.5 w-4 rounded-[3px]"></span><span class="h-2.5 w-4 rounded-[3px]">`);
9
+ var _tmpl$5 = /*#__PURE__*/ template(`<span aria-hidden=true>`);
10
+ var _tmpl$6 = /*#__PURE__*/ template(`<span class="h-full w-1/3">`);
10
11
  function Bar(props) {
11
12
  return (() => {
12
13
  var _el$ = _tmpl$();
@@ -122,6 +123,54 @@ function ThemeMiniatureSplit(props) {
122
123
  return _el$5;
123
124
  })();
124
125
  }
126
+ /**
127
+ * The dropdown-item preview: the ThemePreview composition (rail + panel +
128
+ * text bars + action row) at menu scale, so a menu item carries the theme's
129
+ * actual chrome rather than the three-band trigger swatch. `aria-hidden` —
130
+ * the item's accessible name stays the theme name.
131
+ */
132
+ function ThemeMenuPreview(props) {
133
+ const colors = () => props.theme.colors;
134
+ return (() => {
135
+ var _el$8 = _tmpl$4(), _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$1.nextSibling, _el$11 = _el$9.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
136
+ effect((_p$) => {
137
+ var _v$8 = cn("flex h-16 w-28 shrink-0 overflow-hidden rounded-md border border-(--appearance-preview-border)", props.class), _v$9 = colors().surface, _v$0 = colors().border, _v$1 = colors().surfaceElevated, _v$10 = colors().accent, _v$11 = colors().surfaceActive, _v$12 = colors().surfaceActive, _v$13 = colors().background, _v$14 = colors().border, _v$15 = colors().text, _v$16 = colors().textMuted, _v$17 = colors().textMuted, _v$18 = colors().accent, _v$19 = colors().error, _v$20 = colors().surfaceActive;
138
+ _v$8 !== _p$.e && className(_el$8, _p$.e = _v$8);
139
+ _v$9 !== _p$.t && setStyleProperty(_el$8, "background-color", _p$.t = _v$9);
140
+ _v$0 !== _p$.a && setStyleProperty(_el$8, "--appearance-preview-border", _p$.a = _v$0);
141
+ _v$1 !== _p$.o && setStyleProperty(_el$9, "background-color", _p$.o = _v$1);
142
+ _v$10 !== _p$.i && setStyleProperty(_el$0, "background-color", _p$.i = _v$10);
143
+ _v$11 !== _p$.n && setStyleProperty(_el$1, "background-color", _p$.n = _v$11);
144
+ _v$12 !== _p$.s && setStyleProperty(_el$10, "background-color", _p$.s = _v$12);
145
+ _v$13 !== _p$.h && setStyleProperty(_el$11, "background-color", _p$.h = _v$13);
146
+ _v$14 !== _p$.r && setStyleProperty(_el$11, "--appearance-preview-border", _p$.r = _v$14);
147
+ _v$15 !== _p$.d && setStyleProperty(_el$12, "background-color", _p$.d = _v$15);
148
+ _v$16 !== _p$.l && setStyleProperty(_el$13, "background-color", _p$.l = _v$16);
149
+ _v$17 !== _p$.u && setStyleProperty(_el$14, "background-color", _p$.u = _v$17);
150
+ _v$18 !== _p$.c && setStyleProperty(_el$16, "background-color", _p$.c = _v$18);
151
+ _v$19 !== _p$.w && setStyleProperty(_el$17, "background-color", _p$.w = _v$19);
152
+ _v$20 !== _p$.m && setStyleProperty(_el$18, "background-color", _p$.m = _v$20);
153
+ return _p$;
154
+ }, {
155
+ e: void 0,
156
+ t: void 0,
157
+ a: void 0,
158
+ o: void 0,
159
+ i: void 0,
160
+ n: void 0,
161
+ s: void 0,
162
+ h: void 0,
163
+ r: void 0,
164
+ d: void 0,
165
+ l: void 0,
166
+ u: void 0,
167
+ c: void 0,
168
+ w: void 0,
169
+ m: void 0
170
+ });
171
+ return _el$8;
172
+ })();
173
+ }
125
174
  function PalettePreview(props) {
126
175
  const bands = () => [
127
176
  props.theme.colors.surface,
@@ -129,30 +178,30 @@ function PalettePreview(props) {
129
178
  props.theme.colors.accent
130
179
  ];
131
180
  return (() => {
132
- var _el$8 = _tmpl$4();
133
- insert(_el$8, createComponent(For, {
181
+ var _el$19 = _tmpl$5();
182
+ insert(_el$19, createComponent(For, {
134
183
  get each() {
135
184
  return bands();
136
185
  },
137
186
  children: (band) => (() => {
138
- var _el$9 = _tmpl$5();
139
- setStyleProperty(_el$9, "background-color", band);
140
- return _el$9;
187
+ var _el$20 = _tmpl$6();
188
+ setStyleProperty(_el$20, "background-color", band);
189
+ return _el$20;
141
190
  })()
142
191
  }));
143
192
  effect((_p$) => {
144
- var _v$8 = cn("flex h-[18px] w-[30px] shrink-0 overflow-hidden rounded-[5px] border border-(--appearance-preview-border)", props.class), _v$9 = props.theme.colors.border;
145
- _v$8 !== _p$.e && className(_el$8, _p$.e = _v$8);
146
- _v$9 !== _p$.t && setStyleProperty(_el$8, "--appearance-preview-border", _p$.t = _v$9);
193
+ var _v$21 = cn("flex h-[18px] w-[30px] shrink-0 overflow-hidden rounded-[5px] border border-(--appearance-preview-border)", props.class), _v$22 = props.theme.colors.border;
194
+ _v$21 !== _p$.e && className(_el$19, _p$.e = _v$21);
195
+ _v$22 !== _p$.t && setStyleProperty(_el$19, "--appearance-preview-border", _p$.t = _v$22);
147
196
  return _p$;
148
197
  }, {
149
198
  e: void 0,
150
199
  t: void 0
151
200
  });
152
- return _el$8;
201
+ return _el$19;
153
202
  })();
154
203
  }
155
204
  //#endregion
156
- export { PalettePreview, ThemeMiniature, ThemeMiniatureSplit };
205
+ export { PalettePreview, ThemeMenuPreview, ThemeMiniature, ThemeMiniatureSplit };
157
206
 
158
207
  //# sourceMappingURL=theme-preview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-preview.js","names":["AdeaTheme","For","cn","ThemeMiniatureProps","theme","corners","class","Bar","props","fraction","opacity","color","_el$","_tmpl$","_$effect","_p$","_v$","Math","round","_v$2","_v$3","e","_$setStyleProperty","t","a","undefined","ThemeMiniature","_el$2","_tmpl$2","_el$3","firstChild","_el$4","nextSibling","_$insert","_$createComponent","colors","foreground","_v$4","_v$5","surface","_v$6","background","_v$7","border","_$className","o","ThemeMiniatureSplit","light","dark","_el$5","_tmpl$3","_el$6","_el$7","PalettePreview","bands","accent","_el$8","_tmpl$4","each","children","band","_el$9","_tmpl$5","_v$8","_v$9","_$setStyleProperty","_$createComponent","_$className"],"sources":["../../../../src/components/composites/appearance-editor/theme-preview.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 * Substantially translated from Zeron crates/ui/src/settings/appearance.rs\n * `bar`, `miniature`, `miniature_split`, and `palette_preview`, revision\n * 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59, via Adea's existing\n * packages/ui/src/components/theme-preview.tsx adaptation.\n * Retains the sidebar/pane decomposition, exact bar fractions and opacity,\n * split outer corners, and three-band palette strip. GPUI and Adea's local\n * ThemeVariant are replaced by Solid and the canonical AdeaTheme schema.\n * Dynamic inline colors are theme data; no palette is authored here.\n */\nimport type { AdeaTheme } from '@adea-ai/themes'\nimport { For } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type ThemeMiniatureProps = {\n theme: AdeaTheme\n corners?: 'all' | 'left' | 'right'\n class?: string\n}\n\nfunction Bar(props: { fraction: number; opacity: number; color: string }) {\n return (\n <span\n class=\"h-[5px] rounded-[3px]\"\n style={{\n width: `${Math.round(props.fraction * 100)}%`,\n 'background-color': props.color,\n opacity: props.opacity,\n }}\n />\n )\n}\n\nexport function ThemeMiniature(props: ThemeMiniatureProps) {\n return (\n <span\n data-theme-miniature\n aria-hidden=\"true\"\n class={cn(\n 'flex size-full overflow-hidden',\n {\n 'rounded-md': !props.corners || props.corners === 'all',\n 'rounded-l-md': props.corners === 'left',\n 'rounded-r-md': props.corners === 'right',\n },\n props.class\n )}\n style={{ 'background-color': props.theme.colors.surface }}\n >\n <span class=\"flex h-full w-11 shrink-0 flex-col gap-[7px] overflow-hidden px-2 pt-3.5\">\n <Bar fraction={0.7} opacity={0.34} color={props.theme.colors.foreground} />\n <Bar fraction={1} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={0.85} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={1} opacity={0.22} color={props.theme.colors.foreground} />\n </span>\n <span\n class=\"my-2 mr-2 flex min-w-0 flex-1 flex-col gap-[7px] overflow-hidden rounded-md border border-(--appearance-preview-border) p-2.5\"\n style={{\n 'background-color': props.theme.colors.background,\n '--appearance-preview-border': props.theme.colors.border,\n }}\n >\n <Bar fraction={0.62} opacity={0.34} color={props.theme.colors.foreground} />\n <Bar fraction={0.88} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={0.76} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={0.52} opacity={0.22} color={props.theme.colors.foreground} />\n </span>\n </span>\n )\n}\n\nexport function ThemeMiniatureSplit(props: { light: AdeaTheme; dark: AdeaTheme; class?: string }) {\n return (\n <span class={cn('flex size-full', props.class)} aria-hidden=\"true\">\n <span class=\"h-full w-1/2 overflow-hidden\">\n <ThemeMiniature theme={props.light} corners=\"left\" />\n </span>\n <span class=\"h-full w-1/2 overflow-hidden\">\n <ThemeMiniature theme={props.dark} corners=\"right\" />\n </span>\n </span>\n )\n}\n\nexport function PalettePreview(props: { theme: AdeaTheme; class?: string }) {\n const bands = () => [\n props.theme.colors.surface,\n props.theme.colors.background,\n props.theme.colors.accent,\n ]\n return (\n <span\n class={cn(\n 'flex h-[18px] w-[30px] shrink-0 overflow-hidden rounded-[5px] border border-(--appearance-preview-border)',\n props.class\n )}\n aria-hidden=\"true\"\n style={{ '--appearance-preview-border': props.theme.colors.border }}\n >\n <For each={bands()}>\n {(band) => <span class=\"h-full w-1/3\" style={{ 'background-color': band }} />}\n </For>\n </span>\n )\n}\n"],"mappings":";;;;;;;;;AA2CA,SAASO,IAAIC,OAA6D;CACxE,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAAC,QAAAC,QAAA;GAAA,IAAAC,MAIa,GAAGC,KAAKC,MAAMV,MAAMC,WAAW,GAAG,EAAC,IAAGU,OACzBX,MAAMG,OAAKS,OACtBZ,MAAME;GAAOM,QAAAD,IAAAM,KAAAC,iBAAAV,MAAA,SAAAG,IAAAM,IAAAL,GAAA;GAAAG,SAAAJ,IAAAQ,KAAAD,iBAAAV,MAAA,oBAAAG,IAAAQ,IAAAJ,IAAA;GAAAC,SAAAL,IAAAS,KAAAF,iBAAAV,MAAA,WAAAG,IAAAS,IAAAJ,IAAA;GAAA,OAAAL;EAAA,GAAA;GAAAM,GAAAI,KAAAA;GAAAF,GAAAE,KAAAA;GAAAD,GAAAC,KAAAA;EAAA,CAAA;EAAA,OAAAb;CAAA,EAAA,CAAA;AAI9B;AAEA,SAAgBc,eAAelB,OAA4B;CACzD,cAAA;EAAA,IAAAmB,QAAAC,QAAA,GAAAC,QAAAF,MAAAG,YAAAC,QAAAF,MAAAG;EAAAC,OAAAJ,OAAAK,gBAgBO3B,KAAG;GAACE,UAAU;GAAKC,SAAS;GAAI,IAAEC,QAAK;IAAA,OAAEH,MAAMJ,MAAM+B,OAAOC;GAAU;EAAA,CAAA,GAAA,IAAA;EAAAH,OAAAJ,OAAAK,gBACtE3B,KAAG;GAACE,UAAU;GAAGC,SAAS;GAAI,IAAEC,QAAK;IAAA,OAAEH,MAAMJ,MAAM+B,OAAOC;GAAU;EAAA,CAAA,GAAA,IAAA;EAAA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;IAAAxC,iBAAAuC,OAAA,oBAA6DD,IAAI;IAAA,OAAAC;GAAA,EAAA,CAAA;EAAM,CAAA,CAAA;EAAA/C,QAAAC,QAAA;GAAA,IAAAgD,OARxE7D,GACL,6GACAM,MAAMF,KACR,GAAC0D,OAEuCxD,MAAMJ,MAAM+B,OAAOQ;GAAMoB,SAAAhD,IAAAM,KAAAuB,UAAAY,OAAAzC,IAAAM,IAAA0C,IAAA;GAAAC,SAAAjD,IAAAQ,KAAAD,iBAAAkC,OAAA,+BAAAzC,IAAAQ,IAAAyC,IAAA;GAAA,OAAAjD;EAAA,GAAA;GAAAM,GAAAI,KAAAA;GAAAF,GAAAE,KAAAA;EAAA,CAAA;EAAA,OAAA+B;CAAA,EAAA,CAAA;AAOvE"}
1
+ {"version":3,"file":"theme-preview.js","names":["AdeaTheme","For","cn","ThemeMiniatureProps","theme","corners","class","Bar","props","fraction","opacity","color","_el$","_tmpl$","_$effect","_p$","_v$","Math","round","_v$2","_v$3","e","_$setStyleProperty","t","a","undefined","ThemeMiniature","_el$2","_tmpl$2","_el$3","firstChild","_el$4","nextSibling","_$insert","_$createComponent","colors","foreground","_v$4","_v$5","surface","_v$6","background","_v$7","border","_$className","o","ThemeMiniatureSplit","light","dark","_el$5","_tmpl$3","_el$6","_el$7","ThemeMenuPreview","_el$8","_tmpl$4","_el$9","_el$0","_el$1","_el$10","_el$11","_el$12","_el$13","_el$14","_el$15","_el$16","_el$17","_el$18","_v$8","_v$9","_v$0","_v$1","surfaceElevated","_v$10","accent","_v$11","surfaceActive","_v$12","_v$13","_v$14","_v$15","text","_v$16","textMuted","_v$17","_v$18","_v$19","error","_v$20","i","n","s","h","r","d","l","u","c","w","m","PalettePreview","bands","_el$19","_tmpl$5","each","children","band","_el$20","_tmpl$6","_v$21","_v$22","_$setStyleProperty","_$createComponent","_$className"],"sources":["../../../../src/components/composites/appearance-editor/theme-preview.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 * Substantially translated from Zeron crates/ui/src/settings/appearance.rs\n * `bar`, `miniature`, `miniature_split`, and `palette_preview`, revision\n * 30a9a9537c5ec96226c87f4bf349b6f77c5dfb59, via Adea's existing\n * packages/ui/src/components/theme-preview.tsx adaptation.\n * Retains the sidebar/pane decomposition, exact bar fractions and opacity,\n * split outer corners, and three-band palette strip. GPUI and Adea's local\n * ThemeVariant are replaced by Solid and the canonical AdeaTheme schema.\n * Dynamic inline colors are theme data; no palette is authored here.\n */\nimport type { AdeaTheme } from '@adea-ai/themes'\nimport { For } from 'solid-js'\nimport { cn } from '#lib/utils'\n\nexport type ThemeMiniatureProps = {\n theme: AdeaTheme\n corners?: 'all' | 'left' | 'right'\n class?: string\n}\n\nfunction Bar(props: { fraction: number; opacity: number; color: string }) {\n return (\n <span\n class=\"h-[5px] rounded-[3px]\"\n style={{\n width: `${Math.round(props.fraction * 100)}%`,\n 'background-color': props.color,\n opacity: props.opacity,\n }}\n />\n )\n}\n\nexport function ThemeMiniature(props: ThemeMiniatureProps) {\n return (\n <span\n data-theme-miniature\n aria-hidden=\"true\"\n class={cn(\n 'flex size-full overflow-hidden',\n {\n 'rounded-md': !props.corners || props.corners === 'all',\n 'rounded-l-md': props.corners === 'left',\n 'rounded-r-md': props.corners === 'right',\n },\n props.class\n )}\n style={{ 'background-color': props.theme.colors.surface }}\n >\n <span class=\"flex h-full w-11 shrink-0 flex-col gap-[7px] overflow-hidden px-2 pt-3.5\">\n <Bar fraction={0.7} opacity={0.34} color={props.theme.colors.foreground} />\n <Bar fraction={1} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={0.85} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={1} opacity={0.22} color={props.theme.colors.foreground} />\n </span>\n <span\n class=\"my-2 mr-2 flex min-w-0 flex-1 flex-col gap-[7px] overflow-hidden rounded-md border border-(--appearance-preview-border) p-2.5\"\n style={{\n 'background-color': props.theme.colors.background,\n '--appearance-preview-border': props.theme.colors.border,\n }}\n >\n <Bar fraction={0.62} opacity={0.34} color={props.theme.colors.foreground} />\n <Bar fraction={0.88} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={0.76} opacity={0.22} color={props.theme.colors.foreground} />\n <Bar fraction={0.52} opacity={0.22} color={props.theme.colors.foreground} />\n </span>\n </span>\n )\n}\n\nexport function ThemeMiniatureSplit(props: { light: AdeaTheme; dark: AdeaTheme; class?: string }) {\n return (\n <span class={cn('flex size-full', props.class)} aria-hidden=\"true\">\n <span class=\"h-full w-1/2 overflow-hidden\">\n <ThemeMiniature theme={props.light} corners=\"left\" />\n </span>\n <span class=\"h-full w-1/2 overflow-hidden\">\n <ThemeMiniature theme={props.dark} corners=\"right\" />\n </span>\n </span>\n )\n}\n\n/**\n * The dropdown-item preview: the ThemePreview composition (rail + panel +\n * text bars + action row) at menu scale, so a menu item carries the theme's\n * actual chrome rather than the three-band trigger swatch. `aria-hidden` —\n * the item's accessible name stays the theme name.\n */\nexport function ThemeMenuPreview(props: { theme: AdeaTheme; class?: string }) {\n const colors = () => props.theme.colors\n return (\n <span\n data-theme-menu-preview\n aria-hidden=\"true\"\n class={cn(\n 'flex h-16 w-28 shrink-0 overflow-hidden rounded-md border border-(--appearance-preview-border)',\n props.class\n )}\n style={{\n 'background-color': colors().surface,\n '--appearance-preview-border': colors().border,\n }}\n >\n <span\n class=\"flex w-5 shrink-0 flex-col items-center gap-1.5 border-e border-(--appearance-preview-border) pt-2\"\n style={{ 'background-color': colors().surfaceElevated }}\n >\n <span class=\"size-1.5 rounded-[3px]\" style={{ 'background-color': colors().accent }} />\n <span\n class=\"size-1.5 rounded-[3px]\"\n style={{ 'background-color': colors().surfaceActive }}\n />\n <span\n class=\"size-1.5 rounded-[3px]\"\n style={{ 'background-color': colors().surfaceActive }}\n />\n </span>\n <span\n class=\"m-1 flex min-w-0 flex-1 flex-col gap-1 rounded-md border border-(--appearance-preview-border) p-1.5\"\n style={{\n 'background-color': colors().background,\n '--appearance-preview-border': colors().border,\n }}\n >\n <span class=\"h-1.5 w-8 rounded-full\" style={{ 'background-color': colors().text }} />\n <span class=\"h-1 w-full rounded-full\" style={{ 'background-color': colors().textMuted }} />\n <span class=\"h-1 w-3/4 rounded-full\" style={{ 'background-color': colors().textMuted }} />\n <span class=\"mt-auto flex items-center gap-1\">\n <span class=\"h-2.5 w-7 rounded-[3px]\" style={{ 'background-color': colors().accent }} />\n <span class=\"h-2.5 w-4 rounded-[3px]\" style={{ 'background-color': colors().error }} />\n <span\n class=\"h-2.5 w-4 rounded-[3px]\"\n style={{ 'background-color': colors().surfaceActive }}\n />\n </span>\n </span>\n </span>\n )\n}\n\nexport function PalettePreview(props: { theme: AdeaTheme; class?: string }) {\n const bands = () => [\n props.theme.colors.surface,\n props.theme.colors.background,\n props.theme.colors.accent,\n ]\n return (\n <span\n class={cn(\n 'flex h-[18px] w-[30px] shrink-0 overflow-hidden rounded-[5px] border border-(--appearance-preview-border)',\n props.class\n )}\n aria-hidden=\"true\"\n style={{ '--appearance-preview-border': props.theme.colors.border }}\n >\n <For each={bands()}>\n {(band) => <span class=\"h-full w-1/3\" style={{ 'background-color': band }} />}\n </For>\n </span>\n )\n}\n"],"mappings":";;;;;;;;;;AA2CA,SAASO,IAAIC,OAA6D;CACxE,cAAA;EAAA,IAAAI,OAAAC,OAAA;EAAAC,QAAAC,QAAA;GAAA,IAAAC,MAIa,GAAGC,KAAKC,MAAMV,MAAMC,WAAW,GAAG,EAAC,IAAGU,OACzBX,MAAMG,OAAKS,OACtBZ,MAAME;GAAOM,QAAAD,IAAAM,KAAAC,iBAAAV,MAAA,SAAAG,IAAAM,IAAAL,GAAA;GAAAG,SAAAJ,IAAAQ,KAAAD,iBAAAV,MAAA,oBAAAG,IAAAQ,IAAAJ,IAAA;GAAAC,SAAAL,IAAAS,KAAAF,iBAAAV,MAAA,WAAAG,IAAAS,IAAAJ,IAAA;GAAA,OAAAL;EAAA,GAAA;GAAAM,GAAAI,KAAAA;GAAAF,GAAAE,KAAAA;GAAAD,GAAAC,KAAAA;EAAA,CAAA;EAAA,OAAAb;CAAA,EAAA,CAAA;AAI9B;AAEA,SAAgBc,eAAelB,OAA4B;CACzD,cAAA;EAAA,IAAAmB,QAAAC,QAAA,GAAAC,QAAAF,MAAAG,YAAAC,QAAAF,MAAAG;EAAAC,OAAAJ,OAAAK,gBAgBO3B,KAAG;GAACE,UAAU;GAAKC,SAAS;GAAI,IAAEC,QAAK;IAAA,OAAEH,MAAMJ,MAAM+B,OAAOC;GAAU;EAAA,CAAA,GAAA,IAAA;EAAAH,OAAAJ,OAAAK,gBACtE3B,KAAG;GAACE,UAAU;GAAGC,SAAS;GAAI,IAAEC,QAAK;IAAA,OAAEH,MAAMJ,MAAM+B,OAAOC;GAAU;EAAA,CAAA,GAAA,IAAA;EAAAH,OAAAJ,OAAAK,gBACpE3B,KAAG;GAACE,UAAU;GAAMC,SAAS;GAAI,IAAEC,QAAK;IAAA,OAAEH,MAAMJ,MAAM+B,O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AAqF,QAAA,oBAA6DD,IAAI;IAAA,OAAAC;GAAA,EAAA,CAAA;EAAM,CAAA,CAAA;EAAA7F,QAAAC,QAAA;GAAA,IAAA8F,QARxE3G,GACL,6GACAM,MAAMF,KACR,GAACwG,QAEuCtG,MAAMJ,MAAM+B,OAAOQ;GAAMkE,UAAA9F,IAAAM,KAAAuB,UAAA0D,QAAAvF,IAAAM,IAAAwF,KAAA;GAAAC,UAAA/F,IAAAQ,KAAAD,iBAAAgF,QAAA,+BAAAvF,IAAAQ,IAAAuF,KAAA;GAAA,OAAA/F;EAAA,GAAA;GAAAM,GAAAI,KAAAA;GAAAF,GAAAE,KAAAA;EAAA,CAAA;EAAA,OAAA6E;CAAA,EAAA,CAAA;AAOvE"}
@@ -117,7 +117,11 @@ export function AboutDialog(props: AboutDialogProps) {
117
117
  <div class="flex flex-col items-center gap-3 px-6 py-8 text-center">
118
118
  <img src={props.appIcon} alt="" class="size-16" aria-hidden="true" />
119
119
  <DialogTitle>{props.appName}</DialogTitle>
120
- <p class="text-sm text-primary">{versionLabel()}</p>
120
+ {/* Body text on the dialog's themed surface: primary ink measures
121
+ below AA against the lighter dialog backgrounds across schemes,
122
+ so the version and the source link carry foreground ink and keep
123
+ primary as the link's underline accent (the text-link treatment). */}
124
+ <p class="text-sm text-foreground">{versionLabel()}</p>
121
125
  <p class="text-xs text-muted-foreground">{props.copyright}</p>
122
126
  <div class="flex flex-wrap items-center justify-center gap-3">
123
127
  <ActionButton
@@ -134,6 +138,7 @@ export function AboutDialog(props: AboutDialogProps) {
134
138
  as="a"
135
139
  variant="link"
136
140
  size="sm"
141
+ class="text-foreground decoration-primary"
137
142
  href={props.sourceUrl}
138
143
  target="_blank"
139
144
  rel="noopener noreferrer"
@@ -93,20 +93,31 @@ export function AccentChoices(props: AppearanceEditorProps) {
93
93
  disabled={props.saving}
94
94
  orientation="horizontal"
95
95
  aria-label="Accent"
96
- class="flex flex-wrap items-center gap-2"
96
+ // Two chips in a column beside a 3x2 swatch grid: one line of six
97
+ // swatches plus chips overflows the settings sidebar's control column,
98
+ // and the column keeps both rows of the pair balanced (2 x 28px + gap).
99
+ class="flex items-center gap-3"
97
100
  onChange={(accent) =>
98
101
  props.onChange({
99
102
  accent: accent === 'custom' ? (props.customAccentValue ?? '') : accent,
100
103
  })
101
104
  }
102
105
  >
103
- <Radio.Item value="theme">
104
- <Radio.ItemInput />
105
- <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">
106
- Theme default
107
- </Radio.ItemLabel>
108
- </Radio.Item>
109
- <div class="flex max-w-full flex-wrap gap-2">
106
+ <div class="flex flex-col gap-2">
107
+ <Radio.Item value="theme">
108
+ <Radio.ItemInput />
109
+ <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">
110
+ Theme default
111
+ </Radio.ItemLabel>
112
+ </Radio.Item>
113
+ <Radio.Item value="custom">
114
+ <Radio.ItemInput />
115
+ <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">
116
+ Custom
117
+ </Radio.ItemLabel>
118
+ </Radio.Item>
119
+ </div>
120
+ <div class="grid grid-cols-3 gap-2">
110
121
  <For each={props.accentOptions}>
111
122
  {(option) => (
112
123
  <Radio.Item
@@ -133,12 +144,6 @@ export function AccentChoices(props: AppearanceEditorProps) {
133
144
  )}
134
145
  </For>
135
146
  </div>
136
- <Radio.Item value="custom">
137
- <Radio.ItemInput />
138
- <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">
139
- Custom
140
- </Radio.ItemLabel>
141
- </Radio.Item>
142
147
  </Radio>
143
148
  )
144
149
  }
@@ -47,7 +47,7 @@ import {
47
47
  } from '../../ui/popover/popover'
48
48
  import type { AppearanceEditorProps, AppearancePopoverProps } from './appearance-types'
49
49
  import { ModeChoices, AccentChoices, GlassChoices } from './appearance-choices'
50
- import { SettingsRow, ThemeRow } from './appearance-rows'
50
+ import { SettingsRow, TerminalRow, ThemeRow } from './appearance-rows'
51
51
 
52
52
  /**
53
53
  * A live editor whose persistence and preview authority belong to its host.
@@ -99,6 +99,18 @@ export function AppearanceEditor(props: AppearanceEditorProps) {
99
99
  disabled={props.saving}
100
100
  onSelect={(darkThemeId) => props.onChange({ darkThemeId })}
101
101
  />
102
+ {/* The row exists only when the host carries a terminal preference:
103
+ the draft field is the show/hide switch, so the editor can never
104
+ render a terminal row that writes nothing. */}
105
+ <Show when={props.draft.terminalThemeId !== undefined}>
106
+ <TerminalRow
107
+ selectedId={props.draft.terminalThemeId ?? 'theme'}
108
+ preview={props.resolvedAppearance === 'dark' ? props.darkTheme : props.lightTheme}
109
+ themes={props.themes}
110
+ disabled={props.saving}
111
+ onSelect={(terminalThemeId) => props.onChange({ terminalThemeId })}
112
+ />
113
+ </Show>
102
114
  <SettingsRow title="Accent" icon={<SlidersHorizontal />} description={accentDescription()}>
103
115
  <AccentChoices {...props} />
104
116
  </SettingsRow>