@fictjs/runtime 0.13.0 → 0.15.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.
Files changed (57) hide show
  1. package/README.md +25 -0
  2. package/dist/advanced.cjs +9 -9
  3. package/dist/advanced.d.cts +3 -3
  4. package/dist/advanced.d.ts +3 -3
  5. package/dist/advanced.js +4 -4
  6. package/dist/{binding-FRyTeLDn.d.cts → binding-BlABuUiG.d.cts} +2 -2
  7. package/dist/{binding-DcnhUSQK.d.ts → binding-CQUGLLBI.d.ts} +2 -2
  8. package/dist/{chunk-2UR2UWE2.js → chunk-4P4DYWLQ.js} +3 -3
  9. package/dist/{chunk-4QGEN5SJ.cjs → chunk-AR2T7JEX.cjs} +275 -219
  10. package/dist/chunk-AR2T7JEX.cjs.map +1 -0
  11. package/dist/{chunk-FHQZCAAK.cjs → chunk-BADX4WTQ.cjs} +17 -17
  12. package/dist/{chunk-FHQZCAAK.cjs.map → chunk-BADX4WTQ.cjs.map} +1 -1
  13. package/dist/{chunk-44EQF3AR.cjs → chunk-CBRGOLTR.cjs} +40 -40
  14. package/dist/{chunk-44EQF3AR.cjs.map → chunk-CBRGOLTR.cjs.map} +1 -1
  15. package/dist/{chunk-C5IE4WUG.cjs → chunk-ECNK25S4.cjs} +8 -8
  16. package/dist/{chunk-C5IE4WUG.cjs.map → chunk-ECNK25S4.cjs.map} +1 -1
  17. package/dist/{chunk-DIK33H5U.js → chunk-MAHWGB55.js} +12 -5
  18. package/dist/chunk-MAHWGB55.js.map +1 -0
  19. package/dist/{chunk-S63VBIWN.js → chunk-RK2WSQYL.js} +3 -3
  20. package/dist/{chunk-QNMYVXRL.cjs → chunk-WJMZ7X46.cjs} +12 -5
  21. package/dist/chunk-WJMZ7X46.cjs.map +1 -0
  22. package/dist/{chunk-WIHNVN6L.js → chunk-ZJZ6LMDN.js} +85 -29
  23. package/dist/chunk-ZJZ6LMDN.js.map +1 -0
  24. package/dist/{chunk-FESAXMHT.js → chunk-ZWQLXWSV.js} +3 -3
  25. package/dist/{devtools-D2z4llpA.d.ts → devtools-DNnnDGu1.d.ts} +1 -1
  26. package/dist/{devtools-BtIkN77t.d.cts → devtools-DWIZRe7L.d.cts} +1 -1
  27. package/dist/index.cjs +42 -42
  28. package/dist/index.d.cts +4 -4
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.dev.js +3 -2
  31. package/dist/index.dev.js.map +1 -1
  32. package/dist/index.js +3 -3
  33. package/dist/internal-list.cjs +4 -4
  34. package/dist/internal-list.js +3 -3
  35. package/dist/internal.cjs +5 -5
  36. package/dist/internal.d.cts +3 -3
  37. package/dist/internal.d.ts +3 -3
  38. package/dist/internal.js +4 -4
  39. package/dist/loader.cjs +18 -18
  40. package/dist/loader.js +1 -1
  41. package/dist/{props-D1nj2p_3.d.ts → props-DabFQwLR.d.ts} +1 -1
  42. package/dist/{props-9chMyBGb.d.cts → props-tImUZAty.d.cts} +1 -1
  43. package/dist/{scope-Bn3sxem5.d.cts → scope-GwC4DJ50.d.cts} +1 -1
  44. package/dist/{scope-BSkhJr0a.d.ts → scope-gpOMWTlf.d.ts} +1 -1
  45. package/package.json +2 -2
  46. package/src/binding.ts +98 -27
  47. package/src/node-ops.ts +1 -1
  48. package/src/resume.ts +7 -3
  49. package/src/signal.ts +1 -1
  50. package/src/store.ts +4 -1
  51. package/dist/chunk-4QGEN5SJ.cjs.map +0 -1
  52. package/dist/chunk-DIK33H5U.js.map +0 -1
  53. package/dist/chunk-QNMYVXRL.cjs.map +0 -1
  54. package/dist/chunk-WIHNVN6L.js.map +0 -1
  55. /package/dist/{chunk-2UR2UWE2.js.map → chunk-4P4DYWLQ.js.map} +0 -0
  56. /package/dist/{chunk-S63VBIWN.js.map → chunk-RK2WSQYL.js.map} +0 -0
  57. /package/dist/{chunk-FESAXMHT.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-FESAXMHT.js";
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-WIHNVN6L.js";
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-DIK33H5U.js";
43
+ } from "./chunk-MAHWGB55.js";
44
44
 
