@fictjs/runtime 0.7.0 → 0.9.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 (74) hide show
  1. package/README.md +46 -0
  2. package/dist/advanced.cjs +9 -9
  3. package/dist/advanced.d.cts +4 -4
  4. package/dist/advanced.d.ts +4 -4
  5. package/dist/advanced.js +4 -4
  6. package/dist/{effect-DAzpH7Mm.d.cts → binding-BWchH3Kp.d.cts} +33 -24
  7. package/dist/{effect-DAzpH7Mm.d.ts → binding-BWchH3Kp.d.ts} +33 -24
  8. package/dist/{chunk-7YQK3XKY.js → chunk-DXG3TARY.js} +520 -518
  9. package/dist/chunk-DXG3TARY.js.map +1 -0
  10. package/dist/{chunk-TLDT76RV.js → chunk-FVX77557.js} +3 -3
  11. package/dist/{chunk-WRU3IZOA.js → chunk-JVYH76ZX.js} +3 -3
  12. package/dist/chunk-LBE6DC3V.cjs +768 -0
  13. package/dist/chunk-LBE6DC3V.cjs.map +1 -0
  14. package/dist/chunk-N6ODUM2Y.js +768 -0
  15. package/dist/chunk-N6ODUM2Y.js.map +1 -0
  16. package/dist/{chunk-PRF4QG73.cjs → chunk-OAM7HABA.cjs} +423 -246
  17. package/dist/chunk-OAM7HABA.cjs.map +1 -0
  18. package/dist/{chunk-CEV6TO5U.cjs → chunk-PD6IQY2Y.cjs} +8 -8
  19. package/dist/{chunk-CEV6TO5U.cjs.map → chunk-PD6IQY2Y.cjs.map} +1 -1
  20. package/dist/{chunk-HHDHQGJY.cjs → chunk-PG4QX2I2.cjs} +17 -17
  21. package/dist/{chunk-HHDHQGJY.cjs.map → chunk-PG4QX2I2.cjs.map} +1 -1
  22. package/dist/{chunk-4LCHQ7U4.js → chunk-T2LNV5Q5.js} +271 -94
  23. package/dist/chunk-T2LNV5Q5.js.map +1 -0
  24. package/dist/{chunk-FSCBL7RI.cjs → chunk-UBFDB6OL.cjs} +521 -519
  25. package/dist/chunk-UBFDB6OL.cjs.map +1 -0
  26. package/dist/{context-C4vBQbb4.d.ts → devtools-5AipK9CX.d.cts} +35 -35
  27. package/dist/{context-BFbHf9nC.d.cts → devtools-BDp76luf.d.ts} +35 -35
  28. package/dist/index.cjs +42 -42
  29. package/dist/index.d.cts +4 -4
  30. package/dist/index.d.ts +4 -4
  31. package/dist/index.dev.js +3 -3
  32. package/dist/index.dev.js.map +1 -1
  33. package/dist/index.js +3 -3
  34. package/dist/internal-list.cjs +12 -0
  35. package/dist/internal-list.cjs.map +1 -0
  36. package/dist/internal-list.d.cts +2 -0
  37. package/dist/internal-list.d.ts +2 -0
  38. package/dist/internal-list.js +12 -0
  39. package/dist/internal-list.js.map +1 -0
  40. package/dist/internal.cjs +6 -746
  41. package/dist/internal.cjs.map +1 -1
  42. package/dist/internal.d.cts +6 -74
  43. package/dist/internal.d.ts +6 -74
  44. package/dist/internal.js +12 -752
  45. package/dist/internal.js.map +1 -1
  46. package/dist/list-DL5DOFcO.d.ts +71 -0
  47. package/dist/list-hP7hQ9Vk.d.cts +71 -0
  48. package/dist/loader.cjs +94 -15
  49. package/dist/loader.cjs.map +1 -1
  50. package/dist/loader.d.cts +16 -2
  51. package/dist/loader.d.ts +16 -2
  52. package/dist/loader.js +87 -8
  53. package/dist/loader.js.map +1 -1
  54. package/dist/{props-84UJeWO8.d.cts → props-BpZz0AOq.d.cts} +2 -2
  55. package/dist/{props-BRhFK50f.d.ts → props-CjLH0JE-.d.ts} +2 -2
  56. package/dist/{resume-i-A3EFox.d.cts → resume-BJ4oHLi_.d.cts} +3 -1
  57. package/dist/{resume-CqeQ3v_q.d.ts → resume-CuyJWXP_.d.ts} +3 -1
  58. package/dist/{scope-DlCBL1Ft.d.cts → scope-BJCtq8hJ.d.cts} +1 -1
  59. package/dist/{scope-D3DpsfoG.d.ts → scope-jPt5DHRT.d.ts} +1 -1
  60. package/package.json +8 -1
  61. package/src/binding.ts +113 -36
  62. package/src/cycle-guard.ts +3 -3
  63. package/src/internal/list.ts +7 -0
  64. package/src/internal.ts +1 -0
  65. package/src/list-helpers.ts +1 -1
  66. package/src/loader.ts +119 -9
  67. package/src/resume.ts +6 -3
  68. package/src/signal.ts +8 -1
  69. package/dist/chunk-4LCHQ7U4.js.map +0 -1
  70. package/dist/chunk-7YQK3XKY.js.map +0 -1
  71. package/dist/chunk-FSCBL7RI.cjs.map +0 -1
  72. package/dist/chunk-PRF4QG73.cjs.map +0 -1
  73. /package/dist/{chunk-TLDT76RV.js.map → chunk-FVX77557.js.map} +0 -0
  74. /package/dist/{chunk-WRU3IZOA.js.map → chunk-JVYH76ZX.js.map} +0 -0
