@burdenoff/fe-libs 2026.1119.5 → 2026.1119.6

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 (69) hide show
  1. package/dist/chrome/HeaderThemeSwitcher.js +1 -1
  2. package/dist/chrome/ThemePreferences.js +16 -16
  3. package/dist/chrome/appearance/AppearanceColourSection.d.ts +17 -0
  4. package/dist/chrome/appearance/AppearanceColourSection.js +337 -0
  5. package/dist/chrome/appearance/AppearanceDisplaySection.d.ts +7 -0
  6. package/dist/chrome/appearance/AppearanceDisplaySection.js +137 -0
  7. package/dist/chrome/appearance/AppearanceModeDepth.d.ts +11 -0
  8. package/dist/chrome/appearance/AppearanceModeDepth.js +158 -0
  9. package/dist/chrome/appearance/AppearancePreferences.d.ts +13 -0
  10. package/dist/chrome/appearance/AppearancePreferences.js +308 -0
  11. package/dist/chrome/appearance/AppearancePreview.d.ts +23 -0
  12. package/dist/chrome/appearance/AppearancePreview.js +218 -0
  13. package/dist/chrome/appearance/AppearanceThemeSection.d.ts +14 -0
  14. package/dist/chrome/appearance/AppearanceThemeSection.js +162 -0
  15. package/dist/chrome/appearance/ColourPanel.d.ts +37 -0
  16. package/dist/chrome/appearance/ColourPanel.js +264 -0
  17. package/dist/chrome/appearance/ThemeDialog.d.ts +21 -0
  18. package/dist/chrome/appearance/ThemeDialog.js +378 -0
  19. package/dist/chrome/appearance/appearanceShared.d.ts +24 -0
  20. package/dist/chrome/appearance/appearanceShared.js +46 -0
  21. package/dist/chrome/appearance/appearanceUi.d.ts +49 -0
  22. package/dist/chrome/appearance/appearanceUi.js +98 -0
  23. package/dist/chrome/appearance/useAppearanceLabels.d.ts +181 -0
  24. package/dist/chrome/appearance/useAppearanceLabels.js +259 -0
  25. package/dist/chrome/index.d.ts +1 -0
  26. package/dist/chrome/shell/ShellSidebar.js +2 -0
  27. package/dist/chrome/shellLabelManifest.d.ts +6 -0
  28. package/dist/chrome.js +26 -25
  29. package/dist/platform-pages/AppearanceSettingsPage.d.ts +11 -1
  30. package/dist/platform-pages/AppearanceSettingsPage.js +15 -8
  31. package/dist/shared/assistant/ui/composer/AssistantComposer.js +346 -345
  32. package/dist/shared/backgrounds/useBackgroundColors.js +3 -2
  33. package/dist/shared/providers/AppShellProvider.d.ts +20 -1
  34. package/dist/shared/providers/AppShellProvider.js +230 -222
  35. package/dist/shared/providers/shell/PaletteThemeProvider.d.ts +13 -0
  36. package/dist/shared/providers/shell/PaletteThemeProvider.js +366 -0
  37. package/dist/shared/providers/shell/ThemeProvider.d.ts +9 -76
  38. package/dist/shared/providers/shell/ThemeProvider.js +63 -55
  39. package/dist/shared/providers/shell/appearance/colour.d.ts +29 -0
  40. package/dist/shared/providers/shell/appearance/colour.js +79 -0
  41. package/dist/shared/providers/shell/appearance/contrastFix.d.ts +70 -0
  42. package/dist/shared/providers/shell/appearance/contrastFix.js +117 -0
  43. package/dist/shared/providers/shell/appearance/index.d.ts +9 -0
  44. package/dist/shared/providers/shell/appearance/model.d.ts +68 -0
  45. package/dist/shared/providers/shell/appearance/model.js +92 -0
  46. package/dist/shared/providers/shell/appearance/operations.d.ts +70 -0
  47. package/dist/shared/providers/shell/appearance/operations.js +160 -0
  48. package/dist/shared/providers/shell/appearance/palettes.d.ts +111 -0
  49. package/dist/shared/providers/shell/appearance/palettes.js +460 -0
  50. package/dist/shared/providers/shell/appearance/storage.d.ts +39 -0
  51. package/dist/shared/providers/shell/appearance/storage.js +186 -0
  52. package/dist/shared/providers/shell/appearance/tokens.d.ts +5 -0
  53. package/dist/shared/providers/shell/appearance/tokens.js +43 -0
  54. package/dist/shared/providers/shell/appearance/types.d.ts +80 -0
  55. package/dist/shared/providers/shell/appearance/types.js +28 -0
  56. package/dist/shared/providers/shell/index.d.ts +1 -1
  57. package/dist/shared/providers/shell/responsiveDisplaySettings.d.ts +27 -0
  58. package/dist/shared/providers/shell/responsiveDisplaySettings.js +6 -0
  59. package/dist/shared/providers/shell/themeContext.d.ts +162 -0
  60. package/dist/shared/providers/shell/themeContext.js +4 -0
  61. package/dist/shell-native/system-bars.d.ts +5 -1
  62. package/dist/shell-native/system-bars.js +1 -1
  63. package/dist/ui/dropdown-menu.js +2 -0
  64. package/dist/ui/popover.js +1 -0
  65. package/dist/ui/select.js +1 -0
  66. package/package.json +1 -1
  67. package/src/shared/tokens/build/themes.css +266 -0
  68. package/src/shared/tokens/display-settings.css +569 -0
  69. package/src/shared/tokens/tokens.css +4 -0
