@burdenoff/fe-libs 2026.1118.12 → 2026.1119.1

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 (41) hide show
  1. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -127
  2. package/dist/chrome/notificationCenter/NotificationFilters.js +45 -44
  3. package/dist/connections/CredentialStorageSelector.js +135 -134
  4. package/dist/connections/SharePanels.js +70 -69
  5. package/dist/credentials/AuthMethodSelector.js +33 -32
  6. package/dist/credentials/SchemaForm.js +96 -95
  7. package/dist/shared/assistant/avatar/live/LiveAvatarSettingsFields.js +74 -73
  8. package/dist/shared/assistant/images.js +14 -13
  9. package/dist/shared/assistant/index.d.ts +1 -0
  10. package/dist/shared/assistant/sandboxRegistry.js +3 -0
  11. package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +2 -0
  12. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +41 -40
  13. package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.d.ts +3 -1
  14. package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +26 -25
  15. package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.d.ts +3 -1
  16. package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +22 -21
  17. package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.d.ts +2 -1
  18. package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.js +17 -16
  19. package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.d.ts +3 -1
  20. package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.js +22 -21
  21. package/dist/shared/pages/searchPage/FiltersPanel.js +129 -128
  22. package/dist/shared/pages/searchPage/SearchToolbar.js +24 -23
  23. package/dist/shared/providers/AppShellProvider.d.ts +8 -0
  24. package/dist/shared/providers/AppShellProvider.js +199 -193
  25. package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -1
  26. package/dist/shared/providers/shell/ThemeProvider.js +65 -62
  27. package/dist/shared/providers/shell/themedNativeControls.d.ts +25 -0
  28. package/dist/shared/providers/shell/themedNativeControls.js +13 -0
  29. package/dist/shared-assistant.js +373 -372
  30. package/dist/sharing/ShareDialog.js +33 -32
  31. package/dist/storage/StorageFolderPicker.js +50 -49
  32. package/dist/ui/index.d.ts +2 -0
  33. package/dist/ui/themed-select-context.d.ts +9 -0
  34. package/dist/ui/themed-select-context.js +15 -0
  35. package/dist/ui/themed-select-options.d.ts +42 -0
  36. package/dist/ui/themed-select-options.js +88 -0
  37. package/dist/ui/themed-select.d.ts +7 -0
  38. package/dist/ui/themed-select.js +234 -0
  39. package/dist/ui.js +31 -29
  40. package/package.json +1 -1
  41. package/src/shared/tokens/tokens.css +100 -0
@@ -74,8 +74,13 @@ export interface ThemeProviderProps {
74
74
  defaultTypography?: Typography;
75
75
  defaultGlass?: GlassIntensity;
76
76
  storageKey?: string;
77
+ /**
78
+ * BOFF-15413: scrollbars, select menus and the other controls the browser draws
79
+ * follow this theme instead of the OS (`themedNativeControls.ts`). Off by default.
80
+ */
81
+ themedNativeControls?: boolean;
77
82
  }
78
- export declare function ThemeProvider({ children, defaultMode, defaultBrand, defaultDensity, defaultTypography, defaultGlass, storageKey, }: ThemeProviderProps): import('react').JSX.Element;
83
+ export declare function ThemeProvider({ children, defaultMode, defaultBrand, defaultDensity, defaultTypography, defaultGlass, storageKey, themedNativeControls, }: ThemeProviderProps): import('react').JSX.Element;
79
84
  export declare function useTheme(): ThemeContextValue;