@@ -1,383 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/delegated-events.ts
2
- var DelegatedEventNames = [
3
- "beforeinput",
4
- "click",
5
- "dblclick",
6
- "contextmenu",
7
- "focusin",
8
- "focusout",
9
- "input",
10
- "keydown",
11
- "keyup",
12
- "mousedown",
13
- "mousemove",
14
- "mouseout",
15
- "mouseover",
16
- "mouseup",
17
- "pointerdown",
18
- "pointermove",
19
- "pointerout",
20
- "pointerover",
21
- "pointerup",
22
- "touchend",
23
- "touchmove",
24
- "touchstart"
25
- ];
26
-
27
- // src/constants.ts
28
- var isDev = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _ => _.env, 'optionalAccess', _2 => _2.NODE_ENV]) !== "production";
29
- var booleans = isDev ? [
30
- "allowfullscreen",
31
- "async",
32
- "alpha",
33
- // HTMLInputElement
34
- "autofocus",
35
- // HTMLElement prop
36
- "autoplay",
37
- "checked",
38
- "controls",
39
- "default",
40
- "disabled",
41
- "formnovalidate",
42
- "hidden",
43
- // HTMLElement prop
44
- "indeterminate",
45
- "inert",
46
- // HTMLElement prop
47
- "ismap",
48
- "loop",
49
- "multiple",
50
- "muted",
51
- "nomodule",
52
- "novalidate",
53
- "open",
54
- "playsinline",
55
- "readonly",
56
- "required",
57
- "reversed",
58
- "seamless",
59
- // HTMLIframeElement - non-standard
60
- "selected",
61
- // Experimental attributes
62
- "adauctionheaders",
63
- "browsingtopics",
64
- "credentialless",
65
- "defaultchecked",
66
- "defaultmuted",
67
- "defaultselected",
68
- "defer",
69
- "disablepictureinpicture",
70
- "disableremoteplayback",
71
- "preservespitch",
72
- "shadowrootclonable",
73
- "shadowrootcustomelementregistry",
74
- "shadowrootdelegatesfocus",
75
- "shadowrootserializable",
76
- "sharedstoragewritable"
77
- ] : [];
78
- var BooleanAttributes = new Set(booleans);
79
- var properties = isDev ? [
80
- // Core properties
81
- "className",
82
- "value",
83
- // CamelCase booleans
84
- "readOnly",
85
- "noValidate",
86
- "formNoValidate",
87
- "isMap",
88
- "noModule",
89
- "playsInline",
90
- // Experimental (camelCase)
91
- "adAuctionHeaders",
92
- "allowFullscreen",
93
- "browsingTopics",
94
- "defaultChecked",
95
- "defaultMuted",
96
- "defaultSelected",
97
- "disablePictureInPicture",
98
- "disableRemotePlayback",
99
- "preservesPitch",
100
- "shadowRootClonable",
101
- "shadowRootCustomElementRegistry",
102
- "shadowRootDelegatesFocus",
103
- "shadowRootSerializable",
104
- "sharedStorageWritable",
105
- // All lowercase booleans
106
- ...booleans
107
- ] : [];
108
- var Properties = new Set(properties);
109
- var ChildProperties = /* @__PURE__ */ new Set([
110
- "innerHTML",
111
- "textContent",
112
- "innerText",
113
- "children"
114
- ]);
115
- var Aliases = {
116
- className: "class",
117
- htmlFor: "for"
118
- };
119
- var PropAliases = isDev ? {
120
- // Direct mapping
121
- class: "className",
122
- // Element-specific mappings
123
- novalidate: {
124
- $: "noValidate",
125
- FORM: 1
126
- },
127
- formnovalidate: {
128
- $: "formNoValidate",
129
- BUTTON: 1,
130
- INPUT: 1
131
- },
132
- ismap: {
133
- $: "isMap",
134
- IMG: 1
135
- },
136
- nomodule: {
137
- $: "noModule",
138
- SCRIPT: 1
139
- },
140
- playsinline: {
141
- $: "playsInline",
142
- VIDEO: 1
143
- },
144
- readonly: {
145
- $: "readOnly",
146
- INPUT: 1,
147
- TEXTAREA: 1
148
- },
149
- // Experimental element-specific
150
- adauctionheaders: {
151
- $: "adAuctionHeaders",
152
- IFRAME: 1
153
- },
154
- allowfullscreen: {
155
- $: "allowFullscreen",
156
- IFRAME: 1
157
- },
158
- browsingtopics: {
159
- $: "browsingTopics",
160
- IMG: 1
161
- },
162
- defaultchecked: {
163
- $: "defaultChecked",
164
- INPUT: 1
165
- },
166
- defaultmuted: {
167
- $: "defaultMuted",
168
- AUDIO: 1,
169
- VIDEO: 1
170
- },
171
- defaultselected: {
172
- $: "defaultSelected",
173
- OPTION: 1
174
- },
175
- disablepictureinpicture: {
176
- $: "disablePictureInPicture",
177
- VIDEO: 1
178
- },
179
- disableremoteplayback: {
180
- $: "disableRemotePlayback",
181
- AUDIO: 1,
182
- VIDEO: 1
183
- },
184
- preservespitch: {
185
- $: "preservesPitch",
186
- AUDIO: 1,
187
- VIDEO: 1
188
- },
189
- shadowrootclonable: {
190
- $: "shadowRootClonable",
191
- TEMPLATE: 1
192
- },
193
- shadowrootdelegatesfocus: {
194
- $: "shadowRootDelegatesFocus",
195
- TEMPLATE: 1
196
- },
197
- shadowrootserializable: {
198
- $: "shadowRootSerializable",
199
- TEMPLATE: 1
200
- },
201
- sharedstoragewritable: {
202
- $: "sharedStorageWritable",
203
- IFRAME: 1,
204
- IMG: 1
205
- }
206
- } : {};
207
- function getPropAlias(prop, tagName) {
208
- if (!isDev) return void 0;
209
- const a = PropAliases[prop];
210
- if (typeof a === "object") {
211
- return a[tagName] ? a["$"] : void 0;
212
- }
213
- return a;
214
- }
215
- var $$EVENTS = "_$FICT_DELEGATE";
216
- var DelegatedEvents = new Set(DelegatedEventNames);
217
- var svgElements = isDev ? [
218
- "altGlyph",
219
- "altGlyphDef",
220
- "altGlyphItem",
221
- "animate",
222
- "animateColor",
223
- "animateMotion",
224
- "animateTransform",
225
- "circle",
226
- "clipPath",
227
- "color-profile",
228
- "cursor",
229
- "defs",
230
- "desc",
231
- "ellipse",
232
- "feBlend",
233
- "feColorMatrix",
234
- "feComponentTransfer",
235
- "feComposite",
236
- "feConvolveMatrix",
237
- "feDiffuseLighting",
238
- "feDisplacementMap",
239
- "feDistantLight",
240
- "feDropShadow",
241
- "feFlood",
242
- "feFuncA",
243
- "feFuncB",
244
- "feFuncG",
245
- "feFuncR",
246
- "feGaussianBlur",
247
- "feImage",
248
- "feMerge",
249
- "feMergeNode",
250
- "feMorphology",
251
- "feOffset",
252
- "fePointLight",
253
- "feSpecularLighting",
254
- "feSpotLight",
255
- "feTile",
256
- "feTurbulence",
257
- "filter",
258
- "font",
259
- "font-face",
260
- "font-face-format",
261
- "font-face-name",
262
- "font-face-src",
263
- "font-face-uri",
264
- "foreignObject",
265
- "g",
266
- "glyph",
267
- "glyphRef",
268
- "hkern",
269
- "image",
270
- "line",
271
- "linearGradient",
272
- "marker",
273
- "mask",
274
- "metadata",
275
- "missing-glyph",
276
- "mpath",
277
- "path",
278
- "pattern",
279
- "polygon",
280
- "polyline",
281
- "radialGradient",
282
- "rect",
283
- "set",
284
- "stop",
285
- "svg",
286
- "switch",
287
- "symbol",
288
- "text",
289
- "textPath",
290
- "tref",
291
- "tspan",
292
- "use",
293
- "view",
294
- "vkern"
295
- ] : [];
296
- var SVGElements = new Set(svgElements);
297
- var SVGNamespace = {
298
- xlink: "http://www.w3.org/1999/xlink",
299
- xml: "http://www.w3.org/XML/1998/namespace"
300
- };
301
- var unitlessList = isDev ? [
302
- "animationIterationCount",
303
- "animation-iteration-count",
304
- "borderImageOutset",
305
- "border-image-outset",
306
- "borderImageSlice",
307
- "border-image-slice",
308
- "borderImageWidth",
309
- "border-image-width",
310
- "boxFlex",
311
- "box-flex",
312
- "boxFlexGroup",
313
- "box-flex-group",
314
- "boxOrdinalGroup",
315
- "box-ordinal-group",
316
- "columnCount",
317
- "column-count",
318
- "columns",
319
- "flex",
320
- "flexGrow",
321
- "flex-grow",
322
- "flexPositive",
323
- "flex-positive",
324
- "flexShrink",
325
- "flex-shrink",
326
- "flexNegative",
327
- "flex-negative",
328
- "flexOrder",
329
- "flex-order",
330
- "gridRow",
331
- "grid-row",
332
- "gridRowEnd",
333
- "grid-row-end",
334
- "gridRowSpan",
335
- "grid-row-span",
336
- "gridRowStart",
337
- "grid-row-start",
338
- "gridColumn",
339
- "grid-column",
340
- "gridColumnEnd",
341
- "grid-column-end",
342
- "gridColumnSpan",
343
- "grid-column-span",
344
- "gridColumnStart",
345
- "grid-column-start",
346
- "fontWeight",
347
- "font-weight",
348
- "lineClamp",
349
- "line-clamp",
350
- "lineHeight",
351
- "line-height",
352
- "opacity",
353
- "order",
354
- "orphans",
355
- "tabSize",
356
- "tab-size",
357
- "widows",
358
- "zIndex",
359
- "z-index",
360
- "zoom",
361
- "fillOpacity",
362
- "fill-opacity",
363
- "floodOpacity",
364
- "flood-opacity",
365
- "stopOpacity",
366
- "stop-opacity",
367
- "strokeDasharray",
368
- "stroke-dasharray",
369
- "strokeDashoffset",
370
- "stroke-dashoffset",
371
- "strokeMiterlimit",
372
- "stroke-miterlimit",
373
- "strokeOpacity",
374
- "stroke-opacity",
375
- "strokeWidth",
376
- "stroke-width"
377
- ] : ["opacity", "zIndex"];
378
- var UnitlessStyles = new Set(unitlessList);
379
-
380
- // src/devtools.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/devtools.ts
381
2
  function getGlobalHook() {
382
3
  if (typeof globalThis === "undefined") return void 0;
383
4
  return globalThis.__FICT_DEVTOOLS_HOOK__;
@@ -387,7 +8,7 @@ function getDevtoolsHook() {
387
8
  }
388
9
 
389
10
  // src/cycle-guard.ts
390
- var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _3 => _3.env, 'optionalAccess', _4 => _4.NODE_ENV]) !== "production";
11
+ var isDev = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _ => _.env, 'optionalAccess', _2 => _2.NODE_ENV]) !== "production";
391
12
  var setCycleProtectionOptions = () => {
392
13
  };
