kuinetic 0.2.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/advanced/index.mjs +1 -1
  3. package/dist/esm/{chunk-FASAEQDR.mjs → chunk-CG37RODK.mjs} +1232 -277
  4. package/dist/esm/{chunk-AEQGC2KM.mjs → chunk-EDFJTT5B.mjs} +2 -1
  5. package/dist/esm/{chunk-MZQG2VMG.mjs → chunk-W7U4A2NK.mjs} +708 -610
  6. package/dist/esm/{chunk-EHS45PIK.mjs → chunk-Y2FP56K5.mjs} +9228 -4275
  7. package/dist/esm/core/index.mjs +3 -3
  8. package/dist/esm/effects/index.mjs +3 -3
  9. package/dist/esm/index.mjs +4 -4
  10. package/dist/esm/notes/index.mjs +347 -9
  11. package/dist/kuinetic.advanced.js +2 -1
  12. package/dist/kuinetic.advanced.min.js +1 -1
  13. package/dist/kuinetic.all.js +9099 -3152
  14. package/dist/kuinetic.all.min.js +4 -2
  15. package/dist/kuinetic.css +2408 -161
  16. package/dist/kuinetic.js +9098 -3151
  17. package/dist/kuinetic.min.css +1 -1
  18. package/dist/kuinetic.min.js +3 -1
  19. package/dist/kuinetic.notes.js +1 -1
  20. package/dist/types/advanced/shaders.d.ts +1 -1
  21. package/dist/types/core/animator.d.ts +61 -2
  22. package/dist/types/core/attrs.d.ts +0 -2
  23. package/dist/types/core/auto-motion.d.ts +139 -0
  24. package/dist/types/core/cadence.d.ts +90 -0
  25. package/dist/types/core/channels.d.ts +5 -1
  26. package/dist/types/core/compile.d.ts +14 -2
  27. package/dist/types/core/deck-viewer.d.ts +2 -0
  28. package/dist/types/core/declarations.d.ts +6 -0
  29. package/dist/types/core/derived/group-gate.d.ts +18 -4
  30. package/dist/types/core/describe.d.ts +1 -1
  31. package/dist/types/core/easing.d.ts +9 -0
  32. package/dist/types/core/effect-context.d.ts +5 -0
  33. package/dist/types/core/element-config.d.ts +5 -4
  34. package/dist/types/core/flip.d.ts +25 -1
  35. package/dist/types/core/gesture.d.ts +5 -0
  36. package/dist/types/core/image-flight.d.ts +23 -0
  37. package/dist/types/core/instances.d.ts +27 -3
  38. package/dist/types/core/js-effect-preparer.d.ts +3 -1
  39. package/dist/types/core/owned-styles.d.ts +2 -1
  40. package/dist/types/core/params.d.ts +2 -3
  41. package/dist/types/core/parse.d.ts +21 -1
  42. package/dist/types/core/pause-scope.d.ts +40 -0
  43. package/dist/types/core/play.d.ts +2 -2
  44. package/dist/types/core/registry.d.ts +17 -2
  45. package/dist/types/core/repeat.d.ts +6 -4
  46. package/dist/types/core/sequence.d.ts +10 -0
  47. package/dist/types/core/stagger-config.d.ts +23 -101
  48. package/dist/types/core/stagger-keys.d.ts +2 -4
  49. package/dist/types/core/stagger.d.ts +12 -21
  50. package/dist/types/core/types.d.ts +76 -19
  51. package/dist/types/effects/auto-motion.d.ts +22 -117
  52. package/dist/types/effects/carousel/archive.d.ts +18 -0
  53. package/dist/types/effects/carousel/coast.d.ts +7 -0
  54. package/dist/types/effects/carousel/deck.d.ts +31 -2
  55. package/dist/types/effects/carousel/drag.d.ts +24 -7
  56. package/dist/types/effects/carousel/glide.d.ts +89 -0
  57. package/dist/types/effects/carousel/line.d.ts +10 -0
  58. package/dist/types/effects/carousel/row-copies.d.ts +13 -0
  59. package/dist/types/effects/carousel/row.d.ts +3 -0
  60. package/dist/types/effects/carousel/shape-fit.d.ts +54 -0
  61. package/dist/types/effects/carousel/sources.d.ts +26 -0
  62. package/dist/types/effects/carousel/sphere.d.ts +23 -0
  63. package/dist/types/effects/carousel/stack.d.ts +2 -1
  64. package/dist/types/effects/catalog/confetti.d.ts +2 -0
  65. package/dist/types/effects/catalog/cursor-trail.d.ts +2 -0
  66. package/dist/types/effects/catalog/curtains.d.ts +2 -0
  67. package/dist/types/effects/catalog/feedback.d.ts +1 -1
  68. package/dist/types/effects/catalog/image-flight.d.ts +2 -0
  69. package/dist/types/effects/catalog/line-boil.d.ts +2 -0
  70. package/dist/types/effects/catalog/media-shared.d.ts +10 -0
  71. package/dist/types/effects/catalog/number-tokens.d.ts +5 -0
  72. package/dist/types/effects/catalog/numbers-shared.d.ts +3 -4
  73. package/dist/types/effects/catalog/pause-scope.d.ts +20 -0
  74. package/dist/types/effects/catalog/text-shared.d.ts +17 -6
  75. package/dist/types/effects/catalog/typewriter-scatter.d.ts +5 -0
  76. package/dist/types/effects/catalog/view-transitions.d.ts +32 -1
  77. package/dist/types/effects/catalog/wobble.d.ts +2 -0
  78. package/dist/types/effects/gestures/drag-options.d.ts +17 -0
  79. package/dist/types/effects/layout/departures.d.ts +21 -0
  80. package/dist/types/effects/motion-path/fit.d.ts +4 -0
  81. package/dist/types/effects/scroll-mechanics/progress-output.d.ts +9 -0
  82. package/dist/types/effects/scroll-mechanics/snap-autoplay.d.ts +20 -0
  83. package/dist/types/effects/step-index.d.ts +19 -1
  84. package/dist/types/effects/step-marking.d.ts +7 -4
  85. package/dist/types/effects/svg/morph-loop.d.ts +7 -0
  86. package/dist/types/effects/svg/text-path.d.ts +2 -0
  87. package/dist/types/effects/three-d/cube.d.ts +2 -0
  88. package/dist/types/effects/tween/index.d.ts +2 -1
  89. package/dist/types/effects/tween/properties.d.ts +1 -1
  90. package/dist/types/effects/tween/toggle.d.ts +6 -0
  91. package/dist/types/effects/tween/waypoints.d.ts +1 -1
  92. package/dist/types/notes/effects.d.ts +1 -0
  93. package/dist/types/notes/index.d.ts +11 -0
  94. package/dist/types/notes/showcase.d.ts +1 -0
  95. package/dist/types/showcase/lightbox-flight.d.ts +11 -0
  96. package/dist/types/showcase/media-source.d.ts +1 -0
  97. package/dist/types/showcase/modal-shell.d.ts +5 -0
  98. package/dist/types/showcase/youtube.d.ts +3 -0
  99. package/package.json +1 -1
