@kanzo-tech/theme 0.23.0 → 0.24.0
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/README.md +17 -22
- package/dist/index.d.ts +28 -88
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +177 -182
- package/dist/index.js.map +1 -1
- package/dist/obligations.d.ts.map +1 -1
- package/dist/sections.d.ts +8 -0
- package/dist/sections.d.ts.map +1 -1
- package/package.json +1 -1
- package/theme-data.json +4 -94
- package/themes.css +4 -54
- package/tokens.css +5 -6
package/dist/index.js
CHANGED
|
@@ -1,124 +1,121 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
themes: C,
|
|
7
|
-
prefs: E,
|
|
8
|
-
fallbacks: O
|
|
1
|
+
const $ = { default: "100%", compact: "87.5%", comfortable: "112.5%" }, E = [{ value: "kanzo", label: "Kanzo", dark: !1, family: "kanzo" }, { value: "kanzo-dark", label: "Kanzo Dark", dark: !0, family: "kanzo" }, { value: "catppuccin-latte", label: "Catppuccin Latte", dark: !1, family: "catppuccin" }, { value: "catppuccin-mocha", label: "Catppuccin Mocha", dark: !0, family: "catppuccin" }, { value: "lofi", label: "Lo-fi", dark: !1, family: "lofi" }, { value: "lofi-dark", label: "Lo-fi Dark", dark: !0, family: "lofi" }, { value: "nord", label: "Nord", dark: !1, family: "nord" }, { value: "nord-dark", label: "Nord Dark", dark: !0, family: "nord" }], I = { appearance: { kind: "choice", options: [{ value: "light", label: "Light" }, { value: "dark", label: "Dark" }], default: "light", label: "Appearance", doc: "which side of the document is worn" }, density: { kind: "choice", options: [{ value: "default", label: "Default" }, { value: "compact", label: "Compact" }, { value: "comfortable", label: "Cozy" }], default: "default", attr: "data-font-size", source: "themes", personal: !0, label: "Density", doc: "the root size everything scales from" }, themeByAppearance: { kind: "choice", options: { from: "themes" }, default: "", attr: "data-theme", source: "document", byAppearance: !0, label: "Theme", doc: "which theme is worn on this side" } }, L = { "--secondary-foreground": ["--foreground"], "--accent-foreground": ["--foreground"], "--popover": ["--card"], "--input": ["--border"], "--field": ["--muted"], "--faint": ["--muted-foreground"], "--destructive-foreground": ["--destructive"], "--info-foreground": ["--info"], "--success-foreground": ["--success"], "--warning-foreground": ["--warning"], "--sidebar": ["--popover", "--card"], "--sidebar-foreground": ["--muted-foreground"] }, v = {
|
|
2
|
+
densities: $,
|
|
3
|
+
themes: E,
|
|
4
|
+
prefs: I,
|
|
5
|
+
fallbacks: L
|
|
9
6
|
};
|
|
10
|
-
function
|
|
7
|
+
function M(e, t) {
|
|
11
8
|
if (e.kind !== "choice") return null;
|
|
12
9
|
if (Array.isArray(e.options)) return e.options;
|
|
13
|
-
const
|
|
14
|
-
return
|
|
10
|
+
const n = t == null ? void 0 : t[e.options.from];
|
|
11
|
+
return n && n.length > 0 ? n : null;
|
|
15
12
|
}
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
const
|
|
19
|
-
return Number.isFinite(
|
|
13
|
+
const K = (e) => e === "true";
|
|
14
|
+
function X(e, t) {
|
|
15
|
+
const n = Number.parseFloat(e);
|
|
16
|
+
return Number.isFinite(n) ? n : t.min;
|
|
20
17
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
23
|
-
if (typeof
|
|
18
|
+
function Y(e, t, n, a) {
|
|
19
|
+
const r = (c) => {
|
|
20
|
+
if (typeof c != "string") return !1;
|
|
24
21
|
if (e.kind === "choice") {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
22
|
+
const l = M(e, a);
|
|
23
|
+
return l === null || l.some((d) => d.value === c);
|
|
27
24
|
}
|
|
28
|
-
if (e.kind === "toggle") return
|
|
29
|
-
const
|
|
30
|
-
return Number.isFinite(
|
|
31
|
-
};
|
|
32
|
-
if (
|
|
33
|
-
const
|
|
34
|
-
return
|
|
25
|
+
if (e.kind === "toggle") return c === "true" || c === "false";
|
|
26
|
+
const i = Number.parseFloat(c);
|
|
27
|
+
return Number.isFinite(i) && i >= e.min && i <= e.max;
|
|
28
|
+
}, o = e.personal ? void 0 : n;
|
|
29
|
+
if (r(o == null ? void 0 : o.pinned)) return { value: o.pinned, via: "pinned", offered: !1 };
|
|
30
|
+
const s = !(o != null && o.hidden);
|
|
31
|
+
return s && r(t) ? { value: t, via: "stored", offered: s } : r(n == null ? void 0 : n.default) ? { value: n.default, via: "policy", offered: s } : { value: e.default, via: "default", offered: s };
|
|
35
32
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
for (const [
|
|
39
|
-
const c =
|
|
33
|
+
function H(e, t, n) {
|
|
34
|
+
const a = [], r = e.prefs ?? {};
|
|
35
|
+
for (const [o, s] of Object.entries(t)) {
|
|
36
|
+
const c = r[o];
|
|
40
37
|
if (!c) {
|
|
41
|
-
|
|
42
|
-
token:
|
|
38
|
+
a.push({
|
|
39
|
+
token: o,
|
|
43
40
|
kind: "unknown",
|
|
44
|
-
detail: `"${e.namespace}" declares no preference "${
|
|
41
|
+
detail: `"${e.namespace}" declares no preference "${o}"`
|
|
45
42
|
});
|
|
46
43
|
continue;
|
|
47
44
|
}
|
|
48
45
|
let i, l;
|
|
49
46
|
switch (c.kind) {
|
|
50
47
|
case "choice": {
|
|
51
|
-
const d =
|
|
48
|
+
const d = M(c, n);
|
|
52
49
|
if (d === null) continue;
|
|
53
|
-
const y = d.map((
|
|
54
|
-
i = y.includes(
|
|
50
|
+
const y = d.map((O) => O.value);
|
|
51
|
+
i = y.includes(s), l = y.join(", ");
|
|
55
52
|
break;
|
|
56
53
|
}
|
|
57
54
|
case "toggle": {
|
|
58
|
-
i =
|
|
55
|
+
i = s === "true" || s === "false", l = "true, false";
|
|
59
56
|
break;
|
|
60
57
|
}
|
|
61
58
|
default: {
|
|
62
|
-
const d = Number.parseFloat(
|
|
59
|
+
const d = Number.parseFloat(s);
|
|
63
60
|
i = Number.isFinite(d) && d >= c.min && d <= c.max, l = `${c.min}–${c.max}`;
|
|
64
61
|
}
|
|
65
62
|
}
|
|
66
|
-
i ||
|
|
67
|
-
token:
|
|
63
|
+
i || a.push({
|
|
64
|
+
token: o,
|
|
68
65
|
kind: "shadowed",
|
|
69
|
-
detail: `"${
|
|
66
|
+
detail: `"${s}" is not a legal ${e.namespace}.${o} (${l}). It resolves to the default instead.`
|
|
70
67
|
});
|
|
71
68
|
}
|
|
72
|
-
return
|
|
69
|
+
return a;
|
|
73
70
|
}
|
|
74
|
-
function
|
|
75
|
-
const
|
|
76
|
-
for (let
|
|
77
|
-
return
|
|
71
|
+
function S(e) {
|
|
72
|
+
const n = e.replace(/^--/, "").split("-"), a = [];
|
|
73
|
+
for (let r = 0; r < n.length; r++) a.push(`--${n.slice(r).join("-")}`);
|
|
74
|
+
return a;
|
|
78
75
|
}
|
|
79
|
-
function
|
|
80
|
-
for (const
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
76
|
+
function J(e, t, n) {
|
|
77
|
+
for (const o of S(e)) {
|
|
78
|
+
const s = t[o];
|
|
79
|
+
if (s !== void 0) return { value: s, via: o };
|
|
83
80
|
}
|
|
84
|
-
const
|
|
85
|
-
return
|
|
81
|
+
const a = e.replace(new RegExp(`^--${n.namespace}-`), ""), r = (n.tokens ?? {})[a];
|
|
82
|
+
return r ? { value: r.default, via: `${n.namespace}:default` } : null;
|
|
86
83
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
for (const
|
|
90
|
-
const
|
|
91
|
-
if (!
|
|
92
|
-
|
|
93
|
-
token:
|
|
84
|
+
function Q(e, t) {
|
|
85
|
+
const n = [];
|
|
86
|
+
for (const a of Object.keys(t)) {
|
|
87
|
+
const r = `--${e.namespace}-`;
|
|
88
|
+
if (!a.startsWith(r)) {
|
|
89
|
+
n.push({
|
|
90
|
+
token: a,
|
|
94
91
|
kind: "unknown",
|
|
95
92
|
detail: `not in the "${e.namespace}" namespace — a section may only declare its own`
|
|
96
93
|
});
|
|
97
94
|
continue;
|
|
98
95
|
}
|
|
99
|
-
const
|
|
100
|
-
if (!(
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
token:
|
|
96
|
+
const o = a.slice(r.length);
|
|
97
|
+
if (!(o in (e.tokens ?? {}))) {
|
|
98
|
+
const s = S(a)[1];
|
|
99
|
+
n.push({
|
|
100
|
+
token: a,
|
|
104
101
|
kind: "shadowed",
|
|
105
|
-
detail: `"${e.namespace}" declares no "${
|
|
102
|
+
detail: `"${e.namespace}" declares no "${o}". Unvalidated, this would fall back to ${s ?? "nothing"} and paint something plausible — which is the silent-typo failure this check exists to prevent.`
|
|
106
103
|
});
|
|
107
104
|
}
|
|
108
105
|
}
|
|
109
|
-
return
|
|
106
|
+
return n;
|
|
110
107
|
}
|
|
111
|
-
function
|
|
112
|
-
return e.sections[
|
|
108
|
+
function q(e, t) {
|
|
109
|
+
return e.sections[t] ?? {};
|
|
113
110
|
}
|
|
114
|
-
function
|
|
115
|
-
return { ...e, sections: { ...e.sections, [
|
|
111
|
+
function V(e, t, n) {
|
|
112
|
+
return { ...e, sections: { ...e.sections, [t]: n } };
|
|
116
113
|
}
|
|
117
|
-
const
|
|
114
|
+
const R = v.densities, C = 16, P = (e) => Number.parseFloat(e) / 100 * C, _ = Math.min(...Object.values(R).map(P)), D = 1.5, F = [
|
|
118
115
|
{
|
|
119
116
|
id: "target-size",
|
|
120
117
|
subject: "the smallest interactive control, at the smallest density",
|
|
121
|
-
measured: Number((
|
|
118
|
+
measured: Number((D * _).toFixed(2)),
|
|
122
119
|
threshold: 24,
|
|
123
120
|
holds: ">=",
|
|
124
121
|
unit: "CSS px",
|
|
@@ -136,84 +133,84 @@ const B = v.densities, D = (e) => Number.parseFloat(e), P = Math.min(...Object.v
|
|
|
136
133
|
reason: "Real and not gradeable, and saying so beats inventing a bar. `--kanzo-font-size-xs` is 0.625rem, which is 10px at the default root and 8.75px at compact. What would close it: a house floor with a reason. The honest anchor already exists in the source — the IDE tier justifies `--kanzo-font-size-base` as 13px, 'below Tailwind text-xs', which means the scale was designed against a floor nobody wrote down. Writing that floor down is the work."
|
|
137
134
|
}
|
|
138
135
|
];
|
|
139
|
-
function
|
|
140
|
-
return
|
|
136
|
+
function Z() {
|
|
137
|
+
return F.filter(
|
|
141
138
|
(e) => e.measured !== null && e.threshold !== null
|
|
142
139
|
).map((e) => ({
|
|
143
140
|
...e,
|
|
144
141
|
ok: e.holds === ">=" ? e.measured >= e.threshold : e.holds === "<=" ? e.measured <= e.threshold : e.measured < e.threshold
|
|
145
142
|
}));
|
|
146
143
|
}
|
|
147
|
-
const
|
|
144
|
+
const T = (e) => e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4, g = (e) => e <= 31308e-7 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - 0.055, B = (e) => Math.min(255, Math.max(0, Math.round(e * 255)));
|
|
148
145
|
function k(e) {
|
|
149
|
-
const
|
|
150
|
-
(d) =>
|
|
151
|
-
),
|
|
146
|
+
const t = e.trim().replace(/^#/, ""), [n = 0, a = 0, r = 0] = [0, 2, 4].map(
|
|
147
|
+
(d) => T(Number.parseInt(t.slice(d, d + 2), 16) / 255)
|
|
148
|
+
), o = Math.cbrt(0.4122214708 * n + 0.5363325363 * a + 0.0514459929 * r), s = Math.cbrt(0.2119034982 * n + 0.6806995451 * a + 0.1073969566 * r), c = Math.cbrt(0.0883024619 * n + 0.2817188376 * a + 0.6299787005 * r), i = 1.9779984951 * o - 2.428592205 * s + 0.4505937099 * c, l = 0.0259040371 * o + 0.7827717662 * s - 0.808675766 * c;
|
|
152
149
|
return {
|
|
153
|
-
l: 0.2104542553 *
|
|
150
|
+
l: 0.2104542553 * o + 0.793617785 * s - 0.0040720468 * c,
|
|
154
151
|
c: Math.hypot(i, l),
|
|
155
152
|
h: (Math.atan2(l, i) * 180 / Math.PI + 360) % 360
|
|
156
153
|
};
|
|
157
154
|
}
|
|
158
|
-
function
|
|
159
|
-
const
|
|
155
|
+
function h({ l: e, c: t, h: n }) {
|
|
156
|
+
const a = n * Math.PI / 180, r = t * Math.cos(a), o = t * Math.sin(a), s = (e + 0.3963377774 * r + 0.2158037573 * o) ** 3, c = (e - 0.1055613458 * r - 0.0638541728 * o) ** 3, i = (e - 0.0894841775 * r - 1.291485548 * o) ** 3;
|
|
160
157
|
return `#${[
|
|
161
|
-
g(4.0767416621 *
|
|
162
|
-
g(-1.2684380046 *
|
|
163
|
-
g(-0.0041960863 *
|
|
164
|
-
].map((l) =>
|
|
158
|
+
g(4.0767416621 * s - 3.3077115913 * c + 0.2309699292 * i),
|
|
159
|
+
g(-1.2684380046 * s + 2.6097574011 * c - 0.3413193965 * i),
|
|
160
|
+
g(-0.0041960863 * s - 0.7034186147 * c + 1.707614701 * i)
|
|
161
|
+
].map((l) => B(l).toString(16).padStart(2, "0")).join("")}`;
|
|
165
162
|
}
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
(
|
|
163
|
+
const w = (e) => {
|
|
164
|
+
const t = e.trim().replace(/^#/, ""), [n = 0, a = 0, r = 0] = [0, 2, 4].map(
|
|
165
|
+
(o) => T(Number.parseInt(t.slice(o, o + 2), 16) / 255)
|
|
169
166
|
);
|
|
170
|
-
return 0.2126 *
|
|
167
|
+
return 0.2126 * n + 0.7152 * a + 0.0722 * r;
|
|
171
168
|
};
|
|
172
|
-
function f(e,
|
|
173
|
-
const [
|
|
174
|
-
return (
|
|
169
|
+
function f(e, t) {
|
|
170
|
+
const [n, a] = [w(e), w(t)].sort((r, o) => o - r);
|
|
171
|
+
return (n + 0.05) / (a + 0.05);
|
|
175
172
|
}
|
|
176
|
-
const
|
|
177
|
-
l:
|
|
178
|
-
c: e.c *
|
|
173
|
+
const p = 4.5, m = (e, t, n, a = 0.2) => ({
|
|
174
|
+
l: t ? e.l * (1 - n) : e.l + (1 - e.l) * n,
|
|
175
|
+
c: e.c * a,
|
|
179
176
|
h: e.h
|
|
180
|
-
}),
|
|
181
|
-
function
|
|
182
|
-
const [
|
|
183
|
-
const l =
|
|
184
|
-
return
|
|
185
|
-
l:
|
|
177
|
+
}), z = 0.8, N = 0.9;
|
|
178
|
+
function ee(e, t, n) {
|
|
179
|
+
const [a, r] = [k(e), k(t)], o = (i) => i.h * Math.PI / 180, s = (i) => {
|
|
180
|
+
const l = a.c * Math.cos(o(a)) * i + r.c * Math.cos(o(r)) * (1 - i), d = a.c * Math.sin(o(a)) * i + r.c * Math.sin(o(r)) * (1 - i);
|
|
181
|
+
return h({
|
|
182
|
+
l: a.l * i + r.l * (1 - i),
|
|
186
183
|
c: Math.hypot(l, d),
|
|
187
184
|
h: (Math.atan2(d, l) * 180 / Math.PI + 360) % 360
|
|
188
185
|
});
|
|
189
|
-
}, c =
|
|
190
|
-
if (
|
|
186
|
+
}, c = s(0.6);
|
|
187
|
+
if (n === void 0 || f(c, n) >= p) return c;
|
|
191
188
|
for (let i = 0.58; i >= 0; i -= 0.02) {
|
|
192
|
-
const l =
|
|
193
|
-
if (f(l,
|
|
189
|
+
const l = s(i);
|
|
190
|
+
if (f(l, n) >= p) return l;
|
|
194
191
|
}
|
|
195
|
-
return
|
|
192
|
+
return s(0);
|
|
196
193
|
}
|
|
197
|
-
function
|
|
198
|
-
const
|
|
199
|
-
if (f(e,
|
|
200
|
-
for (let
|
|
201
|
-
const
|
|
202
|
-
if (f(e,
|
|
194
|
+
function x(e, t, n) {
|
|
195
|
+
const a = n ? z : N, r = h(m(t, n, a));
|
|
196
|
+
if (f(e, r) >= p) return r;
|
|
197
|
+
for (let o = a; o <= 1.0001; o += 0.01) {
|
|
198
|
+
const s = h(m(t, n, o));
|
|
199
|
+
if (f(e, s) >= p) return s;
|
|
203
200
|
}
|
|
204
|
-
for (let
|
|
205
|
-
const
|
|
206
|
-
if (f(e,
|
|
201
|
+
for (let o = 0.2; o >= -1e-4; o -= 0.02) {
|
|
202
|
+
const s = h(m(t, n, 1, o));
|
|
203
|
+
if (f(e, s) >= p) return s;
|
|
207
204
|
}
|
|
208
|
-
return m(
|
|
205
|
+
return h(m(t, n, 1, 0));
|
|
209
206
|
}
|
|
210
|
-
function
|
|
211
|
-
const
|
|
212
|
-
if (f(e,
|
|
213
|
-
const
|
|
214
|
-
return f(e,
|
|
207
|
+
function te(e) {
|
|
208
|
+
const t = k(e), n = f(e, h(m(t, !0, z))) >= f(e, h(m(t, !1, N))), a = x(e, t, n);
|
|
209
|
+
if (f(e, a) >= p) return a;
|
|
210
|
+
const r = x(e, t, !n);
|
|
211
|
+
return f(e, r) > f(e, a) ? r : a;
|
|
215
212
|
}
|
|
216
|
-
const u = (e,
|
|
213
|
+
const u = (e, t) => ({ ground: e, ink: t, min: p }), b = (e, t) => ({ ground: e, ink: t, min: 3 }), j = ["keyword", "string", "number", "function", "variable", "property", "type", "annotation"], G = [
|
|
217
214
|
u("--background", "--foreground"),
|
|
218
215
|
u("--card", "--foreground"),
|
|
219
216
|
u("--popover", "--foreground"),
|
|
@@ -232,7 +229,7 @@ const u = (e, n) => ({ ground: e, ink: n, min: h }), b = (e, n) => ({ ground: e,
|
|
|
232
229
|
u("--background", "--info-foreground"),
|
|
233
230
|
u("--background", "--success-foreground"),
|
|
234
231
|
u("--background", "--warning-foreground"),
|
|
235
|
-
...
|
|
232
|
+
...j.flatMap((e) => [
|
|
236
233
|
u("--background", `--syntax-${e}`),
|
|
237
234
|
u("--muted", `--syntax-${e}`)
|
|
238
235
|
]),
|
|
@@ -240,38 +237,36 @@ const u = (e, n) => ({ ground: e, ink: n, min: h }), b = (e, n) => ({ ground: e,
|
|
|
240
237
|
b("--background", "--ring"),
|
|
241
238
|
b("--background", "--input"),
|
|
242
239
|
...[1, 2, 3, 4, 5, 6, 7, 8].map((e) => b("--background", `--chart-${e}`))
|
|
243
|
-
],
|
|
244
|
-
function
|
|
245
|
-
var
|
|
246
|
-
const
|
|
247
|
-
for (const
|
|
248
|
-
const [
|
|
249
|
-
if (!
|
|
250
|
-
const i = f(
|
|
251
|
-
i <
|
|
240
|
+
], A = /^#[0-9a-f]{6}$/i;
|
|
241
|
+
function ne(e, t = G) {
|
|
242
|
+
var a, r;
|
|
243
|
+
const n = [];
|
|
244
|
+
for (const o of t) {
|
|
245
|
+
const [s, c] = [(a = e(o.ground)) == null ? void 0 : a.trim(), (r = e(o.ink)) == null ? void 0 : r.trim()];
|
|
246
|
+
if (!s || !c || !A.test(s) || !A.test(c)) continue;
|
|
247
|
+
const i = f(s, c);
|
|
248
|
+
i < o.min && n.push({ ...o, ratio: i });
|
|
252
249
|
}
|
|
253
|
-
return
|
|
250
|
+
return n;
|
|
254
251
|
}
|
|
255
|
-
const W = v,
|
|
256
|
-
function
|
|
257
|
-
var
|
|
258
|
-
const
|
|
259
|
-
for (const
|
|
260
|
-
const
|
|
261
|
-
|
|
252
|
+
const W = v, ae = v.themes;
|
|
253
|
+
function oe(e) {
|
|
254
|
+
var n;
|
|
255
|
+
const t = /* @__PURE__ */ new Map();
|
|
256
|
+
for (const a of e) {
|
|
257
|
+
const r = a.family ?? a.value, o = t.get(r) ?? t.set(r, { family: r }).get(r);
|
|
258
|
+
o[n = a.dark ? "dark" : "light"] ?? (o[n] = a);
|
|
262
259
|
}
|
|
263
|
-
return [...
|
|
260
|
+
return [...t.values()];
|
|
264
261
|
}
|
|
265
|
-
function
|
|
266
|
-
const
|
|
267
|
-
return { light: (
|
|
262
|
+
function re(e) {
|
|
263
|
+
const t = e.find((a) => !a.dark), n = e.find((a) => a.dark && (t == null ? void 0 : t.family) !== void 0 && a.family === t.family) ?? e.find((a) => a.dark);
|
|
264
|
+
return { light: (t == null ? void 0 : t.value) ?? "", dark: (n == null ? void 0 : n.value) ?? "" };
|
|
268
265
|
}
|
|
269
|
-
const
|
|
270
|
-
//
|
|
266
|
+
const se = 8, ie = {
|
|
267
|
+
// While nothing is stored the OS's `prefers-color-scheme` answers before this does; a host moves
|
|
268
|
+
// the fallback with `policy.theme.appearance.default`.
|
|
271
269
|
appearance: "light",
|
|
272
|
-
radius: "md",
|
|
273
|
-
font: "geist",
|
|
274
|
-
monoFont: "geist-mono",
|
|
275
270
|
density: "default",
|
|
276
271
|
// Empty, and both sides fall through to the tenant's default — so a tenant shipping one theme per
|
|
277
272
|
// side stores nothing and gets the `<html>` it always had. `""` per side means the same thing:
|
|
@@ -282,43 +277,43 @@ const ce = 8, ue = {
|
|
|
282
277
|
// choice* the first time the panel opened — and a default that has been stored can no longer move
|
|
283
278
|
// when the section, or the tenant's policy, changes it.
|
|
284
279
|
sections: {}
|
|
285
|
-
},
|
|
280
|
+
}, ce = "kanzo_theme_prefs", U = W.prefs, ue = "theme", le = Object.entries(U).filter(([, e]) => !!e.attr).map(([e, t]) => ({
|
|
286
281
|
key: e,
|
|
287
|
-
attr:
|
|
288
|
-
def:
|
|
289
|
-
source:
|
|
290
|
-
byAppearance:
|
|
282
|
+
attr: t.attr,
|
|
283
|
+
def: t.default,
|
|
284
|
+
source: t.source ?? "themes",
|
|
285
|
+
byAppearance: t.byAppearance
|
|
291
286
|
}));
|
|
292
287
|
export {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
288
|
+
p as AA,
|
|
289
|
+
le as AXES,
|
|
290
|
+
se as CHART_SLOTS,
|
|
291
|
+
G as CONTRAST_PAIRS,
|
|
292
|
+
ue as CORE_NAMESPACE,
|
|
293
|
+
U as CORE_PREFS,
|
|
294
|
+
ie as DEFAULT_PREFS,
|
|
295
|
+
F as DENSITY_OBLIGATIONS,
|
|
296
|
+
ce as STORAGE_KEY,
|
|
297
|
+
ne as auditContrast,
|
|
298
|
+
Z as checkDensity,
|
|
304
299
|
f as contrast,
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
300
|
+
re as defaultThemePair,
|
|
301
|
+
S as fallbackChain,
|
|
302
|
+
h as hex,
|
|
303
|
+
te as inkFor,
|
|
309
304
|
k as oklch,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
305
|
+
ee as pageInk,
|
|
306
|
+
K as prefBoolean,
|
|
307
|
+
X as prefNumber,
|
|
308
|
+
M as prefOptions,
|
|
309
|
+
Y as resolvePref,
|
|
310
|
+
J as resolveSectionToken,
|
|
311
|
+
q as sectionOf,
|
|
317
312
|
W as themeData,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
313
|
+
oe as themeFamilies,
|
|
314
|
+
ae as themeIndex,
|
|
315
|
+
H as validatePrefs,
|
|
316
|
+
Q as validateSection,
|
|
317
|
+
V as withSection
|
|
323
318
|
};
|
|
324
319
|
//# sourceMappingURL=index.js.map
|