45
45
  // src/ref.ts
46
46
  function createRef() {
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk44EQF3ARcjs = require('./chunk-44EQF3AR.cjs');
3
+ var _chunkCBRGOLTRcjs = require('./chunk-CBRGOLTR.cjs');
4
4
 
5
5
 
6
- var _chunk4QGEN5SJcjs = require('./chunk-4QGEN5SJ.cjs');
7
- require('./chunk-QNMYVXRL.cjs');
6
+ var _chunkAR2T7JEXcjs = require('./chunk-AR2T7JEX.cjs');
7
+ require('./chunk-WJMZ7X46.cjs');
8
8
 
9
9
 
10
10
 
11
- exports.createKeyedList = _chunk44EQF3ARcjs.createKeyedList; exports.toNodeArray = _chunk4QGEN5SJcjs.toNodeArray;
11
+ exports.createKeyedList = _chunkCBRGOLTRcjs.createKeyedList; exports.toNodeArray = _chunkAR2T7JEXcjs.toNodeArray;
12
12
  //# sourceMappingURL=internal-list.cjs.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createKeyedList
3
- } from "./chunk-S63VBIWN.js";
3
+ } from "./chunk-RK2WSQYL.js";
4
4
  import {
5
5
  toNodeArray
6
- } from "./chunk-WIHNVN6L.js";
7
- import "./chunk-DIK33H5U.js";
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 _chunk44EQF3ARcjs = require('./chunk-44EQF3AR.cjs');
6
+ var _chunkCBRGOLTRcjs = require('./chunk-CBRGOLTR.cjs');
7
7
 
8
8
 
9
- var _chunkC5IE4WUGcjs = require('./chunk-C5IE4WUG.cjs');
9
+ var _chunkECNK25S4cjs = require('./chunk-ECNK25S4.cjs');
10
10
 
11
11
 
12
12
 
@@ -51,7 +51,7 @@ var _chunkC5IE4WUGcjs = require('./chunk-C5IE4WUG.cjs');
51
51
 
52
52
 
53
53
 
54
- var _chunk4QGEN5SJcjs = require('./chunk-4QGEN5SJ.cjs');
54
+ var _chunkAR2T7JEXcjs = require('./chunk-AR2T7JEX.cjs');
55
55
 
56
56
 
57
57
 
@@ -109,7 +109,7 @@ var _chunk4QGEN5SJcjs = require('./chunk-4QGEN5SJ.cjs');
109
109
 
110
110
 
111
111
 
112
- var _chunkQNMYVXRLcjs = require('./chunk-QNMYVXRL.cjs');
112
+ var _chunkWJMZ7X46cjs = require('./chunk-WJMZ7X46.cjs');
113
113
 
114
114
 
115
115
 
@@ -215,5 +215,5 @@ var _chunkQNMYVXRLcjs = require('./chunk-QNMYVXRL.cjs');
215
215
 
216
216
 
217
217
 
