@rlabs-inc/signals 1.4.4 → 1.6.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.
- package/README.md +27 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +79 -13
- package/dist/index.mjs +79 -13
- package/dist/primitives/bind.d.ts +24 -0
- package/dist/primitives/bind.d.ts.map +1 -1
- package/dist/primitives/linked.d.ts.map +1 -1
- package/dist/reactivity/equality.d.ts +8 -0
- package/dist/reactivity/equality.d.ts.map +1 -1
- package/dist/reactivity/tracking.d.ts +8 -0
- package/dist/reactivity/tracking.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -557,33 +557,49 @@ if (isReactive(value)) {
|
|
|
557
557
|
Control when signals trigger updates:
|
|
558
558
|
|
|
559
559
|
```typescript
|
|
560
|
-
import { signal, equals, safeEquals, shallowEquals, neverEquals, alwaysEquals, createEquals } from '@rlabs-inc/signals'
|
|
560
|
+
import { signal, derived, equals, deepEquals, safeEquals, shallowEquals, neverEquals, alwaysEquals, createEquals } from '@rlabs-inc/signals'
|
|
561
561
|
|
|
562
|
-
//
|
|
563
|
-
const a = signal(0)
|
|
562
|
+
// signal() - uses Object.is (reference equality)
|
|
563
|
+
const a = signal(0)
|
|
564
|
+
|
|
565
|
+
// derived() - uses Bun.deepEquals (structural equality) by default
|
|
566
|
+
// This prevents unnecessary propagation when computed values are structurally identical
|
|
567
|
+
const items = signal([1, 2, 3])
|
|
568
|
+
const doubled = derived(() => items.value.map(x => x * 2))
|
|
569
|
+
// If doubled produces [2, 4, 6] again, downstream effects won't re-run
|
|
570
|
+
|
|
571
|
+
// Deep equality - uses Bun.deepEquals (36ns for small objects!)
|
|
572
|
+
const c = signal({ a: 1 }, { equals: deepEquals })
|
|
573
|
+
c.value = { a: 1 } // Won't trigger - deeply equal
|
|
564
574
|
|
|
565
575
|
// Safe equality - handles NaN correctly
|
|
566
|
-
const
|
|
576
|
+
const d = signal(NaN, { equals: safeEquals })
|
|
567
577
|
|
|
568
578
|
// Shallow comparison - compares one level deep
|
|
569
|
-
const
|
|
570
|
-
c.value = { a: 1 } // Won't trigger - shallowly equal
|
|
579
|
+
const e = signal({ a: 1 }, { equals: shallowEquals })
|
|
571
580
|
|
|
572
581
|
// Always trigger updates
|
|
573
|
-
const
|
|
574
|
-
|
|
582
|
+
const f = signal(0, { equals: neverEquals })
|
|
583
|
+
f.value = 0 // Still triggers!
|
|
575
584
|
|
|
576
585
|
// Never trigger updates
|
|
577
|
-
const
|
|
578
|
-
|
|
586
|
+
const g = signal(0, { equals: alwaysEquals })
|
|
587
|
+
g.value = 100 // Doesn't trigger
|
|
579
588
|
|
|
580
589
|
// Custom equality
|
|
581
590
|
const customEquals = createEquals((a, b) =>
|
|
582
591
|
JSON.stringify(a) === JSON.stringify(b)
|
|
583
592
|
)
|
|
584
|
-
const
|
|
593
|
+
const h = signal([], { equals: customEquals })
|
|
585
594
|
```
|
|
586
595
|
|
|
596
|
+
**Default equality by primitive:**
|
|
597
|
+
| Primitive | Default | Reason |
|
|
598
|
+
|-----------|---------|--------|
|
|
599
|
+
| `signal()` | `Object.is` | User-controlled input - reference equality |
|
|
600
|
+
| `derived()` | `Bun.deepEquals` | Computed output - structural equality prevents unnecessary work |
|
|
601
|
+
| `linkedSignal()` | `Bun.deepEquals` | Computed output - structural equality |
|
|
602
|
+
|
|
587
603
|
---
|
|
588
604
|
|
|
589
605
|
## Error Handling
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export { signal, source, mutableSource, state, stateRaw } from './primitives/signal.js';
|
|
2
2
|
export { derived, createDerived, disconnectDerived } from './primitives/derived.js';
|
|
3
3
|
export { effect, createEffect, updateEffect, destroyEffect } from './primitives/effect.js';
|
|
4
|
-
export { bind, bindReadonly, isBinding, unwrap, signals } from './primitives/bind.js';
|
|
4
|
+
export { bind, bindReadonly, isBinding, unwrap, signals, disconnectBinding, bindingHasInternalSource } from './primitives/bind.js';
|
|
5
5
|
export { linkedSignal, isLinkedSignal } from './primitives/linked.js';
|
|
6
6
|
export { createSelector } from './primitives/selector.js';
|
|
7
7
|
export { effectScope, getCurrentScope, onScopeDispose } from './primitives/scope.js';
|
|
8
8
|
export { proxy, toRaw, isReactive } from './deep/proxy.js';
|
|
9
9
|
export { batch, untrack, peek } from './reactivity/batching.js';
|
|
10
10
|
export { flushSync, tick } from './reactivity/scheduling.js';
|
|
11
|
-
export { equals, safeEquals, safeNotEqual, shallowEquals, createEquals, neverEquals, alwaysEquals, } from './reactivity/equality.js';
|
|
11
|
+
export { equals, deepEquals, safeEquals, safeNotEqual, shallowEquals, createEquals, neverEquals, alwaysEquals, } from './reactivity/equality.js';
|
|
12
12
|
export { ReactiveMap } from './collections/map.js';
|
|
13
13
|
export { ReactiveSet } from './collections/set.js';
|
|
14
14
|
export { ReactiveDate } from './collections/date.js';
|
|
15
|
-
export { get, set, isDirty, setSignalStatus, markReactions, updateReaction, removeReactions, } from './reactivity/tracking.js';
|
|
15
|
+
export { get, set, isDirty, setSignalStatus, markReactions, updateReaction, removeReactions, disconnectSource, } from './reactivity/tracking.js';
|
|
16
16
|
export { DERIVED, EFFECT, RENDER_EFFECT, ROOT_EFFECT, BRANCH_EFFECT, USER_EFFECT, BLOCK_EFFECT, CLEAN, DIRTY, MAYBE_DIRTY, REACTION_IS_UPDATING, DESTROYED, INERT, EFFECT_RAN, EFFECT_PRESERVED, UNOWNED, DISCONNECTED, UNINITIALIZED, STALE_REACTION, STATE_SYMBOL, REACTIVE_MARKER, BINDING_SYMBOL, LINKED_SYMBOL, } from './core/constants.js';
|
|
17
17
|
export { activeReaction, activeEffect, untracking, writeVersion, readVersion, batchDepth, setActiveReaction, setActiveEffect, setUntracking, incrementWriteVersion, incrementReadVersion, incrementBatchDepth, decrementBatchDepth, getReadVersion, getWriteVersion, getBatchDepth, } from './core/globals.js';
|
|
18
18
|
export type { Signal, Source, Reaction, Derived, Effect, Value, ReadableSignal, WritableSignal, DerivedSignal, DisposeFn, CleanupFn, EffectFn, Equals, Uninitialized, ExtractInner, } from './core/types.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACvF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC1F,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACvF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACnF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC1F,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAClI,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,C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AAM,EACN,KAAK,EAGL,cAAc,EACd,cAAc,EACd,aAAa,EACb,SAAS,EACT,SAAS,EACT,QAAQ,EAGR,MAAM,EACN,aAAa,EACb,YAAY,GACb,MAAM,iBAAiB,CAAA;AAExB,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACpE,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACrF,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -75,14 +75,18 @@ __export(exports_src, {
|
|
|
75
75
|
equals: () => equals,
|
|
76
76
|
effectScope: () => effectScope,
|
|
77
77
|
effect: () => effect,
|
|
78
|
+
disconnectSource: () => disconnectSource,
|
|
78
79
|
disconnectDerived: () => disconnectDerived,
|
|
80
|
+
disconnectBinding: () => disconnectBinding,
|
|
79
81
|
destroyEffect: () => destroyEffect,
|
|
80
82
|
derived: () => derived,
|
|
83
|
+
deepEquals: () => deepEquals,
|
|
81
84
|
decrementBatchDepth: () => decrementBatchDepth,
|
|
82
85
|
createSelector: () => createSelector,
|
|
83
86
|
createEquals: () => createEquals,
|
|
84
87
|
createEffect: () => createEffect,
|
|
85
88
|
createDerived: () => createDerived,
|
|
89
|
+
bindingHasInternalSource: () => bindingHasInternalSource,
|
|
86
90
|
bindReadonly: () => bindReadonly,
|
|
87
91
|
bind: () => bind,
|
|
88
92
|
batchDepth: () => batchDepth,
|
|
@@ -155,6 +159,7 @@ var shallowEquals = (oldValue, newValue) => {
|
|
|
155
159
|
}
|
|
156
160
|
return true;
|
|
157
161
|
};
|
|
162
|
+
var deepEquals = typeof Bun !== "undefined" && typeof Bun.deepEquals === "function" ? (a, b) => Bun.deepEquals(a, b) : shallowEquals;
|
|
158
163
|
function createEquals(fn) {
|
|
159
164
|
return (oldValue, newValue) => fn(oldValue, newValue);
|
|
160
165
|
}
|
|
@@ -592,6 +597,26 @@ function updateDerived(derived) {
|
|
|
592
597
|
function setUpdateDerivedImpl(impl) {
|
|
593
598
|
updateDerivedImpl = impl;
|
|
594
599
|
}
|
|
600
|
+
function disconnectSource(source) {
|
|
601
|
+
const reactions = source.reactions;
|
|
602
|
+
if (reactions !== null) {
|
|
603
|
+
for (let i = 0;i < reactions.length; i++) {
|
|
604
|
+
const reaction = reactions[i];
|
|
605
|
+
const deps = reaction.deps;
|
|
606
|
+
if (deps !== null) {
|
|
607
|
+
const idx = deps.indexOf(source);
|
|
608
|
+
if (idx !== -1) {
|
|
609
|
+
const last = deps.length - 1;
|
|
610
|
+
if (idx !== last) {
|
|
611
|
+
deps[idx] = deps[last];
|
|
612
|
+
}
|
|
613
|
+
deps.pop();
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
source.reactions = null;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
595
620
|
function removeReactions(reaction, start) {
|
|
596
621
|
const deps = reaction.deps;
|
|
597
622
|
if (deps === null)
|
|
@@ -949,7 +974,7 @@ function createDerived(fn, options) {
|
|
|
949
974
|
f: flags,
|
|
950
975
|
fn,
|
|
951
976
|
v: UNINITIALIZED,
|
|
952
|
-
equals: options?.equals ??
|
|
977
|
+
equals: options?.equals ?? deepEquals,
|
|
953
978
|
reactions: null,
|
|
954
979
|
deps: null,
|
|
955
980
|
effects: null,
|
|
@@ -1246,8 +1271,9 @@ effect.tracking = function effectTracking() {
|
|
|
1246
1271
|
return activeEffect !== null;
|
|
1247
1272
|
};
|
|
1248
1273
|
// src/primitives/bind.ts
|
|
1274
|
+
var BINDING_SOURCE_SYMBOL = Symbol("binding.source");
|
|
1249
1275
|
var bindingCleanup = new FinalizationRegistry((internalSource) => {
|
|
1250
|
-
internalSource
|
|
1276
|
+
disconnectSource(internalSource);
|
|
1251
1277
|
});
|
|
1252
1278
|
function isBinding(value) {
|
|
1253
1279
|
return value !== null && typeof value === "object" && BINDING_SYMBOL in value;
|
|
@@ -1258,31 +1284,59 @@ function isSignal(value) {
|
|
|
1258
1284
|
function isGetter(value) {
|
|
1259
1285
|
return typeof value === "function";
|
|
1260
1286
|
}
|
|
1287
|
+
function isStaticPrimitive(value) {
|
|
1288
|
+
const type = typeof value;
|
|
1289
|
+
return value === null || value === undefined || type === "number" || type === "string" || type === "boolean";
|
|
1290
|
+
}
|
|
1261
1291
|
function bind(source2) {
|
|
1262
1292
|
if (isGetter(source2)) {
|
|
1263
|
-
|
|
1293
|
+
const getterBinding = {
|
|
1264
1294
|
[BINDING_SYMBOL]: true,
|
|
1295
|
+
[BINDING_SOURCE_SYMBOL]: null,
|
|
1265
1296
|
get value() {
|
|
1266
1297
|
return source2();
|
|
1267
1298
|
}
|
|
1268
1299
|
};
|
|
1300
|
+
return getterBinding;
|
|
1269
1301
|
}
|
|
1270
|
-
let actualSource;
|
|
1271
|
-
let internalSource = null;
|
|
1272
1302
|
if (isBinding(source2) || isSignal(source2)) {
|
|
1273
|
-
actualSource = source2;
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1303
|
+
const actualSource = source2;
|
|
1304
|
+
const forwardBinding = {
|
|
1305
|
+
[BINDING_SYMBOL]: true,
|
|
1306
|
+
[BINDING_SOURCE_SYMBOL]: null,
|
|
1307
|
+
get value() {
|
|
1308
|
+
return actualSource.value;
|
|
1309
|
+
},
|
|
1310
|
+
set value(v) {
|
|
1311
|
+
actualSource.value = v;
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
return forwardBinding;
|
|
1315
|
+
}
|
|
1316
|
+
if (isStaticPrimitive(source2)) {
|
|
1317
|
+
let staticValue = source2;
|
|
1318
|
+
const staticBinding = {
|
|
1319
|
+
[BINDING_SYMBOL]: true,
|
|
1320
|
+
[BINDING_SOURCE_SYMBOL]: null,
|
|
1321
|
+
get value() {
|
|
1322
|
+
return staticValue;
|
|
1323
|
+
},
|
|
1324
|
+
set value(v) {
|
|
1325
|
+
staticValue = v;
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1328
|
+
return staticBinding;
|
|
1278
1329
|
}
|
|
1330
|
+
const sig = signal(source2);
|
|
1331
|
+
const internalSource = getSource(sig) ?? null;
|
|
1279
1332
|
const binding = {
|
|
1280
1333
|
[BINDING_SYMBOL]: true,
|
|
1334
|
+
[BINDING_SOURCE_SYMBOL]: internalSource,
|
|
1281
1335
|
get value() {
|
|
1282
|
-
return
|
|
1336
|
+
return sig.value;
|
|
1283
1337
|
},
|
|
1284
1338
|
set value(v) {
|
|
1285
|
-
|
|
1339
|
+
sig.value = v;
|
|
1286
1340
|
}
|
|
1287
1341
|
};
|
|
1288
1342
|
if (internalSource !== null) {
|
|
@@ -1290,6 +1344,18 @@ function bind(source2) {
|
|
|
1290
1344
|
}
|
|
1291
1345
|
return binding;
|
|
1292
1346
|
}
|
|
1347
|
+
function disconnectBinding(binding) {
|
|
1348
|
+
if (binding === null || binding === undefined)
|
|
1349
|
+
return;
|
|
1350
|
+
const internalSource = binding[BINDING_SOURCE_SYMBOL];
|
|
1351
|
+
if (internalSource !== null && internalSource !== undefined) {
|
|
1352
|
+
disconnectSource(internalSource);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
function bindingHasInternalSource(binding) {
|
|
1356
|
+
const internalSource = binding[BINDING_SOURCE_SYMBOL];
|
|
1357
|
+
return internalSource !== null && internalSource !== undefined;
|
|
1358
|
+
}
|
|
1293
1359
|
function bindReadonly(source2) {
|
|
1294
1360
|
return {
|
|
1295
1361
|
[BINDING_SYMBOL]: true,
|
|
@@ -1342,7 +1408,7 @@ var peek = untrack;
|
|
|
1342
1408
|
function linkedSignal(config) {
|
|
1343
1409
|
let sourceFn;
|
|
1344
1410
|
let computation;
|
|
1345
|
-
let equalsFn =
|
|
1411
|
+
let equalsFn = deepEquals;
|
|
1346
1412
|
if (typeof config === "function") {
|
|
1347
1413
|
const fn = config;
|
|
1348
1414
|
sourceFn = fn;
|
package/dist/index.mjs
CHANGED
|
@@ -34,6 +34,7 @@ var shallowEquals = (oldValue, newValue) => {
|
|
|
34
34
|
}
|
|
35
35
|
return true;
|
|
36
36
|
};
|
|
37
|
+
var deepEquals = typeof Bun !== "undefined" && typeof Bun.deepEquals === "function" ? (a, b) => Bun.deepEquals(a, b) : shallowEquals;
|
|
37
38
|
function createEquals(fn) {
|
|
38
39
|
return (oldValue, newValue) => fn(oldValue, newValue);
|
|
39
40
|
}
|
|
@@ -471,6 +472,26 @@ function updateDerived(derived) {
|
|
|
471
472
|
function setUpdateDerivedImpl(impl) {
|
|
472
473
|
updateDerivedImpl = impl;
|
|
473
474
|
}
|
|
475
|
+
function disconnectSource(source) {
|
|
476
|
+
const reactions = source.reactions;
|
|
477
|
+
if (reactions !== null) {
|
|
478
|
+
for (let i = 0;i < reactions.length; i++) {
|
|
479
|
+
const reaction = reactions[i];
|
|
480
|
+
const deps = reaction.deps;
|
|
481
|
+
if (deps !== null) {
|
|
482
|
+
const idx = deps.indexOf(source);
|
|
483
|
+
if (idx !== -1) {
|
|
484
|
+
const last = deps.length - 1;
|
|
485
|
+
if (idx !== last) {
|
|
486
|
+
deps[idx] = deps[last];
|
|
487
|
+
}
|
|
488
|
+
deps.pop();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
source.reactions = null;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
474
495
|
function removeReactions(reaction, start) {
|
|
475
496
|
const deps = reaction.deps;
|
|
476
497
|
if (deps === null)
|
|
@@ -828,7 +849,7 @@ function createDerived(fn, options) {
|
|
|
828
849
|
f: flags,
|
|
829
850
|
fn,
|
|
830
851
|
v: UNINITIALIZED,
|
|
831
|
-
equals: options?.equals ??
|
|
852
|
+
equals: options?.equals ?? deepEquals,
|
|
832
853
|
reactions: null,
|
|
833
854
|
deps: null,
|
|
834
855
|
effects: null,
|
|
@@ -1125,8 +1146,9 @@ effect.tracking = function effectTracking() {
|
|
|
1125
1146
|
return activeEffect !== null;
|
|
1126
1147
|
};
|
|
1127
1148
|
// src/primitives/bind.ts
|
|
1149
|
+
var BINDING_SOURCE_SYMBOL = Symbol("binding.source");
|
|
1128
1150
|
var bindingCleanup = new FinalizationRegistry((internalSource) => {
|
|
1129
|
-
internalSource
|
|
1151
|
+
disconnectSource(internalSource);
|
|
1130
1152
|
});
|
|
1131
1153
|
function isBinding(value) {
|
|
1132
1154
|
return value !== null && typeof value === "object" && BINDING_SYMBOL in value;
|
|
@@ -1137,31 +1159,59 @@ function isSignal(value) {
|
|
|
1137
1159
|
function isGetter(value) {
|
|
1138
1160
|
return typeof value === "function";
|
|
1139
1161
|
}
|
|
1162
|
+
function isStaticPrimitive(value) {
|
|
1163
|
+
const type = typeof value;
|
|
1164
|
+
return value === null || value === undefined || type === "number" || type === "string" || type === "boolean";
|
|
1165
|
+
}
|
|
1140
1166
|
function bind(source2) {
|
|
1141
1167
|
if (isGetter(source2)) {
|
|
1142
|
-
|
|
1168
|
+
const getterBinding = {
|
|
1143
1169
|
[BINDING_SYMBOL]: true,
|
|
1170
|
+
[BINDING_SOURCE_SYMBOL]: null,
|
|
1144
1171
|
get value() {
|
|
1145
1172
|
return source2();
|
|
1146
1173
|
}
|
|
1147
1174
|
};
|
|
1175
|
+
return getterBinding;
|
|
1148
1176
|
}
|
|
1149
|
-
let actualSource;
|
|
1150
|
-
let internalSource = null;
|
|
1151
1177
|
if (isBinding(source2) || isSignal(source2)) {
|
|
1152
|
-
actualSource = source2;
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1178
|
+
const actualSource = source2;
|
|
1179
|
+
const forwardBinding = {
|
|
1180
|
+
[BINDING_SYMBOL]: true,
|
|
1181
|
+
[BINDING_SOURCE_SYMBOL]: null,
|
|
1182
|
+
get value() {
|
|
1183
|
+
return actualSource.value;
|
|
1184
|
+
},
|
|
1185
|
+
set value(v) {
|
|
1186
|
+
actualSource.value = v;
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
return forwardBinding;
|
|
1190
|
+
}
|
|
1191
|
+
if (isStaticPrimitive(source2)) {
|
|
1192
|
+
let staticValue = source2;
|
|
1193
|
+
const staticBinding = {
|
|
1194
|
+
[BINDING_SYMBOL]: true,
|
|
1195
|
+
[BINDING_SOURCE_SYMBOL]: null,
|
|
1196
|
+
get value() {
|
|
1197
|
+
return staticValue;
|
|
1198
|
+
},
|
|
1199
|
+
set value(v) {
|
|
1200
|
+
staticValue = v;
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
1203
|
+
return staticBinding;
|
|
1157
1204
|
}
|
|
1205
|
+
const sig = signal(source2);
|
|
1206
|
+
const internalSource = getSource(sig) ?? null;
|
|
1158
1207
|
const binding = {
|
|
1159
1208
|
[BINDING_SYMBOL]: true,
|
|
1209
|
+
[BINDING_SOURCE_SYMBOL]: internalSource,
|
|
1160
1210
|
get value() {
|
|
1161
|
-
return
|
|
1211
|
+
return sig.value;
|
|
1162
1212
|
},
|
|
1163
1213
|
set value(v) {
|
|
1164
|
-
|
|
1214
|
+
sig.value = v;
|
|
1165
1215
|
}
|
|
1166
1216
|
};
|
|
1167
1217
|
if (internalSource !== null) {
|
|
@@ -1169,6 +1219,18 @@ function bind(source2) {
|
|
|
1169
1219
|
}
|
|
1170
1220
|
return binding;
|
|
1171
1221
|
}
|
|
1222
|
+
function disconnectBinding(binding) {
|
|
1223
|
+
if (binding === null || binding === undefined)
|
|
1224
|
+
return;
|
|
1225
|
+
const internalSource = binding[BINDING_SOURCE_SYMBOL];
|
|
1226
|
+
if (internalSource !== null && internalSource !== undefined) {
|
|
1227
|
+
disconnectSource(internalSource);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
function bindingHasInternalSource(binding) {
|
|
1231
|
+
const internalSource = binding[BINDING_SOURCE_SYMBOL];
|
|
1232
|
+
return internalSource !== null && internalSource !== undefined;
|
|
1233
|
+
}
|
|
1172
1234
|
function bindReadonly(source2) {
|
|
1173
1235
|
return {
|
|
1174
1236
|
[BINDING_SYMBOL]: true,
|
|
@@ -1221,7 +1283,7 @@ var peek = untrack;
|
|
|
1221
1283
|
function linkedSignal(config) {
|
|
1222
1284
|
let sourceFn;
|
|
1223
1285
|
let computation;
|
|
1224
|
-
let equalsFn =
|
|
1286
|
+
let equalsFn = deepEquals;
|
|
1225
1287
|
if (typeof config === "function") {
|
|
1226
1288
|
const fn = config;
|
|
1227
1289
|
sourceFn = fn;
|
|
@@ -1871,14 +1933,18 @@ export {
|
|
|
1871
1933
|
equals,
|
|
1872
1934
|
effectScope,
|
|
1873
1935
|
effect,
|
|
1936
|
+
disconnectSource,
|
|
1874
1937
|
disconnectDerived,
|
|
1938
|
+
disconnectBinding,
|
|
1875
1939
|
destroyEffect,
|
|
1876
1940
|
derived,
|
|
1941
|
+
deepEquals,
|
|
1877
1942
|
decrementBatchDepth,
|
|
1878
1943
|
createSelector,
|
|
1879
1944
|
createEquals,
|
|
1880
1945
|
createEffect,
|
|
1881
1946
|
createDerived,
|
|
1947
|
+
bindingHasInternalSource,
|
|
1882
1948
|
bindReadonly,
|
|
1883
1949
|
bind,
|
|
1884
1950
|
batchDepth,
|
|
@@ -24,6 +24,30 @@ export declare function bind<T>(source: Binding<T>): Binding<T>;
|
|
|
24
24
|
export declare function bind<T>(source: ReadonlyBinding<T>): ReadonlyBinding<T>;
|
|
25
25
|
export declare function bind<T>(source: () => T): ReadonlyBinding<T>;
|
|
26
26
|
export declare function bind<T>(source: T): Binding<ExtractInner<T>>;
|
|
27
|
+
/**
|
|
28
|
+
* Disconnect a binding from the reactive graph.
|
|
29
|
+
*
|
|
30
|
+
* In most cases, this is NOT needed because:
|
|
31
|
+
* 1. Static primitives (numbers, strings, booleans) don't create internal signals
|
|
32
|
+
* 2. Bindings to existing signals forward to them (no internal source)
|
|
33
|
+
* 3. FinalizationRegistry handles cleanup when objects are GC'd
|
|
34
|
+
*
|
|
35
|
+
* Use this ONLY when you have circular references that prevent GC,
|
|
36
|
+
* such as when a binding's internal source is tracked by a long-lived derived.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const binding = bind(someNonPrimitiveValue)
|
|
41
|
+
* // ... later, when cleaning up:
|
|
42
|
+
* disconnectBinding(binding) // Breaks reactive links, allows GC
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function disconnectBinding(binding: Binding<unknown> | ReadonlyBinding<unknown> | null | undefined): void;
|
|
46
|
+
/**
|
|
47
|
+
* Check if a binding has an internal source that may need cleanup.
|
|
48
|
+
* Static primitives and forwarding bindings return false.
|
|
49
|
+
*/
|
|
50
|
+
export declare function bindingHasInternalSource(binding: Binding<unknown> | ReadonlyBinding<unknown>): boolean;
|
|
27
51
|
/**
|
|
28
52
|
* Create an explicitly read-only binding.
|
|
29
53
|
* Attempting to write will throw an error at runtime.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../src/primitives/bind.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAU,YAAY,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../src/primitives/bind.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAU,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAoC5F;;;GAGG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC;IACxB,IAAI,KAAK,IAAI,CAAC,CAAA;IACd,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,EAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC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CAAC,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAUvE;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvD,OAAO,EAAE,CAAC,GACT;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAU1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked.d.ts","sourceRoot":"","sources":["../../src/primitives/linked.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"linked.d.ts","sourceRoot":"","sources":["../../src/primitives/linked.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAa9D;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,CAAC,EAAE,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,CAAA;IACf,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;QAAE,MAAM,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,CAAC,CAAA;KAAE,KAAK,CAAC,CAAA;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;CAClB;AAED;;;GAGG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,MAAM,CAAC,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAM3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;AACpF,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;AA4GxF;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAAC,OAAO,CAAC,CAM/E"}
|
|
@@ -19,6 +19,14 @@ export declare const safeEquals: Equals;
|
|
|
19
19
|
* Compares own enumerable properties one level deep
|
|
20
20
|
*/
|
|
21
21
|
export declare const shallowEquals: Equals;
|
|
22
|
+
/**
|
|
23
|
+
* Deep structural equality using Bun.deepEquals.
|
|
24
|
+
* Used as default for derived() and linkedSignal() to prevent unnecessary
|
|
25
|
+
* propagation when computed values are structurally identical.
|
|
26
|
+
*
|
|
27
|
+
* Falls back to shallowEquals in non-Bun environments.
|
|
28
|
+
*/
|
|
29
|
+
export declare const deepEquals: Equals;
|
|
22
30
|
/**
|
|
23
31
|
* Create a custom equality function
|
|
24
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../src/reactivity/equality.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAM9C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAA8D,CAAA;AAMnF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAQnD;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,MAAkE,CAAA;AAM3F;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAkD3B,CAAA;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAEtE;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAoB,CAAA;AAE9C;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"equality.d.ts","sourceRoot":"","sources":["../../src/reactivity/equality.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAM9C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,MAA8D,CAAA;AAMnF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAQnD;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,MAAkE,CAAA;AAM3F;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAkD3B,CAAA;AAMD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,MAGN,CAAA;AAMnB;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAEtE;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAoB,CAAA;AAE9C;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAmB,CAAA"}
|
|
@@ -39,6 +39,14 @@ export declare function setSignalStatus(signal: {
|
|
|
39
39
|
export declare function isDirty(reaction: Reaction): boolean;
|
|
40
40
|
export declare function updateDerived(derived: Derived): void;
|
|
41
41
|
export declare function setUpdateDerivedImpl(impl: (derived: Derived) => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* Disconnect a source from all its reactions.
|
|
44
|
+
* This breaks the circular reference between Source.reactions and Reaction.deps,
|
|
45
|
+
* allowing both to be garbage collected.
|
|
46
|
+
*
|
|
47
|
+
* Use this when disposing of a signal/binding that was tracked by deriveds/effects.
|
|
48
|
+
*/
|
|
49
|
+
export declare function disconnectSource(source: Source): void;
|
|
42
50
|
/**
|
|
43
51
|
* Remove a reaction from its dependencies, starting at the given index
|
|
44
52
|
* Uses swap-and-pop for O(1) removal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracking.d.ts","sourceRoot":"","sources":["../../src/reactivity/tracking.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAkCjE;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAiD3C;AAoGD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CA8BrD;AAMD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CA8BlE;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAE3E;AAMD;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAoGnD;AAWD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEpD;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAE3E;AAMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EA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GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAmG1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rlabs-inc/signals",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Production-grade fine-grained reactivity for TypeScript. A complete standalone mirror of Svelte 5's reactivity system - signals, effects, derived values, deep reactivity, reactive collections, and reactive bindings.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|