cssints 0.3.0 → 0.4.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.
Files changed (152) hide show
  1. package/README.md +1 -1
  2. package/dist/check.mjs +2 -2
  3. package/dist/clay-types.d.mts +207 -0
  4. package/dist/clay.d.mts +40 -0
  5. package/dist/clay.mjs +550 -0
  6. package/dist/{contrast-B49XCnVX.mjs → contrast-DLi4pp25.mjs} +2 -2
  7. package/dist/group-common-3PAVTxpd.d.mts +1 -0
  8. package/dist/{group-types-9ttphdku.d.mts → group-types-Dn9CIR8J.d.mts} +1 -1
  9. package/dist/groups/baseline-2015/with-downstream.d.mts +3 -3
  10. package/dist/groups/baseline-2015.d.mts +3 -3
  11. package/dist/groups/baseline-2016/with-downstream.d.mts +3 -3
  12. package/dist/groups/baseline-2016.d.mts +3 -3
  13. package/dist/groups/baseline-2017/with-downstream.d.mts +3 -3
  14. package/dist/groups/baseline-2017.d.mts +3 -3
  15. package/dist/groups/baseline-2018/with-downstream.d.mts +3 -3
  16. package/dist/groups/baseline-2018.d.mts +3 -3
  17. package/dist/groups/baseline-2019/with-downstream.d.mts +3 -3
  18. package/dist/groups/baseline-2019.d.mts +3 -3
  19. package/dist/groups/baseline-2020/with-downstream.d.mts +3 -3
  20. package/dist/groups/baseline-2020.d.mts +3 -3
  21. package/dist/groups/baseline-2021/with-downstream.d.mts +3 -3
  22. package/dist/groups/baseline-2021.d.mts +3 -3
  23. package/dist/groups/baseline-2022/with-downstream.d.mts +3 -3
  24. package/dist/groups/baseline-2022.d.mts +3 -3
  25. package/dist/groups/baseline-2023/with-downstream.d.mts +3 -3
  26. package/dist/groups/baseline-2023.d.mts +3 -3
  27. package/dist/groups/baseline-2024/with-downstream.d.mts +3 -3
  28. package/dist/groups/baseline-2024.d.mts +3 -3
  29. package/dist/groups/baseline-2025/with-downstream.d.mts +3 -3
  30. package/dist/groups/baseline-2025.d.mts +3 -3
  31. package/dist/groups/baseline-2026/with-downstream.d.mts +1 -1
  32. package/dist/groups/baseline-2026.d.mts +1 -1
  33. package/dist/groups/compositing-2.d.mts +3 -3
  34. package/dist/groups/css-align-3.d.mts +3 -3
  35. package/dist/groups/css-anchor-position-1.d.mts +3 -3
  36. package/dist/groups/css-anchor-position-2.d.mts +3 -3
  37. package/dist/groups/css-animations-1.d.mts +3 -3
  38. package/dist/groups/css-animations-2.d.mts +3 -3
  39. package/dist/groups/css-backgrounds-3.d.mts +3 -3
  40. package/dist/groups/css-backgrounds-4.d.mts +3 -3
  41. package/dist/groups/css-borders-4.d.mts +3 -3
  42. package/dist/groups/css-box-4.d.mts +3 -3
  43. package/dist/groups/css-break-4.d.mts +3 -3
  44. package/dist/groups/css-cascade-5.d.mts +3 -3
  45. package/dist/groups/css-cascade-6.d.mts +3 -3
  46. package/dist/groups/css-color-4.d.mts +3 -3
  47. package/dist/groups/css-color-5.d.mts +3 -3
  48. package/dist/groups/css-color-6.d.mts +3 -3
  49. package/dist/groups/css-color-adjust-1.d.mts +3 -3
  50. package/dist/groups/css-color-hdr-1.d.mts +3 -3
  51. package/dist/groups/css-conditional-3.d.mts +3 -3
  52. package/dist/groups/css-conditional-4.d.mts +3 -3
  53. package/dist/groups/css-conditional-5.d.mts +3 -3
  54. package/dist/groups/css-contain-2.d.mts +3 -3
  55. package/dist/groups/css-content-3.d.mts +3 -3
  56. package/dist/groups/css-counter-styles-3.d.mts +3 -3
  57. package/dist/groups/css-display-4.d.mts +3 -3
  58. package/dist/groups/css-easing-2.d.mts +3 -3
  59. package/dist/groups/css-env-1.d.mts +3 -3
  60. package/dist/groups/css-flexbox-1.d.mts +3 -3
  61. package/dist/groups/css-fonts-4.d.mts +3 -3
  62. package/dist/groups/css-fonts-5.d.mts +3 -3
  63. package/dist/groups/css-forms-1.d.mts +3 -3
  64. package/dist/groups/css-gaps-1.d.mts +3 -3
  65. package/dist/groups/css-gcpm-3.d.mts +3 -3
  66. package/dist/groups/css-gcpm-4.d.mts +3 -3
  67. package/dist/groups/css-grid-2.d.mts +3 -3
  68. package/dist/groups/css-grid-3.d.mts +3 -3
  69. package/dist/groups/css-images-3.d.mts +3 -3
  70. package/dist/groups/css-images-4.d.mts +3 -3
  71. package/dist/groups/css-images-5.d.mts +3 -3
  72. package/dist/groups/css-inline-3.d.mts +3 -3
  73. package/dist/groups/css-lists-3.d.mts +3 -3
  74. package/dist/groups/css-logical-1.d.mts +3 -3
  75. package/dist/groups/css-masking-1.d.mts +3 -3
  76. package/dist/groups/css-multicol-2.d.mts +3 -3
  77. package/dist/groups/css-overflow-3.d.mts +3 -3
  78. package/dist/groups/css-overflow-4.d.mts +3 -3
  79. package/dist/groups/css-overflow-5.d.mts +3 -3
  80. package/dist/groups/css-overscroll-1.d.mts +3 -3
  81. package/dist/groups/css-page-3.d.mts +3 -3
  82. package/dist/groups/css-page-floats-3.d.mts +3 -3
  83. package/dist/groups/css-position-3.d.mts +3 -3
  84. package/dist/groups/css-position-4.d.mts +3 -3
  85. package/dist/groups/css-rhythm-1.d.mts +3 -3
  86. package/dist/groups/css-round-display-1.d.mts +3 -3
  87. package/dist/groups/css-ruby-1.d.mts +3 -3
  88. package/dist/groups/css-scroll-anchoring-1.d.mts +3 -3
  89. package/dist/groups/css-scroll-snap-1.d.mts +3 -3
  90. package/dist/groups/css-scroll-snap-2.d.mts +3 -3
  91. package/dist/groups/css-scrollbars-1.d.mts +3 -3
  92. package/dist/groups/css-shapes-1.d.mts +3 -3
  93. package/dist/groups/css-shapes-2.d.mts +3 -3
  94. package/dist/groups/css-size-adjust-1.d.mts +3 -3
  95. package/dist/groups/css-sizing-3.d.mts +3 -3
  96. package/dist/groups/css-sizing-4.d.mts +3 -3
  97. package/dist/groups/css-speech-1.d.mts +3 -3
  98. package/dist/groups/css-tables-3.d.mts +3 -3
  99. package/dist/groups/css-text-3.d.mts +3 -3
  100. package/dist/groups/css-text-4.d.mts +3 -3
  101. package/dist/groups/css-text-decor-3.d.mts +3 -3
  102. package/dist/groups/css-text-decor-4.d.mts +3 -3
  103. package/dist/groups/css-transforms-1.d.mts +3 -3
  104. package/dist/groups/css-transforms-2.d.mts +3 -3
  105. package/dist/groups/css-transitions-1.d.mts +3 -3
  106. package/dist/groups/css-transitions-2.d.mts +3 -3
  107. package/dist/groups/css-ui-4.d.mts +3 -3
  108. package/dist/groups/css-values-4.d.mts +3 -3
  109. package/dist/groups/css-values-5.d.mts +3 -3
  110. package/dist/groups/css-variables-2.d.mts +2 -2
  111. package/dist/groups/css-view-transitions-2.d.mts +3 -3
  112. package/dist/groups/css-viewport.d.mts +3 -3
  113. package/dist/groups/css-will-change-1.d.mts +3 -3
  114. package/dist/groups/css-writing-modes-4.d.mts +3 -3
  115. package/dist/groups/css2.d.mts +3 -3
  116. package/dist/groups/fill-stroke-3.d.mts +3 -3
  117. package/dist/groups/filter-effects-1.d.mts +3 -3
  118. package/dist/groups/filter-effects-2.d.mts +3 -3
  119. package/dist/groups/limited-availability.d.mts +1 -1
  120. package/dist/groups/mediaqueries-4.d.mts +3 -3
  121. package/dist/groups/mediaqueries-5.d.mts +3 -3
  122. package/dist/groups/motion-1.d.mts +3 -3
  123. package/dist/groups/newly-available/with-downstream.d.mts +3 -3
  124. package/dist/groups/newly-available.d.mts +3 -3
  125. package/dist/groups/not-discouraged.d.mts +3 -3
  126. package/dist/groups/scroll-animations-1.d.mts +3 -3
  127. package/dist/groups/selectors-4.d.mts +2 -2
  128. package/dist/groups/selectors-5.d.mts +2 -2
  129. package/dist/groups/widely-available/with-downstream.d.mts +3 -3
  130. package/dist/groups/widely-available.d.mts +3 -3
  131. package/dist/index.d.mts +1 -1
  132. package/dist/index.mjs +12 -5
  133. package/dist/{instrument-BqIZpbIU.mjs → instrument-C7Am_dJ3.mjs} +1 -1
  134. package/dist/{lowered-aJVapQT6.mjs → lowered-CKSYUc0i.mjs} +1 -1
  135. package/dist/{node-OJ_w_Usj.d.mts → node-BABEZ2oF.d.mts} +6 -0
  136. package/dist/plugin-types.d.mts +1 -1
  137. package/dist/plugin.d.mts +1 -1
  138. package/dist/{registry-BUSEO32-.mjs → registry-ByrYF2v5.mjs} +5 -1
  139. package/dist/{scope-INuJD4RT.d.mts → scope-1R_Np2Mj.d.mts} +5 -6
  140. package/dist/{sheet-BeHdq4xt.mjs → sheet-BT2R1wk_.mjs} +2 -2
  141. package/dist/surface.d.mts +1 -1
  142. package/dist/{theme-SlQ73rFL.mjs → theme-WGcgMD4V.mjs} +7 -5
  143. package/dist/{theme-types-Bqv0Ggz_.d.mts → theme-types-BY0mRf3K.d.mts} +5 -6
  144. package/dist/tui-types.d.mts +1 -1
  145. package/dist/tui.mjs +4 -4
  146. package/dist/types.d.mts +1 -1
  147. package/dist/vite.d.mts +1 -1
  148. package/dist/vite.mjs +10 -9
  149. package/docs/API.md +105 -2
  150. package/package.json +6 -2
  151. package/skills/cssints/references/plugins.md +12 -0
  152. package/dist/group-common-9zpBxfUF.d.mts +0 -1
