@mmstack/primitives 19.4.2 → 19.5.1

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.
@@ -27,6 +27,7 @@ export declare class MmActivity {
27
27
  private readonly tpl;
28
28
  private readonly vcr;
29
29
  private readonly parent;
30
+ private readonly onServer;
30
31
  /** When false, keep the content mounted but hidden + CD-detached. */
31
32
  readonly visible: import("@angular/core").InputSignal<boolean>;
32
33
  /** Paused == not visible — handed to the kept subtree as PAUSED_CONTEXT. */
@@ -1,4 +1,4 @@
1
- import { type Provider, type ResourceRef, type Signal } from '@angular/core';
1
+ import { type Injector, type Provider, type ResourceRef, type Signal } from '@angular/core';
2
2
  /**
3
3
  * What "not ready" means for first-load suspense:
4
4
  * - `'value'`: the resource has no value yet (`!hasValue()`). With `keepPrevious`,
@@ -64,6 +64,20 @@ export declare function createTransitionScope(): TransitionScope;
64
64
  /** Provide a fresh transition scope at a boundary so its subtree's resources are tracked independently. */
65
65
  export declare function provideTransitionScope(): Provider;
66
66
  export declare function injectTransitionScope(): TransitionScope;
67
+ /**
68
+ * A transition scope that can be re-pointed at a delegate target at runtime. Reads and
69
+ * commit/hold follow the current target; `add`/`remove` pin to the target that was current
70
+ * at add-time, so re-pointing between a resource's registration and its destroy-time removal
71
+ * never strands it in the wrong scope. With no target it behaves as a plain own-scope.
72
+ */
73
+ export type ForwardingTransitionScope = TransitionScope & {
74
+ setTarget(target: TransitionScope | null): void;
75
+ };
76
+ export declare function createForwardingScope(): ForwardingTransitionScope;
77
+ /** Provide a forwarding transition scope at a boundary (used by the transition outlet). */
78
+ export declare function provideForwardingTransitionScope(): Provider;
79
+ /** Read the transition scope reachable from `injector`, or null if none is provided there. */
80
+ export declare function getTransitionScope(injector: Injector): TransitionScope | null;
67
81
  /**
68
82
  * Returns a register function bound to the nearest transition scope: it adds a resource
69
83
  * to the scope and removes it when the caller's injection context is destroyed. Pass any
@@ -43,7 +43,7 @@ import { type Frame } from './frame-stack';
43
43
  * ]);
44
44
  *
45
45
  * // The fine-grained mapped list
46
- * const mappedUsers = mapArray(
46
+ * const mappedUsers = indexArray(
47
47
  * users,
48
48
  * (userSignal, index) => {
49
49
  * // 1. Create a fine-grained SIDE EFFECT for *this item*
@@ -64,7 +64,7 @@ import { type Frame } from './frame-stack';
64
64
  * };
65
65
  * },
66
66
  * {
67
- * // 3. Tell mapArray HOW to clean up when an item is removed, this needs to be manual as it's not a nestedEffect itself
67
+ * // 3. Tell indexArray HOW to clean up when an item is removed, this needs to be manual as it's not a nestedEffect itself
68
68
  * onDestroy: (mappedItem) => {
69
69
  * mappedItem.destroyEffect();
70
70
  * }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@mmstack/primitives",
3
- "version": "19.4.2",
3
+ "version": "19.5.1",
4
4
  "keywords": [
5
5
  "angular",
6
6
  "signals",
7
7
  "debounce",
8
- "mapArray",
8
+ "indexArray",
9
9
  "primitives"
10
10
  ],
11
11
  "license": "MIT",