@zazz-ui/core 0.6.3 → 0.8.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 (146) hide show
  1. package/AUTHORING.md +21 -20
  2. package/CHANGELOG.md +158 -0
  3. package/README.md +4 -4
  4. package/dist/sri.json +86 -83
  5. package/dist/zazz.css +1 -1
  6. package/dist/zazz.js +1 -1
  7. package/editor/zazz.css-data.json +4491 -1484
  8. package/editor/zazz.html-data.json +15 -3
  9. package/editor/zazz.language-data.json +108 -106
  10. package/editor/zazz.lint-data.json +2356 -2
  11. package/package.json +1 -1
  12. package/src/base/_defaults.css +413 -0
  13. package/src/base/_layers.css +6 -2
  14. package/src/base/_properties-2xl.css +20 -2
  15. package/src/base/_properties-active.css +32 -0
  16. package/src/base/_properties-checked.css +32 -0
  17. package/src/base/_properties-current.css +32 -0
  18. package/src/base/_properties-disabled.css +32 -0
  19. package/src/base/_properties-focus-visible.css +32 -0
  20. package/src/base/_properties-focus-within.css +32 -0
  21. package/src/base/_properties-hover.css +32 -0
  22. package/src/base/_properties-lg.css +20 -2
  23. package/src/base/_properties-md.css +20 -2
  24. package/src/base/_properties-open.css +32 -0
  25. package/src/base/_properties-sm.css +20 -2
  26. package/src/base/_properties-starting.css +16 -0
  27. package/src/base/_properties-stuck.css +16 -0
  28. package/src/base/_properties-xl.css +20 -2
  29. package/src/base/_properties.css +58 -9
  30. package/src/base/_shadows.css +46 -0
  31. package/src/base/_utilities-box.css +181 -23
  32. package/src/base/_utilities-color.css +1 -3
  33. package/src/base/_utilities-effects.css +39 -152
  34. package/src/base/_utilities-flow.css +80 -68
  35. package/src/base/_utilities-grid.css +21 -32
  36. package/src/base/_utilities-margin.css +1 -0
  37. package/src/base/_utilities-pseudo.css +58 -4
  38. package/src/base/_utilities-sizing.css +1 -3
  39. package/src/base/_utilities-spacing.css +197 -34
  40. package/src/base/_utilities-tier-2xl.css +10 -1
  41. package/src/base/_utilities-tier-active.css +16 -0
  42. package/src/base/_utilities-tier-checked.css +16 -0
  43. package/src/base/_utilities-tier-current.css +16 -0
  44. package/src/base/_utilities-tier-disabled.css +16 -0
  45. package/src/base/_utilities-tier-focus-visible.css +16 -0
  46. package/src/base/_utilities-tier-focus-within.css +16 -0
  47. package/src/base/_utilities-tier-hover.css +16 -0
  48. package/src/base/_utilities-tier-lg.css +10 -1
  49. package/src/base/_utilities-tier-md.css +10 -1
  50. package/src/base/_utilities-tier-open.css +16 -0
  51. package/src/base/_utilities-tier-sm.css +10 -1
  52. package/src/base/_utilities-tier-starting.css +8 -0
  53. package/src/base/_utilities-tier-stuck.css +8 -0
  54. package/src/base/_utilities-tier-xl.css +10 -1
  55. package/src/base/_utilities-typography.css +1 -9
  56. package/src/base/_variables.css +5 -85
  57. package/src/base/kit-styling.d.ts +11 -0
  58. package/src/base/kit-styling.d.ts.map +1 -0
  59. package/src/base/kit-styling.js +504 -0
  60. package/src/base/kit-styling.ts +507 -0
  61. package/src/base/reveal.d.ts +3 -3
  62. package/src/base/reveal.d.ts.map +1 -1
  63. package/src/base/reveal.js +34 -18
  64. package/src/base/reveal.ts +42 -20
  65. package/src/base/utilities.d.ts +28 -10
  66. package/src/base/utilities.d.ts.map +1 -1
  67. package/src/base/utilities.js +172 -44
  68. package/src/base/utilities.ts +188 -54
  69. package/src/index.css +2 -0
  70. package/src/manifest.d.ts.map +1 -1
  71. package/src/manifest.js +3 -1
  72. package/src/manifest.ts +3 -1
  73. package/src/primitives/avatar/avatar.html +2 -2
  74. package/src/primitives/badge/badge.css +14 -10
  75. package/src/primitives/button/button.css +17 -13
  76. package/src/primitives/button-group/button-group.css +13 -6
  77. package/src/primitives/callout/callout.css +6 -2
  78. package/src/primitives/card/card-subgrid.html +3 -3
  79. package/src/primitives/card/card.css +8 -4
  80. package/src/primitives/card/card.html +2 -2
  81. package/src/primitives/carousel/carousel.html +12 -12
  82. package/src/primitives/checkbox/checkbox.css +6 -2
  83. package/src/primitives/combobox/combobox.css +8 -4
  84. package/src/primitives/debug/audit-core.d.ts +8 -0
  85. package/src/primitives/debug/audit-core.d.ts.map +1 -1
  86. package/src/primitives/debug/audit-core.js +30 -6
  87. package/src/primitives/debug/audit-core.ts +49 -5
  88. package/src/primitives/debug/debug.d.ts +0 -15
  89. package/src/primitives/debug/debug.d.ts.map +1 -1
  90. package/src/primitives/debug/debug.js +11 -2
  91. package/src/primitives/debug/debug.ts +12 -1
  92. package/src/primitives/dialog/dialog-with-form.html +1 -1
  93. package/src/primitives/dialog/dialog.css +35 -14
  94. package/src/primitives/fields/fields.css +8 -4
  95. package/src/primitives/input/input.css +6 -2
  96. package/src/primitives/input-group/input-group.css +5 -1
  97. package/src/primitives/kbd/kbd.css +6 -2
  98. package/src/primitives/layout/layout.html +1 -1
  99. package/src/primitives/lightbox/lightbox.css +12 -16
  100. package/src/primitives/lightbox/lightbox.html +1 -1
  101. package/src/primitives/menu/menu.css +3 -3
  102. package/src/primitives/meter/meter.css +6 -2
  103. package/src/primitives/mobile-menu/mobile-menu.css +2 -2
  104. package/src/primitives/mobile-menu/mobile-menu.html +1 -1
  105. package/src/primitives/navigation-menu/navigation-menu-featured.html +1 -1
  106. package/src/primitives/navigation-menu/navigation-menu.css +4 -4
  107. package/src/primitives/navigation-menu/navigation-menu.html +1 -1
  108. package/src/primitives/otp/otp.css +6 -2
  109. package/src/primitives/password-group/password-group.css +5 -1
  110. package/src/primitives/popover/popover.css +8 -4
  111. package/src/primitives/progress/progress.css +6 -2
  112. package/src/primitives/radio/radio.css +6 -2
  113. package/src/primitives/reveal/reveal.css +17 -11
  114. package/src/primitives/select/select.css +15 -7
  115. package/src/primitives/slider/slider.css +7 -7
  116. package/src/primitives/switch/switch.css +6 -2
  117. package/src/primitives/tabs/tabs.css +10 -6
  118. package/src/primitives/tabs/tabs.html +6 -6
  119. package/src/primitives/textarea/textarea.css +6 -2
  120. package/src/primitives/toaster/toaster.css +2 -2
  121. package/src/primitives/toggle/toggle.css +9 -5
  122. package/src/primitives/toggle-group/toggle-group.css +13 -6
  123. package/src/primitives/toolbar/toolbar.html +1 -1
  124. package/src/primitives/tooltip/tooltip.css +6 -2
  125. package/src/primitives/utilities/aspect-ratio.html +3 -3
  126. package/src/primitives/utilities/basis.html +5 -5
  127. package/src/primitives/utilities/col-span.html +5 -5
  128. package/src/primitives/utilities/compose.html +2 -2
  129. package/src/primitives/utilities/flex-align.html +3 -3
  130. package/src/primitives/utilities/flex-direction.html +6 -6
  131. package/src/primitives/utilities/flex-grow.html +3 -3
  132. package/src/primitives/utilities/gap.html +9 -9
  133. package/src/primitives/utilities/grid-cols.html +6 -6
  134. package/src/primitives/utilities/grid-responsive.html +8 -8
  135. package/src/primitives/utilities/margin-auto.html +3 -3
  136. package/src/primitives/utilities/object-fit.html +3 -3
  137. package/src/primitives/utilities/order.html +3 -3
  138. package/src/primitives/utilities/overflow.html +2 -2
  139. package/src/primitives/utilities/padding-compose.html +6 -6
  140. package/src/primitives/utilities/padding.html +8 -8
  141. package/src/primitives/utilities/pile.html +1 -1
  142. package/src/primitives/utilities/position.html +2 -2
  143. package/src/primitives/utilities/responsive-flex.html +3 -3
  144. package/src/primitives/utilities/responsive-grid.html +8 -8
  145. package/src/primitives/utilities/size.html +5 -5
  146. package/src/primitives/utilities/width.html +5 -5
