@burdenoff/fe-libs 2026.1116.8 → 2026.1117.2

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.
@@ -32,7 +32,7 @@ var c = ({ organizations: e, searchedOrganizations: t, currentOrganizationId: n,
32
32
  children: l
33
33
  })]
34
34
  }),
35
- t.id === n && /* @__PURE__ */ o(i, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200" })
35
+ t.id === n && /* @__PURE__ */ o(i, { className: "size-5 text-action-primary-bg flex-shrink-0 animate-in zoom-in-50 duration-200" })
36
36
  ]
37
37
  }, t.id);
38
38
  }) : /* @__PURE__ */ o(u, { isSearchResult: c.length > 0 })
@@ -26,7 +26,7 @@ var s = ({ filteredProjects: s, searchedProjects: c, currentProjectId: l, search
26
26
  className: "flex-1 text-start",
27
27
  children: h("contextSwitcher.allProjectsWorkspaceWide", "All projects (workspace-wide)")
28
28
  }),
29
- !l && /* @__PURE__ */ a(r, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0" })
29
+ !l && /* @__PURE__ */ a(r, { className: "size-5 text-action-primary-bg flex-shrink-0" })
30
30
  ]
31
31
  }), s.length === 0 ? /* @__PURE__ */ a(n, { message: h("contextSwitcher.noProjectsInWorkspace", "No projects in this workspace") }) : c.length > 0 ? c.map((e, t) => /* @__PURE__ */ o("button", {
32
32
  onClick: () => f(e),
@@ -38,7 +38,7 @@ var s = ({ filteredProjects: s, searchedProjects: c, currentProjectId: l, search
38
38
  className: "flex-1 text-start truncate",
39
39
  children: e.name
40
40
  }),
41
- e.id === l && /* @__PURE__ */ a(r, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200" })
41
+ e.id === l && /* @__PURE__ */ a(r, { className: "size-5 text-action-primary-bg flex-shrink-0 animate-in zoom-in-50 duration-200" })
42
42
  ]
43
43
  }, e.id)) : /* @__PURE__ */ a(n, {
44
44
  message: h("projectsList.noProjectsFound", "No projects found"),
@@ -25,7 +25,7 @@ var s = ({ filteredWorkspaces: s, searchedWorkspaces: c, currentWorkspaceId: l,
25
25
  className: "flex-1 text-start truncate",
26
26
  children: e.name
27
27
  }),
28
- e.id === l && /* @__PURE__ */ a(i, { className: "size-5 text-[var(--color-action-primary-bg)] flex-shrink-0 animate-in zoom-in-50 duration-200" })
28
+ e.id === l && /* @__PURE__ */ a(i, { className: "size-5 text-action-primary-bg flex-shrink-0 animate-in zoom-in-50 duration-200" })
29
29
  ]
30
30
  }, e.id)) : /* @__PURE__ */ a(n, {
31
31
  message: m("workspaces.list.emptyNoneTitle", "No workspaces found"),
@@ -133,7 +133,7 @@ function h({ productId: f, slugMap: h = m, homeRoute: g = "/", homeLabel: _ = "B
133
133
  })]
134
134
  }),
