@wardic/dom 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/DomProjectionSystem.js +3 -3
  2. package/dist/DomProjectionSystem.js.map +1 -1
  3. package/dist/FlushGate.d.ts +6 -6
  4. package/dist/FlushGate.d.ts.map +1 -1
  5. package/dist/FlushGate.js +7 -5
  6. package/dist/FlushGate.js.map +1 -1
  7. package/dist/ReorderController.js +3 -3
  8. package/dist/ReorderController.js.map +1 -1
  9. package/dist/Report.d.ts +1 -1
  10. package/dist/Report.d.ts.map +1 -1
  11. package/dist/Report.js +3 -2
  12. package/dist/Report.js.map +1 -1
  13. package/dist/Style.d.ts +2 -1
  14. package/dist/Style.d.ts.map +1 -1
  15. package/dist/Style.js +3 -1
  16. package/dist/Style.js.map +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/internal/batch-handoff.d.ts +25 -0
  20. package/dist/internal/batch-handoff.d.ts.map +1 -0
  21. package/dist/internal/batch-handoff.js +64 -0
  22. package/dist/internal/batch-handoff.js.map +1 -0
  23. package/dist/internal/gate-environment.d.ts +4 -0
  24. package/dist/internal/gate-environment.d.ts.map +1 -0
  25. package/dist/internal/gate-environment.js +21 -0
  26. package/dist/internal/gate-environment.js.map +1 -0
  27. package/dist/internal/projection.js +14 -14
  28. package/dist/internal/projection.js.map +1 -1
  29. package/dist/internal/reorder.d.ts +2 -2
  30. package/dist/internal/reorder.d.ts.map +1 -1
  31. package/dist/internal/reorder.js +2 -2
  32. package/dist/internal/reorder.js.map +1 -1
  33. package/dist/internal/starting-style.d.ts +0 -83
  34. package/dist/internal/starting-style.d.ts.map +1 -1
  35. package/dist/internal/starting-style.js +16 -143
  36. package/dist/internal/starting-style.js.map +1 -1
  37. package/dist/unstable/AppearAnimations.d.ts +191 -0
  38. package/dist/unstable/AppearAnimations.d.ts.map +1 -0
  39. package/dist/unstable/AppearAnimations.js +561 -0
  40. package/dist/unstable/AppearAnimations.js.map +1 -0
  41. package/dist/unstable/BatchMembers.d.ts +513 -0
  42. package/dist/unstable/BatchMembers.d.ts.map +1 -0
  43. package/dist/unstable/BatchMembers.js +2490 -0
  44. package/dist/unstable/BatchMembers.js.map +1 -0
  45. package/dist/unstable/DomValues.d.ts +25 -0
  46. package/dist/unstable/DomValues.d.ts.map +1 -0
  47. package/dist/unstable/DomValues.js +45 -0
  48. package/dist/unstable/DomValues.js.map +1 -0
  49. package/dist/unstable/DragConstraints.d.ts +48 -0
  50. package/dist/unstable/DragConstraints.d.ts.map +1 -0
  51. package/dist/unstable/DragConstraints.js +49 -0
  52. package/dist/unstable/DragConstraints.js.map +1 -0
  53. package/dist/unstable/DragControls.d.ts +50 -0
  54. package/dist/unstable/DragControls.d.ts.map +1 -0
  55. package/dist/unstable/DragControls.js +55 -0
  56. package/dist/unstable/DragControls.js.map +1 -0
  57. package/dist/unstable/DragDefaults.d.ts +34 -0
  58. package/dist/unstable/DragDefaults.d.ts.map +1 -0
  59. package/dist/unstable/DragDefaults.js +47 -0
  60. package/dist/unstable/DragDefaults.js.map +1 -0
  61. package/dist/unstable/DragTrack.d.ts +236 -0
  62. package/dist/unstable/DragTrack.d.ts.map +1 -0
  63. package/dist/unstable/DragTrack.js +646 -0
  64. package/dist/unstable/DragTrack.js.map +1 -0
  65. package/dist/unstable/DragTransition.d.ts +22 -0
  66. package/dist/unstable/DragTransition.d.ts.map +1 -0
  67. package/dist/unstable/DragTransition.js +31 -0
  68. package/dist/unstable/DragTransition.js.map +1 -0
  69. package/dist/unstable/ElementSetup.d.ts +144 -0
  70. package/dist/unstable/ElementSetup.d.ts.map +1 -0
  71. package/dist/unstable/ElementSetup.js +297 -0
  72. package/dist/unstable/ElementSetup.js.map +1 -0
  73. package/dist/unstable/Feature.d.ts +221 -0
  74. package/dist/unstable/Feature.d.ts.map +1 -0
  75. package/dist/unstable/Feature.js +281 -0
  76. package/dist/unstable/Feature.js.map +1 -0
  77. package/dist/unstable/GestureFeatures.d.ts +30 -0
  78. package/dist/unstable/GestureFeatures.d.ts.map +1 -0
  79. package/dist/unstable/GestureFeatures.js +32 -0
  80. package/dist/unstable/GestureFeatures.js.map +1 -0
  81. package/dist/unstable/GestureInfo.d.ts +61 -0
  82. package/dist/unstable/GestureInfo.d.ts.map +1 -0
  83. package/dist/unstable/GestureInfo.js +23 -0
  84. package/dist/unstable/GestureInfo.js.map +1 -0
  85. package/dist/unstable/Imperative.d.ts +214 -0
  86. package/dist/unstable/Imperative.d.ts.map +1 -0
  87. package/dist/unstable/Imperative.js +768 -0
  88. package/dist/unstable/Imperative.js.map +1 -0
  89. package/dist/unstable/Instant.d.ts +46 -0
  90. package/dist/unstable/Instant.d.ts.map +1 -0
  91. package/dist/unstable/Instant.js +49 -0
  92. package/dist/unstable/Instant.js.map +1 -0
  93. package/dist/unstable/LayoutGroup.d.ts +14 -0
  94. package/dist/unstable/LayoutGroup.d.ts.map +1 -0
  95. package/dist/unstable/LayoutGroup.js +31 -0
  96. package/dist/unstable/LayoutGroup.js.map +1 -0
  97. package/dist/unstable/LayoutMember.d.ts +127 -0
  98. package/dist/unstable/LayoutMember.d.ts.map +1 -0
  99. package/dist/unstable/LayoutMember.js +176 -0
  100. package/dist/unstable/LayoutMember.js.map +1 -0
  101. package/dist/unstable/LiveStyle.d.ts +171 -0
  102. package/dist/unstable/LiveStyle.d.ts.map +1 -0
  103. package/dist/unstable/LiveStyle.js +329 -0
  104. package/dist/unstable/LiveStyle.js.map +1 -0
  105. package/dist/unstable/MemberHold.d.ts +3 -0
  106. package/dist/unstable/MemberHold.d.ts.map +1 -0
  107. package/dist/unstable/MemberHold.js +223 -0
  108. package/dist/unstable/MemberHold.js.map +1 -0
  109. package/dist/unstable/OwnerScope.d.ts +16 -0
  110. package/dist/unstable/OwnerScope.d.ts.map +1 -0
  111. package/dist/unstable/OwnerScope.js +35 -0
  112. package/dist/unstable/OwnerScope.js.map +1 -0
  113. package/dist/unstable/PresenceController.d.ts +128 -0
  114. package/dist/unstable/PresenceController.d.ts.map +1 -0
  115. package/dist/unstable/PresenceController.js +1427 -0
  116. package/dist/unstable/PresenceController.js.map +1 -0
  117. package/dist/unstable/Press.d.ts +26 -0
  118. package/dist/unstable/Press.d.ts.map +1 -0
  119. package/dist/unstable/Press.js +19 -0
  120. package/dist/unstable/Press.js.map +1 -0
  121. package/dist/unstable/ServerInterpolators.d.ts +17 -0
  122. package/dist/unstable/ServerInterpolators.d.ts.map +1 -0
  123. package/dist/unstable/ServerInterpolators.js +20 -0
  124. package/dist/unstable/ServerInterpolators.js.map +1 -0
  125. package/dist/unstable/WardConfig.d.ts +567 -0
  126. package/dist/unstable/WardConfig.d.ts.map +1 -0
  127. package/dist/unstable/WardConfig.js +2 -0
  128. package/dist/unstable/WardConfig.js.map +1 -0
  129. package/dist/unstable/features/All.d.ts +24 -0
  130. package/dist/unstable/features/All.d.ts.map +1 -0
  131. package/dist/unstable/features/All.js +20 -0
  132. package/dist/unstable/features/All.js.map +1 -0
  133. package/dist/unstable/features/Colors.d.ts +12 -0
  134. package/dist/unstable/features/Colors.d.ts.map +1 -0
  135. package/dist/unstable/features/Colors.js +38 -0
  136. package/dist/unstable/features/Colors.js.map +1 -0
  137. package/dist/unstable/features/DomAnimation.d.ts +16 -0
  138. package/dist/unstable/features/DomAnimation.d.ts.map +1 -0
  139. package/dist/unstable/features/DomAnimation.js +19 -0
  140. package/dist/unstable/features/DomAnimation.js.map +1 -0
  141. package/dist/unstable/features/DomMax.d.ts +12 -0
  142. package/dist/unstable/features/DomMax.d.ts.map +1 -0
  143. package/dist/unstable/features/DomMax.js +14 -0
  144. package/dist/unstable/features/DomMax.js.map +1 -0
  145. package/dist/unstable/features/Drag.d.ts +5 -0
  146. package/dist/unstable/features/Drag.d.ts.map +1 -0
  147. package/dist/unstable/features/Drag.js +32 -0
  148. package/dist/unstable/features/Drag.js.map +1 -0
  149. package/dist/unstable/features/Focus.d.ts +5 -0
  150. package/dist/unstable/features/Focus.d.ts.map +1 -0
  151. package/dist/unstable/features/Focus.js +20 -0
  152. package/dist/unstable/features/Focus.js.map +1 -0
  153. package/dist/unstable/features/Hover.d.ts +5 -0
  154. package/dist/unstable/features/Hover.d.ts.map +1 -0
  155. package/dist/unstable/features/Hover.js +20 -0
  156. package/dist/unstable/features/Hover.js.map +1 -0
  157. package/dist/unstable/features/InView.d.ts +5 -0
  158. package/dist/unstable/features/InView.d.ts.map +1 -0
  159. package/dist/unstable/features/InView.js +20 -0
  160. package/dist/unstable/features/InView.js.map +1 -0
  161. package/dist/unstable/features/Input.d.ts +28 -0
  162. package/dist/unstable/features/Input.d.ts.map +1 -0
  163. package/dist/unstable/features/Input.js +31 -0
  164. package/dist/unstable/features/Input.js.map +1 -0
  165. package/dist/unstable/features/Keys.d.ts +95 -0
  166. package/dist/unstable/features/Keys.d.ts.map +1 -0
  167. package/dist/unstable/features/Keys.js +44 -0
  168. package/dist/unstable/features/Keys.js.map +1 -0
  169. package/dist/unstable/features/Layout.d.ts +43 -0
  170. package/dist/unstable/features/Layout.d.ts.map +1 -0
  171. package/dist/unstable/features/Layout.js +44 -0
  172. package/dist/unstable/features/Layout.js.map +1 -0
  173. package/dist/unstable/features/Pan.d.ts +5 -0
  174. package/dist/unstable/features/Pan.d.ts.map +1 -0
  175. package/dist/unstable/features/Pan.js +20 -0
  176. package/dist/unstable/features/Pan.js.map +1 -0
  177. package/dist/unstable/features/Press.d.ts +13 -0
  178. package/dist/unstable/features/Press.d.ts.map +1 -0
  179. package/dist/unstable/features/Press.js +10 -0
  180. package/dist/unstable/features/Press.js.map +1 -0
  181. package/dist/unstable/features/Scroll.d.ts +20 -0
  182. package/dist/unstable/features/Scroll.d.ts.map +1 -0
  183. package/dist/unstable/features/Scroll.js +34 -0
  184. package/dist/unstable/features/Scroll.js.map +1 -0
  185. package/dist/unstable/features/TimelineKeys.d.ts +7 -0
  186. package/dist/unstable/features/TimelineKeys.d.ts.map +1 -0
  187. package/dist/unstable/features/TimelineKeys.js +103 -0
  188. package/dist/unstable/features/TimelineKeys.js.map +1 -0
  189. package/package.json +4 -3
  190. package/src/DomProjectionSystem.ts +3 -3
  191. package/src/FlushGate.ts +11 -9
  192. package/src/ReorderController.ts +3 -3
  193. package/src/Report.ts +3 -7
  194. package/src/Style.ts +4 -1
  195. package/src/index.ts +1 -1
  196. package/src/internal/batch-handoff.ts +75 -0
  197. package/src/internal/gate-environment.ts +21 -0
  198. package/src/internal/projection.ts +14 -14
  199. package/src/internal/reorder.ts +4 -4
  200. package/src/internal/starting-style.ts +5 -204
  201. package/src/unstable/AppearAnimations.ts +837 -0
  202. package/src/unstable/BatchMembers.ts +3085 -0
  203. package/src/unstable/DomValues.ts +53 -0
  204. package/src/unstable/DragConstraints.ts +107 -0
  205. package/src/unstable/DragControls.ts +98 -0
  206. package/src/unstable/DragDefaults.ts +57 -0
  207. package/src/unstable/DragTrack.ts +959 -0
  208. package/src/unstable/DragTransition.ts +46 -0
  209. package/src/unstable/ElementSetup.ts +411 -0
  210. package/src/unstable/Feature.ts +494 -0
  211. package/src/unstable/GestureFeatures.ts +38 -0
  212. package/src/unstable/GestureInfo.ts +85 -0
  213. package/src/unstable/Imperative.ts +1037 -0
  214. package/src/unstable/Instant.ts +93 -0
  215. package/src/unstable/LayoutGroup.ts +36 -0
  216. package/src/unstable/LayoutMember.ts +319 -0
  217. package/src/unstable/LiveStyle.ts +497 -0
  218. package/src/unstable/MemberHold.ts +211 -0
  219. package/src/unstable/OwnerScope.ts +35 -0
  220. package/src/unstable/PresenceController.ts +1747 -0
  221. package/src/unstable/Press.ts +43 -0
  222. package/src/unstable/ServerInterpolators.ts +39 -0
  223. package/src/unstable/WardConfig.ts +704 -0
  224. package/src/unstable/features/All.ts +39 -0
  225. package/src/unstable/features/Colors.ts +40 -0
  226. package/src/unstable/features/DomAnimation.ts +19 -0
  227. package/src/unstable/features/DomMax.ts +14 -0
  228. package/src/unstable/features/Drag.ts +34 -0
  229. package/src/unstable/features/Focus.ts +21 -0
  230. package/src/unstable/features/Hover.ts +21 -0
  231. package/src/unstable/features/InView.ts +21 -0
  232. package/src/unstable/features/Input.ts +37 -0
  233. package/src/unstable/features/Keys.ts +124 -0
  234. package/src/unstable/features/Layout.ts +75 -0
  235. package/src/unstable/features/Pan.ts +21 -0
  236. package/src/unstable/features/Press.ts +21 -0
  237. package/src/unstable/features/Scroll.ts +35 -0
  238. package/src/unstable/features/TimelineKeys.ts +115 -0
  239. package/dist/internal/gate.d.ts +0 -199
  240. package/dist/internal/gate.d.ts.map +0 -1
  241. package/dist/internal/gate.js +0 -570
  242. package/dist/internal/gate.js.map +0 -1
  243. package/dist/internal/report.d.ts +0 -30
  244. package/dist/internal/report.d.ts.map +0 -1
  245. package/dist/internal/report.js +0 -60
  246. package/dist/internal/report.js.map +0 -1
  247. package/dist/internal/runner.d.ts +0 -22
  248. package/dist/internal/runner.d.ts.map +0 -1
  249. package/dist/internal/runner.js +0 -62
  250. package/dist/internal/runner.js.map +0 -1
  251. package/src/internal/gate.ts +0 -706
  252. package/src/internal/report.ts +0 -69
  253. package/src/internal/runner.ts +0 -78