@@ -0,0 +1,20 @@
1
+ import type { Registry } from '../../core/registry.js';
2
+ import type { Preset, Primitive } from '../../core/types.js';
3
+ /**
4
+ * Pauses everything under a container from the author's own button.
5
+ *
6
+ * Writes `data-kui-paused` on the host (the stylesheet freezes every CSS animation beneath it and
7
+ * every scheduler reads it through `isPausedByScope`), holds the subtree's script animations,
8
+ * mirrors `aria-pressed` onto each `pause:` control, and announces each change so schedulers
9
+ * re-evaluate. It is a control, so it keeps working under reduced motion.
10
+ */
11
+ export declare const PAUSE_SCOPE_PRIMITIVE: Primitive;
12
+ export declare const PAUSE_SCOPE_PRESETS: Preset[];
13
+ /**
14
+ * Register the section-wide pause control.
15
+ *
16
+ * @param registry - Registry to populate.
17
+ * @returns The same registry, for chaining.
18
+ * @complexity O(1) time and space.
19
+ */
20
+ export declare function registerPauseScope(registry: Registry): Registry;
@@ -1,6 +1,10 @@
1
+ import type { SplitStage } from '../../core/registry.js';
2
+ import type { Reporter } from '../../core/reporter.js';
1
3
  import type { Cleanup, EffectParams, EffectSpec, EffectVariant, ParameterSchema } from '../../core/types.js';
2
4
  /** How `split-text` breaks a string into decorative pieces. */
3
5
  export type SplitUnit = 'chars' | 'words' | 'lines';
