@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.
- package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -127
- package/dist/chrome/notificationCenter/NotificationFilters.js +45 -44
- package/dist/connections/CredentialStorageSelector.js +135 -134
- package/dist/connections/SharePanels.js +70 -69
- package/dist/credentials/AuthMethodSelector.js +33 -32
- package/dist/credentials/SchemaForm.js +96 -95
- package/dist/shared/assistant/avatar/live/LiveAvatarSettingsFields.js +74 -73
- package/dist/shared/assistant/images.js +14 -13
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/sandboxRegistry.js +3 -0
- package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantLanguageMenu.js +41 -40
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +26 -25
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +22 -21
- package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.d.ts +2 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.js +17 -16
- package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.d.ts +3 -1
- package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.js +22 -21
- package/dist/shared/pages/searchPage/FiltersPanel.js +129 -128
- package/dist/shared/pages/searchPage/SearchToolbar.js +24 -23
- package/dist/shared/providers/AppShellProvider.d.ts +8 -0
- package/dist/shared/providers/AppShellProvider.js +199 -193
- package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -1
- package/dist/shared/providers/shell/ThemeProvider.js +65 -62
- package/dist/shared/providers/shell/themedNativeControls.d.ts +25 -0
- package/dist/shared/providers/shell/themedNativeControls.js +13 -0
- package/dist/shared-assistant.js +373 -372
- package/dist/sharing/ShareDialog.js +33 -32
- package/dist/storage/StorageFolderPicker.js +50 -49
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/themed-select-context.d.ts +9 -0
- package/dist/ui/themed-select-context.js +15 -0
- package/dist/ui/themed-select-options.d.ts +42 -0
- package/dist/ui/themed-select-options.js +88 -0
- package/dist/ui/themed-select.d.ts +7 -0
- package/dist/ui/themed-select.js +234 -0
- package/dist/ui.js +31 -29
- package/package.json +1 -1
- 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 {
|
|
4
|
-
import {
|
|
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
|
|
7
|
+
var u = /* @__PURE__ */ new Set([
|
|
7
8
|
"dark",
|
|
8
9
|
"forest",
|
|
9
10
|
"ocean",
|
|
10
11
|
"sunset",
|
|
11
12
|
"high-contrast"
|
|
12
|
-
]),
|
|
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
|
-
],
|
|
44
|
-
function
|
|
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
|
|
58
|
-
function
|
|
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
|
|
68
|
-
function
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
-
|
|
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] =
|
|
74
|
-
|
|
75
|
-
if (
|
|
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(
|
|
80
|
-
}, [
|
|
81
|
-
let I =
|
|
82
|
-
|
|
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(
|
|
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"),
|
|
87
|
-
let t =
|
|
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",
|
|
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
|
-
|
|
108
|
+
S,
|
|
106
109
|
L,
|
|
107
110
|
R,
|
|
108
111
|
z,
|
|
109
112
|
B,
|
|
110
113
|
N
|
|
111
114
|
]);
|
|
112
|
-
let V =
|
|
113
|
-
|
|
114
|
-
}, [V]), U =
|
|
115
|
-
|
|
116
|
-
}, [V]), W =
|
|
117
|
-
|
|
118
|
-
}, [V]), G =
|
|
119
|
-
|
|
120
|
-
}, [V]), K =
|
|
121
|
-
|
|
122
|
-
}, [V]), q =
|
|
123
|
-
|
|
124
|
-
}, [V]), J =
|
|
125
|
-
|
|
126
|
-
}, [
|
|
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([...
|
|
132
|
-
}, [
|
|
133
|
-
J(
|
|
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
|
-
}, [
|
|
138
|
-
J(
|
|
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
|
-
|
|
143
|
+
k,
|
|
141
144
|
J,
|
|
142
145
|
j,
|
|
143
146
|
V,
|
|
144
147
|
H
|
|
145
|
-
]), Q =
|
|
148
|
+
]), Q = a((e) => {
|
|
146
149
|
M(e), V("active-custom", e), H("custom");
|
|
147
|
-
}, [V, H]), $ =
|
|
150
|
+
}, [V, H]), $ = a(() => {
|
|
148
151
|
H(I === "light" ? "dark" : "light");
|
|
149
|
-
}, [I, H]),
|
|
150
|
-
mode:
|
|
151
|
-
brand:
|
|
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:
|
|
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
|
-
|
|
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__ */
|
|
196
|
-
value:
|
|
197
|
-
children:
|
|
198
|
+
return /* @__PURE__ */ l(g.Provider, {
|
|
199
|
+
value: ae,
|
|
200
|
+
children: r
|
|
198
201
|
});
|
|
199
202
|
}
|
|
200
|
-
function
|
|
201
|
-
let e =
|
|
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
|
|
206
|
-
return
|
|
208
|
+
function y() {
|
|
209
|
+
return i(g);
|
|
207
210
|
}
|
|
208
|
-
export {
|
|
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 };
|