393
14
  var resetCycleProtectionStateForTests = () => {
@@ -401,17 +22,17 @@ var enterRootGuard = () => true;
401
22
  var exitRootGuard = () => {
402
23
  };
403
24
  var defaultOptions = {
404
- // Keep cycle guards on in production to avoid infinite flush loops.
405
- enabled: true,
25
+ // DX-first in development, performance-first in production.
26
+ enabled: isDev,
406
27
  maxFlushCyclesPerMicrotask: 1e4,
407
28
  maxEffectRunsPerFlush: 2e4,
408
29
  windowSize: 5,
409
30
  highUsageRatio: 0.8,
410
31
  maxRootReentrantDepth: 10,
411
32
  enableWindowWarning: true,
412
- devMode: isDev2,
33
+ devMode: isDev,
413
34
  // Backoff warning options
414
- enableBackoffWarning: isDev2,
35
+ enableBackoffWarning: isDev,
415
36
  backoffWarningRatio: 0.5
416
37
  };
417
38
  var enabled = defaultOptions.enabled;
@@ -456,7 +77,7 @@ beforeEffectRunGuard = () => {
456
77
  if (!enabled) return true;
457
78
  const next = ++effectRunsThisFlush;
458
79
  const limit = Math.min(options.maxFlushCyclesPerMicrotask, options.maxEffectRunsPerFlush);
459
- if (options.enableBackoffWarning && isDev2) {
80
+ if (options.enableBackoffWarning && isDev) {
460
81
  const ratio = next / limit;
461
82
  const backoffRatio = _nullishCoalesce(options.backoffWarningRatio, () => ( 0.5));
462
83
  if (!backoffWarned50 && ratio >= backoffRatio && ratio < backoffRatio + 0.25) {
@@ -550,12 +171,12 @@ var recordWindowUsage = (used, budget) => {
550
171
  };
551
172
  var reportCycle = (reason, detail = void 0) => {
552
173
  const hook = getDevtoolsHook();
553
- _optionalChain([hook, 'optionalAccess', _5 => _5.cycleDetected, 'optionalCall', _6 => _6(detail ? { reason, detail } : { reason })]);
174
+ _optionalChain([hook, 'optionalAccess', _3 => _3.cycleDetected, 'optionalCall', _4 => _4(detail ? { reason, detail } : { reason })]);
554
175
  console.warn(`[fict] cycle protection triggered: ${reason}`, _nullishCoalesce(detail, () => ( "")));
555
176
  };
556
177
 
557
178
  // src/lifecycle.ts
558
- var isDev3 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _7 => _7.env, 'optionalAccess', _8 => _8.NODE_ENV]) !== "production";
179
+ var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _5 => _5.env, 'optionalAccess', _6 => _6.NODE_ENV]) !== "production";
559
180
  var currentRoot;
560
181
  var currentEffectCleanups;
561
182
  var globalErrorHandlers = /* @__PURE__ */ new WeakMap();
@@ -643,7 +264,7 @@ function destroyRoot(root) {
643
264
  }
644
265
  }
