@maverick-js/signals
Advanced tools
Comparing version 5.9.2 to 5.9.3
@@ -1,1 +0,1 @@ | ||
export { SCOPE, computed, createComputation, createScope, effect, getContext, getScope, isFunction, isNotEqual, isReadSignal, isWriteSignal, onDispose, onError, peek, readonly, root, scoped, setContext, signal, tick, untrack } from './chunks/chunk-LO36VLGV.js'; | ||
export { SCOPE, computed, createComputation, createScope, effect, getContext, getScope, isFunction, isNotEqual, isReadSignal, isWriteSignal, onDispose, onError, peek, readonly, root, scoped, setContext, signal, tick, untrack } from './chunks/chunk-TR5KFJUP.js'; |
@@ -1,2 +0,2 @@ | ||
import { effect, write, onDispose, read, isNotEqual, createComputation, createScope, scoped, dispose, compute } from './chunks/chunk-LO36VLGV.js'; | ||
import { effect, write, onDispose, read, isNotEqual, createComputation, createScope, scoped, dispose, compute } from './chunks/chunk-TR5KFJUP.js'; | ||
@@ -3,0 +3,0 @@ // src/selector.ts |
@@ -1,1 +0,1 @@ | ||
export { SCOPE, computed, createComputation, createScope, effect, getContext, getScope, isFunction, isNotEqual, isReadSignal, isWriteSignal, onDispose, onError, peek, readonly, root, scoped, setContext, signal, tick, untrack } from './chunks/chunk-SICBCST5.js'; | ||
export { SCOPE, computed, createComputation, createScope, effect, getContext, getScope, isFunction, isNotEqual, isReadSignal, isWriteSignal, onDispose, onError, peek, readonly, root, scoped, setContext, signal, tick, untrack } from './chunks/chunk-MUVDDMQ2.js'; |
@@ -1,2 +0,2 @@ | ||
import { effect, write, onDispose, read, isNotEqual, createComputation, createScope, scoped, dispose, compute } from './chunks/chunk-SICBCST5.js'; | ||
import { effect, write, onDispose, read, isNotEqual, createComputation, createScope, scoped, dispose, compute } from './chunks/chunk-MUVDDMQ2.js'; | ||
@@ -46,7 +46,7 @@ // src/selector.ts | ||
updateMap.bind({ | ||
m: createScope(), | ||
n: createScope(), | ||
h: 0, | ||
s: list, | ||
g: [], | ||
n: map, | ||
o: map, | ||
f: [], | ||
@@ -60,7 +60,7 @@ c: [] | ||
function updateMap() { | ||
let i = 0, newItems = this.s() || [], mapper = () => this.n(read.bind(this.c[i]), i); | ||
let i = 0, newItems = this.s() || [], mapper = () => this.o(read.bind(this.c[i]), i); | ||
scoped(() => { | ||
if (newItems.length === 0) { | ||
if (this.h !== 0) { | ||
dispose.call(this.m, false); | ||
dispose.call(this.n, false); | ||
this.g = []; | ||
@@ -89,3 +89,3 @@ this.f = []; | ||
this.f = this.f.slice(0, this.h); | ||
}, this.m); | ||
}, this.n); | ||
return this.f; | ||
@@ -98,7 +98,7 @@ } | ||
updateKeyedMap.bind({ | ||
m: createScope(), | ||
n: createScope(), | ||
h: 0, | ||
s: list, | ||
g: [], | ||
n: map, | ||
o: map, | ||
f: [], | ||
@@ -112,8 +112,8 @@ c: [] | ||
function updateKeyedMap() { | ||
const newItems = this.s() || [], indexed = this.n.length > 1; | ||
const newItems = this.s() || [], indexed = this.o.length > 1; | ||
scoped(() => { | ||
let newLen = newItems.length, i, j, mapper = indexed ? () => this.n(newItems[j], read.bind(this.c[j])) : () => this.n(newItems[j]); | ||
let newLen = newItems.length, i, j, mapper = indexed ? () => this.o(newItems[j], read.bind(this.c[j])) : () => this.o(newItems[j]); | ||
if (newLen === 0) { | ||
if (this.h !== 0) { | ||
dispose.call(this.m, false); | ||
dispose.call(this.n, false); | ||
this.c = []; | ||
@@ -178,3 +178,3 @@ this.g = []; | ||
} | ||
}, this.m); | ||
}, this.n); | ||
return this.f; | ||
@@ -181,0 +181,0 @@ } |
@@ -1,1 +0,1 @@ | ||
export { SCOPE, computed, createComputation, createScope, effect, getContext, getScope, isFunction, isNotEqual, isReadSignal, isWriteSignal, onDispose, onError, peek, readonly, root, scoped, setContext, signal, tick, untrack } from './chunks/chunk-SE3GBBEV.js'; | ||
export { SCOPE, computed, createComputation, createScope, effect, getContext, getScope, isFunction, isNotEqual, isReadSignal, isWriteSignal, onDispose, onError, peek, readonly, root, scoped, setContext, signal, tick, untrack } from './chunks/chunk-2JUQ4ZKX.js'; |
@@ -1,2 +0,2 @@ | ||
import { effect, write, onDispose, read, isNotEqual, createComputation, createScope, scoped, dispose, compute } from './chunks/chunk-SE3GBBEV.js'; | ||
import { effect, write, onDispose, read, isNotEqual, createComputation, createScope, scoped, dispose, compute } from './chunks/chunk-2JUQ4ZKX.js'; | ||
@@ -46,7 +46,7 @@ // src/selector.ts | ||
updateMap.bind({ | ||
m: createScope(), | ||
n: createScope(), | ||
h: 0, | ||
s: list, | ||
g: [], | ||
n: map, | ||
o: map, | ||
f: [], | ||
@@ -60,7 +60,7 @@ c: [] | ||
function updateMap() { | ||
let i = 0, newItems = this.s() || [], mapper = () => this.n(read.bind(this.c[i]), i); | ||
let i = 0, newItems = this.s() || [], mapper = () => this.o(read.bind(this.c[i]), i); | ||
scoped(() => { | ||
if (newItems.length === 0) { | ||
if (this.h !== 0) { | ||
dispose.call(this.m, false); | ||
dispose.call(this.n, false); | ||
this.g = []; | ||
@@ -89,3 +89,3 @@ this.f = []; | ||
this.f = this.f.slice(0, this.h); | ||
}, this.m); | ||
}, this.n); | ||
return this.f; | ||
@@ -98,7 +98,7 @@ } | ||
updateKeyedMap.bind({ | ||
m: createScope(), | ||
n: createScope(), | ||
h: 0, | ||
s: list, | ||
g: [], | ||
n: map, | ||
o: map, | ||
f: [], | ||
@@ -112,8 +112,8 @@ c: [] | ||
function updateKeyedMap() { | ||
const newItems = this.s() || [], indexed = this.n.length > 1; | ||
const newItems = this.s() || [], indexed = this.o.length > 1; | ||
scoped(() => { | ||
let newLen = newItems.length, i, j, mapper = indexed ? () => this.n(newItems[j], read.bind(this.c[j])) : () => this.n(newItems[j]); | ||
let newLen = newItems.length, i, j, mapper = indexed ? () => this.o(newItems[j], read.bind(this.c[j])) : () => this.o(newItems[j]); | ||
if (newLen === 0) { | ||
if (this.h !== 0) { | ||
dispose.call(this.m, false); | ||
dispose.call(this.n, false); | ||
this.c = []; | ||
@@ -178,3 +178,3 @@ this.g = []; | ||
} | ||
}, this.m); | ||
}, this.n); | ||
return this.f; | ||
@@ -181,0 +181,0 @@ } |
@@ -15,3 +15,3 @@ import type { Callable, Computation, ComputedSignalOptions, Dispose, MaybeDisposable, Scope } from './types'; | ||
*/ | ||
export declare function peek<T>(compute: () => T): T; | ||
export declare function peek<T>(fn: () => T): T; | ||
/** | ||
@@ -23,3 +23,3 @@ * Returns the current value inside a signal whilst disabling both scope _and_ observer | ||
*/ | ||
export declare function untrack<T>(compute: () => T): T; | ||
export declare function untrack<T>(fn: () => T): T; | ||
/** | ||
@@ -26,0 +26,0 @@ * By default, signal updates are batched on the microtask queue which is an async process. You can |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "5.9.2", | ||
"version": "5.9.3", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "types": "dist/types/index.d.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
96829
2651