@solidjs/signals 0.10.2 → 0.10.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.
- package/dist/dev.js +169 -151
- package/dist/node.cjs +412 -399
- package/dist/prod.js +329 -316
- package/dist/types/core/core.d.ts +1 -6
- package/dist/types/core/index.d.ts +3 -1
- package/dist/types/core/owner.d.ts +5 -2
- package/dist/types/core/types.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/signals.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { handleAsync } from "./async.js";
|
|
2
1
|
import { $REFRESH } from "./constants.js";
|
|
3
2
|
import { type OptimisticLane } from "./lanes.js";
|
|
4
|
-
import {
|
|
5
|
-
import type { Computed, Disposable, FirewallSignal, Link, NodeOptions, Owner, Root, Signal } from "./types.js";
|
|
6
|
-
export { handleAsync };
|
|
7
|
-
export type { Computed, Disposable, FirewallSignal, Link, Owner, Root, Signal, NodeOptions };
|
|
8
|
-
export { createOwner, createRoot, dispose, getNextChildId, getObserver, getOwner, onCleanup };
|
|
3
|
+
import type { Computed, FirewallSignal, NodeOptions, Owner, Signal } from "./types.js";
|
|
9
4
|
export declare let tracking: boolean;
|
|
10
5
|
export declare let stale: boolean;
|
|
11
6
|
export declare let refreshing: boolean;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { ContextNotFoundError, NoOwnerError, NotReadyError } from "./error.js";
|
|
2
|
+
export { isEqual, untrack, runWithOwner, computed, signal, read, setSignal, optimisticSignal, optimisticComputed, isPending, pending, refresh, isRefreshing, staleValues } from "./core.js";
|
|
3
|
+
export { createOwner, createRoot, dispose, getNextChildId, getObserver, getOwner, onCleanup, peekNextChildId } from "./owner.js";
|
|
2
4
|
export { createContext, getContext, setContext, type Context, type ContextRecord } from "./context.js";
|
|
3
|
-
export {
|
|
5
|
+
export { handleAsync } from "./async.js";
|
|
4
6
|
export type { Computed, Disposable, FirewallSignal, Link, Owner, Root, Signal, NodeOptions } from "./types.js";
|
|
5
7
|
export { effect, trackedEffect, type Effect, type TrackedEffect } from "./effect.js";
|
|
6
8
|
export { action } from "./action.js";
|
|
@@ -3,11 +3,13 @@ export declare function markDisposal(el: Owner): void;
|
|
|
3
3
|
export declare function dispose(node: Computed<unknown>): void;
|
|
4
4
|
export declare function disposeChildren(node: Owner, self?: boolean, zombie?: boolean): void;
|
|
5
5
|
export declare function getNextChildId(owner: Owner): string;
|
|
6
|
+
export declare function peekNextChildId(owner: Owner): string;
|
|
6
7
|
export declare function getObserver(): Owner | null;
|
|
7
8
|
export declare function getOwner(): Owner | null;
|
|
8
9
|
export declare function onCleanup(fn: Disposable): Disposable;
|
|
9
10
|
export declare function createOwner(options?: {
|
|
10
|
-
id
|
|
11
|
+
id?: string;
|
|
12
|
+
transparent?: boolean;
|
|
11
13
|
}): Root;
|
|
12
14
|
/**
|
|
13
15
|
* Creates a new non-tracked reactive context with manual disposal
|
|
@@ -18,5 +20,6 @@ export declare function createOwner(options?: {
|
|
|
18
20
|
* @description https://docs.solidjs.com/reference/reactive-utilities/create-root
|
|
19
21
|
*/
|
|
20
22
|
export declare function createRoot<T>(init: ((dispose: () => void) => T) | (() => T), options?: {
|
|
21
|
-
id
|
|
23
|
+
id?: string;
|
|
24
|
+
transparent?: boolean;
|
|
22
25
|
}): T;
|
|
@@ -14,6 +14,7 @@ export interface Link {
|
|
|
14
14
|
export interface NodeOptions<T> {
|
|
15
15
|
id?: string;
|
|
16
16
|
name?: string;
|
|
17
|
+
transparent?: boolean;
|
|
17
18
|
equals?: ((prev: T, next: T) => boolean) | false;
|
|
18
19
|
pureWrite?: boolean;
|
|
19
20
|
unobserved?: () => void;
|
|
@@ -43,6 +44,7 @@ export interface FirewallSignal<T> extends RawSignal<T> {
|
|
|
43
44
|
export type Signal<T> = RawSignal<T> | FirewallSignal<T>;
|
|
44
45
|
export interface Owner {
|
|
45
46
|
id?: string;
|
|
47
|
+
_transparent?: boolean;
|
|
46
48
|
_disposal: Disposable | Disposable[] | null;
|
|
47
49
|
_parent: Owner | null;
|
|
48
50
|
_context: Record<symbol | string, unknown>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ContextNotFoundError, NoOwnerError, NotReadyError, action, createContext, createOwner, createRoot, runWithOwner, flush, getNextChildId, getContext, setContext, getOwner, onCleanup, getObserver, isEqual, untrack, isPending, pending, isRefreshing, refresh, SUPPORTS_PROXY } from "./core/index.js";
|
|
1
|
+
export { ContextNotFoundError, NoOwnerError, NotReadyError, action, createContext, createOwner, createRoot, runWithOwner, flush, getNextChildId, peekNextChildId, getContext, setContext, getOwner, onCleanup, getObserver, isEqual, untrack, isPending, pending, isRefreshing, refresh, SUPPORTS_PROXY } from "./core/index.js";
|
|
2
2
|
export type { Owner, Context, ContextRecord, IQueue } from "./core/index.js";
|
|
3
3
|
export * from "./signals.js";
|
|
4
4
|
export { mapArray, repeat, type Maybe } from "./map.js";
|
package/dist/types/signals.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export interface MemoOptions<T> {
|
|
|
40
40
|
id?: string;
|
|
41
41
|
/** Debug name (dev mode only) */
|
|
42
42
|
name?: string;
|
|
43
|
+
/** When true, the owner is invisible to the ID scheme -- inherits parent ID and doesn't consume a childCount slot */
|
|
44
|
+
transparent?: boolean;
|
|
43
45
|
/** Custom equality function, or `false` to always notify subscribers */
|
|
44
46
|
equals?: false | ((prev: T, next: T) => boolean);
|
|
45
47
|
/** Callback invoked when the computed loses all subscribers */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/signals",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "SolidJS' standalone
|
|
3
|
+
"version": "0.10.4",
|
|
4
|
+
"description": "SolidJS' standalone reactivity implementation",
|
|
5
5
|
"author": "Ryan Carniato",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|