@@ -15,6 +15,12 @@ import { registerRefresh } from "./zazz-element.js";
15
15
  * <div>Item 1</div>
16
16
  * <div>Item 2</div>
17
17
  * </div>
18
+ *
19
+ * @example
20
+ * <!-- Stagger step from CSS: the group or any ancestor (theme, section) -->
21
+ * <section style="--ui-reveal-global-stagger-step: 60ms">
22
+ * <ul data-reveal-each="slide-up">…</ul>
23
+ * </section>
18
24
  */
19
25
  /**
20
26
  * @description Reads a CSS custom property from `:root` computed styles.
@@ -60,7 +66,7 @@ function parseCssTimeMs(value) {
60
66
  * ease: "ease-in-out",
61
67
  * threshold: 0.3,
62
68
  * margin: "100px",
63
- * step: 40,
69
+ * step: 40, // or "40ms"; sets --ui-reveal-global-stagger-step
64
70
  * },
65
71
  * });
66
72
  */
@@ -72,11 +78,11 @@ class Reveal {
72
78
  return {
73
79
  margin: "0px",
74
80
  threshold: 0.2,
75
- duration: getRootCssVar("--ui-reveal-global-duration") || "400ms",
81
+ duration: getRootCssVar("--ui-reveal-global-duration") || "1000ms",
76
82
  ease: getRootCssVar("--ui-reveal-global-timing-function") || "cubic-bezier(0.4, 0, 0.2, 1)",
77
83
  wait: parseCssTimeMs(getRootCssVar("--ui-reveal-global-wait")),
78
- distance: getRootCssVar("--ui-reveal-global-distance") || "1rem",
79
- step: 80,
84
+ distance: getRootCssVar("--ui-reveal-global-distance") || "2rem",
85
+ step: getRootCssVar("--ui-reveal-global-stagger-step") || "120ms",
80
86
  grow: parseFloat(getRootCssVar("--ui-reveal-global-grow")) || 0.97,
81
87
  shrink: parseFloat(getRootCssVar("--ui-reveal-global-shrink")) || 1.03,
82
88
  };
@@ -160,10 +166,13 @@ class Reveal {
160
166
  * @description Configures stagger animation properties and observes child elements.
161
167
  *
162
168
  * The stagger delay (`base + step × position`) is computed natively where
163
- * possible: the group carries `--ui-reveal-stagger-base`/`--ui-reveal-stagger-step`
164
- * and each child derives its own `--ui-reveal-wait` via `sibling-index()` in
165
- * reveal.css (reversed groups count from the end via `sibling-count()`).
166
- * Where unsupported (Firefox), the same math runs here and lands as a
169
+ * possible: each child derives its own `--ui-reveal-wait` via `sibling-index()`
170
+ * in reveal.css (reversed groups count from the end via `sibling-count()`),
171
+ * reading `--ui-reveal-stagger-base`/`--ui-reveal-stagger-step` from the
172
+ * cascade. Those are written inline only for `data-reveal-wait`/`data-reveal-step`,
173
+ * so CSS can set the step on the group or any ancestor (directly, or by
174
+ * overriding `--ui-reveal-global-stagger-step`). Where unsupported (Firefox),
175
+ * the same values are resolved from computed style and the math lands as a
167
176
  * per-child inline `--ui-reveal-wait`.
168
177
  *
169
178
  * @param groupElement - The parent stagger container.
@@ -172,23 +181,31 @@ class Reveal {
172
181
  const dataset = groupElement.dataset;
173
182
  const groupOptions = this.#getElementObserverOptions(groupElement);
174
183
  const groupObserver = this.#getObserver(groupOptions);
184
+ const stepAttr = dataset.revealStep ? Math.max(0, parseCssTimeMs(dataset.revealStep)) : null;
185
+ const waitAttr = dataset.revealWait ? Math.max(0, parseCssTimeMs(dataset.revealWait)) : null;
175
186
  const groupConfig = {
176
- step: Math.max(0, parseInt(dataset.revealStep || this.config.step.toString(), 10) || 0),
177
187
  duration: dataset.revealDuration
178
188
  ? Math.max(0, parseInt(dataset.revealDuration, 10) || 0)
179
189
  : this.config.duration,
180
190
  ease: dataset.revealEase || this.config.ease,
181
- baseWait: Math.max(0, parseInt(dataset.revealWait || this.config.wait.toString(), 10) || 0),
182
191
  distance: dataset.revealDistance || this.config.distance,
183
192
  order: dataset.revealOrder,
184
193
  };
185
194
  const childrenArray = Array.from(groupElement.children);
186
195
  const sequence = groupConfig.order === "reversed" ? childrenArray.reverse() : childrenArray;
187
- if (supportsSiblingIndex) {
188
- this.#setRevealProperties(groupElement, {
189
- "--ui-reveal-stagger-base": `${groupConfig.baseWait}ms`,
190
- "--ui-reveal-stagger-step": `${groupConfig.step}ms`,
191
- });
196
+ // Attributes win; otherwise the cascade (inline style, CSS, globals) decides.
197
+ this.#setRevealProperties(groupElement, {
198
+ "--ui-reveal-stagger-base": waitAttr !== null ? `${waitAttr}ms` : null,
199
+ "--ui-reveal-stagger-step": stepAttr !== null ? `${stepAttr}ms` : null,
200
+ });
201
+ // Fallback only: resolve the same cascade reveal.css uses natively.
202
+ let baseWait = 0;
203
+ let step = 0;
204
+ if (!supportsSiblingIndex) {
205
+ const computed = getComputedStyle(groupElement);
206
+ const cssTime = (local, global) => Math.max(0, parseCssTimeMs(computed.getPropertyValue(local) || computed.getPropertyValue(global)));
207
+ baseWait = cssTime("--ui-reveal-stagger-base", "--ui-reveal-global-wait");
208
+ step = cssTime("--ui-reveal-stagger-step", "--ui-reveal-global-stagger-step");
192
209
  }
