@wardic/core 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/dist/Arc.d.ts +2 -2
  2. package/dist/Arc.js +1 -1
  3. package/dist/BaseValue.d.ts +11 -10
  4. package/dist/BaseValue.d.ts.map +1 -1
  5. package/dist/BaseValue.js +12 -15
  6. package/dist/BaseValue.js.map +1 -1
  7. package/dist/Batch.d.ts +15 -5
  8. package/dist/Batch.d.ts.map +1 -1
  9. package/dist/Batch.js +218 -20
  10. package/dist/Batch.js.map +1 -1
  11. package/dist/Clock.d.ts +7 -7
  12. package/dist/Clock.d.ts.map +1 -1
  13. package/dist/Clock.js +17 -16
  14. package/dist/Clock.js.map +1 -1
  15. package/dist/DefaultTransition.d.ts +3 -2
  16. package/dist/DefaultTransition.d.ts.map +1 -1
  17. package/dist/DefaultTransition.js +5 -3
  18. package/dist/DefaultTransition.js.map +1 -1
  19. package/dist/Drag.d.ts +24 -9
  20. package/dist/Drag.d.ts.map +1 -1
  21. package/dist/Drag.js +10 -10
  22. package/dist/Drag.js.map +1 -1
  23. package/dist/DragActivity.js +3 -3
  24. package/dist/DragRecognizer.d.ts +5 -4
  25. package/dist/DragRecognizer.d.ts.map +1 -1
  26. package/dist/DragRecognizer.js +37 -14
  27. package/dist/DragRecognizer.js.map +1 -1
  28. package/dist/Easing.d.ts +1 -1
  29. package/dist/Easing.js +1 -1
  30. package/dist/Frame.d.ts.map +1 -1
  31. package/dist/Frame.js +5 -3
  32. package/dist/Frame.js.map +1 -1
  33. package/dist/InputFeed.d.ts +1 -1
  34. package/dist/InputFeed.js +2 -2
  35. package/dist/InputSource.d.ts +3 -3
  36. package/dist/InputSource.js +2 -2
  37. package/dist/Interpolator.d.ts +2 -2
  38. package/dist/Interpolator.js +2 -2
  39. package/dist/InterpolatorRegistry.d.ts +29 -15
  40. package/dist/InterpolatorRegistry.d.ts.map +1 -1
  41. package/dist/InterpolatorRegistry.js +17 -8
  42. package/dist/InterpolatorRegistry.js.map +1 -1
  43. package/dist/LiveValue.d.ts +7 -6
  44. package/dist/LiveValue.d.ts.map +1 -1
  45. package/dist/LiveValue.js +45 -14
  46. package/dist/LiveValue.js.map +1 -1
  47. package/dist/Machine.d.ts +7 -4
  48. package/dist/Machine.d.ts.map +1 -1
  49. package/dist/Machine.js +146 -45
  50. package/dist/Machine.js.map +1 -1
  51. package/dist/Playback.d.ts.map +1 -1
  52. package/dist/Playback.js +6 -1
  53. package/dist/Playback.js.map +1 -1
  54. package/dist/Projection.d.ts +9 -9
  55. package/dist/Projection.js +2 -2
  56. package/dist/Recognizer.d.ts +1 -1
  57. package/dist/Recognizer.js +6 -6
  58. package/dist/Recognizer.js.map +1 -1
  59. package/dist/ReducedMotion.d.ts +4 -4
  60. package/dist/ReducedMotion.js +6 -6
  61. package/dist/Renderer.d.ts +5 -5
  62. package/dist/Renderer.js +6 -6
  63. package/dist/Renderer.js.map +1 -1
  64. package/dist/Reorder.d.ts +1 -1
  65. package/dist/Reorder.d.ts.map +1 -1
  66. package/dist/Reorder.js +2 -1
  67. package/dist/Reorder.js.map +1 -1
  68. package/dist/ScrollSource.d.ts +1 -1
  69. package/dist/ScrollSource.d.ts.map +1 -1
  70. package/dist/Sequence.d.ts +1 -1
  71. package/dist/SharedSource.d.ts +3 -3
  72. package/dist/SharedSource.js +5 -5
  73. package/dist/SharedSource.js.map +1 -1
  74. package/dist/Spring.d.ts.map +1 -1
  75. package/dist/Spring.js +2 -1
  76. package/dist/Spring.js.map +1 -1
  77. package/dist/Values.d.ts +2 -2
  78. package/dist/Values.js +1 -1
  79. package/dist/index.d.ts +1 -1
  80. package/dist/index.js +1 -1
  81. package/dist/internal/carried.d.ts +13 -0
  82. package/dist/internal/carried.d.ts.map +1 -0
  83. package/dist/internal/carried.js +23 -0
  84. package/dist/internal/carried.js.map +1 -0
  85. package/dist/internal/firstSteps.d.ts +66 -0
  86. package/dist/internal/firstSteps.d.ts.map +1 -0
  87. package/dist/internal/firstSteps.js +107 -0
  88. package/dist/internal/firstSteps.js.map +1 -0
  89. package/dist/internal/frameLoop.d.ts +1 -1
  90. package/dist/internal/frameLoop.d.ts.map +1 -1
  91. package/dist/internal/frameLoop.js +102 -81
  92. package/dist/internal/frameLoop.js.map +1 -1
  93. package/dist/internal/lerpsNumbers.d.ts +11 -0
  94. package/dist/internal/lerpsNumbers.d.ts.map +1 -0
  95. package/dist/internal/lerpsNumbers.js +38 -0
  96. package/dist/internal/lerpsNumbers.js.map +1 -0
  97. package/dist/internal/options.d.ts +7 -7
  98. package/dist/internal/options.d.ts.map +1 -1
  99. package/dist/internal/options.js +10 -10
  100. package/dist/internal/options.js.map +1 -1
  101. package/dist/internal/stepper.d.ts +13 -2
  102. package/dist/internal/stepper.d.ts.map +1 -1
  103. package/dist/internal/stepper.js +16 -1
  104. package/dist/internal/stepper.js.map +1 -1
  105. package/dist/internal/tracing.d.ts +1 -1
  106. package/dist/internal/tracing.js +1 -1
  107. package/dist/unstable/AnimationControls.d.ts +37 -38
  108. package/dist/unstable/AnimationControls.d.ts.map +1 -1
  109. package/dist/unstable/AnimationControls.js +39 -36
  110. package/dist/unstable/AnimationControls.js.map +1 -1
  111. package/dist/unstable/AppearHandoff.d.ts +5 -5
  112. package/dist/unstable/AppearHandoff.d.ts.map +1 -1
  113. package/dist/unstable/BatchCalls.d.ts +2 -2
  114. package/dist/unstable/BatchCalls.js +5 -5
  115. package/dist/unstable/Config.d.ts +19 -19
  116. package/dist/unstable/Config.d.ts.map +1 -1
  117. package/dist/unstable/FirstSteps.d.ts +25 -0
  118. package/dist/unstable/FirstSteps.d.ts.map +1 -0
  119. package/dist/unstable/FirstSteps.js +2 -0
  120. package/dist/unstable/FirstSteps.js.map +1 -0
  121. package/dist/unstable/FlushGate.d.ts +53 -51
  122. package/dist/unstable/FlushGate.d.ts.map +1 -1
  123. package/dist/unstable/FlushGate.js +56 -49
  124. package/dist/unstable/FlushGate.js.map +1 -1
  125. package/dist/unstable/FrameEffects.d.ts +2 -2
  126. package/dist/unstable/FrameEffects.js +2 -2
  127. package/dist/unstable/FrameTime.d.ts +1 -1
  128. package/dist/unstable/FrameTime.js +1 -1
  129. package/dist/unstable/Imperative.d.ts +29 -9
  130. package/dist/unstable/Imperative.d.ts.map +1 -1
  131. package/dist/unstable/Imperative.js +79 -47
  132. package/dist/unstable/Imperative.js.map +1 -1
  133. package/dist/unstable/OwnValues.js +1 -1
  134. package/dist/unstable/PresenceRecord.d.ts +26 -26
  135. package/dist/unstable/PresenceRecord.d.ts.map +1 -1
  136. package/dist/unstable/PresenceRecord.js +8 -8
  137. package/dist/unstable/PresenceRecord.js.map +1 -1
  138. package/dist/unstable/Projector.d.ts +34 -0
  139. package/dist/unstable/Projector.d.ts.map +1 -0
  140. package/dist/unstable/Projector.js +9 -0
  141. package/dist/unstable/Projector.js.map +1 -0
  142. package/dist/unstable/Report.d.ts +1 -1
  143. package/dist/unstable/Report.js +1 -1
  144. package/dist/unstable/RetargetLegs.d.ts +1 -1
  145. package/dist/unstable/RetargetLegs.d.ts.map +1 -1
  146. package/dist/unstable/RetargetLegs.js +9 -8
  147. package/dist/unstable/RetargetLegs.js.map +1 -1
  148. package/dist/unstable/Spine.d.ts +81 -72
  149. package/dist/unstable/Spine.d.ts.map +1 -1
  150. package/dist/unstable/Spine.js +152 -150
  151. package/dist/unstable/Spine.js.map +1 -1
  152. package/dist/unstable/Stops.d.ts +3 -3
  153. package/dist/unstable/Stops.js +4 -4
  154. package/dist/unstable/Subject.d.ts +2 -2
  155. package/dist/unstable/Subject.js +2 -2
  156. package/dist/unstable/Timelines.d.ts +11 -11
  157. package/dist/unstable/Timelines.d.ts.map +1 -1
  158. package/dist/unstable/Timelines.js +3 -3
  159. package/dist/unstable/VariantTarget.d.ts +7 -7
  160. package/dist/unstable/VariantTarget.d.ts.map +1 -1
  161. package/dist/unstable/VariantTarget.js +11 -11
  162. package/dist/unstable/VariantTarget.js.map +1 -1
  163. package/dist/unstable/VariantTree.d.ts +36 -36
  164. package/dist/unstable/VariantTree.d.ts.map +1 -1
  165. package/dist/unstable/VariantTree.js +33 -33
  166. package/dist/unstable/VariantTree.js.map +1 -1
  167. package/dist/unstable/WardicConfigValue.d.ts +13 -13
  168. package/dist/unstable/WardicConfigValue.d.ts.map +1 -1
  169. package/dist/unstable/WardicConfigValue.js +4 -4
  170. package/dist/unstable/WardicConfigValue.js.map +1 -1
  171. package/package.json +1 -1
  172. package/src/Arc.ts +3 -3
  173. package/src/BaseValue.ts +18 -21
  174. package/src/Batch.ts +236 -22
  175. package/src/Clock.ts +18 -17
  176. package/src/DefaultTransition.ts +5 -3
  177. package/src/Drag.ts +32 -14
  178. package/src/DragActivity.ts +3 -3
  179. package/src/DragRecognizer.ts +41 -16
  180. package/src/Easing.ts +1 -1
  181. package/src/Frame.ts +5 -3
  182. package/src/InputFeed.ts +2 -2
  183. package/src/InputSource.ts +5 -5
  184. package/src/Interpolator.ts +3 -3
  185. package/src/InterpolatorRegistry.ts +22 -13
  186. package/src/LiveValue.ts +47 -17
  187. package/src/Machine.ts +199 -61
  188. package/src/Playback.ts +5 -1
  189. package/src/Projection.ts +9 -9
  190. package/src/Recognizer.ts +7 -7
  191. package/src/ReducedMotion.ts +6 -6
  192. package/src/Renderer.ts +6 -6
  193. package/src/Reorder.ts +3 -2
  194. package/src/ScrollSource.ts +1 -1
  195. package/src/Sequence.ts +1 -1
  196. package/src/SharedSource.ts +5 -5
  197. package/src/Spring.ts +2 -1
  198. package/src/Values.ts +2 -2
  199. package/src/index.ts +1 -1
  200. package/src/internal/carried.ts +22 -0
  201. package/src/internal/firstSteps.ts +139 -0
  202. package/src/internal/frameLoop.ts +103 -87
  203. package/src/internal/lerpsNumbers.ts +53 -0
  204. package/src/internal/options.ts +10 -10
  205. package/src/internal/stepper.ts +20 -2
  206. package/src/internal/tracing.ts +1 -1
  207. package/src/unstable/AnimationControls.ts +59 -56
  208. package/src/unstable/AppearHandoff.ts +6 -6
  209. package/src/unstable/BatchCalls.ts +5 -5
  210. package/src/unstable/Config.ts +19 -19
  211. package/src/unstable/FirstSteps.ts +26 -0
  212. package/src/unstable/FlushGate.ts +92 -82
  213. package/src/unstable/FrameEffects.ts +2 -2
  214. package/src/unstable/FrameTime.ts +1 -1
  215. package/src/unstable/Imperative.ts +126 -56
  216. package/src/unstable/OwnValues.ts +1 -1
  217. package/src/unstable/PresenceRecord.ts +29 -29
  218. package/src/unstable/Projector.ts +45 -0
  219. package/src/unstable/Report.ts +1 -1
  220. package/src/unstable/RetargetLegs.ts +10 -9
  221. package/src/unstable/Spine.ts +190 -188
  222. package/src/unstable/Stops.ts +6 -6
  223. package/src/unstable/Subject.ts +2 -2
  224. package/src/unstable/Timelines.ts +12 -12
  225. package/src/unstable/VariantTarget.ts +13 -13
  226. package/src/unstable/VariantTree.ts +42 -42
  227. package/src/unstable/WardicConfigValue.ts +13 -13
