@ttoss/fsl-theme 1.1.12 → 1.1.14
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/Types-BiBa17RL.d.cts +1427 -0
- package/dist/Types-BiBa17RL.d.mts +1427 -0
- package/dist/baseBundle-DxvXyhGa.mjs +17 -0
- package/dist/baseBundle-iEFf5nqT.cjs +22 -0
- package/dist/{esm/chunk-SE5Z52RE.js → createTheme-BLNYztZU.mjs} +76 -172
- package/dist/createTheme-Cv6RP9D6.cjs +1825 -0
- package/dist/css.cjs +48 -0
- package/dist/{css.d.ts → css.d.cts} +67 -63
- package/dist/css.d.mts +168 -0
- package/dist/css.mjs +42 -0
- package/dist/dataviz/index.cjs +45 -0
- package/dist/dataviz/{index.d.ts → index.d.cts} +9 -5
- package/dist/dataviz/index.d.mts +66 -0
- package/dist/dataviz/index.mjs +39 -0
- package/dist/dtcg.cjs +115 -0
- package/dist/{dtcg.d.ts → dtcg.d.cts} +9 -7
- package/dist/dtcg.d.mts +51 -0
- package/dist/dtcg.mjs +112 -0
- package/dist/helpers-4p4-QVt_.cjs +258 -0
- package/dist/helpers-CaswNJMy.mjs +211 -0
- package/dist/{index.d.ts → index-CsIjfw86.d.cts} +42 -34
- package/dist/index-nJrjI0BA.d.mts +94 -0
- package/dist/index.cjs +16 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.mjs +7 -0
- package/dist/{react.d.ts → react-CGa6FlNL.d.cts} +130 -106
- package/dist/react-DnKxR2gK.d.mts +370 -0
- package/dist/react-EUwpdvY7.cjs +481 -0
- package/dist/react.cjs +12 -0
- package/dist/react.d.cts +4 -0
- package/dist/react.d.mts +4 -0
- package/dist/react.mjs +412 -0
- package/dist/runtime-entry.cjs +9 -0
- package/dist/runtime-entry.d.cts +3 -0
- package/dist/runtime-entry.d.mts +3 -0
- package/dist/runtime-entry.mjs +3 -0
- package/dist/{runtime-entry.d.ts → ssrScript-BVysxDws.d.cts} +26 -23
- package/dist/ssrScript-BVysxDws.d.mts +98 -0
- package/dist/ssrScript-CRfrN8Pm.cjs +202 -0
- package/dist/ssrScript-D3kGPQpi.mjs +179 -0
- package/dist/themes/bruttal.cjs +75 -0
- package/dist/themes/bruttal.d.cts +3 -0
- package/dist/themes/bruttal.d.mts +3 -0
- package/dist/themes/bruttal.mjs +72 -0
- package/dist/themes/corporate.cjs +34 -0
- package/dist/themes/corporate.d.cts +3 -0
- package/dist/themes/corporate.d.mts +3 -0
- package/dist/{esm/chunk-TPMN75JM.js → themes/corporate.mjs} +7 -5
- package/dist/themes/oca.cjs +34 -0
- package/dist/themes/oca.d.cts +3 -0
- package/dist/themes/oca.d.mts +3 -0
- package/dist/{esm/chunk-DU4QDQUC.js → themes/oca.mjs} +7 -5
- package/dist/themes/ventures.cjs +34 -0
- package/dist/themes/ventures.d.cts +3 -0
- package/dist/themes/ventures.d.mts +3 -0
- package/dist/{esm/chunk-BXKVVQEP.js → themes/ventures.mjs} +7 -5
- package/dist/toCssVars-CYZCe-on.mjs +286 -0
- package/dist/toCssVars-DudHKvt2.cjs +297 -0
- package/dist/{esm/chunk-4Q4P3JBB.js → tokenRegistry-DjgSN3oU.mjs} +23 -20
- package/dist/tokenRegistry-OhaJ9sPJ.cjs +199 -0
- package/dist/vars.cjs +127 -0
- package/dist/{vars.d.ts → vars.d.cts} +8 -7
- package/dist/vars.d.mts +128 -0
- package/dist/vars.mjs +123 -0
- package/dist/withDataviz-B4pVsOwV.cjs +192 -0
- package/dist/{esm/chunk-FBVUI2PK.js → withDataviz-DY5s7R51.mjs} +40 -12
- package/package.json +6 -6
- package/dist/Types-6tR0_2Ss.d.ts +0 -1452
- package/dist/esm/chunk-5PWPAQMC.js +0 -9
- package/dist/esm/chunk-HRNXVRS3.js +0 -54
- package/dist/esm/chunk-IJGA42O6.js +0 -141
- package/dist/esm/chunk-PQPQNZ73.js +0 -262
- package/dist/esm/chunk-UMRQ4OTX.js +0 -11
- package/dist/esm/chunk-VL6EGE6Z.js +0 -222
- package/dist/esm/chunk-WVQSTQD5.js +0 -192
- package/dist/esm/css.js +0 -6
- package/dist/esm/dataviz/index.js +0 -19
- package/dist/esm/dtcg.js +0 -65
- package/dist/esm/index.js +0 -10
- package/dist/esm/react.js +0 -8
- package/dist/esm/runtime-entry.js +0 -4
- package/dist/esm/themes/bruttal.js +0 -6
- package/dist/esm/themes/corporate.js +0 -6
- package/dist/esm/themes/oca.js +0 -6
- package/dist/esm/themes/ventures.js +0 -6
- package/dist/esm/vars.js +0 -28
- package/dist/themes/bruttal.d.ts +0 -5
- package/dist/themes/corporate.d.ts +0 -5
- package/dist/themes/oca.d.ts +0 -5
- package/dist/themes/ventures.d.ts +0 -5
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __name = (target, value) => __defProp(target, "name", {
|
|
4
|
-
value,
|
|
5
|
-
configurable: true
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
// src/roots/helpers.ts
|
|
9
|
-
var isTokenRef = /* @__PURE__ */__name(value => {
|
|
10
|
-
return typeof value === "string" && value.length > 2 && value.startsWith("{") && value.endsWith("}");
|
|
11
|
-
}, "isTokenRef");
|
|
12
|
-
var extractRefPath = /* @__PURE__ */__name(ref => {
|
|
13
|
-
return ref.slice(1, -1);
|
|
14
|
-
}, "extractRefPath");
|
|
15
|
-
var SAFE_ID_RE = /^[a-zA-Z0-9_-]+$/;
|
|
16
|
-
var COMPOUND_REF_RE = /\{([^}]+)\}/g;
|
|
17
|
-
var isPlainObject = /* @__PURE__ */__name(value => {
|
|
18
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19
|
-
}, "isPlainObject");
|
|
20
|
-
var deepMerge = /* @__PURE__ */__name((base, overrides) => {
|
|
21
|
-
if (!isPlainObject(base) || !isPlainObject(overrides)) {
|
|
22
|
-
return overrides ?? base;
|
|
23
|
-
}
|
|
24
|
-
const result = {
|
|
25
|
-
...base
|
|
26
|
-
};
|
|
27
|
-
for (const key of Object.keys(overrides)) {
|
|
28
|
-
const baseVal = result[key];
|
|
29
|
-
const overVal = overrides[key];
|
|
30
|
-
if (overVal === void 0) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
if (isPlainObject(baseVal) && isPlainObject(overVal)) {
|
|
34
|
-
result[key] = deepMerge(baseVal, overVal);
|
|
35
|
-
} else {
|
|
36
|
-
result[key] = overVal;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return result;
|
|
40
|
-
}, "deepMerge");
|
|
41
|
-
var flattenObject = /* @__PURE__ */__name((obj, prefix = "") => {
|
|
42
|
-
const result = {};
|
|
43
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
44
|
-
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
45
|
-
if (isPlainObject(value)) {
|
|
46
|
-
Object.assign(result, flattenObject(value, fullKey));
|
|
47
|
-
} else if (typeof value === "string" || typeof value === "number") {
|
|
48
|
-
result[fullKey] = value;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}, "flattenObject");
|
|
53
|
-
var flattenTheme = /* @__PURE__ */__name(theme => {
|
|
54
|
-
return {
|
|
55
|
-
core: flattenObject(theme.core, "core"),
|
|
56
|
-
semantic: flattenObject(theme.semantic, "semantic")
|
|
57
|
-
};
|
|
58
|
-
}, "flattenTheme");
|
|
59
|
-
var levenshtein = /* @__PURE__ */__name((a, b) => {
|
|
60
|
-
const m = a.length;
|
|
61
|
-
const n = b.length;
|
|
62
|
-
const dp = Array.from({
|
|
63
|
-
length: m + 1
|
|
64
|
-
}, () => {
|
|
65
|
-
return Array.from({
|
|
66
|
-
length: n + 1
|
|
67
|
-
}, () => {
|
|
68
|
-
return 0;
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
for (let i = 0; i <= m; i++) dp[i][0] = i;
|
|
72
|
-
for (let j = 0; j <= n; j++) dp[0][j] = j;
|
|
73
|
-
for (let i = 1; i <= m; i++) {
|
|
74
|
-
for (let j = 1; j <= n; j++) {
|
|
75
|
-
dp[i][j] = a[i - 1] === b[j - 1] ? dp[i - 1][j - 1] : 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return dp[m][n];
|
|
79
|
-
}, "levenshtein");
|
|
80
|
-
var validateRefs = /* @__PURE__ */__name(theme => {
|
|
81
|
-
const {
|
|
82
|
-
core,
|
|
83
|
-
semantic
|
|
84
|
-
} = flattenTheme(theme);
|
|
85
|
-
const all = {
|
|
86
|
-
...core,
|
|
87
|
-
...semantic
|
|
88
|
-
};
|
|
89
|
-
const allKeys = Object.keys(all);
|
|
90
|
-
const findSuggestion = /* @__PURE__ */__name((refPath, candidates) => {
|
|
91
|
-
if (candidates.length === 0) return "";
|
|
92
|
-
let bestDist = Infinity;
|
|
93
|
-
let bestKey = "";
|
|
94
|
-
for (const candidate of candidates) {
|
|
95
|
-
const dist = levenshtein(refPath, candidate);
|
|
96
|
-
if (dist < bestDist) {
|
|
97
|
-
bestDist = dist;
|
|
98
|
-
bestKey = candidate;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (bestDist <= Math.ceil(refPath.length * 0.4)) {
|
|
102
|
-
return `
|
|
103
|
-
Did you mean '{${bestKey}}'?`;
|
|
104
|
-
}
|
|
105
|
-
return "";
|
|
106
|
-
}, "findSuggestion");
|
|
107
|
-
for (const [ownerKey, value] of Object.entries(all)) {
|
|
108
|
-
if (typeof value !== "string" || !value.includes("{")) continue;
|
|
109
|
-
let match;
|
|
110
|
-
const re = new RegExp(COMPOUND_REF_RE.source, COMPOUND_REF_RE.flags);
|
|
111
|
-
while ((match = re.exec(value)) !== null) {
|
|
112
|
-
const refPath = match[1];
|
|
113
|
-
if (all[refPath] !== void 0) continue;
|
|
114
|
-
const prefix = refPath.split(".")[0];
|
|
115
|
-
const candidates = allKeys.filter(k => {
|
|
116
|
-
return k.startsWith(prefix + ".");
|
|
117
|
-
});
|
|
118
|
-
const suggestion = findSuggestion(refPath, candidates);
|
|
119
|
-
console.warn(`[fsl-theme] Invalid token reference '{${refPath}}' at path '${ownerKey}'.${suggestion}`);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}, "validateRefs");
|
|
123
|
-
var toFlatTokens = /* @__PURE__ */__name((theme, options = {}) => {
|
|
124
|
-
const {
|
|
125
|
-
strict = false
|
|
126
|
-
} = options;
|
|
127
|
-
const {
|
|
128
|
-
core: coreFlat,
|
|
129
|
-
semantic: semanticFlat
|
|
130
|
-
} = flattenTheme(theme);
|
|
131
|
-
const all = {
|
|
132
|
-
...coreFlat,
|
|
133
|
-
...semanticFlat
|
|
134
|
-
};
|
|
135
|
-
const unresolved = [];
|
|
136
|
-
const reportUnresolved = /* @__PURE__ */__name((key, path, reason) => {
|
|
137
|
-
if (strict) unresolved.push(`${key} \u2192 {${path}} (${reason})`);
|
|
138
|
-
}, "reportUnresolved");
|
|
139
|
-
const resolveRef = /* @__PURE__ */__name((value, seen, ownerKey) => {
|
|
140
|
-
if (typeof value !== "string" || !isTokenRef(value)) {
|
|
141
|
-
return value;
|
|
142
|
-
}
|
|
143
|
-
const path = extractRefPath(value);
|
|
144
|
-
if (seen.has(path)) {
|
|
145
|
-
reportUnresolved(ownerKey, path, "circular reference");
|
|
146
|
-
return value;
|
|
147
|
-
}
|
|
148
|
-
const target = all[path];
|
|
149
|
-
if (target === void 0) {
|
|
150
|
-
reportUnresolved(ownerKey, path, "missing target");
|
|
151
|
-
return value;
|
|
152
|
-
}
|
|
153
|
-
seen.add(path);
|
|
154
|
-
return resolveRef(target, seen, ownerKey);
|
|
155
|
-
}, "resolveRef");
|
|
156
|
-
const resolveInline = /* @__PURE__ */__name((value, seen, ownerKey) => {
|
|
157
|
-
return value.replace(COMPOUND_REF_RE, (_match, path) => {
|
|
158
|
-
const target = all[path];
|
|
159
|
-
if (target === void 0) {
|
|
160
|
-
reportUnresolved(ownerKey, path, "missing target");
|
|
161
|
-
return `{${path}}`;
|
|
162
|
-
}
|
|
163
|
-
if (seen.has(path)) {
|
|
164
|
-
reportUnresolved(ownerKey, path, "circular reference");
|
|
165
|
-
return `{${path}}`;
|
|
166
|
-
}
|
|
167
|
-
const childSeen = new Set(seen).add(path);
|
|
168
|
-
const resolved2 = resolveRef(target, childSeen, ownerKey);
|
|
169
|
-
return String(resolved2);
|
|
170
|
-
});
|
|
171
|
-
}, "resolveInline");
|
|
172
|
-
const resolved = {};
|
|
173
|
-
for (const [key, value] of Object.entries(all)) {
|
|
174
|
-
if (typeof value === "string") {
|
|
175
|
-
if (isTokenRef(value)) {
|
|
176
|
-
resolved[key] = resolveRef(value, /* @__PURE__ */new Set(), key);
|
|
177
|
-
} else if (value.includes("{")) {
|
|
178
|
-
resolved[key] = resolveInline(value, /* @__PURE__ */new Set(), key);
|
|
179
|
-
} else {
|
|
180
|
-
resolved[key] = value;
|
|
181
|
-
}
|
|
182
|
-
} else {
|
|
183
|
-
resolved[key] = value;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
if (strict && unresolved.length > 0) {
|
|
187
|
-
throw new Error(`toFlatTokens: ${unresolved.length} unresolved reference(s):
|
|
188
|
-
${unresolved.join("\n ")}`);
|
|
189
|
-
}
|
|
190
|
-
return resolved;
|
|
191
|
-
}, "toFlatTokens");
|
|
192
|
-
export { __name, SAFE_ID_RE, COMPOUND_REF_RE, isPlainObject, deepMerge, flattenObject, flattenTheme, validateRefs, toFlatTokens };
|
package/dist/esm/css.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { getThemeStylesContent } from "./chunk-UMRQ4OTX.js";
|
|
3
|
-
import { toCssVarName, toCssVars } from "./chunk-PQPQNZ73.js";
|
|
4
|
-
import "./chunk-4Q4P3JBB.js";
|
|
5
|
-
import { toFlatTokens } from "./chunk-WVQSTQD5.js";
|
|
6
|
-
export { getThemeStylesContent, toCssVarName, toCssVars, toFlatTokens };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { useTokens } from "../chunk-VL6EGE6Z.js";
|
|
3
|
-
import "../chunk-UMRQ4OTX.js";
|
|
4
|
-
import "../chunk-IJGA42O6.js";
|
|
5
|
-
import "../chunk-PQPQNZ73.js";
|
|
6
|
-
import "../chunk-4Q4P3JBB.js";
|
|
7
|
-
import { coreDataviz, semanticDataviz, withDataviz } from "../chunk-FBVUI2PK.js";
|
|
8
|
-
import "../chunk-SE5Z52RE.js";
|
|
9
|
-
import { __name } from "../chunk-WVQSTQD5.js";
|
|
10
|
-
|
|
11
|
-
// src/dataviz/useDatavizTokens.ts
|
|
12
|
-
var useDatavizTokens = /* @__PURE__ */__name(() => {
|
|
13
|
-
const tokens = useTokens();
|
|
14
|
-
if (!tokens.dataviz) {
|
|
15
|
-
throw new Error('useDatavizTokens: the active theme does not include the dataviz extension.\nWrap your bundle with withDataviz before passing it to ThemeProvider:\n\n import { withDataviz } from "@ttoss/fsl-theme/dataviz";\n export const myTheme = withDataviz(createTheme({ ... }));');
|
|
16
|
-
}
|
|
17
|
-
return tokens.dataviz;
|
|
18
|
-
}, "useDatavizTokens");
|
|
19
|
-
export { coreDataviz, semanticDataviz, useDatavizTokens, withDataviz };
|
package/dist/esm/dtcg.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { DTCG_TYPE_PREFIXES } from "./chunk-4Q4P3JBB.js";
|
|
3
|
-
import { __name, toFlatTokens } from "./chunk-WVQSTQD5.js";
|
|
4
|
-
|
|
5
|
-
// src/roots/toDTCG.ts
|
|
6
|
-
var SUFFIX_TYPE_OVERRIDES = [[".duration", "duration"], [".fontFamily", "fontFamily"], [".fontSize", "dimension"], [".fontWeight", "fontWeight"], [".lineHeight", "number"], [".letterSpacing", "dimension"],
|
|
7
|
-
// focus.ring.color is a color token — must not fall through to the 'string'
|
|
8
|
-
// default from the semantic.focus. prefix entry.
|
|
9
|
-
[".ring.color", "color"]];
|
|
10
|
-
var inferType = /* @__PURE__ */__name(path => {
|
|
11
|
-
for (const [suffix, type] of SUFFIX_TYPE_OVERRIDES) {
|
|
12
|
-
if (path.endsWith(suffix)) {
|
|
13
|
-
return type;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
for (const [prefix, type] of DTCG_TYPE_PREFIXES) {
|
|
17
|
-
if (path.startsWith(prefix)) {
|
|
18
|
-
return type;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return "string";
|
|
22
|
-
}, "inferType");
|
|
23
|
-
var setNestedValue = /* @__PURE__ */__name((root, path, value) => {
|
|
24
|
-
const segments = path.split(".");
|
|
25
|
-
let current = root;
|
|
26
|
-
for (let i = 0; i < segments.length - 1; i++) {
|
|
27
|
-
const seg = segments[i];
|
|
28
|
-
if (!(seg in current) || typeof current[seg] !== "object") {
|
|
29
|
-
current[seg] = {};
|
|
30
|
-
}
|
|
31
|
-
current = current[seg];
|
|
32
|
-
}
|
|
33
|
-
current[segments[segments.length - 1]] = value;
|
|
34
|
-
}, "setNestedValue");
|
|
35
|
-
var SEMANTIC_HIT_PREFIX = "semantic.sizing.hit.";
|
|
36
|
-
var buildHitExtension = /* @__PURE__ */__name((step, theme) => {
|
|
37
|
-
const coarseValue = theme.core.sizing.hit.coarse[step];
|
|
38
|
-
if (coarseValue === void 0) return void 0;
|
|
39
|
-
return {
|
|
40
|
-
"com.ttoss.pointer-override": {
|
|
41
|
-
condition: "any-pointer: coarse",
|
|
42
|
-
value: coarseValue
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
}, "buildHitExtension");
|
|
46
|
-
var toDTCG = /* @__PURE__ */__name(theme => {
|
|
47
|
-
const flat = toFlatTokens(theme);
|
|
48
|
-
const tree = {};
|
|
49
|
-
for (const [path, value] of Object.entries(flat)) {
|
|
50
|
-
const token = {
|
|
51
|
-
$value: value,
|
|
52
|
-
$type: inferType(path)
|
|
53
|
-
};
|
|
54
|
-
if (path.startsWith(SEMANTIC_HIT_PREFIX)) {
|
|
55
|
-
const step = path.slice(SEMANTIC_HIT_PREFIX.length);
|
|
56
|
-
const ext = buildHitExtension(step, theme);
|
|
57
|
-
if (ext) {
|
|
58
|
-
token.$extensions = ext;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
setNestedValue(tree, path, token);
|
|
62
|
-
}
|
|
63
|
-
return tree;
|
|
64
|
-
}, "toDTCG");
|
|
65
|
-
export { toDTCG };
|
package/dist/esm/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { corporate } from "./chunk-TPMN75JM.js";
|
|
3
|
-
import { oca } from "./chunk-DU4QDQUC.js";
|
|
4
|
-
import { ventures } from "./chunk-BXKVVQEP.js";
|
|
5
|
-
import "./chunk-5PWPAQMC.js";
|
|
6
|
-
import { bruttal } from "./chunk-HRNXVRS3.js";
|
|
7
|
-
import "./chunk-FBVUI2PK.js";
|
|
8
|
-
import { baseTheme, createTheme, darkAlternate } from "./chunk-SE5Z52RE.js";
|
|
9
|
-
import "./chunk-WVQSTQD5.js";
|
|
10
|
-
export { baseTheme, bruttal, corporate, createTheme, darkAlternate, oca, ventures };
|
package/dist/esm/react.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { ThemeHead, ThemeProvider, ThemeScript, ThemeStyles, useColorMode, useResolvedTokens, useTokens } from "./chunk-VL6EGE6Z.js";
|
|
3
|
-
import "./chunk-UMRQ4OTX.js";
|
|
4
|
-
import "./chunk-IJGA42O6.js";
|
|
5
|
-
import "./chunk-PQPQNZ73.js";
|
|
6
|
-
import "./chunk-4Q4P3JBB.js";
|
|
7
|
-
import "./chunk-WVQSTQD5.js";
|
|
8
|
-
export { ThemeHead, ThemeProvider, ThemeScript, ThemeStyles, useColorMode, useResolvedTokens, useTokens };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { DATA_MODE_ATTR, DATA_THEME_ATTR, createThemeRuntime, getThemeScriptContent } from "./chunk-IJGA42O6.js";
|
|
3
|
-
import "./chunk-WVQSTQD5.js";
|
|
4
|
-
export { DATA_MODE_ATTR, DATA_THEME_ATTR, createThemeRuntime, getThemeScriptContent };
|
package/dist/esm/themes/oca.js
DELETED
package/dist/esm/vars.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { baseBundle } from "./chunk-5PWPAQMC.js";
|
|
3
|
-
import { toCssVarName } from "./chunk-PQPQNZ73.js";
|
|
4
|
-
import "./chunk-4Q4P3JBB.js";
|
|
5
|
-
import "./chunk-SE5Z52RE.js";
|
|
6
|
-
import { __name, isPlainObject } from "./chunk-WVQSTQD5.js";
|
|
7
|
-
|
|
8
|
-
// src/roots/toVars.ts
|
|
9
|
-
var buildVarsMap = /* @__PURE__ */__name(theme => {
|
|
10
|
-
const walk = /* @__PURE__ */__name((obj, prefix) => {
|
|
11
|
-
const result = {};
|
|
12
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
13
|
-
if (key.startsWith("$")) continue;
|
|
14
|
-
const fullPath = `${prefix}.${key}`;
|
|
15
|
-
if (isPlainObject(value)) {
|
|
16
|
-
result[key] = walk(value, fullPath);
|
|
17
|
-
} else if (typeof value === "string" || typeof value === "number") {
|
|
18
|
-
result[key] = `var(${toCssVarName(fullPath)})`;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return result;
|
|
22
|
-
}, "walk");
|
|
23
|
-
return walk(theme.semantic, "semantic");
|
|
24
|
-
}, "buildVarsMap");
|
|
25
|
-
|
|
26
|
-
// src/vars.ts
|
|
27
|
-
var vars = buildVarsMap(baseBundle.base);
|
|
28
|
-
export { buildVarsMap, vars };
|
package/dist/themes/bruttal.d.ts
DELETED
package/dist/themes/oca.d.ts
DELETED