@@ -0,0 +1,158 @@
1
+ import { hasLightMode as e, resolveAppearance as t } from "../../shared/providers/shell/appearance/model.js";
2
+ import { PALETTES as n } from "../../shared/providers/shell/appearance/palettes.js";
3
+ import { lookTokenStyle as r } from "../../shared/providers/shell/appearance/tokens.js";
4
+ import { DARK_DEPTHS as i } from "../../shared/providers/shell/appearance/types.js";
5
+ import { AppearanceSection as a, SelectedCheck as o, Tag as s, optionClass as c, useRadioGroupKeys as l } from "./appearanceUi.js";
6
+ import { AlertTriangle as u, Contrast as d, Monitor as f, Moon as p, Sun as m } from "lucide-react";
7
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
8
+ // src/chrome/appearance/AppearanceModeDepth.tsx
9
+ function _({ appearance: t, labels: n }) {
10
+ let r = l(), { settings: i, systemDark: s } = t, u = n.palettes[i.palette].name, _ = !e(i.palette), v = [
11
+ {
12
+ value: "light",
13
+ icon: /* @__PURE__ */ h(m, {}),
14
+ name: n.schemes.light,
15
+ hint: _ ? n.noLight(u) : n.lightHint,
16
+ disabled: _
17
+ },
18
+ {
19
+ value: "dark",
20
+ icon: /* @__PURE__ */ h(p, {}),
21
+ name: n.schemes.dark,
22
+ hint: n.darkHint,
23
+ disabled: !1
24
+ },
25
+ {
26
+ value: "system",
27
+ icon: /* @__PURE__ */ h(f, {}),
28
+ name: n.system,
29
+ hint: _ ? n.staysDark(u) : n.systemHint(n.schemes[s ? "dark" : "light"]),
30
+ disabled: !1
31
+ }
32
+ ];
33
+ return /* @__PURE__ */ h(a, {
34
+ id: "appearance-mode",
35
+ icon: /* @__PURE__ */ h(d, {}),
36
+ title: n.modeTitle,
37
+ description: n.modeDescription,
38
+ children: /* @__PURE__ */ h("div", {
39
+ role: "radiogroup",
40
+ "aria-labelledby": "appearance-mode-title",
41
+ onKeyDown: r,
42
+ className: "grid grid-cols-1 gap-2 sm:grid-cols-3",
43
+ children: v.map((e) => {
44
+ let n = i.mode === e.value;
45
+ return /* @__PURE__ */ g("button", {
46
+ type: "button",
47
+ role: "radio",
48
+ "aria-checked": n,
49
+ disabled: e.disabled,
50
+ tabIndex: n ? 0 : -1,
51
+ onClick: () => t.setColorMode(e.value),
52
+ "data-testid": `appearance-mode-${e.value}`,
53
+ className: c(n, "flex flex-col gap-1 p-3"),
54
+ children: [/* @__PURE__ */ g("span", {
55
+ className: "flex items-center gap-2 text-sm font-semibold [&_svg]:size-4",
56
+ children: [
57
+ /* @__PURE__ */ h("span", {
58
+ "aria-hidden": "true",
59
+ className: "text-text-secondary",
60
+ children: e.icon
61
+ }),
62
+ /* @__PURE__ */ h("span", {
63
+ className: "flex-1",
64
+ children: e.name
65
+ }),
66
+ /* @__PURE__ */ h(o, { selected: n })
67
+ ]
68
+ }), /* @__PURE__ */ h("span", {
69
+ className: "text-xs text-text-muted",
70
+ children: e.hint
71
+ })]
72
+ }, e.value);
73
+ })
74
+ })
75
+ });
76
+ }
77
+ function v({ appearance: e, brand: d, labels: f }) {
78
+ let m = l(), { settings: _, defaults: v, resolved: y, systemDark: b } = e, x = !!n[_.palette].depthless;
79
+ return /* @__PURE__ */ g(a, {
80
+ id: "appearance-depth",
81
+ icon: /* @__PURE__ */ h(p, {}),
82
+ title: f.depthTitle,
83
+ description: f.depthDescription,
84
+ children: [(x || y.scheme === "light") && /* @__PURE__ */ g("p", {
85
+ className: "flex items-start gap-2 text-sm text-text-secondary",
86
+ children: [/* @__PURE__ */ h(u, {
87
+ className: "mt-0.5 size-4 shrink-0 text-text-muted",
88
+ "aria-hidden": "true"
89
+ }), x ? f.depthNone : f.depthLightNote]
90
+ }), /* @__PURE__ */ h("div", {
91
+ role: "radiogroup",
92
+ "aria-labelledby": "appearance-depth-title",
93
+ onKeyDown: m,
94
+ className: "grid grid-cols-1 gap-2 sm:grid-cols-3",
95
+ children: i.map((n) => {
96
+ let i = _.darkDepth === n, a = t({
97
+ palette: _.palette,
98
+ mode: "dark",
99
+ darkDepth: n,
100
+ accent: "auto",
101
+ colours: []
102
+ }, {
103
+ systemDark: b,
104
+ brand: d
105
+ });
106
+ return /* @__PURE__ */ g("button", {
107
+ type: "button",
108
+ role: "radio",
109
+ "aria-checked": i,
110
+ disabled: x,
111
+ tabIndex: i ? 0 : -1,
112
+ onClick: () => e.setDarkDepth(n),
113
+ "data-testid": `appearance-depth-${n}`,
114
+ className: c(i, "flex flex-col gap-2 p-2.5"),
115
+ children: [
116
+ /* @__PURE__ */ g("span", {
117
+ "aria-hidden": "true",
118
+ "data-depth": "off",
119
+ style: r(a),
120
+ className: "grid h-10 grid-cols-[1.1fr_1fr_0.8fr] overflow-hidden rounded-md border border-border-subtle text-[10.5px] font-semibold text-text-secondary",
121
+ children: [
122
+ /* @__PURE__ */ h("span", {
123
+ className: "flex items-end bg-bg-canvas px-1.5 pb-1",
124
+ children: f.depthPage
125
+ }),
126
+ /* @__PURE__ */ h("span", {
127
+ className: "flex items-end bg-bg-surface px-1.5 pb-1",
128
+ children: f.depthCard
129
+ }),
130
+ /* @__PURE__ */ h("span", {
131
+ className: "flex items-end bg-bg-elevated px-1.5 pb-1",
132
+ children: f.depthMenu
133
+ })
134
+ ]
135
+ }),
136
+ /* @__PURE__ */ g("span", {
137
+ className: "flex items-center gap-1.5 text-sm font-semibold",
138
+ children: [
139
+ /* @__PURE__ */ h("span", { children: f.depths[n].name }),
140
+ n === v.darkDepth && /* @__PURE__ */ h(s, {
141
+ tone: "accent",
142
+ children: f.tagDefault
143
+ }),
144
+ /* @__PURE__ */ h("span", { className: "flex-1" }),
145
+ /* @__PURE__ */ h(o, { selected: i })
146
+ ]
147
+ }),
148
+ /* @__PURE__ */ h("span", {
149
+ className: "text-xs text-text-muted",
150
+ children: f.depths[n].hint
151
+ })
152
+ ]
153
+ }, n);
154
+ })
155
+ })]
156
+ });
157
+ }
158
+ export { v as AppearanceDepthSection, _ as AppearanceModeSection };
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ export interface AppearancePreferencesProps {
3
+ /** The product's own sections, after Display (FluidGrids: Background). */
4
+ children?: ReactNode;
5
+ /**
6
+ * Resets the product's own sections with the rest (Reset to defaults) and returns how to put
7
+ * them back (Undo). Without it, Reset leaves them alone and says so.
8
+ */
9
+ onResetDefaults?: () => () => void;
10
+ /** What the live preview shows behind the Assistant start page (FluidGrids: its background). */
11
+ previewBackground?: ReactNode;
12
+ }
13
+ export declare function AppearancePreferences({ children, onResetDefaults, previewBackground, }: AppearancePreferencesProps): import('react').JSX.Element | null;
@@ -0,0 +1,308 @@
1
+ import { normalizeHex as e } from "../../shared/providers/shell/appearance/colour.js";
2
+ import { accentHexOf as t, hasLightMode as n, resolveAppearance as r } from "../../shared/providers/shell/appearance/model.js";
3
+ import { PALETTES as i } from "../../shared/providers/shell/appearance/palettes.js";
4
+ import { useTheme as a } from "../../shared/providers/shell/ThemeProvider.js";
5
+ import { AlertDialog as o, AlertDialogAction as s, AlertDialogCancel as c, AlertDialogContent as l, AlertDialogDescription as u, AlertDialogFooter as d, AlertDialogHeader as f, AlertDialogTitle as p } from "../../ui/alert-dialog.js";
6
+ import { Button as m } from "../../ui/button.js";
7
+ import { Card as h, CardContent as g } from "../../ui/card.js";
8
+ import { cn as _ } from "../../utils/cn.js";
9
+ import "../../utils/index.js";
10
+ import { AppearanceColourSection as v } from "./AppearanceColourSection.js";
11
+ import { AppearanceDisplaySection as y } from "./AppearanceDisplaySection.js";
12
+ import { AppearanceDepthSection as b, AppearanceModeSection as x } from "./AppearanceModeDepth.js";
13
+ import { AppearanceLivePreview as S } from "./AppearancePreview.js";
14
+ import { AppearanceThemeSection as ee } from "./AppearanceThemeSection.js";
15
+ import { ThemeDialog as C } from "./ThemeDialog.js";
16
+ import { accentNameOf as w, notify as T } from "./appearanceShared.js";
17
+ import { Tag as E } from "./appearanceUi.js";
18
+ import { useAppearanceLabels as D } from "./useAppearanceLabels.js";
19
+ import { useEffect as O, useId as k, useMemo as A, useRef as j, useState as M } from "react";
20
+ import { AlertTriangle as N, Eye as P, RotateCcw as F } from "lucide-react";
21
+ import { jsx as I, jsxs as L } from "react/jsx-runtime";
22
+ // src/chrome/appearance/AppearancePreferences.tsx
23
+ function R({ children: e, onResetDefaults: t, previewBackground: n }) {
24
+ let r = a(), i = r.appearance;
25
+ return i ? /* @__PURE__ */ I(z, {
26
+ appearance: i,
27
+ brand: r.brand,
28
+ onResetDefaults: t,
29
+ previewBackground: n,
30
+ children: e
31
+ }) : null;
32
+ }
33
+ function z({ appearance: e, brand: r, children: i, onResetDefaults: h, previewBackground: g }) {
34
+ let _ = D(), S = a(), w = k(), { settings: E, activeLook: A } = e, [P, R] = M(!1), [z, V] = M(null), [H, U] = M(null), [W, G] = M(null), K = j(null), q = j(null), J = j(null), Y = z !== null;
35
+ O(() => {
36
+ P && q.current?.focus();
37
+ }, [P]), O(() => {
38
+ if (!Y) return;
39
+ let e = document.querySelector("[data-testid=\"appearance-colour-hex\"]");
40
+ e?.focus(), e?.select();
41
+ }, [Y]);
42
+ let X = i != null, Z = (t) => {
43
+ let n = e.snapshot(), { modeChanged: r } = e.setPalette(t);
44
+ r && T(_, _.themeNowDark(_.palettes[t].name), () => e.restore(n));
45
+ }, Q = () => {
46
+ let e = E.accent === "auto" || E.accent.startsWith("preset:") ? E.accent : t(E.accent, E.colours) ?? "auto";
47
+ U({
48
+ editId: null,
49
+ initial: {
50
+ name: _.dialogDefaultName(E.looks.length + 1),
51
+ palette: E.palette,
52
+ accent: e,
53
+ mode: n(E.palette) ? "keep" : "dark"
54
+ }
55
+ });
56
+ }, te = (e) => U({
57
+ editId: e.id,
58
+ initial: {
59
+ name: e.name,
60
+ palette: e.palette,
61
+ accent: e.accent,
62
+ mode: e.mode
63
+ }
64
+ }), ne = (t) => {
65
+ H && (H.editId ? (e.updateLook(H.editId, t), e.applyLook(H.editId), T(_, _.lookSaved(t.name))) : (e.createLook(t), T(_, _.lookCreated(t.name))), U(null));
66
+ }, $ = (t) => {
67
+ let n = e.snapshot(), r = A?.id === t.id;
68
+ e.deleteLook(t.id), T(_, r ? _.lookDeletedActive(t.name) : _.lookDeleted(t.name), () => e.restore(n));
69
+ };
70
+ return /* @__PURE__ */ L("div", {
71
+ className: "flex flex-col gap-4",
72
+ "data-testid": "appearance-palette-page",
73
+ children: [
74
+ /* @__PURE__ */ L("header", {
75
+ className: "flex flex-wrap items-end justify-between gap-x-4 gap-y-3",
76
+ children: [/* @__PURE__ */ L("div", {
77
+ className: "min-w-0 flex-[1_1_16rem]",
78
+ children: [/* @__PURE__ */ I("h1", {
79
+ className: "text-2xl font-bold text-text-primary",
80
+ children: _.title
81
+ }), /* @__PURE__ */ I("p", {
82
+ className: "mt-0.5 text-sm text-text-secondary",
83
+ children: X ? _.subtitle : _.subtitlePlain
84
+ })]
85
+ }), /* @__PURE__ */ L(m, {
86
+ ref: K,
87
+ type: "button",
88
+ variant: "outline",
89
+ onClick: () => R(!0),
90
+ "data-testid": "appearance-reset",
91
+ children: [/* @__PURE__ */ I(F, { "aria-hidden": "true" }), _.reset]
92
+ })]
93
+ }),
94
+ P && /* @__PURE__ */ L("div", {
95
+ role: "group",
96
+ "aria-labelledby": `${w}-reset`,
97
+ "data-testid": "appearance-reset-confirm",
98
+ onKeyDown: (e) => {
99
+ e.key === "Escape" && (e.stopPropagation(), R(!1), K.current?.focus());
100
+ },
101
+ className: "flex flex-wrap items-center gap-3 rounded-card border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)] p-3",
102
+ children: [
103
+ /* @__PURE__ */ I(N, {
104
+ className: "size-5 shrink-0 text-[var(--color-status-warning-text)]",
105
+ "aria-hidden": "true"
106
+ }),
107
+ /* @__PURE__ */ L("p", {
108
+ id: `${w}-reset`,
109
+ className: "min-w-0 flex-[1_1_16rem] text-sm text-text-primary",
110
+ children: [
111
+ /* @__PURE__ */ I("span", {
112
+ className: "font-semibold",
113
+ children: _.resetAsk
114
+ }),
115
+ " ",
116
+ X && h ? _.resetBody : _.resetBodyPlain
117
+ ]
118
+ }),
119
+ /* @__PURE__ */ I(m, {
120
+ ref: q,
121
+ type: "button",
122
+ variant: "outline",
123
+ size: "sm",
124
+ onClick: () => {
125
+ R(!1), K.current?.focus();
126
+ },
127
+ children: _.cancel
128
+ }),
129
+ /* @__PURE__ */ I(m, {
130
+ type: "button",
131
+ size: "sm",
132
+ onClick: () => {
133
+ let t = e.snapshot(), n = h?.();
134
+ e.resetToDefaults(), R(!1), V(null), T(_, _.resetDone, () => {
135
+ e.restore(t), n?.();
136
+ }), requestAnimationFrame(() => K.current?.focus());
137
+ },
138
+ "data-testid": "appearance-reset-do",
139
+ children: _.resetConfirm
140
+ })
141
+ ]
142
+ }),
143
+ /* @__PURE__ */ L("div", {
144
+ className: "grid items-start gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(18rem,25rem)]",
145
+ children: [/* @__PURE__ */ L("div", {
146
+ className: "order-2 flex min-w-0 flex-col gap-4 lg:order-1",
147
+ children: [
148
+ /* @__PURE__ */ I(ee, {
149
+ appearance: e,
150
+ brand: r,
151
+ labels: _,
152
+ onChoosePalette: Z,
153
+ onCreate: Q,
154
+ onEdit: te,
155
+ onDuplicate: (t) => {
156
+ let n = e.duplicateLook(t.id, _.lookCopyName(t.name));
157
+ n && T(_, _.lookDuplicated(n.name));
158
+ },
159
+ onDelete: G
160
+ }),
161
+ /* @__PURE__ */ I(x, {
162
+ appearance: e,
163
+ labels: _
164
+ }),
165
+ /* @__PURE__ */ I(b, {
166
+ appearance: e,
167
+ brand: r,
168
+ labels: _
169
+ }),
170
+ /* @__PURE__ */ I(v, {
171
+ appearance: e,
172
+ brand: r,
173
+ labels: _,
174
+ panel: z,
175
+ setPanel: V,
176
+ addColourButton: J
177
+ }),
178
+ /* @__PURE__ */ I(y, {
179
+ appearance: e,
180
+ theme: S,
181
+ labels: _
182
+ }),
183
+ i
184
+ ]
185
+ }), /* @__PURE__ */ I("aside", {
186
+ className: "order-1 min-w-0 lg:sticky lg:top-4 lg:order-2",
187
+ children: /* @__PURE__ */ I(B, {
188
+ appearance: e,
189
+ brand: r,
190
+ labels: _,
191
+ panel: z,
192
+ background: g
193
+ })
194
+ })]
195
+ }),
196
+ /* @__PURE__ */ L("footer", {
197
+ className: "flex flex-wrap items-center justify-between gap-3 border-t border-border-subtle pt-4 text-sm text-text-muted",
198
+ children: [/* @__PURE__ */ I("span", { children: _.keptOnDevice }), /* @__PURE__ */ L(m, {
199
+ type: "button",
200
+ variant: "outline",
201
+ size: "sm",
202
+ onClick: () => R(!0),
203
+ children: [/* @__PURE__ */ I(F, { "aria-hidden": "true" }), _.reset]
204
+ })]
205
+ }),
206
+ H && /* @__PURE__ */ I(C, {
207
+ open: !0,
208
+ editingId: H.editId,
209
+ initial: H.initial,
210
+ appearance: e,
211
+ brand: r,
212
+ labels: _,
213
+ onClose: () => U(null),
214
+ onSave: ne,
215
+ onDelete: H.editId ? () => {
216
+ let e = E.looks.find((e) => e.id === H.editId);
217
+ U(null), e && $(e);
218
+ } : void 0
219
+ }),
220
+ /* @__PURE__ */ I(o, {
221
+ open: W !== null,
222
+ onOpenChange: (e) => e ? void 0 : G(null),
223
+ children: /* @__PURE__ */ L(l, { children: [/* @__PURE__ */ L(f, { children: [/* @__PURE__ */ I(p, { children: W ? _.lookDeleteAsk(W.name) : "" }), /* @__PURE__ */ I(u, { children: _.lookDeleteBody })] }), /* @__PURE__ */ L(d, { children: [/* @__PURE__ */ I(c, { children: _.dialogKeepIt }), /* @__PURE__ */ I(s, {
224
+ onClick: () => {
225
+ W && $(W), G(null);
226
+ },
227
+ "data-testid": "appearance-look-delete-confirm",
228
+ children: _.dialogDeleteYes
229
+ })] })] })
230
+ })
231
+ ]
232
+ });
233
+ }
234
+ function B({ appearance: t, brand: n, labels: a, panel: o, background: s }) {
235
+ let c = k(), [l, u] = M(!0), { settings: d, resolved: f, systemDark: p } = t, v = o ? e(o.hex) : null, y = A(() => v ? r({
236
+ ...d,
237
+ accent: v
238
+ }, {
239
+ systemDark: p,
240
+ brand: n
241
+ }) : f, [
242
+ v,
243
+ d,
244
+ p,
245
+ n,
246
+ f
247
+ ]), b = !!i[d.palette].depthless, x = [
248
+ a.palettes[y.palette].name,
249
+ a.schemes[y.scheme],
250
+ y.scheme === "dark" && !b ? a.depths[d.darkDepth].name : null,
251
+ v ? o?.name || v : w(d.accent, t, a)
252
+ ].filter((e) => !!e);
253
+ return /* @__PURE__ */ I(h, { children: /* @__PURE__ */ L(g, {
254
+ className: "flex flex-col gap-3 pt-5",
255
+ children: [
256
+ /* @__PURE__ */ L("div", {
257
+ className: "flex flex-wrap items-center gap-2",
258
+ children: [
259
+ /* @__PURE__ */ L("span", {
260
+ className: "flex items-center gap-2 text-base font-semibold text-text-primary",
261
+ children: [/* @__PURE__ */ I(P, {
262
+ className: "size-4 text-text-secondary",
263
+ "aria-hidden": "true"
264
+ }), a.previewTitle]
265
+ }),
266
+ v && /* @__PURE__ */ I(E, {
267
+ tone: "warning",
268
+ children: a.previewUnsaved
269
+ }),
270
+ /* @__PURE__ */ I("span", { className: "flex-1" }),
271
+ /* @__PURE__ */ I(m, {
272
+ type: "button",
273
+ variant: "ghost",
274
+ size: "sm",
275
+ "aria-expanded": l,
276
+ "aria-controls": `${c}-preview`,
277
+ onClick: () => u((e) => !e),
278
+ className: "lg:hidden",
279
+ children: l ? a.previewHide : a.previewShow
280
+ })
281
+ ]
282
+ }),
283
+ /* @__PURE__ */ I("div", {
284
+ className: "flex flex-wrap gap-1",
285
+ "data-testid": "appearance-preview-tags",
286
+ children: x.map((e, t) => /* @__PURE__ */ I(E, { children: e }, `${t}-${e}`))
287
+ }),
288
+ /* @__PURE__ */ I("div", {
289
+ id: `${c}-preview`,
290
+ className: _(!l && "hidden lg:block"),
291
+ children: /* @__PURE__ */ I(S, {
292
+ look: y,
293
+ background: s,
294
+ words: {
295
+ label: a.previewLabel,
296
+ assistant: a.previewAssistant,
297
+ welcome: a.previewWelcome,
298
+ welcomeSub: a.previewWelcomeSub,
299
+ ask: a.previewAsk,
300
+ suggestion1: a.previewSuggestion1,
301
+ suggestion2: a.previewSuggestion2
302
+ }
303
+ })
304
+ })
305
+ ]
306
+ }) });
307
+ }
308
+ export { R as AppearancePreferences };
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ import { ResolvedAppearance } from '../../shared/providers/shell/appearance/model';
3
+ /** The small shell on a theme card: sidebar, a title, a card with text and a button. */
4
+ export declare function MiniShell({ look, className }: {
5
+ look: ResolvedAppearance;
6
+ className?: string;
7
+ }): import('react').JSX.Element;
8
+ export interface AppearanceLivePreviewWords {
9
+ label: string;
10
+ assistant: string;
11
+ welcome: string;
12
+ welcomeSub: string;
13
+ ask: string;
14
+ suggestion1: string;
15
+ suggestion2: string;
16
+ }
17
+ /** The Assistant start page in a look, scaled to fit. */
18
+ export declare function AppearanceLivePreview({ look, words, background, }: {
19
+ look: ResolvedAppearance;
20
+ words: AppearanceLivePreviewWords;
21
+ /** What the start page shows behind it (the product's animated background). */
22
+ background?: ReactNode;
23
+ }): import('react').JSX.Element;