effectable 1.2.0-canary.4 → 1.2.0-canary.6

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.
@@ -13,17 +13,30 @@
13
13
  * - Remount clears stale mapped state props and re-resolves the context store when needed.
14
14
  * - Class-field `onMount` / `onUnmount` (own instance properties) still go through connect wiring
15
15
  * and do not shadow store subscribe / unsubscribe.
16
+ * - Subclass-of-Connected prototype `override onMount` / `onUnmount` still run after wiring
17
+ * (own Connected hooks shadow Ext.prototype for GraphRuntime entry; connect re-resolves them).
18
+ * Own-entry `this.onMount()` remount works during user hooks; subclass `super.onMount()` is a
19
+ * sync no-op while wiring is active (avoids double-subscribe without blocking remount).
16
20
  * - `mapStateToProps` subscribe failures fail the mount; mapDispatch-only hosts still get the
17
21
  * post-mount kick-off after a successful mount.
22
+ * - Nested HOC wrap `connect(...)(connect(...)(Ctor))` is rejected: inheritance shares one
23
+ * instance and collides connect fields, which previously stack-overflowed in `onMount`.
24
+ * Nest stores via parent/child context (`connect(store)(Parent)` + `connect(mapState)(Child)`).
18
25
  *
19
26
  * @module Effectable/connect/connect
20
27
  */
21
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.CONNECT_HOC_BRAND = void 0;
22
30
  exports.connect = connect;
23
31
  const types_1 = require("../component/types");
24
32
  const context_1 = require("../component/context");
25
33
  const CONNECT_STORE_CONTEXT = (0, context_1.createContext)('EFFECTABLE_CONNECT_STORE', null);
26
34
  const CONNECT_STORE_CONTEXT_FIELD = '__connectStoreFromContext';
35
+ /**
36
+ * Brand on constructors returned by {@link connect}. Used to reject nested HOC wraps
37
+ * (`connect(...)(AlreadyConnected)`), which share one instance and recurse in `onMount`.
38
+ */
39
+ exports.CONNECT_HOC_BRAND = Symbol('effectable.connect.hocBrand');
27
40
  /**
28
41
  * Default props filtering mode for `connect` when not set explicitly via {@link ConnectOptions}.
29
42
  *
@@ -33,6 +46,25 @@ const CONNECT_STORE_CONTEXT_FIELD = '__connectStoreFromContext';
33
46
  * as a documented transitional mode.
34
47
  */
35
48
  const DEFAULT_OWN_PROPS_MODE = 'strict';
49
+ /**
50
+ * Whether `ctor` (or a superclass) was produced by {@link connect}.
51
+ *
52
+ * @param {Function} ctor - component constructor
53
+ * @returns {boolean}
54
+ */
55
+ function isConnectHocConstructor(ctor) {
56
+ let current = ctor;
57
+ const seen = new Set();
58
+ while (current !== null && typeof current === 'function' && !seen.has(current)) {
59
+ seen.add(current);
60
+ if (current[exports.CONNECT_HOC_BRAND] === true) {
61
+ return true;
62
+ }
63
+ const next = Object.getPrototypeOf(current);
64
+ current = typeof next === 'function' ? next : null;
65
+ }
66
+ return false;
67
+ }
36
68
  /**
37
69
  * Checks that a value looks like a Promise (thenable) and can be awaited asynchronously.
38
70
  *
@@ -62,6 +94,46 @@ function isStoreLike(value) {
62
94
  typeof record['select'] === 'function' &&
63
95
  typeof record['destroy'] === 'function');
64
96
  }
97
+ /**
98
+ * Resolves the user `onMount` / `onUnmount` connect should invoke after its own wiring.
99
+ *
100
+ * Order:
101
+ * 1. Own class-field hook captured in the Connected constructor (`ownCaptured`)
102
+ * 2. Nearest prototype-own hook on the instance chain below `connectedProto`
103
+ * (so `class Ext extends Connected { override onMount() {…} }` is found)
104
+ * 3. Hook on the wrapped constructor prototype (`wrappedProto`)
105
+ *
106
+ * Connected installs own lifecycle properties that shadow subclass prototype methods for
107
+ * GraphRuntime entry; without (2), those overrides are skipped while store wiring still runs.
108
+ *
109
+ * @param {object} instance - connected instance
110
+ * @param {'onMount' | 'onUnmount'} hookName - lifecycle hook name
111
+ * @param {(() => void | Promise<void>) | null} ownCaptured - class-field hook captured at construct time
112
+ * @param {object} connectedProto - `Connected.prototype` (skipped while walking)
113
+ * @param {object} wrappedProto - wrapped component `Constructor.prototype`
114
+ * @returns {(() => void | Promise<void>) | null} user hook, or null if none
115
+ */
116
+ function resolveUserConnectLifecycleHook(instance, hookName, ownCaptured, connectedProto, wrappedProto) {
117
+ if (ownCaptured !== null) {
118
+ return ownCaptured;
119
+ }
120
+ let proto = Object.getPrototypeOf(instance);
121
+ while (proto !== null && proto !== Object.prototype) {
122
+ if (proto !== connectedProto &&
123
+ Object.prototype.hasOwnProperty.call(proto, hookName)) {
124
+ const hook = proto[hookName];
125
+ if (typeof hook === 'function') {
126
+ return hook;
127
+ }
128
+ }
129
+ proto = Object.getPrototypeOf(proto);
130
+ }
131
+ const wrappedHook = wrappedProto[hookName];
132
+ if (typeof wrappedHook === 'function') {
133
+ return wrappedHook;
134
+ }
135
+ return null;
136
+ }
65
137
  /**
66
138
  * Adds metadata so the connected class can obtain the store from context before `onMount`.
67
139
  *
@@ -103,6 +175,33 @@ function getMappedPropsRecord(mapped) {
103
175
  * @param {P} props - current instance props (for the full `mapDispatch` form)
104
176
  * @returns {Record<string, unknown> | null} flat object of callbacks/dispatch wrappers, or `null` if nothing to merge
105
177
  */