218
- exports.Aliases = _chunkQNMYVXRLcjs.Aliases; exports.BooleanAttributes = _chunkQNMYVXRLcjs.BooleanAttributes; exports.ChildProperties = _chunkQNMYVXRLcjs.ChildProperties; exports.DelegatedEvents = _chunkQNMYVXRLcjs.DelegatedEvents; exports.FICT_SSR_SNAPSHOT_SCHEMA_VERSION = _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION; exports.Fragment = _chunk4QGEN5SJcjs.Fragment; exports.Properties = _chunkQNMYVXRLcjs.Properties; exports.SVGElements = _chunkQNMYVXRLcjs.SVGElements; exports.SVGNamespace = _chunkQNMYVXRLcjs.SVGNamespace; exports.UnitlessStyles = _chunkQNMYVXRLcjs.UnitlessStyles; exports.__fictDisableResumable = _chunkQNMYVXRLcjs.__fictDisableResumable; exports.__fictDisableSSR = _chunkQNMYVXRLcjs.__fictDisableSSR; exports.__fictEnableResumable = _chunkQNMYVXRLcjs.__fictEnableResumable; exports.__fictEnableSSR = _chunkQNMYVXRLcjs.__fictEnableSSR; exports.__fictEnsureScope = _chunkQNMYVXRLcjs.__fictEnsureScope; exports.__fictEnterHydration = _chunkQNMYVXRLcjs.__fictEnterHydration; exports.__fictExitHydration = _chunkQNMYVXRLcjs.__fictExitHydration; exports.__fictGetResume = _chunkQNMYVXRLcjs.__fictGetResume; exports.__fictGetSSRScope = _chunkQNMYVXRLcjs.__fictGetSSRScope; exports.__fictGetSSRStreamHooks = _chunkQNMYVXRLcjs.__fictGetSSRStreamHooks; exports.__fictGetScopeProps = _chunkQNMYVXRLcjs.__fictGetScopeProps; exports.__fictGetScopeRegistry = _chunkQNMYVXRLcjs.__fictGetScopeRegistry; exports.__fictGetScopesForBoundary = _chunkQNMYVXRLcjs.__fictGetScopesForBoundary; exports.__fictIsHydrating = _chunkQNMYVXRLcjs.__fictIsHydrating; exports.__fictIsResumable = _chunkQNMYVXRLcjs.__fictIsResumable; exports.__fictIsSSR = _chunkQNMYVXRLcjs.__fictIsSSR; exports.__fictMergeSSRState = _chunkQNMYVXRLcjs.__fictMergeSSRState; exports.__fictPopContext = _chunkQNMYVXRLcjs.__fictPopContext; exports.__fictPrepareContext = _chunkQNMYVXRLcjs.__fictPrepareContext; exports.__fictProp = _chunk4QGEN5SJcjs.__fictProp; exports.__fictPropsRest = _chunk4QGEN5SJcjs.__fictPropsRest; exports.__fictPushContext = _chunkQNMYVXRLcjs.__fictPushContext; exports.__fictQrl = _chunkQNMYVXRLcjs.__fictQrl; exports.__fictRegisterResume = _chunkQNMYVXRLcjs.__fictRegisterResume; exports.__fictRegisterScope = _chunkQNMYVXRLcjs.__fictRegisterScope; exports.__fictRender = _chunkQNMYVXRLcjs.__fictRender; exports.__fictResetContext = _chunkQNMYVXRLcjs.__fictResetContext; exports.__fictSerializeSSRState = _chunkQNMYVXRLcjs.__fictSerializeSSRState; exports.__fictSerializeSSRStateForScopes = _chunkQNMYVXRLcjs.__fictSerializeSSRStateForScopes; exports.__fictSetSSRState = _chunkQNMYVXRLcjs.__fictSetSSRState; exports.__fictSetSSRStreamHooks = _chunkQNMYVXRLcjs.__fictSetSSRStreamHooks; exports.__fictUseContext = _chunkQNMYVXRLcjs.__fictUseContext; exports.__fictUseEffect = _chunkQNMYVXRLcjs.__fictUseEffect; exports.__fictUseLexicalScope = _chunkQNMYVXRLcjs.__fictUseLexicalScope; exports.__fictUseMemo = _chunkQNMYVXRLcjs.__fictUseMemo; exports.__fictUseSignal = _chunkQNMYVXRLcjs.__fictUseSignal; exports.__resetReactiveState = _chunkQNMYVXRLcjs.__resetReactiveState; exports.addEventListener = _chunk4QGEN5SJcjs.addEventListener; exports.assign = _chunk4QGEN5SJcjs.assign; exports.bindAttribute = _chunk4QGEN5SJcjs.bindAttribute; exports.bindClass = _chunk4QGEN5SJcjs.bindClass; exports.bindEvent = _chunk4QGEN5SJcjs.bindEvent; exports.bindProperty = _chunk4QGEN5SJcjs.bindProperty; exports.bindRef = _chunk4QGEN5SJcjs.bindRef; exports.bindStyle = _chunk4QGEN5SJcjs.bindStyle; exports.bindText = _chunk4QGEN5SJcjs.bindText; exports.callEventHandler = _chunk4QGEN5SJcjs.callEventHandler; exports.classList = _chunk4QGEN5SJcjs.classList; exports.clearDelegatedEvents = _chunk4QGEN5SJcjs.clearDelegatedEvents; exports.createConditional = _chunk4QGEN5SJcjs.createConditional; exports.createEffect = _chunkQNMYVXRLcjs.createEffect; exports.createElement = _chunk4QGEN5SJcjs.createElement; exports.createKeyedList = _chunk44EQF3ARcjs.createKeyedList; exports.createMemo = _chunkQNMYVXRLcjs.createMemo; exports.createPortal = _chunk4QGEN5SJcjs.createPortal; exports.createPropsProxy = _chunk4QGEN5SJcjs.createPropsProxy; exports.createRenderEffect = _chunkQNMYVXRLcjs.createRenderEffect; exports.createSelector = _chunkQNMYVXRLcjs.createSelector; exports.createSignal = _chunkQNMYVXRLcjs.signal; exports.createStore = _chunkQNMYVXRLcjs.createStore; exports.delegateEvents = _chunk4QGEN5SJcjs.delegateEvents; exports.deserializeValue = _chunkQNMYVXRLcjs.deserializeValue; exports.getPropAlias = _chunkQNMYVXRLcjs.getPropAlias; exports.getSlotEnd = _chunk4QGEN5SJcjs.getSlotEnd; exports.hydrateComponent = _chunk4QGEN5SJcjs.hydrateComponent; exports.insert = _chunk4QGEN5SJcjs.insert; exports.insertBetween = _chunk4QGEN5SJcjs.insertBetween; exports.insertNodesBefore = _chunk4QGEN5SJcjs.insertNodesBefore; exports.isNodeBetweenMarkers = _chunk44EQF3ARcjs.isNodeBetweenMarkers; exports.isReactive = _chunk4QGEN5SJcjs.isReactive; exports.isStoreProxy = _chunkQNMYVXRLcjs.isStoreProxy; exports.keyed = _chunk4QGEN5SJcjs.keyed; exports.mergeProps = _chunk4QGEN5SJcjs.mergeProps; exports.moveNodesBefore = _chunk44EQF3ARcjs.moveNodesBefore; exports.nonReactive = _chunk4QGEN5SJcjs.nonReactive; exports.onDestroy = _chunkQNMYVXRLcjs.onDestroy; exports.prop = _chunk4QGEN5SJcjs.prop; exports.reactive = _chunk4QGEN5SJcjs.reactive; exports.reconcileArrays = _chunk44EQF3ARcjs.reconcileArrays; exports.removeNodes = _chunk4QGEN5SJcjs.removeNodes; exports.render = _chunk4QGEN5SJcjs.render; exports.resolvePath = _chunk4QGEN5SJcjs.resolvePath; exports.runInScope = _chunkC5IE4WUGcjs.runInScope; exports.serializeValue = _chunkQNMYVXRLcjs.serializeValue; exports.setAttr = _chunk4QGEN5SJcjs.setAttr; exports.setClass = _chunk4QGEN5SJcjs.setClass; exports.setProp = _chunk4QGEN5SJcjs.setProp; exports.setStyle = _chunk4QGEN5SJcjs.setStyle; exports.setText = _chunk4QGEN5SJcjs.setText; exports.spread = _chunk4QGEN5SJcjs.spread; exports.template = _chunk4QGEN5SJcjs.template; exports.toNodeArray = _chunk4QGEN5SJcjs.toNodeArray; exports.unwrap = _chunk4QGEN5SJcjs.unwrap; exports.unwrapStore = _chunkQNMYVXRLcjs.unwrapStore;
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
@@ -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-9chMyBGb.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-FRyTeLDn.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-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-Bn3sxem5.cjs';
6
+ export { r as runInScope } from './scope-GwC4DJ50.cjs';
7
7
 
