kuinetic 0.2.3 → 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-FYMZW5N2.mjs → chunk-4QKMEDM4.mjs} +6745 -2562
- 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 +284 -5
- package/dist/kuinetic.advanced.js +2 -1
- package/dist/kuinetic.advanced.min.js +1 -1
- package/dist/kuinetic.all.js +5158 -930
- package/dist/kuinetic.all.min.js +2 -2
- package/dist/kuinetic.css +1207 -73
- package/dist/kuinetic.js +5157 -929
- 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/index.d.ts +7 -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 +4 -3
- 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/lightbox.d.ts +2 -1
- package/dist/types/showcase/modal-shell.d.ts +5 -0
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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,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
|
+
/** An opt-in loop; the interactive morph's listeners, timing and geometry remain separate. */
|
|
5
|
+
export declare function prepareMorphLoop(path: Element, params: EffectParams, ctx: PrepareContext): SetupResult;
|
|
@@ -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
|
|
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;
|
|
@@ -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 };
|
|
@@ -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 {};
|
|
@@ -6,7 +6,8 @@ import type { Cleanup, Preset, Primitive } from '../core/types.js';
|
|
|
6
6
|
*
|
|
7
7
|
* Every card of the deck becomes one gallery, opened at the card clicked, through the same
|
|
8
8
|
* `galleryContent` the `lightbox` effect opens — buttons, keys, swipe, `loop`, the media rules and
|
|
9
|
-
* the one shared modal shell, unforked.
|
|
9
|
+
* the one shared modal shell, unforked. Decks have no params of their own here, so they always get
|
|
10
|
+
* the default arrow placement (`bottom-right`).
|
|
10
11
|
*
|
|
11
12
|
* What counts as a click is the deck's to say, and it already says it. The listener is on the host
|
|
12
13
|
* in the *bubble* phase, and a deck's drag consumes the click that ends a drag in the *capture*
|
|
@@ -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;
|