645
266
  function createRoot(fn, options2) {
646
- const parent = _optionalChain([options2, 'optionalAccess', _9 => _9.inherit]) ? currentRoot : void 0;
267
+ const parent = _optionalChain([options2, 'optionalAccess', _7 => _7.inherit]) ? currentRoot : void 0;
647
268
  const root = createRootContext(parent);
648
269
  const prev = pushRoot(root);
649
270
  let value;
@@ -701,7 +322,7 @@ function runLifecycle(fn) {
701
322
  }
702
323
  function registerErrorHandler(fn) {
703
324
  if (!currentRoot) {
704
- const message = isDev3 ? "registerErrorHandler must be called within a root" : "FICT:E_ROOT_HANDLER";
325
+ const message = isDev2 ? "registerErrorHandler must be called within a root" : "FICT:E_ROOT_HANDLER";
705
326
  throw new Error(message);
706
327
  }
707
328
  if (!currentRoot.errorHandlers) {
@@ -717,7 +338,7 @@ function registerErrorHandler(fn) {
717
338
  }
718
339
  function registerSuspenseHandler(fn) {
719
340
  if (!currentRoot) {
720
- const message = isDev3 ? "registerSuspenseHandler must be called within a root" : "FICT:E_ROOT_SUSPENSE";
341
+ const message = isDev2 ? "registerSuspenseHandler must be called within a root" : "FICT:E_ROOT_SUSPENSE";
721
342
  throw new Error(message);
722
343
  }
723
344
  if (!currentRoot.suspenseHandlers) {
@@ -776,115 +397,46 @@ function handleSuspend(token, startRoot) {
776
397
  for (let i = handlers.length - 1; i >= 0; i--) {
777
398
  const handler = handlers[i];
778
399
  const handled = handler(token);
779
- if (handled !== false) {
780
- if (originRoot) originRoot.suspended = true;
781
- return true;
782
- }
783
- }
784
- }
785
- root = root.parent;
786
- }
787
- const globalForRoot = startRoot && globalSuspenseHandlers.get(startRoot) ? globalSuspenseHandlers.get(startRoot) : currentRoot ? globalSuspenseHandlers.get(currentRoot) : void 0;
788
- if (globalForRoot && globalForRoot.length) {
789
- for (let i = globalForRoot.length - 1; i >= 0; i--) {
790
- const handler = globalForRoot[i];
791
- const handled = handler(token);
792
- if (handled !== false) {
793
- if (originRoot) originRoot.suspended = true;
794
- return true;
795
- }
796
- }
797
- }
798
- return false;
799
- }
800
-
801
- // src/effect.ts
802
- function createEffect(fn) {
803
- let cleanups = [];
804
- const rootForError = getCurrentRoot();
805
- const doCleanup = () => {
806
- runCleanupList(cleanups);
807
- cleanups = [];
808
- };
809
- const run = () => {
810
- const bucket = [];
811
- withEffectCleanups(bucket, () => {
812
- try {
813
- const maybeCleanup = fn();
814
- if (typeof maybeCleanup === "function") {
815
- bucket.push(maybeCleanup);
816
- }
817
- } catch (err) {
818
- if (handleSuspend(err, rootForError)) {
819
- return;
820
- }
821
- if (handleError(err, { source: "effect" }, rootForError)) {
822
- return;
400
+ if (handled !== false) {
401
+ if (originRoot) originRoot.suspended = true;
402
+ return true;
823
403
  }
824
- throw err;
825
404
  }
826
- });
827
- cleanups = bucket;
828
- };
829
- const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
830
- const teardown = () => {
831
- runCleanupList(cleanups);
832
- disposeEffect();
833
- };
834
- registerRootCleanup(teardown);
835
- return teardown;
836
- }
837
- function createRenderEffect(fn) {
838
- let cleanup;
839
- const rootForError = getCurrentRoot();
840
- const doCleanup = () => {
841
- if (cleanup) {
842
- cleanup();
843
- cleanup = void 0;
844
405
  }
845
- };
846
- const run = () => {
847
- try {
848
- const maybeCleanup = fn();
849
- if (typeof maybeCleanup === "function") {
850
- cleanup = maybeCleanup;
851
- }
852
- } catch (err) {
853
- if (handleSuspend(err, rootForError)) {
854
- return;
855
- }
856
- const handled = handleError(err, { source: "effect" }, rootForError);
857
- if (handled) {
858
- return;
406
+ root = root.parent;
407
+ }
408
+ const globalForRoot = startRoot && globalSuspenseHandlers.get(startRoot) ? globalSuspenseHandlers.get(startRoot) : currentRoot ? globalSuspenseHandlers.get(currentRoot) : void 0;
409
+ if (globalForRoot && globalForRoot.length) {
410
+ for (let i = globalForRoot.length - 1; i >= 0; i--) {
411
+ const handler = globalForRoot[i];
412
+ const handled = handler(token);
413
+ if (handled !== false) {
414
+ if (originRoot) originRoot.suspended = true;
415
+ return true;
859
416
  }
860
- throw err;
861
- }
862
- };
863
- const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
864
- const teardown = () => {
865
- if (cleanup) {
866
- cleanup();
867
- cleanup = void 0;
868
417
  }
869
- disposeEffect();
870
- };
871
- registerRootCleanup(teardown);
872
- return teardown;
418
+ }
419
+ return false;
420
+ }
421
+
422
+ // src/memo.ts
423
+ function createMemo(fn, options2) {
424
+ return computed(fn, options2);
873
425
  }
874
426
 
875
427
  // src/hooks.ts
876
- var isDev4 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _10 => _10.env, 'optionalAccess', _11 => _11.NODE_ENV]) !== "production";
428
+ var isDev3 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _8 => _8.env, 'optionalAccess', _9 => _9.NODE_ENV]) !== "production";
877
429
  var ctxStack = [];
878
430
  var preparedContext = null;
879
431
  function assertRenderContext(ctx, hookName) {
880
432
  if (!ctx.rendering) {
881
- const message = isDev4 ? `${hookName} can only be used during render execution` : "FICT:E_HOOK_RENDER";
433
+ const message = isDev3 ? `${hookName} can only be used during render execution` : "FICT:E_HOOK_RENDER";
882
434
  throw new Error(message);
883
435
  }
884
436
  }
885
437
  function __fictUseContext() {
886
438
  if (ctxStack.length === 0) {
887
- const message = isDev4 ? "Invalid hook call: hooks can only be used while rendering a component. Make sure you are not calling hooks in event handlers or outside of components." : "FICT:E_HOOK_OUTSIDE_RENDER";
439
+ const message = isDev3 ? "Invalid hook call: hooks can only be used while rendering a component. Make sure you are not calling hooks in event handlers or outside of components." : "FICT:E_HOOK_OUTSIDE_RENDER";
888
440
  throw new Error(message);
889
441
  }
890
442
  const ctx = ctxStack[ctxStack.length - 1];
@@ -904,7 +456,7 @@ function __fictPrepareContext(ctx) {
904
456
  preparedContext = ctx;
905
457
  }
906
458
  function __fictGetCurrentComponentId() {
907
- return _optionalChain([ctxStack, 'access', _12 => _12[ctxStack.length - 1], 'optionalAccess', _13 => _13.componentId]);
459
+ return _optionalChain([ctxStack, 'access', _10 => _10[ctxStack.length - 1], 'optionalAccess', _11 => _11.componentId]);
908
460
  }
909
461
  function __fictPopContext() {
910
462
  const ctx = ctxStack.pop();
@@ -921,7 +473,7 @@ function __fictUseSignal(ctx, initial, optionsOrSlot, slot) {
921
473
  if (!ctx.slots[index]) {
922
474
  ctx.slots[index] = signal(initial, options2);
923
475
  }
924
- if (_optionalChain([options2, 'optionalAccess', _14 => _14.name])) {
476
+ if (_optionalChain([options2, 'optionalAccess', _12 => _12.name])) {
925
477
  if (!ctx.slotMap) ctx.slotMap = {};
926
478
  ctx.slotMap[options2.name] = index;
927
479
  }
@@ -964,7 +516,7 @@ function __fictRender(ctx, fn) {
964
516
  }
965
517
 
966
518
  // src/signal.ts
967
- var isDev5 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _15 => _15.env, 'optionalAccess', _16 => _16.NODE_ENV]) !== "production";
519
+ var isDev4 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _13 => _13.env, 'optionalAccess', _14 => _14.NODE_ENV]) !== "production";
968
520
  var Mutable = 1;
969
521
  var Watching = 2;
970
522
  var Running = 4;
@@ -1011,7 +563,7 @@ function link(dep, sub, version) {
1011
563
  else sub.deps = newLink;
1012
564
  if (prevSub !== void 0) prevSub.nextSub = newLink;
1013
565
  else dep.subs = newLink;
1014
- if (isDev5) trackDependencyDevtools(dep, sub);
566
+ if (isDev4) trackDependencyDevtools(dep, sub);
1015
567
  }
1016
568
  function unlink(lnk, sub = lnk.sub) {
1017
569
  const dep = lnk.dep;
@@ -1027,7 +579,7 @@ function unlink(lnk, sub = lnk.sub) {
1027
579
  else dep.subsTail = prevSub;
1028
580
  if (prevSub !== void 0) prevSub.nextSub = nextSub;
1029
581
  else if ((dep.subs = nextSub) === void 0) unwatched(dep);
1030
- if (isDev5) untrackDependencyDevtools(dep, sub);
582
+ if (isDev4) untrackDependencyDevtools(dep, sub);
1031
583
  return nextDep;
1032
584
  }
1033
585
  function unwatched(dep) {
@@ -1249,7 +801,7 @@ function updateComputed(c) {
1249
801
  c.prevValue = oldValue;
1250
802
  c.prevFlushId = currentFlushId;
1251
803
  c.value = newValue;
1252
- if (isDev5) updateComputedDevtools(c, newValue);
804
+ if (isDev4) updateComputedDevtools(c, newValue);
1253
805
  return true;
1254
806
  }
1255
807
  return false;
@@ -1276,7 +828,7 @@ function runEffect(e) {
1276
828
  if (flags & Dirty) {
1277
829
  runCleanup();
1278
830
  ++cycle;
1279
- if (isDev5) effectRunDevtools(e);
831
+ if (isDev4) effectRunDevtools(e);
1280
832
  e.depsTail = void 0;
1281
833
  e.flags = WatchingRunning;
1282
834
  const prevSub = activeSub;
@@ -1314,7 +866,7 @@ function runEffect(e) {
1314
866
  if (isDirty) {
1315
867
  runCleanup();
1316
868
  ++cycle;
1317
- if (isDev5) effectRunDevtools(e);
869
+ if (isDev4) effectRunDevtools(e);
1318
870
  e.depsTail = void 0;
1319
871
  e.flags = WatchingRunning;
1320
872
  const prevSub = activeSub;
@@ -1433,10 +985,10 @@ function signal(initialValue, options2) {
1433
985
  flags: Mutable,
1434
986
  __id: void 0
1435
987
  };
1436
- if (_optionalChain([options2, 'optionalAccess', _17 => _17.equals]) !== void 0) s.equals = options2.equals;
1437
- if (_optionalChain([options2, 'optionalAccess', _18 => _18.name]) !== void 0) s.name = options2.name;
1438
- if (_optionalChain([options2, 'optionalAccess', _19 => _19.devToolsSource]) !== void 0) s.devToolsSource = options2.devToolsSource;
1439
- if (isDev5) registerSignalDevtools(s);
988
+ if (_optionalChain([options2, 'optionalAccess', _15 => _15.equals]) !== void 0) s.equals = options2.equals;
989
+ if (_optionalChain([options2, 'optionalAccess', _16 => _16.name]) !== void 0) s.name = options2.name;
990
+ if (_optionalChain([options2, 'optionalAccess', _17 => _17.devToolsSource]) !== void 0) s.devToolsSource = options2.devToolsSource;
991
+ if (isDev4) registerSignalDevtools(s);
1440
992
  const accessor = signalOper.bind(s);
1441
993
  accessor[SIGNAL_MARKER] = true;
1442
994
  return accessor;
@@ -1448,7 +1000,7 @@ function signalOper(value) {
1448
1000
  if (valuesDiffer(this, prev, next)) {
1449
1001
  this.pendingValue = next;
1450
1002
  this.flags = MutableDirty;
1451
- if (isDev5) updateSignalDevtools(this, next);
1003
+ if (isDev4) updateSignalDevtools(this, next);
1452
1004
  const subs = this.subs;
1453
1005
  if (subs !== void 0) {
1454
1006
  propagate(subs);
@@ -1492,10 +1044,10 @@ function computed(getter, options2) {
1492
1044
  getter,
1493
1045
  __id: void 0
1494
1046
  };
1495
- if (_optionalChain([options2, 'optionalAccess', _20 => _20.equals]) !== void 0) c.equals = options2.equals;
1496
- if (_optionalChain([options2, 'optionalAccess', _21 => _21.name]) !== void 0) c.name = options2.name;
1497
- if (_optionalChain([options2, 'optionalAccess', _22 => _22.devToolsSource]) !== void 0) c.devToolsSource = options2.devToolsSource;
1498
- if (isDev5) registerComputedDevtools(c);
1047
+ if (_optionalChain([options2, 'optionalAccess', _18 => _18.equals]) !== void 0) c.equals = options2.equals;
1048
+ if (_optionalChain([options2, 'optionalAccess', _19 => _19.name]) !== void 0) c.name = options2.name;
1049
+ if (_optionalChain([options2, 'optionalAccess', _20 => _20.devToolsSource]) !== void 0) c.devToolsSource = options2.devToolsSource;
1050
+ if (isDev4) registerComputedDevtools(c);
1499
1051
  const bound = computedOper.bind(
1500
1052
  c
1501
1053
  );
@@ -1530,7 +1082,7 @@ function computedOper() {
1530
1082
  const prevSub = setActiveSub(this);
1531
1083
  try {
1532
1084
  this.value = this.getter(void 0);
1533
- if (isDev5) updateComputedDevtools(this, this.value);
1085
+ if (isDev4) updateComputedDevtools(this, this.value);
1534
1086
  } catch (err) {
1535
1087
  this.flags = 0;
1536
1088
  purgeDeps(this);
@@ -1559,14 +1111,14 @@ function effect(fn) {
1559
1111
  if (root) {
1560
1112
  e.root = root;
1561
1113
  }
1562
- if (isDev5) registerEffectDevtools(e);
1114
+ if (isDev4) registerEffectDevtools(e);
1563
1115
  const prevSub = activeSub;
1564
1116
  if (prevSub !== void 0) link(e, prevSub, 0);
1565
1117
  activeSub = e;
1566
1118
  let didThrow = false;
1567
1119
  let thrown;
1568
1120
  try {
1569
- if (isDev5) effectRunDevtools(e);
1121
+ if (isDev4) effectRunDevtools(e);
1570
1122
  fn();
1571
1123
  } catch (err) {
1572
1124
  didThrow = true;
@@ -1599,14 +1151,14 @@ function effectWithCleanup(fn, cleanupRunner, root) {
1599
1151
  if (resolvedRoot) {
1600
1152
  e.root = resolvedRoot;
1601
1153
  }
1602
- if (isDev5) registerEffectDevtools(e);
1154
+ if (isDev4) registerEffectDevtools(e);
1603
1155
  const prevSub = activeSub;
1604
1156
  if (prevSub !== void 0) link(e, prevSub, 0);
1605
1157
  activeSub = e;
1606
1158
  let didThrow = false;
1607
1159
  let thrown;
1608
1160
  try {
1609
- if (isDev5) effectRunDevtools(e);
1161
+ if (isDev4) effectRunDevtools(e);
1610
1162
  fn();
1611
1163
  } catch (err) {
1612
1164
  didThrow = true;
@@ -1734,7 +1286,7 @@ var trackDependencyDevtools = () => {
1734
1286
  };
1735
1287
  var untrackDependencyDevtools = () => {
1736
1288
  };
1737
- if (isDev5) {
1289
+ if (typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _21 => _21.env, 'optionalAccess', _22 => _22.NODE_ENV]) !== "production") {
1738
1290
  let nextDevtoolsId = 0;
1739
1291
  registerSignalDevtools = (node) => {
1740
1292
  const hook = getDevtoolsHook();
@@ -1832,10 +1384,458 @@ function createSelector(source, equalityFn = (a, b) => a === b) {
1832
1384
  };
1833
1385
  }
1834
1386
 
1835
- // src/memo.ts
1836
- function createMemo(fn, options2) {
1837
- return computed(fn, options2);
1387
+ // src/effect.ts
1388
+ function createEffect(fn) {
1389
+ let cleanups = [];
1390
+ const rootForError = getCurrentRoot();
1391
+ const doCleanup = () => {
1392
+ runCleanupList(cleanups);
1393
+ cleanups = [];
1394
+ };
1395
+ const run = () => {
1396
+ const bucket = [];
1397
+ withEffectCleanups(bucket, () => {
1398
+ try {
1399
+ const maybeCleanup = fn();
1400
+ if (typeof maybeCleanup === "function") {
1401
+ bucket.push(maybeCleanup);
1402
+ }
1403
+ } catch (err) {
1404
+ if (handleSuspend(err, rootForError)) {
1405
+ return;
1406
+ }
1407
+ if (handleError(err, { source: "effect" }, rootForError)) {
1408
+ return;
1409
+ }
1410
+ throw err;
1411
+ }
1412
+ });
1413
+ cleanups = bucket;
1414
+ };
1415
+ const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
1416
+ const teardown = () => {
1417
+ runCleanupList(cleanups);
1418
+ disposeEffect();
1419
+ };
1420
+ registerRootCleanup(teardown);
1421
+ return teardown;
1422
+ }
1423
+ function createRenderEffect(fn) {
1424
+ let cleanup;
1425
+ const rootForError = getCurrentRoot();
1426
+ const doCleanup = () => {
1427
+ if (cleanup) {
1428
+ cleanup();
1429
+ cleanup = void 0;
1430
+ }
1431
+ };
1432
+ const run = () => {
1433
+ try {
1434
+ const maybeCleanup = fn();
1435
+ if (typeof maybeCleanup === "function") {
1436
+ cleanup = maybeCleanup;
1437
+ }
1438
+ } catch (err) {
1439
+ if (handleSuspend(err, rootForError)) {
1440
+ return;
1441
+ }
1442
+ const handled = handleError(err, { source: "effect" }, rootForError);
1443
+ if (handled) {
1444
+ return;
1445
+ }
1446
+ throw err;
1447
+ }
1448
+ };
1449
+ const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
1450
+ const teardown = () => {
1451
+ if (cleanup) {
1452
+ cleanup();
1453
+ cleanup = void 0;
1454
+ }
1455
+ disposeEffect();
1456
+ };
1457
+ registerRootCleanup(teardown);
1458
+ return teardown;
1459
+ }
1460
+
1461
+ // src/delegated-events.ts
1462
+ var DelegatedEventNames = [
1463
+ "beforeinput",
1464
+ "click",
1465
+ "dblclick",
1466
+ "contextmenu",
1467
+ "focusin",
1468
+ "focusout",
1469
+ "input",
1470
+ "keydown",
1471
+ "keyup",
1472
+ "mousedown",
1473
+ "mousemove",
1474
+ "mouseout",
1475
+ "mouseover",
1476
+ "mouseup",
1477
+ "pointerdown",
1478
+ "pointermove",
1479
+ "pointerout",
1480
+ "pointerover",
1481
+ "pointerup",
1482
+ "touchend",
1483
+ "touchmove",
1484
+ "touchstart"
1485
+ ];
1486
+
1487
+ // src/constants.ts
1488
+ var isDev5 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process !== "undefined" && _optionalChain([process, 'access', _25 => _25.env, 'optionalAccess', _26 => _26.NODE_ENV]) !== "production";
1489
+ var booleans = isDev5 ? [
1490
+ "allowfullscreen",
1491
+ "async",
1492
+ "alpha",
1493
+ // HTMLInputElement
1494
+ "autofocus",
1495
+ // HTMLElement prop
1496
+ "autoplay",
1497
+ "checked",
1498
+ "controls",
1499
+ "default",
1500
+ "disabled",
1501
+ "formnovalidate",
1502
+ "hidden",
1503
+ // HTMLElement prop
1504
+ "indeterminate",
1505
+ "inert",
1506
+ // HTMLElement prop
1507
+ "ismap",
1508
+ "loop",
1509
+ "multiple",
1510
+ "muted",
1511
+ "nomodule",
1512
+ "novalidate",
1513
+ "open",
1514
+ "playsinline",
1515
+ "readonly",
1516
+ "required",
1517
+ "reversed",
1518
+ "seamless",
1519
+ // HTMLIframeElement - non-standard
1520
+ "selected",
1521
+ // Experimental attributes
1522
+ "adauctionheaders",
1523
+ "browsingtopics",
1524
+ "credentialless",
1525
+ "defaultchecked",
1526
+ "defaultmuted",
1527
+ "defaultselected",
1528
+ "defer",
1529
+ "disablepictureinpicture",
1530
+ "disableremoteplayback",
1531
+ "preservespitch",
1532
+ "shadowrootclonable",
1533
+ "shadowrootcustomelementregistry",
1534
+ "shadowrootdelegatesfocus",
1535
+ "shadowrootserializable",
1536
+ "sharedstoragewritable"
1537
+ ] : [];
1538
+ var BooleanAttributes = new Set(booleans);
1539
+ var properties = isDev5 ? [
1540
+ // Core properties
1541
+ "className",
1542
+ "value",
1543
+ // CamelCase booleans
1544
+ "readOnly",
1545
+ "noValidate",
1546
+ "formNoValidate",
1547
+ "isMap",
1548
+ "noModule",
1549
+ "playsInline",
1550
+ // Experimental (camelCase)
1551
+ "adAuctionHeaders",
1552
+ "allowFullscreen",
1553
+ "browsingTopics",
1554
+ "defaultChecked",
1555
+ "defaultMuted",
1556
+ "defaultSelected",
1557
+ "disablePictureInPicture",
1558
+ "disableRemotePlayback",
1559
+ "preservesPitch",
1560
+ "shadowRootClonable",
1561
+ "shadowRootCustomElementRegistry",
1562
+ "shadowRootDelegatesFocus",
1563
+ "shadowRootSerializable",
1564
+ "sharedStorageWritable",
1565
+ // All lowercase booleans
1566
+ ...booleans
1567
+ ] : [];
1568
+ var Properties = new Set(properties);
1569
+ var ChildProperties = /* @__PURE__ */ new Set([
1570
+ "innerHTML",
1571
+ "textContent",
1572
+ "innerText",
1573
+ "children"
1574
+ ]);
1575
+ var Aliases = {
1576
+ className: "class",
1577
+ htmlFor: "for"
1578
+ };
1579
+ var PropAliases = isDev5 ? {
1580
+ // Direct mapping
1581
+ class: "className",
1582
+ // Element-specific mappings
1583
+ novalidate: {
1584
+ $: "noValidate",
1585
+ FORM: 1
1586
+ },
1587
+ formnovalidate: {
1588
+ $: "formNoValidate",
1589
+ BUTTON: 1,
1590
+ INPUT: 1
1591
+ },
1592
+ ismap: {
1593
+ $: "isMap",
1594
+ IMG: 1
1595
+ },
1596
+ nomodule: {
1597
+ $: "noModule",
1598
+ SCRIPT: 1
1599
+ },
1600
+ playsinline: {
1601
+ $: "playsInline",
1602
+ VIDEO: 1
1603
+ },
1604
+ readonly: {
1605
+ $: "readOnly",
1606
+ INPUT: 1,
1607
+ TEXTAREA: 1
1608
+ },
1609
+ // Experimental element-specific
1610
+ adauctionheaders: {
1611
+ $: "adAuctionHeaders",
1612
+ IFRAME: 1
1613
+ },
1614
+ allowfullscreen: {
1615
+ $: "allowFullscreen",
1616
+ IFRAME: 1
1617
+ },
1618
+ browsingtopics: {
1619
+ $: "browsingTopics",
1620
+ IMG: 1
1621
+ },
1622
+ defaultchecked: {
1623
+ $: "defaultChecked",
1624
+ INPUT: 1
1625
+ },
1626
+ defaultmuted: {
1627
+ $: "defaultMuted",
1628
+ AUDIO: 1,
1629
+ VIDEO: 1
1630
+ },
1631
+ defaultselected: {
1632
+ $: "defaultSelected",
1633
+ OPTION: 1
1634
+ },
1635
+ disablepictureinpicture: {
1636
+ $: "disablePictureInPicture",
1637
+ VIDEO: 1
1638
+ },
1639
+ disableremoteplayback: {
1640
+ $: "disableRemotePlayback",
1641
+ AUDIO: 1,
1642
+ VIDEO: 1
1643
+ },
1644
+ preservespitch: {
1645
+ $: "preservesPitch",
1646
+ AUDIO: 1,
1647
+ VIDEO: 1
1648
+ },
1649
+ shadowrootclonable: {
1650
+ $: "shadowRootClonable",
1651
+ TEMPLATE: 1
1652
+ },
1653
+ shadowrootdelegatesfocus: {
1654
+ $: "shadowRootDelegatesFocus",
1655
+ TEMPLATE: 1
1656
+ },
1657
+ shadowrootserializable: {
1658
+ $: "shadowRootSerializable",
1659
+ TEMPLATE: 1
1660
+ },
1661
+ sharedstoragewritable: {
1662
+ $: "sharedStorageWritable",
1663
+ IFRAME: 1,
1664
+ IMG: 1
1665
+ }
1666
+ } : {};
1667
+ function getPropAlias(prop, tagName) {
1668
+ if (!isDev5) return void 0;
1669
+ const a = PropAliases[prop];
1670
+ if (typeof a === "object") {
1671
+ return a[tagName] ? a["$"] : void 0;
1672
+ }
1673
+ return a;
1838
1674
  }
1675
+ var $$EVENTS = "_$FICT_DELEGATE";
1676
+ var DelegatedEvents = new Set(DelegatedEventNames);
1677
+ var svgElements = isDev5 ? [
1678
+ "altGlyph",
1679
+ "altGlyphDef",
1680
+ "altGlyphItem",
1681
+ "animate",
1682
+ "animateColor",
1683
+ "animateMotion",
1684
+ "animateTransform",
1685
+ "circle",
1686
+ "clipPath",
1687
+ "color-profile",
1688
+ "cursor",
1689
+ "defs",
1690
+ "desc",
1691
+ "ellipse",
1692
+ "feBlend",
1693
+ "feColorMatrix",
1694
+ "feComponentTransfer",
1695
+ "feComposite",
1696
+ "feConvolveMatrix",
1697
+ "feDiffuseLighting",
1698
+ "feDisplacementMap",
1699
+ "feDistantLight",
1700
+ "feDropShadow",
1701
+ "feFlood",
1702
+ "feFuncA",
1703
+ "feFuncB",
1704
+ "feFuncG",
1705
+ "feFuncR",
1706
+ "feGaussianBlur",
1707
+ "feImage",
1708
+ "feMerge",
1709
+ "feMergeNode",
1710
+ "feMorphology",
1711
+ "feOffset",
1712
+ "fePointLight",
1713
+ "feSpecularLighting",
1714
+ "feSpotLight",
1715
+ "feTile",
1716
+ "feTurbulence",
1717
+ "filter",
1718
+ "font",
1719
+ "font-face",
1720
+ "font-face-format",
1721
+ "font-face-name",
1722
+ "font-face-src",
1723
+ "font-face-uri",
1724
+ "foreignObject",
1725
+ "g",
1726
+ "glyph",
1727
+ "glyphRef",
1728
+ "hkern",
1729
+ "image",
1730
+ "line",
1731
+ "linearGradient",
1732
+ "marker",
1733
+ "mask",
1734
+ "metadata",
1735
+ "missing-glyph",
1736
+ "mpath",
1737
+ "path",
1738
+ "pattern",
1739
+ "polygon",
1740
+ "polyline",
1741
+ "radialGradient",
1742
+ "rect",
1743
+ "set",
1744
+ "stop",
1745
+ "svg",
1746
+ "switch",
1747
+ "symbol",
1748
+ "text",
1749
+ "textPath",
1750
+ "tref",
1751
+ "tspan",
1752
+ "use",
1753
+ "view",
1754
+ "vkern"
1755
+ ] : [];
1756
+ var SVGElements = new Set(svgElements);
1757
+ var SVGNamespace = {
1758
+ xlink: "http://www.w3.org/1999/xlink",
1759
+ xml: "http://www.w3.org/XML/1998/namespace"
1760
+ };
1761
+ var unitlessList = isDev5 ? [
1762
+ "animationIterationCount",
1763
+ "animation-iteration-count",
1764
+ "borderImageOutset",
1765
+ "border-image-outset",
1766
+ "borderImageSlice",
1767
+ "border-image-slice",
1768
+ "borderImageWidth",
1769
+ "border-image-width",
1770
+ "boxFlex",
1771
+ "box-flex",
1772
+ "boxFlexGroup",
1773
+ "box-flex-group",
1774
+ "boxOrdinalGroup",
1775
+ "box-ordinal-group",
1776
+ "columnCount",
1777
+ "column-count",
1778
+ "columns",
1779
+ "flex",
1780
+ "flexGrow",
1781
+ "flex-grow",
1782
+ "flexPositive",
1783
+ "flex-positive",
1784
+ "flexShrink",
1785
+ "flex-shrink",
1786
+ "flexNegative",
1787
+ "flex-negative",
1788
+ "flexOrder",
1789
+ "flex-order",
1790
+ "gridRow",
1791
+ "grid-row",
1792
+ "gridRowEnd",
1793
+ "grid-row-end",
1794
+ "gridRowSpan",
1795
+ "grid-row-span",
1796
+ "gridRowStart",
1797
+ "grid-row-start",
1798
+ "gridColumn",
1799
+ "grid-column",
1800
+ "gridColumnEnd",
1801
+ "grid-column-end",
1802
+ "gridColumnSpan",
1803
+ "grid-column-span",
1804
+ "gridColumnStart",
1805
+ "grid-column-start",
1806
+ "fontWeight",
1807
+ "font-weight",
1808
+ "lineClamp",
1809
+ "line-clamp",
1810
+ "lineHeight",
1811
+ "line-height",
1812
+ "opacity",
1813
+ "order",
1814
+ "orphans",
1815
+ "tabSize",
1816
+ "tab-size",
1817
+ "widows",
1818
+ "zIndex",
1819
+ "z-index",
1820
+ "zoom",
1821
+ "fillOpacity",
1822
+ "fill-opacity",
1823
+ "floodOpacity",
1824
+ "flood-opacity",
1825
+ "stopOpacity",
1826
+ "stop-opacity",
1827
+ "strokeDasharray",
1828
+ "stroke-dasharray",
1829
+ "strokeDashoffset",
1830
+ "stroke-dashoffset",
1831
+ "strokeMiterlimit",
1832
+ "stroke-miterlimit",
1833
+ "strokeOpacity",
1834
+ "stroke-opacity",
1835
+ "strokeWidth",
1836
+ "stroke-width"
1837
+ ] : ["opacity", "zIndex"];
1838
+ var UnitlessStyles = new Set(unitlessList);
1839
1839
 
1840
1840
  // src/ssr-stream.ts
1841
1841
  var ssrStreamHooks = null;
@@ -2081,6 +2081,7 @@ function reconcile(target, value, seenPairs) {
2081
2081
  }
2082
2082
 
2083
2083
  // src/resume.ts
2084
+ var FICT_SSR_SNAPSHOT_SCHEMA_VERSION = 1;
2084
2085
  var ssrEnabled = false;
2085
2086
  var resumableEnabled = false;
2086
2087
  var hydrating = false;
@@ -2180,7 +2181,7 @@ function __fictSerializeSSRState() {
2180
2181
  }
2181
2182
  scopes[id] = snapshot;
2182
2183
  }
2183
- return { scopes };
2184
+ return { v: FICT_SSR_SNAPSHOT_SCHEMA_VERSION, scopes };
2184
2185
  }
2185
2186
  function __fictSerializeSSRStateForScopes(scopeIds) {
2186
2187
  const scopes = {};
@@ -2202,7 +2203,7 @@ function __fictSerializeSSRStateForScopes(scopeIds) {
2202
2203
  }
2203
2204
  scopes[id] = snapshot;
2204
2205
  }
2205
- return { scopes };
2206
+ return { v: FICT_SSR_SNAPSHOT_SCHEMA_VERSION, scopes };
2206
2207
  }
2207
2208
  function __fictSetSSRState(state) {
2208
2209
  snapshotState = state;
@@ -2213,24 +2214,24 @@ function __fictSetSSRState(state) {
2213
2214
  function __fictMergeSSRState(state) {
2214
2215
  if (!state) return;
2215
2216
  if (!snapshotState) {
2216
- snapshotState = { scopes: { ...state.scopes } };
2217
+ snapshotState = { v: state.v, scopes: { ...state.scopes } };
2217
2218
  return;
2218
2219
  }
2219
2220
  Object.assign(snapshotState.scopes, state.scopes);
2220
2221
  }
2221
2222
  function __fictGetSSRScope(id) {
2222
- return _optionalChain([snapshotState, 'optionalAccess', _25 => _25.scopes, 'access', _26 => _26[id]]);
2223
+ return _optionalChain([snapshotState, 'optionalAccess', _27 => _27.scopes, 'access', _28 => _28[id]]);
2223
2224
  }
2224
2225
  function __fictEnsureScope(scopeId, host, snapshot) {
2225
2226
  const existing = resumedScopes.get(scopeId);
2226
2227
  if (existing) return existing.ctx;
2227
2228
  const ctx = createContextFromSnapshot(snapshot);
2228
2229
  ctx.scopeId = scopeId;
2229
- if (_optionalChain([snapshot, 'optionalAccess', _27 => _27.t]) !== void 0) {
2230
+ if (_optionalChain([snapshot, 'optionalAccess', _29 => _29.t]) !== void 0) {
2230
2231
  ctx.scopeType = snapshot.t;
2231
2232
  }
2232
2233
  const entry = { ctx, host };
2233
- if (_optionalChain([snapshot, 'optionalAccess', _28 => _28.props]) !== void 0) {
2234
+ if (_optionalChain([snapshot, 'optionalAccess', _30 => _30.props]) !== void 0) {
2234
2235
  entry.props = snapshot.props;
2235
2236
  }
2236
2237
  resumedScopes.set(scopeId, entry);
@@ -2246,11 +2247,11 @@ function __fictUseLexicalScope(scopeId, names) {
2246
2247
  return names.map((name) => ctx.slots[_nullishCoalesce(map[name], () => ( -1))]);
2247
2248
  }
2248
2249
  function __fictGetScopeProps(scopeId) {
2249
- return _optionalChain([resumedScopes, 'access', _29 => _29.get, 'call', _30 => _30(scopeId), 'optionalAccess', _31 => _31.props]);
2250
+ return _optionalChain([resumedScopes, 'access', _31 => _31.get, 'call', _32 => _32(scopeId), 'optionalAccess', _33 => _33.props]);
2250
2251
  }
2251
2252
  function __fictQrl(moduleId, exportName) {
2252
2253
  const manifest = globalThis.__FICT_MANIFEST__;
2253
- if (_optionalChain([manifest, 'optionalAccess', _32 => _32[moduleId]])) {
2254
+ if (_optionalChain([manifest, 'optionalAccess', _34 => _34[moduleId]])) {
2254
2255
  return `${manifest[moduleId]}#${exportName}`;
2255
2256
  }
2256
2257
  if (moduleId.startsWith("file://")) {
@@ -2552,5 +2553,6 @@ function deserializeValue(value, refs = /* @__PURE__ */ new Map(), path = "$") {
2552
2553
 
2553
2554
 
2554
2555
 
2555
- exports.BooleanAttributes = BooleanAttributes; exports.Properties = Properties; exports.ChildProperties = ChildProperties; exports.Aliases = Aliases; exports.getPropAlias = getPropAlias; exports.$$EVENTS = $$EVENTS; exports.DelegatedEvents = DelegatedEvents; exports.SVGElements = SVGElements; exports.SVGNamespace = SVGNamespace; exports.UnitlessStyles = UnitlessStyles; exports.getDevtoolsHook = getDevtoolsHook; exports.setCycleProtectionOptions = setCycleProtectionOptions; exports.createRootContext = createRootContext; exports.pushRoot = pushRoot; exports.getCurrentRoot = getCurrentRoot; exports.popRoot = popRoot; exports.onMount = onMount; exports.onDestroy = onDestroy; exports.onCleanup = onCleanup; exports.flushOnMount = flushOnMount; exports.registerRootCleanup = registerRootCleanup; exports.destroyRoot = destroyRoot; exports.createRoot = createRoot; exports.registerErrorHandler = registerErrorHandler; exports.registerSuspenseHandler = registerSuspenseHandler; exports.handleError = handleError; exports.handleSuspend = handleSuspend; exports.createMemo = createMemo; exports.__fictUseContext = __fictUseContext; exports.__fictPushContext = __fictPushContext; exports.__fictPrepareContext = __fictPrepareContext; exports.__fictGetCurrentComponentId = __fictGetCurrentComponentId; exports.__fictPopContext = __fictPopContext; exports.__fictResetContext = __fictResetContext; exports.__fictUseSignal = __fictUseSignal; exports.__fictUseMemo = __fictUseMemo; exports.__fictUseEffect = __fictUseEffect; exports.__fictRender = __fictRender; exports.scheduleFlush = scheduleFlush; exports.flush = flush; exports.signal = signal; exports.computed = computed; exports.effectScope = effectScope; exports.batch = batch; exports.setActiveSub = setActiveSub; exports.__resetReactiveState = __resetReactiveState; exports.untrack = untrack; exports.isSignal = isSignal; exports.isComputed = isComputed; exports.isEffect = isEffect; exports.isEffectScope = isEffectScope; exports.setTransitionContext = setTransitionContext; exports.createSelector = createSelector; exports.createEffect = createEffect; exports.createRenderEffect = createRenderEffect; exports.__fictSetSSRStreamHooks = __fictSetSSRStreamHooks; exports.__fictGetSSRStreamHooks = __fictGetSSRStreamHooks; exports.__fictPushSSRBoundary = __fictPushSSRBoundary; exports.__fictPopSSRBoundary = __fictPopSSRBoundary; exports.createStore = createStore; exports.isStoreProxy = isStoreProxy; exports.unwrapStore = unwrapStore; exports.__fictEnableSSR = __fictEnableSSR; exports.__fictDisableSSR = __fictDisableSSR; exports.__fictEnableResumable = __fictEnableResumable; exports.__fictDisableResumable = __fictDisableResumable; exports.__fictIsResumable = __fictIsResumable; exports.__fictIsSSR = __fictIsSSR; exports.__fictEnterHydration = __fictEnterHydration; exports.__fictExitHydration = __fictExitHydration; exports.__fictIsHydrating = __fictIsHydrating; exports.__fictRegisterScope = __fictRegisterScope; exports.__fictGetScopeRegistry = __fictGetScopeRegistry; exports.__fictGetScopesForBoundary = __fictGetScopesForBoundary; exports.__fictSerializeSSRState = __fictSerializeSSRState; exports.__fictSerializeSSRStateForScopes = __fictSerializeSSRStateForScopes; exports.__fictSetSSRState = __fictSetSSRState; exports.__fictMergeSSRState = __fictMergeSSRState; exports.__fictGetSSRScope = __fictGetSSRScope; exports.__fictEnsureScope = __fictEnsureScope; exports.__fictUseLexicalScope = __fictUseLexicalScope; exports.__fictGetScopeProps = __fictGetScopeProps; exports.__fictQrl = __fictQrl; exports.__fictRegisterResume = __fictRegisterResume; exports.__fictGetResume = __fictGetResume; exports.serializeValue = serializeValue; exports.deserializeValue = deserializeValue;
2556
- //# sourceMappingURL=chunk-FSCBL7RI.cjs.map
2556
+
2557
+ exports.getDevtoolsHook = getDevtoolsHook; exports.setCycleProtectionOptions = setCycleProtectionOptions; exports.createRootContext = createRootContext; exports.pushRoot = pushRoot; exports.getCurrentRoot = getCurrentRoot; exports.popRoot = popRoot; exports.onMount = onMount; exports.onDestroy = onDestroy; exports.onCleanup = onCleanup; exports.flushOnMount = flushOnMount; exports.registerRootCleanup = registerRootCleanup; exports.destroyRoot = destroyRoot; exports.createRoot = createRoot; exports.registerErrorHandler = registerErrorHandler; exports.registerSuspenseHandler = registerSuspenseHandler; exports.handleError = handleError; exports.handleSuspend = handleSuspend; exports.createEffect = createEffect; exports.createRenderEffect = createRenderEffect; exports.__fictUseContext = __fictUseContext; exports.__fictPushContext = __fictPushContext; exports.__fictPrepareContext = __fictPrepareContext; exports.__fictGetCurrentComponentId = __fictGetCurrentComponentId; exports.__fictPopContext = __fictPopContext; exports.__fictResetContext = __fictResetContext; exports.__fictUseSignal = __fictUseSignal; exports.__fictUseMemo = __fictUseMemo; exports.__fictUseEffect = __fictUseEffect; exports.__fictRender = __fictRender; exports.scheduleFlush = scheduleFlush; exports.flush = flush; exports.signal = signal; exports.computed = computed; exports.effectScope = effectScope; exports.batch = batch; exports.setActiveSub = setActiveSub; exports.__resetReactiveState = __resetReactiveState; exports.untrack = untrack; exports.isSignal = isSignal; exports.isComputed = isComputed; exports.isEffect = isEffect; exports.isEffectScope = isEffectScope; exports.setTransitionContext = setTransitionContext; exports.createSelector = createSelector; exports.createMemo = createMemo; exports.BooleanAttributes = BooleanAttributes; exports.Properties = Properties; exports.ChildProperties = ChildProperties; exports.Aliases = Aliases; exports.getPropAlias = getPropAlias; exports.$$EVENTS = $$EVENTS; exports.DelegatedEvents = DelegatedEvents; exports.SVGElements = SVGElements; exports.SVGNamespace = SVGNamespace; exports.UnitlessStyles = UnitlessStyles; exports.__fictSetSSRStreamHooks = __fictSetSSRStreamHooks; exports.__fictGetSSRStreamHooks = __fictGetSSRStreamHooks; exports.__fictPushSSRBoundary = __fictPushSSRBoundary; exports.__fictPopSSRBoundary = __fictPopSSRBoundary; exports.createStore = createStore; exports.isStoreProxy = isStoreProxy; exports.unwrapStore = unwrapStore; exports.FICT_SSR_SNAPSHOT_SCHEMA_VERSION = FICT_SSR_SNAPSHOT_SCHEMA_VERSION; exports.__fictEnableSSR = __fictEnableSSR; exports.__fictDisableSSR = __fictDisableSSR; exports.__fictEnableResumable = __fictEnableResumable; exports.__fictDisableResumable = __fictDisableResumable; exports.__fictIsResumable = __fictIsResumable; exports.__fictIsSSR = __fictIsSSR; exports.__fictEnterHydration = __fictEnterHydration; exports.__fictExitHydration = __fictExitHydration; exports.__fictIsHydrating = __fictIsHydrating; exports.__fictRegisterScope = __fictRegisterScope; exports.__fictGetScopeRegistry = __fictGetScopeRegistry; exports.__fictGetScopesForBoundary = __fictGetScopesForBoundary; exports.__fictSerializeSSRState = __fictSerializeSSRState; exports.__fictSerializeSSRStateForScopes = __fictSerializeSSRStateForScopes; exports.__fictSetSSRState = __fictSetSSRState; exports.__fictMergeSSRState = __fictMergeSSRState; exports.__fictGetSSRScope = __fictGetSSRScope; exports.__fictEnsureScope = __fictEnsureScope; exports.__fictUseLexicalScope = __fictUseLexicalScope; exports.__fictGetScopeProps = __fictGetScopeProps; exports.__fictQrl = __fictQrl; exports.__fictRegisterResume = __fictRegisterResume; exports.__fictGetResume = __fictGetResume; exports.serializeValue = serializeValue; exports.deserializeValue = deserializeValue;
2558
+ //# sourceMappingURL=chunk-UBFDB6OL.cjs.map