@scattered-light/loomiere 0.15.1 → 0.15.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.
- package/build/build-tokens.mjs +9 -1
- package/package.json +1 -1
package/build/build-tokens.mjs
CHANGED
|
@@ -180,6 +180,14 @@ function roleBlocks(dictionary) {
|
|
|
180
180
|
})
|
|
181
181
|
.join('\n');
|
|
182
182
|
|
|
183
|
+
// A level that keeps its own color paints its edge from emphasis.<level>.border (and -hover), so a
|
|
184
|
+
// brand can set the edge apart from the scope's border step (ink outline buttons, grey fields).
|
|
185
|
+
const edgeOf = (level, parts) =>
|
|
186
|
+
parts
|
|
187
|
+
.filter(([part]) => part === 'border' || part === 'border-hover')
|
|
188
|
+
.map(([part]) => `${varName(['e', part])}: var(${varName(['emphasis', level, part])});`)
|
|
189
|
+
.join('\n');
|
|
190
|
+
|
|
183
191
|
const blocks = [rule([':root'], point('accent'))];
|
|
184
192
|
for (const name of scopes.keys()) blocks.push(rule([`[data-color='${name}']`, ...(statuses.has(name) && name !== 'default' ? statusSelectors(name) : [])], point(name)));
|
|
185
193
|
|
|
@@ -204,7 +212,7 @@ function roleBlocks(dictionary) {
|
|
|
204
212
|
const follows = (DEFAULT_LEVELS[level] ?? []).some((entry) => entry.followsScope && entry.selector === sel);
|
|
205
213
|
const except = follows ? `[data-color], [data-color] *, ${IN_STATUS}` : `[data-color], ${IN_STATUS}`;
|
|
206
214
|
return `${sel}:not(${except})`;
|
|
207
|
-
}), point(color)));
|
|
215
|
+
}), `${point(color)}\n${edgeOf(level, parts)}`));
|
|
208
216
|
}
|
|
209
217
|
}
|
|
210
218
|
// Other statuses: the scope already holds the status's palette; only a picked pair needs its own rule.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scattered-light/loomiere",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Turns a small brand file into a full design token theme: OKLCH color ramps, a type scale, light, dark and high-contrast modes, plus Tailwind, MUI, Chakra, AG Grid and Figma exports.",
|
|
5
5
|
"keywords": ["design-tokens", "theme", "style-dictionary", "dtcg", "oklch", "base-ui", "ag-grid", "tailwind"],
|
|
6
6
|
"repository": {
|