193
210
  sequence.forEach((child, i) => {
194
211
  if (!(child instanceof HTMLElement))
@@ -197,9 +214,7 @@ class Reveal {
197
214
  "--ui-reveal-duration": this.#formatTime(groupConfig.duration),
198
215
  "--ui-reveal-ease": groupConfig.ease,
199
216
  // Fallback only: natively each child computes this in reveal.css.
200
- "--ui-reveal-wait": supportsSiblingIndex
201
- ? null
202
- : `${groupConfig.baseWait + groupConfig.step * i}ms`,
217
+ "--ui-reveal-wait": supportsSiblingIndex ? null : `${baseWait + step * i}ms`,
203
218
  "--ui-reveal-distance": groupConfig.distance,
204
219
  "--ui-reveal-scale": dataset.revealScale || null,
205
220
  });
@@ -244,6 +259,7 @@ class Reveal {
244
259
  rootStyle.setProperty("--ui-reveal-global-distance", this.config.distance);
245
260
  rootStyle.setProperty("--ui-reveal-global-grow", this.config.grow.toString());
246
261
  rootStyle.setProperty("--ui-reveal-global-shrink", this.config.shrink.toString());
262
+ rootStyle.setProperty("--ui-reveal-global-stagger-step", this.#formatTime(this.config.step));
247
263
  document.querySelectorAll("[data-reveal]").forEach((element) => {
248
264
  if (element instanceof HTMLElement)
249
265
  this.#configureSingleElement(element);
@@ -15,8 +15,8 @@ interface RevealConfig {
15
15
  wait: number;
16
16
  /** Default translation distance for slide animations. */
17
17
  distance: string;
18
- /** Default delay between staggered elements in milliseconds. */
19
- step: number;
18
+ /** Default delay between staggered elements (ms number or CSS time string). */
19
+ step: number | string;
20
20
  /** Scale factor for grow animations (< 1). */
21
21
  grow: number;
22
22
  /** Scale factor for shrink animations (> 1). */
@@ -43,6 +43,12 @@ interface RevealOptions {
43
43
  * <div>Item 1</div>
44
44
  * <div>Item 2</div>
45
45
  * </div>
46
+ *
47
+ * @example
48
+ * <!-- Stagger step from CSS: the group or any ancestor (theme, section) -->
49
+ * <section style="--ui-reveal-global-stagger-step: 60ms">
50
+ * <ul data-reveal-each="slide-up">…</ul>
51
+ * </section>
46
52
  */
47
53
 
48
54
  /**
@@ -90,7 +96,7 @@ function parseCssTimeMs(value: string): number {
90
96
  * ease: "ease-in-out",
91
97
  * threshold: 0.3,
92
98
  * margin: "100px",
93
- * step: 40,
99
+ * step: 40, // or "40ms"; sets --ui-reveal-global-stagger-step
94
100
  * },
95
101
  * });
96
102
  */
@@ -114,11 +120,11 @@ class Reveal {
114
120
  return {
115
121
  margin: "0px",
116
122
  threshold: 0.2,
117
- duration: getRootCssVar("--ui-reveal-global-duration") || "400ms",
123
+ duration: getRootCssVar("--ui-reveal-global-duration") || "1000ms",
118
124
  ease: getRootCssVar("--ui-reveal-global-timing-function") || "cubic-bezier(0.4, 0, 0.2, 1)",
119
125
  wait: parseCssTimeMs(getRootCssVar("--ui-reveal-global-wait")),
120
- distance: getRootCssVar("--ui-reveal-global-distance") || "1rem",
121
- step: 80,
126
+ distance: getRootCssVar("--ui-reveal-global-distance") || "2rem",
127
+ step: getRootCssVar("--ui-reveal-global-stagger-step") || "120ms",
122
128
  grow: parseFloat(getRootCssVar("--ui-reveal-global-grow")) || 0.97,
123
129
  shrink: parseFloat(getRootCssVar("--ui-reveal-global-shrink")) || 1.03,
124
130
  };
@@ -215,10 +221,13 @@ class Reveal {
215
221
  * @description Configures stagger animation properties and observes child elements.
216
222
  *
217
223
  * The stagger delay (`base + step × position`) is computed natively where
218
- * possible: the group carries `--ui-reveal-stagger-base`/`--ui-reveal-stagger-step`
219
- * and each child derives its own `--ui-reveal-wait` via `sibling-index()` in
220
- * reveal.css (reversed groups count from the end via `sibling-count()`).
221
- * Where unsupported (Firefox), the same math runs here and lands as a
224
+ * possible: each child derives its own `--ui-reveal-wait` via `sibling-index()`
225
+ * in reveal.css (reversed groups count from the end via `sibling-count()`),
226
+ * reading `--ui-reveal-stagger-base`/`--ui-reveal-stagger-step` from the
227
+ * cascade. Those are written inline only for `data-reveal-wait`/`data-reveal-step`,
228
+ * so CSS can set the step on the group or any ancestor (directly, or by
229
+ * overriding `--ui-reveal-global-stagger-step`). Where unsupported (Firefox),
230
+ * the same values are resolved from computed style and the math lands as a
222
231
  * per-child inline `--ui-reveal-wait`.
223
232
  *
224
233
  * @param groupElement - The parent stagger container.
@@ -228,13 +237,14 @@ class Reveal {
228
237
  const groupOptions = this.#getElementObserverOptions(groupElement);
229
238
  const groupObserver = this.#getObserver(groupOptions);
230
239
 
240
+ const stepAttr = dataset.revealStep ? Math.max(0, parseCssTimeMs(dataset.revealStep)) : null;
241
+ const waitAttr = dataset.revealWait ? Math.max(0, parseCssTimeMs(dataset.revealWait)) : null;
242
+
231
243
  const groupConfig = {
232
- step: Math.max(0, parseInt(dataset.revealStep || this.config.step.toString(), 10) || 0),
233
244
  duration: dataset.revealDuration
234
245
  ? Math.max(0, parseInt(dataset.revealDuration, 10) || 0)
235
246
  : this.config.duration,
236
247
  ease: dataset.revealEase || this.config.ease,
237
- baseWait: Math.max(0, parseInt(dataset.revealWait || this.config.wait.toString(), 10) || 0),
238
248
  distance: dataset.revealDistance || this.config.distance,
239
249
  order: dataset.revealOrder,
240
250
  };
@@ -242,11 +252,24 @@ class Reveal {
242
252
  const childrenArray = Array.from(groupElement.children);
243
253
  const sequence = groupConfig.order === "reversed" ? childrenArray.reverse() : childrenArray;
244
254
 
245
- if (supportsSiblingIndex) {
246
- this.#setRevealProperties(groupElement, {
247
- "--ui-reveal-stagger-base": `${groupConfig.baseWait}ms`,
248
- "--ui-reveal-stagger-step": `${groupConfig.step}ms`,
249
- });
255
+ // Attributes win; otherwise the cascade (inline style, CSS, globals) decides.
256
+ this.#setRevealProperties(groupElement, {
257
+ "--ui-reveal-stagger-base": waitAttr !== null ? `${waitAttr}ms` : null,
258
+ "--ui-reveal-stagger-step": stepAttr !== null ? `${stepAttr}ms` : null,
259
+ });
260
+
261
+ // Fallback only: resolve the same cascade reveal.css uses natively.
262
+ let baseWait = 0;
263
+ let step = 0;
264
+ if (!supportsSiblingIndex) {
265
+ const computed = getComputedStyle(groupElement);
266
+ const cssTime = (local: string, global: string) =>
267
+ Math.max(
268
+ 0,
269
+ parseCssTimeMs(computed.getPropertyValue(local) || computed.getPropertyValue(global)),
270
+ );
271
+ baseWait = cssTime("--ui-reveal-stagger-base", "--ui-reveal-global-wait");
272
+ step = cssTime("--ui-reveal-stagger-step", "--ui-reveal-global-stagger-step");
250
273
  }
251
274
 
252
275
  sequence.forEach((child, i) => {
@@ -256,9 +279,7 @@ class Reveal {
256
279
  "--ui-reveal-duration": this.#formatTime(groupConfig.duration),
257
280
  "--ui-reveal-ease": groupConfig.ease,
258
281
  // Fallback only: natively each child computes this in reveal.css.
259
- "--ui-reveal-wait": supportsSiblingIndex
260
- ? null
261
- : `${groupConfig.baseWait + groupConfig.step * i}ms`,
282
+ "--ui-reveal-wait": supportsSiblingIndex ? null : `${baseWait + step * i}ms`,
262
283
  "--ui-reveal-distance": groupConfig.distance,
263
284
  "--ui-reveal-scale": dataset.revealScale || null,
264
285
  });
@@ -310,6 +331,7 @@ class Reveal {
310
331
  rootStyle.setProperty("--ui-reveal-global-distance", this.config.distance);
311
332
  rootStyle.setProperty("--ui-reveal-global-grow", this.config.grow.toString());
312
333
  rootStyle.setProperty("--ui-reveal-global-shrink", this.config.shrink.toString());
334
+ rootStyle.setProperty("--ui-reveal-global-stagger-step", this.#formatTime(this.config.step));
313
335
 
314
336
  document.querySelectorAll("[data-reveal]").forEach((element) => {
315
337
  if (element instanceof HTMLElement) this.#configureSingleElement(element);
@@ -98,15 +98,16 @@ export interface Utility {
98
98
  */
99
99
  inherits?: true;
100
100
  /**
101
- * No-base allowlist: the CSS initial value as a literal. A utility with
102
- * `noBase` applies a tier on a plain element without a base value.
101
+ * What a dual utility's number multiplies (default `var(--spacing)`):
102
+ * `--radius: 2` is two steps of `--spacing` times `--radius-multiplier`.
103
103
  */
104
- noBase?: string;
104
+ scale?: string;
105
105
  /**
106
- * Extra selectors excluded from the no-base rule: elements whose
107
- * placement chain a primitive owns, e.g. a layout's children for `--band`.
106
+ * No-base allowlist: the CSS initial value as a literal. A utility with
107
+ * `noBase` applies a tier without a base value wherever no kit rule sets its
108
+ * property (the tier-only rule is in `@layer defaults`, which they beat).
108
109
  */
109
- noBaseExclude?: readonly string[];
110
+ noBase?: string;
110
111
  /**
111
112
  * Keywords the typed emission (the dual pair, or an integer's `repeat()`)
112
113
  * cannot carry. A utility written with one of its keywords, at the base or
@@ -122,17 +123,27 @@ export interface Utility {
122
123
  */
123
124
  pseudo?: true;
124
125
  /**
125
- * Keyword shorthands: `--shadow: md` reads as `--shadow: var(--shadow-md)`.
126
+ * Keyword shorthands: `--font-weight: strong` reads as `var(--font-weight-strong)`.
126
127
  * Each is an exact-value rule at the base and at every tier of the family, so
127
- * it works in `--shadow--hover: lg` too; any other value passes through as
128
+ * it works in `--font-weight--md: strong` too; any other value passes through as
128
129
  * usual. A keyword that is a prefix of another must come first.
129
130
  */
130
131
  aliases?: Readonly<Record<string, string>>;
131
132
  }
133
+ /**
134
+ * The utilities that compose into one `box-shadow` (the rings, shadow, and
135
+ * elevation): the composite's chains all end in a literal, so a tier alone
136
+ * works on them, like a no-base utility.
137
+ */
138
+ export declare const BOX_SHADOW_COMPOSITE: readonly ["shadow", "ring", "ring-color", "ring-offset", "ring-offset-color", "elevation"];
139
+ /**
140
+ * The shorthands whose base a longhand's tier overrides, nearest first: `--p: 4;
141
+ * --px--md: 1` pads 4 below md and 1 inline from md. A shorthand's base is a
142
+ * base for its longhands' tiers.
143
+ */
144
+ export declare const SHORTHAND_OF: Readonly<Record<string, readonly string[]>>;
132
145
  /** Gradient types: `--bg-<type>` emits `<type>-gradient(<prelude>, <--bg-stops>)`. */
133
146
  export declare const GRADIENT_TYPES: readonly ["linear", "radial", "conic"];
134
- /** The size scale shared by the token keywords (`--shadow: md`). */
135
- export declare const SIZE_KEYWORDS: readonly ["2xs", "xs", "sm", "md", "lg", "xl", "2xl"];
136
147
  /** Standard weight names and the number to write instead (`normal` and `bold` are CSS). */
137
148
  export declare const FONT_WEIGHT_NAMES: Readonly<Record<string, number>>;
138
149
  /**
@@ -168,6 +179,13 @@ export declare const BORDER_SIDES: readonly [{
168
179
  /** The four sizing keywords. Margin takes only `auto`. */
169
180
  export declare const SIZING_KEYWORDS: readonly ["auto", "fit-content", "min-content", "max-content"];
170
181
  export declare const MARGIN_KEYWORDS: readonly ["auto"];
182
+ /**
183
+ * Keywords the side insets (`--top --right --bottom --left`) take besides a
184
+ * length: `auto` releases a side at a breakpoint (`--bottom: 0; --bottom--lg:
185
+ * auto` sticks to the bottom below lg only). Each keyword costs ~16 [style*=]
186
+ * substrings (SPEC claim 16), so the axis and `--inset` shorthands go without.
187
+ */
188
+ export declare const INSET_KEYWORDS: readonly ["auto"];
171
189
  /**
172
190
  * Track-list keywords `--grid-cols` / `--grid-rows` take besides a count. `none`
173
191
  * is not one: `--template-cols: none` says the same, and every keyword
@@ -1 +1 @@
1
- {"version":3,"file":"utilities.d.ts","sourceRoot":"","sources":["utilities.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,qDAAqD;AACrD,eAAO,MAAM,WAAW,YAAI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAU,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAMrD,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,MAAM,YACjB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,eAAe,EACf,cAAc,EACd,OAAO,EACP,SAAS,EACT,SAAS,EACT,MAAM,EACN,OAAO,CACC,CAAC;AACX,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAClC,KAAK,EACL;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,IAA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