@wardic/foldkit 0.0.0-stage → 1.2.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/LICENSE +21 -0
- package/README.md +59 -2
- package/THIRD_PARTY_NOTICES.md +145 -0
- package/dist/AnimationControls.d.ts +37 -0
- package/dist/AnimationControls.d.ts.map +1 -0
- package/dist/AnimationControls.js +37 -0
- package/dist/AnimationControls.js.map +1 -0
- package/dist/AnimationScope.d.ts +20 -0
- package/dist/AnimationScope.d.ts.map +1 -0
- package/dist/AnimationScope.js +20 -0
- package/dist/AnimationScope.js.map +1 -0
- package/dist/DragControls.d.ts +25 -0
- package/dist/DragControls.d.ts.map +1 -0
- package/dist/DragControls.js +21 -0
- package/dist/DragControls.js.map +1 -0
- package/dist/Features.d.ts +36 -0
- package/dist/Features.d.ts.map +1 -0
- package/dist/Features.js +44 -0
- package/dist/Features.js.map +1 -0
- package/dist/Ward.d.ts +301 -0
- package/dist/Ward.d.ts.map +1 -0
- package/dist/Ward.js +6 -0
- package/dist/Ward.js.map +1 -0
- package/dist/Wardic.d.ts +363 -0
- package/dist/Wardic.d.ts.map +1 -0
- package/dist/Wardic.js +85 -0
- package/dist/Wardic.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/builder.d.ts +8 -0
- package/dist/internal/builder.d.ts.map +1 -0
- package/dist/internal/builder.js +242 -0
- package/dist/internal/builder.js.map +1 -0
- package/dist/internal/commands.d.ts +143 -0
- package/dist/internal/commands.d.ts.map +1 -0
- package/dist/internal/commands.js +242 -0
- package/dist/internal/commands.js.map +1 -0
- package/dist/internal/delivery.d.ts +44 -0
- package/dist/internal/delivery.d.ts.map +1 -0
- package/dist/internal/delivery.js +85 -0
- package/dist/internal/delivery.js.map +1 -0
- package/dist/internal/dev.d.ts +10 -0
- package/dist/internal/dev.d.ts.map +1 -0
- package/dist/internal/dev.js +10 -0
- package/dist/internal/dev.js.map +1 -0
- package/dist/internal/dev.production.d.ts +8 -0
- package/dist/internal/dev.production.d.ts.map +1 -0
- package/dist/internal/dev.production.js +8 -0
- package/dist/internal/dev.production.js.map +1 -0
- package/dist/internal/drag.d.ts +66 -0
- package/dist/internal/drag.d.ts.map +1 -0
- package/dist/internal/drag.js +71 -0
- package/dist/internal/drag.js.map +1 -0
- package/dist/internal/element.d.ts +59 -0
- package/dist/internal/element.d.ts.map +1 -0
- package/dist/internal/element.js +582 -0
- package/dist/internal/element.js.map +1 -0
- package/dist/internal/gestures.d.ts +62 -0
- package/dist/internal/gestures.d.ts.map +1 -0
- package/dist/internal/gestures.js +109 -0
- package/dist/internal/gestures.js.map +1 -0
- package/dist/internal/hydrate.d.ts +5 -0
- package/dist/internal/hydrate.d.ts.map +1 -0
- package/dist/internal/hydrate.js +27 -0
- package/dist/internal/hydrate.js.map +1 -0
- package/dist/internal/keys.d.ts +21 -0
- package/dist/internal/keys.d.ts.map +1 -0
- package/dist/internal/keys.js +12 -0
- package/dist/internal/keys.js.map +1 -0
- package/dist/internal/layout.d.ts +29 -0
- package/dist/internal/layout.d.ts.map +1 -0
- package/dist/internal/layout.js +88 -0
- package/dist/internal/layout.js.map +1 -0
- package/dist/internal/mount.d.ts +22 -0
- package/dist/internal/mount.d.ts.map +1 -0
- package/dist/internal/mount.js +100 -0
- package/dist/internal/mount.js.map +1 -0
- package/dist/internal/presence.d.ts +33 -0
- package/dist/internal/presence.d.ts.map +1 -0
- package/dist/internal/presence.js +338 -0
- package/dist/internal/presence.js.map +1 -0
- package/dist/internal/reactivity.d.ts +15 -0
- package/dist/internal/reactivity.d.ts.map +1 -0
- package/dist/internal/reactivity.js +26 -0
- package/dist/internal/reactivity.js.map +1 -0
- package/dist/internal/reorder.d.ts +47 -0
- package/dist/internal/reorder.d.ts.map +1 -0
- package/dist/internal/reorder.js +250 -0
- package/dist/internal/reorder.js.map +1 -0
- package/dist/internal/scope.d.ts +28 -0
- package/dist/internal/scope.d.ts.map +1 -0
- package/dist/internal/scope.js +44 -0
- package/dist/internal/scope.js.map +1 -0
- package/dist/internal/server.d.ts +13 -0
- package/dist/internal/server.d.ts.map +1 -0
- package/dist/internal/server.js +13 -0
- package/dist/internal/server.js.map +1 -0
- package/dist/internal/server.node.d.ts +8 -0
- package/dist/internal/server.node.d.ts.map +1 -0
- package/dist/internal/server.node.js +8 -0
- package/dist/internal/server.node.js.map +1 -0
- package/dist/internal/services.d.ts +222 -0
- package/dist/internal/services.d.ts.map +1 -0
- package/dist/internal/services.js +338 -0
- package/dist/internal/services.js.map +1 -0
- package/dist/internal/tree.d.ts +71 -0
- package/dist/internal/tree.d.ts.map +1 -0
- package/dist/internal/tree.js +207 -0
- package/dist/internal/tree.js.map +1 -0
- package/dist/internal/variant-node.d.ts +62 -0
- package/dist/internal/variant-node.d.ts.map +1 -0
- package/dist/internal/variant-node.js +279 -0
- package/dist/internal/variant-node.js.map +1 -0
- package/dist/internal/view-transition.d.ts +10 -0
- package/dist/internal/view-transition.d.ts.map +1 -0
- package/dist/internal/view-transition.js +36 -0
- package/dist/internal/view-transition.js.map +1 -0
- package/dist/internal/walk.d.ts +26 -0
- package/dist/internal/walk.d.ts.map +1 -0
- package/dist/internal/walk.js +162 -0
- package/dist/internal/walk.js.map +1 -0
- package/package.json +99 -4
- package/src/AnimationControls.ts +46 -0
- package/src/AnimationScope.ts +19 -0
- package/src/DragControls.ts +27 -0
- package/src/Features.ts +45 -0
- package/src/Ward.ts +434 -0
- package/src/Wardic.ts +410 -0
- package/src/index.ts +20 -0
- package/src/internal/builder.ts +262 -0
- package/src/internal/commands.ts +359 -0
- package/src/internal/delivery.ts +116 -0
- package/src/internal/dev.production.ts +7 -0
- package/src/internal/dev.ts +9 -0
- package/src/internal/drag.ts +136 -0
- package/src/internal/element.ts +668 -0
- package/src/internal/gestures.ts +184 -0
- package/src/internal/hydrate.ts +29 -0
- package/src/internal/keys.ts +19 -0
- package/src/internal/layout.ts +109 -0
- package/src/internal/mount.ts +124 -0
- package/src/internal/presence.ts +362 -0
- package/src/internal/reactivity.ts +45 -0
- package/src/internal/reorder.ts +313 -0
- package/src/internal/scope.ts +60 -0
- package/src/internal/server.node.ts +7 -0
- package/src/internal/server.ts +12 -0
- package/src/internal/services.ts +486 -0
- package/src/internal/tree.ts +230 -0
- package/src/internal/variant-node.ts +352 -0
- package/src/internal/view-transition.ts +43 -0
- package/src/internal/walk.ts +211 -0
package/dist/Ward.d.ts
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A **Ward** on Foldkit (ADR-0071): the types of what a `w.*` element and the `w.attributes` bundle
|
|
3
|
+
* take. Wardic's attributes are a type of their own, beside Foldkit's `Attribute<Message>`, which is
|
|
4
|
+
* a closed `Data.TaggedEnum` (#791, Q6): a `w.*` element takes both, and `h.div` takes Foldkit's alone,
|
|
5
|
+
* so a Wardic attribute given to a plain element is a type error.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import type * as ReducedMotion from "@wardic/core/ReducedMotion";
|
|
10
|
+
import type * as CoreReorder from "@wardic/core/Reorder";
|
|
11
|
+
import type * as CoreConfig from "@wardic/core/unstable/Config";
|
|
12
|
+
import type * as ReorderController from "@wardic/dom/ReorderController";
|
|
13
|
+
import type * as DomDragConstraints from "@wardic/dom/unstable/DragConstraints";
|
|
14
|
+
import type * as DomDragControls from "@wardic/dom/unstable/DragControls";
|
|
15
|
+
import type * as GestureInfo from "@wardic/dom/unstable/GestureInfo";
|
|
16
|
+
import type * as LayoutGroup from "@wardic/dom/unstable/LayoutGroup";
|
|
17
|
+
import type * as PresenceController from "@wardic/dom/unstable/PresenceController";
|
|
18
|
+
import type * as WardConfig from "@wardic/dom/unstable/WardConfig";
|
|
19
|
+
import type { Html } from "foldkit/html";
|
|
20
|
+
import type { MountAction } from "foldkit/mount";
|
|
21
|
+
import type * as Values from "@wardic/core/Values";
|
|
22
|
+
import type * as DomRenderer from "@wardic/dom/DomRenderer";
|
|
23
|
+
import type * as Option from "effect/Option";
|
|
24
|
+
import type * as Atom from "effect/reactivity/Atom";
|
|
25
|
+
import type { AnimationScope } from "./internal/scope.ts";
|
|
26
|
+
/** The mark of a Wardic attribute: a symbol, so no Foldkit `_tag` is ever mistaken for one. */
|
|
27
|
+
export declare const TypeId: unique symbol;
|
|
28
|
+
export type TypeId = typeof TypeId;
|
|
29
|
+
/** The keys of an element's config a Wardic attribute sets (slices 1 to 3's; the rest come with the later slices). */
|
|
30
|
+
export type Key = "initial" | "animate" | "appear" | "transition" | "style" | "variants" | "custom" | "inherit" | "config" | "animationStart" | "animationComplete" | "text" | "onUpdate" | "transformTemplate" | "exit" | "presence" | "key" | "layout" | "layoutId" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "layoutCrossfade" | "layoutGroup" | "layoutAnimationStart" | "layoutAnimationComplete" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileTap" | "propagate" | "onTapStart" | "onTap" | "onTapCancel" | "whileFocus" | "whileInView" | "viewport" | "onViewportEnter" | "onViewportLeave" | "drag" | "whileDrag" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragSnapToOrigin" | "dragTransition" | "dragPropagation" | "dragDirectionLock" | "dragListener" | "dragControls" | "startsDrag" | "onMeasureDragConstraints" | "onDragStart" | "onDrag" | "onDragEnd" | "onDragTransitionEnd" | "onDirectionLock" | "onPanSessionStart" | "onPanStart" | "onPan" | "onPanEnd" | "reorderGroup" | "reorderItem" | "animationScope";
|
|
31
|
+
/**
|
|
32
|
+
* A callback as a Message (ADR-0071, decision 23), in Foldkit's two handler shapes: a Message, sent
|
|
33
|
+
* as it is, or a function of what the callback is told, giving a Message, or an `Option` of one, where
|
|
34
|
+
* `Option.none()` sends nothing.
|
|
35
|
+
*/
|
|
36
|
+
export type Callback<Message, Args extends ReadonlyArray<unknown>> = Message | ((...args: Args) => Message | Option.Option<Message>);
|
|
37
|
+
/** A {@link Callback} told one value: the animation, layout and viewport callbacks', and a presence's `onExitComplete`. */
|
|
38
|
+
export type Handler<Message, A> = Callback<Message, [value: A]>;
|
|
39
|
+
/**
|
|
40
|
+
* A gesture {@link Callback} (decision 23; ADR-0047's `(event, info)`): told the platform's event
|
|
41
|
+
* (`Raw`) and the gesture's info. The function runs at the event, inside the recognizer's dispatch, so
|
|
42
|
+
* `stopPropagation()` and `preventDefault()` do what they say; its Message reaches `update` a
|
|
43
|
+
* microtask later.
|
|
44
|
+
*/
|
|
45
|
+
export type GestureHandler<Message, Raw, Info> = Callback<Message, [event: Raw, info: Info]>;
|
|
46
|
+
/** A hover's info (Motion's `EventInfo`): where the pointer was, in the viewport. */
|
|
47
|
+
export type PointInfo = GestureInfo.WardicPointInfo;
|
|
48
|
+
/** A press's info (Motion's `TapInfo`): where it was, in the viewport, and whether a pointer or the keyboard made it. */
|
|
49
|
+
export type PressInfo = GestureInfo.WardicPressInfo;
|
|
50
|
+
/** The platform's event a press callback is told: a pointer's, a **Keyboard press**'s key, or the blur that cancelled it. */
|
|
51
|
+
export type PressEvent = GestureInfo.WardicPressEvent;
|
|
52
|
+
/**
|
|
53
|
+
* A drag's or a pan's info (Motion's `PanInfo`): where the pointer is, in the viewport, its `offset`
|
|
54
|
+
* from the down, its last `delta` and its `velocity` in px/s. A one-axis drag's are zeroed off its axis.
|
|
55
|
+
*/
|
|
56
|
+
export type DragInfo = GestureInfo.WardicDragInfo;
|
|
57
|
+
/** A box's edges (Motion's `BoundingBox`): on x, `left` and `right`; on y, `top` and `bottom`. */
|
|
58
|
+
export type BoundingBox = DomDragConstraints.WardicBoundingBox;
|
|
59
|
+
/**
|
|
60
|
+
* `w.DragConstraints(…)` (Motion's `dragConstraints`; #793, Q7): a box in pixels from where the element
|
|
61
|
+
* started, an edge left out unbounded; `"parent"`, the element's parent; a selector, resolved under the
|
|
62
|
+
* `w.Provider()` element, else the document, at each measure (a drag's start, a resize of either); or
|
|
63
|
+
* `false`, none. A Fling past an edge springs back to it.
|
|
64
|
+
*/
|
|
65
|
+
export type DragConstraints = false | Partial<BoundingBox> | string;
|
|
66
|
+
/** The **Drag controls** `DragControls.make()` gives (Motion's `useDragControls`). */
|
|
67
|
+
export type DragControls = DomDragControls.WardicDragControls;
|
|
68
|
+
/** `controls.start`'s options, as `w.StartsDrag(controls, options)` gives them: `snapToCursor` and `distanceThreshold`. */
|
|
69
|
+
export type StartOptions = DomDragControls.WardicDragControlsOptions;
|
|
70
|
+
/** `w.StartsDrag(controls, options)` (#793, Q8): a pointer pressed on the element starts the controls' drags, with `options`. */
|
|
71
|
+
export interface StartsDrag {
|
|
72
|
+
readonly controls: DragControls;
|
|
73
|
+
readonly options?: StartOptions | undefined;
|
|
74
|
+
}
|
|
75
|
+
/** A **Reorder group**'s direction (core's): `"y"`, a column; `"x"`, a row; `"xy"`, a grid that wraps. */
|
|
76
|
+
export type ReorderAxis = CoreReorder.Axis;
|
|
77
|
+
/** A reorder that changed the order, at its end (Motion-free, #257 item 3): the order, the item that moved, its index `from` and `to`. */
|
|
78
|
+
export type ReorderEnd<V> = ReorderController.End<V>;
|
|
79
|
+
/** A **Reorder hold**'s start (#348): the item taken in hand, by a drag's start or a keyboard lift, and its index then. */
|
|
80
|
+
export type ReorderHoldStart<V> = ReorderController.HoldStart<V>;
|
|
81
|
+
/** A **Reorder hold**'s end (#348), once, however it ended: `how` is `"drop"`, `"cancel"` or `"unmount"`. */
|
|
82
|
+
export type ReorderHoldEnd<V> = ReorderController.HoldEnd<V>;
|
|
83
|
+
/** What a screen reader hears at each step of a **Keyboard reorder**, over the English defaults (ADR-0037). */
|
|
84
|
+
export type ReorderAnnouncements<V> = Partial<CoreReorder.Announcements<V>>;
|
|
85
|
+
/**
|
|
86
|
+
* `w.ReorderGroup(options)`'s options (ADR-0020; ADR-0071 decision 28; #793, Q11): the list's `values`
|
|
87
|
+
* in order, from the Model, and the Messages its reorders send. `V` is inferred from `values`.
|
|
88
|
+
*/
|
|
89
|
+
export interface ReorderGroupOptions<Message, V> {
|
|
90
|
+
/** The list's values, in order: the Model's. */
|
|
91
|
+
readonly values: ReadonlyArray<V>;
|
|
92
|
+
/** Sent with the whole new order at each **Crossover** (Q12): set the Model's values from it. */
|
|
93
|
+
readonly onReorder: Handler<Message, Array<V>>;
|
|
94
|
+
/** Sent once at the end of a reorder that changed the order: a drag let go, or a keyboard lift dropped; not a cancel. What an app saves. */
|
|
95
|
+
readonly onReorderEnd?: Handler<Message, ReorderEnd<V>> | undefined;
|
|
96
|
+
/** Sent as an item is taken in hand: a drag past its threshold (not the press), or a keyboard lift. */
|
|
97
|
+
readonly onHoldStart?: Handler<Message, ReorderHoldStart<V>> | undefined;
|
|
98
|
+
/** Sent once as an item in hand is let go, however: after `onReorderEnd` when it moved. */
|
|
99
|
+
readonly onHoldEnd?: Handler<Message, ReorderHoldEnd<V>> | undefined;
|
|
100
|
+
/** The list's direction; left out, found from the items' boxes. */
|
|
101
|
+
readonly axis?: ReorderAxis | undefined;
|
|
102
|
+
/** The **Keyboard reorder** (ADR-0037): on unless `false`. Off, the items have no keys, no tab stop and no instructions. */
|
|
103
|
+
readonly keyboard?: boolean | undefined;
|
|
104
|
+
/** The announcements over the English defaults. */
|
|
105
|
+
readonly announcements?: ReorderAnnouncements<V> | undefined;
|
|
106
|
+
/** What each item's `aria-describedby` reads, over the English default. */
|
|
107
|
+
readonly instructions?: string | undefined;
|
|
108
|
+
}
|
|
109
|
+
/** `w.ReorderItem(value)`: the item's value in its group's `values`, read once at mount. */
|
|
110
|
+
export interface ReorderItem {
|
|
111
|
+
readonly value: unknown;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* `w.Viewport(options)`'s options (Motion's `viewport`; #793, Q16): what "in view" means for
|
|
115
|
+
* `WhileInView` and the viewport callbacks, read as the recognizer starts.
|
|
116
|
+
*/
|
|
117
|
+
export interface ViewportOptions {
|
|
118
|
+
/** Stays in view after its first entry. */
|
|
119
|
+
readonly once?: boolean | undefined;
|
|
120
|
+
/** Grown around the root, as CSS `rootMargin`: `"0px 0px -100px 0px"` counts it in 100 px later at the bottom. */
|
|
121
|
+
readonly margin?: string | undefined;
|
|
122
|
+
/** How much of the element must show: `"some"` (the default), `"all"`, or 0 to 1. */
|
|
123
|
+
readonly amount?: "some" | "all" | number | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* The scrolling container it's in view of: `"parent"`, the element's parent, or a selector, resolved
|
|
126
|
+
* under the `w.Provider()` element, else the document, as the recognizer starts; the window if none.
|
|
127
|
+
*/
|
|
128
|
+
readonly root?: string | undefined;
|
|
129
|
+
}
|
|
130
|
+
/** What `w.OnAnimationStart` and `w.OnAnimationComplete` are told: the variant name, or the values, the animation went to (Motion's). */
|
|
131
|
+
export type AnimationDefinition = CoreConfig.WardicAnimationDefinition;
|
|
132
|
+
/**
|
|
133
|
+
* A subtree's settings (ADR-0062, Motion's `MotionConfig`; ADR-0071 decision 22): `w.Config(…)` on an
|
|
134
|
+
* element, over the nearest ancestor's, over the Handle's `config`. Each is read when an animation
|
|
135
|
+
* starts, so a change moves nothing by itself.
|
|
136
|
+
*/
|
|
137
|
+
export interface ConfigOptions {
|
|
138
|
+
/** The **Config transition**: what an element with no `transition` of its own runs on. */
|
|
139
|
+
readonly transition?: WardConfig.WardicVariantTransition | undefined;
|
|
140
|
+
/** Reduced motion (ADR-0029): `"user"` follows the preference, `"always"` and `"never"` decide. */
|
|
141
|
+
readonly reducedMotion?: ReducedMotion.Config | undefined;
|
|
142
|
+
/** Whether every animation lands at once (#468, Motion's `MotionGlobalConfig.skipAnimations` for a subtree). */
|
|
143
|
+
readonly skipAnimations?: boolean | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Where a drag's and a pan's points are (Motion's `transformPagePoint`; #793, Q9): a point in the
|
|
146
|
+
* viewport, mapped to the one the gesture uses, applied to its every point and to the boxes a
|
|
147
|
+
* `DragConstraints` container is measured against. Read at each pointer down.
|
|
148
|
+
*/
|
|
149
|
+
readonly transformPagePoint?: WardConfig.WardicTransformPoint | undefined;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* An element's `style` as Wardic sees it (Motion's `style`): every CSS property and the transform keys
|
|
153
|
+
* (`x`, `scale`, `rotate`, …), each a value or a **Live value**, an `effect/reactivity` Atom, followed
|
|
154
|
+
* through the gate (ADR-0043). A value is the element's base value, where a key returns when nothing
|
|
155
|
+
* animates it. Atoms alone are Live here (#791, Q4): a function is a development error.
|
|
156
|
+
*/
|
|
157
|
+
export type Style = {
|
|
158
|
+
readonly [K in keyof WardConfig.WardicValues]?: WardConfig.WardicValues[K] | Atom.Atom<WardConfig.WardicValues[K]>;
|
|
159
|
+
};
|
|
160
|
+
/** What `w.OnUpdate(atom)` sets each committed frame: the element's values before projection, a copy per frame (#791, Q6). */
|
|
161
|
+
export type Latest = Values.Values;
|
|
162
|
+
/**
|
|
163
|
+
* A Wardic attribute: what `w.Initial(…)`, `w.Animate(…)`, `w.Transition(…)`, `w.Style(…)` and
|
|
164
|
+
* `w.Provider(…)` return, for a `w.*` element's attribute list. The last of a repeated one wins, as
|
|
165
|
+
* Foldkit's second `h.Style` replaces the first.
|
|
166
|
+
*/
|
|
167
|
+
export interface Attribute {
|
|
168
|
+
readonly [TypeId]: Key | "provider";
|
|
169
|
+
readonly value: unknown;
|
|
170
|
+
}
|
|
171
|
+
/** Whether `value` is a Wardic attribute. */
|
|
172
|
+
export declare const isAttribute: (value: unknown) => value is Attribute;
|
|
173
|
+
/** A `w.*` element's child, as `h.div`'s: an element, nothing, or text. */
|
|
174
|
+
export type Child = Html | string;
|
|
175
|
+
/**
|
|
176
|
+
* `w.Presence(options)`'s options (ADR-0071 decision 29; Motion's `AnimatePresence` props, `@wardic/solid`'s
|
|
177
|
+
* `AnimatePresence`'s), on the leavers' parent. Each is read as it's needed: `mode` and
|
|
178
|
+
* `presenceAffectsLayout` at each change, `custom` and the anchors as a child leaves, `initial` as a
|
|
179
|
+
* child mounts, `propagate` once.
|
|
180
|
+
*/
|
|
181
|
+
export interface PresenceOptions<Message = never> {
|
|
182
|
+
/**
|
|
183
|
+
* How a change with a leaver goes: `"sync"` (the default), the entering child beside the leaver at
|
|
184
|
+
* once; `"popLayout"`, the leaver popped out of the flow where it was, so its siblings take their
|
|
185
|
+
* places at once; `"wait"`, the entering child held off the page, hidden, until the last leaver is gone.
|
|
186
|
+
*/
|
|
187
|
+
readonly mode?: PresenceController.PresenceMode | undefined;
|
|
188
|
+
/** `false`: the children present at the presence's first render start at their `Animate`; one entering later animates in (Motion's `initial`). */
|
|
189
|
+
readonly initial?: boolean | undefined;
|
|
190
|
+
/** What a leaving child's dynamic `Exit` resolves with (Motion's `custom`), over the child's own `Custom`. */
|
|
191
|
+
readonly custom?: unknown;
|
|
192
|
+
/** Sent once every leaver has animated out and been removed, the last by completing (Motion's `onExitComplete`). Not under replay. */
|
|
193
|
+
readonly onExitComplete?: Handler<Message, void> | undefined;
|
|
194
|
+
/** Whether a child's going and coming moves the `layout` elements around it (Motion's prop); `true` by default. */
|
|
195
|
+
readonly presenceAffectsLayout?: boolean | undefined;
|
|
196
|
+
/** Motion's `propagate`: inside another presence's child, when that child leaves, these children all leave too, and it goes once they've gone. */
|
|
197
|
+
readonly propagate?: boolean | undefined;
|
|
198
|
+
/** Where `"popLayout"` pins a leaver (Motion's): by its inline start or end; the start by default. */
|
|
199
|
+
readonly anchorX?: PresenceController.PopAnchors["x"] | undefined;
|
|
200
|
+
/** Where `"popLayout"` pins a leaver: by its top or bottom; the top by default. */
|
|
201
|
+
readonly anchorY?: PresenceController.PopAnchors["y"] | undefined;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* `w.LayoutGroup(options)`'s options (#432; Motion's `LayoutGroup`, ADR-0071 decision 22): a namespace
|
|
205
|
+
* for the `layoutId`s under the element, read once as the first of them mounts.
|
|
206
|
+
*/
|
|
207
|
+
export interface LayoutGroupOptions {
|
|
208
|
+
/** An id put before every `layoutId` under it: under `{ id: "tabs" }`, a `LayoutId("underline")` is `tabs-underline`. */
|
|
209
|
+
readonly id?: string | undefined;
|
|
210
|
+
/** Whether it joins the id of the group above it: `true` (the default) and `"id"` both do, `outer-inner`; `false` starts afresh. */
|
|
211
|
+
readonly inherit?: LayoutGroup.LayoutGroupInherit | undefined;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* An element's config: where it starts, where it animates to, how, where it exits to, its layout, and
|
|
215
|
+
* its `style`, whose values are its base values (dom's `WardConfig`'s, Motion's props). Each key is
|
|
216
|
+
* typed on its own (#791, Q17): nothing is inferred across attributes.
|
|
217
|
+
*/
|
|
218
|
+
export interface Config<Message = never> extends Pick<WardConfig.WardConfig, "initial" | "animate" | "transition" | "variants" | "custom" | "inherit" | "appear" | "exit" | "layout" | "layoutId" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "layoutCrossfade" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "whileHover" | "whileTap" | "propagate" | "whileFocus" | "whileInView" | "drag" | "whileDrag" | "dragElastic" | "dragMomentum" | "dragSnapToOrigin" | "dragTransition" | "dragPropagation" | "dragDirectionLock" | "dragListener" | "dragControls" | "onMeasureDragConstraints"> {
|
|
219
|
+
readonly style?: Style | undefined;
|
|
220
|
+
/** `w.DragConstraints(…)`: where the element can be dragged to (Motion's `dragConstraints`, in Foldkit's forms). */
|
|
221
|
+
readonly dragConstraints?: DragConstraints | undefined;
|
|
222
|
+
/** `w.StartsDrag(…)`: a pointer pressed on this element starts the controls' drags. */
|
|
223
|
+
readonly startsDrag?: StartsDrag | undefined;
|
|
224
|
+
/** `w.AnimationScope(scope)`: the element is the scope's: a Command's selectors given the scope resolve inside it, and its release stops the animations started in it. */
|
|
225
|
+
readonly animationScope?: AnimationScope | undefined;
|
|
226
|
+
/** `w.OnDragStart(…)`: sent as a drag of the element starts, past its threshold (Motion's `onDragStart`). */
|
|
227
|
+
readonly onDragStart?: GestureHandler<Message, PointerEvent, DragInfo> | undefined;
|
|
228
|
+
/** `w.OnDrag(…)`: sent as the drag moves, at its start and each move after (Motion's `onDrag`). */
|
|
229
|
+
readonly onDrag?: GestureHandler<Message, PointerEvent, DragInfo> | undefined;
|
|
230
|
+
/** `w.OnDragEnd(…)`: sent as the drag is let go; not for one its controls cancelled (Motion's `onDragEnd`). */
|
|
231
|
+
readonly onDragEnd?: GestureHandler<Message, PointerEvent, DragInfo> | undefined;
|
|
232
|
+
/** `w.OnDragTransitionEnd(…)`: sent as the element comes to rest after it's let go; not when a new grab stops it (Motion's `onDragTransitionEnd`). */
|
|
233
|
+
readonly onDragTransitionEnd?: Handler<Message, void> | undefined;
|
|
234
|
+
/** `w.OnDirectionLock(…)`: with `DragDirectionLock`, sent with the axis a drag locked to, before `OnDragStart` (Motion's `onDirectionLock`). */
|
|
235
|
+
readonly onDirectionLock?: Handler<Message, "x" | "y"> | undefined;
|
|
236
|
+
/** `w.OnPanSessionStart(…)`: sent as a pointer goes down on the element, ready to pan, with its point (Motion's `onPanSessionStart`). */
|
|
237
|
+
readonly onPanSessionStart?: GestureHandler<Message, PointerEvent, PointInfo> | undefined;
|
|
238
|
+
/** `w.OnPanStart(…)`: sent as a pan starts, past its threshold (Motion's `onPanStart`). */
|
|
239
|
+
readonly onPanStart?: GestureHandler<Message, PointerEvent, DragInfo> | undefined;
|
|
240
|
+
/** `w.OnPan(…)`: sent as the pan moves, at its start and each move after (Motion's `onPan`). */
|
|
241
|
+
readonly onPan?: GestureHandler<Message, PointerEvent, DragInfo> | undefined;
|
|
242
|
+
/** `w.OnPanEnd(…)`: sent as a pan that started ends, or is cancelled (Motion's `onPanEnd`). */
|
|
243
|
+
readonly onPanEnd?: GestureHandler<Message, PointerEvent, DragInfo> | undefined;
|
|
244
|
+
/** `w.ReorderGroup(…)`: the element is a **Reorder group**, its keyed `w.ReorderItem` children the items (decision 28); read over any `V`. */
|
|
245
|
+
readonly reorderGroup?: ReorderGroupOptions<Message, unknown> | undefined;
|
|
246
|
+
/** `w.ReorderItem(value)`: the element is an item of the group above it. */
|
|
247
|
+
readonly reorderItem?: ReorderItem | undefined;
|
|
248
|
+
/** `w.OnHoverStart(…)`: sent as the pointer comes over the element (Motion's `onHoverStart`; a touch never hovers). */
|
|
249
|
+
readonly onHoverStart?: GestureHandler<Message, PointerEvent, PointInfo> | undefined;
|
|
250
|
+
/** `w.OnHoverEnd(…)`: sent as it leaves (Motion's `onHoverEnd`). */
|
|
251
|
+
readonly onHoverEnd?: GestureHandler<Message, PointerEvent, PointInfo> | undefined;
|
|
252
|
+
/** `w.OnTapStart(…)`: sent as a press begins, a pointer's down or Enter or Space while focused (Motion's `onTapStart`). */
|
|
253
|
+
readonly onTapStart?: GestureHandler<Message, PressEvent, PressInfo> | undefined;
|
|
254
|
+
/** `w.OnTap(…)`: sent as that press ends on the element, or its key comes up (Motion's `onTap`). */
|
|
255
|
+
readonly onTap?: GestureHandler<Message, PressEvent, PressInfo> | undefined;
|
|
256
|
+
/** `w.OnTapCancel(…)`: sent as that press ends elsewhere, or is cancelled; a press a drag took over is neither (Motion's `onTapCancel`). */
|
|
257
|
+
readonly onTapCancel?: GestureHandler<Message, PressEvent, PressInfo> | undefined;
|
|
258
|
+
/** `w.Viewport(…)`: what "in view" means (Motion's `viewport`). */
|
|
259
|
+
readonly viewport?: ViewportOptions | undefined;
|
|
260
|
+
/** `w.OnViewportEnter(…)`: sent as the element comes into view, with the browser's entry (Motion's `onViewportEnter`). */
|
|
261
|
+
readonly onViewportEnter?: Handler<Message, IntersectionObserverEntry> | undefined;
|
|
262
|
+
/** `w.OnViewportLeave(…)`: sent as it leaves the view; never after the first entry under `once` (Motion's `onViewportLeave`). */
|
|
263
|
+
readonly onViewportLeave?: Handler<Message, IntersectionObserverEntry> | undefined;
|
|
264
|
+
/** `w.LayoutGroup(…)`: the namespace of the `layoutId`s under the element (decision 30). */
|
|
265
|
+
readonly layoutGroup?: LayoutGroupOptions | undefined;
|
|
266
|
+
/** `w.OnLayoutAnimationStart(…)`: sent at the frame a layout animation's first step is painted (Motion's `onLayoutAnimationStart`). */
|
|
267
|
+
readonly layoutAnimationStart?: Handler<Message, void> | undefined;
|
|
268
|
+
/** `w.OnLayoutAnimationComplete(…)`: sent once it has landed (Motion's `onLayoutAnimationComplete`). */
|
|
269
|
+
readonly layoutAnimationComplete?: Handler<Message, void> | undefined;
|
|
270
|
+
/** `w.Presence(…)`: the element's children exit before they're removed (decision 29). */
|
|
271
|
+
readonly presence?: PresenceOptions<Message> | undefined;
|
|
272
|
+
/** The element's key, as `w.keyed(tag)(key, …)` gave it: what a child re-entering a presence during its exit takes over its leaver by (#286). */
|
|
273
|
+
readonly key?: string | undefined;
|
|
274
|
+
/** `w.Config(…)`: the subtree's settings, this element's included. */
|
|
275
|
+
readonly config?: ConfigOptions | undefined;
|
|
276
|
+
/** `w.OnAnimationStart(…)`: sent as an animation of the element starts (Motion's `onAnimationStart`). */
|
|
277
|
+
readonly animationStart?: Handler<Message, AnimationDefinition> | undefined;
|
|
278
|
+
/** `w.OnAnimationComplete(…)`: sent as it lands, once every value it moves has settled; not for one a new target interrupted. */
|
|
279
|
+
readonly animationComplete?: Handler<Message, AnimationDefinition> | undefined;
|
|
280
|
+
/** `w.Text(atom)`: the element's text, written outside the patch as the Atom changes (decision 16). */
|
|
281
|
+
readonly text?: Atom.Atom<string | number> | undefined;
|
|
282
|
+
/** `w.OnUpdate(atom)`: set to the element's values each committed frame (decision 24, Motion's `onUpdate`). */
|
|
283
|
+
readonly onUpdate?: Atom.Writable<Latest> | undefined;
|
|
284
|
+
/** `w.TransformTemplate(fn)`: the element's transform from its values and the generated string (Motion's). Hoist it: it's followed by reference. */
|
|
285
|
+
readonly transformTemplate?: DomRenderer.TransformTemplate | undefined;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* `w.Provider(options)`'s options (#791, Q16): none in slice 1. Slice 2's `layoutTrigger` and what comes
|
|
289
|
+
* after join here, so the attribute's shape doesn't change.
|
|
290
|
+
*/
|
|
291
|
+
export interface ProviderOptions {
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* What `w.attributes(bundle)` takes: an element's {@link Config}, and the element's own Mount, which the
|
|
295
|
+
* bundle fuses with Wardic's, since a second `h.OnMount` replaces the first on Foldkit 0.170 and throws
|
|
296
|
+
* on its preview (ADR-0071, decision 18).
|
|
297
|
+
*/
|
|
298
|
+
export interface Bundle<Message> extends Config<Message> {
|
|
299
|
+
readonly mount?: MountAction<Message> | undefined;
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=Ward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ward.d.ts","sourceRoot":"","sources":["../src/Ward.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,aAAa,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,KAAK,UAAU,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,KAAK,iBAAiB,MAAM,+BAA+B,CAAA;AACvE,OAAO,KAAK,KAAK,kBAAkB,MAAM,sCAAsC,CAAA;AAC/E,OAAO,KAAK,KAAK,eAAe,MAAM,mCAAmC,CAAA;AACzE,OAAO,KAAK,KAAK,WAAW,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,KAAK,WAAW,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,KAAK,kBAAkB,MAAM,yCAAyC,CAAA;AAClF,OAAO,KAAK,KAAK,UAAU,MAAM,iCAAiC,CAAA;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,KAAK,WAAW,MAAM,yBAAyB,CAAA;AAC3D,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe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AA;IAC3C,yGAAyG;IACzG,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,mBAAmB,CAAC,GAAG,SAAS,CAAA;IAC3E,iIAAiI;IACjI,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,mBAAmB,CAAC,GAAG,SAAS,CAAA;IAC9E,uGAAuG;IACvG,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAA;IACtD,+GAA+G;IAC/G,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACrD,oJAAoJ;IACpJ,QAAQ,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC,iBAAiB,GAAG,SAAS,CAAA;CACvE;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;CAAG;AAEnC;;;;GAIG;AACH,MAAM,WAAW,MAAM,CAAC,OAAO,CAAE,SAAQ,MAAM,CAAC,OAAO,CAAC;IACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,SAAS,CAAA;CAClD"}
|
package/dist/Ward.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Predicate from "effect/Predicate";
|
|
2
|
+
/** The mark of a Wardic attribute: a symbol, so no Foldkit `_tag` is ever mistaken for one. */
|
|
3
|
+
export const TypeId = Symbol.for("@wardic/foldkit/Ward.Attribute");
|
|
4
|
+
/** Whether `value` is a Wardic attribute. */
|
|
5
|
+
export const isAttribute = (value) => Predicate.hasProperty(value, TypeId);
|
|
6
|
+
//# sourceMappingURL=Ward.js.map
|
package/dist/Ward.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Ward.js","sourceRoot":"","sources":["../src/Ward.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAA;AAI7C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,MAAM,GAAkB,MAAM,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;AA2OjF,6CAA6C;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA"}
|