@solidjs/signals 0.13.3 → 0.13.4

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,5 +1,6 @@
1
1
  import { type OptimisticLane } from "./lanes.js";
2
2
  import type { Computed } from "./types.js";
3
+ export declare function settlePendingSource(el: Computed<any>): void;
3
4
  export declare function handleAsync<T>(el: Computed<T>, result: T | PromiseLike<T> | AsyncIterable<T>, setter?: (value: T) => void): T;
4
- export declare function clearStatus(el: Computed<any>): void;
5
+ export declare function clearStatus(el: Computed<any>, clearUninitialized?: boolean): void;
5
6
  export declare function notifyStatus(el: Computed<any>, status: number, error: any, blockStatus?: boolean, lane?: OptimisticLane): void;
@@ -1,5 +1,4 @@
1
1
  import type { Computed, NodeOptions, Owner } from "./types.js";
2
- export declare let leafEffectActive: boolean;
3
2
  export interface Effect<T> extends Computed<T>, Owner {
4
3
  _effectFn: (val: T, prev: T | undefined) => void | (() => void);
5
4
  _errorFn?: (err: unknown, cleanup: () => void) => void;
@@ -25,6 +24,7 @@ export interface TrackedEffect extends Computed<void> {
25
24
  }
26
25
  /**
27
26
  * Internal tracked effect - bypasses heap, goes directly to effect queue.
28
- * Children forbidden (__DEV__ throws). Uses stale reads.
27
+ * Runs as a leaf owner: child primitives and onCleanup are forbidden (__DEV__ throws).
28
+ * Uses stale reads.
29
29
  */
30
30
  export declare function trackedEffect(fn: () => void | (() => void), options?: NodeOptions<any>): void;
@@ -34,6 +34,10 @@ export declare function mergeLanes(lane1: OptimisticLane, lane2: OptimisticLane)
34
34
  export declare function resolveLane(el: {
35
35
  _optimisticLane?: OptimisticLane;
36
36
  }): OptimisticLane | undefined;
37
+ export declare function resolveTransition(el: {
38
+ _optimisticLane?: OptimisticLane;
39
+ _transition?: Transition | null;
40
+ }): Transition | null | undefined;
37
41
  /**
38
42
  * Check if a node has an active optimistic override.
39
43
  */
@@ -11,6 +11,7 @@ export declare let projectionWriteActive: boolean;
11
11
  export declare let _hitUnhandledAsync: boolean;
12
12
  export declare function resetUnhandledAsync(): void;
13
13
  export declare function enforceLoadingBoundary(enabled: boolean): void;
14
+ export declare function shouldReadStashedOptimisticValue(node: Signal<any>): boolean;
14
15
  export declare function setProjectionWriteActive(value: boolean): void;
15
16
  export type QueueCallback = (type: number) => void;
16
17
  type QueueStub = {
@@ -28,6 +29,8 @@ export interface Transition {
28
29
  _done: boolean | Transition;
29
30
  }
30
31
  export declare function schedule(): void;
32
+ export declare function addTransitionBlocker(node: Computed<any>): void;
33
+ export declare function removeTransitionBlocker(node: Computed<any>): void;
31
34
  export interface IQueue {
32
35
  enqueue(type: number, fn: QueueCallback): void;
33
36
  run(type: number): boolean | void;
@@ -49,6 +49,7 @@ export type Signal<T> = RawSignal<T> | FirewallSignal<T>;
49
49
  export interface Owner {
50
50
  id?: string;
51
51
  _transparent?: boolean;
52
+ _childrenForbidden?: boolean;
52
53
  _snapshotScope?: boolean;
53
54
  _disposal: Disposable | Disposable[] | null;
54
55
  _parent: Owner | null;
@@ -65,6 +66,9 @@ export interface Computed<T> extends RawSignal<T>, Owner {
65
66
  _depsTail: Link | null;
66
67
  _flags: number;
67
68
  _inSnapshotScope?: boolean;
69
+ _blocked?: boolean;
70
+ _pendingSource?: Computed<any>;
71
+ _pendingSources?: Set<Computed<any>>;
68
72
  _error?: unknown;
69
73
  _statusFlags: number;
70
74
  _height: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidjs/signals",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "SolidJS' standalone reactivity implementation",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",