@wardic/solid 2.1.2 → 2.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.
Files changed (103) hide show
  1. package/dist/browser/batch-reorder-places.js +3 -3
  2. package/dist/browser/batch-reorder.js +8 -5
  3. package/dist/browser/batch-reorder.js.map +1 -1
  4. package/dist/browser/create-animation-controls.js +22 -0
  5. package/dist/browser/create-animation-controls.js.map +1 -0
  6. package/dist/browser/gesture-callbacks.js +3 -1
  7. package/dist/browser/gesture-callbacks.js.map +1 -1
  8. package/dist/browser/index.js +1 -1
  9. package/dist/browser/index.js.map +1 -1
  10. package/dist/browser/lifecycle.js +22 -13
  11. package/dist/browser/lifecycle.js.map +1 -1
  12. package/dist/browser/motion-props.js +1 -1
  13. package/dist/browser/presence-hooks.js +1 -1
  14. package/dist/browser/presence-hooks.js.map +1 -1
  15. package/dist/browser/stage-ward.js +2 -2
  16. package/dist/browser/stage-ward.js.map +1 -1
  17. package/dist/browser/unstable/v2/index.js.map +1 -1
  18. package/dist/browser/v1/batch-reorder-group.js +4 -4
  19. package/dist/browser/v1/create-ward.js +3 -3
  20. package/dist/browser/v1/create-ward.js.map +1 -1
  21. package/dist/browser/v1/index.js +1 -1
  22. package/dist/browser/v1/index.js.map +1 -1
  23. package/dist/browser/v1/presence.js +1 -1
  24. package/dist/browser/v1/presence.js.map +1 -1
  25. package/dist/browser/ward.js +3 -3
  26. package/dist/browser/ward.js.map +1 -1
  27. package/dist/server/batch-reorder-places.js +3 -3
  28. package/dist/server/batch-reorder.js +8 -5
  29. package/dist/server/batch-reorder.js.map +1 -1
  30. package/dist/server/create-animation-controls.js +22 -0
  31. package/dist/server/create-animation-controls.js.map +1 -0
  32. package/dist/server/gesture-callbacks.js +3 -1
  33. package/dist/server/gesture-callbacks.js.map +1 -1
  34. package/dist/server/index.js +1 -1
  35. package/dist/server/index.js.map +1 -1
  36. package/dist/server/lifecycle.js +22 -13
  37. package/dist/server/lifecycle.js.map +1 -1
  38. package/dist/server/motion-props.js +1 -1
  39. package/dist/server/presence-hooks.js +1 -1
  40. package/dist/server/presence-hooks.js.map +1 -1
  41. package/dist/server/stage-ward.js +2 -2
  42. package/dist/server/stage-ward.js.map +1 -1
  43. package/dist/server/unstable/v2/index.js.map +1 -1
  44. package/dist/server/v1/batch-reorder-group.js +4 -4
  45. package/dist/server/v1/create-ward.js +3 -3
  46. package/dist/server/v1/create-ward.js.map +1 -1
  47. package/dist/server/v1/index.js +1 -1
  48. package/dist/server/v1/index.js.map +1 -1
  49. package/dist/server/v1/presence.js +1 -1
  50. package/dist/server/v1/presence.js.map +1 -1
  51. package/dist/server/ward.js +3 -3
  52. package/dist/server/ward.js.map +1 -1
  53. package/dist/solid/batch-reorder-places.js +3 -3
  54. package/dist/solid/batch-reorder.d.ts.map +1 -1
  55. package/dist/solid/batch-reorder.js +8 -5
  56. package/dist/solid/batch-reorder.js.map +1 -1
  57. package/dist/solid/create-animation-controls.d.ts +20 -0
  58. package/dist/solid/create-animation-controls.d.ts.map +1 -0
  59. package/dist/solid/create-animation-controls.js +22 -0
  60. package/dist/solid/create-animation-controls.js.map +1 -0
  61. package/dist/solid/gesture-callbacks.d.ts.map +1 -1
  62. package/dist/solid/gesture-callbacks.js +2 -0
  63. package/dist/solid/gesture-callbacks.js.map +1 -1
  64. package/dist/solid/index.d.ts +4 -3
  65. package/dist/solid/index.d.ts.map +1 -1
  66. package/dist/solid/index.jsx +1 -1
  67. package/dist/solid/index.jsx.map +1 -1
  68. package/dist/solid/lifecycle.d.ts +13 -5
  69. package/dist/solid/lifecycle.d.ts.map +1 -1
  70. package/dist/solid/lifecycle.js +20 -21
  71. package/dist/solid/lifecycle.js.map +1 -1
  72. package/dist/solid/motion-props.js +1 -1
  73. package/dist/solid/presence-hooks.jsx +1 -1
  74. package/dist/solid/stage-ward.jsx +2 -2
  75. package/dist/solid/stage-ward.jsx.map +1 -1
  76. package/dist/solid/unstable/v2/index.d.ts +4 -0
  77. package/dist/solid/unstable/v2/index.d.ts.map +1 -1
  78. package/dist/solid/unstable/v2/index.jsx.map +1 -1
  79. package/dist/solid/v1/batch-reorder-group.jsx +4 -4
  80. package/dist/solid/v1/create-ward.jsx +3 -3
  81. package/dist/solid/v1/create-ward.jsx.map +1 -1
  82. package/dist/solid/v1/index.d.ts +3 -1
  83. package/dist/solid/v1/index.d.ts.map +1 -1
  84. package/dist/solid/v1/index.jsx +1 -1
  85. package/dist/solid/v1/index.jsx.map +1 -1
  86. package/dist/solid/v1/presence.jsx +1 -1
  87. package/dist/solid/ward.jsx +3 -3
  88. package/package.json +5 -5
  89. package/src/batch-reorder-places.ts +3 -3
  90. package/src/batch-reorder.ts +8 -5
  91. package/src/create-animation-controls.ts +22 -0
  92. package/src/gesture-callbacks.ts +2 -0
  93. package/src/index.tsx +4 -2
  94. package/src/lifecycle.ts +32 -24
  95. package/src/motion-props.ts +1 -1
  96. package/src/presence-hooks.tsx +1 -1
  97. package/src/stage-ward.tsx +3 -3
  98. package/src/unstable/v2/index.tsx +4 -0
  99. package/src/v1/batch-reorder-group.tsx +4 -4
  100. package/src/v1/create-ward.tsx +4 -4
  101. package/src/v1/index.tsx +3 -1
  102. package/src/v1/presence.tsx +1 -1
  103. package/src/ward.tsx +5 -5