135
135
  /* @__PURE__ */ c("article", {
136
- className: "\n prose prose-sm md:prose-base\n max-w-none\n text-text-primary\n [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:text-text-primary [&_h1]:mt-8 [&_h1]:mb-4\n [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:text-text-primary [&_h2]:mt-6 [&_h2]:mb-3\n [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-text-primary [&_h3]:mt-5 [&_h3]:mb-2\n [&_h4]:text-base [&_h4]:font-medium [&_h4]:text-text-primary [&_h4]:mt-4 [&_h4]:mb-2\n [&_p]:text-text-secondary [&_p]:leading-relaxed [&_p]:mb-4\n [&_a]:text-[var(--color-action-primary-bg)] [&_a]:underline [&_a]:hover:opacity-80\n [&_ul]:list-disc [&_ul]:ps-6 [&_ul]:mb-4 [&_ul]:text-text-secondary\n [&_ol]:list-decimal [&_ol]:ps-6 [&_ol]:mb-4 [&_ol]:text-text-secondary\n [&_li]:mb-1 [&_li]:leading-relaxed\n [&_strong]:text-text-primary [&_strong]:font-semibold\n [&_em]:italic\n [&_blockquote]:border-s-4 [&_blockquote]:border-[var(--color-border-emphasis)]\n [&_blockquote]:ps-4 [&_blockquote]:py-2 [&_blockquote]:my-4\n [&_blockquote]:bg-[var(--color-bg-subtle)] [&_blockquote]:rounded-e-lg\n [&_blockquote_p]:text-text-secondary\n [&_code]:bg-[var(--color-bg-subtle)] [&_code]:px-1.5 [&_code]:py-0.5\n [&_code]:rounded [&_code]:text-sm [&_code]:font-mono\n [&_pre]:bg-[var(--color-bg-subtle)] [&_pre]:p-4 [&_pre]:rounded-lg\n [&_pre]:overflow-x-auto [&_pre]:mb-4\n [&_pre_code]:bg-transparent [&_pre_code]:p-0\n [&_hr]:border-default [&_hr]:my-8\n [&_table]:w-full [&_table]:border-collapse [&_table]:mb-4\n [&_th]:border [&_th]:border-default [&_th]:px-4 [&_th]:py-2\n [&_th]:bg-[var(--color-bg-subtle)] [&_th]:text-start [&_th]:font-medium\n [&_td]:border [&_td]:border-default [&_td]:px-4 [&_td]:py-2\n ",
136
+ className: "\n prose prose-sm md:prose-base\n max-w-none\n text-text-primary\n [&_h1]:text-2xl [&_h1]:font-bold [&_h1]:text-text-primary [&_h1]:mt-8 [&_h1]:mb-4\n [&_h2]:text-xl [&_h2]:font-semibold [&_h2]:text-text-primary [&_h2]:mt-6 [&_h2]:mb-3\n [&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-text-primary [&_h3]:mt-5 [&_h3]:mb-2\n [&_h4]:text-base [&_h4]:font-medium [&_h4]:text-text-primary [&_h4]:mt-4 [&_h4]:mb-2\n [&_p]:text-text-secondary [&_p]:leading-relaxed [&_p]:mb-4\n [&_a]:text-action-primary-bg [&_a]:underline [&_a]:hover:opacity-80\n [&_ul]:list-disc [&_ul]:ps-6 [&_ul]:mb-4 [&_ul]:text-text-secondary\n [&_ol]:list-decimal [&_ol]:ps-6 [&_ol]:mb-4 [&_ol]:text-text-secondary\n [&_li]:mb-1 [&_li]:leading-relaxed\n [&_strong]:text-text-primary [&_strong]:font-semibold\n [&_em]:italic\n [&_blockquote]:border-s-4 [&_blockquote]:border-[var(--color-border-emphasis)]\n [&_blockquote]:ps-4 [&_blockquote]:py-2 [&_blockquote]:my-4\n [&_blockquote]:bg-[var(--color-bg-subtle)] [&_blockquote]:rounded-e-lg\n [&_blockquote_p]:text-text-secondary\n [&_code]:bg-[var(--color-bg-subtle)] [&_code]:px-1.5 [&_code]:py-0.5\n [&_code]:rounded [&_code]:text-sm [&_code]:font-mono\n [&_pre]:bg-[var(--color-bg-subtle)] [&_pre]:p-4 [&_pre]:rounded-lg\n [&_pre]:overflow-x-auto [&_pre]:mb-4\n [&_pre_code]:bg-transparent [&_pre_code]:p-0\n [&_hr]:border-default [&_hr]:my-8\n [&_table]:w-full [&_table]:border-collapse [&_table]:mb-4\n [&_th]:border [&_th]:border-default [&_th]:px-4 [&_th]:py-2\n [&_th]:bg-[var(--color-bg-subtle)] [&_th]:text-start [&_th]:font-medium\n [&_td]:border [&_td]:border-default [&_td]:px-4 [&_td]:py-2\n ",
137
137
  children: /* @__PURE__ */ c(t, { children: b.content })
138
138
  }),