package/dist/clay.mjs ADDED
@@ -0,0 +1,550 @@
1
+ import { a as registry } from "./registry-ByrYF2v5.mjs";
2
+ import { a as createTokens$1, i as createGlobalTheme$1, j as fail, s as sets } from "./theme-WGcgMD4V.mjs";
3
+ import { n as valueOf, t as together } from "./contrast-DLi4pp25.mjs";
4
+ import { n as parseColor } from "./color-BYIxVLlS.mjs";
5
+ import { Formatter, Predicate } from "effect";
6
+ import { clampRgb, formatHex } from "culori/fn";
7
+ //#region src/clay.ts
8
+ const tables = registry.clayTokens ??= {
9
+ properties: /* @__PURE__ */ new Map(),
10
+ defs: /* @__PURE__ */ new Map(),
11
+ themed: /* @__PURE__ */ new Map()
12
+ };
13
+ const inClay = (f) => (...args) => {
14
+ const web = {
15
+ properties: registry.properties,
16
+ defs: registry.defs,
17
+ themed: registry.themed
18
+ };
19
+ Object.assign(registry, tables);
20
+ try {
21
+ return f(...args);
22
+ } finally {
23
+ Object.assign(registry, web);
24
+ }
25
+ };
26
+ const createTokens = inClay((...args) => {
27
+ const root = createTokens$1(...args);
28
+ sets.get(root).clay = true;
29
+ return root;
30
+ });
31
+ const IDENT = /^[A-Za-z]\w*$/;
32
+ const createGlobalTheme = inClay((...args) => {
33
+ if (args.length !== 3 || typeof args[1] !== "string" || !IDENT.test(args[1])) throw fail(`cssints: createGlobalTheme(tokens, name, overrides) of cssints/clay takes its tokens, a name that is a C identifier (header() names a themed declaration <style>_<name>) and the values to set, got the name ${say(args[1])}`);
34
+ return createGlobalTheme$1(...args);
35
+ });
36
+ const STATES = [
37
+ ":hover",
38
+ ":focus",
39
+ ":active"
40
+ ];
41
+ const isClay = (v) => !!v && typeof v === "object" && Array.isArray(v.__clay) && !("__fonts" in v);
42
+ const node = (entries) => ({ __clay: entries });
43
+ const say = (v) => typeof v === "string" ? `"${v}"` : Formatter.formatJson(v);
44
+ const PX = /^(\d+\.?\d*|\.\d+)(px)?$/;
45
+ const PERCENT = /^(\d+\.?\d*|\.\d+)%$/;
46
+ const px = (prop, v) => {
47
+ const m = typeof v === "string" ? PX.exec(v) : null;
48
+ const n = typeof v === "number" ? v : m ? Number(m[1]) : NaN;
49
+ if (Number.isFinite(n) && n >= 0) return n;
50
+ throw fail(`cssints: ${prop}: unexpected ${say(v)}, expected a number of pixels (a number or "Npx", not negative)`);
51
+ };
52
+ const whole = (prop, v) => {
53
+ const n = px(prop, v);
54
+ if (Number.isInteger(n) && n <= 65535) return n;
55
+ throw fail(`cssints: ${prop}: ${say(v)} is not a whole number of pixels (Clay stores it as uint16_t)`);
56
+ };
57
+ const size = (prop, v) => {
58
+ if (v === "auto" || v === "stretch") return v;
59
+ if (typeof v === "string" && PERCENT.test(v)) return v;
60
+ return px(prop, v);
61
+ };
62
+ const keyword = (...words) => (prop, v) => {
63
+ if (typeof v === "string" && words.includes(v)) return v;
64
+ throw fail(`cssints: ${prop}: unexpected ${say(v)}, expected ${words.join(" | ")}`);
65
+ };
66
+ const VAR = /var\((--[\w-]+)\)/g;
67
+ const NOT_A_COLOUR = "is not a colour Clay can draw (a name, hex, rgb(), hsl(), oklch() or a colour token of the createTokens of cssints/clay; not currentColor or light-dark())";
68
+ const colour = (prop, u) => {
69
+ const v = String(u);
70
+ for (const [, name] of v.matchAll(VAR)) {
71
+ const def = tables.defs.get(name);
72
+ if (!def) throw fail(`cssints: ${prop}: ${name} is no token of the createTokens of cssints/clay`);
73
+ if (def.kind !== "color" && v === `var(${name})`) throw fail(`cssints: ${prop}: ${def.path} is a ${def.kind} token, not a colour`);
74
+ }
75
+ if (!v.includes("var(")) rgba(prop, v);
76
+ return v;
77
+ };
78
+ const one = (key, read) => (prop, parts) => {
79
+ if (parts.length !== 1) throw fail(`cssints: ${prop} takes one value, got ${parts.length}`);
80
+ return [[key, read(prop, parts[0])]];
81
+ };
82
+ const COLOURS = /* @__PURE__ */ new Set([
83
+ "backgroundColor",
84
+ "color",
85
+ "borderColor"
86
+ ]);
87
+ const sides = (keys, read) => (prop, parts) => {
88
+ if (parts.length < 1 || parts.length > 4) throw fail(`cssints: ${prop} takes 1 to 4 values, got ${parts.length}`);
89
+ const v = parts.map((p) => read(prop, p));
90
+ const at = [
91
+ v[0],
92
+ v[1] ?? v[0],
93
+ v[2] ?? v[0],
94
+ v[3] ?? v[1] ?? v[0]
95
+ ];
96
+ return keys.map((k, i) => [k, at[i]]);
97
+ };
98
+ const pair = (start, end) => (prop, parts) => {
99
+ if (parts.length < 1 || parts.length > 2) throw fail(`cssints: ${prop} takes 1 or 2 values, got ${parts.length}`);
100
+ const v = parts.map((x) => whole(prop, x));
101
+ return [[start, v[0]], [end, v[1] ?? v[0]]];
102
+ };
103
+ const POINTS = [
104
+ "left",
105
+ "center",
106
+ "right"
107
+ ].flatMap((x) => [
108
+ "top",
109
+ "center",
110
+ "bottom"
111
+ ].map((y) => `${x} ${y}`));
112
+ const FLOAT_OPTIONS = [
113
+ "attach",
114
+ "parent",
115
+ "root",
116
+ "offset",
117
+ "expand",
118
+ "zIndex",
119
+ "capture",
120
+ "clip"
121
+ ];
122
+ const SIGNED = /^-?(?:\d+\.?\d*|\.\d+)(?:px)?$/;
123
+ const offset = (prop, v) => {
124
+ const n = typeof v === "number" ? v : typeof v === "string" && SIGNED.test(v) ? Number.parseFloat(v) : NaN;
125
+ if (Number.isFinite(n)) return n;
126
+ throw fail(`cssints: ${prop}: unexpected ${say(v)}, expected a number of pixels (a number or "Npx")`);
127
+ };
128
+ const clayId = (id) => {
129
+ const h = Array.from(id, (ch) => ch.charCodeAt(0)).reduce((acc, byte) => {
130
+ const sum = acc + byte >>> 0;
131
+ const mixed = sum + (sum << 10) >>> 0;
132
+ return (mixed ^ mixed >>> 6) >>> 0;
133
+ }, 0);
134
+ const a = h + (h << 3) >>> 0;
135
+ const b = (a ^ a >>> 11) >>> 0;
136
+ return b + (b << 15) + 1 >>> 0;
137
+ };
138
+ const options = (prop, v, keys) => {
139
+ if (typeof v !== "object" || v === null || Array.isArray(v)) throw fail(`cssints: ${prop}: unexpected ${say(v)}, expected { ${keys.join(", ")} }`);
140
+ const bad = Object.keys(v).find((k) => !keys.includes(k));
141
+ if (bad !== void 0) throw fail(`cssints: ${prop}: unexpected ${say(bad)}, expected ${keys.join(" | ")}`);
142
+ return v;
143
+ };
144
+ const upper = (v) => String(v).toUpperCase().replace(" ", "_");
145
+ const floating = (prop, parts) => {
146
+ if (parts.length > 1) throw fail(`cssints: ${prop} takes one object of options, got ${parts.length} values`);
147
+ const o = options(prop, parts[0] ?? {}, FLOAT_OPTIONS);
148
+ const out = [["float", 1]];
149
+ const set = (k, v) => out.push([k, v]);
150
+ if (o.parent !== void 0 && o.root) throw fail(`cssints: ${prop}: parent and root are two places to attach to`);
151
+ if (o.parent !== void 0) {
152
+ if (typeof o.parent !== "string" || !/^[\x20-\x7e]+$/.test(o.parent)) throw fail(`cssints: ${prop}.parent: unexpected ${say(o.parent)}, expected the non-empty ASCII string of the parent's CLAY_ID()`);
153
+ set("floatTo", "ELEMENT_WITH_ID");
154
+ set("floatParentId", clayId(o.parent));
155
+ }
156
+ if (o.root !== void 0 && typeof o.root !== "boolean") throw fail(`cssints: ${prop}.root: unexpected ${say(o.root)}, expected true | false`);
157
+ if (o.root) set("floatTo", "ROOT");
158
+ if (o.attach !== void 0) {
159
+ const a = options(`${prop}.attach`, o.attach, ["element", "parent"]);
160
+ for (const k of ["element", "parent"]) if (a[k] !== void 0) set(`float${k === "element" ? "Element" : "Parent"}`, upper(keyword(...POINTS)(`${prop}.attach.${k}`, a[k])));
161
+ }
162
+ for (const [name, read] of [["offset", offset], ["expand", px]]) {
163
+ if (o[name] === void 0) continue;
164
+ const keys = name === "offset" ? ["x", "y"] : ["width", "height"];
165
+ const v = options(`${prop}.${name}`, o[name], keys);
166
+ for (const k of keys) if (v[k] !== void 0) set(`float${name === "offset" ? "Offset" : "Expand"}${k[0].toUpperCase()}${k.slice(1)}`, read(`${prop}.${name}.${k}`, v[k]));
167
+ }
168
+ if (o.zIndex !== void 0) {
169
+ if (!Number.isInteger(o.zIndex) || Math.abs(o.zIndex) > 32767) throw fail(`cssints: ${prop}.zIndex: unexpected ${say(o.zIndex)}, expected a whole number (Clay stores it as int16_t)`);
170
+ set("floatZIndex", o.zIndex);
171
+ }
172
+ if (o.capture !== void 0) {
173
+ if (typeof o.capture !== "boolean") throw fail(`cssints: ${prop}.capture: unexpected ${say(o.capture)}, expected true | false`);
174
+ set("floatCapture", o.capture ? "CAPTURE" : "PASSTHROUGH");
175
+ }
176
+ if (o.clip !== void 0) set("floatClip", keyword("none", "parent")(`${prop}.clip`, o.clip) === "none" ? "NONE" : "ATTACHED_PARENT");
177
+ return out;
178
+ };
179
+ const PADDING = [
180
+ "paddingTop",
181
+ "paddingRight",
182
+ "paddingBottom",
183
+ "paddingLeft"
184
+ ];
185
+ const BORDER = [
186
+ "borderTop",
187
+ "borderRight",
188
+ "borderBottom",
189
+ "borderLeft"
190
+ ];
191
+ const RADIUS = [
192
+ "topLeft",
193
+ "topRight",
194
+ "bottomRight",
195
+ "bottomLeft"
196
+ ];
197
+ const ALIGN = [
198
+ "flex-start",
199
+ "start",
200
+ "center",
201
+ "flex-end",
202
+ "end"
203
+ ];
204
+ const MEMBERS = {
205
+ backgroundColor: one("backgroundColor", colour),
206
+ bg: one("backgroundColor", colour),
207
+ color: one("color", colour),
208
+ borderColor: one("borderColor", colour),
209
+ width: one("width", size),
210
+ height: one("height", size),
211
+ padding: sides(PADDING, whole),
212
+ p: sides(PADDING, whole),
213
+ paddingInline: pair("paddingLeft", "paddingRight"),
214
+ paddingBlock: pair("paddingTop", "paddingBottom"),
215
+ ...Object.fromEntries([
216
+ "Top",
217
+ "Right",
218
+ "Bottom",
219
+ "Left"
220
+ ].flatMap((s) => [[`padding${s}`, one(`padding${s}`, whole)], [`p${s[0].toLowerCase()}`, one(`padding${s}`, whole)]])),
221
+ gap: one("gap", whole),
222
+ flexDirection: one("flexDirection", keyword("row", "column")),
223
+ justifyContent: one("justifyContent", keyword(...ALIGN)),
224
+ alignItems: one("alignItems", keyword(...ALIGN)),
225
+ borderRadius: sides(RADIUS, px),
226
+ borderWidth: sides(BORDER, whole),
227
+ border: (prop, parts) => {
228
+ if (parts.length !== 2) throw fail(`cssints: ${prop} takes a width and a colour, got ${parts.length} values`);
229
+ const w = whole(prop, parts[0]);
230
+ return [...BORDER.map((k) => [k, w]), ["borderColor", colour(prop, parts[1])]];
231
+ },
232
+ overflow: one("overflow", keyword("visible", "hidden")),
233
+ fontSize: one("fontSize", whole),
234
+ letterSpacing: one("letterSpacing", whole),
235
+ lineHeight: one("lineHeight", whole),
236
+ textAlign: one("textAlign", keyword("left", "center", "right")),
237
+ whiteSpace: one("whiteSpace", keyword("normal", "pre-line", "nowrap")),
238
+ float: floating
239
+ };
240
+ const member = (name, build) => (...parts) => {
241
+ if (parts.some(isClay)) throw fail(`cssints: ${name}: a style is not a value`);
242
+ return node(build(name, parts).map(([k, v]) => [
243
+ k,
244
+ v,
245
+ ""
246
+ ]));
247
+ };
248
+ const stylesOf = (what, styles) => {
249
+ const bad = styles.find((s) => !isClay(s));
250
+ if (bad !== void 0 || !styles.length) throw fail(`cssints: ${what} takes styles of cssints/clay, got ${bad === void 0 ? "nothing" : say(bad)}`);
251
+ return styles.flatMap((s) => s.__clay);
252
+ };
253
+ /**
254
+ * Merges styles in argument order: a later prop wins.
255
+ *
256
+ * @returns {ClayNode} the merged style
257
+ */
258
+ const cn = (...styles) => node(stylesOf("cn()", styles));
259
+ const state = (s) => (...styles) => node(stylesOf(s, styles).map(([k, v, inner]) => {
260
+ if (inner) throw fail(`cssints: ${s} wraps ${inner}: Clay states do not nest (one state per style)`);
261
+ return [
262
+ k,
263
+ v,
264
+ s
265
+ ];
266
+ }));
267
+ const hover = state(":hover");
268
+ const focus = state(":focus");
269
+ const active = state(":active");
270
+ /**
271
+ * The fonts of the app, in the order of its font array: `fonts("Roboto", "Mono").Mono` is a style that sets Clay's
272
+ * `fontId` to 1, and header() prints the order as an enum, `<name>_Mono`.
273
+ *
274
+ * @returns {Record<string, unknown>} a style per font, by name, and the list
275
+ */
276
+ const fonts = (...names) => {
277
+ const bad = names.find((n) => typeof n !== "string" || !IDENT.test(n));
278
+ if (bad !== void 0 || !names.length) throw fail(`cssints: fonts() takes the names of the app's fonts in order, each a C identifier, got ${bad === void 0 ? "nothing" : say(bad)}`);
279
+ const twice = names.find((n, i) => names.indexOf(n) !== i);
280
+ if (twice !== void 0) throw fail(`cssints: fonts(): ${say(twice)} is there twice`);
281
+ return {
282
+ __clay: [],
283
+ __fonts: names,
284
+ ...Object.fromEntries(names.map((n, i) => [String(n), node([[
285
+ "fontId",
286
+ i,
287
+ ""
288
+ ]])]))
289
+ };
290
+ };
291
+ const { backgroundColor, bg, color, borderColor, width, height, padding, p, paddingInline, paddingBlock, paddingTop, paddingRight, paddingBottom, paddingLeft, pt, pr, pb, pl, gap, flexDirection, justifyContent, alignItems, borderRadius, borderWidth, border, overflow, fontSize, letterSpacing, lineHeight, textAlign, whiteSpace, float } = Object.fromEntries(Object.entries(MEMBERS).map(([k, b]) => [k, member(k, b)]));
292
+ const rgba = (prop, text, values) => {
293
+ const flat = text.replace(VAR, (m, n) => valueOf(tables, n, values) ?? m);
294
+ const c = flat.includes("var(") ? void 0 : parseColor(flat);
295
+ if (!c) throw fail(`cssints: ${prop}: ${say(text)}${flat === text ? "" : ` (${say(flat)} here)`} ${NOT_A_COLOUR}`);
296
+ const hex = formatHex(clampRgb(c));
297
+ const [r, g, b] = [
298
+ 1,
299
+ 3,
300
+ 5
301
+ ].map((i) => Number.parseInt(hex.slice(i, i + 2), 16));
302
+ return {
303
+ r,
304
+ g,
305
+ b,
306
+ a: Math.round((c.alpha ?? 1) * 255)
307
+ };
308
+ };
309
+ const axis = (v) => v === "auto" ? { type: "FIT" } : v === "stretch" ? { type: "GROW" } : typeof v === "string" ? {
310
+ type: "PERCENT",
311
+ percent: Number.parseFloat(v) / 100
312
+ } : {
313
+ type: "FIXED",
314
+ min: v,
315
+ max: v
316
+ };
317
+ const X = {
318
+ start: "LEFT",
319
+ center: "CENTER",
320
+ end: "RIGHT"
321
+ };
322
+ const Y = {
323
+ start: "TOP",
324
+ center: "CENTER",
325
+ end: "BOTTOM"
326
+ };
327
+ const edge = (v) => v === "center" ? "center" : String(v).endsWith("end") ? "end" : "start";
328
+ const FLOATING = [
329
+ "float",
330
+ "floatTo",
331
+ "floatElement",
332
+ "floatParent",
333
+ "floatParentId",
334
+ "floatOffsetX",
335
+ "floatOffsetY",
336
+ "floatExpandWidth",
337
+ "floatExpandHeight",
338
+ "floatZIndex",
339
+ "floatCapture",
340
+ "floatClip"
341
+ ];
342
+ const floatingOf = (p) => {
343
+ const has = (...ks) => ks.some((k) => p.has(k));
344
+ const to = p.get("floatTo") ?? "PARENT";
345
+ if (to === "ROOT" && p.get("floatClip") === "ATTACHED_PARENT") throw fail(`cssints: float: clip "parent" does nothing on a float attached to the root (it has no clipping parent)`);
346
+ return {
347
+ ...has("floatOffsetX", "floatOffsetY") && { offset: {
348
+ x: p.get("floatOffsetX") ?? 0,
349
+ y: p.get("floatOffsetY") ?? 0
350
+ } },
351
+ ...has("floatExpandWidth", "floatExpandHeight") && { expand: {
352
+ width: p.get("floatExpandWidth") ?? 0,
353
+ height: p.get("floatExpandHeight") ?? 0
354
+ } },
355
+ ...to === "ELEMENT_WITH_ID" && { parentId: p.get("floatParentId") },
356
+ ...p.has("floatZIndex") && { zIndex: p.get("floatZIndex") },
357
+ ...has("floatElement", "floatParent") && { attachPoints: {
358
+ element: p.get("floatElement") ?? "LEFT_TOP",
359
+ parent: p.get("floatParent") ?? "LEFT_TOP"
360
+ } },
361
+ ...p.has("floatCapture") && { pointerCaptureMode: p.get("floatCapture") },
362
+ attachTo: to,
363
+ ...p.has("floatClip") && { clipTo: p.get("floatClip") }
364
+ };
365
+ };
366
+ const shapeOf = (entries, values) => {
367
+ const p = new Map(entries.map(([k, v]) => [k, v]));
368
+ const colourOf = (k) => rgba(k, String(p.get(k)), values);
369
+ const out = {};
370
+ const layout = {};
371
+ const get = (k) => p.get(k);
372
+ if (get("width") !== void 0 || get("height") !== void 0) layout.sizing = {
373
+ ...get("width") !== void 0 && { width: axis(get("width")) },
374
+ ...get("height") !== void 0 && { height: axis(get("height")) }
375
+ };
376
+ if (PADDING.some((k) => p.has(k))) layout.padding = {
377
+ left: get("paddingLeft") ?? 0,
378
+ right: get("paddingRight") ?? 0,
379
+ top: get("paddingTop") ?? 0,
380
+ bottom: get("paddingBottom") ?? 0
381
+ };
382
+ if (p.has("gap")) layout.childGap = get("gap");
383
+ const column = get("flexDirection") === "column";
384
+ if (p.has("flexDirection")) layout.layoutDirection = column ? "TOP_TO_BOTTOM" : "LEFT_TO_RIGHT";
385
+ const main = get("justifyContent"), cross = get("alignItems");
386
+ if (main !== void 0 || cross !== void 0) {
387
+ const [x, y] = column ? [cross, main] : [main, cross];
388
+ layout.childAlignment = {
389
+ ...x !== void 0 && { x: X[edge(x)] },
390
+ ...y !== void 0 && { y: Y[edge(y)] }
391
+ };
392
+ }
393
+ if (Object.keys(layout).length) out.layout = layout;
394
+ if (p.has("backgroundColor")) out.backgroundColor = colourOf("backgroundColor");
395
+ if (RADIUS.some((k) => p.has(k))) out.cornerRadius = Object.fromEntries(RADIUS.map((k) => [k, get(k) ?? 0]));
396
+ if (BORDER.some((k) => p.has(k)) || p.has("borderColor")) out.border = {
397
+ ...p.has("borderColor") && { color: colourOf("borderColor") },
398
+ width: {
399
+ left: get("borderLeft") ?? 0,
400
+ right: get("borderRight") ?? 0,
401
+ top: get("borderTop") ?? 0,
402
+ bottom: get("borderBottom") ?? 0
403
+ }
404
+ };
405
+ if (p.has("overflow")) out.clip = get("overflow") === "hidden" ? HIDDEN : VISIBLE;
406
+ if (FLOATING.some((k) => p.has(k))) out.floating = floatingOf(p);
407
+ const text = {};
408
+ if (p.has("color")) text.textColor = colourOf("color");
409
+ for (const k of [
410
+ "fontId",
411
+ "fontSize",
412
+ "letterSpacing",
413
+ "lineHeight"
414
+ ]) if (p.has(k)) text[k] = get(k);
415
+ if (p.has("textAlign")) text.textAlignment = String(get("textAlign")).toUpperCase();
416
+ const wrap = get("whiteSpace");
417
+ if (wrap !== void 0) text.wrapMode = wrap === "nowrap" ? "NONE" : wrap === "pre-line" ? "NEWLINES" : "WORDS";
418
+ if (Object.keys(text).length) out.text = text;
419
+ return out;
420
+ };
421
+ const HIDDEN = {
422
+ horizontal: 1,
423
+ vertical: 1
424
+ };
425
+ const VISIBLE = {
426
+ horizontal: 0,
427
+ vertical: 0
428
+ };
429
+ const isLeaf = (v) => typeof v !== "object" || Object.hasOwn(v, "r") || Object.hasOwn(v, "type");
430
+ const pick = (full, mask) => Object.fromEntries(Object.keys(mask).map((k) => [k, isLeaf(mask[k]) ? full[k] : pick(full[k], mask[k])]));
431
+ const diff = (a, b) => {
432
+ const out = {};
433
+ for (const [k, v] of Object.entries(a)) if (isLeaf(v)) {
434
+ if (Formatter.formatJson(v) !== Formatter.formatJson(b[k])) out[k] = v;
435
+ } else {
436
+ const d = diff(v, b[k]);
437
+ if (Object.keys(d).length) out[k] = d;
438
+ }
439
+ return out;
440
+ };
441
+ const merge = (a, b) => {
442
+ const out = { ...a };
443
+ for (const [k, v] of Object.entries(b)) out[k] = isLeaf(v) || out[k] === void 0 ? v : merge(out[k], v);
444
+ return out;
445
+ };
446
+ const literalOf = (n, values) => {
447
+ const base = n.__clay.filter((e) => !e[2]);
448
+ const out = shapeOf(base, values);
449
+ for (const s of STATES) {
450
+ const own = n.__clay.filter((e) => e[2] === s);
451
+ if (!own.length) continue;
452
+ const mask = shapeOf([...base.filter((e) => e[0] === "flexDirection"), ...own], values);
453
+ const overlay = pick(shapeOf([...base, ...own], values), mask);
454
+ const layout = overlay.layout;
455
+ if (layout && !own.some((e) => e[0] === "flexDirection")) {
456
+ delete layout.layoutDirection;
457
+ if (!Object.keys(layout).length) delete overlay.layout;
458
+ }
459
+ out[s] = overlay;
460
+ }
461
+ return out;
462
+ };
463
+ const replacement = (n) => {
464
+ const out = literalOf(n);
465
+ if (!n.__clay.some(([k, v]) => COLOURS.has(k) && String(v).includes("var("))) return out;
466
+ const themes = {};
467
+ for (const { label, values } of together({
468
+ themed: tables.themed,
469
+ layers: registry.layers
470
+ })) {
471
+ const d = diff(literalOf(n, values), out);
472
+ if (Object.keys(d).length) themes[label] = d;
473
+ }
474
+ if (Object.keys(themes).length) out.themes = themes;
475
+ return out;
476
+ };
477
+ registry.clay = (v) => {
478
+ if (Predicate.hasProperty(v, "__fonts")) return `(${Formatter.formatJson({ fonts: v.__fonts })})`;
479
+ return isClay(v) ? `(${Formatter.formatJson(replacement(v))})` : void 0;
480
+ };
481
+ const ENUM = {
482
+ type: (v) => `CLAY__SIZING_TYPE_${v}`,
483
+ layoutDirection: (v) => `CLAY_${v}`,
484
+ x: (v) => `CLAY_ALIGN_X_${v}`,
485
+ y: (v) => `CLAY_ALIGN_Y_${v}`,
486
+ textAlignment: (v) => `CLAY_TEXT_ALIGN_${v}`,
487
+ wrapMode: (v) => `CLAY_TEXT_WRAP_${v}`,
488
+ element: (v) => `CLAY_ATTACH_POINT_${v}`,
489
+ parent: (v) => `CLAY_ATTACH_POINT_${v}`,
490
+ pointerCaptureMode: (v) => `CLAY_POINTER_CAPTURE_MODE_${v}`,
491
+ attachTo: (v) => `CLAY_ATTACH_TO_${v}`,
492
+ clipTo: (v) => `CLAY_CLIP_TO_${v}`
493
+ };
494
+ const c = (key, v) => {
495
+ if (typeof v === "number") return key === "parentId" ? `${v}u` : String(v);
496
+ if (typeof v === "string") return ENUM[key](v);
497
+ if (v.type !== void 0) return `{ .size = { ${v.percent !== void 0 ? `.percent = ${c("", v.percent)}` : `.minMax = { ${c("", v.min ?? 0)}, ${c("", v.max ?? 0)} }`} }, .type = ${c("type", v.type)} }`;
498
+ return `{ ${Object.entries(v).map(([k, x]) => `.${k} = ${c(k, x)}`).join(", ")} }`;
499
+ };
500
+ const SHAPE = /* @__PURE__ */ new Set([
501
+ "layout",
502
+ "backgroundColor",
503
+ "cornerRadius",
504
+ "border",
505
+ "clip",
506
+ "floating",
507
+ "text",
508
+ "themes",
509
+ ...STATES
510
+ ]);
511
+ const isShape = (v) => !!v && typeof v === "object" && Object.keys(v).every((k) => SHAPE.has(k)) && !Formatter.formatJson(v).includes("\"var(");
512
+ /**
513
+ * The styles of a module as C: a `Clay_ElementDeclaration` per export, and a `Clay_TextElementConfig` named
514
+ * `<name>_text` for one that sets text props, for `CLAY(id, name)` and `CLAY_TEXT(s, name_text)`. A state is a whole
515
+ * declaration of its own, `<name>_hover` (`_focus`, `_active`, and `<name>_hover_text`); a theme is a whole set of
516
+ * them again, its name last (`<name>_<theme>`, `<name>_hover_<theme>`, `<name>_text_<theme>`), for every style once
517
+ * the module has a theme, so a page picks a theme by appending its name. The fonts of `fonts()` are an enum, `<name>_<font>`, in their order.
518
+ *
519
+ * @param {Record<string, unknown>} styles the exports of a built module of cssints/clay styles
520
+ * @returns {string} a C header that includes clay.h
521
+ */
522
+ const header = (styles) => {
523
+ const lines = [
524
+ "// Generated by cssints/clay. Do not edit.",
525
+ "#pragma once",
526
+ "",
527
+ "#include \"clay.h\"",
528
+ ""
529
+ ];
530
+ const print = (name, all, theme = "") => {
531
+ const { themes: _, ...v } = all;
532
+ const base = Object.fromEntries(Object.entries(v).filter(([k]) => !STATES.includes(k)));
533
+ for (const [suffix, shape] of [["", base], ...STATES.flatMap((s) => v[s] ? [[`_${s.slice(1)}`, merge(base, v[s])]] : [])]) {
534
+ const { text, ...decl } = shape;
535
+ if (Object.keys(decl).length) lines.push(`static const Clay_ElementDeclaration ${name}${suffix}${theme} = ${c("", decl)};`);
536
+ if (text) lines.push(`static const Clay_TextElementConfig ${name}${suffix}_text${theme} = ${c("", text)};`);
537
+ }
538
+ };
539
+ const shapes = Object.entries(styles).filter((e) => isShape(e[1]));
540
+ for (const [name, v] of Object.entries(styles)) if (Predicate.hasProperty(v, "fonts") && Array.isArray(v.fonts) && Object.keys(v).length === 1) lines.push(`enum { ${v.fonts.map((f, i) => `${name}_${String(f)} = ${i}`).join(", ")} };`);
541
+ for (const [name, v] of shapes) print(name, v);
542
+ const names = [...new Set(shapes.flatMap(([, v]) => Object.keys(v.themes ?? {})))];
543
+ for (const theme of names) {
544
+ lines.push("", `// theme ${theme}`);
545
+ for (const [name, v] of shapes) print(name, merge(v, v.themes?.[theme] ?? {}), `_${theme}`);
546
+ }
547
+ return `${lines.join("\n")}\n`;
548
+ };
549
+ //#endregion
550
+ export { active, alignItems, backgroundColor, bg, border, borderColor, borderRadius, borderWidth, cn, color, createGlobalTheme, createTokens, flexDirection, float, focus, fontSize, fonts, gap, header, height, hover, justifyContent, letterSpacing, lineHeight, overflow, p, padding, paddingBlock, paddingBottom, paddingInline, paddingLeft, paddingRight, paddingTop, pb, pl, pr, pt, textAlign, whiteSpace, width };
@@ -1,5 +1,5 @@
1
- import { a as registry, d as MacroError, o as warn } from "./registry-BUSEO32-.mjs";
2
- import { l as layerStatements } from "./sheet-BeHdq4xt.mjs";
1
+ import { a as registry, d as MacroError, o as warn } from "./registry-ByrYF2v5.mjs";
2
+ import { l as layerStatements } from "./sheet-BT2R1wk_.mjs";
3
3
  import { Effect } from "effect";
