@zazz-ui/core 0.7.0 → 0.8.1
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/AUTHORING.md +21 -20
- package/CHANGELOG.md +151 -0
- package/README.md +4 -4
- package/dist/csp-DR-s45Kg.js +1 -0
- package/dist/sri.json +86 -85
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +4129 -1410
- package/editor/zazz.html-data.json +15 -3
- package/editor/zazz.language-data.json +99 -97
- package/editor/zazz.lint-data.json +1609 -1283
- package/package.json +9 -8
- package/src/base/_defaults.css +48 -2
- package/src/base/_properties-2xl.css +12 -0
- package/src/base/_properties-active.css +20 -0
- package/src/base/_properties-checked.css +20 -0
- package/src/base/_properties-current.css +20 -0
- package/src/base/_properties-disabled.css +20 -0
- package/src/base/_properties-focus-visible.css +20 -0
- package/src/base/_properties-focus-within.css +20 -0
- package/src/base/_properties-hover.css +20 -0
- package/src/base/_properties-lg.css +12 -0
- package/src/base/_properties-md.css +12 -0
- package/src/base/_properties-open.css +20 -0
- package/src/base/_properties-sm.css +12 -0
- package/src/base/_properties-starting.css +10 -0
- package/src/base/_properties-stuck.css +10 -0
- package/src/base/_properties-xl.css +12 -0
- package/src/base/_properties.css +46 -6
- package/src/base/_shadows.css +46 -0
- package/src/base/_utilities-box.css +182 -9
- package/src/base/_utilities-color.css +1 -0
- package/src/base/_utilities-effects.css +41 -139
- package/src/base/_utilities-flow.css +1 -0
- package/src/base/_utilities-grid.css +1 -0
- package/src/base/_utilities-margin.css +1 -0
- package/src/base/_utilities-pseudo.css +58 -4
- package/src/base/_utilities-sizing.css +1 -0
- package/src/base/_utilities-spacing.css +173 -0
- package/src/base/_utilities-tier-2xl.css +6 -0
- package/src/base/_utilities-tier-active.css +10 -0
- package/src/base/_utilities-tier-checked.css +10 -0
- package/src/base/_utilities-tier-current.css +10 -0
- package/src/base/_utilities-tier-disabled.css +10 -0
- package/src/base/_utilities-tier-focus-visible.css +10 -0
- package/src/base/_utilities-tier-focus-within.css +10 -0
- package/src/base/_utilities-tier-hover.css +10 -0
- package/src/base/_utilities-tier-lg.css +6 -0
- package/src/base/_utilities-tier-md.css +6 -0
- package/src/base/_utilities-tier-open.css +10 -0
- package/src/base/_utilities-tier-sm.css +6 -0
- package/src/base/_utilities-tier-starting.css +5 -0
- package/src/base/_utilities-tier-stuck.css +5 -0
- package/src/base/_utilities-tier-xl.css +6 -0
- package/src/base/_utilities-typography.css +1 -0
- package/src/base/_variables.css +5 -85
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +173 -136
- package/src/base/kit-styling.ts +173 -136
- package/src/base/reveal.d.ts +3 -3
- package/src/base/reveal.d.ts.map +1 -1
- package/src/base/reveal.js +34 -18
- package/src/base/reveal.ts +42 -20
- package/src/base/utilities.d.ts +18 -8
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +119 -19
- package/src/base/utilities.ts +145 -45
- package/src/index.css +1 -0
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +1 -0
- package/src/manifest.ts +1 -0
- package/src/primitives/avatar/avatar.html +2 -2
- package/src/primitives/badge/badge.css +17 -13
- package/src/primitives/button/button.css +17 -13
- package/src/primitives/button-group/button-group.css +13 -6
- package/src/primitives/callout/callout.css +6 -2
- package/src/primitives/card/card-subgrid.html +3 -3
- package/src/primitives/card/card.css +8 -4
- package/src/primitives/card/card.html +2 -2
- package/src/primitives/carousel/carousel.html +12 -12
- package/src/primitives/checkbox/checkbox.css +6 -2
- package/src/primitives/combobox/combobox.css +8 -4
- package/src/primitives/debug/audit-core.d.ts.map +1 -1
- package/src/primitives/debug/audit-core.js +8 -4
- package/src/primitives/debug/audit-core.ts +9 -4
- package/src/primitives/dialog/dialog-with-form.html +1 -1
- package/src/primitives/dialog/dialog.css +35 -14
- package/src/primitives/fields/fields.css +8 -4
- package/src/primitives/input/input.css +6 -2
- package/src/primitives/input-group/input-group.css +5 -1
- package/src/primitives/kbd/kbd.css +6 -2
- package/src/primitives/layout/layout.html +1 -1
- package/src/primitives/lightbox/lightbox.css +12 -16
- package/src/primitives/lightbox/lightbox.html +1 -1
- package/src/primitives/menu/menu.css +3 -3
- package/src/primitives/meter/meter.css +6 -2
- package/src/primitives/mobile-menu/mobile-menu.css +2 -2
- package/src/primitives/mobile-menu/mobile-menu.html +1 -1
- package/src/primitives/navigation-menu/navigation-menu-featured.html +1 -1
- package/src/primitives/navigation-menu/navigation-menu.css +4 -4
- package/src/primitives/navigation-menu/navigation-menu.html +1 -1
- package/src/primitives/otp/otp.css +6 -2
- package/src/primitives/password-group/password-group.css +5 -1
- package/src/primitives/popover/popover.css +8 -4
- package/src/primitives/progress/progress.css +6 -2
- package/src/primitives/radio/radio.css +6 -2
- package/src/primitives/reveal/reveal.css +17 -11
- package/src/primitives/scroll-fade/scroll-fade.css +16 -5
- package/src/primitives/select/select.css +15 -7
- package/src/primitives/slider/slider.css +7 -7
- package/src/primitives/switch/switch.css +6 -2
- package/src/primitives/tabs/tabs.css +10 -6
- package/src/primitives/tabs/tabs.html +6 -6
- package/src/primitives/textarea/textarea.css +6 -2
- package/src/primitives/toaster/toaster.css +2 -2
- package/src/primitives/toggle/toggle.css +9 -5
- package/src/primitives/toggle-group/toggle-group.css +13 -6
- package/src/primitives/toolbar/toolbar.html +1 -1
- package/src/primitives/tooltip/tooltip.css +6 -2
- package/src/primitives/utilities/aspect-ratio.html +3 -3
- package/src/primitives/utilities/basis.html +5 -5
- package/src/primitives/utilities/col-span.html +5 -5
- package/src/primitives/utilities/compose.html +2 -2
- package/src/primitives/utilities/flex-align.html +3 -3
- package/src/primitives/utilities/flex-direction.html +6 -6
- package/src/primitives/utilities/flex-grow.html +3 -3
- package/src/primitives/utilities/gap.html +9 -9
- package/src/primitives/utilities/grid-cols.html +6 -6
- package/src/primitives/utilities/grid-responsive.html +8 -8
- package/src/primitives/utilities/margin-auto.html +3 -3
- package/src/primitives/utilities/object-fit.html +3 -3
- package/src/primitives/utilities/order.html +3 -3
- package/src/primitives/utilities/overflow.html +2 -2
- package/src/primitives/utilities/padding-compose.html +6 -6
- package/src/primitives/utilities/padding.html +8 -8
- package/src/primitives/utilities/pile.html +1 -1
- package/src/primitives/utilities/position.html +2 -2
- package/src/primitives/utilities/responsive-flex.html +3 -3
- package/src/primitives/utilities/responsive-grid.html +8 -8
- package/src/primitives/utilities/size.html +5 -5
- package/src/primitives/utilities/width.html +5 -5
- package/dist/csp-D72qtdXZ.js +0 -1
package/src/base/kit-styling.ts
CHANGED
|
@@ -6,7 +6,7 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
6
6
|
":is([data-reveal]:not([data-gjs-type]), [data-reveal-each]:not([data-gjs-type]) > :not([data-gjs-type]))",
|
|
7
7
|
':is([data-ui~="field-group"], [data-ui~="radio-group"])',
|
|
8
8
|
':is([data-ui~="field-group"], [data-ui~="radio-group"]) > legend',
|
|
9
|
-
':is([style*="--shadow-
|
|
9
|
+
':is([style*="--shadow-tint:"], [style*="--shadow-angle"])',
|
|
10
10
|
":is(blockquote > cite)",
|
|
11
11
|
":is(dl > dd)",
|
|
12
12
|
':is(h1, [data-ui~="text-h1"])',
|
|
@@ -16,6 +16,7 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
16
16
|
':is(h5, [data-ui~="text-h5"])',
|
|
17
17
|
':is(h6, [data-ui~="text-h6"])',
|
|
18
18
|
":is(header, footer, section, article)",
|
|
19
|
+
":is(img, video)",
|
|
19
20
|
':is(input[type="checkbox"]:not([role="switch"]), input[type="checkbox"]:not([role="switch"]))',
|
|
20
21
|
":is(progress, meter)",
|
|
21
22
|
":is(sub, sup)",
|
|
@@ -32,6 +33,8 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
32
33
|
':is(ui-autocomplete, [data-ui~="autocomplete"]) input[role="combobox"]',
|
|
33
34
|
':is(ui-button-group, [data-ui~="button-group"])',
|
|
34
35
|
':is(ui-button-group, [data-ui~="button-group"]) > *',
|
|
36
|
+
':is(ui-button-group, [data-ui~="button-group"]):not([data-button-group-orientation="vertical"]) > *',
|
|
37
|
+
':is(ui-button-group[data-button-group-orientation="vertical"], [data-ui~="button-group"][data-button-group-orientation="vertical"]) > *',
|
|
35
38
|
':is(ui-carousel, [data-ui~="carousel"])',
|
|
36
39
|
':is(ui-carousel, [data-ui~="carousel"]) [data-carousel-slot~="container"]',
|
|
37
40
|
':is(ui-carousel, [data-ui~="carousel"]) [data-carousel-slot~="slide"]',
|
|
@@ -73,12 +76,14 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
73
76
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="dialog"] [data-lightbox-slot~="slide"] img',
|
|
74
77
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="dialog"] [data-lightbox-slot~="slide"][data-carousel-state~="in-view"][data-carousel-state~="snapped"] img',
|
|
75
78
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="dialog"] [data-lightbox-slot~="thumb"]',
|
|
79
|
+
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="dialog"] [data-lightbox-slot~="thumb"] img',
|
|
76
80
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="dialog"] [data-lightbox-slot~="thumbs"]',
|
|
77
81
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="dialog"] [data-lightbox-slot~="thumbs"] [data-carousel-slot~="container"]',
|
|
78
82
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="next"]',
|
|
79
83
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="prev"]',
|
|
80
84
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="stage"]',
|
|
81
85
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="stage"] > [data-carousel-slot~="viewport"]',
|
|
86
|
+
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="stage"] > [data-carousel-slot~="viewport"] > [data-carousel-slot~="container"]',
|
|
82
87
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="stage"] [data-lightbox-slot~="content"]',
|
|
83
88
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="stage"] [data-lightbox-slot~="slide"]',
|
|
84
89
|
':is(ui-lightbox, [data-ui~="lightbox"]) [data-lightbox-slot~="stage"] [data-lightbox-slot~="slide"] img',
|
|
@@ -126,6 +131,8 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
126
131
|
':is(ui-toaster, [data-ui~="toaster"]):not([data-toaster-state~="expanded"]) [data-toaster-slot~="toast"]:not([data-toaster-state~="front"], [data-toaster-state~="removed"]) > *',
|
|
127
132
|
':is(ui-toggle-group, [data-ui~="toggle-group"])',
|
|
128
133
|
':is(ui-toggle-group, [data-ui~="toggle-group"]) > *',
|
|
134
|
+
':is(ui-toggle-group, [data-ui~="toggle-group"]):not([data-toggle-group-orientation="vertical"]) > *',
|
|
135
|
+
':is(ui-toggle-group[data-toggle-group-orientation="vertical"], [data-ui~="toggle-group"][data-toggle-group-orientation="vertical"]) > *',
|
|
129
136
|
':is(ui-tooltip, [data-ui~="tooltip"]) > :is([interestfor], [data-tooltip-slot~="trigger"])',
|
|
130
137
|
':is(ui-tooltip, [data-ui~="tooltip"]) [data-tooltip-slot~="arrow"]',
|
|
131
138
|
':is(ui-tooltip, [data-ui~="tooltip"]) [data-tooltip-slot~="content"]',
|
|
@@ -267,57 +274,57 @@ export const KIT_SELECTORS: readonly string[] = [
|
|
|
267
274
|
|
|
268
275
|
/** For each utility, the elements the kit reads it on through its own chain: a tier alone works there. */
|
|
269
276
|
export const TIER_READS: Readonly<Record<string, readonly number[]>> = {
|
|
270
|
-
band: [
|
|
277
|
+
band: [63],
|
|
271
278
|
bg: [
|
|
272
|
-
2,
|
|
273
|
-
|
|
279
|
+
2, 15, 29, 38, 127, 133, 136, 138, 140, 143, 147, 148, 149, 166, 167, 180, 201, 216, 217, 218,
|
|
280
|
+
225, 228, 237, 238, 241, 242, 243, 259, 260, 262,
|
|
274
281
|
],
|
|
275
282
|
"border-color": [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
],
|
|
279
|
-
"border-style": [
|
|
280
|
-
"border-width": [
|
|
281
|
-
cursor: [
|
|
282
|
-
display: [2,
|
|
283
|
-
"flex-wrap": [
|
|
284
|
-
"font-family": [
|
|
285
|
-
"font-size": [
|
|
286
|
-
"font-weight": [
|
|
287
|
-
gap: [2,
|
|
288
|
-
h: [
|
|
289
|
-
items: [
|
|
290
|
-
justify: [
|
|
291
|
-
leading: [
|
|
283
|
+
15, 38, 133, 136, 138, 140, 143, 147, 148, 166, 167, 201, 217, 218, 237, 238, 241, 242, 243,
|
|
284
|
+
246, 260,
|
|
285
|
+
],
|
|
286
|
+
"border-style": [38, 136, 140, 147, 148, 166, 217, 218, 237, 238, 260],
|
|
287
|
+
"border-width": [38, 136, 140, 147, 148, 166, 217, 218, 237, 238, 260],
|
|
288
|
+
cursor: [167, 201],
|
|
289
|
+
display: [2, 157, 164, 167, 201],
|
|
290
|
+
"flex-wrap": [38, 167, 201],
|
|
291
|
+
"font-family": [133, 136, 140, 228, 238, 262],
|
|
292
|
+
"font-size": [38, 133, 136, 140, 166, 218, 228, 237, 238, 262],
|
|
293
|
+
"font-weight": [133, 136, 140, 238],
|
|
294
|
+
gap: [2, 34, 38, 61, 95, 133, 136, 140, 147, 148, 157, 164, 167, 201, 238, 262],
|
|
295
|
+
h: [38, 136, 149, 166, 180, 216, 218, 259],
|
|
296
|
+
items: [38, 164, 167, 201],
|
|
297
|
+
justify: [164],
|
|
298
|
+
leading: [38, 133, 136, 140, 166, 218, 237, 238, 262],
|
|
292
299
|
m: [2],
|
|
293
|
-
"max-h": [
|
|
294
|
-
"max-w": [
|
|
295
|
-
"min-h": [
|
|
296
|
-
"min-w": [
|
|
297
|
-
mx: [
|
|
298
|
-
my: [
|
|
299
|
-
p: [2,
|
|
300
|
-
pl: [
|
|
301
|
-
pr: [
|
|
302
|
-
px: [
|
|
303
|
-
py: [
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
],
|
|
309
|
-
self: [
|
|
300
|
+
"max-h": [26, 237],
|
|
301
|
+
"max-w": [133, 246],
|
|
302
|
+
"min-h": [38, 140, 167, 201, 237, 238, 262],
|
|
303
|
+
"min-w": [38, 58, 97, 98, 166, 218, 237, 246, 262],
|
|
304
|
+
mx: [133, 246],
|
|
305
|
+
my: [133, 246],
|
|
306
|
+
p: [2, 147, 148, 167, 201, 237, 246],
|
|
307
|
+
pl: [38, 166, 218],
|
|
308
|
+
pr: [38, 166, 218],
|
|
309
|
+
px: [133, 136, 140, 238, 262],
|
|
310
|
+
py: [38, 133, 262],
|
|
311
|
+
radius: [
|
|
312
|
+
2, 29, 38, 106, 112, 127, 133, 136, 140, 147, 148, 149, 166, 167, 180, 201, 216, 217, 218, 237,
|
|
313
|
+
238, 246, 259, 260, 262,
|
|
314
|
+
],
|
|
315
|
+
"ring-color": [136, 140, 238],
|
|
316
|
+
self: [157],
|
|
310
317
|
shadow: [
|
|
311
|
-
|
|
318
|
+
20, 26, 38, 97, 133, 136, 140, 147, 148, 149, 166, 167, 201, 217, 218, 237, 238, 246, 259, 260,
|
|
312
319
|
],
|
|
313
|
-
"shadow-angle": [4,
|
|
314
|
-
size: [
|
|
315
|
-
"template-cols": [
|
|
320
|
+
"shadow-angle": [4, 258],
|
|
321
|
+
size: [217, 260],
|
|
322
|
+
"template-cols": [157],
|
|
316
323
|
text: [
|
|
317
|
-
|
|
318
|
-
|
|
324
|
+
38, 133, 136, 138, 140, 143, 147, 148, 149, 166, 167, 201, 218, 228, 237, 238, 241, 242, 243,
|
|
325
|
+
262,
|
|
319
326
|
],
|
|
320
|
-
w: [
|
|
327
|
+
w: [38, 98, 149, 157, 166, 167, 180, 201, 216, 218, 237, 259],
|
|
321
328
|
};
|
|
322
329
|
|
|
323
330
|
/**
|
|
@@ -326,145 +333,175 @@ export const TIER_READS: Readonly<Record<string, readonly number[]>> = {
|
|
|
326
333
|
* their own value, and a tier alone applies there only through `TIER_READS`.
|
|
327
334
|
*/
|
|
328
335
|
export const TIER_BLOCKS: Readonly<Record<string, readonly number[]>> = {
|
|
329
|
-
"anchor-name": [
|
|
330
|
-
aspect: [
|
|
331
|
-
|
|
336
|
+
"anchor-name": [28, 38, 49, 96, 103, 131, 149, 187, 190, 197, 199],
|
|
337
|
+
aspect: [82, 84, 139, 144, 145, 244, 245],
|
|
338
|
+
"backdrop-filter": [117],
|
|
339
|
+
band: [63, 159, 160, 163],
|
|
332
340
|
basis: [
|
|
333
|
-
|
|
341
|
+
18, 19, 35, 36, 39, 55, 56, 73, 87, 120, 170, 171, 176, 177, 198, 204, 205, 210, 211, 219, 264,
|
|
334
342
|
],
|
|
335
343
|
bg: [
|
|
336
|
-
2,
|
|
337
|
-
|
|
338
|
-
|
|
344
|
+
2, 15, 16, 29, 38, 39, 56, 80, 83, 99, 100, 106, 109, 111, 112, 113, 117, 123, 127, 132, 133,
|
|
345
|
+
136, 140, 147, 148, 149, 154, 166, 167, 176, 177, 180, 183, 184, 201, 210, 211, 216, 217, 218,
|
|
346
|
+
221, 225, 228, 231, 232, 234, 237, 238, 246, 250, 252, 256, 257, 258, 259, 260, 262,
|
|
347
|
+
],
|
|
348
|
+
"col-end": [63, 158, 159, 160, 163, 215],
|
|
349
|
+
"col-span": [63, 159, 160, 163],
|
|
350
|
+
"col-start": [63, 158, 159, 160, 163, 215],
|
|
351
|
+
elevation: [
|
|
352
|
+
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
353
|
+
167, 176, 177, 201, 217, 218, 221, 237, 238, 246, 253, 259, 260,
|
|
339
354
|
],
|
|
340
|
-
"col-end": [60, 151, 152, 153, 156, 208],
|
|
341
|
-
"col-span": [60, 152, 153, 156],
|
|
342
|
-
"col-start": [60, 151, 152, 153, 156, 208],
|
|
343
355
|
flex: [
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
356
|
+
18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154, 168,
|
|
357
|
+
170, 171, 175, 176, 177, 198, 202, 204, 205, 209, 210, 211, 217, 219, 220, 222, 224, 225, 238,
|
|
358
|
+
256, 259, 260, 264,
|
|
347
359
|
],
|
|
348
|
-
"flex-wrap": [
|
|
360
|
+
"flex-wrap": [38, 167, 183, 201],
|
|
349
361
|
gap: [
|
|
350
|
-
2,
|
|
351
|
-
|
|
352
|
-
|
|
362
|
+
2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 62, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
|
|
363
|
+
123, 133, 136, 140, 147, 148, 154, 157, 167, 168, 174, 183, 190, 197, 200, 201, 202, 208, 218,
|
|
364
|
+
219, 221, 238, 255, 262,
|
|
353
365
|
],
|
|
354
366
|
"gap-x": [
|
|
355
|
-
2,
|
|
356
|
-
|
|
357
|
-
|
|
367
|
+
2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 62, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
|
|
368
|
+
123, 133, 136, 140, 147, 148, 154, 157, 167, 168, 174, 183, 190, 197, 200, 201, 202, 208, 218,
|
|
369
|
+
219, 221, 238, 255, 262,
|
|
358
370
|
],
|
|
359
371
|
"gap-y": [
|
|
360
|
-
2,
|
|
361
|
-
|
|
362
|
-
|
|
372
|
+
2, 23, 25, 34, 37, 38, 42, 44, 51, 52, 57, 61, 79, 85, 92, 95, 100, 102, 108, 110, 112, 120,
|
|
373
|
+
123, 133, 136, 147, 148, 154, 157, 167, 168, 174, 183, 190, 197, 200, 201, 202, 208, 218, 219,
|
|
374
|
+
221, 255, 262,
|
|
363
375
|
],
|
|
364
|
-
"grid-cols": [
|
|
365
|
-
"grid-rows": [
|
|
376
|
+
"grid-cols": [62, 64, 157, 200],
|
|
377
|
+
"grid-rows": [67, 68, 153, 156, 185],
|
|
366
378
|
items: [
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
379
|
+
20, 21, 29, 38, 47, 48, 51, 54, 61, 62, 69, 70, 83, 85, 100, 106, 108, 110, 112, 113, 116, 123,
|
|
380
|
+
127, 133, 136, 137, 140, 141, 152, 164, 167, 168, 170, 171, 174, 184, 185, 190, 197, 200, 201,
|
|
381
|
+
202, 204, 205, 208, 214, 217, 218, 219, 221, 223, 238, 240, 260, 262,
|
|
370
382
|
],
|
|
371
383
|
justify: [
|
|
372
|
-
|
|
373
|
-
|
|
384
|
+
20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164, 168, 184, 197, 202,
|
|
385
|
+
218, 238, 240, 262,
|
|
374
386
|
],
|
|
375
387
|
opacity: [
|
|
376
|
-
0, 1,
|
|
377
|
-
|
|
388
|
+
0, 1, 47, 66, 71, 72, 84, 88, 89, 109, 114, 117, 123, 124, 125, 126, 133, 134, 135, 161, 162,
|
|
389
|
+
186, 239, 246, 253, 254, 261, 263,
|
|
378
390
|
],
|
|
379
|
-
order: [
|
|
391
|
+
order: [24, 43, 53, 169, 170, 171, 172, 173, 203, 204, 205, 206, 207],
|
|
380
392
|
p: [
|
|
381
|
-
2, 3, 5, 6,
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
393
|
+
2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 83, 100, 104, 112,
|
|
394
|
+
113, 117, 122, 123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154,
|
|
395
|
+
155, 166, 167, 168, 170, 171, 174, 176, 177, 178, 179, 181, 182, 183, 184, 189, 197, 201, 202,
|
|
396
|
+
204, 205, 208, 210, 211, 212, 213, 218, 221, 227, 229, 230, 233, 237, 238, 240, 244, 245, 246,
|
|
397
|
+
249, 252, 262, 265, 266, 267,
|
|
386
398
|
],
|
|
387
399
|
pb: [
|
|
388
|
-
2, 3,
|
|
389
|
-
|
|
390
|
-
|
|
400
|
+
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
|
|
401
|
+
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 167, 170, 171, 177, 181, 183, 184, 189, 197,
|
|
402
|
+
201, 204, 205, 211, 227, 229, 230, 233, 237, 240, 244, 245, 246, 252, 262,
|
|
391
403
|
],
|
|
392
404
|
pl: [
|
|
393
|
-
2, 3, 5, 6,
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
405
|
+
2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117, 122,
|
|
406
|
+
123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 167,
|
|
407
|
+
168, 174, 176, 177, 178, 181, 182, 183, 184, 189, 197, 201, 202, 208, 210, 211, 212, 218, 221,
|
|
408
|
+
227, 229, 230, 237, 238, 240, 244, 245, 246, 249, 252, 262, 265, 266, 267,
|
|
397
409
|
],
|
|
398
410
|
"place-content": [
|
|
399
|
-
|
|
400
|
-
|
|
411
|
+
20, 21, 69, 70, 76, 83, 86, 113, 115, 136, 137, 140, 141, 152, 154, 164, 168, 184, 197, 202,
|
|
412
|
+
218, 238, 240, 246, 262,
|
|
401
413
|
],
|
|
402
414
|
"place-items": [
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
415
|
+
20, 21, 29, 38, 47, 48, 51, 54, 61, 62, 69, 70, 83, 85, 100, 106, 108, 110, 112, 113, 116, 123,
|
|
416
|
+
127, 133, 136, 137, 140, 141, 152, 164, 167, 168, 170, 171, 174, 184, 185, 190, 197, 200, 201,
|
|
417
|
+
202, 204, 205, 208, 214, 217, 218, 219, 221, 223, 238, 240, 260, 262,
|
|
406
418
|
],
|
|
407
419
|
position: [
|
|
408
|
-
13,
|
|
409
|
-
|
|
410
|
-
|
|
420
|
+
13, 17, 29, 30, 33, 65, 66, 77, 78, 79, 82, 90, 91, 101, 105, 109, 111, 112, 113, 114, 117, 123,
|
|
421
|
+
127, 128, 132, 151, 153, 154, 183, 184, 185, 187, 188, 196, 217, 227, 238, 239, 246, 250, 253,
|
|
422
|
+
260, 263, 264,
|
|
411
423
|
],
|
|
412
|
-
"position-anchor": [
|
|
413
|
-
"position-area": [
|
|
424
|
+
"position-anchor": [26, 45, 59, 97, 102, 111, 133, 191, 192, 193, 194, 195],
|
|
425
|
+
"position-area": [117, 246],
|
|
414
426
|
pr: [
|
|
415
|
-
2, 3,
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
427
|
+
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 100, 112, 113, 117, 122, 123, 133,
|
|
428
|
+
136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 167, 168, 174,
|
|
429
|
+
176, 177, 179, 181, 183, 184, 189, 197, 201, 202, 208, 210, 211, 213, 218, 221, 227, 229, 230,
|
|
430
|
+
237, 238, 240, 244, 245, 246, 252, 262,
|
|
419
431
|
],
|
|
420
432
|
pt: [
|
|
421
|
-
2, 3,
|
|
422
|
-
|
|
423
|
-
|
|
433
|
+
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
|
|
434
|
+
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155, 167, 170, 171, 177, 181, 183, 184, 189,
|
|
435
|
+
197, 201, 204, 205, 211, 227, 229, 230, 233, 237, 240, 244, 245, 246, 252, 262,
|
|
424
436
|
],
|
|
425
437
|
px: [
|
|
426
|
-
2, 3, 5, 6,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
438
|
+
2, 3, 5, 6, 22, 25, 38, 40, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 83, 100, 112, 113, 117, 122,
|
|
439
|
+
123, 133, 136, 137, 139, 140, 141, 142, 144, 145, 146, 147, 148, 150, 152, 154, 155, 166, 167,
|
|
440
|
+
168, 174, 176, 177, 178, 179, 181, 182, 183, 184, 189, 197, 201, 202, 208, 210, 211, 212, 213,
|
|
441
|
+
218, 221, 227, 229, 230, 237, 238, 240, 244, 245, 246, 249, 252, 262, 265, 266, 267,
|
|
430
442
|
],
|
|
431
443
|
py: [
|
|
432
|
-
2, 3,
|
|
433
|
-
|
|
434
|
-
|
|
444
|
+
2, 3, 22, 25, 38, 41, 44, 50, 51, 53, 56, 57, 59, 60, 70, 75, 76, 104, 112, 117, 122, 123, 133,
|
|
445
|
+
137, 139, 141, 144, 145, 147, 148, 150, 152, 154, 155, 167, 170, 171, 177, 181, 183, 184, 189,
|
|
446
|
+
197, 201, 204, 205, 211, 227, 229, 230, 233, 237, 240, 244, 245, 246, 252, 262,
|
|
447
|
+
],
|
|
448
|
+
radius: [
|
|
449
|
+
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
450
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 167, 175, 176, 177, 180, 189, 197, 201, 209, 210,
|
|
451
|
+
211, 216, 217, 218, 221, 237, 238, 246, 252, 259, 260, 261, 262,
|
|
452
|
+
],
|
|
453
|
+
"radius-b": [
|
|
454
|
+
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
455
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 167, 175, 176, 177, 180, 189, 197, 201, 209, 210,
|
|
456
|
+
211, 216, 217, 218, 221, 237, 238, 246, 252, 259, 260, 261, 262,
|
|
457
|
+
],
|
|
458
|
+
"radius-l": [
|
|
459
|
+
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
460
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 167, 175, 176, 177, 180, 189, 197, 201, 209, 210,
|
|
461
|
+
211, 216, 217, 218, 221, 237, 238, 246, 252, 259, 260, 261, 262,
|
|
462
|
+
],
|
|
463
|
+
"radius-r": [
|
|
464
|
+
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
465
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 167, 175, 176, 177, 180, 189, 197, 201, 209, 210,
|
|
466
|
+
211, 216, 217, 218, 221, 237, 238, 246, 252, 259, 260, 261, 262,
|
|
467
|
+
],
|
|
468
|
+
"radius-t": [
|
|
469
|
+
2, 14, 29, 31, 32, 38, 47, 71, 74, 80, 81, 82, 87, 90, 100, 106, 111, 112, 113, 123, 127, 129,
|
|
470
|
+
130, 132, 133, 136, 140, 147, 148, 149, 166, 167, 175, 176, 177, 180, 189, 197, 201, 209, 210,
|
|
471
|
+
211, 216, 217, 218, 221, 237, 238, 246, 252, 259, 260, 261, 262,
|
|
435
472
|
],
|
|
436
473
|
ring: [
|
|
437
|
-
|
|
438
|
-
|
|
474
|
+
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
475
|
+
167, 176, 177, 201, 217, 218, 221, 237, 238, 246, 253, 259, 260,
|
|
439
476
|
],
|
|
440
477
|
"ring-color": [
|
|
441
|
-
|
|
442
|
-
|
|
478
|
+
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
479
|
+
167, 176, 177, 201, 217, 218, 221, 237, 238, 246, 253, 259, 260,
|
|
443
480
|
],
|
|
444
481
|
"ring-offset": [
|
|
445
|
-
|
|
446
|
-
|
|
482
|
+
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
483
|
+
167, 176, 177, 201, 217, 218, 221, 237, 238, 246, 253, 259, 260,
|
|
447
484
|
],
|
|
448
485
|
"ring-offset-color": [
|
|
449
|
-
|
|
450
|
-
|
|
486
|
+
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
487
|
+
167, 176, 177, 201, 217, 218, 221, 237, 238, 246, 253, 259, 260,
|
|
451
488
|
],
|
|
452
|
-
"row-end": [
|
|
453
|
-
"row-span": [
|
|
454
|
-
"row-start": [
|
|
455
|
-
self: [
|
|
489
|
+
"row-end": [158, 159, 160, 163, 215],
|
|
490
|
+
"row-span": [159, 160, 163],
|
|
491
|
+
"row-start": [158, 159, 160, 163, 215],
|
|
492
|
+
self: [153, 154, 157, 163, 165, 226],
|
|
456
493
|
shadow: [
|
|
457
|
-
|
|
458
|
-
|
|
494
|
+
20, 26, 27, 38, 45, 46, 58, 97, 102, 109, 111, 113, 117, 123, 133, 136, 140, 147, 148, 149, 166,
|
|
495
|
+
167, 176, 177, 201, 217, 218, 221, 237, 238, 246, 253, 259, 260,
|
|
459
496
|
],
|
|
460
497
|
shrink: [
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
],
|
|
464
|
-
"template-cols": [
|
|
465
|
-
"template-rows": [
|
|
466
|
-
"text-align": [
|
|
467
|
-
"text-decoration": [
|
|
468
|
-
"text-wrap": [7, 8, 9, 10, 11, 12,
|
|
469
|
-
translate: [
|
|
498
|
+
18, 19, 35, 36, 39, 47, 48, 55, 56, 73, 87, 93, 94, 99, 118, 119, 120, 121, 136, 140, 154, 168,
|
|
499
|
+
175, 176, 177, 198, 202, 209, 210, 211, 217, 219, 220, 222, 224, 225, 238, 256, 259, 260, 264,
|
|
500
|
+
],
|
|
501
|
+
"template-cols": [62, 64, 157, 200],
|
|
502
|
+
"template-rows": [67, 68, 153, 156, 185],
|
|
503
|
+
"text-align": [107, 115, 163, 197, 218, 228, 229, 251],
|
|
504
|
+
"text-decoration": [136, 140, 189, 236, 238, 247, 248],
|
|
505
|
+
"text-wrap": [7, 8, 9, 10, 11, 12, 113, 133, 235, 250],
|
|
506
|
+
translate: [66, 161, 162],
|
|
470
507
|
};
|
package/src/base/reveal.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ interface RevealConfig {
|
|
|
11
11
|
wait: number;
|
|
12
12
|
/** Default translation distance for slide animations. */
|
|
13
13
|
distance: string;
|
|
14
|
-
/** Default delay between staggered elements
|
|
15
|
-
step: number;
|
|
14
|
+
/** Default delay between staggered elements (ms number or CSS time string). */
|
|
15
|
+
step: number | string;
|
|
16
16
|
/** Scale factor for grow animations (< 1). */
|
|
17
17
|
grow: number;
|
|
18
18
|
/** Scale factor for shrink animations (> 1). */
|
|
@@ -36,7 +36,7 @@ interface RevealOptions {
|
|
|
36
36
|
* ease: "ease-in-out",
|
|
37
37
|
* threshold: 0.3,
|
|
38
38
|
* margin: "100px",
|
|
39
|
-
* step: 40,
|
|
39
|
+
* step: 40, // or "40ms"; sets --ui-reveal-global-stagger-step
|
|
40
40
|
* },
|
|
41
41
|
* });
|
|
42
42
|
*/
|
package/src/base/reveal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reveal.d.ts","sourceRoot":"","sources":["reveal.ts"],"names":[],"mappings":"AAIA,UAAU,YAAY;IACpB,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB
|
|
1
|
+
{"version":3,"file":"reveal.d.ts","sourceRoot":"","sources":["reveal.ts"],"names":[],"mappings":"AAIA,UAAU,YAAY;IACpB,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAChC;AAwDD;;;;;;;;;;;;;;;;;GAiBG;AACH,cAAM,MAAM;;IACV;;;OAGG;IACH,OAAe,eAAe,EAAE,MAAM,IAAI,CAAC;IAE3C;;;OAGG;IACH,OAAe,eAAe,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAmBpD,MAAM,KAAK,aAAa,IAAI,YAAY,CAEvC;IAID,MAAM,EAAE,YAAY,CAAC;IAErB;;;;OAIG;IACH,YAAY,OAAO,GAAE,aAAkB,EAGtC;IA0KD;;;OAGG;IACH,IAAI,IAAI,IAAI,CAoBX;IAED;;;;;;;;OAQG;IACH,OAAO,IAAI,IAAI,CAEd;CACF;AA4CD,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/src/base/reveal.js
CHANGED
|
@@ -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") || "
|
|
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") || "
|
|
79
|
-
step:
|
|
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:
|
|
164
|
-
*
|
|
165
|
-
* reveal
|
|
166
|
-
*
|
|
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
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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);
|