@fictjs/runtime 0.14.0 → 0.16.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 +9 -9
- package/dist/advanced.d.cts +3 -3
- package/dist/advanced.d.ts +3 -3
- package/dist/advanced.js +4 -4
- package/dist/{binding-FRyTeLDn.d.cts → binding-BlABuUiG.d.cts} +2 -2
- package/dist/{binding-DcnhUSQK.d.ts → binding-CQUGLLBI.d.ts} +2 -2
- package/dist/{chunk-4GEXXASF.js → chunk-4P4DYWLQ.js} +3 -3
- package/dist/{chunk-IEYESQRE.cjs → chunk-AR2T7JEX.cjs} +269 -211
- package/dist/chunk-AR2T7JEX.cjs.map +1 -0
- package/dist/{chunk-HAFRB2OT.cjs → chunk-BADX4WTQ.cjs} +17 -17
- package/dist/{chunk-HAFRB2OT.cjs.map → chunk-BADX4WTQ.cjs.map} +1 -1
- package/dist/{chunk-BW4GNOOZ.cjs → chunk-CBRGOLTR.cjs} +40 -40
- package/dist/{chunk-BW4GNOOZ.cjs.map → chunk-CBRGOLTR.cjs.map} +1 -1
- package/dist/{chunk-FXDZVFEP.cjs → chunk-ECNK25S4.cjs} +8 -8
- package/dist/{chunk-FXDZVFEP.cjs.map → chunk-ECNK25S4.cjs.map} +1 -1
- package/dist/{chunk-A5K2MPZW.js → chunk-MAHWGB55.js} +11 -4
- package/dist/{chunk-A5K2MPZW.js.map → chunk-MAHWGB55.js.map} +1 -1
- package/dist/{chunk-VEBU7SMW.js → chunk-RK2WSQYL.js} +3 -3
- package/dist/{chunk-R2WMNQGO.cjs → chunk-WJMZ7X46.cjs} +11 -4
- package/dist/chunk-WJMZ7X46.cjs.map +1 -0
- package/dist/{chunk-E6A6PCTW.js → chunk-ZJZ6LMDN.js} +78 -20
- package/dist/chunk-ZJZ6LMDN.js.map +1 -0
- package/dist/{chunk-NPSPJGD4.js → chunk-ZWQLXWSV.js} +3 -3
- package/dist/{devtools-D2z4llpA.d.ts → devtools-DNnnDGu1.d.ts} +1 -1
- package/dist/{devtools-BtIkN77t.d.cts → devtools-DWIZRe7L.d.cts} +1 -1
- package/dist/index.cjs +42 -42
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.dev.js +1 -0
- package/dist/index.dev.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/internal-list.cjs +4 -4
- package/dist/internal-list.js +3 -3
- package/dist/internal.cjs +5 -5
- package/dist/internal.d.cts +3 -3
- package/dist/internal.d.ts +3 -3
- package/dist/internal.js +4 -4
- package/dist/loader.cjs +18 -18
- package/dist/loader.js +1 -1
- package/dist/{props-D1nj2p_3.d.ts → props-DabFQwLR.d.ts} +1 -1
- package/dist/{props-9chMyBGb.d.cts → props-tImUZAty.d.cts} +1 -1
- package/dist/{scope-Bn3sxem5.d.cts → scope-GwC4DJ50.d.cts} +1 -1
- package/dist/{scope-BSkhJr0a.d.ts → scope-gpOMWTlf.d.ts} +1 -1
- package/package.json +1 -1
- package/src/binding.ts +92 -19
- package/src/resume.ts +7 -3
- package/src/store.ts +4 -1
- package/dist/chunk-E6A6PCTW.js.map +0 -1
- package/dist/chunk-IEYESQRE.cjs.map +0 -1
- package/dist/chunk-R2WMNQGO.cjs.map +0 -1
- /package/dist/{chunk-4GEXXASF.js.map → chunk-4P4DYWLQ.js.map} +0 -0
- /package/dist/{chunk-VEBU7SMW.js.map → chunk-RK2WSQYL.js.map} +0 -0
- /package/dist/{chunk-NPSPJGD4.js.map → chunk-ZWQLXWSV.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createContext,
|
|
3
3
|
hasContext,
|
|
4
4
|
useContext
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZWQLXWSV.js";
|
|
6
6
|
import {
|
|
7
7
|
Fragment,
|
|
8
8
|
batch,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
untrack,
|
|
20
20
|
useDeferredValue,
|
|
21
21
|
useTransition
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZJZ6LMDN.js";
|
|
23
23
|
import {
|
|
24
24
|
__fictGetSSRStreamHooks,
|
|
25
25
|
__fictPopSSRBoundary,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
registerErrorHandler,
|
|
41
41
|
registerSuspenseHandler,
|
|
42
42
|
signal
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-MAHWGB55.js";
|
|
44
44
|
|
|
45
45
|
// src/ref.ts
|
|
46
46
|
function createRef() {
|
package/dist/internal-list.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCBRGOLTRcjs = require('./chunk-CBRGOLTR.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('./chunk-
|
|
6
|
+
var _chunkAR2T7JEXcjs = require('./chunk-AR2T7JEX.cjs');
|
|
7
|
+
require('./chunk-WJMZ7X46.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createKeyedList =
|
|
11
|
+
exports.createKeyedList = _chunkCBRGOLTRcjs.createKeyedList; exports.toNodeArray = _chunkAR2T7JEXcjs.toNodeArray;
|
|
12
12
|
//# sourceMappingURL=internal-list.cjs.map
|
package/dist/internal-list.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createKeyedList
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RK2WSQYL.js";
|
|
4
4
|
import {
|
|
5
5
|
toNodeArray
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ZJZ6LMDN.js";
|
|
7
|
+
import "./chunk-MAHWGB55.js";
|
|
8
8
|
export {
|
|
9
9
|
createKeyedList,
|
|
10
10
|
toNodeArray
|
package/dist/internal.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCBRGOLTRcjs = require('./chunk-CBRGOLTR.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkECNK25S4cjs = require('./chunk-ECNK25S4.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -51,7 +51,7 @@ var _chunkFXDZVFEPcjs = require('./chunk-FXDZVFEP.cjs');
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _chunkAR2T7JEXcjs = require('./chunk-AR2T7JEX.cjs');
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
@@ -109,7 +109,7 @@ var _chunkIEYESQREcjs = require('./chunk-IEYESQRE.cjs');
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
var
|
|
112
|
+
var _chunkWJMZ7X46cjs = require('./chunk-WJMZ7X46.cjs');
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
|
|
@@ -215,5 +215,5 @@ var _chunkR2WMNQGOcjs = require('./chunk-R2WMNQGO.cjs');
|
|
|
215
215
|
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
exports.Aliases =
|
|
218
|
+
exports.Aliases = _chunkWJMZ7X46cjs.Aliases; exports.BooleanAttributes = _chunkWJMZ7X46cjs.BooleanAttributes; exports.ChildProperties = _chunkWJMZ7X46cjs.ChildProperties; exports.DelegatedEvents = _chunkWJMZ7X46cjs.DelegatedEvents; exports.FICT_SSR_SNAPSHOT_SCHEMA_VERSION = _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION; exports.Fragment = _chunkAR2T7JEXcjs.Fragment; exports.Properties = _chunkWJMZ7X46cjs.Properties; exports.SVGElements = _chunkWJMZ7X46cjs.SVGElements; exports.SVGNamespace = _chunkWJMZ7X46cjs.SVGNamespace; exports.UnitlessStyles = _chunkWJMZ7X46cjs.UnitlessStyles; exports.__fictDisableResumable = _chunkWJMZ7X46cjs.__fictDisableResumable; exports.__fictDisableSSR = _chunkWJMZ7X46cjs.__fictDisableSSR; exports.__fictEnableResumable = _chunkWJMZ7X46cjs.__fictEnableResumable; exports.__fictEnableSSR = _chunkWJMZ7X46cjs.__fictEnableSSR; exports.__fictEnsureScope = _chunkWJMZ7X46cjs.__fictEnsureScope; exports.__fictEnterHydration = _chunkWJMZ7X46cjs.__fictEnterHydration; exports.__fictExitHydration = _chunkWJMZ7X46cjs.__fictExitHydration; exports.__fictGetResume = _chunkWJMZ7X46cjs.__fictGetResume; exports.__fictGetSSRScope = _chunkWJMZ7X46cjs.__fictGetSSRScope; exports.__fictGetSSRStreamHooks = _chunkWJMZ7X46cjs.__fictGetSSRStreamHooks; exports.__fictGetScopeProps = _chunkWJMZ7X46cjs.__fictGetScopeProps; exports.__fictGetScopeRegistry = _chunkWJMZ7X46cjs.__fictGetScopeRegistry; exports.__fictGetScopesForBoundary = _chunkWJMZ7X46cjs.__fictGetScopesForBoundary; exports.__fictIsHydrating = _chunkWJMZ7X46cjs.__fictIsHydrating; exports.__fictIsResumable = _chunkWJMZ7X46cjs.__fictIsResumable; exports.__fictIsSSR = _chunkWJMZ7X46cjs.__fictIsSSR; exports.__fictMergeSSRState = _chunkWJMZ7X46cjs.__fictMergeSSRState; exports.__fictPopContext = _chunkWJMZ7X46cjs.__fictPopContext; exports.__fictPrepareContext = _chunkWJMZ7X46cjs.__fictPrepareContext; exports.__fictProp = _chunkAR2T7JEXcjs.__fictProp; exports.__fictPropsRest = _chunkAR2T7JEXcjs.__fictPropsRest; exports.__fictPushContext = _chunkWJMZ7X46cjs.__fictPushContext; exports.__fictQrl = _chunkWJMZ7X46cjs.__fictQrl; exports.__fictRegisterResume = _chunkWJMZ7X46cjs.__fictRegisterResume; exports.__fictRegisterScope = _chunkWJMZ7X46cjs.__fictRegisterScope; exports.__fictRender = _chunkWJMZ7X46cjs.__fictRender; exports.__fictResetContext = _chunkWJMZ7X46cjs.__fictResetContext; exports.__fictSerializeSSRState = _chunkWJMZ7X46cjs.__fictSerializeSSRState; exports.__fictSerializeSSRStateForScopes = _chunkWJMZ7X46cjs.__fictSerializeSSRStateForScopes; exports.__fictSetSSRState = _chunkWJMZ7X46cjs.__fictSetSSRState; exports.__fictSetSSRStreamHooks = _chunkWJMZ7X46cjs.__fictSetSSRStreamHooks; exports.__fictUseContext = _chunkWJMZ7X46cjs.__fictUseContext; exports.__fictUseEffect = _chunkWJMZ7X46cjs.__fictUseEffect; exports.__fictUseLexicalScope = _chunkWJMZ7X46cjs.__fictUseLexicalScope; exports.__fictUseMemo = _chunkWJMZ7X46cjs.__fictUseMemo; exports.__fictUseSignal = _chunkWJMZ7X46cjs.__fictUseSignal; exports.__resetReactiveState = _chunkWJMZ7X46cjs.__resetReactiveState; exports.addEventListener = _chunkAR2T7JEXcjs.addEventListener; exports.assign = _chunkAR2T7JEXcjs.assign; exports.bindAttribute = _chunkAR2T7JEXcjs.bindAttribute; exports.bindClass = _chunkAR2T7JEXcjs.bindClass; exports.bindEvent = _chunkAR2T7JEXcjs.bindEvent; exports.bindProperty = _chunkAR2T7JEXcjs.bindProperty; exports.bindRef = _chunkAR2T7JEXcjs.bindRef; exports.bindStyle = _chunkAR2T7JEXcjs.bindStyle; exports.bindText = _chunkAR2T7JEXcjs.bindText; exports.callEventHandler = _chunkAR2T7JEXcjs.callEventHandler; exports.classList = _chunkAR2T7JEXcjs.classList; exports.clearDelegatedEvents = _chunkAR2T7JEXcjs.clearDelegatedEvents; exports.createConditional = _chunkAR2T7JEXcjs.createConditional; exports.createEffect = _chunkWJMZ7X46cjs.createEffect; exports.createElement = _chunkAR2T7JEXcjs.createElement; exports.createKeyedList = _chunkCBRGOLTRcjs.createKeyedList; exports.createMemo = _chunkWJMZ7X46cjs.createMemo; exports.createPortal = _chunkAR2T7JEXcjs.createPortal; exports.createPropsProxy = _chunkAR2T7JEXcjs.createPropsProxy; exports.createRenderEffect = _chunkWJMZ7X46cjs.createRenderEffect; exports.createSelector = _chunkWJMZ7X46cjs.createSelector; exports.createSignal = _chunkWJMZ7X46cjs.signal; exports.createStore = _chunkWJMZ7X46cjs.createStore; exports.delegateEvents = _chunkAR2T7JEXcjs.delegateEvents; exports.deserializeValue = _chunkWJMZ7X46cjs.deserializeValue; exports.getPropAlias = _chunkWJMZ7X46cjs.getPropAlias; exports.getSlotEnd = _chunkAR2T7JEXcjs.getSlotEnd; exports.hydrateComponent = _chunkAR2T7JEXcjs.hydrateComponent; exports.insert = _chunkAR2T7JEXcjs.insert; exports.insertBetween = _chunkAR2T7JEXcjs.insertBetween; exports.insertNodesBefore = _chunkAR2T7JEXcjs.insertNodesBefore; exports.isNodeBetweenMarkers = _chunkCBRGOLTRcjs.isNodeBetweenMarkers; exports.isReactive = _chunkAR2T7JEXcjs.isReactive; exports.isStoreProxy = _chunkWJMZ7X46cjs.isStoreProxy; exports.keyed = _chunkAR2T7JEXcjs.keyed; exports.mergeProps = _chunkAR2T7JEXcjs.mergeProps; exports.moveNodesBefore = _chunkCBRGOLTRcjs.moveNodesBefore; exports.nonReactive = _chunkAR2T7JEXcjs.nonReactive; exports.onDestroy = _chunkWJMZ7X46cjs.onDestroy; exports.prop = _chunkAR2T7JEXcjs.prop; exports.reactive = _chunkAR2T7JEXcjs.reactive; exports.reconcileArrays = _chunkCBRGOLTRcjs.reconcileArrays; exports.removeNodes = _chunkAR2T7JEXcjs.removeNodes; exports.render = _chunkAR2T7JEXcjs.render; exports.resolvePath = _chunkAR2T7JEXcjs.resolvePath; exports.runInScope = _chunkECNK25S4cjs.runInScope; exports.serializeValue = _chunkWJMZ7X46cjs.serializeValue; exports.setAttr = _chunkAR2T7JEXcjs.setAttr; exports.setClass = _chunkAR2T7JEXcjs.setClass; exports.setProp = _chunkAR2T7JEXcjs.setProp; exports.setStyle = _chunkAR2T7JEXcjs.setStyle; exports.setText = _chunkAR2T7JEXcjs.setText; exports.spread = _chunkAR2T7JEXcjs.spread; exports.template = _chunkAR2T7JEXcjs.template; exports.toNodeArray = _chunkAR2T7JEXcjs.toNodeArray; exports.unwrap = _chunkAR2T7JEXcjs.unwrap; exports.unwrapStore = _chunkWJMZ7X46cjs.unwrapStore;
|
|
219
219
|
//# sourceMappingURL=internal.cjs.map
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { _ as __resetReactiveState, c as createSelector, s as createSignal } from './signal-Z4KkDk9h.cjs';
|
|
2
|
-
export { F as Fragment, _ as __fictProp, a as __fictPropsRest, d as createElement, c as createMemo, b as createPropsProxy, h as hydrateComponent, k as keyed, m as mergeProps, p as prop, r as render, t as template } from './props-
|
|
3
|
-
export { Q as AttributeSetter, O as BindingHandle, P as CreateElementFn, M as MaybeReactive, L as addEventListener, H as assign, l as bindAttribute, o as bindClass, w as bindEvent, y as bindProperty, z as bindRef, m as bindStyle, k as bindText, x as callEventHandler, I as classList, K as clearDelegatedEvents, D as createConditional, j as createEffect, E as createPortal, h as createRenderEffect, J as delegateEvents, A as insert, C as insertBetween, i as isReactive, n as nonReactive, N as onDestroy, r as reactive, p as setAttr, v as setClass, q as setProp, t as setStyle, s as setText, G as spread, u as unwrap } from './binding-
|
|
2
|
+
export { F as Fragment, _ as __fictProp, a as __fictPropsRest, d as createElement, c as createMemo, b as createPropsProxy, h as hydrateComponent, k as keyed, m as mergeProps, p as prop, r as render, t as template } from './props-tImUZAty.cjs';
|
|
3
|
+
export { Q as AttributeSetter, O as BindingHandle, P as CreateElementFn, M as MaybeReactive, L as addEventListener, H as assign, l as bindAttribute, o as bindClass, w as bindEvent, y as bindProperty, z as bindRef, m as bindStyle, k as bindText, x as callEventHandler, I as classList, K as clearDelegatedEvents, D as createConditional, j as createEffect, E as createPortal, h as createRenderEffect, J as delegateEvents, A as insert, C as insertBetween, i as isReactive, n as nonReactive, N as onDestroy, r as reactive, p as setAttr, v as setClass, q as setProp, t as setStyle, s as setText, G as spread, u as unwrap } from './binding-BlABuUiG.cjs';
|
|
4
4
|
export { F as FICT_SSR_SNAPSHOT_SCHEMA_VERSION, n as __fictDisableResumable, k as __fictDisableSSR, m as __fictEnableResumable, j as __fictEnableSSR, A as __fictEnsureScope, p as __fictEnterHydration, q as __fictExitHydration, E as __fictGetResume, z as __fictGetSSRScope, B as __fictGetScopeProps, t as __fictGetScopeRegistry, u as __fictGetScopesForBoundary, r as __fictIsHydrating, o as __fictIsResumable, l as __fictIsSSR, y as __fictMergeSSRState, c as __fictPopContext, i as __fictPrepareContext, b as __fictPushContext, C as __fictQrl, D as __fictRegisterResume, s as __fictRegisterScope, g as __fictRender, h as __fictResetContext, v as __fictSerializeSSRState, w as __fictSerializeSSRStateForScopes, x as __fictSetSSRState, a as __fictUseContext, f as __fictUseEffect, _ as __fictUseLexicalScope, e as __fictUseMemo, d as __fictUseSignal, H as deserializeValue, G as serializeValue } from './resume-DPZxmA95.cjs';
|
|
5
5
|
export { K as KeyedListBinding, c as createKeyedList, g as getSlotEnd, i as insertNodesBefore, b as isNodeBetweenMarkers, m as moveNodesBefore, a as removeNodes, r as resolvePath, t as toNodeArray } from './list-Bi8dDF8Q.cjs';
|
|
6
|
-
export { r as runInScope } from './scope-
|
|
6
|
+
export { r as runInScope } from './scope-GwC4DJ50.cjs';
|
|
7
7
|
|
|
8
8
|
type Store<T> = T;
|
|
9
9
|
/**
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { _ as __resetReactiveState, c as createSelector, s as createSignal } from './signal-Z4KkDk9h.js';
|
|
2
|
-
export { F as Fragment, _ as __fictProp, a as __fictPropsRest, d as createElement, c as createMemo, b as createPropsProxy, h as hydrateComponent, k as keyed, m as mergeProps, p as prop, r as render, t as template } from './props-
|
|
3
|
-
export { Q as AttributeSetter, O as BindingHandle, P as CreateElementFn, M as MaybeReactive, L as addEventListener, H as assign, l as bindAttribute, o as bindClass, w as bindEvent, y as bindProperty, z as bindRef, m as bindStyle, k as bindText, x as callEventHandler, I as classList, K as clearDelegatedEvents, D as createConditional, j as createEffect, E as createPortal, h as createRenderEffect, J as delegateEvents, A as insert, C as insertBetween, i as isReactive, n as nonReactive, N as onDestroy, r as reactive, p as setAttr, v as setClass, q as setProp, t as setStyle, s as setText, G as spread, u as unwrap } from './binding-
|
|
2
|
+
export { F as Fragment, _ as __fictProp, a as __fictPropsRest, d as createElement, c as createMemo, b as createPropsProxy, h as hydrateComponent, k as keyed, m as mergeProps, p as prop, r as render, t as template } from './props-DabFQwLR.js';
|
|
3
|
+
export { Q as AttributeSetter, O as BindingHandle, P as CreateElementFn, M as MaybeReactive, L as addEventListener, H as assign, l as bindAttribute, o as bindClass, w as bindEvent, y as bindProperty, z as bindRef, m as bindStyle, k as bindText, x as callEventHandler, I as classList, K as clearDelegatedEvents, D as createConditional, j as createEffect, E as createPortal, h as createRenderEffect, J as delegateEvents, A as insert, C as insertBetween, i as isReactive, n as nonReactive, N as onDestroy, r as reactive, p as setAttr, v as setClass, q as setProp, t as setStyle, s as setText, G as spread, u as unwrap } from './binding-CQUGLLBI.js';
|
|
4
4
|
export { F as FICT_SSR_SNAPSHOT_SCHEMA_VERSION, n as __fictDisableResumable, k as __fictDisableSSR, m as __fictEnableResumable, j as __fictEnableSSR, A as __fictEnsureScope, p as __fictEnterHydration, q as __fictExitHydration, E as __fictGetResume, z as __fictGetSSRScope, B as __fictGetScopeProps, t as __fictGetScopeRegistry, u as __fictGetScopesForBoundary, r as __fictIsHydrating, o as __fictIsResumable, l as __fictIsSSR, y as __fictMergeSSRState, c as __fictPopContext, i as __fictPrepareContext, b as __fictPushContext, C as __fictQrl, D as __fictRegisterResume, s as __fictRegisterScope, g as __fictRender, h as __fictResetContext, v as __fictSerializeSSRState, w as __fictSerializeSSRStateForScopes, x as __fictSetSSRState, a as __fictUseContext, f as __fictUseEffect, _ as __fictUseLexicalScope, e as __fictUseMemo, d as __fictUseSignal, H as deserializeValue, G as serializeValue } from './resume-C5IKAIdh.js';
|
|
5
5
|
export { K as KeyedListBinding, c as createKeyedList, g as getSlotEnd, i as insertNodesBefore, b as isNodeBetweenMarkers, m as moveNodesBefore, a as removeNodes, r as resolvePath, t as toNodeArray } from './list-BKM6YOPq.js';
|
|
6
|
-
export { r as runInScope } from './scope-
|
|
6
|
+
export { r as runInScope } from './scope-gpOMWTlf.js';
|
|
7
7
|
|
|
8
8
|
type Store<T> = T;
|
|
9
9
|
/**
|
package/dist/internal.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
isNodeBetweenMarkers,
|
|
4
4
|
moveNodesBefore,
|
|
5
5
|
reconcileArrays
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RK2WSQYL.js";
|
|
7
7
|
import {
|
|
8
8
|
runInScope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4P4DYWLQ.js";
|
|
10
10
|
import {
|
|
11
11
|
Fragment,
|
|
12
12
|
__fictProp,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
template,
|
|
52
52
|
toNodeArray,
|
|
53
53
|
unwrap
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-ZJZ6LMDN.js";
|
|
55
55
|
import {
|
|
56
56
|
Aliases,
|
|
57
57
|
BooleanAttributes,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
serializeValue,
|
|
110
110
|
signal,
|
|
111
111
|
unwrapStore
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-MAHWGB55.js";
|
|
113
113
|
export {
|
|
114
114
|
Aliases,
|
|
115
115
|
BooleanAttributes,
|
package/dist/loader.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkWJMZ7X46cjs = require('./chunk-WJMZ7X46.cjs');
|
|
12
12
|
|
|
13
13
|
// src/loader.ts
|
|
14
14
|
function resolveModuleUrl(url) {
|
|
@@ -54,7 +54,7 @@ function installResumableLoader(options = {}) {
|
|
|
54
54
|
prefetchedUrls.clear();
|
|
55
55
|
processedSnapshots.clear();
|
|
56
56
|
emittedIssueKeys.clear();
|
|
57
|
-
|
|
57
|
+
_chunkWJMZ7X46cjs.__fictSetSSRState.call(void 0, null);
|
|
58
58
|
if (eventListenerCleanup) {
|
|
59
59
|
eventListenerCleanup();
|
|
60
60
|
eventListenerCleanup = null;
|
|
@@ -71,7 +71,7 @@ function installResumableLoader(options = {}) {
|
|
|
71
71
|
if (_optionalChain([snapshotEl, 'optionalAccess', _ => _.textContent])) {
|
|
72
72
|
const state = parseSnapshotText(snapshotEl.textContent, `#${scriptId}`);
|
|
73
73
|
if (state) {
|
|
74
|
-
|
|
74
|
+
_chunkWJMZ7X46cjs.__fictSetSSRState.call(void 0, state);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
const snapshotScripts = doc.querySelectorAll(
|
|
@@ -104,8 +104,8 @@ function installResumableLoader(options = {}) {
|
|
|
104
104
|
});
|
|
105
105
|
snapshotObserver.observe(_nullishCoalesce(doc.documentElement, () => ( doc)), { childList: true, subtree: true });
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
const events = _nullishCoalesce(options.events, () => ( Array.from(
|
|
107
|
+
_chunkWJMZ7X46cjs.__fictEnableResumable.call(void 0, );
|
|
108
|
+
const events = _nullishCoalesce(options.events, () => ( Array.from(_chunkWJMZ7X46cjs.DelegatedEvents)));
|
|
109
109
|
for (const eventName of events) {
|
|
110
110
|
doc.addEventListener(eventName, handleResumableEvent, true);
|
|
111
111
|
}
|
|
@@ -129,7 +129,7 @@ function parseSnapshotScript(script) {
|
|
|
129
129
|
const source = script.id ? `#${script.id}` : "<script[data-fict-snapshot]>";
|
|
130
130
|
const state = parseSnapshotText(text, source);
|
|
131
131
|
if (state) {
|
|
132
|
-
|
|
132
|
+
_chunkWJMZ7X46cjs.__fictMergeSSRState.call(void 0, state);
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
function parseSnapshotText(text, source) {
|
|
@@ -141,7 +141,7 @@ function parseSnapshotText(text, source) {
|
|
|
141
141
|
code: "snapshot_parse_error",
|
|
142
142
|
message: "[fict/loader] Failed to parse SSR snapshot JSON.",
|
|
143
143
|
source,
|
|
144
|
-
expectedVersion:
|
|
144
|
+
expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
|
|
145
145
|
});
|
|
146
146
|
return null;
|
|
147
147
|
}
|
|
@@ -153,18 +153,18 @@ function normalizeSnapshotState(value, source) {
|
|
|
153
153
|
code: "snapshot_invalid_shape",
|
|
154
154
|
message: "[fict/loader] Snapshot payload must be an object.",
|
|
155
155
|
source,
|
|
156
|
-
expectedVersion:
|
|
156
|
+
expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
|
|
157
157
|
});
|
|
158
158
|
return null;
|
|
159
159
|
}
|
|
160
160
|
const rawVersion = value.v;
|
|
161
|
-
const version = rawVersion === void 0 ?
|
|
162
|
-
if (!Number.isInteger(version) || version !==
|
|
161
|
+
const version = rawVersion === void 0 ? _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION : rawVersion;
|
|
162
|
+
if (!Number.isInteger(version) || version !== _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION) {
|
|
163
163
|
const versionIssue = {
|
|
164
164
|
code: "snapshot_unsupported_version",
|
|
165
165
|
message: `[fict/loader] Snapshot schema version ${String(version)} is not supported by this runtime.`,
|
|
166
166
|
source,
|
|
167
|
-
expectedVersion:
|
|
167
|
+
expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
|
|
168
168
|
};
|
|
169
169
|
if (typeof version === "number") {
|
|
170
170
|
versionIssue.actualVersion = version;
|
|
@@ -180,11 +180,11 @@ function normalizeSnapshotState(value, source) {
|
|
|
180
180
|
code: "snapshot_invalid_shape",
|
|
181
181
|
message: "[fict/loader] Snapshot payload is missing a valid `scopes` object.",
|
|
182
182
|
source,
|
|
183
|
-
expectedVersion:
|
|
183
|
+
expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
|
|
184
184
|
});
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
return { v:
|
|
187
|
+
return { v: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION, scopes };
|
|
188
188
|
}
|
|
189
189
|
function isRecord(value) {
|
|
190
190
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -338,18 +338,18 @@ async function handleResumableEventAsync(event) {
|
|
|
338
338
|
if (!host) continue;
|
|
339
339
|
const scopeId = host.getAttribute("data-fict-s");
|
|
340
340
|
if (!scopeId) continue;
|
|
341
|
-
const snapshot =
|
|
341
|
+
const snapshot = _chunkWJMZ7X46cjs.__fictGetSSRScope.call(void 0, scopeId);
|
|
342
342
|
if (!snapshot) {
|
|
343
343
|
emitSnapshotIssue({
|
|
344
344
|
code: "scope_snapshot_missing",
|
|
345
345
|
message: `[fict/loader] Missing scope snapshot for ${scopeId}; skipping resumable handler execution.`,
|
|
346
346
|
source: "event",
|
|
347
|
-
expectedVersion:
|
|
347
|
+
expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION,
|
|
348
348
|
scopeId
|
|
349
349
|
});
|
|
350
350
|
continue;
|
|
351
351
|
}
|
|
352
|
-
|
|
352
|
+
_chunkWJMZ7X46cjs.__fictEnsureScope.call(void 0, scopeId, host, snapshot);
|
|
353
353
|
const { url, exportName } = parseQrl(qrl);
|
|
354
354
|
if (event.cancelable && (event.type === "click" || event.type === "submit")) {
|
|
355
355
|
const tag = node.tagName.toLowerCase();
|
|
@@ -366,7 +366,7 @@ async function handleResumableEventAsync(event) {
|
|
|
366
366
|
/* @vite-ignore */
|
|
367
367
|
resolvedResumeUrl
|
|
368
368
|
)));
|
|
369
|
-
const resumeFn =
|
|
369
|
+
const resumeFn = _chunkWJMZ7X46cjs.__fictGetResume.call(void 0, resumeExport);
|
|
370
370
|
if (typeof resumeFn === "function") {
|
|
371
371
|
await resumeFn(scopeId, host);
|
|
372
372
|
hydratedScopes.add(scopeId);
|
|
@@ -413,5 +413,5 @@ function buildEventPath(event) {
|
|
|
413
413
|
|
|
414
414
|
|
|
415
415
|
|
|
416
|
-
exports.__fictUseLexicalScope =
|
|
416
|
+
exports.__fictUseLexicalScope = _chunkWJMZ7X46cjs.__fictUseLexicalScope; exports.cleanupEventListeners = cleanupEventListeners; exports.installResumableLoader = installResumableLoader; exports.resetHydratedScopes = resetHydratedScopes; exports.resetPrefetchedUrls = resetPrefetchedUrls; exports.waitForPendingHandlers = waitForPendingHandlers;
|
|
417
417
|
//# sourceMappingURL=loader.cjs.map
|
package/dist/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as MemoOptions } from './signal-Z4KkDk9h.js';
|
|
2
|
-
import { F as FictNode, R as DOMElement } from './binding-
|
|
2
|
+
import { F as FictNode, R as DOMElement } from './binding-CQUGLLBI.js';
|
|
3
3
|
|
|
4
4
|
type Memo<T> = () => T;
|
|
5
5
|
declare function createMemo<T>(fn: () => T, options?: MemoOptions<T>): Memo<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as MemoOptions } from './signal-Z4KkDk9h.cjs';
|
|
2
|
-
import { F as FictNode, R as DOMElement } from './binding-
|
|
2
|
+
import { F as FictNode, R as DOMElement } from './binding-BlABuUiG.cjs';
|
|
3
3
|
|
|
4
4
|
type Memo<T> = () => T;
|
|
5
5
|
declare function createMemo<T>(fn: () => T, options?: MemoOptions<T>): Memo<T>;
|
package/package.json
CHANGED
package/src/binding.ts
CHANGED
|
@@ -52,6 +52,7 @@ const PROP_CACHE = Symbol('fict:prop')
|
|
|
52
52
|
const STYLE_CACHE = Symbol('fict:style')
|
|
53
53
|
const CLASS_STATE_CACHE = Symbol('fict:class-state')
|
|
54
54
|
const CLASS_VALUE_CACHE = Symbol('fict:class-value')
|
|
55
|
+
const EVENT_TUPLE_LISTENER_CACHE = Symbol('fict:event-tuple-listener-cache')
|
|
55
56
|
const NON_REACTIVE_FN_MARKER = Symbol.for('fict:non-reactive-fn')
|
|
56
57
|
const REACTIVE_FN_MARKER = Symbol.for('fict:reactive-fn')
|
|
57
58
|
const NON_REACTIVE_FN_REGISTRY_KEY = Symbol.for('fict:non-reactive-fn-registry')
|
|
@@ -60,6 +61,8 @@ type NonReactiveRegistryHost = typeof globalThis & {
|
|
|
60
61
|
[NON_REACTIVE_FN_REGISTRY_KEY]?: WeakSet<(...args: unknown[]) => unknown>
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
type EventTupleListenerStore = Map<string, EventListener>
|
|
65
|
+
|
|
63
66
|
const PROPERTY_BINDING_KEYS = new Set([
|
|
64
67
|
'value',
|
|
65
68
|
'checked',
|
|
@@ -1314,23 +1317,71 @@ export function addEventListener(
|
|
|
1314
1317
|
handler: EventListener | [EventListener, unknown] | null | undefined,
|
|
1315
1318
|
delegate?: boolean,
|
|
1316
1319
|
): void {
|
|
1317
|
-
if (handler == null) return
|
|
1318
|
-
|
|
1319
1320
|
if (delegate) {
|
|
1321
|
+
const key = `$$${name}`
|
|
1322
|
+
const dataKey = `${key}Data`
|
|
1323
|
+
|
|
1324
|
+
if (handler == null) {
|
|
1325
|
+
;(node as unknown as Record<string, unknown>)[key] = undefined
|
|
1326
|
+
;(node as unknown as Record<string, unknown>)[dataKey] = undefined
|
|
1327
|
+
return
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1320
1330
|
// Event delegation: store handler on element
|
|
1321
1331
|
if (Array.isArray(handler)) {
|
|
1322
|
-
;(node as unknown as Record<string, unknown>)[
|
|
1323
|
-
;(node as unknown as Record<string, unknown>)[
|
|
1332
|
+
;(node as unknown as Record<string, unknown>)[key] = handler[0]
|
|
1333
|
+
;(node as unknown as Record<string, unknown>)[dataKey] = handler[1]
|
|
1324
1334
|
} else {
|
|
1325
|
-
;(node as unknown as Record<string, unknown>)[
|
|
1335
|
+
;(node as unknown as Record<string, unknown>)[key] = handler
|
|
1336
|
+
;(node as unknown as Record<string, unknown>)[dataKey] = undefined
|
|
1326
1337
|
}
|
|
1327
|
-
|
|
1338
|
+
return
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
if (handler == null) return
|
|
1342
|
+
|
|
1343
|
+
if (Array.isArray(handler)) {
|
|
1328
1344
|
// Non-delegated with data binding
|
|
1345
|
+
const store = getTupleEventListenerStore(node)
|
|
1346
|
+
const existing = store.get(name)
|
|
1347
|
+
if (existing) {
|
|
1348
|
+
node.removeEventListener(name, existing)
|
|
1349
|
+
}
|
|
1329
1350
|
const handlerFn = handler[0] as (data: unknown, e: Event) => void
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1351
|
+
const wrapped = (e: Event) => handlerFn.call(node, handler[1], e)
|
|
1352
|
+
store.set(name, wrapped)
|
|
1353
|
+
node.addEventListener(name, wrapped)
|
|
1354
|
+
return
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
// Regular event listener
|
|
1358
|
+
node.addEventListener(name, handler as EventListener)
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
function getTupleEventListenerStore(node: Element): EventTupleListenerStore {
|
|
1362
|
+
const host = node as unknown as {
|
|
1363
|
+
[EVENT_TUPLE_LISTENER_CACHE]?: EventTupleListenerStore
|
|
1364
|
+
}
|
|
1365
|
+
if (!host[EVENT_TUPLE_LISTENER_CACHE]) {
|
|
1366
|
+
host[EVENT_TUPLE_LISTENER_CACHE] = new Map<string, EventListener>()
|
|
1367
|
+
}
|
|
1368
|
+
return host[EVENT_TUPLE_LISTENER_CACHE]!
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
function removeStoredTupleEventListener(node: Element, name: string): void {
|
|
1372
|
+
const host = node as unknown as {
|
|
1373
|
+
[EVENT_TUPLE_LISTENER_CACHE]?: EventTupleListenerStore
|
|
1374
|
+
}
|
|
1375
|
+
const store = host[EVENT_TUPLE_LISTENER_CACHE]
|
|
1376
|
+
if (!store) return
|
|
1377
|
+
|
|
1378
|
+
const wrapped = store.get(name)
|
|
1379
|
+
if (!wrapped) return
|
|
1380
|
+
|
|
1381
|
+
node.removeEventListener(name, wrapped)
|
|
1382
|
+
store.delete(name)
|
|
1383
|
+
if (store.size === 0) {
|
|
1384
|
+
delete host[EVENT_TUPLE_LISTENER_CACHE]
|
|
1334
1385
|
}
|
|
1335
1386
|
}
|
|
1336
1387
|
|
|
@@ -1526,29 +1577,40 @@ export function bindRef(el: Element, ref: unknown): Cleanup {
|
|
|
1526
1577
|
*/
|
|
1527
1578
|
export function spread(
|
|
1528
1579
|
node: Element,
|
|
1529
|
-
props: Record<string, unknown> = {},
|
|
1580
|
+
props: Record<string, unknown> | (() => Record<string, unknown>) = {},
|
|
1530
1581
|
isSVG = false,
|
|
1531
1582
|
skipChildren = false,
|
|
1583
|
+
exclude: readonly string[] = [],
|
|
1532
1584
|
): Record<string, unknown> {
|
|
1533
1585
|
const prevProps: Record<string, unknown> = {}
|
|
1586
|
+
const excludedProps = exclude.length > 0 ? new Set(exclude) : undefined
|
|
1587
|
+
const resolveProps = (): Record<string, unknown> => {
|
|
1588
|
+
const next = typeof props === 'function' ? (props as () => Record<string, unknown>)() : props
|
|
1589
|
+
if (!next || typeof next !== 'object') return {}
|
|
1590
|
+
return next
|
|
1591
|
+
}
|
|
1534
1592
|
|
|
1535
1593
|
// Handle children if not skipped
|
|
1536
|
-
if (!skipChildren
|
|
1594
|
+
if (!skipChildren) {
|
|
1537
1595
|
createRenderEffect(() => {
|
|
1538
|
-
|
|
1596
|
+
const nextProps = resolveProps()
|
|
1597
|
+
if ('children' in nextProps) {
|
|
1598
|
+
prevProps.children = nextProps.children
|
|
1599
|
+
}
|
|
1539
1600
|
})
|
|
1540
1601
|
}
|
|
1541
1602
|
|
|
1542
1603
|
// Handle ref
|
|
1543
1604
|
createRenderEffect(() => {
|
|
1544
|
-
|
|
1545
|
-
|
|
1605
|
+
const nextProps = resolveProps()
|
|
1606
|
+
if (typeof nextProps.ref === 'function') {
|
|
1607
|
+
;(nextProps.ref as (el: Element) => void)(node)
|
|
1546
1608
|
}
|
|
1547
1609
|
})
|
|
1548
1610
|
|
|
1549
1611
|
// Handle all other props
|
|
1550
1612
|
createRenderEffect(() => {
|
|
1551
|
-
assign(node,
|
|
1613
|
+
assign(node, resolveProps(), isSVG, true, prevProps, true, excludedProps)
|
|
1552
1614
|
})
|
|
1553
1615
|
|
|
1554
1616
|
return prevProps
|
|
@@ -1572,11 +1634,13 @@ export function assign(
|
|
|
1572
1634
|
skipChildren = false,
|
|
1573
1635
|
prevProps: Record<string, unknown> = {},
|
|
1574
1636
|
skipRef = false,
|
|
1637
|
+
excludedProps?: ReadonlySet<string>,
|
|
1575
1638
|
): void {
|
|
1576
1639
|
props = props || {}
|
|
1577
1640
|
|
|
1578
1641
|
// Remove props that are no longer present
|
|
1579
1642
|
for (const prop in prevProps) {
|
|
1643
|
+
if (excludedProps?.has(prop)) continue
|
|
1580
1644
|
if (!(prop in props)) {
|
|
1581
1645
|
if (prop === 'children') continue
|
|
1582
1646
|
prevProps[prop] = assignProp(node, prop, null, prevProps[prop], isSVG, skipRef, props)
|
|
@@ -1585,6 +1649,7 @@ export function assign(
|
|
|
1585
1649
|
|
|
1586
1650
|
// Set or update props
|
|
1587
1651
|
for (const prop in props) {
|
|
1652
|
+
if (excludedProps?.has(prop)) continue
|
|
1588
1653
|
if (prop === 'children') {
|
|
1589
1654
|
if (!skipChildren) {
|
|
1590
1655
|
// Handle children insertion
|
|
@@ -1656,11 +1721,19 @@ function assignProp(
|
|
|
1656
1721
|
const eventName = prop.slice(2).toLowerCase()
|
|
1657
1722
|
const shouldDelegate = DelegatedEvents.has(eventName)
|
|
1658
1723
|
if (!shouldDelegate && prev) {
|
|
1659
|
-
|
|
1660
|
-
|
|
1724
|
+
if (Array.isArray(prev)) {
|
|
1725
|
+
removeStoredTupleEventListener(node, eventName)
|
|
1726
|
+
} else {
|
|
1727
|
+
node.removeEventListener(eventName, prev as EventListener)
|
|
1728
|
+
}
|
|
1661
1729
|
}
|
|
1662
1730
|
if (shouldDelegate || value) {
|
|
1663
|
-
addEventListener(
|
|
1731
|
+
addEventListener(
|
|
1732
|
+
node,
|
|
1733
|
+
eventName,
|
|
1734
|
+
value as EventListener | [EventListener, unknown] | null | undefined,
|
|
1735
|
+
shouldDelegate,
|
|
1736
|
+
)
|
|
1664
1737
|
if (shouldDelegate) delegateEvents([eventName])
|
|
1665
1738
|
}
|
|
1666
1739
|
return value
|
package/src/resume.ts
CHANGED
|
@@ -64,8 +64,7 @@ const resumedScopes = new Map<
|
|
|
64
64
|
{ ctx: HookContext; host: Element; props?: Record<string, unknown> }
|
|
65
65
|
>()
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
ssrEnabled = true
|
|
67
|
+
function resetSSRTrackingState(): void {
|
|
69
68
|
scopeCounter = 0
|
|
70
69
|
scopeRegistry = new Map()
|
|
71
70
|
boundaryScopes = new Map()
|
|
@@ -73,9 +72,14 @@ export function __fictEnableSSR(): void {
|
|
|
73
72
|
snapshotState = null
|
|
74
73
|
}
|
|
75
74
|
|
|
75
|
+
export function __fictEnableSSR(): void {
|
|
76
|
+
ssrEnabled = true
|
|
77
|
+
resetSSRTrackingState()
|
|
78
|
+
}
|
|
79
|
+
|
|
76
80
|
export function __fictDisableSSR(): void {
|
|
77
81
|
ssrEnabled = false
|
|
78
|
-
|
|
82
|
+
resetSSRTrackingState()
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
export function __fictEnableResumable(): void {
|
package/src/store.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { signal, batch, type SignalAccessor } from './signal'
|
|
1
|
+
import { signal, batch, getActiveSub, type SignalAccessor } from './signal'
|
|
2
2
|
|
|
3
3
|
const PROXY = Symbol('fict:store-proxy')
|
|
4
4
|
const TARGET = Symbol('fict:store-target')
|
|
@@ -166,6 +166,9 @@ export function unwrapStore<T>(value: T): T {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
function track(target: object, prop: string | symbol) {
|
|
169
|
+
// Avoid allocating per-property signals when no reactive subscriber is active.
|
|
170
|
+
if (!getActiveSub()) return
|
|
171
|
+
|
|
169
172
|
let signals = signalCache.get(target)
|
|
170
173
|
if (!signals) {
|
|
171
174
|
signals = new Map()
|