kuinetic 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/esm/advanced/index.mjs +1 -1
- package/dist/esm/{chunk-EHS45PIK.mjs → chunk-4QKMEDM4.mjs} +4978 -832
- package/dist/esm/{chunk-FASAEQDR.mjs → chunk-7NW4OLOC.mjs} +506 -29
- package/dist/esm/{chunk-MZQG2VMG.mjs → chunk-DAVDOYOS.mjs} +92 -495
- package/dist/esm/{chunk-AEQGC2KM.mjs → chunk-EDFJTT5B.mjs} +2 -1
- package/dist/esm/core/index.mjs +3 -3
- package/dist/esm/effects/index.mjs +3 -3
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/notes/index.mjs +276 -5
- package/dist/kuinetic.advanced.js +2 -1
- package/dist/kuinetic.advanced.min.js +1 -1
- package/dist/kuinetic.all.js +5047 -856
- package/dist/kuinetic.all.min.js +2 -2
- package/dist/kuinetic.css +1106 -61
- package/dist/kuinetic.js +5046 -855
- package/dist/kuinetic.min.css +1 -1
- package/dist/kuinetic.min.js +1 -1
- package/dist/kuinetic.notes.js +1 -1
- package/dist/types/advanced/shaders.d.ts +1 -1
- package/dist/types/core/channels.d.ts +1 -1
- package/dist/types/core/easing.d.ts +9 -0
- package/dist/types/core/effect-context.d.ts +5 -0
- package/dist/types/core/element-config.d.ts +2 -0
- package/dist/types/core/flip.d.ts +25 -1
- package/dist/types/core/gesture.d.ts +5 -0
- package/dist/types/core/image-flight.d.ts +23 -0
- package/dist/types/core/js-effect-preparer.d.ts +3 -1
- package/dist/types/core/owned-styles.d.ts +2 -1
- package/dist/types/core/params.d.ts +1 -1
- package/dist/types/core/parse.d.ts +1 -0
- package/dist/types/core/registry.d.ts +1 -1
- package/dist/types/core/types.d.ts +11 -1
- package/dist/types/effects/auto-motion.d.ts +8 -0
- package/dist/types/effects/carousel/archive.d.ts +18 -0
- package/dist/types/effects/carousel/coast.d.ts +7 -0
- package/dist/types/effects/carousel/deck.d.ts +26 -2
- package/dist/types/effects/carousel/drag.d.ts +19 -7
- package/dist/types/effects/carousel/glide.d.ts +89 -0
- package/dist/types/effects/carousel/line.d.ts +10 -0
- package/dist/types/effects/carousel/row-copies.d.ts +10 -0
- package/dist/types/effects/carousel/row.d.ts +3 -0
- package/dist/types/effects/carousel/shape-fit.d.ts +46 -0
- package/dist/types/effects/carousel/sources.d.ts +26 -0
- package/dist/types/effects/carousel/sphere.d.ts +23 -0
- package/dist/types/effects/carousel/stack.d.ts +2 -1
- package/dist/types/effects/catalog/confetti.d.ts +2 -0
- package/dist/types/effects/catalog/cursor-trail.d.ts +2 -0
- package/dist/types/effects/catalog/curtains.d.ts +2 -0
- package/dist/types/effects/catalog/image-flight.d.ts +2 -0
- package/dist/types/effects/catalog/line-boil.d.ts +2 -0
- package/dist/types/effects/catalog/number-tokens.d.ts +5 -0
- package/dist/types/effects/catalog/numbers-shared.d.ts +3 -4
- package/dist/types/effects/catalog/text-shared.d.ts +13 -6
- package/dist/types/effects/catalog/typewriter-scatter.d.ts +5 -0
- package/dist/types/effects/catalog/view-transitions.d.ts +32 -1
- package/dist/types/effects/catalog/wobble.d.ts +2 -0
- package/dist/types/effects/gestures/drag-options.d.ts +17 -0
- package/dist/types/effects/layout/departures.d.ts +21 -0
- package/dist/types/effects/motion-path/fit.d.ts +4 -0
- package/dist/types/effects/scroll-mechanics/progress-output.d.ts +9 -0
- package/dist/types/effects/step-marking.d.ts +7 -4
- package/dist/types/effects/svg/morph-loop.d.ts +5 -0
- package/dist/types/effects/svg/text-path.d.ts +2 -0
- package/dist/types/effects/three-d/cube.d.ts +2 -0
- package/dist/types/effects/tween/index.d.ts +2 -1
- package/dist/types/effects/tween/properties.d.ts +1 -1
- package/dist/types/effects/tween/toggle.d.ts +6 -0
- package/dist/types/notes/effects.d.ts +1 -0
- package/dist/types/notes/index.d.ts +11 -0
- package/dist/types/notes/showcase.d.ts +1 -0
- package/dist/types/showcase/lightbox-flight.d.ts +11 -0
- package/dist/types/showcase/modal-shell.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/core/owned-styles.ts
|
|
2
|
-
function createStyleLedger(el) {
|
|
2
|
+
function createStyleLedger(el, restoreProperty) {
|
|
3
3
|
const style = el.style;
|
|
4
4
|
const previous = /* @__PURE__ */ new Map();
|
|
5
5
|
const authoredStyleAttribute = el.hasAttribute("style");
|
|
@@ -19,6 +19,7 @@ function createStyleLedger(el) {
|
|
|
19
19
|
claim: remember,
|
|
20
20
|
restore() {
|
|
21
21
|
for (const [property, previousValue] of previous) {
|
|
22
|
+
if (restoreProperty && !restoreProperty(property)) continue;
|
|
22
23
|
if (previousValue === void 0) style.removeProperty(property);
|
|
23
24
|
else style.setProperty(property, previousValue.value, previousValue.priority);
|
|
24
25
|
}
|
package/dist/esm/core/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
detect,
|
|
12
12
|
silentReporter,
|
|
13
13
|
spellingsFor
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-DAVDOYOS.mjs";
|
|
15
15
|
import {
|
|
16
16
|
ATTR,
|
|
17
17
|
CHANNEL,
|
|
@@ -27,8 +27,8 @@ import {
|
|
|
27
27
|
resolveTargets,
|
|
28
28
|
timingContractOf,
|
|
29
29
|
toAttributeValue
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-7NW4OLOC.mjs";
|
|
31
|
+
import "../chunk-EDFJTT5B.mjs";
|
|
32
32
|
export {
|
|
33
33
|
ATTR,
|
|
34
34
|
Animator,
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
registerThreeD,
|
|
18
18
|
registerTween,
|
|
19
19
|
registerViewTransitions
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-4QKMEDM4.mjs";
|
|
21
|
+
import "../chunk-7NW4OLOC.mjs";
|
|
22
|
+
import "../chunk-EDFJTT5B.mjs";
|
|
23
23
|
export {
|
|
24
24
|
COMBOS,
|
|
25
25
|
PRESETS,
|
package/dist/esm/index.mjs
CHANGED
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
detect,
|
|
12
12
|
silentReporter,
|
|
13
13
|
spellingsFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DAVDOYOS.mjs";
|
|
15
15
|
import {
|
|
16
16
|
COMBOS,
|
|
17
17
|
PRESETS,
|
|
18
18
|
PRIMITIVES,
|
|
19
19
|
createRegistry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4QKMEDM4.mjs";
|
|
21
21
|
import {
|
|
22
22
|
ATTR,
|
|
23
23
|
CHANNEL,
|
|
@@ -33,8 +33,8 @@ import {
|
|
|
33
33
|
resolveTargets,
|
|
34
34
|
timingContractOf,
|
|
35
35
|
toAttributeValue
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-7NW4OLOC.mjs";
|
|
37
|
+
import "./chunk-EDFJTT5B.mjs";
|
|
38
38
|
|
|
39
39
|
// src/index.ts
|
|
40
40
|
function kuinetic(options = {}) {
|
package/dist/esm/notes/index.mjs
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
// src/notes/catalog.ts
|
|
2
2
|
var CATALOG_NOTES = {
|
|
3
|
+
"line-boil.amount": "How far a line can wander, in pixels; 3 is a gentle wiggle.",
|
|
4
|
+
"line-boil.fps": "How many new drawings play each second; 8 to 12 looks hand-animated.",
|
|
5
|
+
"image-flight.image": "Find this image inside the button\u2019s closest data-kui-flight-source wrapper, without moving the original.",
|
|
6
|
+
"image-flight.destination": "Fly toward the first page element matching this selector, while the app owns basket state.",
|
|
7
|
+
"image-flight.lift": "How far the flight lifts above its straight path, in absolute length units such as pixels.",
|
|
8
|
+
"number-tokens.attribute": "Read the app-formatted string from this attribute and animate matching characters when it changes.",
|
|
9
|
+
"curtain.controls": "Selector for the element whose state changes; defaults to aria-controls, as view-swap does.",
|
|
10
|
+
"curtain.attribute": "Attribute to change only after the colour panel fully covers.",
|
|
11
|
+
"curtain.value": "Destination value, or next to advance through values; omit to toggle attribute presence.",
|
|
12
|
+
"curtain.values": "Quoted space-separated destination order, shared with view-swap.",
|
|
13
|
+
"curtain.cover": "Shape bringing the colour in, including a shuffled grid with pixels.",
|
|
14
|
+
"curtain.reveal": "Shape removing the colour after commit, including pixels.",
|
|
15
|
+
"curtain.color": "Fallback panel colour; defaults to var(--accent).",
|
|
16
|
+
"curtain.colors": "Quoted space-separated value=colour pairs; colours must contain no whitespace.",
|
|
17
|
+
"curtain.origin": "Use click for an iris centred on the pointer; keyboard activation uses centre.",
|
|
18
|
+
"curtain.scope": "Keep the curtain inside the controlled element, following its rounded corners.",
|
|
19
|
+
"curtain.duration": "Duration of each cover and reveal phase; zero commits synchronously.",
|
|
20
|
+
"feedback-wobble.y": "Vertical displacement on the first wobble; negative values reverse its vertical direction.",
|
|
21
|
+
"feedback-wobble.direction": "Use pointer entry to choose the wobble direction.",
|
|
22
|
+
"feedback-burst.pieces": "Create up to 96 decorative strips and dots instead of the five gradient particles.",
|
|
23
|
+
"media-mask.direction": "Direction the soft reveal edge travels: right by default, or left.",
|
|
24
|
+
"media-mask.edges": "Fade both horizontal scroll edges by this width and remove each fade at its matching end.",
|
|
25
|
+
"media-wipe.start-inset": "Set the horizontal inset at the start of curtain-reveal.",
|
|
26
|
+
"media-wipe.start-size": "Open curtain-reveal from a centred crop of this size before scaling.",
|
|
3
27
|
"ambient-float.duration": "How long one full up-and-down drift takes, repeating forever.",
|
|
4
28
|
"ambient-float.distance": "How far the element drifts up and down.",
|
|
5
29
|
"ambient-gradient.duration": "How long one full colour drift takes, repeating forever.",
|
|
@@ -102,6 +126,8 @@ var CATALOG_NOTES = {
|
|
|
102
126
|
why: "The marker added or removed on that element each time the control is clicked.",
|
|
103
127
|
whenOmitted: "Uses data-open."
|
|
104
128
|
},
|
|
129
|
+
"view-swap.value": "Set this attribute value instead of toggling presence; repeated selection does nothing.",
|
|
130
|
+
"view-swap.values": "Quoted, space-separated values in travel order, such as home activity more; value must occur in the list if supplied.",
|
|
105
131
|
"view-swap.type": {
|
|
106
132
|
why: "Names the transition motion to run, like kui-page-slide; a browser without that feature cross-fades.",
|
|
107
133
|
whenOmitted: "The browser\u2019s default cross-fade, or an instant swap where view transitions are missing."
|
|
@@ -180,8 +206,139 @@ var CATALOG_CORE_NOTES = {
|
|
|
180
206
|
"scroll-fade.opacity": "How see-through the element is at the start of the scroll range."
|
|
181
207
|
};
|
|
182
208
|
|
|
209
|
+
// src/notes/effects.ts
|
|
210
|
+
function fromEntriesOf(names, bullets) {
|
|
211
|
+
return Object.fromEntries(names.map((name) => [name, bullets(name)]));
|
|
212
|
+
}
|
|
213
|
+
var OWN_CHILDREN_PRESETS = [
|
|
214
|
+
"hamburger-to-x",
|
|
215
|
+
"play-to-pause",
|
|
216
|
+
"video-scrub",
|
|
217
|
+
"label-float",
|
|
218
|
+
"strength-meter",
|
|
219
|
+
"toggle-morph",
|
|
220
|
+
"checkbox-draw",
|
|
221
|
+
"radio-fill",
|
|
222
|
+
"step-progress",
|
|
223
|
+
"group-dim",
|
|
224
|
+
"group-expand"
|
|
225
|
+
];
|
|
226
|
+
function onOwnChildren(name) {
|
|
227
|
+
return [
|
|
228
|
+
`${name} works on its own children, so target: doesn't apply here.`,
|
|
229
|
+
"If you add target:, the library warns and ignores it. The effect stays on the box you put data-kui on."
|
|
230
|
+
];
|
|
231
|
+
}
|
|
232
|
+
var EXIT_TOWARD = [
|
|
233
|
+
"fade-out-left",
|
|
234
|
+
"fade-out-right",
|
|
235
|
+
"fade-out-up",
|
|
236
|
+
"fade-out-down",
|
|
237
|
+
"slide-out-left",
|
|
238
|
+
"slide-out-right",
|
|
239
|
+
"slide-out-up",
|
|
240
|
+
"slide-out-down"
|
|
241
|
+
];
|
|
242
|
+
var WIPES_HORIZONTAL = ["wipe-left", "wipe-right"];
|
|
243
|
+
var WIPES_VERTICAL = ["wipe-up", "wipe-down"];
|
|
244
|
+
var CURSOR_DOT_PRESETS = ["cursor-follow", "cursor-lag", "cursor-label", "cursor-invert"];
|
|
245
|
+
function exitToward(name) {
|
|
246
|
+
const direction = name.slice(name.lastIndexOf("-") + 1);
|
|
247
|
+
return [`The direction in the name is where it heads. ${name} moves ${direction} as it leaves.`];
|
|
248
|
+
}
|
|
249
|
+
function wipeHorizontal(name) {
|
|
250
|
+
const left = name.endsWith("left");
|
|
251
|
+
return [`${name} reveals the box starting from its ${left ? "left" : "right"} edge, sweeping ${left ? "right" : "left"}.`];
|
|
252
|
+
}
|
|
253
|
+
function wipeVertical(name) {
|
|
254
|
+
const up = name.endsWith("up");
|
|
255
|
+
return [`${name} reveals the box starting from its ${up ? "bottom" : "top"} edge, sweeping ${up ? "up" : "down"}.`];
|
|
256
|
+
}
|
|
257
|
+
var CURSOR_DOT_LINES = {
|
|
258
|
+
"cursor-follow": "The dot follows the pointer closely.",
|
|
259
|
+
"cursor-lag": "The dot trails a little behind the pointer on purpose.",
|
|
260
|
+
"cursor-label": "The dot is a small pill of text. Set the words with label: (the default is View).",
|
|
261
|
+
"cursor-invert": "The dot flips the colours of whatever it passes over."
|
|
262
|
+
};
|
|
263
|
+
function cursorDot(name) {
|
|
264
|
+
return [
|
|
265
|
+
`${name} adds a small dot to the page that follows the pointer. The box you put data-kui on doesn't move.`,
|
|
266
|
+
CURSOR_DOT_LINES[name],
|
|
267
|
+
"The dot only shows while the pointer is over the box, or when the box has keyboard focus. It is skipped on touch screens."
|
|
268
|
+
];
|
|
269
|
+
}
|
|
270
|
+
var EFFECT_NOTES = {
|
|
271
|
+
"line-boil": [
|
|
272
|
+
"Makes the lines of a still drawing wiggle a few times a second, like hand-drawn animation. It works best on bold line art and flat colour.",
|
|
273
|
+
"It uses the filter property, so it replaces any filter on the same box. It pauses off screen and is skipped under reduced motion."
|
|
274
|
+
],
|
|
275
|
+
"image-flight": [
|
|
276
|
+
"Put this on the trigger button inside data-kui-flight-source; the app owns purchases and basket state.",
|
|
277
|
+
"image: searches the closest source wrapper and destination: searches the page; target: would relocate the effect."
|
|
278
|
+
],
|
|
279
|
+
"number-formatting": ["The app writes the formatted string to data-value; matching characters keep their identity without rolling digits."],
|
|
280
|
+
"text-path": ["Put text-path on an SVG textPath to drive startOffset on scroll or a native SVG timer."],
|
|
281
|
+
"carousel-loop": [
|
|
282
|
+
"Mixed-width slides loop horizontally; give each direct child a width in CSS.",
|
|
283
|
+
"A short row stays a static, locally scrollable strip until it can cover the viewport while recycling.",
|
|
284
|
+
"shape:line uses constant yaw with rise and depth per measured stride and fades before recycling."
|
|
285
|
+
],
|
|
286
|
+
"drop-open": ["Parent data-open, open or popover-open opens its direct children."],
|
|
287
|
+
curtain: [
|
|
288
|
+
"Covers with a solid colour, commits one attribute change, then reveals. Cover and reveal shapes are independent.",
|
|
289
|
+
"Controls of the same target share one inert panel. Latest request wins; hidden tabs and reduced motion commit immediately."
|
|
290
|
+
],
|
|
291
|
+
"flip-card": [
|
|
292
|
+
"flip-card turns its first two child elements into the front and back faces, and flips between them. No special classes needed.",
|
|
293
|
+
"Already using kui-face-front / kui-face-back classes? Those still work, and they win over the first-two-children rule.",
|
|
294
|
+
"A button with aria-pressed directly inside the card becomes the flip control. With no button, the card adds one.",
|
|
295
|
+
...onOwnChildren("flip-card")
|
|
296
|
+
],
|
|
297
|
+
...fromEntriesOf(OWN_CHILDREN_PRESETS, (name) => onOwnChildren(name)),
|
|
298
|
+
...fromEntriesOf(EXIT_TOWARD, (name) => exitToward(name)),
|
|
299
|
+
...fromEntriesOf(WIPES_HORIZONTAL, (name) => wipeHorizontal(name)),
|
|
300
|
+
...fromEntriesOf(WIPES_VERTICAL, (name) => wipeVertical(name)),
|
|
301
|
+
...fromEntriesOf(CURSOR_DOT_PRESETS, (name) => cursorDot(name)),
|
|
302
|
+
"cursor-spotlight": [
|
|
303
|
+
"cursor-spotlight lights up the box with a soft glow that follows the pointer. No extra dot is added.",
|
|
304
|
+
"The box itself stays where it is. Only the glow moves, and that is normal.",
|
|
305
|
+
"The glow only shows while the pointer is over the box, or when the box has keyboard focus."
|
|
306
|
+
],
|
|
307
|
+
carousel: [
|
|
308
|
+
"target: names the slides and the dots together, like target:'.slide, .dot'. Any value with a comma or a space needs quotes.",
|
|
309
|
+
"next: and prev: are the arrow buttons. jump: is the row of dots, and each dot jumps to the slide in the same position.",
|
|
310
|
+
"Past the last slide it wraps back to the first. With no next:, prev: or jump:, clicking the carousel moves it forward."
|
|
311
|
+
],
|
|
312
|
+
"horizontal-scroll": [
|
|
313
|
+
"target: names the strip that slides sideways. The outer box stays put while you scroll down.",
|
|
314
|
+
"Only the first match is used, so point target: at one strip.",
|
|
315
|
+
"Without a target:, the box with data-kui is the strip, and it just slides sideways as you scroll."
|
|
316
|
+
]
|
|
317
|
+
};
|
|
318
|
+
|
|
183
319
|
// src/notes/interaction.ts
|
|
184
320
|
var INTERACTION_NOTES = {
|
|
321
|
+
"cursor-trail.images": "Which source images inside the host supply the decorative trail.",
|
|
322
|
+
"cursor-trail.spacing": "Distance between successive photographs along the pointer path.",
|
|
323
|
+
"group-expand.grow": "How many shares of the row the hovered or focused card takes, compared with each neighbour.",
|
|
324
|
+
"cursor-follow.over": "Which descendants supply the hovered shape and content.",
|
|
325
|
+
"cursor-follow.match": "Keep the dot size, fit the target box, or match its text height.",
|
|
326
|
+
"cursor-follow.snap": "Follow the pointer or spring to the hovered target centre.",
|
|
327
|
+
"cursor-follow.dot-class": "Extra style classes on this follower, for size, paint or rich content.",
|
|
328
|
+
"cursor-lag.over": "Which descendants supply the hovered shape and content.",
|
|
329
|
+
"cursor-lag.match": "Keep the dot size, fit the target box, or match its text height.",
|
|
330
|
+
"cursor-lag.snap": "Follow the pointer or spring to the hovered target centre.",
|
|
331
|
+
"cursor-lag.dot-class": "Extra style classes on this follower, for size, paint or rich content.",
|
|
332
|
+
"cursor-label.over": "Which descendants supply the hovered shape and content.",
|
|
333
|
+
"cursor-label.match": "Keep the dot size, fit the target box, or match its text height.",
|
|
334
|
+
"cursor-label.snap": "Follow the pointer or spring to the hovered target centre.",
|
|
335
|
+
"cursor-label.dot-class": "Extra style classes on this follower, for size, paint or rich content.",
|
|
336
|
+
"cursor-invert.over": "Which descendants supply the hovered shape and content.",
|
|
337
|
+
"cursor-invert.match": "Keep the dot size, fit the target box, or match its text height.",
|
|
338
|
+
"cursor-invert.snap": "Follow the pointer or spring to the hovered target centre.",
|
|
339
|
+
"cursor-invert.dot-class": "Extra style classes on this follower, for size, paint or rich content.",
|
|
340
|
+
"pop.press": "Scale while pressed, including during hover; release returns to the hover or focus scale.",
|
|
341
|
+
"cursor-spotlight.gradient": "A soft radial glow or fixed conic sectors at the pointer; --kui-spotlight-colors sets the conic stops.",
|
|
185
342
|
"anchored-preview.distance": "How far the preview travels as it pops in.",
|
|
186
343
|
"anchored-preview.gap": "How much space is left between the preview and what it points at.",
|
|
187
344
|
"anchored-preview.scale": "How small the preview starts before it grows to full size.",
|
|
@@ -278,6 +435,7 @@ var INTERACTION_NOTES = {
|
|
|
278
435
|
"label-swap.distance": {
|
|
279
436
|
why: "How far each label slides as it swaps; 100% is a full label height."
|
|
280
437
|
},
|
|
438
|
+
"label-swap.stagger": "The pause between rolling letters; zero moves each whole label.",
|
|
281
439
|
"lift.distance": "How far the element rises on hover.",
|
|
282
440
|
"lift-shadow.distance": "How far the element rises on hover.",
|
|
283
441
|
"pop.scale": "How much bigger the element grows on hover; 1 is no change.",
|
|
@@ -352,7 +510,7 @@ var KEY_NOTES = {
|
|
|
352
510
|
whenOmitted: "It plays on the way in and nothing else."
|
|
353
511
|
},
|
|
354
512
|
"data-kui.timeline": {
|
|
355
|
-
why: "
|
|
513
|
+
why: "Choose time, view or scroll, optionally followed by an axis and a CSS timeline name inside quotes.",
|
|
356
514
|
whenOmitted: "It plays over time, at its own speed."
|
|
357
515
|
},
|
|
358
516
|
"data-kui.threshold": {
|
|
@@ -419,6 +577,23 @@ var KEY_NOTES = {
|
|
|
419
577
|
|
|
420
578
|
// src/notes/mechanics.ts
|
|
421
579
|
var MECHANICS_NOTES = {
|
|
580
|
+
"text-path.from": "The starting offset of the lettering along its SVG path.",
|
|
581
|
+
"text-path.to": "The ending offset, using the same unit as from.",
|
|
582
|
+
"text-path.duration": "How long timed lettering takes to travel along its path.",
|
|
583
|
+
"text-path.delay": "How long timed lettering waits before moving.",
|
|
584
|
+
"text-path.ease": "How timed lettering accelerates and slows along its path.",
|
|
585
|
+
"text-path.loop": "Repeats timed lettering continuously when true.",
|
|
586
|
+
"text-path.distance": "How much scrolling moves the lettering from its starting offset to its ending offset.",
|
|
587
|
+
"flip-container.attribute": "Also animate layout changes when this attribute changes on the host or its descendants.",
|
|
588
|
+
"flip-container.nested": "Include the host and descendants with corrected inherited translation and scale.",
|
|
589
|
+
"flip-container.leave": "Fade marked direct children out of flow and emit kui:leave-end so the app can remove each row.",
|
|
590
|
+
"auto-height.axis": "Animate height or width from its displayed size when interrupted.",
|
|
591
|
+
"tween.toggle": "Click to transition between the resting style and a scalar destination.",
|
|
592
|
+
"tween-from.toggle": "Use toggle on tween to transition between two positions.",
|
|
593
|
+
"tween.border-radius": "How round the corners become, with optional waypoint values.",
|
|
594
|
+
"tween-from.border-radius": "How round the corners start before returning to rest.",
|
|
595
|
+
"tween.border-radius-ease": "The curve used only for the corner rounding.",
|
|
596
|
+
"tween-from.border-radius-ease": "The curve used only for the corner rounding.",
|
|
422
597
|
"auto-height.attribute": {
|
|
423
598
|
why: "Which attribute changing tells the panel it opened or closed, so it can animate its height.",
|
|
424
599
|
whenOmitted: "Watches data-open."
|
|
@@ -436,12 +611,17 @@ var MECHANICS_NOTES = {
|
|
|
436
611
|
"draggable.damping": "How quickly the spring wobble dies out; lower wobbles longer.",
|
|
437
612
|
"draggable.mass": "How heavy it feels; higher is slower and swingier.",
|
|
438
613
|
"draggable.axis": "Limit dragging to sideways only, up and down only, or both.",
|
|
614
|
+
"draggable.publish": "Publish signed pixel numbers as --kui-drag-x and --kui-drag-y during dragging and settling.",
|
|
615
|
+
"draggable.detents": "Set space-separated pixel stops for the nearest release position on each enabled axis.",
|
|
616
|
+
"draggable.limits": "Use parent or a box selector for uneven elastic edges, measured at pickup and resize.",
|
|
617
|
+
"draggable.lock": "Choose dominant to freeze the stronger axis after the drag threshold, with ties choosing sideways.",
|
|
618
|
+
"draggable.wrap": "One or two positive pixel periods wrap the final offset while the author repeats the content.",
|
|
439
619
|
"draggable.bounds": {
|
|
440
620
|
why: "The furthest, in pixels, it can be pulled from its start; it gets stiffer near the limit.",
|
|
441
621
|
whenOmitted: "No limit."
|
|
442
622
|
},
|
|
443
623
|
"draggable.return": {
|
|
444
|
-
why: "
|
|
624
|
+
why: "Use true to spring home, or edge with limits to return to the nearest valid offset without momentum.",
|
|
445
625
|
whenOmitted: "Off: it stays where you drop it."
|
|
446
626
|
},
|
|
447
627
|
"draggable.inertia": {
|
|
@@ -464,6 +644,8 @@ var MECHANICS_NOTES = {
|
|
|
464
644
|
},
|
|
465
645
|
"flip-face.angle": "How far the face turns, in degrees; 180deg is a full flip.",
|
|
466
646
|
"flip-face.perspective": "How deep the 3D looks while turning; smaller is more dramatic.",
|
|
647
|
+
"flip-face.parts": "Use six authored faces to form a cube on cube-rotate.",
|
|
648
|
+
"flip-face.tumble": "Turn a six-faced cube continuously around all three axes.",
|
|
467
649
|
"flip-indicator.follow": {
|
|
468
650
|
why: "Which element the indicator slides to, such as the active tab; the first match on the page.",
|
|
469
651
|
whenOmitted: "Nothing to follow, so the indicator stays put.",
|
|
@@ -474,6 +656,7 @@ var MECHANICS_NOTES = {
|
|
|
474
656
|
whenOmitted: "Watches aria-selected."
|
|
475
657
|
},
|
|
476
658
|
"icon-toggle.delay": "Wait this long before opening; closing is never delayed.",
|
|
659
|
+
"icon-toggle.parts": "Use dots on hamburger-to-x to stretch four decorative dots into two crossing strokes.",
|
|
477
660
|
"magnetic.stiffness": "How firmly it springs toward the pointer; higher follows tighter.",
|
|
478
661
|
"magnetic.damping": "How quickly the spring wobble dies out; lower wobbles longer.",
|
|
479
662
|
"magnetic.mass": "How heavy it feels; higher is slower and swingier.",
|
|
@@ -492,6 +675,7 @@ var MECHANICS_NOTES = {
|
|
|
492
675
|
whenOmitted: "Its top-left corner."
|
|
493
676
|
},
|
|
494
677
|
"motion-path.from": "Where along the path it starts, as a percentage of the length.",
|
|
678
|
+
"motion-path.viewbox": "Source coordinate bounds for fitting the path into its parent.",
|
|
495
679
|
"motion-path.to": "Where along the path it stops, as a percentage of the length.",
|
|
496
680
|
"page-reveal.distance": "How far the page slides as it fades in. Only the slide version moves.",
|
|
497
681
|
"page-fade.distance": "Does nothing here: page-fade only fades. Use page-slide to move as well.",
|
|
@@ -504,12 +688,15 @@ var MECHANICS_NOTES = {
|
|
|
504
688
|
whenOmitted: "Uses the path's own shape."
|
|
505
689
|
},
|
|
506
690
|
"path-morph.to": {
|
|
507
|
-
why: "The
|
|
691
|
+
why: "The destination path, or a pipe-separated chain of destination paths with loop enabled.",
|
|
508
692
|
whenOmitted: "Nothing to morph into: a warning, and the shape never changes.",
|
|
509
693
|
required: true
|
|
510
694
|
},
|
|
511
695
|
"path-morph.delay": "Wait this long after the pointer arrives before morphing; moving away is never delayed.",
|
|
696
|
+
"path-morph.loop": "Loop through the starting path and each destination, pausing while the tab is hidden.",
|
|
697
|
+
"path-morph.colors": "With loop enabled, blend pipe-separated fill colors with one color for every shape including the start.",
|
|
512
698
|
"pressable.duration": "How long you must hold before it counts as a press.",
|
|
699
|
+
"pressable.held": "Mark the host while a pointer is held and clear it on cancellation.",
|
|
513
700
|
"rotate.angle": "How far it is turned at the start, before straightening up.",
|
|
514
701
|
"scale.scale": "How small it starts before growing to full size; 1 means no size change.",
|
|
515
702
|
"skew.from": "The tilt at the start of the scroll range.",
|
|
@@ -673,6 +860,8 @@ var SCROLL_NAV_FORMS_NOTES = {
|
|
|
673
860
|
"range-fill.delay": "No visible effect; the fill timing is fixed in the stylesheet.",
|
|
674
861
|
"range-fill.ease": "No visible effect; the fill timing is fixed in the stylesheet.",
|
|
675
862
|
"scroll-progress.distance": "How much scrolling it takes to go from 0 to 100 percent.",
|
|
863
|
+
"scroll-progress.smooth": "Lets visual progress settle with a spring while step marks follow scrolling directly.",
|
|
864
|
+
"scroll-progress.page": "Tracks the whole document from top to bottom instead of the element distance.",
|
|
676
865
|
"scroll-progress.steps": {
|
|
677
866
|
why: "Split the scroll into this many numbered steps your styles can react to.",
|
|
678
867
|
whenOmitted: "0: only a smooth progress value is published, no steps."
|
|
@@ -730,6 +919,8 @@ var SCROLL_NAV_FORMS_NOTES = {
|
|
|
730
919
|
|
|
731
920
|
// src/notes/shared.ts
|
|
732
921
|
var SHARED_NOTES = {
|
|
922
|
+
"*.backdrop": "Tint the native dialog or popover backdrop; transparent leaves it clear.",
|
|
923
|
+
"*.backdrop-blur": "Blur the page behind a native dialog or popover.",
|
|
733
924
|
"*.duration": "How long the motion takes from start to finish.",
|
|
734
925
|
"*.delay": "Wait this long after the trigger before starting.",
|
|
735
926
|
"*.ease": "The speed curve: slow start, slow finish, or a bounce.",
|
|
@@ -741,6 +932,24 @@ var SHARED_NOTES = {
|
|
|
741
932
|
|
|
742
933
|
// src/notes/showcase.ts
|
|
743
934
|
var SHOWCASE_NOTES = {
|
|
935
|
+
"spatial-ring.shape": "Places cards on the usual ring, an outward vertical helix or a sphere.",
|
|
936
|
+
"spatial-ring.drag-axis": "Lets a drag also tumble a sphere vertically when set to both.",
|
|
937
|
+
"spatial-ring.rise": "The vertical distance between neighboring cards when shape is helix.",
|
|
938
|
+
"spatial-ring.distance": "How much scrolling moves the deck through one full cycle on a scroll timeline.",
|
|
939
|
+
"spatial-ring.speed": "Publishes signed movement speed in pixels per second when true.",
|
|
940
|
+
"spatial-stack.distance": "How much scrolling moves the deck through one full cycle on a scroll timeline.",
|
|
941
|
+
"spatial-stack.speed": "Publishes signed movement speed in pixels per second when true.",
|
|
942
|
+
"spatial-row.copies": "Adds inert image copies to fill a short row when set to auto.",
|
|
943
|
+
"spatial-row.release": "Lets a dragged row coast freely instead of snapping when set to free.",
|
|
944
|
+
"spatial-row.shape": "Places the row flat or along a diagonal depth line.",
|
|
945
|
+
"spatial-row.rise": "The vertical distance per card stride along the line.",
|
|
946
|
+
"spatial-row.depth": "The distance away from the camera per card stride along the line.",
|
|
947
|
+
"spatial-row.yaw": "Turns every line card by the same angle.",
|
|
948
|
+
"spatial-row.perspective": "How close the camera is to the line.",
|
|
949
|
+
"spatial-row.attribute": "Host attribute whose value column moves the line into a bounded column.",
|
|
950
|
+
"spatial-ring.timer": "Publishes how far the current autoplay wait has elapsed, from zero to one, when true.",
|
|
951
|
+
"spatial-stack.timer": "Publishes how far the current autoplay wait has elapsed, from zero to one, when true.",
|
|
952
|
+
"slideshow.enter-delay": "Extra wait before a fade arrives; match duration for out-then-in order. Slide mode does not use it.",
|
|
744
953
|
"compare.position": "Where the divider starts between two images, as a share of the width.",
|
|
745
954
|
"compare.positions": {
|
|
746
955
|
why: "Where each divider starts when comparing three or more images, as one quoted list.",
|
|
@@ -786,6 +995,7 @@ var SHOWCASE_NOTES = {
|
|
|
786
995
|
whenOmitted: "Looks only inside this element."
|
|
787
996
|
},
|
|
788
997
|
"lightbox.scale": "How small the picture starts as it grows into the viewer; 1 means no zoom.",
|
|
998
|
+
"lightbox.flight": "Fly a fitted image from its thumbnail and back, with a short decode wait and plain fallback.",
|
|
789
999
|
"lightbox.loop": {
|
|
790
1000
|
why: "Whether the arrows wrap from the last item back to the first.",
|
|
791
1001
|
whenOmitted: "On: it wraps around."
|
|
@@ -838,6 +1048,10 @@ var SHOWCASE_NOTES = {
|
|
|
838
1048
|
why: "How long each slide shows before moving on by itself; 2s at least.",
|
|
839
1049
|
whenOmitted: "Off. It also stays off with controls:none or your own next, prev or jump buttons."
|
|
840
1050
|
},
|
|
1051
|
+
"slideshow.hover": {
|
|
1052
|
+
why: "Whether resting the mouse on the slideshow pauses autoplay. none keeps it moving.",
|
|
1053
|
+
whenOmitted: "Hovering pauses it. Keyboard focus and the pause button always pause."
|
|
1054
|
+
},
|
|
841
1055
|
"slideshow.transition": "Whether slides cross-fade or slide sideways.",
|
|
842
1056
|
"slideshow.swipe": "Whether a left or right swipe changes the slide.",
|
|
843
1057
|
"slideshow.mute": {
|
|
@@ -946,6 +1160,14 @@ var SHOWCASE_NOTES = {
|
|
|
946
1160
|
"spatial-stack.blur": "How much blurrier each card behind gets, per place back.",
|
|
947
1161
|
"spatial-stack.fade": "How much fainter each card behind gets, per place back.",
|
|
948
1162
|
"spatial-stack.depth": "How many cards show behind the front one; the rest wait hidden.",
|
|
1163
|
+
"spatial-stack.leave": "Use swipe for a sideways exit that advances one card when dragged either way.",
|
|
1164
|
+
"spatial-stack.leave-x": "How far the leaving card moves sideways, multiplied by the swipe direction.",
|
|
1165
|
+
"spatial-stack.leave-rotate": "How far the leaving card rotates, multiplied by the swipe direction.",
|
|
1166
|
+
"spatial-stack.leave-fade": {
|
|
1167
|
+
why: "Opacity lost over one leaving place; 0 keeps the card opaque until the step ends.",
|
|
1168
|
+
whenOmitted: "A swiped card fades as it goes."
|
|
1169
|
+
},
|
|
1170
|
+
"spatial-stack.rest-rotate": "Alternate resting card angles by stable card index using this angle.",
|
|
949
1171
|
"step-progress.duration": "Passed to your slide styles; autoplay also waits this long after someone moves it.",
|
|
950
1172
|
"step-progress.delay": "Passed to your slide styles to use as a start wait; the library adds no pause itself.",
|
|
951
1173
|
"step-progress.ease": "Passed to your slide styles to use as their speed curve.",
|
|
@@ -993,9 +1215,41 @@ var SHOWCASE_NOTES = {
|
|
|
993
1215
|
whenOmitted: "Looks anywhere on the page, except under the carousel name, which looks inside."
|
|
994
1216
|
}
|
|
995
1217
|
};
|
|
1218
|
+
var STACK_ONLY_PARAMS = /* @__PURE__ */ new Set([
|
|
1219
|
+
"travel",
|
|
1220
|
+
"shift",
|
|
1221
|
+
"rise",
|
|
1222
|
+
"shrink",
|
|
1223
|
+
"blur",
|
|
1224
|
+
"fade",
|
|
1225
|
+
"depth",
|
|
1226
|
+
"leave",
|
|
1227
|
+
"leave-x",
|
|
1228
|
+
"leave-rotate",
|
|
1229
|
+
"leave-fade",
|
|
1230
|
+
"rest-rotate"
|
|
1231
|
+
]);
|
|
1232
|
+
var ROW_NOTES = Object.fromEntries(
|
|
1233
|
+
Object.entries(SHOWCASE_NOTES).filter(([key]) => {
|
|
1234
|
+
const [owner, parameter] = key.split(".");
|
|
1235
|
+
return owner === "spatial-stack" && !STACK_ONLY_PARAMS.has(parameter);
|
|
1236
|
+
}).map(([key, note]) => [
|
|
1237
|
+
key.replace("spatial-stack.", "spatial-row."),
|
|
1238
|
+
typeof note === "string" ? note.replace("stack", "row") : {
|
|
1239
|
+
why: note.why.replace("stack", "row"),
|
|
1240
|
+
whenOmitted: note.whenOmitted.replace("stack", "row")
|
|
1241
|
+
}
|
|
1242
|
+
])
|
|
1243
|
+
);
|
|
996
1244
|
|
|
997
1245
|
// src/notes/text.ts
|
|
998
1246
|
var TEXT_NOTES = {
|
|
1247
|
+
"split-text.hold": "Keep the split and light each piece using inherited scroll progress until teardown.",
|
|
1248
|
+
"text-gradient-sweep.fill": "Fill dim glyphs with a hard edge from left to right, using the existing sweep animation.",
|
|
1249
|
+
"fade-open.enter-delay": "Extra wait only when opening; match the outgoing duration for out-then-in order.",
|
|
1250
|
+
"fade-open.shape": "Reveal through a circle or rounded inset in both directions; none keeps the ordinary fade.",
|
|
1251
|
+
"fade-open.origin": "Circle centre: center, top, bottom, left, right, or a quoted corner such as top left.",
|
|
1252
|
+
"fade-open.radius": "Corner radius throughout an inset reveal.",
|
|
999
1253
|
"count.from": "The number the counter starts at.",
|
|
1000
1254
|
"count.to": "The number the counter ends on.",
|
|
1001
1255
|
"count.decimals": "How many digits to show after the decimal point; ignored by compact, which shows at most one.",
|
|
@@ -1009,7 +1263,11 @@ var TEXT_NOTES = {
|
|
|
1009
1263
|
},
|
|
1010
1264
|
"count-odometer.from": "The number the rolling digits start at; whole numbers from 0 up, so -5 counts as 0.",
|
|
1011
1265
|
"count-odometer.to": "The number the rolling digits land on; whole numbers from 0 up, so 2.5 rounds to 3.",
|
|
1266
|
+
"count-odometer.attribute": "Watch this host attribute for a live number instead of playing a fixed count.",
|
|
1012
1267
|
"drop-open.distance": "How far the element drops down into place as it opens.",
|
|
1268
|
+
"drop-open.radius": "Distance from the group centre; use distance:0px to fan out from that centre.",
|
|
1269
|
+
"drop-open.angle": "Angle of the first item, with -90deg pointing up. Existing cascade: assigns each child its index and stagger.",
|
|
1270
|
+
"drop-open.step": "Angle between items: 60deg gives six items a ring; a smaller step gives an arc.",
|
|
1013
1271
|
"meter-bar.from": {
|
|
1014
1272
|
why: "How full the bar is when it starts, from 0 (empty) to 1 (full).",
|
|
1015
1273
|
whenOmitted: "Starts empty and grows to its full width."
|
|
@@ -1026,7 +1284,10 @@ var TEXT_NOTES = {
|
|
|
1026
1284
|
"slide-open-up.distance": "How far the element slides in from below.",
|
|
1027
1285
|
"split-text.stagger": "Wait between each piece, so letters or words arrive one by one.",
|
|
1028
1286
|
"split-text.unit": "What the text is cut into: single letters, whole words, or lines.",
|
|
1029
|
-
"split-text.direction":
|
|
1287
|
+
"split-text.direction": {
|
|
1288
|
+
why: "How pieces arrive: fade, up/down, a mask wipe, or rise-mask sliding up 120% behind a still clip.",
|
|
1289
|
+
whenOmitted: "Uses the preset's direction; --kui-mask-bleed adds room for letters above and below a mask's edge."
|
|
1290
|
+
},
|
|
1030
1291
|
"split-text-motion.stagger": "Offset between neighbouring letters, which shapes the wave or jitter.",
|
|
1031
1292
|
"split-text-motion.motion": "The style of letter movement: a smooth wave or a nervous jitter.",
|
|
1032
1293
|
"text-3d-extrude.angle": "How far the text is turned at the start before it straightens; negative turns it anticlockwise.",
|
|
@@ -1041,7 +1302,12 @@ var TEXT_NOTES = {
|
|
|
1041
1302
|
why: "The colour of the highlight bar or underline.",
|
|
1042
1303
|
whenOmitted: "Uses the text's own colour; the highlight preset uses gold."
|
|
1043
1304
|
},
|
|
1305
|
+
"text-sweep.position": "Place the underline vertically, with 50% drawing a strike through the text.",
|
|
1044
1306
|
"typewriter.step": "How long each typed letter takes; ignored when a total duration is given.",
|
|
1307
|
+
"typewriter.words": "The words to type and fully delete in turn, separated by |.",
|
|
1308
|
+
"typewriter.interval": "How long each whole word stays before it deletes.",
|
|
1309
|
+
"typewriter.erase": "Use scatter to drift and fade typed letters away before the next word.",
|
|
1310
|
+
"typewriter.rhythm": "Use natural for modestly uneven typing with longer pauses after punctuation.",
|
|
1045
1311
|
"typewriter.loop": {
|
|
1046
1312
|
why: "Delete the text and type it again, over and over.",
|
|
1047
1313
|
whenOmitted: "Off: it types once and stops."
|
|
@@ -1062,7 +1328,10 @@ var TEXT_NOTES = {
|
|
|
1062
1328
|
why: 'The words to cycle through, separated by | and quoted, like "fast|simple|bold".',
|
|
1063
1329
|
required: true
|
|
1064
1330
|
},
|
|
1065
|
-
"word-cycler.interval": "How long each word stays before the next one swaps in."
|
|
1331
|
+
"word-cycler.interval": "How long each word stays before the next one swaps in.",
|
|
1332
|
+
"word-cycler.swap": "Whether words fade or scramble into the next word.",
|
|
1333
|
+
"word-cycler.from": "Where letters start scrambling and returning: start, end, centre or edges.",
|
|
1334
|
+
"word-cycler.step": "The pause between scramble steps."
|
|
1066
1335
|
};
|
|
1067
1336
|
|
|
1068
1337
|
// src/notes/index.ts
|
|
@@ -1076,8 +1345,10 @@ var PARAM_NOTES = {
|
|
|
1076
1345
|
...SCROLL_NAV_FORMS_NOTES,
|
|
1077
1346
|
...MECHANICS_NOTES,
|
|
1078
1347
|
...SHOWCASE_NOTES,
|
|
1348
|
+
...ROW_NOTES,
|
|
1079
1349
|
...KEY_NOTES
|
|
1080
1350
|
};
|
|
1081
1351
|
export {
|
|
1352
|
+
EFFECT_NOTES,
|
|
1082
1353
|
PARAM_NOTES
|
|
1083
1354
|
};
|
|
@@ -811,7 +811,7 @@ void main() {
|
|
|
811
811
|
`;
|
|
812
812
|
|
|
813
813
|
// src/core/owned-styles.ts
|
|
814
|
-
function createStyleLedger(el) {
|
|
814
|
+
function createStyleLedger(el, restoreProperty) {
|
|
815
815
|
const style = el.style;
|
|
816
816
|
const previous = /* @__PURE__ */ new Map();
|
|
817
817
|
const authoredStyleAttribute = el.hasAttribute("style");
|
|
@@ -831,6 +831,7 @@ void main() {
|
|
|
831
831
|
claim: remember,
|
|
832
832
|
restore() {
|
|
833
833
|
for (const [property, previousValue] of previous) {
|
|
834
|
+
if (restoreProperty && !restoreProperty(property)) continue;
|
|
834
835
|
if (previousValue === void 0) style.removeProperty(property);
|
|
835
836
|
else style.setProperty(property, previousValue.value, previousValue.priority);
|
|
836
837
|
}
|