178
+ /**
179
+ * Shallow equality for own-props records (RUNTIME_PROPS_RECEIVER).
180
+ * Used to avoid re-invoking mapDispatch factories when parent reconcile
181
+ * passes a new props object with the same fields — a factory that dispatches
182
+ * as a side effect would otherwise loop with a connected parent.
183
+ *
184
+ * @param {Record<string, unknown>} a - previous own props
185
+ * @param {Record<string, unknown>} b - next own props
186
+ * @returns {boolean} true when both have the same keys and `===` values
187
+ */
188
+ function shallowEqualOwnProps(a, b) {
189
+ if (a === b) {
190
+ return true;
191
+ }
192
+ const keysA = Object.keys(a);
193
+ const keysB = Object.keys(b);
194
+ if (keysA.length !== keysB.length) {
195
+ return false;
196
+ }
197
+ for (let i = 0; i < keysA.length; i += 1) {
198
+ const key = keysA[i];
199
+ if (!Object.prototype.hasOwnProperty.call(b, key) || a[key] !== b[key]) {
200
+ return false;
201
+ }
202
+ }
203
+ return true;
204
+ }
106
205
  function resolveMapDispatchProps(store, mapDispatch, props) {
107
206
  if (mapDispatch == null) {
108
207
  return null;
@@ -116,7 +215,10 @@ function resolveMapDispatchProps(store, mapDispatch, props) {
116
215
  return out;
117
216
  }
118
217
  const creators = mapDispatch;
119
- const bound = {};
218
+ // Null-prototype bag so a creator named `__proto__` becomes an own property
219
+ // instead of invoking the Object.prototype `__proto__` setter (which would
220
+ // drop the bound action and pollute `bound`'s [[Prototype]]).
221
+ const bound = Object.create(null);
120
222
  for (const key of Object.keys(creators)) {
121
223
  const ac = creators[key];
122
224
  if (typeof ac !== 'function') {
@@ -141,6 +243,15 @@ function resolveMapDispatchProps(store, mapDispatch, props) {
141
243
  */
142
244
  function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, ownPropsMode) {
143
245
  return function connectHoc(Constructor) {
246
+ // Nested `connect(...)(connect(...)(Ctor))` shares one instance: outer field
247
+ // initializers wipe inner connect state, and capturing the inner own `onMount`
248
+ // as `__connectOwnOnMount` makes `onMount` recurse until the stack overflows.
249
+ // Parent/child context nesting remains the supported pattern.
250
+ if (isConnectHocConstructor(Constructor)) {
251
+ throw new Error('[Effectable.connect] Cannot wrap an already-connected component. ' +
252
+ 'Combine mapState/mapDispatch in a single connect() call, or nest via ' +
253
+ 'parent/child context (connect(store)(Parent) + connect(mapState)(Child)).');
254
+ }
144
255
  const BaseCtor = Constructor;
145
256
  /**
146
257
  * Subclass of the original component: on mount merges dispatch props; when `mapStateToProps` is present
@@ -164,6 +275,12 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
164
275
  * `completeConnectMount` / `deliverConnectUpdate` after teardown.
165
276
  */
166
277
  __connectTornDown = false;
278
+ /**
279
+ * Set when the store observable completes (typically `store.destroy()`).
280
+ * Reconcile must not call `getState()` on a destroyed store — that throw fail-stops
281
+ * the entire GraphRuntime. Last mapped props are kept until unmount/remount.
282
+ */
283
+ __connectStoreDestroyed = false;
167
284
  /**
168
285
  * Bumped at the start of every `onMount`. Async `super.onMount` completions capture the
169
286
  * generation so a stale promise from a previous mount cannot complete / kick off after
@@ -181,9 +298,36 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
181
298
  */
182
299
  __connectOwnOnMount = null;
183
300
  __connectOwnOnUnmount = null;
301
+ /**
302
+ * True while Connected mount wiring is on the stack. Makes subclass
303
+ * `super.onMount()` (Connected.prototype) a safe no-op. Own-entry
304
+ * `this.onMount()` / GraphRuntime still remount via `__connectEntryOnMount`.
305
+ * Separate from unmount reentry so async onMount cannot block teardown.
306
+ */
307
+ __connectMountReentry = false;
308
+ /**
309
+ * True while Connected unmount teardown is on the stack. Makes subclass
310
+ * `super.onUnmount()` a safe no-op. Own-entry `this.onUnmount()` still runs
311
+ * via `__connectEntryOnUnmount` (nested save/restore of this flag).
312
+ */
313
+ __connectUnmountReentry = false;
314
+ /**
315
+ * Stable own-property mount entry (GraphRuntime / `this.onMount()`). Distinct from
316
+ * `Connected.prototype.onMount` so `super.onMount()` can no-op on reentry while
317
+ * nested remount via `this.onMount()` still runs.
318
+ */
319
+ __connectEntryOnMount;
320
+ /**
321
+ * Stable own-property unmount entry (GraphRuntime / `this.onUnmount()`).
322
+ */
323
+ __connectEntryOnUnmount;
184
324
  constructor(props) {
185
325
  super(props);
186
326
  this.__connectOwnProps = this.props;
327
+ // Own entries must stay !== Connected.prototype hooks so installConnectLifecycleHooks
328
+ // never re-captures them as user class-field hooks on rebind.
329
+ this.__connectEntryOnMount = () => this.enterConnectOnMount();
330
+ this.__connectEntryOnUnmount = () => this.enterConnectOnUnmount();
187
331
  // Class-field lifecycle hooks are own properties and shadow Connected.prototype.
188
332
  // Capture BaseCtor fields here, then reinstall Connected wiring. Subclass-of-Connected
189
333
  // class fields initialize *after* this constructor and can overwrite the wiring again;
@@ -195,7 +339,7 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
195
339
  }
196
340
  /**
197
341
  * Captures any own `onMount` / `onUnmount` that is not Connected wiring, then
198
- * reinstalls `Connected.prototype` hooks as own properties.
342
+ * reinstalls own-entry Connected hooks (not prototype methods — see mount reentry).
199
343
  *
200
344
  * Safe to call from the Connected constructor (BaseCtor class fields) and again
201
345
  * after full construction (subclass-of-Connected class fields).
@@ -206,18 +350,63 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
206
350
  const self = this;
207
351
  const protoMount = Connected.prototype.onMount;
208
352
  const protoUnmount = Connected.prototype.onUnmount;
353
+ const entryMount = this.__connectEntryOnMount;
354
+ const entryUnmount = this.__connectEntryOnUnmount;
209
355
  if (Object.prototype.hasOwnProperty.call(this, 'onMount') &&
210
356
  typeof self.onMount === 'function' &&
211
- self.onMount !== protoMount) {
357
+ self.onMount !== protoMount &&
358
+ self.onMount !== entryMount) {
212
359
  this.__connectOwnOnMount = self.onMount;
213
360
  }
214
361
  if (Object.prototype.hasOwnProperty.call(this, 'onUnmount') &&
215
362
  typeof self.onUnmount === 'function' &&
216
- self.onUnmount !== protoUnmount) {
363
+ self.onUnmount !== protoUnmount &&
364
+ self.onUnmount !== entryUnmount) {
217
365
  this.__connectOwnOnUnmount = self.onUnmount;
218
366
  }
219
- self.onMount = protoMount;
220
- self.onUnmount = protoUnmount;
367
+ self.onMount = entryMount;
368
+ self.onUnmount = entryUnmount;
369
+ }
370
+ /**
371
+ * Runs connect mount wiring. Nested own-entry remount saves/restores the reentry
372
+ * flag so an outer `super.onMount()` guard stays active afterward.
373
+ *
374
+ * @returns {void | Promise<void>}
375
+ */
376
+ enterConnectOnMount() {
377
+ const wasReentry = this.__connectMountReentry;
378
+ this.__connectMountReentry = true;
379
+ try {
380
+ return this.runConnectOnMount();
381
+ }
382
+ finally {
383
+ this.__connectMountReentry = wasReentry;
384
+ }
385
+ }
386
+ /**
387
+ * Runs connect unmount teardown with nested save/restore of the reentry flag.
388
+ *
389
+ * @returns {void | Promise<void>}
390
+ */
391
+ enterConnectOnUnmount() {
392
+ const wasReentry = this.__connectUnmountReentry;
393
+ this.__connectUnmountReentry = true;
394
+ try {
395
+ return this.runConnectOnUnmount();
396
+ }
397
+ finally {
398
+ this.__connectUnmountReentry = wasReentry;
399
+ }
400
+ }
401
+ /**
402
+ * User lifecycle hook for this instance: class field, Connected-subclass prototype
403
+ * override, or wrapped constructor prototype.
404
+ *
405
+ * @param {'onMount' | 'onUnmount'} hookName
406
+ * @returns {(() => void | Promise<void>) | null}
407
+ */
408
+ resolveUserLifecycleHook(hookName) {
409
+ return resolveUserConnectLifecycleHook(this, hookName, hookName === 'onMount' ? this.__connectOwnOnMount : this.__connectOwnOnUnmount, Connected.prototype, Constructor.prototype);
221
410
  }
222
411
  /**
223
412
  * Delivers an update-pass via `setState({})` and marks that the post-mount kick-off
@@ -290,19 +479,45 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
290
479
  * reconcile → applyToScope → dispatch → … → fail-stop).
291
480
  *
292
481
  * After mount, props stay current via the store subscription and
293
- * {@link RUNTIME_PROPS_RECEIVER}; post-mount `applyToScope` only republishes the store.
482
+ * {@link RUNTIME_PROPS_RECEIVER}; post-mount `applyToScope` only republishes the store
483
+ * (still after delegating to the wrapped class's `applyToScope` when present).
484
+ *
485
+ * After `store.destroy()`, skip live `getState()` / mapDispatch refresh — that throw
486
+ * would fail-stop the entire GraphRuntime on the next parent `setState`. Keep last
487
+ * mapped props and still publish the cached store reference for context identity.
294
488
  *
295
489
  * @param {ContextScope} parentScope - parent scope
296
490
  * @returns {ContextScope} scope for child nodes
297
491
  */
298
492
  applyToScope(parentScope) {
299
- const store = this.resolveConnectStore();
300
- // Pre-mount only: first compose runs before onMount, so own-props must be
301
- // stripped / mapped here. Never re-sync on dirty/update flushes after mount.
493
+ // Preserve the wrapped class's applyToScope (ContextProvider or a custom
494
+ // context publisher). Skipping super silently drops user tokens from the
495
+ // child scope while CONNECT_STORE_CONTEXT still publishes — children see
496
+ // token defaults instead of the intended provider values.
497
+ const baseApply = Constructor.prototype.applyToScope;
498
+ const scopeForChildren = typeof baseApply === 'function'
499
+ ? baseApply.call(this, parentScope)
500
+ : parentScope;
501
+ const store = this.tryResolveConnectStore();
502
+ if (store !== null) {
503
+ // Pre-mount only (#91): first compose runs before onMount, so own-props must
504
+ // be stripped / mapped here. Never re-sync on dirty/update flushes after mount —
505
+ // a mapDispatch factory that dispatches as a side effect would loop with select.
506
+ if (!this.__connectMountCompleted) {
507
+ this.syncConnectPropsBeforeCompose(store);
508
+ }
509
+ return (0, context_1.extendScope)(scopeForChildren, CONNECT_STORE_CONTEXT, store);
510
+ }
511
+ // Destroyed store: do not call getState(); keep last mapped props.
512
+ if (this.__connectStoreDestroyed && this.__connectStore !== null) {
513
+ return (0, context_1.extendScope)(scopeForChildren, CONNECT_STORE_CONTEXT, this.__connectStore);
514
+ }
515
+ // Missing store (never resolved) — same public error as before.
516
+ const resolved = this.resolveConnectStore();
302
517
  if (!this.__connectMountCompleted) {
303
- this.syncConnectPropsBeforeCompose(store);
518
+ this.syncConnectPropsBeforeCompose(resolved);
304
519
  }
305
- return (0, context_1.extendScope)(parentScope, CONNECT_STORE_CONTEXT, store);
520
+ return (0, context_1.extendScope)(scopeForChildren, CONNECT_STORE_CONTEXT, resolved);
306
521
  }
307
522
  /**
308
523
  * Applies dispatch + current mapState props before the first `compose()`.
@@ -342,7 +557,20 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
342
557
  * @returns {Store<S, A> | null}
343
558
  */
344
559
  tryResolveConnectStore() {
560
+ // After store.destroy(), getState()/dispatch throw. Treat as unresolved for reconcile
561
+ // so RUNTIME_PROPS_RECEIVER rebuilds from last mapped props instead of fail-stopping.
562
+ if (this.__connectStoreDestroyed) {
563
+ return null;
564
+ }
345
565
  if (this.__connectStore !== null) {
566
+ // Belt-and-suspenders: if subscription was already dropped, complete may not run.
567
+ try {
568
+ this.__connectStore.getState();
569
+ }
570
+ catch {
571
+ this.__connectStoreDestroyed = true;
572
+ return null;
573
+ }
346
574
  return this.__connectStore;
347
575
  }
348
576
  if (isStoreLike(this.__connectStoreFromContext)) {
@@ -404,7 +632,17 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
404
632
  }
405
633
  const mappedProps = getMappedPropsRecord(mapped);
406
634
  if (mappedProps === null) {
407
- return false;
635
+ // Non-object mapState results are ignored on first apply, but a later
636
+ // null/array/primitive must clear previously applied state props.
637
+ // Otherwise logout-style mappers leave revoked fields on this.props
638
+ // (remount already cleared via __connectStateProps = null; live emits did not).
639
+ this.__connectPrevMapped = mapped;
640
+ if (this.__connectStateProps === null) {
641
+ return false;
642
+ }
643
+ this.__connectStateProps = null;
644
+ this.rebuildConnectProps();
645
+ return true;
408
646
  }
409
647
  this.__connectPrevMapped = mapped;
410
648
  this.__connectStateProps = mappedProps;
@@ -434,28 +672,55 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
434
672
  * @returns {void}
435
673
  */
436
674
  [types_1.RUNTIME_PROPS_RECEIVER](nextProps) {
437
- this.__connectOwnProps = nextProps;
675
+ const nextOwnProps = nextProps;
676
+ // Parent compose always allocates a new props object. Re-running mapDispatch
677
+ // when own-props are shallow-equal re-enters factories that dispatch as a
678
+ // side effect: dispatch → parent select → setState → dirty parent → child
679
+ // UPDATE → RUNTIME_PROPS_RECEIVER → dispatch → … → GraphRuntime fail-stop.
680
+ // Distinct from applyToScope dirty re-sync (#91): this path is props receive.
681
+ const ownPropsChanged = !shallowEqualOwnProps(this.__connectOwnProps, nextOwnProps);
682
+ this.__connectOwnProps = nextOwnProps;
438
683
  const store = this.tryResolveConnectStore();
439
684
  if (store !== null) {
440
685
  if (mapStateToProps != null) {
441
686
  const nextMapped = mapStateToProps(store.getState(), this.__connectOwnProps);
442
687
  this.applyMappedStateProps(nextMapped);
443
688
  }
444
- this.refreshDispatchProps(store);
689
+ // Only re-bind dispatch when own-props actually changed. Factories that
690
+ // close over own-props must re-run; pure (dispatch)=>… factories and
691
+ // action-creator maps stay stable across parent identity-only updates.
692
+ if (ownPropsChanged) {
693
+ this.refreshDispatchProps(store);
694
+ }
445
695
  return;
446
696
  }
447
697
  this.rebuildConnectProps();
448
698
  }
449
699
  /**
450
- * Wires dispatch props and, if needed, a state subscription; then calls the base class `onMount`.
700
+ * Prototype entry used by subclass `super.onMount()`. GraphRuntime and
701
+ * `this.onMount()` use `__connectEntryOnMount` instead so nested remount works
702
+ * while `super.onMount()` during an active mount remains a no-op.
451
703
  *
452
704
  * @returns {void | Promise<void>} synchronously or a Promise if the superclass `onMount` is async
453
705
  */
454
706
  onMount() {
707
+ // Subclass `super.onMount()` while Connected wiring is already on the stack.
708
+ if (this.__connectMountReentry) {
709
+ return;
710
+ }
711
+ return this.enterConnectOnMount();
712
+ }
713
+ /**
714
+ * Connect `onMount` body (store wiring + user hook). Split from the reentry gate.
715
+ *
716
+ * @returns {void | Promise<void>}
717
+ */
718
+ runConnectOnMount() {
455
719
  // Remount on the same instance must restart the first-pass / kick-off state machine.
456
720
  // PR #59 reset only `__connectTornDown`; leaving `__connectFirstPass` false skipped
457
721
  // user `onMount` and froze store→props delivery (`__connectMountCompleted` never set).
458
722
  this.__connectTornDown = false;
723
+ this.__connectStoreDestroyed = false;
459
724
  this.__connectFirstPass = true;
460
725
  this.__connectKickoffScheduled = false;
461
726
  this.__connectDeliveredUpdateAfterMount = false;
@@ -474,9 +739,8 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
474
739
  this.disposeConnectSubscription();
475
740
  const store = this.resolveConnectStore();
476
741
  this.refreshDispatchProps(store);
477
- // Prefer class-field hooks captured in the constructor; else prototype methods.
478
- const superOnMount = this.__connectOwnOnMount
479
- ?? Constructor.prototype['onMount'];
742
+ // Class-field, Connected-subclass prototype override, or wrapped prototype.
743
+ const superOnMount = this.resolveUserLifecycleHook('onMount');
480
744
  const hasSuperOnMount = typeof superOnMount === 'function';
481
745
  if (mapStateToProps == null) {
482
746
  /**
@@ -552,6 +816,9 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
552
816
  // The component keeps last mapped props; callers should treat mapper throws as bugs.
553
817
  },
554
818
  complete: () => {
819
+ // store.destroy() completes select(); mark dead so later reconcile skips getState().
820
+ this.__connectStoreDestroyed = true;
821
+ this.__connectSubscription = null;
555
822
  // Destroyed store (or any completed-without-next select): BehaviorSubject.complete()
556
823
  // means new subscribers get complete only — no first `next`. Without this, connect
557
824
  // would return successfully, skip user onMount, and leave GraphRuntime ACTIVE.
@@ -628,18 +895,30 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
628
895
  });
629
896
  }
630
897
  /**
631
- * Unsubscribes from the store and delegates to the base class `onUnmount`.
898
+ * Prototype entry used by subclass `super.onUnmount()`. GraphRuntime and
899
+ * `this.onUnmount()` use `__connectEntryOnUnmount` instead.
632
900
  *
633
901
  * @returns {void | Promise<void>}
634
902
  */
635
903
  onUnmount() {
904
+ // Subclass `super.onUnmount()` while Connected teardown is already on the stack.
905
+ if (this.__connectUnmountReentry) {
906
+ return;
907
+ }
908
+ return this.enterConnectOnUnmount();
909
+ }
910
+ /**
911
+ * Connect `onUnmount` body (dispose + user hook). Split from the reentry gate.
912
+ *
913
+ * @returns {void | Promise<void>}
914
+ */
915
+ runConnectOnUnmount() {
636
916
  this.__connectTornDown = true;
637
917
  this.__connectPendingUpdate = false;
638
918
  // Cancels a pending post-mount kick-off (mapDispatch-only has no subscription to null out).
639
919
  this.__connectMountCompleted = false;
640
920
  this.disposeConnectSubscription();
641
- const superOnUnmount = this.__connectOwnOnUnmount
642
- ?? Constructor.prototype['onUnmount'];
921
+ const superOnUnmount = this.resolveUserLifecycleHook('onUnmount');
643
922
  if (typeof superOnUnmount !== 'function') {
644
923
  return;
645
924
  }
@@ -662,6 +941,12 @@ function buildConnectHoc(explicitStore, mapStateToProps, mapDispatchToProps, own
662
941
  value: Constructor.name,
663
942
  configurable: true,
664
943
  });
944
+ Object.defineProperty(Connected, exports.CONNECT_HOC_BRAND, {
945
+ value: true,
946
+ writable: false,
947
+ enumerable: false,
948
+ configurable: false,
949
+ });
665
950
  return Connected;
666
951
  };
667
952
  }
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect/connect.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QAC9C,eAAe,GAAG,mCAA2E,CAAC;QAC9F,kBAAkB,GAAG,2BAAsE,CAAC;QAC5F,OAAO,GAAG,YAAY,CAAC;IACzB,CAAC;SAAM,CAAC;QACN,eAAe,GAAG,sBAA8D,CAAC;QACjF,kBAAkB,GAAG,mCAA8E,CAAC;QACpG,OAAO,GAAG,2BAAyD,CAAC;IACtE,CAAC;IAED,MAAM,YAAY,GAAiB,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,iBAAiB,KAAK,IAAI;QAC5F,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,sBAAsB,CAAC;IAE3B,OAAO,eAAe,CACpB,KAAK,EACL,eAAe,IAAI,SAAS,EAC5B,kBAAkB,IAAI,SAAS,EAC/B,YAAY,CACb,CAAC;AACJ,CAAC"}
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @module Effectable/connect
5
5
  */
6
- export { connect } from './connect';
6
+ export { connect, CONNECT_HOC_BRAND } from './connect';
7
7
  export type { MapStateToProps, MapDispatchToProps, MapDispatchToPropsFunction, MapDispatchToPropsDispatchOnly, ActionCreatorsMap, ConnectOptions, OwnPropsMode, ConnectableInstance, ConnectableConstructor, ConnectableHocTarget } from './types';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,8BAA8B,EAC9B,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACvD,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,8BAA8B,EAC9B,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,SAAS,CAAC"}
@@ -5,7 +5,8 @@
5
5
  * @module Effectable/connect
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.connect = void 0;
8
+ exports.CONNECT_HOC_BRAND = exports.connect = void 0;
9
9
  var connect_1 = require("./connect");
10
10
  Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_1.connect; } });
11
+ Object.defineProperty(exports, "CONNECT_HOC_BRAND", { enumerable: true, get: function () { return connect_1.CONNECT_HOC_BRAND; } });
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qCAAoC;AAA3B,kGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/connect/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qCAAuD;AAA9C,kGAAA,OAAO,OAAA;AAAE,4GAAA,iBAAiB,OAAA"}
@@ -56,6 +56,14 @@ export declare function UseRef(): PropertyDecorator;
56
56
  */
57
57
  export declare class HandleRegistry {
58
58
  private readonly handles;
59
+ /**
60
+ * Monotonic registration id per key. Disposers capture the id from their
61
+ * `register` call and only delete when it still matches — so re-registering
62
+ * the *same handle object* (as `autoRegister` does across remounts) cannot
63
+ * be torn down by a stale disposer from the previous mount generation.
64
+ */
65
+ private readonly registrationIds;
66
+ private nextRegistrationId;
59
67
  private getInheritedMetadata;
60
68
  private buildRefHandle;
61
69
  private resolveHandleKey;
@@ -76,9 +84,14 @@ export declare class HandleRegistry {
76
84
  * Prefer keeping the disposer and calling it from the component's `onUnmount()`,
77
85
  * so stale handles are not left after the runtime instance stops.
78
86
  *
87
+ * The disposer is generation-scoped: after a later `register`/`autoRegister` for
88
+ * the same key (even with the same handle object identity), the previous disposer
89
+ * is a no-op. This matches remount-safe teardown for `autoRegister`, which reuses
90
+ * the instance's `@UseRef` object across mounts.
91
+ *
79
92
  * @param {string} key - handle key
80
93
  * @param {THandle} handle - imperative API object
81
- * @returns {() => void} unregister function; no-op if a different handle is now registered under the same key
94
+ * @returns {() => void} unregister function; no-op if this registration was superseded
82
95
  */
83
96
  register<THandle>(key: string, handle: THandle): () => void;
84
97
  /**