139
139
  /* @__PURE__ */ c("div", {
@@ -1,15 +1,15 @@
1
1
  import { desktopSetTheme as e } from "../../native/desktop.js";
2
2
  import { brandAttribute as t } from "./brandAttribute.js";
3
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
+ import { jsx as ee } from "react/jsx-runtime";
5
5
  // src/shared/providers/shell/ThemeProvider.tsx
6
- var l = /* @__PURE__ */ new Set([
6
+ var c = /* @__PURE__ */ new Set([
7
7
  "dark",
8
8
  "forest",
9
9
  "ocean",
10
10
  "sunset",
11
11
  "high-contrast"
12
- ]), u = [
12
+ ]), l = [
13
13
  {
14
14
  value: "light",
15
15
  label: "Light",
@@ -40,10 +40,10 @@ var l = /* @__PURE__ */ new Set([
40
40
  label: "High Contrast",
41
41
  family: "dark"
42
42
  }
43
- ], d = (e) => l.has(e) ? "dark" : "light";
44
- function f(e) {
43
+ ], u = (e) => c.has(e) ? "dark" : "light";
44
+ function d(e) {
45
45
  let t = /^#?([0-9a-f]{6})$/i.exec(e.trim());
46
- if (!t) return 0;
46
+ if (!t) return null;
47
47
  let n = parseInt(t[1], 16), r = [
48
48
  n >> 16 & 255,
49
49
  n >> 8 & 255,
@@ -54,7 +54,7 @@ function f(e) {
54
54
  });
55
55
  return .2126 * r[0] + .7152 * r[1] + .0722 * r[2];
56
56
  }
57
- var p = (e) => f(e) > .45;
57
+ var f = (e) => d(e) ?? 0, p = (e) => f(e) > .45;
58
58
  function m(e, t) {
59
59
  if (typeof window > "u") return t;
60
60
  try {
@@ -65,10 +65,10 @@ function m(e, t) {
65
65
  }
66
66
  }
67
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, [
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
70
  y,
71
- k,
71
+ A,
72
72
  j
73
73
  ]), [P, F] = s(() => y === "custom" ? "light" : y === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : y);
74
74
  a(() => {
@@ -78,13 +78,15 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
78
78
  }
79
79
  F(y === "custom" ? N?.base ?? "light" : y);
80
80
  }, [y, N]);
81
- let I = d(P), L = N?.density ?? ee, R = N?.typography ?? C, z = N?.glass ?? T, B = N?.reduceMotion ?? D;
81
+ let I = u(P), L = N?.density ?? C, R = N?.typography ?? w, z = N?.glass ?? E, B = N?.reduceMotion ?? O;
82
82
  a(() => {
83
83
  let n = document.documentElement;
84
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) {
85
85
  let e = N.accent;
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)`), n.style.setProperty("--color-action-primary-text", p(e) ? "#0a0a0a" : "#ffffff");
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");
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
+ } 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");
88
90
  let r = () => {
89
91
  let t = getComputedStyle(n).getPropertyValue("--color-bg-canvas").trim();
90
92
  e({
@@ -114,28 +116,28 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
114
116
  }, [V]), W = i((e) => {
115
117
  te(e), V("density", e);
116
118
  }, [V]), G = i((e) => {
117
- w(e), V("typography", e);
119
+ T(e), V("typography", e);
118
120
  }, [V]), K = i((e) => {
119
- E(e), V("glass", e);
121
+ D(e), V("glass", e);
120
122
  }, [V]), q = i((e) => {
121
- O(e), V("reduce-motion", e ? "1" : "0");
123
+ k(e), V("reduce-motion", e ? "1" : "0");
122
124
  }, [V]), J = i((e) => {
123
- A(e), localStorage.setItem(`${_}-custom-list`, JSON.stringify(e));
125
+ ne(e), localStorage.setItem(`${_}-custom-list`, JSON.stringify(e));
124
126
  }, [_]), Y = i((e) => {
125
127
  let t = typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `ct-${Date.now()}-${Math.floor(performance.now())}`, n = {
126
128
  ...e,
127
129
  id: t
128
130
  };
129
- return J([...k, n]), n;
130
- }, [k, J]), X = i((e, t) => {
131
- J(k.map((n) => n.id === e ? {
131
+ return J([...A, n]), n;
132
+ }, [A, J]), X = i((e, t) => {
133
+ J(A.map((n) => n.id === e ? {
132
134
  ...n,
133
135
  ...t
134
136
  } : n));
135
- }, [k, J]), Z = i((e) => {
136
- J(k.filter((t) => t.id !== e)), j === e && (M(null), V("active-custom", ""), H("system"));
137
+ }, [A, J]), Z = i((e) => {
138
+ J(A.filter((t) => t.id !== e)), j === e && (M(null), V("active-custom", ""), H("system"));
137
139
  }, [
138
- k,
140
+ A,
139
141
  J,
140
142
  j,
141
143
  V,
@@ -144,7 +146,7 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
144
146
  M(e), V("active-custom", e), H("custom");
145
147
  }, [V, H]), $ = i(() => {
146
148
  H(I === "light" ? "dark" : "light");
147
- }, [I, H]), ne = o(() => ({
149
+ }, [I, H]), re = o(() => ({
148
150
  mode: y,
149
151
  brand: x,
150
152
  density: L,
@@ -159,7 +161,7 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
159
161
  setTypography: G,
160
162
  setGlass: K,
161
163
  setReduceMotion: q,
162
- customThemes: k,
164
+ customThemes: A,
163
165
  activeCustomId: j,
164
166
  createCustomTheme: Y,
165
167
  updateCustomTheme: X,
@@ -182,7 +184,7 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
182
184
  G,
183
185
  K,
184
186
  q,
185
- k,
187
+ A,
186
188
  j,
187
189
  Y,
188
190
  X,
@@ -190,8 +192,8 @@ function g({ children: n, defaultMode: r = "system", defaultBrand: l = "default"
190
192
  Q,
191
193
  $
192
194
  ]);
193
- return /* @__PURE__ */ c(h.Provider, {
194
- value: ne,
195
+ return /* @__PURE__ */ ee(h.Provider, {
196
+ value: re,
195
197
  children: n
196
198
  });
197
199
  }
@@ -203,4 +205,4 @@ function _() {
203
205
  function v() {
204
206
  return r(h);
205
207
  }
206
- export { u as THEME_OPTIONS, g as ThemeProvider, _ as useTheme, v as useThemeOrNull };
208
+ export { l as THEME_OPTIONS, g as ThemeProvider, _ as useTheme, v as useThemeOrNull };
@@ -52,7 +52,7 @@ function u({ steps: i, title: c, storageKey: u, className: d }) {
52
52
  type: "button",
53
53
  onClick: () => _(!1),
54
54
  className: e("inline-flex items-center gap-1.5 rounded-full border border-border-seam bg-[var(--color-surface-glass)] px-3 py-1.5 text-xs font-medium text-text-secondary shadow-elevation-1 backdrop-blur-[var(--blur-glass)] transition-[box-shadow,border-color] hover:border-border-strong hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", d),
55
- children: [/* @__PURE__ */ a(s, { className: "size-3.5 text-[var(--color-action-primary-bg)]" }), "Show suggestions"]
55
+ children: [/* @__PURE__ */ a(s, { className: "size-3.5 text-action-primary-bg" }), "Show suggestions"]
56
56
  });
57
57
  let v = i.filter((e) => !e.done).length;
58
58
  return /* @__PURE__ */ o("section", {
@@ -63,7 +63,7 @@ function u({ steps: i, title: c, storageKey: u, className: d }) {
63
63
  children: [/* @__PURE__ */ o("h3", {
64
64
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
65
65
  children: [
66
- /* @__PURE__ */ a(s, { className: "size-4 text-[var(--color-action-primary-bg)]" }),
66
+ /* @__PURE__ */ a(s, { className: "size-4 text-action-primary-bg" }),
67
67
  p,
68
68
  v > 0 && /* @__PURE__ */ o("span", {
69
69
  className: "rounded-full bg-[color-mix(in_oklab,var(--color-action-primary-bg)_18%,transparent)] px-2 py-0.5 text-[11px] font-medium text-text-secondary",
@@ -99,7 +99,7 @@ function u({ steps: i, title: c, storageKey: u, className: d }) {
99
99
  },
100
100
  className: e("group flex w-full items-start gap-3 rounded-lg px-2.5 py-2 text-start transition-colors hover:bg-[var(--color-surface-glass)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", t.done && "opacity-60"),
101
101
  children: [/* @__PURE__ */ a("span", {
102
- className: e("mt-0.5 grid size-7 shrink-0 place-items-center rounded-full border text-[var(--color-action-primary-bg)]", t.done ? "border-border-subtle bg-bg-muted text-text-muted" : "border-[color-mix(in_oklab,var(--color-action-primary-bg)_35%,transparent)] bg-[color-mix(in_oklab,var(--color-action-primary-bg)_12%,transparent)]"),
102
+ className: e("mt-0.5 grid size-7 shrink-0 place-items-center rounded-full border text-action-primary-bg", t.done ? "border-border-subtle bg-bg-muted text-text-muted" : "border-[color-mix(in_oklab,var(--color-action-primary-bg)_35%,transparent)] bg-[color-mix(in_oklab,var(--color-action-primary-bg)_12%,transparent)]"),
103
103
  children: t.done ? /* @__PURE__ */ a("svg", {
104
104
  viewBox: "0 0 24 24",
105
105
  className: "size-4",
@@ -2,7 +2,7 @@ import { cn as e } from "../shared-utils.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import { cva as n } from "class-variance-authority";
4
4
  // src/ui/icon-tile.tsx
5
- var r = n("inline-flex shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-[var(--color-accent-primary)]", {
5
+ var r = n("inline-flex shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent-primary", {
6
6
  variants: { size: {
7
7
  sm: "size-8 [&>svg]:size-4",
8
8
  md: "size-10 [&>svg]:size-5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.1116.8",
3
+ "version": "2026.1117.2",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "repository": {
6
6
  "type": "git",
@@ -287,6 +287,10 @@
287
287
  "style": "./src/shared/styles/canvas-theme.css",
288
288
  "default": "./src/shared/styles/canvas-theme.css"
289
289
  },
290
+ "./shared/styles/depth-theme.css": {
291
+ "style": "./src/shared/styles/depth-theme.css",
292
+ "default": "./src/shared/styles/depth-theme.css"
293
+ },
290
294
  "./shared/utils/lazyWithRetry": {
291
295
  "types": "./dist/shared/utils/lazyWithRetry.d.ts",
292
296
  "import": "./dist/shared/utils/lazyWithRetry.js"
@@ -0,0 +1,23 @@
1
+ /* BOFF-15055: the depth layer's accent ink for Tailwind's text utilities (FluidGrids).
2
+ *
3
+ * The accent has two jobs: a fill (the primary button, a checked control, a ring, a border)
4
+ * and ink (text and icons drawn with text-primary, text-accent-primary or
5
+ * text-action-primary-bg). In the dark themes the fill is a mid-tone that carries a label, too
6
+ * dark to read as text on the page, so the depth layer (shared/tokens/depth.css) sets
7
+ * --color-accent-text, the theme's bright accent, under <html data-depth="rich">. These entries
8
+ * make the three text utilities read it; every other utility keeps the fill, because Tailwind
9
+ * reads the text utilities' colour from --text-color-* before --color-*.
10
+ *
11
+ * Inline, so each utility resolves the token on its own element (a subtree that changes the
12
+ * accent, like the sidebar's current item, still reaches it). Without the opt-in the token is
13
+ * unset and each utility falls back to exactly what it read before: nothing changes for a page
14
+ * that never sets data-depth.
15
+ *
16
+ * Import it in the app's Tailwind entry, next to tokens.css:
17
+ * @import '@burdenoff/fe-libs/shared/styles/depth-theme.css';
18
+ * shared/utils/depthTheme.test.ts compiles it with Tailwind and pins what it generates. */
19
+ @theme inline {
20
+ --text-color-primary: var(--color-accent-text, var(--color-primary));
21
+ --text-color-accent-primary: var(--color-accent-text, var(--color-accent-primary));
22
+ --text-color-action-primary-bg: var(--color-accent-text, var(--color-action-primary-bg));
23
+ }
@@ -40,8 +40,10 @@
40
40
  *
41
41
  * Rules of this file:
42
42
  * - Colours only from tokens (the two accent glows, the gloss tokens, the pop and elevation
43
- * shadows, --boff-on-glow, the text and border tokens) and `transparent`; motion only from
44
- * the --motion-* tokens and the existing boff-rise keyframes.
43
+ * shadows, --boff-on-glow, the text, border and canvas tokens, the action tokens of the
44
+ * button fills, and the palette's white and black that a custom accent's glow is mixed
45
+ * with) and `transparent`; motion only from the --motion-* tokens and the existing
46
+ * boff-rise keyframes.
45
47
  * - Unlayered like the rest of tokens.css, so it wins over the layered Tailwind utilities it
46
48
  * decorates without !important. That is also why it never sets a border colour at rest and
47
49
  * never touches a focused element's box-shadow, outline or border: a consumer's meaning and
@@ -74,10 +76,24 @@
74
76
  * (written as `> * > ...` steps they measured four to seven times slower).
75
77
  * depthLayer.test.ts pins all of this; the browser run measures it.
76
78
  * - A selector breaks across lines only where it already has a descendant combinator.
77
- * - The strengths below are the most each theme allows while every text token that reads at
78
- * 4.5:1 today keeps 4.5:1, and every icon and bar that reads at 3:1 keeps 3:1, on what the
79
- * layer paints, under the glow where it shows below the top bar
80
- * (shared/utils/depthContrast.test.ts, which also pins the pairs that fail before it). */
79
+ * - The strengths below are the most each theme allows while every text pair reads at 4.5:1
80
+ * and every icon, bar and control at 3:1, on what the layer paints, under the glow where it
81
+ * shows below the top bar (shared/utils/depthContrast.test.ts, which also pins the one pair
82
+ * that fails before it). Four colour changes, all under the opt-in, let the glow reach the
83
+ * approved strength (BOFF-15055):
84
+ * the accent ink --color-accent-text: the accent as text and icons. The accent fill
85
+ * (the primary button's colour) is a mid-tone in the dark themes, too
86
+ * dark to read as text there; the ink is the theme's bright accent.
87
+ * Tailwind's text utilities read it through styles/depth-theme.css,
88
+ * which FluidGrids imports; fills, borders and rings keep the fill.
89
+ * a deeper hover forest, ocean and sunset step their primary button LIGHTER on
90
+ * hover under a white label (3.5:1); here it steps to the pressed fill.
91
+ * muted text on a page, the secondary text a little dimmed (dark themes).
92
+ * deeper fills on a page, fe-libs Button's white-label fills (the destructive one,
93
+ * and the primary one in forest, ocean and sunset) a step deeper.
94
+ * The first two hold app-wide (they fix pairs that fail without the glow); the last two only
95
+ * where the glow is. Under a custom accent the glow tokens themselves become the person's
96
+ * colour, also app-wide, and the glow's strength follows that colour (BOFF-15067, below). */
81
97
 
82
98
  @media screen and (forced-colors: none) {
83
99
  @supports (color: color-mix(in oklab, red 50%, transparent)) {
@@ -101,35 +117,142 @@
101
117
  --depth-row-wash: 8%;
102
118
  /* D4: the accent sheen inside a primary button (the light accent equals the button). */
103
119
  --depth-button-sheen: 22%;
104
- /* D6: the sidebar's current item, and how much of the primary text its subtitle takes. */
120
+ /* D6: the sidebar's current item (its wash from the start edge, and the second accent at
121
+ * its end), and how much of the primary text its subtitle takes. */
105
122
  --depth-nav-wash: 24%;
123
+ --depth-nav-wash-end: 8%;
106
124
  --depth-nav-subtitle: 0%;
125
+ /* A custom accent's ink: this share of the person's accent, the rest the text colour. */
126
+ --depth-custom-ink: 35%;
127
+ /* A custom accent's white-label primary button on a page: this share of the accent, the
128
+ * rest the darkest token of the base, under the base's light label. */
129
+ --depth-custom-fill: 58%;
130
+ /* A custom accent's glows (BOFF-15067; the custom rule below): the person's accent at
131
+ * these luminances (the theme's are #0E7490 and #4F46E5, 0.15 and 0.12), and the accent
132
+ * luminances between which the D1 glow goes from all of its strength (at
133
+ * --depth-custom-full) to none (at --depth-custom-off). A light base takes deep accents. */
134
+ --depth-custom-glow-y: 0.15;
135
+ --depth-custom-glow-alt-y: 0.18;
136
+ --depth-custom-full: 0.26;
137
+ --depth-custom-off: 0.28;
107
138
  }
108
139
  /* ThemeProvider sets .dark for the dark, forest, ocean and sunset themes. */
109
140
  :root[data-depth='rich']:not([data-theme='high-contrast']).dark {
110
- /* "screen" lightens the dark page. */
111
- --depth-mesh-a: 10%;
112
- --depth-mesh-b: 10%;
141
+ /* "screen" lightens the dark page: the approved 26% and 20%. */
142
+ --depth-mesh-a: 26%;
143
+ --depth-mesh-b: 20%;
113
144
  --depth-blend: screen;
114
145
  --depth-nav-subtitle: 30%;
146
+ /* Muted text on a page: the secondary text with this share of it kept against the canvas
147
+ * (the rest is the canvas), so it still reads a step below the secondary text. */
148
+ --depth-muted-share: 93%;
149
+ /* A white label's fill on a page: this share of the resting fill, the rest the pressed
150
+ * fill. */
151
+ --depth-label-fill: 50%;
152
+ /* A custom accent on a dark base: bright glows (the theme's are #22D3EE and #8AA8FF, 0.53
153
+ * and 0.41), all of the D1 glow from a bright accent, none under a dark one. */
154
+ --depth-custom-glow-y: 0.4;
155
+ --depth-custom-glow-alt-y: 0.28;
156
+ --depth-custom-full: 0.25;
157
+ --depth-custom-off: 0.155;
115
158
  }
116
- /* White labels on a mid-tone accent: any sheen takes them under 4.5:1. */
159
+ /* White labels on a mid-tone accent: any sheen takes them under 4.5:1. The glows are the
160
+ * dark theme's 26% and 20% scaled alike, to the most each theme allows. */
117
161
  :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='forest'] {
118
- --depth-mesh-a: 9.5%;
119
- --depth-mesh-b: 10%;
162
+ --depth-mesh-a: 17%;
163
+ --depth-mesh-b: 13.5%;
120
164
  --depth-button-sheen: 0%;
121
165
  }
122
166
  :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='ocean'] {
123
- --depth-mesh-a: 7.5%;
124
- --depth-mesh-b: 9%;
167
+ --depth-mesh-a: 19.5%;
168
+ --depth-mesh-b: 18%;
125
169
  --depth-button-sheen: 0%;
126
170
  }
127
171
  :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='sunset'] {
128
- --depth-mesh-a: 10.5%;
129
- --depth-mesh-b: 11%;
172
+ --depth-mesh-a: 15%;
173
+ --depth-mesh-b: 12%;
130
174
  --depth-button-sheen: 0%;
131
175
  }
132
176
 
177
+ /* ---------- Colour: the accent ink and a deeper hover, app-wide ----------
178
+ * Both hold everywhere under the opt-in (menus, dialogs and the sidebar too): they fix pairs
179
+ * that fail without the glow. The ink is the theme's bright accent (in the light theme it
180
+ * equals the fill, so nothing changes there). */
181
+ :root[data-depth='rich']:not([data-theme='high-contrast']) {
182
+ --color-accent-text: var(--color-accent-glow);
183
+ }
184
+ /* A custom accent (Appearance › Custom accent): ThemeProvider puts the person's accent inline
185
+ * as the action fill, with the label its luminance picks and that luminance itself
186
+ * (--custom-accent-luminance, a plain number: CSS cannot read a colour's luminance), and marks
187
+ * <html data-accent="custom"> (and data-accent-label="dark" when the label is the dark one).
188
+ * The editor takes any colour, so what follows holds for any accent, on either base
189
+ * (depthContrast.test.ts checks 216 colours across the range, white and black, the accents
190
+ * Appearance names, and a finer sweep around the thresholds below):
191
+ * - the ink is --depth-custom-ink of the person's accent, the rest the text colour (lighter
192
+ * on a dark base, darker on a light one): it retints the text, at 4.5:1 or more;
193
+ * - the two glow tokens are the person's accent at the luminances --depth-custom-glow-y and
194
+ * --depth-custom-glow-alt-y (BOFF-15067), close to the theme's own glows: the accent mixed
195
+ * with white, or a bright one with black (which keeps its hue), in xyz. xyz is linear
196
+ * light, so the share that lands on a luminance is a plain ratio of luminances. Every
197
+ * decoration that paints the glow takes the person's colour (tab underlines, row bars,
198
+ * the field halo, card hover rings, icon tiles, the sidebar's bar, and in tokens.css the
199
+ * /assistant page's box, orbs, tiles, caret and voice button). The glow reads at 4.5:1 as
200
+ * text on the page, and an icon on it (--boff-on-glow) at 3:1 or more;
201
+ * - the D1 glow follows the accent's own luminance (--depth-custom-scale). A ring, a border
202
+ * or a checked box paints the raw accent, and the glow takes such a control under 3:1
203
+ * where the accent is close to 3:1 already (Blue #2563EB reads 3.04:1 on a dark elevated
204
+ * surface, 2.49:1 under its full glow). So the glow is all there up to
205
+ * --depth-custom-full, gone from --depth-custom-off on, and in between it fades along a
206
+ * straight line: a dark base takes it from bright accents, a light base from deep ones.
207
+ * A light base also caps it at 70% of the approved 8% and 6%: under a saturated red glow
208
+ * the destructive button's label reads 4.50:1 at 71%;
209
+ * - the sidebar wash is the person's colour at the approved strengths, and the current
210
+ * item's subtitle takes more of the primary text (20% on a light base, 65% on a dark one),
211
+ * so it keeps 4.5:1 on a light accent's tint under the wash;
212
+ * - the button sheen is the person's colour at the approved 22% on a light base, under a
213
+ * white label. On a dark base it stays off, as in forest, ocean and sunset: the glow
214
+ * lightens a white label's fill, and the full glow alone takes the label on #529's deeper
215
+ * fill to 3.93:1, so that fill deepens with the glow too (--depth-custom-fill: 58% of the
216
+ * accent with no glow, 50% under the full glow), and a sheen would take it under 4.5:1
217
+ * again. Under the dark label (a light accent) it stays off on either base: the glow is
218
+ * darker than such a fill, so it would shade the button instead of lighting it;
219
+ * - without the luminance (an accent that is not #rrggbb) the glow tokens are the ink, and
220
+ * the D1 glow, the sheen and the wash are off: every value that reads the luminance is then
221
+ * invalid, so each var() that reads one of them takes its fallback;
222
+ * - a white-label primary button on a page takes a deeper fill (below).
223
+ * Same specificity as the `.dark` strengths above, so it comes after them; the `.dark` one
224
+ * below is one class more specific. */
225
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-accent='custom'] {
226
+ --color-accent-text: color-mix(in oklab, var(--color-action-primary-bg) var(--depth-custom-ink), var(--color-text-primary));
227
+ --depth-custom-known: calc(var(--custom-accent-luminance) * 0 + 1);
228
+ --depth-custom-scale: clamp(0, (var(--custom-accent-luminance) - var(--depth-custom-off)) / (var(--depth-custom-full) - var(--depth-custom-off)), 1);
229
+ --depth-custom-glow: color-mix(in xyz, color-mix(in xyz, var(--color-action-primary-bg) calc(min(1, (1 - var(--depth-custom-glow-y)) / max(1 - var(--custom-accent-luminance), 0.001)) * 100%), var(--palette-white)) calc(min(1, var(--depth-custom-glow-y) / max(var(--custom-accent-luminance), 0.001)) * 100%), var(--palette-black));
230
+ --depth-custom-glow-alt: color-mix(in xyz, color-mix(in xyz, var(--color-action-primary-bg) calc(min(1, (1 - var(--depth-custom-glow-alt-y)) / max(1 - var(--custom-accent-luminance), 0.001)) * 100%), var(--palette-white)) calc(min(1, var(--depth-custom-glow-alt-y) / max(var(--custom-accent-luminance), 0.001)) * 100%), var(--palette-black));
231
+ --color-accent-glow: var(--depth-custom-glow, var(--color-accent-text));
232
+ --color-accent-glow-alt: var(--depth-custom-glow-alt, var(--color-accent-text));
233
+ --depth-mesh-a: calc(5.6% * var(--depth-custom-scale, 0));
234
+ --depth-mesh-b: calc(4.2% * var(--depth-custom-scale, 0));
235
+ --depth-button-sheen: calc(22% * var(--depth-custom-known, 0));
236
+ --depth-nav-wash: calc(24% * var(--depth-custom-known, 0));
237
+ --depth-nav-wash-end: calc(8% * var(--depth-custom-known, 0));
238
+ --depth-nav-subtitle: 20%;
239
+ }
240
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-accent='custom'].dark {
241
+ --depth-mesh-a: calc(26% * var(--depth-custom-scale, 0));
242
+ --depth-mesh-b: calc(20% * var(--depth-custom-scale, 0));
243
+ --depth-button-sheen: 0%;
244
+ --depth-nav-subtitle: 65%;
245
+ --depth-custom-fill: calc(58% - 8% * var(--depth-custom-scale, 0));
246
+ }
247
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-accent='custom'][data-accent-label='dark'] {
248
+ --depth-button-sheen: 0%;
249
+ }
250
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='forest'],
251
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='ocean'],
252
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='sunset'] {
253
+ --color-action-primary-bgHover: var(--color-action-primary-bgActive);
254
+ }
255
+
133
256
  /* ---------- D1: a soft two-accent glow over the top of every page ----------
134
257
  * Page roots paint opaque backgrounds, so the glow is an overlay above them, blended
135
258
  * ("screen" or "multiply"), under the sticky top bar (z-30), and it never takes a click.
@@ -258,6 +381,18 @@
258
381
  h1:not(:where([data-depth='off'], [data-depth='off'] *)) {
259
382
  letter-spacing: -0.01em;
260
383
  }
384
+ /* Muted text under the dark glow: the glow lightens the page under it, and today's muted
385
+ * token (5.1-6.5:1) falls under 4.5:1 at the approved strength. On the page box only (the
386
+ * glow never reaches the sidebar, the top bar or a menu), so it reads as the secondary text
387
+ * a little dimmed. Its :root aliases are remapped with it, like D3's light remap: they
388
+ * resolve at :root and would keep the old value. */
389
+ :root[data-depth='rich']:not([data-theme='high-contrast']).dark
390
+ [data-shell-page][data-page-width]:not([data-page-width='tool']):not(:where([data-depth='off'], [data-depth='off'] *)) {
391
+ --color-text-muted: color-mix(in oklab, var(--color-text-secondary) var(--depth-muted-share), var(--color-bg-canvas));
392
+ --color-muted-foreground: var(--color-text-muted);
393
+ --color-content-muted: var(--color-text-muted);
394
+ --color-content-tertiary: var(--color-text-muted);
395
+ }
261
396
 
262
397
  /* ---------- D2: cards ----------
263
398
  * Every card gets the soft edge light (--shadow-pop carries the 1px accent ring) and a
@@ -684,6 +819,54 @@
684
819
  background-image: linear-gradient(135deg, color-mix(in oklab, var(--color-accent-glow) var(--depth-button-sheen), transparent), transparent 60%);
685
820
  box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--color-accent-glow) 80%, transparent);
686
821
  }
822
+ /* White labels under the glow: the glow lightens a mid-tone fill and leaves the white label
823
+ * as it is, so fe-libs Button's white-label fills take a step deeper on a page: halfway (at
824
+ * --depth-label-fill) from the resting fill to the pressed one, and the pressed fill on hover.
825
+ * The resting fill is read from the border token, which equals it in these themes (a
826
+ * custom property cannot read its own earlier value). The button's own variables only, so
827
+ * the same colour as a ring, a border or a checked control elsewhere on the page stays; and
828
+ * never a disabled button, which keeps today's look (as D4's glow does). */
829
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='forest']
830
+ [data-shell-page][data-page-width]:not([data-page-width='tool'])
831
+ [data-slot='button'][data-variant='default']:not(:disabled, [aria-disabled='true']):not(:where([data-depth='off'], [data-depth='off'] *)),
832
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='ocean']
833
+ [data-shell-page][data-page-width]:not([data-page-width='tool'])
834
+ [data-slot='button'][data-variant='default']:not(:disabled, [aria-disabled='true']):not(:where([data-depth='off'], [data-depth='off'] *)),
835
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-theme='sunset']
836
+ [data-shell-page][data-page-width]:not([data-page-width='tool'])
837
+ [data-slot='button'][data-variant='default']:not(:disabled, [aria-disabled='true']):not(:where([data-depth='off'], [data-depth='off'] *)) {
838
+ --color-action-primary-bg: color-mix(in oklab, var(--color-action-primary-border) var(--depth-label-fill), var(--color-action-primary-bgActive));
839
+ }
840
+ /* A custom accent's primary button on a page, where ThemeProvider gave it the white label:
841
+ * it does so up to luminance 0.45, which leaves white at 2.5-3.0:1 on the lighter named
842
+ * accents (Blue #60A5FA 2.54:1) and 4.47:1 on the editor's default. So the fill is
843
+ * --depth-custom-fill of the accent and the rest the base's darkest token, under the base's
844
+ * light label (5.2:1 or more for any such accent); hover and pressed go 15% deeper each.
845
+ * Where ThemeProvider chose the dark label (data-accent-label="dark": a light accent, 9:1 or
846
+ * more with no glow) the button stays as it is. The accent is read from its :root alias
847
+ * --color-accent-primary (the button's own --color-action-primary-bg is what it sets). */
848
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-accent='custom']:not([data-accent-label='dark']).dark
849
+ [data-shell-page][data-page-width]:not([data-page-width='tool'])
850
+ [data-slot='button'][data-variant='default']:not(:disabled, [aria-disabled='true']):not(:where([data-depth='off'], [data-depth='off'] *)) {
851
+ --color-action-primary-bg: color-mix(in oklab, var(--color-accent-primary) var(--depth-custom-fill), var(--color-bg-canvas));
852
+ --color-action-primary-bgHover: color-mix(in oklab, var(--color-action-primary-bg) 85%, var(--color-bg-canvas));
853
+ --color-action-primary-bgActive: color-mix(in oklab, var(--color-action-primary-bgHover) 85%, var(--color-bg-canvas));
854
+ --color-action-primary-text: var(--color-text-primary);
855
+ }
856
+ :root[data-depth='rich']:not([data-theme='high-contrast'])[data-accent='custom']:not([data-accent-label='dark']):not(.dark)
857
+ [data-shell-page][data-page-width]:not([data-page-width='tool'])
858
+ [data-slot='button'][data-variant='default']:not(:disabled, [aria-disabled='true']):not(:where([data-depth='off'], [data-depth='off'] *)) {
859
+ --color-action-primary-bg: color-mix(in oklab, var(--color-accent-primary) var(--depth-custom-fill), var(--color-bg-inverse));
860
+ --color-action-primary-bgHover: color-mix(in oklab, var(--color-action-primary-bg) 85%, var(--color-bg-inverse));
861
+ --color-action-primary-bgActive: color-mix(in oklab, var(--color-action-primary-bgHover) 85%, var(--color-bg-inverse));
862
+ --color-action-primary-text: var(--color-text-inverse);
863
+ }
864
+ :root[data-depth='rich']:not([data-theme='high-contrast']).dark
865
+ [data-shell-page][data-page-width]:not([data-page-width='tool'])
866
+ [data-slot='button'][data-variant='destructive']:not(:disabled, [aria-disabled='true']):not(:where([data-depth='off'], [data-depth='off'] *)) {
867
+ --color-action-danger-bg: color-mix(in oklab, var(--color-action-danger-border) var(--depth-label-fill), var(--color-action-danger-bgActive));
868
+ --color-action-danger-bgHover: var(--color-action-danger-bgActive);
869
+ }
687
870
 
688
871
  /* ---------- D4: a field you type in glows ----------
689
872
  * A soft accent halo drawn with a drop-shadow filter around the field and its own focus
@@ -757,12 +940,12 @@
757
940
  --color-accent-primary: var(--color-accent-glow);
758
941
  --color-text-muted: color-mix(in oklab, var(--color-text-primary) var(--depth-nav-subtitle), var(--color-text-secondary));
759
942
  border-radius: var(--radius-button);
760
- background-image: linear-gradient(to right, color-mix(in oklab, var(--color-accent-glow) var(--depth-nav-wash), transparent), color-mix(in oklab, var(--color-accent-glow-alt) 8%, transparent));
943
+ background-image: linear-gradient(to right, color-mix(in oklab, var(--color-accent-glow) var(--depth-nav-wash), transparent), color-mix(in oklab, var(--color-accent-glow-alt) var(--depth-nav-wash-end), transparent));
761
944
  }
762
945
  :root[data-depth='rich']:not([data-theme='high-contrast'])[dir='rtl']
763
946
  [data-shell-sidebar]
764
947
  [data-active='true']:not(:where([data-depth='off'], [data-depth='off'] *)) {
765
- background-image: linear-gradient(to left, color-mix(in oklab, var(--color-accent-glow) var(--depth-nav-wash), transparent), color-mix(in oklab, var(--color-accent-glow-alt) 8%, transparent));
948
+ background-image: linear-gradient(to left, color-mix(in oklab, var(--color-accent-glow) var(--depth-nav-wash), transparent), color-mix(in oklab, var(--color-accent-glow-alt) var(--depth-nav-wash-end), transparent));
766
949
  }
767
950
  :root[data-depth='rich']:not([data-theme='high-contrast'])
768
951
  [data-shell-sidebar]