@elmethis/core 0.22.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/dist/index.d.cts +44 -44
- package/dist/index.d.mts +44 -44
- package/dist/stylelint.cjs +32 -0
- package/dist/stylelint.d.cts +38 -0
- package/dist/stylelint.d.mts +39 -0
- package/dist/stylelint.mjs +32 -0
- package/dist/tokens.cjs +172 -0
- package/dist/tokens.css +3 -0
- package/dist/tokens.d.cts +170 -0
- package/dist/tokens.d.mts +170 -0
- package/dist/tokens.mjs +170 -0
- package/package.json +26 -3
package/dist/tokens.cjs
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/style/token.ts
|
|
3
|
+
const PRIMITIVE_VALUES = {
|
|
4
|
+
color: {
|
|
5
|
+
red: {
|
|
6
|
+
100: "#e9dddd",
|
|
7
|
+
500: "#ae6e6e",
|
|
8
|
+
900: "#291313"
|
|
9
|
+
},
|
|
10
|
+
orange: {
|
|
11
|
+
100: "#ebdfdb",
|
|
12
|
+
500: "#b8816e",
|
|
13
|
+
900: "#3f251c"
|
|
14
|
+
},
|
|
15
|
+
yellow: {
|
|
16
|
+
100: "#ebe6db",
|
|
17
|
+
500: "#b09a66",
|
|
18
|
+
900: "#332b19"
|
|
19
|
+
},
|
|
20
|
+
green: {
|
|
21
|
+
100: "#dde9e2",
|
|
22
|
+
500: "#659878",
|
|
23
|
+
900: "#15281d"
|
|
24
|
+
},
|
|
25
|
+
cyan: {
|
|
26
|
+
100: "#dde9e7",
|
|
27
|
+
500: "#6091a0",
|
|
28
|
+
900: "#203b37"
|
|
29
|
+
},
|
|
30
|
+
blue: {
|
|
31
|
+
100: "#dde2e9",
|
|
32
|
+
500: "#68779f",
|
|
33
|
+
900: "#242d3e"
|
|
34
|
+
},
|
|
35
|
+
purple: {
|
|
36
|
+
100: "#e3dde9",
|
|
37
|
+
500: "#8d799f",
|
|
38
|
+
900: "#271836"
|
|
39
|
+
},
|
|
40
|
+
magenta: {
|
|
41
|
+
100: "#eadce4",
|
|
42
|
+
500: "#b17396",
|
|
43
|
+
900: "#3c1f2f"
|
|
44
|
+
},
|
|
45
|
+
slate: {
|
|
46
|
+
100: "#d7d9e1",
|
|
47
|
+
200: "#b0b5be",
|
|
48
|
+
300: "#949ba7",
|
|
49
|
+
400: "#6c7483",
|
|
50
|
+
500: "#555b67",
|
|
51
|
+
600: "#40444c",
|
|
52
|
+
700: "#393e46",
|
|
53
|
+
800: "#31353a",
|
|
54
|
+
900: "#242629"
|
|
55
|
+
},
|
|
56
|
+
gold: {
|
|
57
|
+
100: "#f7f5f4",
|
|
58
|
+
200: "#efecea",
|
|
59
|
+
300: "#d9d3cc",
|
|
60
|
+
400: "#cabfb2",
|
|
61
|
+
500: "#c6b5a2",
|
|
62
|
+
600: "#bda68b",
|
|
63
|
+
700: "#a68c70",
|
|
64
|
+
800: "#8e7356",
|
|
65
|
+
900: "#6e583f"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
font: { family: {
|
|
69
|
+
sans: "\"DM Sans\", \"Zen Kaku Gothic New\", -apple-system, BlinkMacSystemFont, \"Hiragino Kaku Gothic ProN\", Meiryo, sans-serif",
|
|
70
|
+
monospace: "\"DM Mono\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", \"Zen Kaku Gothic New\", monospace"
|
|
71
|
+
} }
|
|
72
|
+
};
|
|
73
|
+
const makePrimitive = (path, value) => {
|
|
74
|
+
const property = `--elmethis-primitive-${path.join("-")}`;
|
|
75
|
+
return {
|
|
76
|
+
property,
|
|
77
|
+
value,
|
|
78
|
+
ref: `var(${property})`
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
const buildPrimitives = (values, path) => {
|
|
82
|
+
const out = {};
|
|
83
|
+
for (const [key, value] of Object.entries(values)) {
|
|
84
|
+
const next = [...path, key];
|
|
85
|
+
out[key] = typeof value === "string" ? makePrimitive(next, value) : buildPrimitives(value, next);
|
|
86
|
+
}
|
|
87
|
+
return out;
|
|
88
|
+
};
|
|
89
|
+
/** Primitive tokens, addressable as `primitive.color.blue[500]`. */
|
|
90
|
+
const primitive = buildPrimitives(PRIMITIVE_VALUES, []);
|
|
91
|
+
const resolve = (ref) => typeof ref === "string" ? ref : ref.ref;
|
|
92
|
+
/** A theme-independent semantic value. */
|
|
93
|
+
const common = (ref) => ({ common: resolve(ref) });
|
|
94
|
+
/** A native `light-dark()` semantic value. */
|
|
95
|
+
const theme = (light, dark) => ({
|
|
96
|
+
light: resolve(light),
|
|
97
|
+
dark: resolve(dark)
|
|
98
|
+
});
|
|
99
|
+
const { color, font } = primitive;
|
|
100
|
+
/**
|
|
101
|
+
* Semantic tokens, keyed by the full kebab suffix that follows `--elmethis-`
|
|
102
|
+
* (so `"color-accent-info-surface"` emits `--elmethis-color-accent-info-surface`).
|
|
103
|
+
*
|
|
104
|
+
* Flat keys keep a 1:1 mapping to the emitted CSS and sidestep the
|
|
105
|
+
* leaf-vs-group ambiguity a nested tree creates for base/variant pairs — e.g.
|
|
106
|
+
* `color-neutral` coexisting with `color-neutral-weak`. References to the
|
|
107
|
+
* primitive layer are symbolic (`PrimitiveToken.ref`), never resolved values.
|
|
108
|
+
*/
|
|
109
|
+
const semanticTokens = {
|
|
110
|
+
/**
|
|
111
|
+
* Vertical rhythm between stacked blocks. Applied as `gap` on an explicit
|
|
112
|
+
* flex-column "stack" container (e.g. each framework's `ElmA2ui` surface,
|
|
113
|
+
* `ElmMarkdown`, and container child slots like Callout/BlockQuote/Toggle/
|
|
114
|
+
* TabPanel) — never as a leading margin on individual leaf components.
|
|
115
|
+
* `gap` only ever applies between items, so there's no first-child case to
|
|
116
|
+
* special-case and no risk of a standalone/nested component floating an
|
|
117
|
+
* unexplained gap above it.
|
|
118
|
+
*/
|
|
119
|
+
"stack-gap": common("2rem"),
|
|
120
|
+
"box-shadow-small": common("0 0 1px var(--elmethis-color-box-shadow)"),
|
|
121
|
+
"box-shadow-medium": common("0 0 2px var(--elmethis-color-box-shadow)"),
|
|
122
|
+
"box-shadow-large": common("0 0 4px var(--elmethis-color-box-shadow)"),
|
|
123
|
+
"font-family-sans": common(font.family.sans),
|
|
124
|
+
"font-family-monospace": common(font.family.monospace),
|
|
125
|
+
"color-box-shadow": theme("oklch(from #3e434b l c h / 0.25)", color.slate[900]),
|
|
126
|
+
"color-accent-link-surface": theme(color.blue[100], color.blue[900]),
|
|
127
|
+
"color-accent-link": common(color.blue[500]),
|
|
128
|
+
"color-accent-link-visited": common(color.purple[500]),
|
|
129
|
+
"color-accent-link-surface-visited": theme(color.purple[100], color.purple[900]),
|
|
130
|
+
"color-accent-info": common(color.blue[500]),
|
|
131
|
+
"color-accent-info-surface": theme(color.blue[100], color.blue[900]),
|
|
132
|
+
"color-accent-success": common(color.green[500]),
|
|
133
|
+
"color-accent-success-surface": theme(color.green[100], color.green[900]),
|
|
134
|
+
"color-accent-important": common(color.purple[500]),
|
|
135
|
+
"color-accent-important-surface": theme(color.purple[100], color.purple[900]),
|
|
136
|
+
"color-accent-warning": common(color.yellow[500]),
|
|
137
|
+
"color-accent-warning-surface": theme(color.yellow[100], color.yellow[900]),
|
|
138
|
+
"color-accent-error": common(color.red[500]),
|
|
139
|
+
"color-accent-error-surface": theme(color.red[100], color.red[900]),
|
|
140
|
+
"color-divider": theme(color.gold[300], color.slate[800]),
|
|
141
|
+
"color-modal-backdrop": common("oklch(from black l c h / 50%)"),
|
|
142
|
+
"color-surface-sunken": theme(color.gold[300], color.slate[800]),
|
|
143
|
+
"color-surface-base": theme(color.gold[200], color.slate[700]),
|
|
144
|
+
"color-surface-raised": theme(color.gold[100], color.slate[600]),
|
|
145
|
+
"color-neutral": theme(color.slate[400], color.slate[200]),
|
|
146
|
+
"color-neutral-weak": common(color.slate[300]),
|
|
147
|
+
"color-neutral-strong": theme(color.slate[500], color.slate[100]),
|
|
148
|
+
"color-primary": theme(color.gold[700], color.gold[500]),
|
|
149
|
+
"color-primary-weak": common(color.gold[600]),
|
|
150
|
+
"color-primary-strong": theme(color.gold[800], color.gold[400]),
|
|
151
|
+
"color-primary-hover": common("oklch(from var(--elmethis-color-primary) l c h / 15%)"),
|
|
152
|
+
"color-selection": common("oklch(from var(--elmethis-color-primary) l c h / 25%)"),
|
|
153
|
+
"color-display-red": common(color.red[500]),
|
|
154
|
+
"color-display-red-surface": theme(color.red[100], color.red[900]),
|
|
155
|
+
"color-display-orange": common(color.orange[500]),
|
|
156
|
+
"color-display-orange-surface": theme(color.orange[100], color.orange[900]),
|
|
157
|
+
"color-display-yellow": common(color.yellow[500]),
|
|
158
|
+
"color-display-yellow-surface": theme(color.yellow[100], color.yellow[900]),
|
|
159
|
+
"color-display-green": common(color.green[500]),
|
|
160
|
+
"color-display-green-surface": theme(color.green[100], color.green[900]),
|
|
161
|
+
"color-display-cyan": common(color.cyan[500]),
|
|
162
|
+
"color-display-cyan-surface": theme(color.cyan[100], color.cyan[900]),
|
|
163
|
+
"color-display-blue": common(color.blue[500]),
|
|
164
|
+
"color-display-blue-surface": theme(color.blue[100], color.blue[900]),
|
|
165
|
+
"color-display-purple": common(color.purple[500]),
|
|
166
|
+
"color-display-purple-surface": theme(color.purple[100], color.purple[900]),
|
|
167
|
+
"color-display-magenta": common(color.magenta[500]),
|
|
168
|
+
"color-display-magenta-surface": theme(color.magenta[100], color.magenta[900])
|
|
169
|
+
};
|
|
170
|
+
//#endregion
|
|
171
|
+
exports.primitive = primitive;
|
|
172
|
+
exports.semanticTokens = semanticTokens;
|
package/dist/tokens.css
CHANGED
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
"DM Mono", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono",
|
|
49
49
|
"Zen Kaku Gothic New", monospace;
|
|
50
50
|
--elmethis-stack-gap: 2rem;
|
|
51
|
+
--elmethis-box-shadow-small: 0 0 1px var(--elmethis-color-box-shadow);
|
|
52
|
+
--elmethis-box-shadow-medium: 0 0 2px var(--elmethis-color-box-shadow);
|
|
53
|
+
--elmethis-box-shadow-large: 0 0 4px var(--elmethis-color-box-shadow);
|
|
51
54
|
--elmethis-font-family-sans: var(--elmethis-primitive-font-family-sans);
|
|
52
55
|
--elmethis-font-family-monospace: var(
|
|
53
56
|
--elmethis-primitive-font-family-monospace
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
//#region src/style/token.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Design tokens for `@elmethis/core` — the single source of truth that the
|
|
4
|
+
* vanilla-extract build (`scripts/build-tokens.ts`) emits to `dist/tokens.css`
|
|
5
|
+
* as `--elmethis-*` custom properties: a primitive layer of concrete values
|
|
6
|
+
* and a semantic layer that references it, themed natively via `light-dark()`.
|
|
7
|
+
*/
|
|
8
|
+
/** A primitive token knows the custom property that defines it. */
|
|
9
|
+
interface PrimitiveToken {
|
|
10
|
+
/** e.g. `--elmethis-primitive-color-blue-500` */
|
|
11
|
+
readonly property: string;
|
|
12
|
+
/** the literal value, e.g. `#68779f` */
|
|
13
|
+
readonly value: string;
|
|
14
|
+
/** a `var(--…)` reference for the semantic layer to consume */
|
|
15
|
+
readonly ref: string;
|
|
16
|
+
}
|
|
17
|
+
/** A semantic token is either theme-independent or a `light-dark()` pair. */
|
|
18
|
+
type SemanticValue = {
|
|
19
|
+
readonly common: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly light: string;
|
|
22
|
+
readonly dark: string;
|
|
23
|
+
};
|
|
24
|
+
declare const PRIMITIVE_VALUES: {
|
|
25
|
+
readonly color: {
|
|
26
|
+
readonly red: {
|
|
27
|
+
readonly 100: "#e9dddd";
|
|
28
|
+
readonly 500: "#ae6e6e";
|
|
29
|
+
readonly 900: "#291313";
|
|
30
|
+
};
|
|
31
|
+
readonly orange: {
|
|
32
|
+
readonly 100: "#ebdfdb";
|
|
33
|
+
readonly 500: "#b8816e";
|
|
34
|
+
readonly 900: "#3f251c";
|
|
35
|
+
};
|
|
36
|
+
readonly yellow: {
|
|
37
|
+
readonly 100: "#ebe6db";
|
|
38
|
+
readonly 500: "#b09a66";
|
|
39
|
+
readonly 900: "#332b19";
|
|
40
|
+
};
|
|
41
|
+
readonly green: {
|
|
42
|
+
readonly 100: "#dde9e2";
|
|
43
|
+
readonly 500: "#659878";
|
|
44
|
+
readonly 900: "#15281d";
|
|
45
|
+
};
|
|
46
|
+
readonly cyan: {
|
|
47
|
+
readonly 100: "#dde9e7";
|
|
48
|
+
readonly 500: "#6091a0";
|
|
49
|
+
readonly 900: "#203b37";
|
|
50
|
+
};
|
|
51
|
+
readonly blue: {
|
|
52
|
+
readonly 100: "#dde2e9";
|
|
53
|
+
readonly 500: "#68779f";
|
|
54
|
+
readonly 900: "#242d3e";
|
|
55
|
+
};
|
|
56
|
+
readonly purple: {
|
|
57
|
+
readonly 100: "#e3dde9";
|
|
58
|
+
readonly 500: "#8d799f";
|
|
59
|
+
readonly 900: "#271836";
|
|
60
|
+
};
|
|
61
|
+
readonly magenta: {
|
|
62
|
+
readonly 100: "#eadce4";
|
|
63
|
+
readonly 500: "#b17396";
|
|
64
|
+
readonly 900: "#3c1f2f";
|
|
65
|
+
};
|
|
66
|
+
readonly slate: {
|
|
67
|
+
readonly 100: "#d7d9e1";
|
|
68
|
+
readonly 200: "#b0b5be";
|
|
69
|
+
readonly 300: "#949ba7";
|
|
70
|
+
readonly 400: "#6c7483";
|
|
71
|
+
readonly 500: "#555b67";
|
|
72
|
+
readonly 600: "#40444c";
|
|
73
|
+
readonly 700: "#393e46";
|
|
74
|
+
readonly 800: "#31353a";
|
|
75
|
+
readonly 900: "#242629";
|
|
76
|
+
};
|
|
77
|
+
readonly gold: {
|
|
78
|
+
readonly 100: "#f7f5f4";
|
|
79
|
+
readonly 200: "#efecea";
|
|
80
|
+
readonly 300: "#d9d3cc";
|
|
81
|
+
readonly 400: "#cabfb2";
|
|
82
|
+
readonly 500: "#c6b5a2";
|
|
83
|
+
readonly 600: "#bda68b";
|
|
84
|
+
readonly 700: "#a68c70";
|
|
85
|
+
readonly 800: "#8e7356";
|
|
86
|
+
readonly 900: "#6e583f";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly font: {
|
|
90
|
+
readonly family: {
|
|
91
|
+
readonly sans: "\"DM Sans\", \"Zen Kaku Gothic New\", -apple-system, BlinkMacSystemFont, \"Hiragino Kaku Gothic ProN\", Meiryo, sans-serif";
|
|
92
|
+
readonly monospace: "\"DM Mono\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", \"Zen Kaku Gothic New\", monospace";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
type PrimitiveTree<T> = { readonly [K in keyof T]: T[K] extends string ? PrimitiveToken : PrimitiveTree<T[K]>; };
|
|
97
|
+
/** Primitive tokens, addressable as `primitive.color.blue[500]`. */
|
|
98
|
+
declare const primitive: PrimitiveTree<typeof PRIMITIVE_VALUES>;
|
|
99
|
+
/**
|
|
100
|
+
* Semantic tokens, keyed by the full kebab suffix that follows `--elmethis-`
|
|
101
|
+
* (so `"color-accent-info-surface"` emits `--elmethis-color-accent-info-surface`).
|
|
102
|
+
*
|
|
103
|
+
* Flat keys keep a 1:1 mapping to the emitted CSS and sidestep the
|
|
104
|
+
* leaf-vs-group ambiguity a nested tree creates for base/variant pairs — e.g.
|
|
105
|
+
* `color-neutral` coexisting with `color-neutral-weak`. References to the
|
|
106
|
+
* primitive layer are symbolic (`PrimitiveToken.ref`), never resolved values.
|
|
107
|
+
*/
|
|
108
|
+
declare const semanticTokens: {
|
|
109
|
+
/**
|
|
110
|
+
* Vertical rhythm between stacked blocks. Applied as `gap` on an explicit
|
|
111
|
+
* flex-column "stack" container (e.g. each framework's `ElmA2ui` surface,
|
|
112
|
+
* `ElmMarkdown`, and container child slots like Callout/BlockQuote/Toggle/
|
|
113
|
+
* TabPanel) — never as a leading margin on individual leaf components.
|
|
114
|
+
* `gap` only ever applies between items, so there's no first-child case to
|
|
115
|
+
* special-case and no risk of a standalone/nested component floating an
|
|
116
|
+
* unexplained gap above it.
|
|
117
|
+
*/
|
|
118
|
+
"stack-gap": SemanticValue;
|
|
119
|
+
"box-shadow-small": SemanticValue;
|
|
120
|
+
"box-shadow-medium": SemanticValue;
|
|
121
|
+
"box-shadow-large": SemanticValue;
|
|
122
|
+
"font-family-sans": SemanticValue;
|
|
123
|
+
"font-family-monospace": SemanticValue;
|
|
124
|
+
"color-box-shadow": SemanticValue;
|
|
125
|
+
"color-accent-link-surface": SemanticValue;
|
|
126
|
+
"color-accent-link": SemanticValue;
|
|
127
|
+
"color-accent-link-visited": SemanticValue;
|
|
128
|
+
"color-accent-link-surface-visited": SemanticValue;
|
|
129
|
+
"color-accent-info": SemanticValue;
|
|
130
|
+
"color-accent-info-surface": SemanticValue;
|
|
131
|
+
"color-accent-success": SemanticValue;
|
|
132
|
+
"color-accent-success-surface": SemanticValue;
|
|
133
|
+
"color-accent-important": SemanticValue;
|
|
134
|
+
"color-accent-important-surface": SemanticValue;
|
|
135
|
+
"color-accent-warning": SemanticValue;
|
|
136
|
+
"color-accent-warning-surface": SemanticValue;
|
|
137
|
+
"color-accent-error": SemanticValue;
|
|
138
|
+
"color-accent-error-surface": SemanticValue;
|
|
139
|
+
"color-divider": SemanticValue;
|
|
140
|
+
"color-modal-backdrop": SemanticValue;
|
|
141
|
+
"color-surface-sunken": SemanticValue;
|
|
142
|
+
"color-surface-base": SemanticValue;
|
|
143
|
+
"color-surface-raised": SemanticValue;
|
|
144
|
+
"color-neutral": SemanticValue;
|
|
145
|
+
"color-neutral-weak": SemanticValue;
|
|
146
|
+
"color-neutral-strong": SemanticValue;
|
|
147
|
+
"color-primary": SemanticValue;
|
|
148
|
+
"color-primary-weak": SemanticValue;
|
|
149
|
+
"color-primary-strong": SemanticValue;
|
|
150
|
+
"color-primary-hover": SemanticValue;
|
|
151
|
+
"color-selection": SemanticValue;
|
|
152
|
+
"color-display-red": SemanticValue;
|
|
153
|
+
"color-display-red-surface": SemanticValue;
|
|
154
|
+
"color-display-orange": SemanticValue;
|
|
155
|
+
"color-display-orange-surface": SemanticValue;
|
|
156
|
+
"color-display-yellow": SemanticValue;
|
|
157
|
+
"color-display-yellow-surface": SemanticValue;
|
|
158
|
+
"color-display-green": SemanticValue;
|
|
159
|
+
"color-display-green-surface": SemanticValue;
|
|
160
|
+
"color-display-cyan": SemanticValue;
|
|
161
|
+
"color-display-cyan-surface": SemanticValue;
|
|
162
|
+
"color-display-blue": SemanticValue;
|
|
163
|
+
"color-display-blue-surface": SemanticValue;
|
|
164
|
+
"color-display-purple": SemanticValue;
|
|
165
|
+
"color-display-purple-surface": SemanticValue;
|
|
166
|
+
"color-display-magenta": SemanticValue;
|
|
167
|
+
"color-display-magenta-surface": SemanticValue;
|
|
168
|
+
};
|
|
169
|
+
//#endregion
|
|
170
|
+
export { PrimitiveToken, SemanticValue, primitive, semanticTokens };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
//#region src/style/token.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Design tokens for `@elmethis/core` — the single source of truth that the
|
|
4
|
+
* vanilla-extract build (`scripts/build-tokens.ts`) emits to `dist/tokens.css`
|
|
5
|
+
* as `--elmethis-*` custom properties: a primitive layer of concrete values
|
|
6
|
+
* and a semantic layer that references it, themed natively via `light-dark()`.
|
|
7
|
+
*/
|
|
8
|
+
/** A primitive token knows the custom property that defines it. */
|
|
9
|
+
interface PrimitiveToken {
|
|
10
|
+
/** e.g. `--elmethis-primitive-color-blue-500` */
|
|
11
|
+
readonly property: string;
|
|
12
|
+
/** the literal value, e.g. `#68779f` */
|
|
13
|
+
readonly value: string;
|
|
14
|
+
/** a `var(--…)` reference for the semantic layer to consume */
|
|
15
|
+
readonly ref: string;
|
|
16
|
+
}
|
|
17
|
+
/** A semantic token is either theme-independent or a `light-dark()` pair. */
|
|
18
|
+
type SemanticValue = {
|
|
19
|
+
readonly common: string;
|
|
20
|
+
} | {
|
|
21
|
+
readonly light: string;
|
|
22
|
+
readonly dark: string;
|
|
23
|
+
};
|
|
24
|
+
declare const PRIMITIVE_VALUES: {
|
|
25
|
+
readonly color: {
|
|
26
|
+
readonly red: {
|
|
27
|
+
readonly 100: "#e9dddd";
|
|
28
|
+
readonly 500: "#ae6e6e";
|
|
29
|
+
readonly 900: "#291313";
|
|
30
|
+
};
|
|
31
|
+
readonly orange: {
|
|
32
|
+
readonly 100: "#ebdfdb";
|
|
33
|
+
readonly 500: "#b8816e";
|
|
34
|
+
readonly 900: "#3f251c";
|
|
35
|
+
};
|
|
36
|
+
readonly yellow: {
|
|
37
|
+
readonly 100: "#ebe6db";
|
|
38
|
+
readonly 500: "#b09a66";
|
|
39
|
+
readonly 900: "#332b19";
|
|
40
|
+
};
|
|
41
|
+
readonly green: {
|
|
42
|
+
readonly 100: "#dde9e2";
|
|
43
|
+
readonly 500: "#659878";
|
|
44
|
+
readonly 900: "#15281d";
|
|
45
|
+
};
|
|
46
|
+
readonly cyan: {
|
|
47
|
+
readonly 100: "#dde9e7";
|
|
48
|
+
readonly 500: "#6091a0";
|
|
49
|
+
readonly 900: "#203b37";
|
|
50
|
+
};
|
|
51
|
+
readonly blue: {
|
|
52
|
+
readonly 100: "#dde2e9";
|
|
53
|
+
readonly 500: "#68779f";
|
|
54
|
+
readonly 900: "#242d3e";
|
|
55
|
+
};
|
|
56
|
+
readonly purple: {
|
|
57
|
+
readonly 100: "#e3dde9";
|
|
58
|
+
readonly 500: "#8d799f";
|
|
59
|
+
readonly 900: "#271836";
|
|
60
|
+
};
|
|
61
|
+
readonly magenta: {
|
|
62
|
+
readonly 100: "#eadce4";
|
|
63
|
+
readonly 500: "#b17396";
|
|
64
|
+
readonly 900: "#3c1f2f";
|
|
65
|
+
};
|
|
66
|
+
readonly slate: {
|
|
67
|
+
readonly 100: "#d7d9e1";
|
|
68
|
+
readonly 200: "#b0b5be";
|
|
69
|
+
readonly 300: "#949ba7";
|
|
70
|
+
readonly 400: "#6c7483";
|
|
71
|
+
readonly 500: "#555b67";
|
|
72
|
+
readonly 600: "#40444c";
|
|
73
|
+
readonly 700: "#393e46";
|
|
74
|
+
readonly 800: "#31353a";
|
|
75
|
+
readonly 900: "#242629";
|
|
76
|
+
};
|
|
77
|
+
readonly gold: {
|
|
78
|
+
readonly 100: "#f7f5f4";
|
|
79
|
+
readonly 200: "#efecea";
|
|
80
|
+
readonly 300: "#d9d3cc";
|
|
81
|
+
readonly 400: "#cabfb2";
|
|
82
|
+
readonly 500: "#c6b5a2";
|
|
83
|
+
readonly 600: "#bda68b";
|
|
84
|
+
readonly 700: "#a68c70";
|
|
85
|
+
readonly 800: "#8e7356";
|
|
86
|
+
readonly 900: "#6e583f";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly font: {
|
|
90
|
+
readonly family: {
|
|
91
|
+
readonly sans: "\"DM Sans\", \"Zen Kaku Gothic New\", -apple-system, BlinkMacSystemFont, \"Hiragino Kaku Gothic ProN\", Meiryo, sans-serif";
|
|
92
|
+
readonly monospace: "\"DM Mono\", \"Source Code Pro\", Menlo, Consolas, \"DejaVu Sans Mono\", \"Zen Kaku Gothic New\", monospace";
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
type PrimitiveTree<T> = { readonly [K in keyof T]: T[K] extends string ? PrimitiveToken : PrimitiveTree<T[K]>; };
|
|
97
|
+
/** Primitive tokens, addressable as `primitive.color.blue[500]`. */
|
|
98
|
+
declare const primitive: PrimitiveTree<typeof PRIMITIVE_VALUES>;
|
|
99
|
+
/**
|
|
100
|
+
* Semantic tokens, keyed by the full kebab suffix that follows `--elmethis-`
|
|
101
|
+
* (so `"color-accent-info-surface"` emits `--elmethis-color-accent-info-surface`).
|
|
102
|
+
*
|
|
103
|
+
* Flat keys keep a 1:1 mapping to the emitted CSS and sidestep the
|
|
104
|
+
* leaf-vs-group ambiguity a nested tree creates for base/variant pairs — e.g.
|
|
105
|
+
* `color-neutral` coexisting with `color-neutral-weak`. References to the
|
|
106
|
+
* primitive layer are symbolic (`PrimitiveToken.ref`), never resolved values.
|
|
107
|
+
*/
|
|
108
|
+
declare const semanticTokens: {
|
|
109
|
+
/**
|
|
110
|
+
* Vertical rhythm between stacked blocks. Applied as `gap` on an explicit
|
|
111
|
+
* flex-column "stack" container (e.g. each framework's `ElmA2ui` surface,
|
|
112
|
+
* `ElmMarkdown`, and container child slots like Callout/BlockQuote/Toggle/
|
|
113
|
+
* TabPanel) — never as a leading margin on individual leaf components.
|
|
114
|
+
* `gap` only ever applies between items, so there's no first-child case to
|
|
115
|
+
* special-case and no risk of a standalone/nested component floating an
|
|
116
|
+
* unexplained gap above it.
|
|
117
|
+
*/
|
|
118
|
+
"stack-gap": SemanticValue;
|
|
119
|
+
"box-shadow-small": SemanticValue;
|
|
120
|
+
"box-shadow-medium": SemanticValue;
|
|
121
|
+
"box-shadow-large": SemanticValue;
|
|
122
|
+
"font-family-sans": SemanticValue;
|
|
123
|
+
"font-family-monospace": SemanticValue;
|
|
124
|
+
"color-box-shadow": SemanticValue;
|
|
125
|
+
"color-accent-link-surface": SemanticValue;
|
|
126
|
+
"color-accent-link": SemanticValue;
|
|
127
|
+
"color-accent-link-visited": SemanticValue;
|
|
128
|
+
"color-accent-link-surface-visited": SemanticValue;
|
|
129
|
+
"color-accent-info": SemanticValue;
|
|
130
|
+
"color-accent-info-surface": SemanticValue;
|
|
131
|
+
"color-accent-success": SemanticValue;
|
|
132
|
+
"color-accent-success-surface": SemanticValue;
|
|
133
|
+
"color-accent-important": SemanticValue;
|
|
134
|
+
"color-accent-important-surface": SemanticValue;
|
|
135
|
+
"color-accent-warning": SemanticValue;
|
|
136
|
+
"color-accent-warning-surface": SemanticValue;
|
|
137
|
+
"color-accent-error": SemanticValue;
|
|
138
|
+
"color-accent-error-surface": SemanticValue;
|
|
139
|
+
"color-divider": SemanticValue;
|
|
140
|
+
"color-modal-backdrop": SemanticValue;
|
|
141
|
+
"color-surface-sunken": SemanticValue;
|
|
142
|
+
"color-surface-base": SemanticValue;
|
|
143
|
+
"color-surface-raised": SemanticValue;
|
|
144
|
+
"color-neutral": SemanticValue;
|
|
145
|
+
"color-neutral-weak": SemanticValue;
|
|
146
|
+
"color-neutral-strong": SemanticValue;
|
|
147
|
+
"color-primary": SemanticValue;
|
|
148
|
+
"color-primary-weak": SemanticValue;
|
|
149
|
+
"color-primary-strong": SemanticValue;
|
|
150
|
+
"color-primary-hover": SemanticValue;
|
|
151
|
+
"color-selection": SemanticValue;
|
|
152
|
+
"color-display-red": SemanticValue;
|
|
153
|
+
"color-display-red-surface": SemanticValue;
|
|
154
|
+
"color-display-orange": SemanticValue;
|
|
155
|
+
"color-display-orange-surface": SemanticValue;
|
|
156
|
+
"color-display-yellow": SemanticValue;
|
|
157
|
+
"color-display-yellow-surface": SemanticValue;
|
|
158
|
+
"color-display-green": SemanticValue;
|
|
159
|
+
"color-display-green-surface": SemanticValue;
|
|
160
|
+
"color-display-cyan": SemanticValue;
|
|
161
|
+
"color-display-cyan-surface": SemanticValue;
|
|
162
|
+
"color-display-blue": SemanticValue;
|
|
163
|
+
"color-display-blue-surface": SemanticValue;
|
|
164
|
+
"color-display-purple": SemanticValue;
|
|
165
|
+
"color-display-purple-surface": SemanticValue;
|
|
166
|
+
"color-display-magenta": SemanticValue;
|
|
167
|
+
"color-display-magenta-surface": SemanticValue;
|
|
168
|
+
};
|
|
169
|
+
//#endregion
|
|
170
|
+
export { PrimitiveToken, SemanticValue, primitive, semanticTokens };
|