@mmstack/primitives 19.6.0 → 19.7.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.
@@ -1,7 +1,8 @@
1
1
  import { type Signal } from '@angular/core';
2
2
  /**
3
- * Handle for an in-progress transition: a `pending` signal (true while the transition's
4
- * resources are in flight) and a `done` promise that resolves once they all settle.
3
+ * Handle for an in-progress transition: a `pending` signal (true while the transition's OWN
4
+ * resources are in flight loads already in flight when it started are not attributed) and a
5
+ * `done` promise that resolves once they all settle.
5
6
  */
6
7
  export type TransitionRef = {
7
8
  readonly pending: Signal<boolean>;
@@ -41,8 +41,7 @@ export declare class SuspenseBoundary extends SuspenseBoundaryBase {
41
41
  }
42
42
  /**
43
43
  * Unscoped suspense boundary — **reads the ambient scope** instead of providing one. For cases where
44
- * the resources to coordinate are registered *above* the boundary (e.g. an app-builder page whose
45
- * manifests/connectors register at a higher injector), so the boundary observes that outer scope
44
+ * the resources to coordinate are registered *above* the boundary so the boundary observes that outer scope
46
45
  * rather than opening a fresh one. Pair with a `provideTransitionScope()` (or another boundary) in an
47
46
  * ancestor.
48
47
  */
@@ -15,7 +15,8 @@ export type Transaction = {
15
15
  export declare function createTransaction(): Transaction;
16
16
  /** The transaction in effect right now, or `null`. Stateful actions consult this to record undo. */
17
17
  export declare function activeTransaction(): Transaction | null;
18
- /** Handle for an in-progress transaction (Tier 3): the transition `pending`/`done`, plus `abort`. */
18
+ /** Handle for an in-progress transaction (Tier 3): the transaction's own `pending`/`done`
19
+ * (loads already in flight at start are not attributed to it), plus `abort`. */
19
20
  export type TransactionRef = {
20
21
  readonly pending: Signal<boolean>;
21
22
  readonly done: Promise<void>;
@@ -78,6 +78,15 @@ export declare function createForwardingScope(): ForwardingTransitionScope;
78
78
  export declare function provideForwardingTransitionScope(): Provider;
79
79
  /** Read the transition scope reachable from `injector`, or null if none is provided there. */
80
80
  export declare function getTransitionScope(injector: Injector): TransitionScope | null;
81
+ /**
82
+ * @internal Transaction-attributed pending for `startTransition`/`startTransaction`: like
83
+ * `scope.pending`, but loads already in flight when the tracker is created are NOT attributed —
84
+ * a pre-existing background load can neither settle the transaction early nor block its settle
85
+ * forever. A pre-existing flight is excluded only until it first settles; a later re-trigger of
86
+ * the same resource (e.g. the transaction's write changed its request) counts as the
87
+ * transaction's own work.
88
+ */
89
+ export declare function createAttributedPending(scope: TransitionScope): Signal<boolean>;
81
90
  /**
82
91
  * Returns a register function bound to the nearest transition scope: it adds a resource
83
92
  * to the scope and removes it when the caller's injection context is destroyed. Pass any
@@ -33,6 +33,13 @@ export type PointerDragState = {
33
33
  * otherwise the listener's element. `null` when idle.
34
34
  */
35
35
  origin: HTMLElement | null;
36
+ /**
37
+ * Whether the LAST gesture ended by being aborted (`pointercancel` /
38
+ * `lostpointercapture` / Escape / `cancel()`) rather than a normal `pointerup`.
39
+ * Only meaningful on the idle transition — consumers ending a drag branch on it
40
+ * to distinguish "drop here" from "abort". Sticky until the next `pointerdown`.
41
+ */
42
+ cancelled: boolean;
36
43
  };
37
44
  export type PointerDragOptions = SensorRunOptions & {
38
45
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmstack/primitives",
3
- "version": "19.6.0",
3
+ "version": "19.7.0",
4
4
  "keywords": [
5
5
  "angular",
6
6
  "signals",