package/src/lifecycle.ts CHANGED
@@ -100,6 +100,11 @@ export interface WardDragInfo extends GestureInfo.WardicDragInfo {
100
100
  readonly element: WardElement
101
101
  }
102
102
 
103
+ /** A drag's or a pan's end (Motion's `PanInfo` at `onDragEnd`): its {@link WardDragInfo}, and how it ended, `endedBy` (#1042). */
104
+ export interface WardDragEndInfo extends GestureInfo.WardicDragEndInfo {
105
+ readonly element: WardElement
106
+ }
107
+
103
108
  /** What each of `next(name)`'s names resolves to. */
104
109
  export interface WardEvents {
105
110
  /** The next landing. */
@@ -135,8 +140,8 @@ export interface WardEvents {
135
140
  readonly directionLock: "x" | "y"
136
141
  /** That drag moved: its start and each move after (Motion's `onDrag`). */
137
142
  readonly drag: WardDragInfo
138
- /** That drag ended at its release (Motion's `onDragEnd`). */
139
- readonly dragEnd: WardDragInfo
143
+ /** That drag ended: at its release, a cancel or a lost release, as its `endedBy` says (Motion's `onDragEnd`). */
144
+ readonly dragEnd: WardDragEndInfo
140
145
  /**
141
146
  * The drag's release came to rest on its own (Motion's `onDragTransitionEnd`): its Fling
142
147
  * or its spring back, or at once for one released in place. Not for one a grab stopped.
@@ -152,8 +157,8 @@ export interface WardEvents {
152
157
  readonly panStart: WardDragInfo
153
158
  /** That pan moved: its start and each move after (Motion's `onPan`). */
154
159
  readonly pan: WardDragInfo
155
- /** That pan ended at its release, or was cancelled (Motion's `onPanEnd`). Only a pan that started. */
156
- readonly panEnd: WardDragInfo
160
+ /** That pan ended at its release, or was cancelled, as its `endedBy` says (Motion's `onPanEnd`). Only a pan that started. */
161
+ readonly panEnd: WardDragEndInfo
157
162
  /**
158
163
  * The element came into view, as its `viewport` says (Motion's `onViewportEnter`). One that
159
164
  * starts out of view tells nothing until it enters.
@@ -249,21 +254,16 @@ const PRESS_EVENT: Record<Recognizer.PressPhase, WardEvent | undefined> = {
249
254
  }
250
255
 
251
256
  /** A drag's or a pan's start or end. */
252
- type MovementEvent = "dragStart" | "dragEnd" | "panStart" | "panEnd"
253
-
254
- /** Each drag phase's event: its end; its start, which `drag` hears too, is told on its own. */
255
- const DRAG_EVENT: Record<Drag.Sample["phase"], MovementEvent | undefined> = {
256
- start: "dragStart",
257
- move: undefined,
258
- end: "dragEnd",
257
+ interface MovementEvents {
258
+ readonly start: "dragStart" | "panStart"
259
+ readonly end: "dragEnd" | "panEnd"
259
260
  }
260
261
 
261
- /** Each pan phase's event past its session's start: as {@link DRAG_EVENT}, `pan` its every move. */
262
- const PAN_EVENT: Record<Drag.Sample["phase"], MovementEvent | undefined> = {
263
- start: "panStart",
264
- move: undefined,
265
- end: "panEnd",
266
- }
262
+ /** A drag's start and end events: its start, which `drag` hears too, is told on its own. */
263
+ const DRAG_EVENTS: MovementEvents = { start: "dragStart", end: "dragEnd" }
264
+
265
+ /** A pan's, past its session's start: as {@link DRAG_EVENTS}, `pan` its every move. */
266
+ const PAN_EVENTS: MovementEvents = { start: "panStart", end: "panEnd" }
267
267
 
268
268
  /**
269
269
  * A ward's lifecycle, made under its `owner`. It's the spine's {@link AnimationHooks}; the ward
@@ -420,9 +420,9 @@ export class Lifecycle implements Spine.AnimationHooks {
420
420
  dragged(sample: Drag.Sample, locked: boolean, element: WardElement): void {
421
421
  // A sensor given the ward reads every sample, as one on its element would (#884).
422
422
  UndefinedOr.map(this.samples, (heard) => Iter.forEach(heard, (listener) => listener(sample)))
423
- if (sample.cancelled === true) return
423
+ if (sample.endedBy === "controls") return
424
424
  if (Bool.and(locked, sample.phase === "start")) this.tell("directionLock", () => sample.axis as "x" | "y")
425
- this.moved(DRAG_EVENT[sample.phase], "drag", sample, element)
425
+ this.moved(DRAG_EVENTS, "drag", sample, element)
426
426
  }
427
427
 
428
428
  /** A pan's sample (#273): its session's start, then as a drag's. */
@@ -432,7 +432,7 @@ export class Lifecycle implements Spine.AnimationHooks {
432
432
  this.tell("panSessionStart", () => ({ ...GestureInfo.pointOfSample(sample), element }))
433
433
  return
434
434
  }
435
- this.moved(PAN_EVENT[sample.phase], "pan", sample as Drag.Sample, element)
435
+ this.moved(PAN_EVENTS, "pan", sample as Drag.Sample, element)
436
436
  }
437
437
 
438
438
  /** The drag's release came to rest on its own (#273). */
@@ -455,12 +455,20 @@ export class Lifecycle implements Spine.AnimationHooks {
455
455
  this.tell(Bool.match(edge.active, { onTrue: (): WardEvent => "viewportEnter", onFalse: () => "viewportLeave" }), constUndefined)
456
456
  }
457
457
 
458
- /** A drag's or a pan's sample past a pan's session's start: its start's or end's event (`named`), then `every` at its start and each move. */
459
- private moved(named: MovementEvent | undefined, every: "drag" | "pan", sample: Drag.Sample, element: WardElement): void {
458
+ /**
459
+ * A drag's or a pan's sample past a pan's session's start: its start's event, then `every` at its start
460
+ * and each move; at its end, its end's event, told how it ended (#1042). Each info built only for a
461
+ * reader. Plain statements: it runs at every move.
462
+ */
463
+ private moved(events: MovementEvents, every: "drag" | "pan", sample: Drag.Sample, element: WardElement): void {
460
464
  if (Predicate.isUndefined(this.events)) return
461
465
  const info = (): WardDragInfo => ({ ...GestureInfo.dragInfoOf(sample), element })
462
- if (Predicate.isNotUndefined(named)) this.tell(named, info)
463
- if (sample.phase !== "end") this.tell(every, info)
466
+ if (sample.phase === "end") {
467
+ this.tell(events.end, (): WardDragEndInfo => ({ ...GestureInfo.dragEndInfoOf(sample), element }))
468
+ return
469
+ }
470
+ if (sample.phase === "start") this.tell(events.start, info)
471
+ this.tell(every, info)
464
472
  }
465
473
 
466
474
  /** Resolve the `next(name)` calls waiting, with `value()`, made once there are any. */
@@ -101,7 +101,7 @@ type ConfigKey = (typeof CONFIG_KEYS)[number]
101
101
  * it. A build allocates its config alone (#525, #540).
102
102
  */
103
103
  const configBuildOf = (motion: WardicMotionProps, keys: ReadonlyArray<ConfigKey>): Reactivity.Accessor<WardConfig.WardConfig> => () => {
104
- // Per element at mount (#540): a loop.
104
+ // Per Subject at mount (#540): a loop.
105
105
  const config: Record<string, unknown> = {}
106
106
  for (const key of keys) {
107
107
  const value = motion[key]
@@ -64,7 +64,7 @@ const watchOf = (
64
64
  UndefinedOr.map(usePresenceContext(), (presence) =>
65
65
  UndefinedOr.map(presence.watch, (watch) =>
66
66
  watch({
67
- element: () => element,
67
+ subject: () => element,
68
68
  holds,
69
69
  leave: (custom, release) => {
70
70
  setPresent(false)
@@ -177,7 +177,7 @@ const NO_GESTURES: Gestures = { subject: undefined, hovered: false, pressed: fal
177
177
  /** The Subject it's on: its spine, its gate registration, and which of its recognizers run. */
178
178
  interface Mounted {
179
179
  readonly subject: object
180
- readonly spine: Spine.ElementSpine
180
+ readonly spine: Spine.SubjectSpine
181
181
  /** Its spine's record of what it drew: a Scene object's own each Subject, as the last exits beside the next. */
182
182
  readonly snapshot: Spine.Snapshot
183
183
  hover: boolean
@@ -579,11 +579,11 @@ const wardOn = (
579
579
  // Its `initial`, written before its first frame is drawn (ADR-0070 decision 5).
580
580
  if (Bool.not(Rec.isEmptyRecord(begun.initialValues))) gate.write(mountId, begun.initialValues)
581
581
  let exiting: (() => void) | undefined
582
- const spine = Spine.makeElementSpine({
582
+ const spine = Spine.makeSubjectSpine({
583
583
  runtime,
584
584
  gate,
585
585
  id: mountId,
586
- element: subject,
586
+ subject,
587
587
  tag: undefined,
588
588
  config: cfg,
589
589
  parent: node.inherited,
@@ -190,6 +190,8 @@ export {
190
190
  /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
191
191
  WardicStage,
192
192
  /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
193
+ type WardDragEndInfo,
194
+ /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
193
195
  type WardDragInfo,
194
196
  /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
195
197
  type WardElement,
@@ -446,6 +448,8 @@ export {
446
448
  /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
447
449
  type WardicAnimateOptions,
448
450
  /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
451
+ type WardicAnimationEnd,
452
+ /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
449
453
  type WardicAnimationSequence,
450
454
  /** @deprecated `@wardic/solid/unstable/v2` is `@wardic/solid` since 2.0: import it from there. This alias goes at Wardic's next major (#566). */
451
455
  type WardicAnimationSubject,
@@ -264,7 +264,7 @@ const attributeOn = (el: Element, name: string, value: string | undefined): void
264
264
 
265
265
  /** `el`'s style taken from `prev` to `next`: each key `next` drops removed, each it changes set. */
266
266
  const restyle = (el: HTMLElement, prev: Style.Style, next: Style.Style): void => {
267
- // Per element at mount (#540): statements.
267
+ // Per Subject at mount (#540): statements.
268
268
  Arr.forEach(Rec.keys(prev), (key) => {
269
269
  if (Predicate.isNullish(next[key])) el.style.removeProperty(key)
270
270
  })
@@ -468,7 +468,7 @@ const ItemElement = <V,>({ tag, local, rest, item, writes }: ItemElementProps<V>
468
468
 
469
469
  /** A new element for `tag`, or, hydrating, the server's next one: Solid's `<Dynamic>`'s. */
470
470
  const elementFor = (tag: string, hydrating: boolean): HTMLElement => {
471
- // Per element at mount (#540): statements.
471
+ // Per Subject at mount (#540): statements.
472
472
  if (hydrating) return getNextElement() as HTMLElement
473
473
  return document.createElement(tag)
474
474
  }
@@ -478,7 +478,7 @@ const elementFor = (tag: string, hydrating: boolean): HTMLElement => {
478
478
  * new element as one CSS text (Q47), hydrating a key at a time, and from then on the group's to write.
479
479
  */
480
480
  const itemStyleOn = <V,>(el: HTMLElement, hydrating: boolean, local: ItemLocal<V>, item: BatchReorderItem, shared: SharedStyle): void => {
481
- // Per element at mount (#540): statements.
481
+ // Per Subject at mount (#540): statements.
482
482
  if ("style" in local) {
483
483
  createRenderEffect((prev: Style.Style) => {
484
484
  const next = item.style(local.style)
@@ -503,7 +503,7 @@ const attributeFor = <V,>(
503
503
  shared: SharedAttribute,
504
504
  own: (local: ItemLocal<V>, shared: SharedAttribute) => string | undefined,
505
505
  ): void => {
506
- // Per element at mount (#540): statements.
506
+ // Per Subject at mount (#540): statements.
507
507
  if (key in local) {
508
508
  createRenderEffect(() => attributeOn(el, shared.name, own(local, shared)))
509
509
  return
@@ -881,11 +881,11 @@ export function runSpine(opts: RunSpineOptions): void {
881
881
 
882
882
  // The spine (core's `unstable/Spine`): on each target change, end the running legs and reseed a fresh
883
883
  // primitive from the Snapshot (velocity-preserving), into the gate.
884
- const spineOptions: Spine.ElementSpineOptions = {
884
+ const spineOptions: Spine.SubjectSpineOptions = {
885
885
  runtime,
886
886
  gate,
887
887
  id,
888
- element,
888
+ subject: element,
889
889
  tag,
890
890
  config: configNow,
891
891
  parent,
@@ -929,12 +929,12 @@ export function runSpine(opts: RunSpineOptions): void {
929
929
  UndefinedOr.match(held.track, { onUndefined: () => Predicate.isNotUndefined(layoutNodeOf(nodeAtMount, nodeLater)), onDefined: () => held.projected }),
930
930
  })
931
931
  }
932
- const spine = Spine.makeElementSpine(spineOptions)
932
+ const spine = Spine.makeSubjectSpine(spineOptions)
933
933
  onCleanup(spine.dispose)
934
934
  // Its Imperative animations (#433) go through its spine while it's mounted.
935
935
  onCleanup(Imperative.registerAnimatable(element, spine))
936
936
  // Its Animation controls (#433) reach it while it's mounted.
937
- UndefinedOr.map(controls, (c) => onCleanup(AnimationControls.subscribe(c.controls, AnimationControls.controlledElement(c.set, { custom: () => untrack(cfg).custom, snapshot }, spine.stop))))
937
+ UndefinedOr.map(controls, (c) => onCleanup(AnimationControls.subscribe(c.controls, AnimationControls.controlledSubject(c.set, { custom: () => untrack(cfg).custom, snapshot }, spine.stop))))
938
938
  // A child back under its key starts where its leaver is drawn (#286), before its first Retarget.
939
939
  if (Predicate.isNotUndefined(taken)) spine.seed(taken)
940
940
 
package/src/v1/index.tsx CHANGED
@@ -17,7 +17,7 @@
17
17
  *
18
18
  * @deprecated Solid 1's binding, deprecated and frozen: it goes at Wardic's next major. Solid 2's is `@wardic/solid` (#566).
19
19
  */
20
- export const VERSION = "2.1.2"
20
+ export const VERSION = "2.2.0"
21
21
 
22
22
  /**
23
23
  * `WardicProvider` (one Effect runtime + `AtomRegistry` per ADR-0006), the
@@ -184,6 +184,8 @@ export {
184
184
  streamToSignal,
185
185
  } from "./bridge.tsx"
186
186
  export type {
187
+ /** @deprecated Solid 1's binding, deprecated and frozen: it goes at Wardic's next major. Solid 2's is `@wardic/solid` (#566). */
188
+ WardicDragEndInfo,
187
189
  /** @deprecated Solid 1's binding, deprecated and frozen: it goes at Wardic's next major. Solid 2's is `@wardic/solid` (#566). */
188
190
  WardicDragInfo,
189
191
  /** @deprecated Solid 1's binding, deprecated and frozen: it goes at Wardic's next major. Solid 2's is `@wardic/solid` (#566). */
@@ -208,7 +208,7 @@ const watchOf = (target: unknown, holds: boolean, onLeave: (safeToRemove: () =>
208
208
  UndefinedOr.map(usePresenceContext(), (presence) =>
209
209
  UndefinedOr.map(presence.watch, (watch) =>
210
210
  watch({
211
- element: () => elementOf(target),
211
+ subject: () => elementOf(target),
212
212
  holds,
213
213
  leave: (custom, release) => {
214
214
  setPresent(false)
package/src/ward.tsx CHANGED
@@ -1231,7 +1231,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
1231
1231
  // to run a watch in its watch Scope (#318, #379): its gesture watches and its drag track.
1232
1232
  interface Mounted {
1233
1233
  readonly element: HTMLElement
1234
- readonly spine: Spine.ElementSpine
1234
+ readonly spine: Spine.SubjectSpine
1235
1235
  /** Its layout node: made at mount, or as `layout` arrives (#582), which writes it here. */
1236
1236
  layout: ProjectionSystem.NodeHandle | undefined
1237
1237
  /** Makes its layout node on a `layout` that arrived after it mounted (#582); absent unless one was on its way. */
@@ -1557,11 +1557,11 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
1557
1557
  })
1558
1558
  }
1559
1559
  let dragTrack = UndefinedOr.map(dragGesture, driveDrag)
1560
- const spineOptions: Spine.ElementSpineOptions = {
1560
+ const spineOptions: Spine.SubjectSpineOptions = {
1561
1561
  runtime,
1562
1562
  gate,
1563
1563
  id,
1564
- element: el,
1564
+ subject: el,
1565
1565
  tag: internal.tag,
1566
1566
  config: configNow,
1567
1567
  parent: node.inherited,
@@ -1606,7 +1606,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
1606
1606
  if (Predicate.isUndefined(dragTrack)) dragTrack = driveDrag(gesture)
1607
1607
  }
1608
1608
  }
1609
- const spine = Spine.makeElementSpine(spineOptions)
1609
+ const spine = Spine.makeSubjectSpine(spineOptions)
1610
1610
  // A child back under its key starts where its leaver is drawn (#286), before its first Retarget.
1611
1611
  if (Predicate.isNotUndefined(taken)) spine.seed(taken)
1612
1612
  // Live values in `style` (#130, ADR-0043): followed from the first routed key on.
@@ -1615,7 +1615,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
1615
1615
  const unregisterAnimatable = Imperative.registerAnimatable(el, spine)
1616
1616
  const unsubscribe = UndefinedOr.match(controls, {
1617
1617
  onUndefined: () => constVoid,
1618
- onDefined: (c) => AnimationControls.subscribe(c.controls, AnimationControls.controlledElement(c.set, { custom: () => untrack(() => view.custom), snapshot }, spine.stop)),
1618
+ onDefined: (c) => AnimationControls.subscribe(c.controls, AnimationControls.controlledSubject(c.set, { custom: () => untrack(() => view.custom), snapshot }, spine.stop)),
1619
1619
  })
1620
1620
  const m: Mounted = {
1621
1621
  element: el,