@fictjs/runtime 0.2.3 → 0.3.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/dist/advanced.cjs +10 -8
- package/dist/advanced.cjs.map +1 -1
- package/dist/advanced.d.cts +8 -16
- package/dist/advanced.d.ts +8 -16
- package/dist/advanced.js +5 -3
- package/dist/advanced.js.map +1 -1
- package/dist/{chunk-2U6M3LKS.cjs → chunk-ID3WBWNO.cjs} +452 -219
- package/dist/chunk-ID3WBWNO.cjs.map +1 -0
- package/dist/{chunk-5YTFFAVU.cjs → chunk-L4DIV3RC.cjs} +7 -7
- package/dist/{chunk-5YTFFAVU.cjs.map → chunk-L4DIV3RC.cjs.map} +1 -1
- package/dist/{chunk-W525IQWC.cjs → chunk-M2TSXZ4C.cjs} +16 -16
- package/dist/{chunk-W525IQWC.cjs.map → chunk-M2TSXZ4C.cjs.map} +1 -1
- package/dist/{chunk-YVDWXY44.js → chunk-SO6X7G5S.js} +450 -217
- package/dist/chunk-SO6X7G5S.js.map +1 -0
- package/dist/{chunk-UHXUEGQH.js → chunk-TWELIZRY.js} +2 -2
- package/dist/{chunk-3WD7QD5G.js → chunk-XLIZJMMJ.js} +2 -2
- package/dist/{context-9gFXOdJl.d.cts → context-B25xyQrJ.d.cts} +36 -2
- package/dist/{context-4woHo7-L.d.ts → context-CGdP7_Jb.d.ts} +36 -2
- package/dist/{effect-ClARNUCc.d.cts → effect-D6kaLM2-.d.cts} +80 -1
- package/dist/{effect-ClARNUCc.d.ts → effect-D6kaLM2-.d.ts} +80 -1
- package/dist/index.cjs +40 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.dev.js +322 -145
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +39 -35
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +8 -6
- package/dist/internal.d.ts +8 -6
- package/dist/internal.js +7 -3
- package/dist/internal.js.map +1 -1
- package/dist/{props-DAyeRPwH.d.ts → props-BEgIVMRx.d.ts} +8 -15
- package/dist/{props-CBwuh35e.d.cts → props-BIfromL0.d.cts} +8 -15
- package/dist/scope-Cx_3CjIZ.d.cts +18 -0
- package/dist/scope-CzNkn587.d.ts +18 -0
- package/package.json +1 -1
- package/src/advanced.ts +1 -0
- package/src/binding.ts +30 -4
- package/src/constants.ts +5 -0
- package/src/cycle-guard.ts +59 -7
- package/src/devtools.ts +22 -2
- package/src/dom.ts +84 -10
- package/src/hooks.ts +60 -13
- package/src/index.ts +3 -1
- package/src/internal.ts +2 -2
- package/src/lifecycle.ts +13 -5
- package/src/memo.ts +3 -4
- package/src/props.ts +16 -0
- package/src/signal.ts +204 -36
- package/dist/chunk-2U6M3LKS.cjs.map +0 -1
- package/dist/chunk-YVDWXY44.js.map +0 -1
- package/dist/scope-DvgMquEy.d.ts +0 -55
- package/dist/scope-xmdo6lVU.d.cts +0 -55
- /package/dist/{chunk-UHXUEGQH.js.map → chunk-TWELIZRY.js.map} +0 -0
- /package/dist/{chunk-3WD7QD5G.js.map → chunk-XLIZJMMJ.js.map} +0 -0
package/dist/scope-DvgMquEy.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { O as MaybeReactive } from './effect-ClARNUCc.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Signal accessor - function to get/set signal value
|
|
5
|
-
*/
|
|
6
|
-
interface SignalAccessor<T> {
|
|
7
|
-
(): T;
|
|
8
|
-
(value: T): void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Computed accessor - function to get computed value
|
|
12
|
-
*/
|
|
13
|
-
type ComputedAccessor<T> = () => T;
|
|
14
|
-
/**
|
|
15
|
-
* Effect scope disposer - function to dispose an effect scope
|
|
16
|
-
*/
|
|
17
|
-
type EffectScopeDisposer = () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Create a reactive signal
|
|
20
|
-
* @param initialValue - The initial value
|
|
21
|
-
* @returns A signal accessor function
|
|
22
|
-
*/
|
|
23
|
-
declare function signal<T>(initialValue: T): SignalAccessor<T>;
|
|
24
|
-
/**
|
|
25
|
-
* Create a reactive effect scope
|
|
26
|
-
* @param fn - The scope function
|
|
27
|
-
* @returns An effect scope disposer function
|
|
28
|
-
*/
|
|
29
|
-
declare function effectScope(fn: () => void): EffectScopeDisposer;
|
|
30
|
-
/**
|
|
31
|
-
* Create a selector signal that efficiently updates only when the selected key matches.
|
|
32
|
-
* Useful for large lists where only one item is selected.
|
|
33
|
-
*
|
|
34
|
-
* @param source - The source signal returning the current key
|
|
35
|
-
* @param equalityFn - Optional equality function
|
|
36
|
-
* @returns A selector function that takes a key and returns a boolean signal accessor
|
|
37
|
-
*/
|
|
38
|
-
declare function createSelector<T>(source: () => T, equalityFn?: (a: T, b: T) => boolean): (key: T) => boolean;
|
|
39
|
-
|
|
40
|
-
interface ReactiveScope {
|
|
41
|
-
run<T>(fn: () => T): T;
|
|
42
|
-
stop(): void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Create an explicit reactive scope that can contain effects/memos and be stopped manually.
|
|
46
|
-
* The scope registers with the current root for cleanup.
|
|
47
|
-
*/
|
|
48
|
-
declare function createScope(): ReactiveScope;
|
|
49
|
-
/**
|
|
50
|
-
* Run a block of reactive code inside a managed scope that follows a boolean flag.
|
|
51
|
-
* When the flag turns false, the scope is disposed and all contained effects/memos are cleaned up.
|
|
52
|
-
*/
|
|
53
|
-
declare function runInScope(flag: MaybeReactive<boolean>, fn: () => void): void;
|
|
54
|
-
|
|
55
|
-
export { type ComputedAccessor as C, type ReactiveScope as R, type SignalAccessor as S, createSelector as a, createScope as c, effectScope as e, runInScope as r, signal as s };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { O as MaybeReactive } from './effect-ClARNUCc.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Signal accessor - function to get/set signal value
|
|
5
|
-
*/
|
|
6
|
-
interface SignalAccessor<T> {
|
|
7
|
-
(): T;
|
|
8
|
-
(value: T): void;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Computed accessor - function to get computed value
|
|
12
|
-
*/
|
|
13
|
-
type ComputedAccessor<T> = () => T;
|
|
14
|
-
/**
|
|
15
|
-
* Effect scope disposer - function to dispose an effect scope
|
|
16
|
-
*/
|
|
17
|
-
type EffectScopeDisposer = () => void;
|
|
18
|
-
/**
|
|
19
|
-
* Create a reactive signal
|
|
20
|
-
* @param initialValue - The initial value
|
|
21
|
-
* @returns A signal accessor function
|
|
22
|
-
*/
|
|
23
|
-
declare function signal<T>(initialValue: T): SignalAccessor<T>;
|
|
24
|
-
/**
|
|
25
|
-
* Create a reactive effect scope
|
|
26
|
-
* @param fn - The scope function
|
|
27
|
-
* @returns An effect scope disposer function
|
|
28
|
-
*/
|
|
29
|
-
declare function effectScope(fn: () => void): EffectScopeDisposer;
|
|
30
|
-
/**
|
|
31
|
-
* Create a selector signal that efficiently updates only when the selected key matches.
|
|
32
|
-
* Useful for large lists where only one item is selected.
|
|
33
|
-
*
|
|
34
|
-
* @param source - The source signal returning the current key
|
|
35
|
-
* @param equalityFn - Optional equality function
|
|
36
|
-
* @returns A selector function that takes a key and returns a boolean signal accessor
|
|
37
|
-
*/
|
|
38
|
-
declare function createSelector<T>(source: () => T, equalityFn?: (a: T, b: T) => boolean): (key: T) => boolean;
|
|
39
|
-
|
|
40
|
-
interface ReactiveScope {
|
|
41
|
-
run<T>(fn: () => T): T;
|
|
42
|
-
stop(): void;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Create an explicit reactive scope that can contain effects/memos and be stopped manually.
|
|
46
|
-
* The scope registers with the current root for cleanup.
|
|
47
|
-
*/
|
|
48
|
-
declare function createScope(): ReactiveScope;
|
|
49
|
-
/**
|
|
50
|
-
* Run a block of reactive code inside a managed scope that follows a boolean flag.
|
|
51
|
-
* When the flag turns false, the scope is disposed and all contained effects/memos are cleaned up.
|
|
52
|
-
*/
|
|
53
|
-
declare function runInScope(flag: MaybeReactive<boolean>, fn: () => void): void;
|
|
54
|
-
|
|
55
|
-
export { type ComputedAccessor as C, type ReactiveScope as R, type SignalAccessor as S, createSelector as a, createScope as c, effectScope as e, runInScope as r, signal as s };
|
|
File without changes
|
|
File without changes
|