@wardic/core 1.1.0 → 1.1.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/dist/unstable/AnimationControls.d.ts +110 -0
- package/dist/unstable/AnimationControls.d.ts.map +1 -0
- package/dist/unstable/AnimationControls.js +107 -0
- package/dist/unstable/AnimationControls.js.map +1 -0
- package/dist/unstable/AppearHandoff.d.ts +53 -0
- package/dist/unstable/AppearHandoff.d.ts.map +1 -0
- package/dist/unstable/AppearHandoff.js +23 -0
- package/dist/unstable/AppearHandoff.js.map +1 -0
- package/dist/unstable/Config.d.ts +285 -0
- package/dist/unstable/Config.d.ts.map +1 -0
- package/dist/unstable/Config.js +3 -0
- package/dist/unstable/Config.js.map +1 -0
- package/dist/unstable/FlushGate.d.ts +222 -0
- package/dist/unstable/FlushGate.d.ts.map +1 -0
- package/dist/unstable/FlushGate.js +567 -0
- package/dist/unstable/FlushGate.js.map +1 -0
- package/dist/unstable/FrameTime.d.ts +21 -0
- package/dist/unstable/FrameTime.d.ts.map +1 -0
- package/dist/unstable/FrameTime.js +45 -0
- package/dist/unstable/FrameTime.js.map +1 -0
- package/dist/unstable/MeasuredPairs.d.ts +51 -0
- package/dist/unstable/MeasuredPairs.d.ts.map +1 -0
- package/dist/unstable/MeasuredPairs.js +20 -0
- package/dist/unstable/MeasuredPairs.js.map +1 -0
- package/dist/unstable/OwnValues.d.ts +29 -0
- package/dist/unstable/OwnValues.d.ts.map +1 -0
- package/dist/unstable/OwnValues.js +22 -0
- package/dist/unstable/OwnValues.js.map +1 -0
- package/dist/unstable/PresenceRecord.d.ts +176 -0
- package/dist/unstable/PresenceRecord.d.ts.map +1 -0
- package/dist/unstable/PresenceRecord.js +26 -0
- package/dist/unstable/PresenceRecord.js.map +1 -0
- package/dist/unstable/Reactivity.d.ts +29 -0
- package/dist/unstable/Reactivity.d.ts.map +1 -0
- package/dist/unstable/Reactivity.js +15 -0
- package/dist/unstable/Reactivity.js.map +1 -0
- package/dist/unstable/Report.d.ts +30 -0
- package/dist/unstable/Report.d.ts.map +1 -0
- package/dist/unstable/Report.js +66 -0
- package/dist/unstable/Report.js.map +1 -0
- package/dist/unstable/RetargetLegs.d.ts +189 -0
- package/dist/unstable/RetargetLegs.d.ts.map +1 -0
- package/dist/unstable/RetargetLegs.js +834 -0
- package/dist/unstable/RetargetLegs.js.map +1 -0
- package/dist/unstable/Spine.d.ts +696 -0
- package/dist/unstable/Spine.d.ts.map +1 -0
- package/dist/unstable/Spine.js +2617 -0
- package/dist/unstable/Spine.js.map +1 -0
- package/dist/unstable/Stops.d.ts +82 -0
- package/dist/unstable/Stops.d.ts.map +1 -0
- package/dist/unstable/Stops.js +149 -0
- package/dist/unstable/Stops.js.map +1 -0
- package/dist/unstable/Subject.d.ts +11 -0
- package/dist/unstable/Subject.d.ts.map +1 -0
- package/dist/unstable/Subject.js +12 -0
- package/dist/unstable/Subject.js.map +1 -0
- package/dist/unstable/Timelines.d.ts +51 -0
- package/dist/unstable/Timelines.d.ts.map +1 -0
- package/dist/unstable/Timelines.js +10 -0
- package/dist/unstable/Timelines.js.map +1 -0
- package/dist/unstable/VariableValues.d.ts +27 -0
- package/dist/unstable/VariableValues.d.ts.map +1 -0
- package/dist/unstable/VariableValues.js +19 -0
- package/dist/unstable/VariableValues.js.map +1 -0
- package/dist/unstable/VariantTarget.d.ts +106 -0
- package/dist/unstable/VariantTarget.d.ts.map +1 -0
- package/dist/unstable/VariantTarget.js +185 -0
- package/dist/unstable/VariantTarget.js.map +1 -0
- package/dist/unstable/VariantTree.d.ts +351 -0
- package/dist/unstable/VariantTree.d.ts.map +1 -0
- package/dist/unstable/VariantTree.js +362 -0
- package/dist/unstable/VariantTree.js.map +1 -0
- package/dist/unstable/WardicConfigValue.d.ts +89 -0
- package/dist/unstable/WardicConfigValue.d.ts.map +1 -0
- package/dist/unstable/WardicConfigValue.js +106 -0
- package/dist/unstable/WardicConfigValue.js.map +1 -0
- package/dist/unstable/WardicServices.d.ts +46 -0
- package/dist/unstable/WardicServices.d.ts.map +1 -0
- package/dist/unstable/WardicServices.js +72 -0
- package/dist/unstable/WardicServices.js.map +1 -0
- package/package.json +1 -1
- package/src/unstable/AnimationControls.ts +199 -0
- package/src/unstable/AppearHandoff.ts +81 -0
- package/src/unstable/Config.ts +326 -0
- package/src/unstable/FlushGate.ts +730 -0
- package/src/unstable/FrameTime.ts +52 -0
- package/src/unstable/MeasuredPairs.ts +56 -0
- package/src/unstable/OwnValues.ts +32 -0
- package/src/unstable/PresenceRecord.ts +201 -0
- package/src/unstable/Reactivity.ts +35 -0
- package/src/unstable/Report.ts +75 -0
- package/src/unstable/RetargetLegs.ts +1062 -0
- package/src/unstable/Spine.ts +3275 -0
- package/src/unstable/Stops.ts +221 -0
- package/src/unstable/Subject.ts +13 -0
- package/src/unstable/Timelines.ts +58 -0
- package/src/unstable/VariableValues.ts +27 -0
- package/src/unstable/VariantTarget.ts +246 -0
- package/src/unstable/VariantTree.ts +643 -0
- package/src/unstable/WardicConfigValue.ts +154 -0
- package/src/unstable/WardicServices.ts +125 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Animation controls** (#433's PR 3, CONTEXT.md; Motion's `useAnimationControls`), on every binding:
|
|
3
|
+
* one object made outside any component and given as `animate={controls}` to any number of Wardic
|
|
4
|
+
* elements, which follow its calls.
|
|
5
|
+
*
|
|
6
|
+
* - **`start(definition, transitionOverride)`** sets each element's `animate` entry (a **Controls
|
|
7
|
+
* change**), so it Retargets, staggers its Variant children and lands as a change of the prop would.
|
|
8
|
+
* It resolves once each element and the Variant children it hands its names to have landed.
|
|
9
|
+
* - The override is the transition of that change: it beats the definition's own on the element and
|
|
10
|
+
* on each Variant child, and it is their orchestration (stagger, `when`), as Motion's
|
|
11
|
+
* `transitionOverride` is.
|
|
12
|
+
* - Their next Retarget, a gesture's, runs on their own transitions again.
|
|
13
|
+
* - **`set(definition)`** is an **Instant change**: the elements and their Variant children
|
|
14
|
+
* snap there, as Motion's `setValues` sets them.
|
|
15
|
+
* - **`stop()`** ends each element's running legs where they are.
|
|
16
|
+
*
|
|
17
|
+
* A function definition is called once per element, with its `custom`, values and velocities, as
|
|
18
|
+
* Motion's `controls.start((i) => …)`. An element hears the controls from its mount to its unmount.
|
|
19
|
+
*
|
|
20
|
+
* Unstable, for Wardic's own packages: public, with no semver promise.
|
|
21
|
+
*
|
|
22
|
+
* @module
|
|
23
|
+
*/
|
|
24
|
+
import type * as Values from "../Values.ts";
|
|
25
|
+
import * as Config from "./Config.ts";
|
|
26
|
+
export type { WardicAnimationControls, WardicControlsDefinition } from "./Config.ts";
|
|
27
|
+
/**
|
|
28
|
+
* A **Controls change** (#433): what one `start` or `set` set one element's `animate` entry to, the
|
|
29
|
+
* transition it runs on, and the landings it waits for. The element and each Variant child it reaches
|
|
30
|
+
* join it at the Retarget it makes them run, and leave at that one's landing (or the next's).
|
|
31
|
+
*/
|
|
32
|
+
export interface ControlsChange {
|
|
33
|
+
/** Its place among every change: a trigger key part, so a change is a trigger even to the same name. */
|
|
34
|
+
readonly serial: number;
|
|
35
|
+
/** The element's `animate` entry: a target or a name, a resolver already called. */
|
|
36
|
+
readonly definition: Config.WardicVariant | Config.WardicVariantLabels;
|
|
37
|
+
/** The transition of the change (start's override, set's instant one), or none: the element's own. */
|
|
38
|
+
readonly override: Config.WardicTransition | undefined;
|
|
39
|
+
/** Elements in it that haven't landed. */
|
|
40
|
+
pending: number;
|
|
41
|
+
/** Whether every element it reaches has had its chance to join: its binding's flush has run. */
|
|
42
|
+
armed: boolean;
|
|
43
|
+
/** Told once it has landed. */
|
|
44
|
+
readonly landed: () => void;
|
|
45
|
+
}
|
|
46
|
+
/** What a controlled element does at a change, as its binding wires it: its entry set, and the change's landing promised. */
|
|
47
|
+
export interface Controlled {
|
|
48
|
+
readonly change: (definition: Config.WardicControlsDefinition, override: Config.WardicTransition | undefined) => Promise<void>;
|
|
49
|
+
readonly stop: () => void;
|
|
50
|
+
}
|
|
51
|
+
/** `set`'s transition (#433, Motion's `setValues`): none to speak of, and no orchestration. */
|
|
52
|
+
export declare const INSTANT: Config.WardicTransition;
|
|
53
|
+
/**
|
|
54
|
+
* Makes animation controls, which animate elements from code by their variants or targets: give them
|
|
55
|
+
* to each element as `animate={controls}`, on a `w.*` element, in a ward's config or on a
|
|
56
|
+
* `Reorder.Item`, then `start`, `set` or `stop` them. Needs no owner. Motion's `useAnimationControls`.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* const controls = createAnimationControls()
|
|
60
|
+
* <w.ul initial="hidden" animate={controls} variants={list}>…</w.ul>
|
|
61
|
+
* await controls.start("visible")
|
|
62
|
+
* @see https://wardic.dev/reference/solid/animation/create-animation-controls
|
|
63
|
+
*/
|
|
64
|
+
export declare const createAnimationControls: () => Config.WardicAnimationControls;
|
|
65
|
+
/** Whether `u` is **Animation controls** (Motion's `isAnimationControls`). */
|
|
66
|
+
export declare const isAnimationControls: (u: unknown) => u is Config.WardicAnimationControls;
|
|
67
|
+
/** Reach `element` from `controls`, until the returned function: its mount to its unmount. */
|
|
68
|
+
export declare const subscribe: (controls: Config.WardicAnimationControls, element: Controlled) => (() => void);
|
|
69
|
+
/**
|
|
70
|
+
* A change of one element (#433): its entry, `definition` called with the element's `custom`, values
|
|
71
|
+
* and velocities when it's a resolver (once, as Motion's), on `override`; and its landing, promised. It
|
|
72
|
+
* lands once every element it reaches has joined, at the end of the binding's flush (`armed`), and
|
|
73
|
+
* left. One that reaches no element lands then.
|
|
74
|
+
*/
|
|
75
|
+
export declare const changeOf: (definition: Config.WardicControlsDefinition, override: Config.WardicTransition | undefined, custom: unknown, values: Readonly<Record<string, number | string>>, velocities: Readonly<Record<string, number>>) => {
|
|
76
|
+
readonly change: ControlsChange;
|
|
77
|
+
readonly landing: Promise<void>;
|
|
78
|
+
};
|
|
79
|
+
/** An element joins `change`: it runs a Retarget for it. */
|
|
80
|
+
export declare const join: (change: ControlsChange) => void;
|
|
81
|
+
/** An element in `change` landed, or left it (a later change, its unmount): it lands once none is left and it's armed. */
|
|
82
|
+
export declare const leave: (change: ControlsChange) => void;
|
|
83
|
+
/** `change` armed, its binding's flush having run: it lands now if no element joined, or all have left. */
|
|
84
|
+
export declare const arm: (change: ControlsChange) => void;
|
|
85
|
+
/**
|
|
86
|
+
* An element's config with **Animation controls** for its `animate` (#433), as everything but its
|
|
87
|
+
* controls reads it: `change`'s entry (none before the first), and marked controlled, so it names its
|
|
88
|
+
* own variants whatever the entry is (Motion's `isControllingVariants`).
|
|
89
|
+
*/
|
|
90
|
+
export declare const controlledConfigOf: <C extends Pick<Config.SpineConfig, "animate">>(config: C, change: ControlsChange | undefined) => C;
|
|
91
|
+
/** A config as a server reads it (#433): one given **Animation controls** has no entry yet, and is controlled. */
|
|
92
|
+
export declare const uncontrolledOf: <C extends Pick<Config.SpineConfig, "animate">>(config: C) => C;
|
|
93
|
+
/** What a controlled element reads at a change: its `custom`, and its values and velocities now (its Snapshot). */
|
|
94
|
+
export interface ControlledState {
|
|
95
|
+
readonly custom: () => unknown;
|
|
96
|
+
/** Its Snapshot: its values, and its velocities now (#663), a spring leg's being on its Frame. */
|
|
97
|
+
readonly snapshot: ControlledSnapshot;
|
|
98
|
+
}
|
|
99
|
+
/** What Animation controls read of an element's Snapshot: its values, and its velocities now (#663). */
|
|
100
|
+
export interface ControlledSnapshot {
|
|
101
|
+
readonly values: Values.Values;
|
|
102
|
+
velocitiesNow(snapshot: ControlledSnapshot): Readonly<Record<string, number>>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* A mounted element as its controls reach it (#433): a change sets its entry through `setChange`, its
|
|
106
|
+
* binding's signal, and arms once the binding's flush has run (a microtask after, Solid 2's included),
|
|
107
|
+
* every element it reaches joined by then; `stop` ends its legs.
|
|
108
|
+
*/
|
|
109
|
+
export declare const controlledElement: (setChange: (change: ControlsChange) => void, state: ControlledState, stop: () => void) => Controlled;
|
|
110
|
+
//# sourceMappingURL=Anim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B;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAA;IAC9B,aAAa,CAAC,QAAQ,EAAE,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAC9E;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,cAAe,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,SAAS,eAAe,QAAQ,MAAM,IAAI,KAAG,UAQxH,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import * as Arr from "effect/Array";
|
|
2
|
+
import * as Bool from "effect/Boolean";
|
|
3
|
+
import * as Predicate from "effect/Predicate";
|
|
4
|
+
import * as UndefinedOr from "effect/UndefinedOr";
|
|
5
|
+
import * as Config from "./Config.js";
|
|
6
|
+
/** The elements each controls reach, by the controls. */
|
|
7
|
+
// Module state (#460, Q7): each controls object's subscribers, held weakly by it.
|
|
8
|
+
const subscribers = new WeakMap();
|
|
9
|
+
/** `set`'s transition (#433, Motion's `setValues`): none to speak of, and no orchestration. */
|
|
10
|
+
export const INSTANT = { type: "tween", duration: 0 };
|
|
11
|
+
/**
|
|
12
|
+
* Makes animation controls, which animate elements from code by their variants or targets: give them
|
|
13
|
+
* to each element as `animate={controls}`, on a `w.*` element, in a ward's config or on a
|
|
14
|
+
* `Reorder.Item`, then `start`, `set` or `stop` them. Needs no owner. Motion's `useAnimationControls`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const controls = createAnimationControls()
|
|
18
|
+
* <w.ul initial="hidden" animate={controls} variants={list}>…</w.ul>
|
|
19
|
+
* await controls.start("visible")
|
|
20
|
+
* @see https://wardic.dev/reference/solid/animation/create-animation-controls
|
|
21
|
+
*/
|
|
22
|
+
// #433's PR 3: each `start` or `set` is a Controls change of each element's `animate` entry.
|
|
23
|
+
export const createAnimationControls = () => {
|
|
24
|
+
const reached = new Set();
|
|
25
|
+
const controls = {
|
|
26
|
+
[Config.CONTROLS]: true,
|
|
27
|
+
start: (definition, transitionOverride) => Promise.all(Arr.map(Arr.fromIterable(reached), (element) => element.change(definition, transitionOverride))).then(() => undefined),
|
|
28
|
+
set: (definition) => reached.forEach((element) => {
|
|
29
|
+
void element.change(definition, INSTANT);
|
|
30
|
+
}),
|
|
31
|
+
stop: () => reached.forEach((element) => element.stop()),
|
|
32
|
+
};
|
|
33
|
+
subscribers.set(controls, reached);
|
|
34
|
+
return controls;
|
|
35
|
+
};
|
|
36
|
+
/** Whether `u` is **Animation controls** (Motion's `isAnimationControls`). */
|
|
37
|
+
export const isAnimationControls = (u) => Predicate.hasProperty(u, Config.CONTROLS);
|
|
38
|
+
/** Reach `element` from `controls`, until the returned function: its mount to its unmount. */
|
|
39
|
+
export const subscribe = (controls, element) => {
|
|
40
|
+
const reached = subscribers.get(controls);
|
|
41
|
+
if (Predicate.isUndefined(reached))
|
|
42
|
+
return () => undefined;
|
|
43
|
+
reached.add(element);
|
|
44
|
+
return () => {
|
|
45
|
+
reached.delete(element);
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/** The changes made, counted. */
|
|
49
|
+
// Module state (#460, Q7): an id counter, only compared for order and identity.
|
|
50
|
+
let serials = 0;
|
|
51
|
+
/**
|
|
52
|
+
* A change of one element (#433): its entry, `definition` called with the element's `custom`, values
|
|
53
|
+
* and velocities when it's a resolver (once, as Motion's), on `override`; and its landing, promised. It
|
|
54
|
+
* lands once every element it reaches has joined, at the end of the binding's flush (`armed`), and
|
|
55
|
+
* left. One that reaches no element lands then.
|
|
56
|
+
*/
|
|
57
|
+
export const changeOf = (definition, override, custom, values, velocities) => {
|
|
58
|
+
let resolve;
|
|
59
|
+
const landing = new Promise((done) => {
|
|
60
|
+
resolve = done;
|
|
61
|
+
});
|
|
62
|
+
const entry = Bool.match(Predicate.isFunction(definition), {
|
|
63
|
+
onTrue: () => definition(custom, { ...values }, { ...velocities }),
|
|
64
|
+
onFalse: () => definition,
|
|
65
|
+
});
|
|
66
|
+
const change = { serial: ++serials, definition: entry, override, pending: 0, armed: false, landed: resolve };
|
|
67
|
+
return { change, landing };
|
|
68
|
+
};
|
|
69
|
+
/** An element joins `change`: it runs a Retarget for it. */
|
|
70
|
+
export const join = (change) => {
|
|
71
|
+
change.pending++;
|
|
72
|
+
};
|
|
73
|
+
/** An element in `change` landed, or left it (a later change, its unmount): it lands once none is left and it's armed. */
|
|
74
|
+
export const leave = (change) => {
|
|
75
|
+
change.pending--;
|
|
76
|
+
if (change.armed && change.pending <= 0)
|
|
77
|
+
change.landed();
|
|
78
|
+
};
|
|
79
|
+
/** `change` armed, its binding's flush having run: it lands now if no element joined, or all have left. */
|
|
80
|
+
export const arm = (change) => {
|
|
81
|
+
change.armed = true;
|
|
82
|
+
if (change.pending <= 0)
|
|
83
|
+
change.landed();
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* An element's config with **Animation controls** for its `animate` (#433), as everything but its
|
|
87
|
+
* controls reads it: `change`'s entry (none before the first), and marked controlled, so it names its
|
|
88
|
+
* own variants whatever the entry is (Motion's `isControllingVariants`).
|
|
89
|
+
*/
|
|
90
|
+
export const controlledConfigOf = (config, change) => ({ ...config, animate: UndefinedOr.map(change, (c) => c.definition), controlled: true });
|
|
91
|
+
/** A config as a server reads it (#433): one given **Animation controls** has no entry yet, and is controlled. */
|
|
92
|
+
export const uncontrolledOf = (config) => Bool.match(isAnimationControls(config.animate), { onTrue: () => controlledConfigOf(config, undefined), onFalse: () => config });
|
|
93
|
+
/**
|
|
94
|
+
* A mounted element as its controls reach it (#433): a change sets its entry through `setChange`, its
|
|
95
|
+
* binding's signal, and arms once the binding's flush has run (a microtask after, Solid 2's included),
|
|
96
|
+
* every element it reaches joined by then; `stop` ends its legs.
|
|
97
|
+
*/
|
|
98
|
+
export const controlledElement = (setChange, state, stop) => ({
|
|
99
|
+
change: (definition, override) => {
|
|
100
|
+
const made = changeOf(definition, override, state.custom(), state.snapshot.values, state.snapshot.velocitiesNow(state.snapshot));
|
|
101
|
+
setChange(made.change);
|
|
102
|
+
queueMicrotask(() => arm(made.change));
|
|
103
|
+
return made.landing;
|
|
104
|
+
},
|
|
105
|
+
stop,
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=AnimationControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimationControls.js","sourceRoot":"","sources":["../../src/unstable/AnimationControls.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAA;AACjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAmCrC,yDAAyD;AACzD,kFAAkF;AAClF,MAAM,WAAW,GAAG,IAAI,OAAO,EAAmD,CAAA;AAElF,+FAA+F;AAC/F,MAAM,CAAC,MAAM,OAAO,GAA4B,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAA;AAE9E;;;;;;;;;;GAUG;AACH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAmC,EAAE;IAC1E,MAAM,OAAO,GAAG,IAAI,GAAG,EAAc,CAAA;IACrC,MAAM,QAAQ,GAAmC;QAC/C,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI;QACvB,KAAK,EAAE,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CACxC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;QACpI,GAAG,EAAE,CAAC,UAAU,E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EAAK,EAAE,CACpI,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAM,CAAA;AAE/F,kHAAkH;AAClH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAgD,MAAS,EAAK,EAAE,CAC5F,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;AAgBjI;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,SAA2C,EAAE,KAAsB,EAAE,IAAgB,EAAc,EAAE,CAAC,CAAC;IACvI,MAAM,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,EAAE;QAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;QAChI,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACtB,cAAc,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;QACtC,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IACD,IAAI;CACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type * as Values from "../Values.ts";
|
|
2
|
+
import type * as Config from "./Config.ts";
|
|
3
|
+
import * as RetargetLegs from "./RetargetLegs.ts";
|
|
4
|
+
/** An element's mount animation, described the same on the server and the client. */
|
|
5
|
+
export interface MountAnimation {
|
|
6
|
+
/** The element's tag, by which its Environment routes some keys; `undefined` for an element whose tag isn't known. */
|
|
7
|
+
readonly tag: string | undefined;
|
|
8
|
+
/** Each animated key's start. */
|
|
9
|
+
readonly from: Values.Values;
|
|
10
|
+
/** Each animated key's target. */
|
|
11
|
+
readonly to: Values.Values;
|
|
12
|
+
/** The element's own transition: its stagger isn't in it (ADR-0007). */
|
|
13
|
+
readonly transition: Config.WardicTransition | undefined;
|
|
14
|
+
/** Whether reduced motion is on for it (ADR-0029). */
|
|
15
|
+
readonly reduced: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether it's a layout node (#245): drawn through its projection at rest, as the client draws
|
|
18
|
+
* it, its own translate on top (#363). Part of its key.
|
|
19
|
+
*/
|
|
20
|
+
readonly layout: boolean;
|
|
21
|
+
/** Each key's Keyframes of more than two stops (#429), `from` at their first: part of its key. Left out with none. */
|
|
22
|
+
readonly stops?: RetargetLegs.StopsByKey | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Whether it's a **Skipped animation** (#468): every key lands on its first frame, so its Appear
|
|
25
|
+
* animation takes 0 s, holding its end from first paint. Part of its key; left out when it isn't.
|
|
26
|
+
*/
|
|
27
|
+
readonly skipped?: boolean | undefined;
|
|
28
|
+
/** Its **Transform template** (#443): its stops drawn through it, as the client draws them. Left out with none. */
|
|
29
|
+
readonly template?: Config.SpineConfig["transformTemplate"];
|
|
30
|
+
}
|
|
31
|
+
/** Whether a transition repeats for ever: a tween's `repeat: Infinity`, a tween as it runs (ADR-0051). */
|
|
32
|
+
export declare const repeatsForever: (transition: Config.WardicTransition | undefined) => boolean;
|
|
33
|
+
/** A transition's own delay, 0 without one. */
|
|
34
|
+
export declare const ownDelayOf: (transition: Config.WardicTransition | undefined) => number;
|
|
35
|
+
/** A mount animation's `skipped` (#468): left out when it isn't, so its key is as before. */
|
|
36
|
+
export declare const skippedField: (skipped: boolean) => {
|
|
37
|
+
readonly skipped?: true;
|
|
38
|
+
};
|
|
39
|
+
/** An element's Appear animation, found at mount: the spine starts its first legs as far in as it has got. */
|
|
40
|
+
export interface Handoff {
|
|
41
|
+
/** How far its animation has run, in seconds (its delay included). */
|
|
42
|
+
readonly elapsed: () => number;
|
|
43
|
+
/** The delay its animation was given, in seconds. */
|
|
44
|
+
readonly delay: () => number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* How far into its own run the client's first legs start, in seconds, read at their first tick:
|
|
48
|
+
* where the Appear animation has got, less what it waited that the client waits for itself. It
|
|
49
|
+
* waited its delay and its own hold; the client's legs hold their transition's delay (`clientDelay`,
|
|
50
|
+
* the stagger in it). The difference is a `when` wait, which the client has already waited.
|
|
51
|
+
*/
|
|
52
|
+
export declare const startAtOf: (handoff: Handoff, ownTransition: Config.WardicTransition | undefined, clientDelay: number) => () => number;
|
|
53
|
+
//# sourceMappingURL=AppearHandoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearHandoff.d.ts","sourceRoot":"","sources":["../../src/unstable/AppearHandoff.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AAG3C,OAAO,KAAK,KAAK,MAAM,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AAEjD,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,sHAAsH;IACtH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,iCAAiC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAA;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAA;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,GAAG,SAAS,CAAA;IACxD,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,sHAAsH;IACtH,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,UAAU,GAAG,SAAS,CAAA;IACpD;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACtC,mHAAmH;IACnH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAA;CAC5D;AAED,0GAA0G;AAC1G,eAAO,MAAM,cAAc,eAAgB,MAAM,CAAC,gBAAgB,GAAG,SAAS,KAAG,OACyH,CAAA;AAE1M,+CAA+C;AAC/C,eAAO,MAAM,UAAU,eAAgB,MAAM,CAAC,gBAAgB,GAAG,SAAS,KAAG,MACiB,CAAA;AAU9F,6FAA6F;AAC7F,eAAO,MAAM,YAAY,YAAa,OAAO,KAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAA;CAA8F,CAAA;AAEvK,8GAA8G;AAC9G,MAAM,WAAW,OAAO;IACtB,sEAAsE;IACtE,QAAQ,CAAC,OAAO,EAAE,MAAM,MAAM,CAAA;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,CAAA;CAC7B;AAED;;;;;GAKG;AACH,eAAO,MAAM,SAAS,YAAa,OAAO,iBAAiB,MAAM,CAAC,gBAAgB,GAAG,SAAS,eAAe,MAAM,WAAS,MAC3C,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Bool from "effect/Boolean";
|
|
2
|
+
import * as UndefinedOr from "effect/UndefinedOr";
|
|
3
|
+
import * as RetargetLegs from "./RetargetLegs.js";
|
|
4
|
+
/** Whether a transition repeats for ever: a tween's `repeat: Infinity`, a tween as it runs (ADR-0051). */
|
|
5
|
+
export const repeatsForever = (transition) => UndefinedOr.match(RetargetLegs.runOf(transition), { onUndefined: () => false, onDefined: (run) => Bool.and(run.type === "tween", run.repeat === Number.POSITIVE_INFINITY) });
|
|
6
|
+
/** A transition's own delay, 0 without one. */
|
|
7
|
+
export const ownDelayOf = (transition) => UndefinedOr.match(transition, { onUndefined: () => 0, onDefined: ({ delay = 0 }) => delay });
|
|
8
|
+
/**
|
|
9
|
+
* The seconds an Appear animation holds before it moves, of the delay the client counts: a
|
|
10
|
+
* transition's own delay is in the animation, except a forever-repeating one's, which is sampled as
|
|
11
|
+
* one cycle, its own delay given with the stagger.
|
|
12
|
+
*/
|
|
13
|
+
const heldInAppear = (transition) => Bool.match(repeatsForever(transition), { onTrue: () => 0, onFalse: () => ownDelayOf(transition) });
|
|
14
|
+
/** A mount animation's `skipped` (#468): left out when it isn't, so its key is as before. */
|
|
15
|
+
export const skippedField = (skipped) => Bool.match(skipped, { onTrue: () => ({ skipped: true }), onFalse: () => ({}) });
|
|
16
|
+
/**
|
|
17
|
+
* How far into its own run the client's first legs start, in seconds, read at their first tick:
|
|
18
|
+
* where the Appear animation has got, less what it waited that the client waits for itself. It
|
|
19
|
+
* waited its delay and its own hold; the client's legs hold their transition's delay (`clientDelay`,
|
|
20
|
+
* the stagger in it). The difference is a `when` wait, which the client has already waited.
|
|
21
|
+
*/
|
|
22
|
+
export const startAtOf = (handoff, ownTransition, clientDelay) => () => handoff.elapsed() - handoff.delay() - heldInAppear(ownTransition) + clientDelay;
|
|
23
|
+
//# sourceMappingURL=AppearHandoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppearHandoff.js","sourceRoot":"","sources":["../../src/unstable/AppearHandoff.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAA;AAEjD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAA;AA8BjD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAA+C,EAAW,EAAE,CACzF,WAAW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AK,EAAE,GAAG,YAAY,CAAC,aAAa,CAAC,GAAG,WAAW,CAAA"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The config types a binding's elements and the spine share, each built on {@link ValueKeys}: the keys
|
|
3
|
+
* an Environment animates and the values each takes. Empty here, `ValueKeys` is filled by the
|
|
4
|
+
* Environment's binding types (`@wardic/dom/unstable/WardConfig` fills it), so each type keeps its
|
|
5
|
+
* name and its shape whatever fills it.
|
|
6
|
+
*
|
|
7
|
+
* Unstable, for Wardic's own packages: public, with no semver promise.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import type * as Arc from "../Arc.ts";
|
|
12
|
+
import type * as Machine from "../Machine.ts";
|
|
13
|
+
import type * as Stagger from "../Stagger.ts";
|
|
14
|
+
/**
|
|
15
|
+
* The keys an Environment animates, each with the values it takes: empty in core. An Environment's
|
|
16
|
+
* binding types fill it by declaration merging.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* declare module "@wardic/core/unstable/Config" {
|
|
20
|
+
* interface ValueKeys extends MyValues {}
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
export interface ValueKeys {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A **Keyframes** value (Motion's): the stops a key passes through in order, as
|
|
27
|
+
* `animate={{ scale: [1, 1.2, 1] }}`. A first `null` is where the key is now; a later one repeats the
|
|
28
|
+
* stop before it. An explicit first stop is jumped to as its animation starts. More than two stops run
|
|
29
|
+
* on a tween (Motion's 0.8 s one with no transition defined; `times` places them, `ease` may be one per
|
|
30
|
+
* Interval, between two stops): a spring takes two.
|
|
31
|
+
*/
|
|
32
|
+
export type WardicKeyframes<V> = ReadonlyArray<V | null>;
|
|
33
|
+
/**
|
|
34
|
+
* A target's values: each of {@link ValueKeys}' keys with a value or its {@link WardicKeyframes}. Every
|
|
35
|
+
* target takes them; a start reads one at its first stop, and a Transition end takes one value per key.
|
|
36
|
+
*/
|
|
37
|
+
export type WardicTargetValues = {
|
|
38
|
+
readonly [K in keyof ValueKeys]?: K extends "transition" ? ValueKeys[K] : ValueKeys[K] | WardicKeyframes<Exclude<ValueKeys[K], undefined>>;
|
|
39
|
+
};
|
|
40
|
+
/** A stagger: a child's delay in seconds, from its index and the count. `stagger()` makes one. Motion's `DynamicOption<number>`. */
|
|
41
|
+
export type WardicStagger = (index: number, total: number) => number;
|
|
42
|
+
/**
|
|
43
|
+
* A path for `x` and `y` to travel along together: from where they start to where they end, the point
|
|
44
|
+
* at each progress, 0 to 1, with a turn (`rotate`, in degrees) for one that turns the element. `arc()`
|
|
45
|
+
* makes one; any function of this shape is one, a curve of your own.
|
|
46
|
+
*/
|
|
47
|
+
export type WardicPath = Arc.Path;
|
|
48
|
+
/**
|
|
49
|
+
* How a parent's variant children are timed against it and each other: `when`, `delayChildren`,
|
|
50
|
+
* `staggerChildren`, `staggerDirection` and `from`. Read on the parent's transition, for the variant
|
|
51
|
+
* change it hands its children.
|
|
52
|
+
*/
|
|
53
|
+
export interface WardicOrchestration {
|
|
54
|
+
/** Seconds between one child's start and the next's. */
|
|
55
|
+
readonly staggerChildren?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Fixed delay added to every child before its staggered offset; or, as Motion's, a function of a
|
|
58
|
+
* child's index and the count, `stagger()`'s, which decides each child's whole delay:
|
|
59
|
+
* `staggerChildren`, `staggerDirection` and `from` aren't read beside it.
|
|
60
|
+
*/
|
|
61
|
+
readonly delayChildren?: number | WardicStagger;
|
|
62
|
+
/** `-1` reverses the stagger order, the last child first. Default `1`. */
|
|
63
|
+
readonly staggerDirection?: 1 | -1;
|
|
64
|
+
/** The child the stagger grows from: `"first"` (the default), `"last"`, `"center"` or an index. */
|
|
65
|
+
readonly from?: Stagger.Origin;
|
|
66
|
+
/**
|
|
67
|
+
* Orders the parent and its children: `"beforeChildren"` animates the parent, then the children once
|
|
68
|
+
* it lands; `"afterChildren"` the children, then the parent once they've all landed. Left out, they
|
|
69
|
+
* animate together.
|
|
70
|
+
*/
|
|
71
|
+
readonly when?: "beforeChildren" | "afterChildren";
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A transition's reduced-motion opt-out, on both arms. An animation honours the
|
|
75
|
+
* provider's `reducedMotion` by default: under it, its positional keys snap and a layout
|
|
76
|
+
* animation lands at once.
|
|
77
|
+
*/
|
|
78
|
+
export interface WardicReducedMotion {
|
|
79
|
+
/** `false` animates the transition's keys whatever the provider's `reducedMotion` says. Default `true`. */
|
|
80
|
+
readonly respectReducedMotion?: boolean;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A transition of `type: "inertia"`: each number glides from where it is at its velocity, its own or
|
|
84
|
+
* `velocity`, and comes to rest `power × velocity` on, through `modifyTarget`, springing back to `min`
|
|
85
|
+
* or `max` past one. Its target isn't read, so with no velocity it stays where it is. A value that
|
|
86
|
+
* isn't a number, a colour or a length with units, runs on its default transition instead.
|
|
87
|
+
* `timeConstant` is in milliseconds, as Motion's. Motion's `inertia`.
|
|
88
|
+
*/
|
|
89
|
+
export interface WardicInertia {
|
|
90
|
+
readonly type: "inertia";
|
|
91
|
+
/** The velocity every key glides from, per second: each key's own when left out. */
|
|
92
|
+
readonly velocity?: number;
|
|
93
|
+
/** How far a glide carries, as a multiple of its velocity. Default 0.8. */
|
|
94
|
+
readonly power?: number;
|
|
95
|
+
/** The glide's time constant, in milliseconds. Default 325. */
|
|
96
|
+
readonly timeConstant?: number;
|
|
97
|
+
/** The bounce back from an edge: its stiffness and damping. Defaults 500 and 10. */
|
|
98
|
+
readonly bounceStiffness?: number;
|
|
99
|
+
readonly bounceDamping?: number;
|
|
100
|
+
/** At rest within this of where it's going. Default 0.5. */
|
|
101
|
+
readonly restDelta?: number;
|
|
102
|
+
/** A bounce at rest below this speed, per second. Default 2. */
|
|
103
|
+
readonly restSpeed?: number;
|
|
104
|
+
/** Moves where a glide rests, called with where it would: snapping it to a grid, say. */
|
|
105
|
+
readonly modifyTarget?: (ideal: number) => number;
|
|
106
|
+
/** The edges: past one, the glide springs back to it. */
|
|
107
|
+
readonly min?: number;
|
|
108
|
+
readonly max?: number;
|
|
109
|
+
/** Seconds each key holds where it is before it glides. */
|
|
110
|
+
readonly delay?: number;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* A transition's **Skipped animation** (Motion's `skipAnimations`), on both arms: `true` lands its
|
|
114
|
+
* keys at their ends on the next frame, with no delay, as a `WardicConfig`'s `skipAnimations` does.
|
|
115
|
+
* `false` doesn't undo a config's.
|
|
116
|
+
*/
|
|
117
|
+
export interface WardicSkipAnimations {
|
|
118
|
+
readonly skipAnimations?: boolean;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A transition's **Path** (#438, Motion's `path`): `x` and `y` travel along it together, rather than
|
|
122
|
+
* each on its own, on `x`'s transition, from rest. `arc()` makes one; any {@link WardicPath} is one.
|
|
123
|
+
* An axis the target leaves out ends where it rests (#574): where a Path in flight was taking it, so
|
|
124
|
+
* one caught mid-air curves back to its line, else where it is.
|
|
125
|
+
* A layout animation reads it where Motion's does, on its layout transition: the `layout` entry when
|
|
126
|
+
* there is one, else the element's transition. On any other value's entry it isn't read.
|
|
127
|
+
*/
|
|
128
|
+
export interface WardicTransitionPath {
|
|
129
|
+
readonly path?: WardicPath;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* How an element gets to its target: a spring, a tween, or an inertia, with a value's own transition
|
|
133
|
+
* under its name. With no `type`, a spring field (`stiffness`, `damping`, `mass`, `velocity`,
|
|
134
|
+
* `restDelta`, `restSpeed`, `bounce`, `visualDuration`) makes it a spring, and anything else a tween, so
|
|
135
|
+
* `{ duration: 0.5 }` is a 0.5 s tween. A spring's missing fields are Motion's 100 / 10 / 1, or set by
|
|
136
|
+
* time, a `duration` or `visualDuration` with a `bounce`; a tween's easing is `easeOut`. With neither,
|
|
137
|
+
* each value runs on its default. It also takes `delay`, a tween's repeats, a `path`, its variant
|
|
138
|
+
* children's orchestration, `respectReducedMotion` and `skipAnimations`.
|
|
139
|
+
*/
|
|
140
|
+
export type WardicTransition = WardicTransitionWith<WardicTransitionEntries>;
|
|
141
|
+
/**
|
|
142
|
+
* A transition with the entries `E` (#301): {@link WardicTransition}'s two arms. A Wardic element's
|
|
143
|
+
* config checks each transition in it against the entries its keys allow (`WardChecked`).
|
|
144
|
+
*/
|
|
145
|
+
export type WardicTransitionWith<E> = ({
|
|
146
|
+
readonly type?: "spring";
|
|
147
|
+
} & Omit<Machine.SpringOptions, "from"> & WardicOrchestration & WardicReducedMotion & WardicSkipAnimations & WardicTransitionPath & E) | ({
|
|
148
|
+
readonly type?: "tween";
|
|
149
|
+
} & Machine.KeyframesOptions & WardicOrchestration & WardicReducedMotion & WardicSkipAnimations & WardicTransitionPath & E) | (WardicInertia & WardicOrchestration & WardicReducedMotion & WardicSkipAnimations & WardicTransitionPath & E);
|
|
150
|
+
/**
|
|
151
|
+
* One value's own transition, under its name in a `transition`: a spring, a tween or an inertia, without
|
|
152
|
+
* the orchestration, which is the whole transition's. With `inherit: true` it's laid over the
|
|
153
|
+
* transition's own fields, its own winning; without, it stands alone, taking only the transition's
|
|
154
|
+
* `respectReducedMotion` and `skipAnimations`. Motion's `ValueTransition`.
|
|
155
|
+
*/
|
|
156
|
+
export type WardicValueTransition = ({
|
|
157
|
+
readonly type?: "spring";
|
|
158
|
+
} & Omit<Machine.SpringOptions, "from"> & WardicReducedMotion & WardicSkipAnimations & WardicTransitionPath & WardicInherit) | ({
|
|
159
|
+
readonly type?: "tween";
|
|
160
|
+
} & Machine.KeyframesOptions & WardicReducedMotion & WardicSkipAnimations & WardicTransitionPath & WardicInherit) | (WardicInertia & WardicReducedMotion & WardicSkipAnimations & WardicTransitionPath & WardicInherit);
|
|
161
|
+
/** `inherit: true` lays a transition over the one it would replace, its own fields winning, as Motion's. */
|
|
162
|
+
export interface WardicInherit {
|
|
163
|
+
readonly inherit?: boolean;
|
|
164
|
+
}
|
|
165
|
+
/** The name of a value a transition can have an entry for: any of {@link ValueKeys}' keys. */
|
|
166
|
+
export type WardicValueKey = Exclude<keyof ValueKeys & string, "transition">;
|
|
167
|
+
/**
|
|
168
|
+
* A transition's per-value entries: a value's own transition under its name, `default` for every value
|
|
169
|
+
* without one, and `layout` for the element's layout animations. A value runs on its entry, else
|
|
170
|
+
* `default`, else the transition's own fields. Motion's `TransitionWithValueOverrides`.
|
|
171
|
+
*/
|
|
172
|
+
export type WardicTransitionEntries = WardicValueEntries<WardicValueKey> & {
|
|
173
|
+
readonly layout?: WardicValueTransition;
|
|
174
|
+
};
|
|
175
|
+
/** Entries for the values `K`, and `default` for the rest (#301). */
|
|
176
|
+
export type WardicValueEntries<K extends string> = {
|
|
177
|
+
readonly default?: WardicValueTransition;
|
|
178
|
+
} & {
|
|
179
|
+
readonly [P in K]?: WardicValueTransition;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* A variant's own transition, or a target's: it runs the animation that variant starts, in place of
|
|
183
|
+
* the element's `transition`, unless `inherit: true` lays it over the element's, its own fields winning.
|
|
184
|
+
* Motion's.
|
|
185
|
+
*/
|
|
186
|
+
export type WardicVariantTransition = WardicTransition & WardicInherit;
|
|
187
|
+
/**
|
|
188
|
+
* A target's **Transition end** (Motion's `transitionEnd`): values set at once, with no
|
|
189
|
+
* animation, once the keys the target animates have landed. Its keys are the target's, so they return to their base when it's no longer active;
|
|
190
|
+
* a target interrupted before it lands never sets them; the target an element renders first sets its
|
|
191
|
+
* own at once, on a server too.
|
|
192
|
+
*/
|
|
193
|
+
export type WardicTransitionEnd = Omit<ValueKeys, "transition">;
|
|
194
|
+
/**
|
|
195
|
+
* A target, as a variant, `animate` or `exit` gives it (Motion's `TargetAndTransition`): its
|
|
196
|
+
* values, each a value or its Keyframes ({@link WardicTargetValues}), optionally the transition
|
|
197
|
+
* the animation to it runs on, as an object, and its Transition end ({@link WardicTransitionEnd}).
|
|
198
|
+
* A plain map of {@link ValueKeys}' values fits too, its own `transition` key a value as any other.
|
|
199
|
+
*/
|
|
200
|
+
export type WardicVariant = (WardicTargetValues & {
|
|
201
|
+
readonly transitionEnd?: WardicTransitionEnd;
|
|
202
|
+
}) | (Omit<WardicTargetValues, "transition"> & {
|
|
203
|
+
readonly transition?: WardicVariantTransition;
|
|
204
|
+
readonly transitionEnd?: WardicTransitionEnd;
|
|
205
|
+
});
|
|
206
|
+
/**
|
|
207
|
+
* Variant names (Motion's `VariantLabels`): one name, or a list of them. A list merges its
|
|
208
|
+
* names' values in order, a later name's winning a key both set. Each key animates on the own
|
|
209
|
+
* transition of the last name that sets it, and each name orchestrates the keys it sets in the
|
|
210
|
+
* element's Variant children. An empty list is no name.
|
|
211
|
+
*/
|
|
212
|
+
export type WardicVariantLabels = string | ReadonlyArray<string>;
|
|
213
|
+
/**
|
|
214
|
+
* A dynamic variant (Motion's `TargetResolver`): called each time the variant is
|
|
215
|
+
* resolved with the element's `custom` (or, for an exit, its `<AnimatePresence custom>`), its values
|
|
216
|
+
* now and their velocities, and returns its target, or another variant's name.
|
|
217
|
+
*/
|
|
218
|
+
export type WardicVariantResolver = (custom: any, current: Readonly<Record<string, number | string>>, velocity: Readonly<Record<string, number>>) => WardicVariant | string;
|
|
219
|
+
/** Named targets, each a target or a {@link WardicVariantResolver}. */
|
|
220
|
+
export type WardicVariants = Readonly<Record<string, WardicVariant | WardicVariantResolver>>;
|
|
221
|
+
/** What controls start or set an element to: a target, a variant name or a list of them, or a function of each element's `custom`. Motion's `AnimationDefinition`. */
|
|
222
|
+
export type WardicControlsDefinition = WardicVariant | WardicVariantLabels | WardicVariantResolver;
|
|
223
|
+
/** The mark that tells controls from a target. */
|
|
224
|
+
export declare const CONTROLS: unique symbol;
|
|
225
|
+
/**
|
|
226
|
+
* `createAnimationControls()`'s controls: give them as `animate={controls}`, and every element given
|
|
227
|
+
* them follows `start`, `set` and `stop`. Motion's `LegacyAnimationControls`.
|
|
228
|
+
*/
|
|
229
|
+
export interface WardicAnimationControls {
|
|
230
|
+
readonly [CONTROLS]: true;
|
|
231
|
+
/**
|
|
232
|
+
* Animates every element given these controls to `definition`, as a change of its `animate` would,
|
|
233
|
+
* its variant children following. `transitionOverride`, when given, is the transition of this change,
|
|
234
|
+
* over the definition's own, and its stagger. Resolves once each element and its children have landed.
|
|
235
|
+
*/
|
|
236
|
+
readonly start: (definition: WardicControlsDefinition, transitionOverride?: WardicTransition) => Promise<void>;
|
|
237
|
+
/** Sets every element given these controls, and its variant children, at `definition` at once. */
|
|
238
|
+
readonly set: (definition: WardicControlsDefinition) => void;
|
|
239
|
+
/** Ends every element's running animation where it is. */
|
|
240
|
+
readonly stop: () => void;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Motion's `definition` of an animation: a variant name, or its target values. A list of names
|
|
244
|
+
* on Solid 2's landing, where `animate` gave one; Solid 1's callbacks are told each name.
|
|
245
|
+
*/
|
|
246
|
+
export type WardicAnimationDefinition = WardicVariantLabels | ValueKeys;
|
|
247
|
+
/**
|
|
248
|
+
* A point mapping (Motion's `TransformPoint`): handed a point in the Environment's coordinates, it
|
|
249
|
+
* gives the one a drag or a pan uses.
|
|
250
|
+
*/
|
|
251
|
+
export type WardicTransformPoint = (point: {
|
|
252
|
+
readonly x: number;
|
|
253
|
+
readonly y: number;
|
|
254
|
+
}) => {
|
|
255
|
+
readonly x: number;
|
|
256
|
+
readonly y: number;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* What the spine reads of an element's config: its start, its targets, variants and transitions, each
|
|
260
|
+
* gesture's target, its layout, and the callbacks it tells. Every binding's config extends it, with
|
|
261
|
+
* its Environment's own props beside.
|
|
262
|
+
*/
|
|
263
|
+
export interface SpineConfig {
|
|
264
|
+
readonly initial?: WardicVariant | WardicVariantLabels | false;
|
|
265
|
+
readonly animate?: WardicVariant | WardicVariantLabels | WardicAnimationControls;
|
|
266
|
+
readonly exit?: WardicVariant | WardicVariantLabels;
|
|
267
|
+
readonly variants?: WardicVariants;
|
|
268
|
+
readonly transition?: WardicTransition;
|
|
269
|
+
readonly inherit?: boolean;
|
|
270
|
+
readonly custom?: any;
|
|
271
|
+
readonly key?: string | number;
|
|
272
|
+
readonly whileHover?: WardicVariant | WardicVariantLabels;
|
|
273
|
+
readonly whileTap?: WardicVariant | WardicVariantLabels;
|
|
274
|
+
readonly whileFocus?: WardicVariant | WardicVariantLabels;
|
|
275
|
+
readonly whileInView?: WardicVariant | WardicVariantLabels;
|
|
276
|
+
readonly whileDrag?: WardicVariant | WardicVariantLabels;
|
|
277
|
+
readonly layout?: boolean | "position" | "size" | "preserve-aspect" | "x" | "y";
|
|
278
|
+
readonly layoutId?: string;
|
|
279
|
+
readonly appear?: boolean;
|
|
280
|
+
readonly transformTemplate?: (values: Readonly<Record<string, string | number>>, generated: string) => string;
|
|
281
|
+
readonly onUpdate?: (latest: Readonly<Record<string, number | string>>) => void;
|
|
282
|
+
readonly onAnimationStart?: (definition: WardicAnimationDefinition) => void;
|
|
283
|
+
readonly onAnimationComplete?: (definition: WardicAnimationDefinition) => void;
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/unstable/Config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,KAAK,GAAG,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,KAAK,OAAO,MAAM,eAAe,CAAA;AAE7C;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;CAAG;AAE7B;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;AAExD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,MAAM,SAAS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