6
+ /** Mount the decorative pieces for a `split:` group, not for a text effect. */
7
+ export declare function installTextStage(host: Element, unit: 'chars' | 'words', reporter: Reporter): SplitStage | undefined;
4
8
  /**
5
9
  * Selector for the elements a content-mutating text/number effect must never remove from the DOM:
6
10
  * a link, a form control, anything focusable or already interactive. Every primitive that takes
@@ -39,17 +43,18 @@ export interface SplitLayers {
39
43
  * — the decorative layer is free to sit mid-scramble, mid-type, or split into spans without a
40
44
  * screen reader ever seeing an incomplete or garbled read of the content.
41
45
  *
42
- * @param el - Element whose text is being taken over. Assumed to hold plain text (no children) —
43
- * every DOM-surgery primitive in this module shares that constraint. Callers are expected to
46
+ * @param el - Element whose text is being taken over. Callers are expected to
44
47
  * have already checked {@link hasInteractiveDescendant} and bailed out if it is true; this
45
48
  * function itself does not guard, so a caller that skips the check still flattens a link.
46
49
  * @param doc - Document to create nodes in, rather than the ambient global, so callers can point
47
50
  * this at a test document.
48
51
  * @returns The decorative layer to populate, the captured text, and a cleanup.
49
- * @complexity O(1) time and space beyond the caller's own population work.
52
+ * @param preserveMarkup - Seed the decorative layer with a trimmed copy of the authored tree
53
+ * for segmentation. Typing and scrambling instead start with an empty display layer.
54
+ * @complexity O(n) time and space in subtree size when preserving markup.
50
55
  * @overallScore 100
51
56
  */
52
- export declare function installSplitLayers(el: Element, doc: Document): SplitLayers;
57
+ export declare function installSplitLayers(el: Element, doc: Document, preserveMarkup?: boolean): SplitLayers;
53
58
  /**
54
59
  * Grapheme clusters, not UTF-16 code units — an emoji, a flag, or a base letter plus combining
55
60
  * mark stays one unit instead of being torn across two "characters".
@@ -89,6 +94,8 @@ export declare function applyStaggerVars(el: HTMLElement, params: EffectParams):
89
94
  * @overallScore 100
90
95
  */
91
96
  export declare function stepMsFor(params: EffectParams, ticks: number, fallback: number): number;
97
+ /** Deterministic variation stays within .75–3 steps, with pauses after punctuation. */
98
+ export declare function naturalTypeDelay(graphemes: string[], count: number, step: number): number;
92
99
  /**
93
100
  * Total time before every staggered `.kui-split-item` has finished its reveal keyframe: the last
94
101
  * item's `--kui-i * --kui-stagger` delay (text.css), plus its own duration. `prepareSplitText`
@@ -106,6 +113,7 @@ export interface StepRunOptions {
106
113
  delayMs: number;
107
114
  /** Milliseconds between ticks. */
108
115
  stepMs: number;
116
+ nextDelay?: () => number;
109
117
  /** One frame of work. Returns `true` when there is nothing left to do. */
110
118
  tick(): boolean;
111
119
  }
@@ -179,7 +187,9 @@ export declare function rewrapLineSpans(container: Element, doc: Document): HTML
179
187
  * @complexity O(n) time and space in text length, dominated by the chosen unit's own cost.
180
188
  * @overallScore 100
181
189
  */