4
4
  //#region src/contrast.ts
5
5
  const VAR = /var\((--[^\s,)]+)\)/g;
@@ -0,0 +1 @@
1
+ import "./theme-types-BY0mRf3K.mjs";
@@ -1,4 +1,4 @@
1
- import { $p as Fn, Qp as CheckMath, Xp as Arg, Zp as CheckFn, am as Fallback, cm as Text, em as Result, om as Part, rm as Check, sm as Style, tm as Text$1 } from "./theme-types-Bqv0Ggz_.mjs";
1
+ import { $p as Fn, Qp as CheckMath, Xp as Arg, Zp as CheckFn, am as Fallback, cm as Text, em as Result, om as Part, rm as Check, sm as Style, tm as Text$1 } from "./theme-types-BY0mRf3K.mjs";
2
2
  import { properties } from "@cssints/css-grammar/mdn";
3
3
  import { CSSStyleValue } from "@cssints/css-grammar/values";
4
4
  import { QueryKind, ValidQuery } from "@cssints/css-grammar/query";
@@ -1,6 +1,6 @@
1
- import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../../theme-types-Bqv0Ggz_.mjs";
2
- import { a as GProp, r as GLayout, t as GCondition } from "../../group-types-9ttphdku.mjs";
3
- import "../../group-common-9zpBxfUF.mjs";
1
+ import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../../theme-types-BY0mRf3K.mjs";
2
+ import { a as GProp, r as GLayout, t as GCondition } from "../../group-types-Dn9CIR8J.mjs";
3
+ import "../../group-common-3PAVTxpd.mjs";
4
4
  import { active, alignContent, alignItems, alignSelf, animation, animationDelay, animationDirection, animationDuration, animationFillMode, animationIterationCount, animationName, animationPlayState, animationTimingFunction, attrFn, backgroundAttachment, backgroundClip, backgroundColor, backgroundImage, backgroundOrigin, backgroundPosition, backgroundRepeat, backgroundSize, bg, border, borderBottom, borderBottomColor, borderBottomLeftRadius, borderBottomRightRadius, borderBottomStyle, borderBottomWidth, borderCollapse, borderColor, borderImage, borderImageOutset, borderImageSlice, borderImageSource, borderImageWidth, borderLeft, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRadius, borderRight, borderRightColor, borderRightStyle, borderRightWidth, borderSpacing, borderStyle, borderTop, borderTopColor, borderTopLeftRadius, borderTopRightRadius, borderTopStyle, borderTopWidth, borderWidth, bottom, boxShadow, boxSizing, calc, captionSide, checked, clear, color, colorFn, columnGap, content, counter, counterIncrement, counterReset, counters, cubicBezier, direction, disabled, display, empty, emptyCells, enabled, firstChild, firstOfType, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, float, floodColor, floodOpacity, focus, font, fontFamily, fontSize, fontStyle, fontWeight, height, hover, hsl, hsla, image, inRange, indeterminate, invalid, justifyContent, lastChild, lastOfType, left, letterSpacing, lightingColor, lineHeight, linearGradient, link, listStyle, listStyleImage, listStylePosition, listStyleType, m, margin, marginBottom, marginLeft, marginRight, marginTop, matrix, matrix3d, maxHeight, maxWidth, mb, minHeight, minWidth, ml, mr, mt, onlyChild, onlyOfType, opacity, optional, order, outOfRange, outlineColor, outlineStyle, outlineWidth, overflow, overflowX, overflowY, p, padding, paddingBottom, paddingLeft, paddingRight, paddingTop, pb, perspective, perspectiveFn, perspectiveOrigin, pl, pointerEvents, position, pr, pt, quotes, radialGradient, repeatingLinearGradient, repeatingRadialGradient, required, rgb, rgba, right, root, rotate3d, rotateFn, rotateX, rotateY, rotateZ, scale3d, scaleFn, scaleX, scaleY, scaleZ, skew, skewX, skewY, steps, supports, tableLayout, target, textAlign, textIndent, textOverflow, textShadow, textTransform, top, transform, transformOrigin, transformStyle, transition, transitionDelay, transitionDuration, transitionProperty, transitionTimingFunction, translate3d, translateFn, translateX, translateY, translateZ, unicodeBidi, url, valid, verticalAlign, visibility, visited, width, wordBreak, wordSpacing, zIndex } from "../baseline-2015.mjs";
