@burdenoff/fe-libs 2026.926.4 → 2026.927.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/ProductPickerSheet.d.ts.map +1 -1
- package/dist/chrome/ProductPickerSheet.js +45 -44
- package/dist/chrome/ProductSwitcher.d.ts.map +1 -1
- package/dist/chrome/ProductSwitcher.js +83 -82
- package/dist/shared/assistant/conversation.d.ts +91 -3
- package/dist/shared/assistant/conversation.d.ts.map +1 -1
- package/dist/shared/assistant/gatewayClient.d.ts +15 -0
- package/dist/shared/assistant/gatewayClient.d.ts.map +1 -1
- package/dist/shared/assistant/gatewayClient.js +1 -1
- package/dist/shared/assistant/guardedStorage.d.ts +4 -2
- package/dist/shared/assistant/guardedStorage.d.ts.map +1 -1
- package/dist/shared/assistant/guardedStorage.js +1 -1
- package/dist/shared/assistant/history/historyApi.d.ts +38 -0
- package/dist/shared/assistant/history/historyApi.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyApi.js +153 -0
- package/dist/shared/assistant/history/historyEngine.d.ts +96 -0
- package/dist/shared/assistant/history/historyEngine.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyEngine.js +774 -0
- package/dist/shared/assistant/history/historyErrors.d.ts +72 -0
- package/dist/shared/assistant/history/historyErrors.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyErrors.js +74 -0
- package/dist/shared/assistant/history/historyList.d.ts +115 -0
- package/dist/shared/assistant/history/historyList.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyList.js +116 -0
- package/dist/shared/assistant/history/historyMapping.d.ts +65 -0
- package/dist/shared/assistant/history/historyMapping.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyMapping.js +383 -0
- package/dist/shared/assistant/history/historyMerge.d.ts +65 -0
- package/dist/shared/assistant/history/historyMerge.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyMerge.js +97 -0
- package/dist/shared/assistant/history/historyOperations.d.ts +24 -0
- package/dist/shared/assistant/history/historyOperations.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyOperations.js +125 -0
- package/dist/shared/assistant/history/historyResume.d.ts +56 -0
- package/dist/shared/assistant/history/historyResume.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyResume.js +55 -0
- package/dist/shared/assistant/history/historyStatus.d.ts +76 -0
- package/dist/shared/assistant/history/historyStatus.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyStatus.js +47 -0
- package/dist/shared/assistant/history/historyStore.d.ts +192 -0
- package/dist/shared/assistant/history/historyStore.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyStore.js +503 -0
- package/dist/shared/assistant/history/historyTimestamps.d.ts +11 -0
- package/dist/shared/assistant/history/historyTimestamps.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyTimestamps.js +9 -0
- package/dist/shared/assistant/history/historyTypes.d.ts +256 -0
- package/dist/shared/assistant/history/historyTypes.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyTypes.js +20 -0
- package/dist/shared/assistant/history/profileBoundStorage.d.ts +36 -0
- package/dist/shared/assistant/history/profileBoundStorage.d.ts.map +1 -0
- package/dist/shared/assistant/history/profileBoundStorage.js +74 -0
- package/dist/shared/assistant/history/stampRegistry.d.ts +84 -0
- package/dist/shared/assistant/history/stampRegistry.d.ts.map +1 -0
- package/dist/shared/assistant/history/stampRegistry.js +58 -0
- package/dist/shared/assistant/history/useAssistantServerHistory.d.ts +18 -0
- package/dist/shared/assistant/history/useAssistantServerHistory.d.ts.map +1 -0
- package/dist/shared/assistant/history/useAssistantServerHistory.js +12 -0
- package/dist/shared/assistant/i18nManifest.d.ts +18 -0
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +18 -0
- package/dist/shared/assistant/index.d.ts +16 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/liveTurns.d.ts +7 -0
- package/dist/shared/assistant/liveTurns.d.ts.map +1 -1
- package/dist/shared/assistant/liveTurns.js +35 -32
- package/dist/shared/assistant/spokenTurns.d.ts +20 -0
- package/dist/shared/assistant/spokenTurns.d.ts.map +1 -1
- package/dist/shared/assistant/spokenTurns.js +13 -8
- package/dist/shared/assistant/store.d.ts +35 -1
- package/dist/shared/assistant/store.d.ts.map +1 -1
- package/dist/shared/assistant/store.js +93 -24
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +16 -0
- package/dist/shared/assistant/ui/AIAssistantPanel.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AIAssistantPanel.js +63 -60
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +730 -672
- package/dist/shared/assistant/ui/AssistantConversationList.d.ts +17 -0
- package/dist/shared/assistant/ui/AssistantConversationList.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantConversationList.js +252 -145
- package/dist/shared/assistant/ui/AssistantHistoryNotices.d.ts +36 -0
- package/dist/shared/assistant/ui/AssistantHistoryNotices.d.ts.map +1 -0
- package/dist/shared/assistant/ui/AssistantHistoryNotices.js +103 -0
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts +4 -0
- package/dist/shared/assistant/ui/AssistantOverlay.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantOverlay.js +97 -94
- package/dist/shared/assistant/ui/AssistantSpokenTurnsNotice.d.ts +5 -3
- package/dist/shared/assistant/ui/AssistantSpokenTurnsNotice.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +54 -54
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts +9 -0
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/VoiceTranscriptDrawer.js +37 -32
- package/dist/shared/assistant/voice/turnVisibility.d.ts +7 -5
- package/dist/shared/assistant/voice/turnVisibility.d.ts.map +1 -1
- package/dist/shared/assistant/voice/voiceTranscript.d.ts +3 -2
- package/dist/shared/assistant/voice/voiceTranscript.d.ts.map +1 -1
- package/dist/shared/config/index.d.ts +3 -1
- package/dist/shared/config/index.d.ts.map +1 -1
- package/dist/shared/config/productSlug.d.ts +36 -0
- package/dist/shared/config/productSlug.d.ts.map +1 -0
- package/dist/shared/config/productSlug.js +23 -0
- package/dist/shared/config/products.d.ts +8 -1
- package/dist/shared/config/products.d.ts.map +1 -1
- package/dist/shared/config/products.js +21 -14
- package/dist/shared/hooks/shell/useProducts.d.ts +8 -0
- package/dist/shared/hooks/shell/useProducts.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useProducts.js +46 -42
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +228 -227
- package/dist/shared/providers/shell/ThemeProvider.d.ts +1 -1
- package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ThemeProvider.js +58 -57
- package/dist/shared/providers/shell/brandAttribute.d.ts +11 -0
- package/dist/shared/providers/shell/brandAttribute.d.ts.map +1 -0
- package/dist/shared/providers/shell/brandAttribute.js +7 -0
- package/dist/shared-assistant.js +153 -137
- package/dist/shared-config.js +11 -10
- package/dist/shared.js +121 -120
- package/package.json +2 -2
- package/src/vite/types.ts +4 -1
|
@@ -9,7 +9,7 @@ import { ReactNode } from 'react';
|
|
|
9
9
|
export type ThemeMode = 'light' | 'dark' | 'forest' | 'ocean' | 'sunset' | 'high-contrast' | 'system' | 'custom';
|
|
10
10
|
/** The six concrete CSS themes (`data-theme` only ever receives one of these). */
|
|
11
11
|
export type ThemeName = Exclude<ThemeMode, 'system' | 'custom'>;
|
|
12
|
-
export type Brand = 'workspaces' | 'fluidgrids' | 'bigconsole' | 'botlit' | 'vibecontrols' | 'healthybowl' | 'housingvista' | 'adaptercloud' | 'artistrybase' | 'atheletebridge' | 'brainyrich' | 'buildmyiq' | 'collabkin' | 'comradecircle' | 'coolandlovely' | 'cosmicintersection' | 'crewfoundry' | 'ecoimpacthub' | 'eventfullymanaged' | 'ggnomad' | 'govcitizenhub' | 'headshotmarketing' | 'hookmovies' | 'intelwatchtower' | 'kadaikodi' | 'labsofscience' | 'manufacturedops' | 'movethewheels' | 'mybodyshield' | 'planmagnet' | 'proserviceworld' | 'semanticfed' | 'subscriberbot' | 'theculturepost' | 'theglobalfuel' | 'timecampus' | 'default';
|
|
12
|
+
export type Brand = 'workspaces' | 'fluidgrids' | 'bigconsole' | 'botlit' | 'botmanor' | 'vibecontrols' | 'healthybowl' | 'housingvista' | 'adaptercloud' | 'artistrybase' | 'atheletebridge' | 'brainyrich' | 'buildmyiq' | 'collabkin' | 'comradecircle' | 'coolandlovely' | 'cosmicintersection' | 'crewfoundry' | 'ecoimpacthub' | 'eventfullymanaged' | 'ggnomad' | 'govcitizenhub' | 'headshotmarketing' | 'hookmovies' | 'intelwatchtower' | 'kadaikodi' | 'labsofscience' | 'manufacturedops' | 'movethewheels' | 'mybodyshield' | 'planmagnet' | 'proserviceworld' | 'semanticfed' | 'subscriberbot' | 'theculturepost' | 'theglobalfuel' | 'timecampus' | 'default';
|
|
13
13
|
export type Density = 'compact' | 'comfortable' | 'spacious';
|
|
14
14
|
export type Typography = 'default' | 'large' | 'small';
|
|
15
15
|
/** Glass intensity preference (drives `data-glass` → blur + opaque fallback). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM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IACjF,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,0DAA0D;IAC1D,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAID,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAsB,EACtB,YAAwB,EACxB,cAA8B,EAC9B,iBAA6B,EAC7B,YAAqB,EACrB,UAA8B,GAC/B,EAAE,kBAAkB,2CA0RpB;AAED,wBAAgB,QAAQ,sBAMvB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,GAAG,IAAI,CAEzD"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { desktopSetTheme as e } from "../../native/desktop.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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 c } from "react/jsx-runtime";
|
|
4
5
|
//#region src/shared/providers/shell/ThemeProvider.tsx
|
|
5
|
-
var
|
|
6
|
+
var l = new Set([
|
|
6
7
|
"dark",
|
|
7
8
|
"forest",
|
|
8
9
|
"ocean",
|
|
9
10
|
"sunset",
|
|
10
11
|
"high-contrast"
|
|
11
|
-
]),
|
|
12
|
+
]), u = [
|
|
12
13
|
{
|
|
13
14
|
value: "light",
|
|
14
15
|
label: "Light",
|
|
@@ -39,8 +40,8 @@ var c = new Set([
|
|
|
39
40
|
label: "High Contrast",
|
|
40
41
|
family: "dark"
|
|
41
42
|
}
|
|
42
|
-
],
|
|
43
|
-
function
|
|
43
|
+
], d = (e) => l.has(e) ? "dark" : "light";
|
|
44
|
+
function f(e) {
|
|
44
45
|
let t = /^#?([0-9a-f]{6})$/i.exec(e.trim());
|
|
45
46
|
if (!t) return 0;
|
|
46
47
|
let n = parseInt(t[1], 16), r = [
|
|
@@ -53,8 +54,8 @@ function d(e) {
|
|
|
53
54
|
});
|
|
54
55
|
return .2126 * r[0] + .7152 * r[1] + .0722 * r[2];
|
|
55
56
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
57
|
+
var p = (e) => f(e) > .45;
|
|
58
|
+
function m(e, t) {
|
|
58
59
|
if (typeof window > "u") return t;
|
|
59
60
|
try {
|
|
60
61
|
let n = localStorage.getItem(e);
|
|
@@ -63,75 +64,75 @@ function ee(e, t) {
|
|
|
63
64
|
return t;
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
var
|
|
67
|
-
function
|
|
68
|
-
let
|
|
69
|
-
|
|
67
|
+
var h = n(null);
|
|
68
|
+
function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default", defaultDensity: u = "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", l)), [ee, te] = s(() => v("density", u)), [C, w] = s(() => v("typography", f)), [T, E] = s(() => v("glass", g)), [D, O] = s(() => v("reduce-motion", "") === "1"), [k, A] = s(() => m(`${_}-custom-list`, [])), [j, M] = s(() => v("active-custom", "") || null), N = o(() => y === "custom" ? k.find((e) => e.id === j) ?? null : null, [
|
|
70
|
+
y,
|
|
70
71
|
k,
|
|
71
72
|
j
|
|
72
|
-
]), [P, F] =
|
|
73
|
-
|
|
74
|
-
if (
|
|
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") {
|
|
75
76
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e) => F(e.matches ? "dark" : "light");
|
|
76
77
|
return e.addEventListener("change", t), F(e.matches ? "dark" : "light"), () => e.removeEventListener("change", t);
|
|
77
78
|
}
|
|
78
|
-
F(
|
|
79
|
-
}, [
|
|
80
|
-
let I =
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
if (
|
|
79
|
+
F(y === "custom" ? N?.base ?? "light" : y);
|
|
80
|
+
}, [y, N]);
|
|
81
|
+
let I = d(P), L = N?.density ?? ee, R = N?.typography ?? C, z = N?.glass ?? T, B = N?.reduceMotion ?? D;
|
|
82
|
+
a(() => {
|
|
83
|
+
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) {
|
|
84
85
|
let e = N.accent;
|
|
85
|
-
|
|
86
|
-
} else
|
|
87
|
-
let
|
|
88
|
-
let
|
|
86
|
+
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)`), p(e) ? n.style.setProperty("--color-action-primary-text", "#0a0a0a") : n.style.removeProperty("--color-action-primary-text");
|
|
87
|
+
} else 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");
|
|
88
|
+
let r = () => {
|
|
89
|
+
let t = getComputedStyle(n).getPropertyValue("--color-bg-canvas").trim();
|
|
89
90
|
e({
|
|
90
91
|
scheme: I === "dark" ? "dark" : "light",
|
|
91
|
-
backgroundColor:
|
|
92
|
+
backgroundColor: t || void 0
|
|
92
93
|
});
|
|
93
94
|
};
|
|
94
95
|
if (typeof requestAnimationFrame == "function") {
|
|
95
|
-
let e = requestAnimationFrame(
|
|
96
|
+
let e = requestAnimationFrame(r);
|
|
96
97
|
return () => cancelAnimationFrame(e);
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
r();
|
|
99
100
|
}, [
|
|
100
101
|
P,
|
|
101
102
|
I,
|
|
102
|
-
|
|
103
|
+
x,
|
|
103
104
|
L,
|
|
104
105
|
R,
|
|
105
106
|
z,
|
|
106
107
|
B,
|
|
107
108
|
N
|
|
108
109
|
]);
|
|
109
|
-
let V =
|
|
110
|
-
|
|
111
|
-
}, [V]), U =
|
|
112
|
-
|
|
113
|
-
}, [V]), W =
|
|
114
|
-
|
|
115
|
-
}, [V]), G =
|
|
110
|
+
let V = i((e, t) => localStorage.setItem(`${_}-${e}`, t), [_]), H = i((e) => {
|
|
111
|
+
b(e), V("mode", e);
|
|
112
|
+
}, [V]), U = i((e) => {
|
|
113
|
+
S(e), V("brand", e);
|
|
114
|
+
}, [V]), W = i((e) => {
|
|
115
|
+
te(e), V("density", e);
|
|
116
|
+
}, [V]), G = i((e) => {
|
|
116
117
|
w(e), V("typography", e);
|
|
117
|
-
}, [V]), K =
|
|
118
|
+
}, [V]), K = i((e) => {
|
|
118
119
|
E(e), V("glass", e);
|
|
119
|
-
}, [V]), q =
|
|
120
|
+
}, [V]), q = i((e) => {
|
|
120
121
|
O(e), V("reduce-motion", e ? "1" : "0");
|
|
121
|
-
}, [V]), J =
|
|
122
|
-
A(e), localStorage.setItem(`${
|
|
123
|
-
}, [
|
|
122
|
+
}, [V]), J = i((e) => {
|
|
123
|
+
A(e), localStorage.setItem(`${_}-custom-list`, JSON.stringify(e));
|
|
124
|
+
}, [_]), Y = i((e) => {
|
|
124
125
|
let t = typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `ct-${Date.now()}-${Math.floor(performance.now())}`, n = {
|
|
125
126
|
...e,
|
|
126
127
|
id: t
|
|
127
128
|
};
|
|
128
129
|
return J([...k, n]), n;
|
|
129
|
-
}, [k, J]), X =
|
|
130
|
+
}, [k, J]), X = i((e, t) => {
|
|
130
131
|
J(k.map((n) => n.id === e ? {
|
|
131
132
|
...n,
|
|
132
133
|
...t
|
|
133
134
|
} : n));
|
|
134
|
-
}, [k, J]), Z =
|
|
135
|
+
}, [k, J]), Z = i((e) => {
|
|
135
136
|
J(k.filter((t) => t.id !== e)), j === e && (M(null), V("active-custom", ""), H("system"));
|
|
136
137
|
}, [
|
|
137
138
|
k,
|
|
@@ -139,13 +140,13 @@ function m({ children: t, defaultMode: n = "system", defaultBrand: c = "default"
|
|
|
139
140
|
j,
|
|
140
141
|
V,
|
|
141
142
|
H
|
|
142
|
-
]), Q =
|
|
143
|
+
]), Q = i((e) => {
|
|
143
144
|
M(e), V("active-custom", e), H("custom");
|
|
144
|
-
}, [V, H]), $ =
|
|
145
|
+
}, [V, H]), $ = i(() => {
|
|
145
146
|
H(I === "light" ? "dark" : "light");
|
|
146
|
-
}, [I, H]),
|
|
147
|
-
mode:
|
|
148
|
-
brand:
|
|
147
|
+
}, [I, H]), ne = o(() => ({
|
|
148
|
+
mode: y,
|
|
149
|
+
brand: x,
|
|
149
150
|
density: L,
|
|
150
151
|
typography: R,
|
|
151
152
|
glass: z,
|
|
@@ -167,8 +168,8 @@ function m({ children: t, defaultMode: n = "system", defaultBrand: c = "default"
|
|
|
167
168
|
colorMode: I,
|
|
168
169
|
toggleColorMode: $
|
|
169
170
|
}), [
|
|
170
|
-
_,
|
|
171
171
|
y,
|
|
172
|
+
x,
|
|
172
173
|
L,
|
|
173
174
|
R,
|
|
174
175
|
z,
|
|
@@ -189,18 +190,18 @@ function m({ children: t, defaultMode: n = "system", defaultBrand: c = "default"
|
|
|
189
190
|
Q,
|
|
190
191
|
$
|
|
191
192
|
]);
|
|
192
|
-
return /* @__PURE__ */
|
|
193
|
-
value:
|
|
194
|
-
children:
|
|
193
|
+
return /* @__PURE__ */ c(h.Provider, {
|
|
194
|
+
value: ne,
|
|
195
|
+
children: n
|
|
195
196
|
});
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
-
let e =
|
|
198
|
+
function _() {
|
|
199
|
+
let e = r(h);
|
|
199
200
|
if (!e) throw Error("useTheme must be used within a ThemeProvider");
|
|
200
201
|
return e;
|
|
201
202
|
}
|
|
202
|
-
function
|
|
203
|
-
return
|
|
203
|
+
function v() {
|
|
204
|
+
return r(h);
|
|
204
205
|
}
|
|
205
206
|
//#endregion
|
|
206
|
-
export {
|
|
207
|
+
export { u as THEME_OPTIONS, g as ThemeProvider, _ as useTheme, v as useThemeOrNull };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Brand } from './ThemeProvider';
|
|
2
|
+
/**
|
|
3
|
+
* The `data-brand` attribute value for a brand. Both spellings of a renamed
|
|
4
|
+
* product (`botlit` / `botmanor`) resolve to ONE brand token, so they always
|
|
5
|
+
* get the same theme; every other brand is emitted unchanged.
|
|
6
|
+
*
|
|
7
|
+
* Lives outside ThemeProvider.tsx so that file only exports components/types
|
|
8
|
+
* (React Fast Refresh).
|
|
9
|
+
*/
|
|
10
|
+
export declare function brandAttribute(brand: Brand): string;
|
|
11
|
+
//# sourceMappingURL=brandAttribute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brandAttribute.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/brandAttribute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEnD"}
|