@@ -0,0 +1,191 @@
1
+ import type * as ReducedMotion from "@wardic/core/ReducedMotion";
2
+ import type * as Values from "@wardic/core/Values";
3
+ import * as Appear from "../Appear.ts";
4
+ import type * as DomRenderer from "../DomRenderer.ts";
5
+ import * as Option from "effect/Option";
6
+ import * as Result from "effect/Result";
7
+ import * as AppearHandoff from "@wardic/core/unstable/AppearHandoff";
8
+ import type * as WardConfig from "./WardConfig.ts";
9
+ import type * as VariantTarget from "@wardic/core/unstable/VariantTarget";
10
+ import * as VariantTree from "@wardic/core/unstable/VariantTree";
11
+ /**
12
+ * The mount animation's key: its starts, targets and transition as one canonical text, and whether
13
+ * motion is reduced. `None` when the transition holds a function with no easing name
14
+ * (`Easing.nameOf`): the server can't tell it from another, so the element keeps its Starting style.
15
+ */
16
+ export declare const keyOf: (m: AppearHandoff.MountAnimation) => Option.Option<string>;
17
+ /**
18
+ * A Batch's entrance's key (#706, Q9): its keys and each one's transition as a member's change runs them,
19
+ * as canonical text, and whether motion is reduced, or the change is skipped (#468). The server's rule
20
+ * group's, and what a client checks a member's Appear animation against. `None` when a transition holds
21
+ * a function with no easing name: the Batch waits for the JavaScript (Q4).
22
+ */
23
+ export declare const batchKeyOf: (keys: ReadonlyArray<string>, transitions: ReadonlyArray<unknown>, reduced: boolean, skipped: boolean) => Option.Option<string>;
24
+ /** A mount animation's spec for the DOM's sampler, or why it has none. */
25
+ export declare const specOf: (m: AppearHandoff.MountAnimation) => Result.Result<Appear.Spec, string>;
26
+ /**
27
+ * Why a mount animation can't play before hydration, or `None` when it can (decision 4): a key
28
+ * starting from anything but `initial`, a value the DOM reads from the element (`auto`, `var()`),
29
+ * or a start that can't take its target's shape (a length pair in two units).
30
+ */
31
+ export declare const unplayable: (initial: Values.Values, to: Values.Values) => Option.Option<string>;
32
+ /** A variant parent's orchestration, on a server: its children in render order, its stagger and `when`. */
33
+ export interface AppearGroup {
34
+ readonly leader: Entry;
35
+ readonly stagger: VariantTree.WardicStaggerConfig;
36
+ readonly when: "beforeChildren" | "afterChildren" | undefined;
37
+ readonly children: Array<Entry>;
38
+ }
39
+ /** One element's place in a server render's Appear animations. */
40
+ export interface Entry {
41
+ /** Its mount animation per motion setting, or why it has none; `None` when nothing animates. */
42
+ readonly plays: {
43
+ readonly normal: Option.Option<Result.Result<AppearHandoff.MountAnimation, string>>;
44
+ readonly reduced: Option.Option<Result.Result<AppearHandoff.MountAnimation, string>>;
45
+ };
46
+ readonly slot: Option.Option<Appear.Slot>;
47
+ /** The group it staggers in, as a Variant child. */
48
+ readonly group: Option.Option<AppearGroup>;
49
+ /** Why it was ruled out after it rendered: its user style, read when `ward()` is called (ADR-0044, decision 4). */
50
+ readonly vetoes: Array<string>;
51
+ /**
52
+ * Whether it follows the user's preference (`"user"`, #434): its reduced play goes under the head's
53
+ * media query. With `"always"` or `"never"` its plays are already that setting's.
54
+ */
55
+ readonly user: boolean;
56
+ /** Whether it's skipped (#468): its rule lands on first paint, and its own stagger holds it back no more than its client does. */
57
+ readonly skipped: boolean;
58
+ /** Its tag, and the keys its mount animates: what names it when the provider explains (#585). */
59
+ readonly tag: string | undefined;
60
+ readonly to: Option.Option<Values.Values>;
61
+ }
62
+ /** One server render's Appear animations: the provider's (ADR-0044, decisions 3 and 5). */
63
+ export interface ServerAppear {
64
+ /** The provider's reduced motion: an element's, unless its nearest `WardicConfig` sets its own (#434). */
65
+ readonly reducedMotion: ReducedMotion.Config;
66
+ /**
67
+ * An element's entry, and its inline `animation` when it plays: its plays as its reduced motion has
68
+ * them, `setting` (its nearest `WardicConfig`'s, #434) else the provider's. A skipped one's (#468)
69
+ * are one play in both slots, whatever its reduced motion.
70
+ */
71
+ readonly enter: (animation: {
72
+ readonly normal: Option.Option<Result.Result<AppearHandoff.MountAnimation, string>>;
73
+ readonly reduced: Option.Option<Result.Result<AppearHandoff.MountAnimation, string>>;
74
+ }, group: Option.Option<AppearGroup>, setting: ReducedMotion.Config | undefined, skipped: boolean,
75
+ /** Its tag and its targets at mount, which name it when the provider explains (#585). */
76
+ tag: string | undefined, to: Option.Option<Values.Values>) => {
77
+ readonly entry: Entry;
78
+ readonly animation: Option.Option<string>;
79
+ /**
80
+ * Entered after the shell was flushed, so in a chunk a stream sends later (#245), and no late
81
+ * element around it: the chunk's root, which puts the chunk's `<style>` after itself.
82
+ */
83
+ readonly chunkRoot: boolean;
84
+ readonly late: boolean;
85
+ };
86
+ /** A variant parent's group, its children to come. */
87
+ readonly group: (leader: Entry, transition: WardConfig.WardicTransition | undefined) => AppearGroup;
88
+ /**
89
+ * The head's CSS, once the shell is done: every element entered so far, its timing worked out,
90
+ * and the rules. Called once, by the provider's `useAssets`: what enters after is late (#245).
91
+ */
92
+ readonly css: () => string;
93
+ /** Render a late element's subtree: an element inside it isn't a chunk's root (#245). */
94
+ readonly within: <A>(late: boolean, render: () => A) => A;
95
+ /**
96
+ * A late chunk's CSS (#245): the rules and timings of every element entered since the last
97
+ * write, those the head sent left out; "" for none. The Solid 2 binding hands it to `useHead`,
98
+ * which streams it with the chunk as a head patch (#209 PR 4a).
99
+ */
100
+ readonly chunkCss: () => string;
101
+ /**
102
+ * A late chunk's `<style>` (#245), as server text: {@link chunkCss} in a `<style>`. The Solid 1
103
+ * binding's chunk root's thunk asks for it once the chunk has rendered.
104
+ */
105
+ readonly chunk: () => string;
106
+ /** The nonce the page's Content Security Policy gives inline styles, which each `<style>` carries (#618, P1). */
107
+ readonly nonce: string | undefined;
108
+ /**
109
+ * A Batch's rule group's slot (#706): `play`'s rule, and `reduced`'s under the media query when given;
110
+ * each member's style its own values, the slot and its delay. In the head's CSS, or a late chunk's.
111
+ */
112
+ readonly batch: (play: Appear.BatchKeyframes, reduced?: Appear.BatchKeyframes | undefined) => Appear.BatchSlot;
113
+ /** Says why a Batch, or one of its members, named by `name`, waits for the JavaScript, when the provider explains (#585, #706). */
114
+ readonly waits: (name: string, reason: string) => void;
115
+ }
116
+ /**
117
+ * What a provider's `appear` explains with (#585): with `"explain"`, a Warning for each element that
118
+ * waits for the JavaScript, logged as the render finds it with Effect's own logger, since a server
119
+ * builds no runtime from the app's `env`; nothing otherwise.
120
+ */
121
+ export declare const explainerOf: (appear: boolean | "explain" | undefined) => ((message: string) => void) | undefined;
122
+ /**
123
+ * A server render's Appear animations, for a provider whose reduced motion is `reducedMotion`. With
124
+ * `explain` (the provider's `appear="explain"`, #585), it says why each element that doesn't play
125
+ * waits for the JavaScript, as it finds out; without it, nothing is kept or said.
126
+ */
127
+ export declare const serverAppear: (reducedMotion: ReducedMotion.Config, explain?: (message: string) => void, nonce?: string) => ServerAppear;
128
+ /** What the server knows of an element when it renders it. */
129
+ export interface ServerElement {
130
+ /** The element's own `appear` (the provider's is the render's {@link ServerAppear}). */
131
+ readonly appear: boolean | undefined;
132
+ readonly tag: string | undefined;
133
+ /** Its starting values: `initial`, an inherited `initial` name, or `animate` under `initial={false}`. */
134
+ readonly initial: Values.Values;
135
+ /** Its targets at mount: `animate`, or an inherited variant name resolved against its `variants`; `None` with neither. */
136
+ readonly to: Option.Option<Values.Values>;
137
+ /** Its targets' Keyframes (#429), each such key's value in `to` their last stop; `undefined` with none. */
138
+ readonly keyframes: VariantTarget.Keyframes | undefined;
139
+ /** Whether its mount starts at its `animate` (#448, `startsQuiet`): nothing plays, its Keyframes included (#429). */
140
+ readonly quiet: boolean;
141
+ /** Its own transition, else the one it inherits (ADR-0007). */
142
+ readonly transition: WardConfig.WardicTransition | undefined;
143
+ /** Whether it's a layout node (`layout` or `layoutId`): drawn through its projection at rest (#245). */
144
+ readonly layout: boolean;
145
+ /** Its **Transform template** (#443), when it has one. */
146
+ readonly template?: DomRenderer.TransformTemplate | undefined;
147
+ /** The group it staggers in, as a Variant child: its parent's (`node.inherited`). */
148
+ readonly group: Option.Option<AppearGroup>;
149
+ /** Whether it orchestrates its Variant children: it has variants of its own (ADR-0007). */
150
+ readonly leads: boolean;
151
+ /** Its own transition, whose stagger and `when` its Variant children follow. */
152
+ readonly ownTransition: WardConfig.WardicTransition | undefined;
153
+ /** Its nearest `WardicConfig`'s reduced motion (#434), over the provider's: `undefined` for none. */
154
+ readonly reducedMotion?: ReducedMotion.Config | undefined;
155
+ /** Whether its nearest `WardicConfig` skips its animations (#468). Its transition's own `skipAnimations` counts too. */
156
+ readonly skipAnimations?: boolean | undefined;
157
+ }
158
+ /**
159
+ * An element's entry in a server render's Appear animations: its inline `animation` when it plays
160
+ * one, and the group its Variant children join when it leads one.
161
+ */
162
+ export declare const enterServer: (appear: ServerAppear, el: ServerElement) => {
163
+ readonly animation: Option.Option<string>;
164
+ readonly group: Option.Option<AppearGroup>;
165
+ readonly veto: (reason: string) => void;
166
+ /** Rendered after the shell (#245): in a late chunk, and that chunk's root when no late element is around it. */
167
+ readonly late: boolean;
168
+ readonly chunkRoot: boolean;
169
+ };
170
+ /** Whether a user style sets an `animation` of its own: the element's one CSS animation would be taken. */
171
+ export declare const setsAnimation: (css: object | string | undefined) => boolean;
172
+ /** A Handoff in the DOM: its animation, which development's check matches against the mount animation (`checkHandoff`). */
173
+ export interface DomHandoff extends AppearHandoff.Handoff {
174
+ readonly animation: Animation;
175
+ }
176
+ /** A root's Appear animations by element, as `Appear.findAll` reads them. */
177
+ type RootRead = ReadonlyMap<Element, Animation>;
178
+ /**
179
+ * The Appear animations on `element`'s page, its document or its shadow root: one `getAnimations()`
180
+ * (`Appear.findAll`), kept until the next microtask checkpoint, for every Handoff until then (#706 Q3,
181
+ * #724). A hydration pass makes all its lookups before one, so it reads once: each element's at mount, and
182
+ * a Batch's at its change's first step.
183
+ */
184
+ export declare const pageAnimationsOf: (element: Element) => RootRead;
185
+ /**
186
+ * The element's Appear animation, if a server started one (decision 6). Only an element whose inline style
187
+ * names its slot looks, in its page's read (#724): a page with none reads nothing.
188
+ */
189
+ export declare const handoffOf: (element: Element & ElementCSSInlineStyle) => Option.Option<AppearHandoff.Handoff>;
190
+ export {};
191
+ //# sourceMappingURL=AppearAnimations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppearAnimations.d.ts","sourceRoot":"","sources":["../../src/unstable/AppearAnimations.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,KAAK,aAAa,MAAM,4BAA4B,CAAA;AAChE,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,KAAK,WAAW,MAAM,mBAAmB,CAAA;AASrD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAA;AACpE,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAGlD,OAAO,KAAK,KAAK,aAAa,MAAM,qCAAqC,CAAA;AACzE,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAA;AA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