@@ -7,7 +7,7 @@
7
7
  * Unstable, for Wardic's own packages: public, with no semver promise. `@wardic/dom/Style` re-exports
8
8
  * it for binding authors.
9
9
  *
10
- * Observability: pure and per element, so quiet (no span, no log).
10
+ * Observability: pure and per Subject, so quiet (no span, no log).
11
11
  *
12
12
  * @module
13
13
  */
@@ -87,7 +87,7 @@ const keepAnimatable = (value: unknown, key: string): boolean => {
87
87
 
88
88
  /** A values map's numbers and strings, its Keyframes set aside (#452, {@link keepAnimatable}): {@link toValues}' one pass. */
89
89
  const filtered = (v: object | undefined): Values.Values => {
90
- // Per element at mount (#540): statements and a loop.
90
+ // Per Subject at mount (#540): statements and a loop.
91
91
  setAside = undefined
92
92
  const out: Record<string, number | string> = {}
93
93
  if (Predicate.isUndefined(v)) return out
@@ -164,7 +164,7 @@ export const valuesAt = (v: object | undefined, at: StopAt): Values.Values => {
164
164
  export const keyframesOf = (v: object | undefined): Option.Option<Readonly<Record<string, Stops>>> => splitValues(v, "last").keyframes
165
165
 
166
166
  /**
167
- * What of an element's config its starting style is read from. Its values are typed `object`, so a
167
+ * What of a Subject's config its starting style is read from. Its values are typed `object`, so a
168
168
  * binding's own value types fit as they are.
169
169
  */
170
170
  export interface InitialConfig {
@@ -192,7 +192,7 @@ const isList = (entry: unknown): entry is ReadonlyArray<string> => Arr.isArray(e
192
192
 
193
193
  /**
194
194
  * A values map, or the `variants` entry a name names (an unknown name is empty), or nothing.
195
- * Built once, at module load: every element reads its own at setup (#69).
195
+ * Built once, at module load: every Subject reads its own at setup (#69).
196
196
  */
197
197
  const entryOf: (entry: Entry) => Values.Values = Match.type<Entry>().pipe(
198
198
  Match.when({ entry: Match.undefined }, (): Values.Values => ({})),
@@ -204,7 +204,7 @@ const entryOf: (entry: Entry) => Values.Values = Match.type<Entry>().pipe(
204
204
  )
205
205
 
206
206
  /**
207
- * The values an element starts from: its `initial` values, or the `variants` entries its `initial` names,
207
+ * The values a Subject starts from: its `initial` values, or the `variants` entries its `initial` names,
208
208
  * an unknown name empty, or nothing. With `initial: false`, its `animate`, resolved the same way, so it
209
209
  * starts at its target and nothing animates at mount, as Motion's. A keyframes value starts at its first
210
210
  * stop, or, with `initial: false`, at `animate`'s last, where the animation it skips would end. Read once,
@@ -215,7 +215,7 @@ const entryOf: (entry: Entry) => Values.Values = Match.type<Entry>().pipe(
215
215
  */
216
216
  // #134, Motion's `initial={false}`; **Keyframes** (#429, Motion's `use-visual-state.ts`).
217
217
  export const resolveInitial = (config: InitialConfig): Values.Values => {
218
- // Per element at mount (#540): statements.
218
+ // Per Subject at mount (#540): statements.
219
219
  if (config.initial === false) return entryOf({ entry: config.animate, variants: config.variants, at: "last" })
220
220
  return entryOf({ entry: config.initial as object | string | ReadonlyArray<string> | undefined, variants: config.variants, at: "first" })
221
221
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * What an Environment draws and a Ward binds (**Subject**): opaque to core. An element in `@wardic/dom`, an
3
- * object in a scene; an Environment decides what its Subjects are.
2
+ * What an Environment draws and a Ward binds (**Subject**): opaque to core. `@wardic/dom`'s are its own kind,
3
+ * a scene's its objects; an Environment decides what its Subjects are.
4
4
  *
5
5
  * Unstable, for Wardic's own packages: public, with no semver promise.
6
6
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
- * **Timeline values** (#240, ADR-0043 *Amendment (#240)*): what an element's spine tells of its keys,
2
+ * **Timeline values** (#240, ADR-0043 *Amendment (#240)*): what a Subject's spine tells of its keys,
3
3
  * and the service that runs their Timeline values, which a binding's `scroll` Feature gives. Only the
4
- * type and the key are here, on every element's path: the code is the Feature's, so an app that reads
4
+ * type and the key are here, on every Subject's path: the code is the Feature's, so an app that reads
5
5
  * no scroll ships none of it.
6
6
  *
7
7
  * Unstable, for Wardic's own packages: public, with no semver promise.
@@ -9,34 +9,34 @@
9
9
  * @module
10
10
  */
11
11
  // Unstable: ADR-0071, decision 5. #672 (Q15): solid's `timelines.ts`, moved for the spine to tell its keys'
12
- // Timeline values in core; its options' element a Subject, its runtime a Runner.
12
+ // Timeline values in core; its options' `subject` a Subject, its runtime a Runner.
13
13
  import type * as FlushGate from "./FlushGate.ts"
14
14
  import * as Context from "effect/Context"
15
15
  import type * as Atom from "effect/reactivity/Atom"
16
16
  import type * as Subject from "./Subject.ts"
17
17
  import type * as WardicServices from "./WardicServices.ts"
18
18
 
19
- /** An element's keys' Timeline values, as its spine tells of them. */
19
+ /** A Subject's keys' Timeline values, as its spine tells of them. */
20
20
  export interface TimelineKeys {
21
- /** The element shows `key`'s Live value: its Timeline value runs, when it has one. */
21
+ /** The Subject shows `key`'s Live value: its Timeline value runs, when it has one. */
22
22
  readonly shown: (key: string) => void
23
23
  /** Something else draws `key` now (an entry, a drag, an Imperative animation), or it left the `style`: its Timeline value stops. */
24
24
  readonly taken: (key: string) => void
25
- /** The element's unmounted: it's no longer told of a value described. */
25
+ /** The Subject's unmounted: it's no longer told of a value described. */
26
26
  readonly dispose: () => void
27
27
  }
28
28
 
29
- /** What an element's {@link TimelineKeys} are made with. */
29
+ /** What a Subject's {@link TimelineKeys} are made with. */
30
30
  export interface TimelineKeysOptions {
31
31
  readonly runtime: WardicServices.Runner<WardicServices.WardicServices>
32
32
  readonly gate: FlushGate.Shape
33
33
  readonly id: string
34
- readonly element: Subject.Subject
34
+ readonly subject: Subject.Subject
35
35
  /** Its routed `style` keys: each key's Atom, which describes its derivation. */
36
36
  readonly live: LiveAtoms
37
37
  }
38
38
 
39
- /** What an element's Timeline values read of its Live values: a routed key's Atom, `undefined` for one not routed. */
39
+ /** What a Subject's Timeline values read of its Live values: a routed key's Atom, `undefined` for one not routed. */
40
40
  // #672: the one member the Timelines' keys call of the spine's LiveRoutes, which meets it; named here, so
41
41
  // this module, which the spine imports, imports nothing of the spine's.
42
42
  export interface LiveAtoms {
@@ -44,10 +44,10 @@ export interface LiveAtoms {
44
44
  }
45
45
 
46
46
  /**
47
- * The `scroll` Feature's Timeline values (#240), one per provider: an element's {@link TimelineKeys},
47
+ * The `scroll` Feature's Timeline values (#240), one per provider: a Subject's {@link TimelineKeys},
48
48
  * made at its first write of a Live value; and `described`, told by a `createScroll` that has described
49
- * its values (`LiveValue.derivesAs`), after the elements following them may have shown them, so each
50
- * key an element shows finds its Timeline value then, its value unchanged.
49
+ * its values (`LiveValue.derivesAs`), after the Subjects following them may have shown them, so each
50
+ * key a Subject shows finds its Timeline value then, its value unchanged.
51
51
  */
52
52
  export class Timelines extends /*#__PURE__*/ Context.Service<
53
53
  Timelines,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A target resolved (#277, ADR-0048): a values map, or a variant name against an element's
2
+ * A target resolved (#277, ADR-0048): a values map, or a variant name against a Subject's
3
3
  * `variants`, each a target with its own transition or a dynamic variant, a function of `custom`.
4
4
  * Motion's `resolveVariantFromProps` and `resolveTransition`. Shared by every binding's spine, its
5
5
  * variant nodes and its Starting style.
@@ -22,7 +22,7 @@ import type * as Config from "./Config.ts"
22
22
 
23
23
  /**
24
24
  * What a dynamic variant reads besides `custom` (#277, Motion's `current` and `velocity`): the
25
- * element's values now and their velocities, its Snapshot's. Copied only when a resolver is called.
25
+ * Subject's values now and their velocities, its Snapshot's. Copied only when a resolver is called.
26
26
  */
27
27
  export interface VariantState {
28
28
  readonly values: Readonly<Record<string, number | string>>
@@ -140,7 +140,7 @@ const namedOf = (definition: Definition | Failed, variants: Config.WardicVariant
140
140
  /**
141
141
  * Resolve a target (#277): a values map, or a variant name, against `variants`, Motion's
142
142
  * `resolveVariantFromProps`. A name's entry is looked up, a resolver is called with `custom` and the
143
- * element's `state`, and a resolver that returns a name is followed once more. Its values go through
143
+ * Subject's `state`, and a resolver that returns a name is followed once more. Its values go through
144
144
  * `Stops.valuesAt`, so `Override.resolve` and `Values.split` never see an `undefined` value, nor an
145
145
  * array: a key's Keyframes (#429) are split off, its value their last stop; its `transition` is split
146
146
  * off too.
@@ -163,7 +163,7 @@ export const resolveTargets = (entry: Entry, variants: Config.WardicVariants | u
163
163
  }
164
164
 
165
165
  /** An entry's name: the entry itself, when it's one. */
166
- // Per Retarget, per element (#460, compose once): statements.
166
+ // Per Retarget, per Subject (#460, compose once): statements.
167
167
  const nameOfEntry = (entry: Config.WardicVariant | string | undefined): string | undefined => {
168
168
  if (Predicate.isString(entry)) return entry
169
169
  return undefined
@@ -251,16 +251,16 @@ const transitionEndOf = (given: unknown): Values.Values | undefined => {
251
251
 
252
252
  /**
253
253
  * The transition an animation to a target runs on (#277, Motion's `resolveTransition`): the target's
254
- * own in place of the element's, or laid over it with `inherit: true` (a shallow merge, its own keys
255
- * winning); the element's when it has none. An own transition with no `inherit` is handed back as it
254
+ * own in place of the Subject's, or laid over it with `inherit: true` (a shallow merge, its own keys
255
+ * winning); the Subject's when it has none. An own transition with no `inherit` is handed back as it
256
256
  * is, the same object each call, so a memo of it holds (#460: a copy per call made Solid 2's variant
257
257
  * node re-run its orchestration's readers at every gesture, `UNSTABLE_MEMO_OUTPUT`).
258
258
  */
259
- export const transitionOfTarget = (own: Config.WardicVariantTransition | undefined, element: Config.WardicTransition | undefined): Config.WardicTransition | undefined => {
260
- if (Predicate.isUndefined(own)) return element
259
+ export const transitionOfTarget = (own: Config.WardicVariantTransition | undefined, wardTransition: Config.WardicTransition | undefined): Config.WardicTransition | undefined => {
260
+ if (Predicate.isUndefined(own)) return wardTransition
261
261
  if (!("inherit" in own)) return own as Config.WardicTransition
262
262
  const { inherit, ...rest } = own
263
- if (inherit === true) return { ...element, ...rest } as Config.WardicTransition
263
+ if (inherit === true) return { ...wardTransition, ...rest } as Config.WardicTransition
264
264
  return rest as Config.WardicTransition
265
265
  }
266
266
 
@@ -280,7 +280,7 @@ export interface StartingVariants {
280
280
  readonly failure: Option.Option<VariantFailure>
281
281
  }
282
282
 
283
- /** No variants: one value, as most elements have none (#979, bench:solid's mount). */
283
+ /** No variants: one value, as most Subjects have none (#979, bench:solid's mount). */
284
284
  const NO_STARTING_VARIANTS: StartingVariants = { variants: undefined, failure: NO_FAILURE }
285
285
 
286
286
  /**
@@ -292,7 +292,7 @@ export const startingVariantsOf = (variants: object | undefined, custom: unknown
292
292
  if (Predicate.isUndefined(variants)) return NO_STARTING_VARIANTS
293
293
  const entries = variants as Config.WardicVariants
294
294
  if (Bool.not(Arr.some(Rec.values(entries), Predicate.isFunction))) return { variants, failure: NO_FAILURE }
295
- // Once an element's setup (#979): each entry resolved, a throwing resolver's left with no values.
295
+ // Once a Subject's setup (#979): each entry resolved, a throwing resolver's left with no values.
296
296
  const targets = Rec.map(entries, (_, name) => resolveTarget(name, entries, custom, NO_VARIANT_STATE))
297
297
  return { variants: Rec.map(targets, valuesOfTarget), failure: Option.firstSomeOf(Arr.map(Rec.values(targets), failureOfTarget)) }
298
298
  }
@@ -301,7 +301,7 @@ export const startingVariantsOf = (variants: object | undefined, custom: unknown
301
301
  export type Orchestrated = (entry: Config.WardicVariantLabels, failure: Option.Option<VariantFailure>) => void
302
302
 
303
303
  /**
304
- * The own transition of an element's target now (#277): its `animate` map's, else the variant it
304
+ * The own transition of a Subject's target now (#277): its `animate` map's, else the variant it
305
305
  * names or inherits (`name`), resolved with `custom` and no values. What its orchestration reads.
306
306
  * `orchestrated` is told what a name's resolution came to: a resolver that throws gives no own
307
307
  * transition.
@@ -319,7 +319,7 @@ export const ownTransitionOf = (
319
319
  }
320
320
  if (Predicate.isUndefined(name)) return undefined
321
321
  const target = resolveTarget(name, byName, custom, NO_VARIANT_STATE)
322
- // #979 (Q6): a throw here is reported through the element's own once, its resolution's apart.
322
+ // #979 (Q6): a throw here is reported through the Subject's own once, its resolution's apart.
323
323
  if (Predicate.isNotUndefined(orchestrated)) orchestrated(name, target.failure)
324
324
  return target.transition
325
325
  }
@@ -1,19 +1,19 @@
1
1
  /**
2
- * The rules of an element's place in variant orchestration (ADR-0007, #50), on every binding: the
3
- * names an element hands its children and inherits from its parent, the values it starts from, and
2
+ * The rules of a Subject's place in variant orchestration (ADR-0007, #50), on every binding: the
3
+ * names a Subject hands its children and inherits from its parent, the values it starts from, and
4
4
  * what a server render builds. Each binding's variant node runs the orchestration over them, with its
5
5
  * own reactivity.
6
6
  *
7
7
  * Motion's rule (CONTEXT.md, **Variant child**):
8
- * - An element that names its own variants, a name on any variant prop (`initial`, `animate`, the
8
+ * - A Subject that names its own variants, a name on any variant prop (`initial`, `animate`, the
9
9
  * `while*` gestures, `exit`; #618), hands its children its `initial` and `animate` names, and an
10
10
  * `initial={false}` with them (#134). Any other passes its parent's through, unless it sets
11
11
  * `inherit={false}`, which passes none.
12
12
  * - A **Variant child** (`variants`, no names of its own, `inherit` not `false`) inherits its
13
13
  * ancestor's names and default transition, takes a stagger slot among the ancestor's variant
14
14
  * children, and counts for the ancestor's `when`.
15
- * - An element with variants of its own (`variants`, or a name) is what its Variant children
16
- * join: it owns their registry, their stagger and their `when`. Any other element passes its
15
+ * - A Subject with variants of its own (`variants`, or a name) is what its Variant children
16
+ * join: it owns their registry, their stagger and their `when`. Any other Subject passes its
17
17
  * parent's context through, so a Variant child joins its nearest such ancestor; it renders no
18
18
  * Provider unless it sets `inherit={false}` ({@link changesContext}).
19
19
  *
@@ -22,7 +22,7 @@
22
22
  * @module
23
23
  */
24
24
  // Unstable: ADR-0071, decision 5. #672: solid's `variant-tree.ts`, moved for the spine to read an
25
- // element's place in variant orchestration in core.
25
+ // Subject's place in variant orchestration in core.
26
26
  import * as Stagger from "../Stagger.ts"
27
27
  import type * as Values from "../Values.ts"
28
28
  import * as Report from "./Report.ts"
@@ -98,7 +98,7 @@ export interface WardicStaggerConfig {
98
98
  * inherit).
99
99
  * - `initial` — the parent's `initial` NAME, or `false`, read once (#50, #134).
100
100
  *
101
- * Every Wardic element provides one (#50): its own if it has variants of its own, else its
101
+ * Every Ward's Subject provides one (#50): its own if it has variants of its own, else its
102
102
  * parent's, passed through (`variant-node.ts`).
103
103
  * - `transition` — the parent's transition, inherited as the DEFAULT for
104
104
  * children that supply no local `transition`.
@@ -112,10 +112,10 @@ export type GestureLayer = "inView" | "focused" | "hovered" | "pressed" | "dragg
112
112
  /** The gesture layers in Motion's priority, lowest first. */
113
113
  export const GESTURE_LAYERS: ReadonlyArray<GestureLayer> = ["inView", "focused", "hovered", "pressed", "dragged"]
114
114
 
115
- /** The variant names an element hands its Variant children for its active gestures (#291): a name or a list each (#297). */
115
+ /** The variant names a Subject hands its Variant children for its active gestures (#291): a name or a list each (#297). */
116
116
  export type GestureNames = Readonly<Partial<Record<GestureLayer, Config.WardicVariantLabels | undefined>>>
117
117
 
118
- /** No gesture on: what an element with none active hands down. */
118
+ /** No gesture on: what a Subject with none active hands down. */
119
119
  export const NO_GESTURE_NAMES: GestureNames = {}
120
120
 
121
121
  /** Two {@link GestureNames} the same: the same names for each gesture, a list name by name (#297). */
@@ -129,7 +129,7 @@ export type GestureStates = Readonly<Record<GestureLayer, boolean>>
129
129
  export const NO_GESTURE_STATES: GestureStates = { inView: false, focused: false, hovered: false, pressed: false, dragged: false }
130
130
 
131
131
  /**
132
- * What an element hands its Variant children for its gestures (#291, Motion's `setActive` and variant
132
+ * What a Subject hands its Variant children for its gestures (#291, Motion's `setActive` and variant
133
133
  * context): whether each is on (its own, or its own provider's), and each one's label (its own
134
134
  * `while*`, if a name, else the one it took). A Variant child's gesture is on while its provider's is.
135
135
  */
@@ -138,7 +138,7 @@ export interface GestureHandDown {
138
138
  readonly names: GestureNames
139
139
  }
140
140
 
141
- /** Nothing on, no labels: what an element hands down with no provider and no gesture. */
141
+ /** Nothing on, no labels: what a Subject hands down with no provider and no gesture. */
142
142
  export const NO_HAND_DOWN: GestureHandDown = { on: NO_GESTURE_STATES, names: NO_GESTURE_NAMES }
143
143
 
144
144
  /** Two hand-downs the same: each gesture on alike, with the same label. */
@@ -147,7 +147,7 @@ export const sameHandDown = (a: GestureHandDown, b: GestureHandDown): boolean =>
147
147
 
148
148
  /** What a context hands down, nothing without a context or its gestures. */
149
149
  export const handDownFrom = (context: WardicVariantContextValue | undefined): GestureHandDown => {
150
- // Per Retarget, per element: guards, nothing made (most elements have no provider).
150
+ // Per Retarget, per Subject: guards, nothing made (most Subjects have no provider).
151
151
  if (Predicate.isUndefined(context)) return NO_HAND_DOWN
152
152
  const gestures = context.gestures
153
153
  if (Predicate.isUndefined(gestures)) return NO_HAND_DOWN
@@ -178,7 +178,7 @@ const labelOf = (own: object | Config.WardicVariantLabels | undefined, inherited
178
178
  return inherited
179
179
  }
180
180
 
181
- /** What an element hands down (#291), from its config, its own states, and what it takes. */
181
+ /** What a Subject hands down (#291), from its config, its own states, and what it takes. */
182
182
  export const handDownOf = (config: GestureConfig, own: GestureStates, above: GestureHandDown): GestureHandDown => ({
183
183
  on: gesturesOn(own, above.on),
184
184
  names: {
@@ -318,7 +318,7 @@ export interface WardicVariantContextValue {
318
318
  readonly staggerFor?: (name: string | undefined) => WardicStaggerConfig
319
319
  /**
320
320
  * For a list: whether a Variant child's keys of `name` may start, that name's own
321
- * `beforeChildren`: true unless it has one and this element's keys of that name haven't settled
321
+ * `beforeChildren`: true unless it has one and this Subject's keys of that name haven't settled
322
322
  * since its list last changed. Optional: left out, always.
323
323
  */
324
324
  readonly mayStartFor?: (name: string) => boolean
@@ -346,7 +346,7 @@ export interface WardicVariantContextValue {
346
346
  readonly appearGroup?: unknown
347
347
  }
348
348
 
349
- /** The part of an element's config its place in variant orchestration reads. */
349
+ /** The part of a Subject's config its place in variant orchestration reads. */
350
350
  export interface VariantConfig extends GestureConfig {
351
351
  readonly initial?: object | Config.WardicVariantLabels | false | undefined
352
352
  readonly animate?: object | Config.WardicVariantLabels | undefined
@@ -363,7 +363,7 @@ export interface VariantConfig extends GestureConfig {
363
363
  readonly controlled?: boolean | undefined
364
364
  }
365
365
 
366
- /** An `initial` an element hands its children: a variant name or list (#297), `false` (#134), or `undefined` for a values map or nothing. */
366
+ /** An `initial` a Subject hands its children: a variant name or list (#297), `false` (#134), or `undefined` for a values map or nothing. */
367
367
  export const initialNameOf = (entry: object | Config.WardicVariantLabels | false | undefined): Config.WardicVariantLabels | false | undefined =>
368
368
  Bool.match(entry === false, { onTrue: () => false as const, onFalse: () => nameOf(entry as object | Config.WardicVariantLabels | undefined) })
369
369
 
@@ -390,21 +390,21 @@ export const namesOwnVariants = (config: VariantConfig): boolean =>
390
390
  VariantTarget.isLabels(config.whileDrag) ||
391
391
  VariantTarget.isLabels(config.exit)
392
392
 
393
- /** Whether an element has variants of its own, so Variant children join it (Motion's `isVariantNode`). */
393
+ /** Whether a Subject has variants of its own, so Variant children join it (Motion's `isVariantNode`). */
394
394
  export const hasOwnVariants = (config: VariantConfig): boolean =>
395
395
  Predicate.isNotUndefined(config.variants) || namesOwnVariants(config)
396
396
 
397
397
  /**
398
- * Whether an element changes what its children read, so it renders its variant context's
399
- * Provider (#50): it has variants of its own, or it sets `inherit={false}`. Any other element hands
398
+ * Whether a Subject changes what its children read, so it renders its variant context's
399
+ * Provider (#50): it has variants of its own, or it sets `inherit={false}`. Any other Subject hands
400
400
  * its children its parent's context as it is, so it renders none. Decided once, at setup, from the
401
401
  * same props on a server and on the client, so the nesting never changes after mount.
402
402
  */
403
403
  export const changesContext = (config: VariantConfig): boolean => hasOwnVariants(config) || config.inherit === false
404
404
 
405
405
  /**
406
- * The **Controls change** in effect for an element (#433): its own controls', else the one the context
407
- * it inherits from is in, else none. Per mount, for every element (#460): guards, nothing built.
406
+ * The **Controls change** in effect for a Subject (#433): its own controls', else the one the context
407
+ * it inherits from is in, else none. Per mount, for every Subject (#460): guards, nothing built.
408
408
  */
409
409
  export const controlsChangeOf = (
410
410
  controls: Reactivity.Accessor<AnimationControls.ControlsChange | undefined> | undefined,
@@ -417,22 +417,22 @@ export const controlsChangeOf = (
417
417
  return change
418
418
  }
419
419
 
420
- /** Whether an element is a **Variant child** (CONTEXT.md). */
420
+ /** Whether a Subject is a **Variant child** (CONTEXT.md). */
421
421
  export const isVariantChild = (config: VariantConfig): boolean =>
422
422
  Predicate.isNotUndefined(config.variants) && !namesOwnVariants(config) && config.inherit !== false
423
423
 
424
- /** The context an element inherits names and its default transition from: its parent's, for a Variant child. */
424
+ /** The context a Subject inherits names and its default transition from: its parent's, for a Variant child. */
425
425
  export const inheritedContext = (
426
426
  config: VariantConfig,
427
427
  parent: WardicVariantContextValue | undefined,
428
428
  ): WardicVariantContextValue | undefined => {
429
- // Per element at mount (#540): statements.
429
+ // Per Subject at mount (#540): statements.
430
430
  if (isVariantChild(config)) return parent
431
431
  return undefined
432
432
  }
433
433
 
434
434
  /**
435
- * The `initial` an element's Starting style resolves: its own, else the `initial` name (or `false`) of
435
+ * The `initial` a Subject's Starting style resolves: its own, else the `initial` name (or `false`) of
436
436
  * the context it inherits from (#50, #134). Read once, as every `initial` is.
437
437
  */
438
438
  export const initialOf = (
@@ -444,7 +444,7 @@ export const initialOf = (
444
444
  onUndefined: () => UndefinedOr.match(inherited, { onUndefined: constUndefined, onDefined: (context) => context.initial }),
445
445
  })
446
446
 
447
- /** The `animate` an element starts at with `initial={false}`: its own, else the name its context hands down (#134). Read once, untracked. */
447
+ /** The `animate` a Subject starts at with `initial={false}`: its own, else the name its context hands down (#134). Read once, untracked. */
448
448
  const animateOf = (
449
449
  config: VariantConfig,
450
450
  inherited: WardicVariantContextValue | undefined,
@@ -456,7 +456,7 @@ const animateOf = (
456
456
  })
457
457
 
458
458
  /**
459
- * Whether an element starts at its `animate`, with nothing animating at mount (#134, Motion's
459
+ * Whether a Subject starts at its `animate`, with nothing animating at mount (#134, Motion's
460
460
  * `isInitialAnimationBlocked`): its `initial` (own or inherited) is `false`, or it renders with an
461
461
  * `<AnimatePresence initial={false}>`'s first render (`presenceBlocks`).
462
462
  */
@@ -467,7 +467,7 @@ export const startsAtAnimate = (
467
467
  ): boolean => presenceBlocks || initialOf(config, inherited) === false
468
468
 
469
469
  /**
470
- * Whether an element's mount tells nothing (#448, Motion's `animation-state.ts`): it
470
+ * Whether a Subject's mount tells nothing (#448, Motion's `animation-state.ts`): it
471
471
  * {@link startsAtAnimate}, or its `initial` (own, else inherited) is the same name, list or values map
472
472
  * as its `animate` (own, else inherited). Its first Retarget, landing with nothing to animate, is told
473
473
  * to no one. Read once, untracked.
@@ -485,14 +485,14 @@ export const startsQuiet = (
485
485
  return VariantTarget.sameLabels(initial as Config.WardicVariantLabels, animateOf(config, inherited, untrack) as Config.WardicVariantLabels)
486
486
  }
487
487
 
488
- /** What an element starts from, and the first of its variants whose resolver threw (#979). */
488
+ /** What a Subject starts from, and the first of its variants whose resolver threw (#979). */
489
489
  export interface Starting {
490
490
  readonly values: Values.Values
491
491
  readonly failure: Option.Option<VariantTarget.VariantFailure>
492
492
  }
493
493
 
494
494
  /**
495
- * The values an element starts from, its Starting style's input (ADR-0003): its `initial` (own, else
495
+ * The values a Subject starts from, its Starting style's input (ADR-0003): its `initial` (own, else
496
496
  * inherited, #50), or, when it {@link startsAtAnimate}, its `animate` (own, else inherited), as
497
497
  * Motion's `initial={false}` (#134). Read once: an inherited name is read through `untrack`.
498
498
  */
@@ -504,8 +504,8 @@ export const startingValuesOf = (
504
504
  ): Values.Values => startingValuesFrom(config, inherited, presenceBlocks, untrack, VariantTarget.startingVariantsOf(config.variants, config.custom).variants)
505
505
 
506
506
  /**
507
- * {@link startingValuesOf}, with what a resolver among the element's variants threw: its entry gives no
508
- * values, and the element starts at the rest (#979).
507
+ * {@link startingValuesOf}, with what a resolver among the Subject's variants threw: its entry gives no
508
+ * values, and the Subject starts at the rest (#979).
509
509
  */
510
510
  export const startingOf = (
511
511
  config: VariantConfig,
@@ -519,7 +519,7 @@ export const startingOf = (
519
519
 
520
520
  /**
521
521
  * {@link startingValuesOf} from its variants already resolved to values (`VariantTarget.startingVariantsOf`):
522
- * what an element's start reads, which reads their failure too.
522
+ * what a Subject's start reads, which reads their failure too.
523
523
  */
524
524
  export const startingValuesFrom = (
525
525
  config: VariantConfig,
@@ -531,7 +531,7 @@ export const startingValuesFrom = (
531
531
  const atAnimate = startsAtAnimate(config, inherited, presenceBlocks)
532
532
  const animate = animateOf(config, inherited, untrack)
533
533
  const initial = initialOf(config, inherited)
534
- // Per element at mount (#540): statements. Starting at `animate` resolves as `initial={false}`,
534
+ // Per Subject at mount (#540): statements. Starting at `animate` resolves as `initial={false}`,
535
535
  // and its first target is `animate`.
536
536
  let from = initial
537
537
  let first = initial
@@ -554,7 +554,7 @@ export const startingValuesFrom = (
554
554
  }
555
555
 
556
556
  /**
557
- * A name an element hands its children (Motion's `getCurrentTreeVariants`): `own` if it names its own
557
+ * A name a Subject hands its children (Motion's `getCurrentTreeVariants`): `own` if it names its own
558
558
  * variants, else `fromParent` unless it sets `inherit={false}`.
559
559
  */
560
560
  export const handedDown = <A extends Config.WardicVariantLabels | false>(config: VariantConfig, own: () => A | undefined, fromParent: () => A | undefined): A | undefined =>
@@ -563,11 +563,11 @@ export const handedDown = <A extends Config.WardicVariantLabels | false>(config:
563
563
  onFalse: () => Bool.match(config.inherit === false, { onTrue: constUndefined, onFalse: fromParent }),
564
564
  })
565
565
 
566
- /** An element's own transition, else the one it inherits. */
566
+ /** A Subject's own transition, else the one it inherits. */
567
567
  export const ownOrInherited = (own: Config.WardicTransition | undefined, inherited: WardicVariantContextValue | undefined): Config.WardicTransition | undefined =>
568
568
  UndefinedOr.match(own, { onUndefined: () => UndefinedOr.map(inherited, (context) => context.transition()), onDefined: identity })
569
569
 
570
- /** The stagger config an element's `transition` gives its Variant children. */
570
+ /** The stagger config a Subject's `transition` gives its Variant children. */
571
571
  export const staggerOf = (transition: Config.WardicTransition | undefined): WardicStaggerConfig =>
572
572
  UndefinedOr.match(transition, { onUndefined: () => staggerWith({}), onDefined: staggerWith })
573
573
 
@@ -593,7 +593,7 @@ export const directed = (index: number, total: number, direction: 1 | -1): numbe
593
593
 
594
594
  /**
595
595
  * Where a stagger reports a `delayChildren` function that throws: the runtime it's reported on, and whether
596
- * it's failing, so a run of throws is reported once. A Variant child's is its element's, for its life, its
596
+ * it's failing, so a run of throws is reported once. A Variant child's is its Subject's, for its life, its
597
597
  * run ended by its next clean call. A presence's exit and a server's Appear timing make one for the event,
598
598
  * `event`, whose first throw is reported whatever its other calls do.
599
599
  */
@@ -627,7 +627,7 @@ export const childDelayOf = (s: WardicStaggerConfig, index: number, total: numbe
627
627
  const DELAY_FAILED = "wardic.stagger: a delayChildren function failed"
628
628
 
629
629
  /** `delayChildren` called for a child, a throw its child's: no delay, reported once a run on `failures`. */
630
- // A child's run is its element's, whatever name it's staggered under: a parent's own transition staggers
630
+ // A child's run is its Subject's, whatever name it's staggered under: a parent's own transition staggers
631
631
  // every name with one function, so a run kept by name would report it again for each. (The review's: a
632
632
  // child staggered under two names at once, one function throwing and one not, is reported at each change.)
633
633
  const calledDelayOf = (delayChildren: Config.WardicStagger, index: number, total: number, failures: DelayFailures | undefined): number => {
@@ -646,7 +646,7 @@ const calledDelayOf = (delayChildren: Config.WardicStagger, index: number, total
646
646
  }
647
647
  }
648
648
 
649
- /** A name's orchestration (#297): its stagger config, and its own `when`, from its own transition, else the element's. */
649
+ /** A name's orchestration (#297): its stagger config, and its own `when`, from its own transition, else the Subject's. */
650
650
  export interface NameConfig {
651
651
  readonly stagger: WardicStaggerConfig
652
652
  readonly when: "beforeChildren" | "afterChildren" | undefined
@@ -674,7 +674,7 @@ export const staggerWith = ({ staggerChildren = 0, delayChildren = 0, from = "fi
674
674
  export const sameStagger = (a: WardicStaggerConfig, b: WardicStaggerConfig): boolean =>
675
675
  a.amount === b.amount && a.delayChildren === b.delayChildren && a.from === b.from && a.direction === b.direction
676
676
 
677
- /** What an element provides when it has no variants of its own: its parent's context, unless `inherit={false}`. */
677
+ /** What a Subject provides when it has no variants of its own: its parent's context, unless `inherit={false}`. */
678
678
  export const passedThrough = (
679
679
  config: VariantConfig,
680
680
  parent: WardicVariantContextValue | undefined,
@@ -688,7 +688,7 @@ export const INERT_REGISTRATION: WardicChildRegistration = Object.freeze({
688
688
  dispose: () => {},
689
689
  })
690
690
 
691
- /** An element's place in variant orchestration during a server render (ADR-0021). */
691
+ /** A Subject's place in variant orchestration during a server render (ADR-0021). */
692
692
  export interface ServerVariantNode {
693
693
  /** What its children read: the same context the client builds, with inert orchestration. */
694
694
  readonly provided: WardicVariantContextValue | undefined
@@ -1,14 +1,14 @@
1
1
  /**
2
- * What a `WardicConfig` gives the Wardic elements below it (#434, Motion's `MotionConfig`), on
2
+ * What a `WardicConfig` gives the Wards' Subjects below it (#434, Motion's `MotionConfig`), on
3
3
  * every binding: its **Config transition**, its reduced motion and whether its
4
4
  * animations are skipped (#468).
5
5
  *
6
- * - **The Config transition is an element's own when it gives none,** as Motion's
7
- * `{ ...config, ...props }`: whatever reads the element's `transition` reads it, a Variant child's in
6
+ * - **The Config transition is a Subject's own when it gives none,** as Motion's
7
+ * `{ ...config, ...props }`: whatever reads the Subject's `transition` reads it, a Variant child's in
8
8
  * place of its parent's (Q3).
9
- * - **Its reduced motion** (ADR-0029) is the element's, over the `WardicProvider`'s (Q2), as Motion
10
- * reads its `MotionConfig`'s per element.
11
- * - **`skipAnimations`** (#468) makes every animation of the elements below a **Skipped animation**,
9
+ * - **Its reduced motion** (ADR-0029) is the Subject's, over the `WardicProvider`'s (Q2), as Motion
10
+ * reads its `MotionConfig`'s per Subject.
11
+ * - **`skipAnimations`** (#468) makes every animation of the Subjects below a **Skipped animation**,
12
12
  * Motion's `MotionConfig` `skipAnimations`, whatever their reduced motion.
13
13
  * - **`isValidProp`** (#443) keeps the props it says aren't valid from being passed on, Motion's
14
14
  * `MotionConfig` `isValidProp`.
@@ -33,7 +33,7 @@ import * as VariantTarget from "./VariantTarget.ts"
33
33
 
34
34
  /** What a `WardicConfig` gives below it (#434): one value per config, read where a binding reads it. */
35
35
  export interface WardicConfigValue {
36
- /** Its **Config transition**: read when an element's transition is, so a change starts nothing by itself. */
36
+ /** Its **Config transition**: read when a Subject's transition is, so a change starts nothing by itself. */
37
37
  readonly transition: () => Config.WardicTransition | undefined
38
38
  /**
39
39
  * Its reduced motion (ADR-0029): its own, else an enclosing config's, else `undefined` for the
@@ -46,8 +46,8 @@ export interface WardicConfigValue {
46
46
  */
47
47
  readonly skipAnimations: () => boolean | undefined
48
48
  /**
49
- * Which of an element's own props it passes on (#443, Motion's `MotionConfig` `isValidProp`): its
50
- * own, else an enclosing config's, else `undefined`, every one. Read as each element is made.
49
+ * Which of a Ward's own props it passes on (#443, Motion's `MotionConfig` `isValidProp`): its
50
+ * own, else an enclosing config's, else `undefined`, every one. Read as each Subject is made.
51
51
  */
52
52
  readonly isValidProp: () => ((key: string) => boolean) | undefined
53
53
  /**
@@ -59,7 +59,7 @@ export interface WardicConfigValue {
59
59
 
60
60
  /**
61
61
  * A `WardicConfig`'s transition (#434): its own, laid over its parent's with `inherit: true` (as a
62
- * variant's own is over the element's), else its parent's when it gives none.
62
+ * variant's own is over the Subject's), else its parent's when it gives none.
63
63
  */
64
64
  export const configTransitionOf = (own: Config.WardicVariantTransition | undefined, parent: WardicConfigValue | undefined): Config.WardicTransition | undefined =>
65
65
  VariantTarget.transitionOfTarget(own, parentTransitionOf(parent))
@@ -120,14 +120,14 @@ export const pointMapOptionOf = (read: () => Config.WardicTransformPoint | undef
120
120
  }
121
121
  }
122
122
 
123
- /** The nearest config's `isValidProp` (#443), as an element is made: `undefined` for none. */
123
+ /** The nearest config's `isValidProp` (#443), as a Subject is made: `undefined` for none. */
124
124
  export const isValidPropOf = (config: WardicConfigValue | undefined): ((key: string) => boolean) | undefined => {
125
125
  if (Predicate.isUndefined(config)) return undefined
126
126
  return config.isValidProp()
127
127
  }
128
128
 
129
129
  /**
130
- * Whether an element's animations are skipped (#468), read when each starts: its nearest config's
130
+ * Whether a Subject's animations are skipped (#468), read when each starts: its nearest config's
131
131
  * `skipAnimations`. With no config above, never, and nothing made.
132
132
  */
133
133
  export const skipAnimationsOf = (config: WardicConfigValue | undefined): (() => boolean) => {
@@ -135,7 +135,7 @@ export const skipAnimationsOf = (config: WardicConfigValue | undefined): (() =>
135
135
  return () => config.skipAnimations() === true
136
136
  }
137
137
 
138
- /** The reduced motion an element's nearest config sets (#434), now: `undefined` for none, the provider's. */
138
+ /** The reduced motion a Subject's nearest config sets (#434), now: `undefined` for none, the provider's. */
139
139
  export const settingOf = (config: WardicConfigValue | undefined): ReducedMotion.Config | undefined => {
140
140
  if (Predicate.isUndefined(config)) return undefined
141
141
  return config.reducedMotion()