80
85
  /**
81
86
  * The theme, or null outside a ThemeProvider — for a surface that must work
@@ -1,15 +1,16 @@
1
1
  import { desktopSetTheme as e } from "../../native/desktop.js";
2
2
  import { brandAttribute as t } from "./brandAttribute.js";
3
- import { createContext as n, use as r, useCallback as i, useEffect as a, useMemo as o, useState as s } from "react";
4
- import { jsx as ee } from "react/jsx-runtime";
3
+ import { applyThemedNativeControls as n } from "./themedNativeControls.js";
4
+ import { createContext as r, use as i, useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
5
+ import { jsx as l } from "react/jsx-runtime";
5
6
  // src/shared/providers/shell/ThemeProvider.tsx
6
- var c = /* @__PURE__ */ new Set([
7
+ var u = /* @__PURE__ */ new Set([
7
8
  "dark",
8
9
  "forest",
9
10
  "ocean",
10
11
  "sunset",
11
12
  "high-contrast"
12
- ]), l = [
13
+ ]), d = [
13
14
  {
14
15
  value: "light",
15
16
  label: "Light",
@@ -40,8 +41,8 @@ var c = /* @__PURE__ */ new Set([
40
41
  label: "High Contrast",
41
42
  family: "dark"
42
43
  }
43
- ], u = (e) => c.has(e) ? "dark" : "light";
44
- function d(e) {
44
+ ], ee = (e) => u.has(e) ? "dark" : "light";
45
+ function f(e) {
45
46
  let t = /^#?([0-9a-f]{6})$/i.exec(e.trim());
46
47
  if (!t) return null;
47
48
  let n = parseInt(t[1], 16), r = [
@@ -54,8 +55,8 @@ function d(e) {
54
55
  });
55
56
  return .2126 * r[0] + .7152 * r[1] + .0722 * r[2];
56
57
  }
57
- var f = (e) => d(e) ?? 0, p = (e) => f(e) > .45;
58
- function m(e, t) {
58
+ var p = (e) => f(e) ?? 0, m = (e) => p(e) > .45;
59
+ function h(e, t) {
59
60
  if (typeof window > "u") return t;
60
61
  try {
61
62
  let n = localStorage.getItem(e);
@@ -64,28 +65,30 @@ function m(e, t) {
64
65
  return t;
65
66
  }
66
67
  }
67
- var h = n(null);
68
- function g({ children: n, defaultMode: r = "system", defaultBrand: c = "default", defaultDensity: l = "comfortable", defaultTypography: f = "default", defaultGlass: g = "full", storageKey: _ = "burdenoff-theme" }) {
69
- let v = (e, t) => typeof window > "u" ? t : localStorage.getItem(`${_}-${e}`) || t, [y, b] = s(() => v("mode", r)), [x, S] = s(() => v("brand", c)), [C, te] = s(() => v("density", l)), [w, T] = s(() => v("typography", f)), [E, D] = s(() => v("glass", g)), [O, k] = s(() => v("reduce-motion", "") === "1"), [A, ne] = s(() => m(`${_}-custom-list`, [])), [j, M] = s(() => v("active-custom", "") || null), N = o(() => y === "custom" ? A.find((e) => e.id === j) ?? null : null, [
70
- y,
71
- A,
68
+ var g = r(null);
69
+ function _({ children: r, defaultMode: i = "system", defaultBrand: u = "default", defaultDensity: d = "comfortable", defaultTypography: p = "default", defaultGlass: _ = "full", storageKey: v = "burdenoff-theme", themedNativeControls: y = !1 }) {
70
+ let b = (e, t) => typeof window > "u" ? t : localStorage.getItem(`${v}-${e}`) || t, [x, te] = c(() => b("mode", i)), [S, ne] = c(() => b("brand", u)), [re, ie] = c(() => b("density", d)), [C, w] = c(() => b("typography", p)), [T, E] = c(() => b("glass", _)), [D, O] = c(() => b("reduce-motion", "") === "1"), [k, A] = c(() => h(`${v}-custom-list`, [])), [j, M] = c(() => b("active-custom", "") || null), N = s(() => x === "custom" ? k.find((e) => e.id === j) ?? null : null, [
71
+ x,
72
+ k,
72
73
  j
73
- ]), [P, F] = s(() => y === "custom" ? "light" : y === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : y);
74
- a(() => {
75
- if (y === "system") {
74
+ ]), [P, F] = c(() => x === "custom" ? "light" : x === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : x);
75
+ o(() => {
76
+ if (x === "system") {
76
77
  let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => F(e.matches ? "dark" : "light");
77
78
  return e.addEventListener("change", t), F(e.matches ? "dark" : "light"), () => e.removeEventListener("change", t);
78
79
  }
79
- F(y === "custom" ? N?.base ?? "light" : y);
80
- }, [y, N]);
81
- let I = u(P), L = N?.density ?? C, R = N?.typography ?? w, z = N?.glass ?? E, B = N?.reduceMotion ?? O;
82
- a(() => {
80
+ F(x === "custom" ? N?.base ?? "light" : x);
81
+ }, [x, N]);
82
+ let I = ee(P), L = N?.density ?? re, R = N?.typography ?? C, z = N?.glass ?? T, B = N?.reduceMotion ?? D;
83
+ o(() => {
84
+ if (y) return n(document, I);
85
+ }, [y, I]), o(() => {
83
86
  let n = document.documentElement;
84
- if (n.setAttribute("data-theme", P), n.setAttribute("data-brand", t(x)), n.setAttribute("data-density", L), n.setAttribute("data-typography", R), n.setAttribute("data-glass", z), n.toggleAttribute("data-reduce-motion", B), I === "dark" ? n.classList.add("dark") : n.classList.remove("dark"), N) {
87
+ if (n.setAttribute("data-theme", P), n.setAttribute("data-brand", t(S)), n.setAttribute("data-density", L), n.setAttribute("data-typography", R), n.setAttribute("data-glass", z), n.toggleAttribute("data-reduce-motion", B), I === "dark" ? n.classList.add("dark") : n.classList.remove("dark"), N) {
85
88
  let e = N.accent;
86
- n.setAttribute("data-accent", "custom"), p(e) ? n.setAttribute("data-accent-label", "dark") : n.removeAttribute("data-accent-label");
87
- let t = d(e);
88
- t === null ? n.style.removeProperty("--custom-accent-luminance") : n.style.setProperty("--custom-accent-luminance", t.toFixed(4)), n.style.setProperty("--color-action-primary-bg", e), n.style.setProperty("--color-action-primary-bgHover", `color-mix(in oklab, ${e} 84%, black)`), n.style.setProperty("--color-action-primary-bgActive", `color-mix(in oklab, ${e} 70%, black)`), n.style.setProperty("--color-action-primary-text", p(e) ? "#0a0a0a" : "#ffffff");
89
+ n.setAttribute("data-accent", "custom"), m(e) ? n.setAttribute("data-accent-label", "dark") : n.removeAttribute("data-accent-label");
90
+ let t = f(e);
91
+ t === null ? n.style.removeProperty("--custom-accent-luminance") : n.style.setProperty("--custom-accent-luminance", t.toFixed(4)), n.style.setProperty("--color-action-primary-bg", e), n.style.setProperty("--color-action-primary-bgHover", `color-mix(in oklab, ${e} 84%, black)`), n.style.setProperty("--color-action-primary-bgActive", `color-mix(in oklab, ${e} 70%, black)`), n.style.setProperty("--color-action-primary-text", m(e) ? "#0a0a0a" : "#ffffff");
89
92
  } else n.removeAttribute("data-accent"), n.removeAttribute("data-accent-label"), n.style.removeProperty("--custom-accent-luminance"), n.style.removeProperty("--color-action-primary-bg"), n.style.removeProperty("--color-action-primary-bgHover"), n.style.removeProperty("--color-action-primary-bgActive"), n.style.removeProperty("--color-action-primary-text");
90
93
  let r = () => {
91
94
  let t = getComputedStyle(n).getPropertyValue("--color-bg-canvas").trim();
@@ -102,53 +105,53 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: c = "default"
102
105
  }, [
103
106
  P,
104
107
  I,
105
- x,
108
+ S,
106
109
  L,
107
110
  R,
108
111
  z,
109
112
  B,
110
113
  N
111
114
  ]);
112
- let V = i((e, t) => localStorage.setItem(`${_}-${e}`, t), [_]), H = i((e) => {
113
- b(e), V("mode", e);
114
- }, [V]), U = i((e) => {
115
- S(e), V("brand", e);
116
- }, [V]), W = i((e) => {
117
- te(e), V("density", e);
118
- }, [V]), G = i((e) => {
119
- T(e), V("typography", e);
120
- }, [V]), K = i((e) => {
121
- D(e), V("glass", e);
122
- }, [V]), q = i((e) => {
123
- k(e), V("reduce-motion", e ? "1" : "0");
124
- }, [V]), J = i((e) => {
125
- ne(e), localStorage.setItem(`${_}-custom-list`, JSON.stringify(e));
126
- }, [_]), Y = i((e) => {
115
+ let V = a((e, t) => localStorage.setItem(`${v}-${e}`, t), [v]), H = a((e) => {
116
+ te(e), V("mode", e);
117
+ }, [V]), U = a((e) => {
118
+ ne(e), V("brand", e);
119
+ }, [V]), W = a((e) => {
120
+ ie(e), V("density", e);
121
+ }, [V]), G = a((e) => {
122
+ w(e), V("typography", e);
123
+ }, [V]), K = a((e) => {
124
+ E(e), V("glass", e);
125
+ }, [V]), q = a((e) => {
126
+ O(e), V("reduce-motion", e ? "1" : "0");
127
+ }, [V]), J = a((e) => {
128
+ A(e), localStorage.setItem(`${v}-custom-list`, JSON.stringify(e));
129
+ }, [v]), Y = a((e) => {
127
130
  let t = typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `ct-${Date.now()}-${Math.floor(performance.now())}`, n = {
128
131
  ...e,
129
132
  id: t
130
133
  };
131
- return J([...A, n]), n;
132
- }, [A, J]), X = i((e, t) => {
133
- J(A.map((n) => n.id === e ? {
134
+ return J([...k, n]), n;
135
+ }, [k, J]), X = a((e, t) => {
136
+ J(k.map((n) => n.id === e ? {
134
137
  ...n,
135
138
  ...t
136
139
  } : n));
137
- }, [A, J]), Z = i((e) => {
138
- J(A.filter((t) => t.id !== e)), j === e && (M(null), V("active-custom", ""), H("system"));
140
+ }, [k, J]), Z = a((e) => {
141
+ J(k.filter((t) => t.id !== e)), j === e && (M(null), V("active-custom", ""), H("system"));
139
142
  }, [
140
- A,
143
+ k,
141
144
  J,
142
145
  j,
143
146
  V,
144
147
  H
145
- ]), Q = i((e) => {
148
+ ]), Q = a((e) => {
146
149
  M(e), V("active-custom", e), H("custom");
147
- }, [V, H]), $ = i(() => {
150
+ }, [V, H]), $ = a(() => {
148
151
  H(I === "light" ? "dark" : "light");
149
- }, [I, H]), re = o(() => ({
150
- mode: y,
151
- brand: x,
152
+ }, [I, H]), ae = s(() => ({
153
+ mode: x,
154
+ brand: S,
152
155
  density: L,
153
156
  typography: R,
154
157
  glass: z,
@@ -161,7 +164,7 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: c = "default"
161
164
  setTypography: G,
162
165
  setGlass: K,
163
166
  setReduceMotion: q,
164
- customThemes: A,
167
+ customThemes: k,
165
168
  activeCustomId: j,
166
169
  createCustomTheme: Y,
167
170
  updateCustomTheme: X,
@@ -170,8 +173,8 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: c = "default"
170
173
  colorMode: I,
171
174
  toggleColorMode: $
172
175
  }), [
173
- y,
174
176
  x,
177
+ S,
175
178
  L,
176
179
  R,
177
180
  z,
@@ -184,7 +187,7 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: c = "default"
184
187
  G,
185
188
  K,
186
189
  q,
187
- A,
190
+ k,
188
191
  j,
189
192
  Y,
190
193
  X,
@@ -192,17 +195,17 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: c = "default"
192
195
  Q,
193
196
  $
194
197
  ]);
195
- return /* @__PURE__ */ ee(h.Provider, {
196
- value: re,
197
- children: n
198
+ return /* @__PURE__ */ l(g.Provider, {
199
+ value: ae,
200
+ children: r
198
201
  });
199
202
  }
200
- function _() {
201
- let e = r(h);
203
+ function v() {
204
+ let e = i(g);
202
205
  if (!e) throw Error("useTheme must be used within a ThemeProvider");
203
206
  return e;
204
207
  }
205
- function v() {
206
- return r(h);
208
+ function y() {
209
+ return i(g);
207
210
  }
208
- export { l as THEME_OPTIONS, g as ThemeProvider, _ as useTheme, v as useThemeOrNull };
211
+ export { d as THEME_OPTIONS, _ as ThemeProvider, v as useTheme, y as useThemeOrNull };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Native controls follow the app's theme, not the OS (BOFF-15413). Opt-in:
3
+ * `AppShellConfig.themedNativeControls` → `ThemeProvider themedNativeControls`.
4
+ *
5
+ * Why: an app that declares `<meta name="color-scheme" content="dark light">`
6
+ * (FluidGrids does, for its dark first paint) never told the browser which of the two
7
+ * it is in, so everything the browser draws itself followed the OS: on a Mac in Dark
8
+ * mode, a FluidGrids page in Light got dark scrollbars and a dark system menu for every
9
+ * `<select>`. Controls styled `color-scheme: normal` (Tailwind `scheme-normal`, the
10
+ * fleet's native selects) read the meta, not the page, so only narrowing the meta to
11
+ * the theme reaches them; the rest inherit `color-scheme` from `<html>`.
12
+ *
13
+ * While on:
14
+ * - `<html data-native-controls="themed">`: the stylesheet hook (`tokens.css`) for
15
+ * `color-scheme` per theme and the one theme-aware scrollbar.
16
+ * - `<meta name="color-scheme">` says the theme's scheme only (`light` or `dark`);
17
+ * created when the page has none. Turning it off puts the meta back as it was.
18
+ */
19
+ export declare const NATIVE_CONTROLS_ATTRIBUTE = "data-native-controls";
20
+ export declare const NATIVE_CONTROLS_THEMED = "themed";
21
+ /**
22
+ * Applies the opt-in for `scheme` and returns the undo: the attribute removed and the
23
+ * meta restored (or removed, when this added it).
24
+ */
25
+ export declare function applyThemedNativeControls(doc: Document, scheme: 'light' | 'dark'): () => void;
@@ -0,0 +1,13 @@
1
+ // src/shared/providers/shell/themedNativeControls.ts
2
+ var e = "data-native-controls", t = "themed";
3
+ function n(n, r) {
4
+ let i = n.documentElement;
5
+ i.setAttribute(e, t);
6
+ let a = n.head.querySelector("meta[name=\"color-scheme\"]"), o = !a, s = a?.getAttribute("content") ?? null;
7
+ a || (a = n.createElement("meta"), a.setAttribute("name", "color-scheme"), n.head.appendChild(a)), a.setAttribute("content", r);
8
+ let c = a;
9
+ return () => {
10
+ i.removeAttribute(e), o ? c.remove() : s === null ? c.removeAttribute("content") : c.setAttribute("content", s);
11
+ };
12
+ }
13
+ export { e as NATIVE_CONTROLS_ATTRIBUTE, t as NATIVE_CONTROLS_THEMED, n as applyThemedNativeControls };