8
8
  type Store<T> = T;
9
9
  /**
@@ -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-D1nj2p_3.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-DcnhUSQK.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-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-BSkhJr0a.js';
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-S63VBIWN.js";
6
+ } from "./chunk-RK2WSQYL.js";
7
7
  import {
8
8
  runInScope
9
- } from "./chunk-2UR2UWE2.js";
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-WIHNVN6L.js";
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-DIK33H5U.js";
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 _chunkQNMYVXRLcjs = require('./chunk-QNMYVXRL.cjs');
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
- _chunkQNMYVXRLcjs.__fictSetSSRState.call(void 0, null);
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
- _chunkQNMYVXRLcjs.__fictSetSSRState.call(void 0, state);
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
- _chunkQNMYVXRLcjs.__fictEnableResumable.call(void 0, );
108
- const events = _nullishCoalesce(options.events, () => ( Array.from(_chunkQNMYVXRLcjs.DelegatedEvents)));
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
- _chunkQNMYVXRLcjs.__fictMergeSSRState.call(void 0, state);
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: _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
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: _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
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 ? _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION : rawVersion;
162
- if (!Number.isInteger(version) || version !== _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_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: _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
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: _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
183
+ expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION
184
184
  });
185
185
  return null;
186
186
  }
187
- return { v: _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION, scopes };
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 = _chunkQNMYVXRLcjs.__fictGetSSRScope.call(void 0, scopeId);
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: _chunkQNMYVXRLcjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION,
347
+ expectedVersion: _chunkWJMZ7X46cjs.FICT_SSR_SNAPSHOT_SCHEMA_VERSION,
348
348
  scopeId
349
349
  });
350
350
  continue;
351
351
  }
352
- _chunkQNMYVXRLcjs.__fictEnsureScope.call(void 0, scopeId, host, snapshot);
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 = _chunkQNMYVXRLcjs.__fictGetResume.call(void 0, resumeExport);
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 = _chunkQNMYVXRLcjs.__fictUseLexicalScope; exports.cleanupEventListeners = cleanupEventListeners; exports.installResumableLoader = installResumableLoader; exports.resetHydratedScopes = resetHydratedScopes; exports.resetPrefetchedUrls = resetPrefetchedUrls; exports.waitForPendingHandlers = waitForPendingHandlers;
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
@@ -8,7 +8,7 @@ import {
8
8
  __fictMergeSSRState,
9
9
  __fictSetSSRState,
10
10
  __fictUseLexicalScope
11
- } from "./chunk-DIK33H5U.js";
11
+ } from "./chunk-MAHWGB55.js";
12
12
 
13
13
  // src/loader.ts
14
14
  function resolveModuleUrl(url) {
@@ -1,5 +1,5 @@
1
1
  import { M as MemoOptions } from './signal-Z4KkDk9h.js';
2
- import { F as FictNode, R as DOMElement } from './binding-DcnhUSQK.js';
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-FRyTeLDn.cjs';
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>;
@@ -1,4 +1,4 @@
1
- import { M as MaybeReactive } from './binding-FRyTeLDn.cjs';
1
+ import { M as MaybeReactive } from './binding-BlABuUiG.cjs';
2
2
 
3
3
  interface ReactiveScope {
4
4
  run<T>(fn: () => T): T;
@@ -1,4 +1,4 @@
1
- import { M as MaybeReactive } from './binding-DcnhUSQK.js';
1
+ import { M as MaybeReactive } from './binding-CQUGLLBI.js';
2
2
 
3
3
  interface ReactiveScope {
4
4
  run<T>(fn: () => T): T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fictjs/runtime",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Fict reactive runtime",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -64,7 +64,7 @@
64
64
  "src"
65
65
  ],
66
66
  "devDependencies": {
67
- "jsdom": "^27.4.0",
67
+ "jsdom": "^28.1.0",
68
68
  "tsup": "^8.5.1"
69
69
  },
70
70
  "author": "unadlib",
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',
@@ -796,7 +799,7 @@ export function insert(
796
799
 
797
800
  const root = createRootContext(hostRoot)
798
801
  const prev = pushRoot(root)
799
- let nodes: Node[] = []
802
+ let nodes: Node[]
800
803
  let handledError = false
801
804
  try {
802
805
  let newNode: Node | Node[]
@@ -968,7 +971,7 @@ export function insertBetween(
968
971
 
969
972
  const root = createRootContext(hostRoot)
970
973
  const prev = pushRoot(root)
971
- let nodes: Node[] = []
974
+ let nodes: Node[]
972
975
  let handledError = false
973
976
  try {
974
977
  let newNode: Node | Node[] = undefined as unknown as Node | Node[]
@@ -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>)[`$$${name}`] = handler[0]
1323
- ;(node as unknown as Record<string, unknown>)[`$$${name}Data`] = handler[1]
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>)[`$$${name}`] = handler
1335
+ ;(node as unknown as Record<string, unknown>)[key] = handler
1336
+ ;(node as unknown as Record<string, unknown>)[dataKey] = undefined
1326
1337
  }
1327
- } else if (Array.isArray(handler)) {
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
- node.addEventListener(name, (e: Event) => handlerFn.call(node, handler[1], e))
1331
- } else {
1332
- // Regular event listener
1333
- node.addEventListener(name, handler as EventListener)
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 && 'children' in props) {
1594
+ if (!skipChildren) {
1537
1595
  createRenderEffect(() => {
1538
- prevProps.children = props.children
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
- if (typeof props.ref === 'function') {
1545
- ;(props.ref as (el: Element) => void)(node)
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, props, isSVG, true, prevProps, true)
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
- const handler = Array.isArray(prev) ? prev[0] : prev
1660
- node.removeEventListener(eventName, handler as EventListener)
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(node, eventName, value as EventListener, shouldDelegate)
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
@@ -1894,7 +1967,7 @@ export function createConditional(
1894
1967
  const scratchRoot = createRootContext(hostRoot)
1895
1968
  const prevScratch = pushRoot(scratchRoot)
1896
1969
  let handledPatchError = false
1897
- let scratchOutput: FictNode = null
1970
+ let scratchOutput: FictNode | undefined
1898
1971
  try {
1899
1972
  const output = render()
1900
1973
  scratchOutput = output
@@ -1912,13 +1985,11 @@ export function createConditional(
1912
1985
  } catch (err) {
1913
1986
  if (handleSuspend(err as any, scratchRoot)) {
1914
1987
  handledPatchError = true
1915
- return
1916
- }
1917
- if (handleError(err, { source: 'renderChild' }, scratchRoot)) {
1988
+ } else if (handleError(err, { source: 'renderChild' }, scratchRoot)) {
1918
1989
  handledPatchError = true
1919
- return
1990
+ } else {
1991
+ throw err
1920
1992
  }
1921
- throw err
1922
1993
  } finally {
1923
1994
  popRoot(prevScratch)
1924
1995
  }
package/src/node-ops.ts CHANGED
@@ -43,7 +43,7 @@ export function toNodeArray(
43
43
  return []
44
44
  }
45
45
 
46
- let isNode = false
46
+ let isNode: boolean
47
47
  try {
48
48
  isNode = node instanceof Node
49
49
  } catch {
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
- export function __fictEnableSSR(): void {
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
- boundaryScopes = new Map()
82
+ resetSSRTrackingState()
79
83
  }
80
84
 
81
85
  export function __fictEnableResumable(): void {