5
5
  import { properties } from "@cssints/css-grammar/mdn";
6
6
  //#region src/groups/baseline-2015/with-downstream.d.ts
@@ -1,6 +1,6 @@
1
- import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../theme-types-Bqv0Ggz_.mjs";
2
- import { a as GProp, i as GMath, n as GFn, r as GLayout, t as GCondition } from "../group-types-9ttphdku.mjs";
3
- import "../group-common-9zpBxfUF.mjs";
1
+ import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../theme-types-BY0mRf3K.mjs";
2
+ import { a as GProp, i as GMath, n as GFn, r as GLayout, t as GCondition } from "../group-types-Dn9CIR8J.mjs";
3
+ import "../group-common-3PAVTxpd.mjs";
4
4
  import { properties } from "@cssints/css-grammar/mdn";
5
5
  //#region src/groups/baseline-2015.d.ts
6
6
  type B = {
@@ -1,6 +1,6 @@
1
- import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../../theme-types-Bqv0Ggz_.mjs";
2
- import { a as GProp, r as GLayout, t as GCondition } from "../../group-types-9ttphdku.mjs";
3
- import "../../group-common-9zpBxfUF.mjs";
1
+ import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../../theme-types-BY0mRf3K.mjs";
2
+ import { a as GProp, r as GLayout, t as GCondition } from "../../group-types-Dn9CIR8J.mjs";
3
+ import "../../group-common-3PAVTxpd.mjs";
4
4
  import { WebkitTextFillColor, active, alignContent, alignItems, alignSelf, animation, animationDelay, animationDirection, animationDuration, animationFillMode, animationIterationCount, animationName, animationPlayState, animationTimingFunction, attrFn, backgroundAttachment, backgroundClip, backgroundColor, backgroundImage, backgroundOrigin, backgroundPosition, backgroundRepeat, backgroundSize, bg, blur, border, borderBottom, borderBottomColor, borderBottomLeftRadius, borderBottomRightRadius, borderBottomStyle, borderBottomWidth, borderCollapse, borderColor, borderImage, borderImageOutset, borderImageRepeat, borderImageSlice, borderImageSource, borderImageWidth, borderLeft, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRadius, borderRight, borderRightColor, borderRightStyle, borderRightWidth, borderSpacing, borderStyle, borderTop, borderTopColor, borderTopLeftRadius, borderTopRightRadius, borderTopStyle, borderTopWidth, borderWidth, bottom, boxShadow, boxSizing, brightness, calc, captionSide, checked, clear, color, colorFn, columnGap, columnWidth, content, contrast, counter, counterIncrement, counterReset, counters, cubicBezier, direction, disabled, display, dropShadow, empty, emptyCells, enabled, filter, firstChild, firstOfType, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, float, floodColor, floodOpacity, focus, font, fontFamily, fontSize, fontStyle, fontWeight, grayscale, height, hover, hsl, hsla, hueRotate, image, inRange, indeterminate, invalid, invert, justifyContent, justifyItems, lastChild, lastOfType, left, letterSpacing, lightingColor, lineHeight, linearGradient, link, listStyle, listStyleImage, listStylePosition, listStyleType, m, margin, marginBottom, marginLeft, marginRight, marginTop, matrix, matrix3d, maxHeight, maxWidth, mb, minHeight, minWidth, ml, mr, mt, onlyChild, onlyOfType, opacity, opacityFn, optional, order, outOfRange, outlineColor, outlineStyle, outlineWidth, overflow, overflowX, overflowY, p, padding, paddingBottom, paddingLeft, paddingRight, paddingTop, pb, perspective, perspectiveFn, perspectiveOrigin, pl, pointerEvents, position, pr, pt, quotes, radialGradient, repeatingLinearGradient, repeatingRadialGradient, required, rgb, rgba, right, root, rotate3d, rotateFn, rotateX, rotateY, rotateZ, saturate, scale3d, scaleFn, scaleX, scaleY, scaleZ, sepia, skew, skewX, skewY, steps, supports, tableLayout, target, textAlign, textAnchor, textIndent, textOverflow, textShadow, textTransform, top, transform, transformOrigin, transformStyle, transition, transitionDelay, transitionDuration, transitionProperty, transitionTimingFunction, translate3d, translateFn, translateX, translateY, translateZ, unicodeBidi, url, valid, verticalAlign, visibility, visited, width, wordBreak, wordSpacing, zIndex } from "../baseline-2016.mjs";
5
5
  import { properties } from "@cssints/css-grammar/mdn";
6
6
  //#region src/groups/baseline-2016/with-downstream.d.ts
@@ -1,6 +1,6 @@
1
- import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../theme-types-Bqv0Ggz_.mjs";
2
- import { a as GProp, i as GMath, n as GFn, r as GLayout, t as GCondition } from "../group-types-9ttphdku.mjs";
3
- import "../group-common-9zpBxfUF.mjs";
1
+ import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../theme-types-BY0mRf3K.mjs";
2
+ import { a as GProp, i as GMath, n as GFn, r as GLayout, t as GCondition } from "../group-types-Dn9CIR8J.mjs";
3
+ import "../group-common-3PAVTxpd.mjs";
4
4
  import { properties } from "@cssints/css-grammar/mdn";
5
5
  //#region src/groups/baseline-2016.d.ts
6
6
  type B = {
@@ -1,6 +1,6 @@
1
- import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, Y as GridMethods, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../../theme-types-Bqv0Ggz_.mjs";
2
- import { a as GProp, r as GLayout, t as GCondition } from "../../group-types-9ttphdku.mjs";
3
- import "../../group-common-9zpBxfUF.mjs";
1
+ import { A as Wrap, C as Keyframes, D as QueryWrap, F as cv, H as style, I as firstThatWorks, J as FlexMethods, K as within, L as global, M as cn, O as StateWrap, R as group, S as CvValue, T as PositionTry, W as token, Y as GridMethods, _ as CSSStyleValue, a as DtcgUnit, am as Fallback, b as CvConfig, c as Tokens, d as createTokens, f as layers, g as CSSImageValue, h as CSSColorValue, i as DtcgShadow, j as attr, k as Steps, l as check, m as CSS, n as DtcgColor, o as DtcgValue, om as Part, p as AttrOp, q as ClassValue, r as DtcgCubicBezier, s as Overrides, sm as Style, t as CheckOverrides, u as createGlobalTheme, v as CSSUnitValue, x as CvProps, z as keyframes } from "../../theme-types-BY0mRf3K.mjs";
2
+ import { a as GProp, r as GLayout, t as GCondition } from "../../group-types-Dn9CIR8J.mjs";
3
+ import "../../group-common-3PAVTxpd.mjs";
4
4
  import { WebkitTextFillColor, WebkitTextStroke, WebkitTextStrokeColor, WebkitTextStrokeWidth, active, alignContent, alignItems, alignSelf, animation, animationDelay, animationDirection, animationDuration, animationFillMode, animationIterationCount, animationName, animationPlayState, animationTimingFunction, attrFn, backgroundAttachment, backgroundClip, backgroundColor, backgroundImage, backgroundOrigin, backgroundPosition, backgroundRepeat, backgroundSize, bg, blur, border, borderBottom, borderBottomColor, borderBottomLeftRadius, borderBottomRightRadius, borderBottomStyle, borderBottomWidth, borderCollapse, borderColor, borderImage, borderImageOutset, borderImageRepeat, borderImageSlice, borderImageSource, borderImageWidth, borderLeft, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRadius, borderRight, borderRightColor, borderRightStyle, borderRightWidth, borderSpacing, borderStyle, borderTop, borderTopColor, borderTopLeftRadius, borderTopRightRadius, borderTopStyle, borderTopWidth, borderWidth, bottom, boxShadow, boxSizing, brightness, calc, captionSide, checked, clear, color, colorFn, columnCount, columnFill, columnGap, columnRule, columnRuleColor, columnRuleStyle, columnRuleWidth, columnWidth, columns, content, contrast, counter, counterIncrement, counterReset, counters, cubicBezier, direction, disabled, display, dropShadow, empty, emptyCells, enabled, fill, fillOpacity, fillRule, filter, firstChild, firstOfType, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, float, floodColor, floodOpacity, focus, font, fontFamily, fontFeatureSettings, fontSize, fontStyle, fontWeight, gap, grayscale, gridArea, gridAutoFlow, gridColumn, gridColumnEnd, gridColumnStart, gridRow, gridRowEnd, gridRowStart, gridTemplate, gridTemplateAreas, gridTemplateColumns, gridTemplateRows, height, hover, hsl, hsla, hueRotate, image, inRange, indeterminate, invalid, invert, justifyContent, justifyItems, justifySelf, lastChild, lastOfType, left, letterSpacing, lightingColor, lineHeight, linearGradient, link, listStyle, listStyleImage, listStylePosition, listStyleType, m, margin, marginBottom, marginLeft, marginRight, marginTop, marker, markerEnd, markerMid, markerStart, matrix, matrix3d, maxHeight, maxWidth, mb, minHeight, minWidth, minmax, ml, mr, mt, onlyChild, onlyOfType, opacity, opacityFn, optional, order, outOfRange, outlineColor, outlineOffset, outlineStyle, outlineWidth, overflow, overflowX, overflowY, p, padding, paddingBottom, paddingLeft, paddingRight, paddingTop, pb, perspective, perspectiveFn, perspectiveOrigin, pl, pointerEvents, position, pr, pt, quotes, radialGradient, repeatingLinearGradient, repeatingRadialGradient, required, rgb, rgba, right, root, rotate3d, rotateFn, rotateX, rotateY, rotateZ, rowGap, saturate, scale3d, scaleFn, scaleX, scaleY, scaleZ, sepia, skew, skewX, skewY, steps, stopColor, stopOpacity, stroke, strokeDasharray, strokeDashoffset, strokeLinecap, strokeLinejoin, strokeMiterlimit, strokeOpacity, strokeWidth, supports, tableLayout, target, textAlign, textAnchor, textIndent, textOverflow, textShadow, textTransform, top, transform, transformOrigin, transformStyle, transition, transitionDelay, transitionDuration, transitionProperty, transitionTimingFunction, translate3d, translateFn, translateX, translateY, translateZ, unicodeBidi, url, valid, var as _var, verticalAlign, visibility, visited, width, wordBreak, wordSpacing, writingMode, zIndex } from "../baseline-2017.mjs";
5
5
  import { properties } from "@cssints/css-grammar/mdn";
6
6
  //#region src/groups/baseline-2017/with-downstream.d.ts