182
- export declare function appendSpansFor(unit: SplitUnit, container: Element, doc: Document, text: string): HTMLElement[];
190
+ export declare function appendSpansFor(unit: SplitUnit, container: Element, doc: Document, text?: string): HTMLElement[];
191
+ /** A stationary clipping box around each moving item; whitespace remains in normal flow. */
192
+ export declare function applySplitMask(items: HTMLElement[], doc: Document, direction: string): void;
183
193
  export interface TypeState {
184
194
  index: number;
185
195
  deleting: boolean;
@@ -210,10 +220,11 @@ export declare const SCRAMBLE_CHARSETS: Record<string, string>;
210
220
  * @param resolved - Count of graphemes (from the start) considered final.
211
221
  * @param charset - Characters to draw unresolved positions from.
212
222
  * @param random - Source of randomness, injected so the frame is reproducible in tests.
223
+ * @param ranks - Optional per-grapheme resolve ranks; omitted keeps left-to-right resolution.
213
224
  * @complexity O(n) time and space in grapheme count.
214
225
  * @overallScore 100
215
226
  */
216
- export declare function scrambledFrame(graphemes: string[], resolved: number, charset: string, random: () => number): string;
227
+ export declare function scrambledFrame(graphemes: string[], resolved: number, charset: string, random: () => number, ranks?: number[]): string;
217
228
  /**
218
229
  * The generic variable-font axis: `data-kui="var-axis axis:GRAD from:0 to:150"`.
219
230
  *
@@ -0,0 +1,5 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { SetupResult } from '../../core/instances.js';
3
+ import type { EffectParams } from '../../core/types.js';
4
+ import type { SplitLayers } from './text-shared.js';
5
+ export declare function prepareScatterTypewriter(layers: SplitLayers, params: EffectParams, ctx: PrepareContext, words: string[]): SetupResult;
@@ -1,5 +1,36 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
1
2
  import type { Registry } from '../../core/registry.js';
2
- import type { Preset, Primitive } from '../../core/types.js';
3
+ import type { EffectParams, Preset, Primitive } from '../../core/types.js';
4
+ export declare const swapOwners: WeakMap<Element, {
5
+ version: number;
6
+ cancel: () => void;
7
+ }>;
8
+ /** Only curtain-enabled targets participate; ordinary view-swap retains its own lifecycle. */
9
+ export declare function reserveSwap(target: Element): () => boolean;
10
+ /**
11
+ * The state change `view-swap` performs, as one function the browser can call at the right moment.
12
+ *
13
+ * Deliberately tiny, and deliberately expressed in markup the author already has. `aria-controls`
14
+ * is what a disclosure button already points at, `[data-open]` is already the attribute
15
+ * `catalog/discrete.ts`'s six names read to decide open from closed, and `aria-expanded` is
16
+ * already the control's own state. So the whole vocabulary here is "flip the thing you already
17
+ * told the browser about", which is the most this library can own without becoming the
18
+ * component: it does not manage focus, it does not move the element, it does not route.
19
+ *
20
+ * Returns `undefined` when there is nothing to flip, so the caller can warn once at install time
21
+ * rather than silently on every click.
22
+ *
23
+ * @complexity O(1) time and space beyond the one `querySelector`.
24
+ * @overallScore 100
25
+ */
26
+ export declare function resolveSwapTarget(el: Element, params: EffectParams, ctx: PrepareContext): Element | undefined;
27
+ /** Validate with the DOM's attribute-name grammar without changing the target. */
28
+ export declare function resolveSwapAttribute(params: EffectParams, ctx: PrepareContext): string | undefined;
29
+ export declare function resolveSwapValues(params: EffectParams, ctx: PrepareContext, next?: boolean): {
30
+ value: string;
31
+ values: string[];
32
+ } | undefined;
33
+ export declare const VIEW_SWAP: Primitive;
3
34
  export declare const VIEW_TRANSITION_PRIMITIVES: Primitive[];
4
35
  export declare const VIEW_TRANSITION_PRESETS: Preset[];
5
36
  /**
@@ -0,0 +1,2 @@
1
+ import type { Primitive } from '../../core/types.js';
2
+ export declare const preparePointerWobble: NonNullable<Primitive['prepare']>;
@@ -0,0 +1,17 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { EffectParams } from '../../core/types.js';
3
+ type Axis = 'x' | 'y';
4
+ type Point = Record<Axis, number>;
5
+ /** Extra reads/listeners exist only on a host opting into the round-2 drag options. */
6
+ export declare function dragOptions(el: Element, params: EffectParams, ctx: PrepareContext): {
7
+ publish: boolean;
8
+ enabled: boolean;
9
+ dominant: boolean;
10
+ bounded: boolean;
11
+ render: (point: Point) => Point;
12
+ pickup: () => void;
13
+ onResize(callback: () => void): void;
14
+ target: (key: Axis, value: number) => number;
15
+ destroy: () => void | undefined;
16
+ };
17
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { Box, FlipSnapshot } from '../../core/flip.js';
3
+ import type { Cleanup } from '../../core/types.js';
4
+ export declare const LEAVING = "data-kui-leaving";
5
+ type DepartureTiming = {
6
+ durationMs: number;
7
+ delayMs: number;
8
+ easing?: string;
9
+ };
10
+ /** Read only the running FLIP offset; the cached destination itself is never exposed to exits. */
11
+ export declare function interruptedSnapshot(before: FlipSnapshot, win: Window): FlipSnapshot;
12
+ /** Pin an owned character at its pre-update box while its renderer closes the gap. */
13
+ export declare function pinDeparture(node: HTMLElement, box: Box, host: HTMLElement): void;
14
+ /** Original direct children only; the app retains ownership of removal and focus. */
15
+ export declare function departures(host: HTMLElement, ctx: PrepareContext, timing: DepartureTiming): {
16
+ hold(): void;
17
+ update(): void;
18
+ excludes(node: Element): boolean;
19
+ destroy: Cleanup;
20
+ };
21
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { Primitive } from '../../core/types.js';
2
+ /** Uniform scaling preserves smooth controls and arc rotations/flags as authored. */
3
+ export declare function transformPath(path: string, scale: number, dx: number, dy: number): string;
4
+ export declare const preparePathFit: NonNullable<Primitive['prepare']>;
@@ -0,0 +1,9 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { ProgressHandler } from './tracker.js';
3
+ /** A document-length source, independent of the progress bar's fixed box. */
4
+ export declare function trackPageProgress(ctx: PrepareContext, onProgress: ProgressHandler): import("../../index.js").Cleanup;
5
+ /** Only the visual output is smoothed; discrete marking still receives raw progress. */
6
+ export declare function smoothProgress(ctx: PrepareContext, write: (value: number) => void): {
7
+ write(value: number): void;
8
+ release(): void;
9
+ };
@@ -0,0 +1,20 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { ContinuousSetup } from '../../core/instances.js';
3
+ import type { Cleanup, EffectParams } from '../../core/types.js';
4
+ /**
5
+ * Give a snap strip an `autoplay:` that steps through its items, on the carousel's own scheduler.
6
+ *
7
+ * Returns `null` (after warning where it is the author's mistake) when autoplay is not asked for or
8
+ * cannot be honoured, so the caller keeps its plain cleanup. The pause rules — offscreen, hidden
9
+ * tab, hover and focus, the `pause:` control, the 2s floor — all live in `createDeckMotion`; the
10
+ * only things supplied here are how to step and when a person has taken over.
11
+ *
12
+ * @complexity O(n) per step in the number of items; O(1) space.
13
+ */
14
+ export declare function startSnapAutoplay(request: {
15
+ el: Element;
16
+ items: Element[];
17
+ params: EffectParams;
18
+ ctx: PrepareContext;
19
+ release: Cleanup;
20
+ }): ContinuousSetup | null;
@@ -1,5 +1,23 @@
1
- import type { Cleanup, EffectParams } from '../core/types.js';
1
+ import type { Cleanup, EffectParams, ParamSpec } from '../core/types.js';
2
2
  import type { PrepareContext } from '../core/effect-context.js';
3
+ export declare const DECK_CONTROLS_ATTR = "data-kui-deck-controls";
4
+ export declare const DECK_CONTROLS_PARAM: ParamSpec;
5
+ /** Authored selectors keep their inside-first lookup even when the deck adds its own buttons. */
6
+ export declare function queryDeckControls(el: Element, ctx: PrepareContext, selector: string): Element[];
7
+ export declare function suppressSlideImageDrag(slides: Iterable<Element>): Cleanup;
8
+ export declare function createDeckControls(request: {
9
+ el: Element;
10
+ params: EffectParams;
11
+ slides: readonly Element[];
12
+ spatial?: boolean;
13
+ step(direction: 1 | -1): void;
14
+ jump(index: number): void;
15
+ }): {
16
+ pause: HTMLButtonElement | undefined;
17
+ mark(index: number, drift?: number): void;
18
+ updateDistance: (drift: number) => void;
19
+ release(): void;
20
+ } | undefined;
3
21
  export interface StepIndexOptions {
4
22
  el: Element;
5
23
  params: EffectParams;
@@ -50,8 +50,10 @@ export type StepState = 'before' | 'active' | 'after';
50
50
  * link ledgers and the inline-style ledger they were both modelled on.
51
51
  */
52
52
  export interface StepMarker {
53
- /** Stamp `before`/`active`/`after` across the tracked elements. Cheap enough to call per flip. */
54
- mark(index: number): void;
53
+ /** Stamp state; drift opts controls into live distance without the shape-only offset attribute. */
54
+ mark(index: number, drift?: number): void;
55
+ /** Update only cached control distances between full marks; never resolves or stamps attributes. */
56
+ updateDistance(drift: number): void;
55
57
  /** Give every touched element back the attribute value it had before this instance existed. */
56
58
  restore: Cleanup;
57
59
  }
@@ -60,16 +62,17 @@ export interface StepMarker {
60
62
  *
61
63
  * `resolve` is called per flip rather than once at setup, so a list rendered or reordered after
62
64
  * this element was prepared is still picked up. Flips are rare — the caller is expected to guard on
63
- * the index actually changing — while frames are not.
65
+ * the index actually changing — while frames use `updateDistance` with the cached control offsets.
64
66
  *
65
67
  * @param resolve - Produces the current step elements, in document order.
66
68
  * @param warn - Optional diagnostic sink, called at most once per marker. Callers prefix their own
67
69
  * effect name, the way every other warning in this library names the attribute to go and fix.
70
+ * @param groupSize - For controls, use consecutive groups of this many slides instead of parents.
68
71
  * @returns A marker; call `restore` from the primitive's teardown.
69
72
  * @complexity O(n) per `mark` in the number of step elements; O(n) space in elements ever touched.
70
73
  * @overallScore 100
71
74
  */
72
- export declare function createStepMarker(resolve: () => Iterable<Element>, warn?: (message: string) => void): StepMarker;
75
+ export declare function createStepMarker(resolve: () => Iterable<Element>, warn?: (message: string) => void, groupSize?: () => number): StepMarker;
73
76
  /**
74
77
  * Where one step sits relative to the live one, as a signed number of places *around a ring*.
75
78
  *
@@ -0,0 +1,7 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { SetupResult } from '../../core/instances.js';
3
+ import type { EffectParams } from '../../core/types.js';
4
+ /** Resolve a fragment in the path's own root and snapshot its geometry at setup. */
5
+ export declare function resolveMorphDestination(path: Element, value: string, warn: PrepareContext['warn']): string | undefined;
6
+ /** An opt-in loop; the interactive morph's listeners, timing and geometry remain separate. */
7
+ export declare function prepareMorphLoop(path: Element, params: EffectParams, ctx: PrepareContext): SetupResult;
@@ -0,0 +1,2 @@
1
+ import type { Primitive } from '../../core/types.js';
2
+ export declare const TEXT_PATH_PRIMITIVE: Primitive;
@@ -0,0 +1,2 @@
1
+ import type { Primitive } from '../../core/types.js';
2
+ export declare const cubeVariant: NonNullable<Primitive['variantFor']>;
@@ -18,7 +18,8 @@ export declare const TWEEN_PRIMITIVES: Primitive[];
18
18
  * 0) ...`, not a missing endpoint — so, per D1's correction #5, `animation-fill-mode: both` pins that
19
19
  * exact authored value on the channel forever once the animation finishes; it never resolves against
20
20
  * whatever the cascade underneath would otherwise say. That is precisely the shape `EffectPhase`'s
21
- * own doc calls out as the trap: fifteen of the catalog's fifty-four `cloak: true` entrances close
21
+ * own doc calls out as the trap: fifteen of the catalog's `cloak: true` entrances (ninety-six presets carry the flag in all,
22
+ * counted from the registry) close
22
23
  * their block the same way and are *deliberately* left unphased rather than marked `entrance`,
23
24
  * because `entrance` specifically means "plays once and releases the channel". `tween` is that same
24
25
  * closed shape by construction — every property group's `to` block closes, with no exception — so it
@@ -20,7 +20,7 @@ import type { Channel, ParamSpec, ParameterSchema } from '../../core/types.js';
20
20
  * fallbacks mean for an axis the author did not name.
21
21
  */
22
22
  /** One rendering unit: a single CSS property (or filter list) written by one keyframe block. */
23
- export type TweenGroup = 'translate' | 'rotate' | 'scale' | 'opacity' | 'filter' | 'color' | 'background';
23
+ export type TweenGroup = 'translate' | 'rotate' | 'scale' | 'opacity' | 'filter' | 'color' | 'background' | 'border-radius';
24
24
  /**
25
25
  * Declared in rendering order rather than derived from `TWEEN_PROPERTIES`'s key order, so
26
26
  * `tween opacity:0 x:100` and `tween x:100 opacity:0` compile to the same track order. Two
@@ -0,0 +1,6 @@
1
+ import type { PrepareContext } from '../../core/effect-context.js';
2
+ import type { Cleanup } from '../../core/types.js';
3
+ import type { TweenGroup } from './properties.js';
4
+ export declare function toggleProperty(group: TweenGroup): string;
5
+ /** Clicks write opted-in destinations or release to the current stylesheet; no style reads. */
6
+ export declare function prepareToggle(el: Element, groups: readonly TweenGroup[], ctx: PrepareContext): Cleanup;
@@ -33,7 +33,7 @@ import type { TweenGroup } from './properties.js';
33
33
  * this number. Five states keeps this static vocabulary bounded. Longer choreography needs another keyframe
34
34
  * definition; two effects on the same property cannot bypass this budget by composing.
35
35
  */
36
- export declare const MAX_WAYPOINTS = 5;
36
+ export declare const MAX_WAYPOINTS = 8;
37
37
  /**
38
38
  * One property group's waypoint shape, as read off the attribute.
39
39
  *
@@ -0,0 +1 @@
1
+ export declare const EFFECT_NOTES: Readonly<Record<string, readonly string[]>>;
@@ -1,4 +1,5 @@
1
1
  import type { ParamNotes } from '../core/describe.js';
2
+ import { EFFECT_NOTES } from './effects.js';
2
3
  /**
3
4
  * The plain-words note for every parameter in the bundled catalog, read by `describe()`.
4
5
  *
@@ -11,3 +12,13 @@ import type { ParamNotes } from '../core/describe.js';
11
12
  * resolve a note, and every key here must name a parameter that exists.
12
13
  */
13
14
  export declare const PARAM_NOTES: ParamNotes;
15
+ /**
16
+ * Plain-words notes about whole effects, keyed by preset name, shown on the Notes tab of the
17
+ * "Show code" popover. Prose only documentation pages read, so it lives in this entry beside
18
+ * `PARAM_NOTES` rather than on each preset, for the same reason: inline, it would ship to every
19
+ * visitor of every site using the library.
20
+ *
21
+ * Kept in step with the registry by `test/param-notes.test.ts`: every key must name a registered
22
+ * preset. Not every preset needs an entry; the tab only appears for those that have one.
23
+ */
24
+ export { EFFECT_NOTES };
@@ -5,3 +5,4 @@ import type { ParamNotes } from '../core/describe.js';
5
5
  * step-progress).
6
6
  */
7
7
  export declare const SHOWCASE_NOTES: ParamNotes;
8
+ export declare const ROW_NOTES: ParamNotes;
@@ -0,0 +1,11 @@
1
+ import type { ModalMotion } from './modal-shell.js';
2
+ interface LightboxFlightOptions {
3
+ source: () => HTMLImageElement | null;
4
+ view: HTMLImageElement;
5
+ duration: number;
6
+ easing: string;
7
+ warn(message: string): void;
8
+ }
9
+ /** The shell owns this handle across decode, open, reverse, re-entry and release. */
10
+ export declare function lightboxFlight(dialog: HTMLElement, options: LightboxFlightOptions): ModalMotion;
11
+ export {};
@@ -4,6 +4,7 @@ export interface MediaSource {
4
4
  embedUrl: string;
5
5
  aspect: 'wide' | 'tall';
6
6
  }
7
+ export declare function isYouTubeId(id: string | null | undefined): id is string;
7
8
  /**
8
9
  * Resolve a real link into a supported player source. Unknown hosts and non-web schemes keep
9
10
  * their normal link behavior; no attacker-controlled URL is handed to an iframe.
@@ -1,3 +1,7 @@
1
+ export interface ModalMotion {
2
+ dismiss(): Promise<unknown> | undefined;
3
+ cancel(): void;
4
+ }
1
5
  export interface ModalContent {
2
6
  node: HTMLElement;
3
7
  label: string;
@@ -18,6 +22,7 @@ export interface ModalContent {
18
22
  * pauses its own motion for exactly as long as the viewer shows one of its cards.
19
23
  */
20
24
  opener?: Element;
25
+ motion?: (layer: HTMLElement) => ModalMotion;
21
26
  }
22
27
  export interface ModalShell {
23
28
  open(content: ModalContent): void;
@@ -0,0 +1,3 @@
1
+ import type { Preset } from '../core/types.js';
2
+ export declare const YOUTUBE_PRIMITIVE: import("../index.js").Primitive;
3
+ export declare const YOUTUBE_PRESETS: Preset[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kuinetic",
3
- "version": "0.2.4",
3
+ "version": "0.4.0",
4
4
  "description": "Declarative web animation from HTML attributes. Native CSS where possible, JS only where necessary.",
5
5
  "type": "module",
6
6
  "license": "MIT",