@fictjs/runtime 0.2.3 → 0.4.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 (58) hide show
  1. package/dist/advanced.cjs +10 -8
  2. package/dist/advanced.cjs.map +1 -1
  3. package/dist/advanced.d.cts +8 -16
  4. package/dist/advanced.d.ts +8 -16
  5. package/dist/advanced.js +5 -3
  6. package/dist/advanced.js.map +1 -1
  7. package/dist/{chunk-2U6M3LKS.cjs → chunk-ID3WBWNO.cjs} +452 -219
  8. package/dist/chunk-ID3WBWNO.cjs.map +1 -0
  9. package/dist/{chunk-5YTFFAVU.cjs → chunk-L4DIV3RC.cjs} +7 -7
  10. package/dist/{chunk-5YTFFAVU.cjs.map → chunk-L4DIV3RC.cjs.map} +1 -1
  11. package/dist/{chunk-W525IQWC.cjs → chunk-M2TSXZ4C.cjs} +16 -16
  12. package/dist/{chunk-W525IQWC.cjs.map → chunk-M2TSXZ4C.cjs.map} +1 -1
  13. package/dist/{chunk-YVDWXY44.js → chunk-SO6X7G5S.js} +450 -217
  14. package/dist/chunk-SO6X7G5S.js.map +1 -0
  15. package/dist/{chunk-UHXUEGQH.js → chunk-TWELIZRY.js} +2 -2
  16. package/dist/{chunk-3WD7QD5G.js → chunk-XLIZJMMJ.js} +2 -2
  17. package/dist/{context-9gFXOdJl.d.cts → context-B25xyQrJ.d.cts} +36 -2
  18. package/dist/{context-4woHo7-L.d.ts → context-CGdP7_Jb.d.ts} +36 -2
  19. package/dist/{effect-ClARNUCc.d.cts → effect-D6kaLM2-.d.cts} +80 -1
  20. package/dist/{effect-ClARNUCc.d.ts → effect-D6kaLM2-.d.ts} +80 -1
  21. package/dist/index.cjs +40 -38
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +4 -4
  24. package/dist/index.d.ts +4 -4
  25. package/dist/index.dev.js +322 -145
  26. package/dist/index.dev.js.map +1 -1
  27. package/dist/index.js +4 -2
  28. package/dist/index.js.map +1 -1
  29. package/dist/internal.cjs +39 -35
  30. package/dist/internal.cjs.map +1 -1
  31. package/dist/internal.d.cts +8 -6
  32. package/dist/internal.d.ts +8 -6
  33. package/dist/internal.js +7 -3
  34. package/dist/internal.js.map +1 -1
  35. package/dist/{props-DAyeRPwH.d.ts → props-BEgIVMRx.d.ts} +8 -15
  36. package/dist/{props-CBwuh35e.d.cts → props-BIfromL0.d.cts} +8 -15
  37. package/dist/scope-Cx_3CjIZ.d.cts +18 -0
  38. package/dist/scope-CzNkn587.d.ts +18 -0
  39. package/package.json +3 -3
  40. package/src/advanced.ts +1 -0
  41. package/src/binding.ts +30 -4
  42. package/src/constants.ts +5 -0
  43. package/src/cycle-guard.ts +59 -7
  44. package/src/devtools.ts +22 -2
  45. package/src/dom.ts +84 -10
  46. package/src/hooks.ts +60 -13
  47. package/src/index.ts +3 -1
  48. package/src/internal.ts +2 -2
  49. package/src/lifecycle.ts +13 -5
  50. package/src/memo.ts +3 -4
  51. package/src/props.ts +16 -0
  52. package/src/signal.ts +204 -36
  53. package/dist/chunk-2U6M3LKS.cjs.map +0 -1
  54. package/dist/chunk-YVDWXY44.js.map +0 -1
  55. package/dist/scope-DvgMquEy.d.ts +0 -55
  56. package/dist/scope-xmdo6lVU.d.cts +0 -55
  57. /package/dist/{chunk-UHXUEGQH.js.map → chunk-TWELIZRY.js.map} +0 -0
  58. /package/dist/{chunk-3WD7QD5G.js.map → chunk-XLIZJMMJ.js.map} +0 -0
@@ -25,7 +25,7 @@ var DelegatedEventNames = [
25
25
  ];
26
26
 
27
27
  // src/constants.ts
28
- var isDev = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
28
+ var isDev = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
29
29
  var booleans = isDev ? [
30
30
  "allowfullscreen",
31
31
  "async",
@@ -387,7 +387,7 @@ function getDevtoolsHook() {
387
387
  }
388
388
 
389
389
  // src/cycle-guard.ts
390
- var isDev2 = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
390
+ var isDev2 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
391
391
  var setCycleProtectionOptions = () => {
392
392
  };
393
393
  var resetCycleProtectionStateForTests = () => {
@@ -401,14 +401,17 @@ var enterRootGuard = () => true;
401
401
  var exitRootGuard = () => {
402
402
  };
403
403
  var defaultOptions = {
404
- enabled: isDev2,
404
+ enabled: true,
405
405
  maxFlushCyclesPerMicrotask: 1e4,
406
406
  maxEffectRunsPerFlush: 2e4,
407
407
  windowSize: 5,
408
408
  highUsageRatio: 0.8,
409
409
  maxRootReentrantDepth: 10,
410
410
  enableWindowWarning: true,
411
- devMode: false
411
+ devMode: isDev2,
412
+ // Backoff warning options
413
+ enableBackoffWarning: isDev2,
414
+ backoffWarningRatio: 0.5
412
415
  };
413
416
  var enabled = defaultOptions.enabled;
414
417
  var options = {
@@ -420,6 +423,8 @@ var rootDepth = /* @__PURE__ */ new WeakMap();
420
423
  var flushWarned = false;
421
424
  var rootWarned = false;
422
425
  var windowWarned = false;
426
+ var backoffWarned50 = false;
427
+ var backoffWarned75 = false;
423
428
  setCycleProtectionOptions = (opts) => {
424
429
  if (typeof opts.enabled === "boolean") {
425
430
  enabled = opts.enabled;
@@ -435,24 +440,55 @@ resetCycleProtectionStateForTests = () => {
435
440
  flushWarned = false;
436
441
  rootWarned = false;
437
442
  windowWarned = false;
443
+ backoffWarned50 = false;
444
+ backoffWarned75 = false;
438
445
  };
439
446
  beginFlushGuard = () => {
440
447
  if (!enabled) return;
441
448
  effectRunsThisFlush = 0;
442
449
  flushWarned = false;
443
450
  windowWarned = false;
451
+ backoffWarned50 = false;
452
+ backoffWarned75 = false;
444
453
  };
445
454
  beforeEffectRunGuard = () => {
446
455
  if (!enabled) return true;
447
456
  const next = ++effectRunsThisFlush;
448
- if (next > options.maxFlushCyclesPerMicrotask || next > options.maxEffectRunsPerFlush) {
457
+ const limit = Math.min(options.maxFlushCyclesPerMicrotask, options.maxEffectRunsPerFlush);
458
+ if (options.enableBackoffWarning && isDev2) {
459
+ const ratio = next / limit;
460
+ const backoffRatio = options.backoffWarningRatio ?? 0.5;
461
+ if (!backoffWarned50 && ratio >= backoffRatio && ratio < backoffRatio + 0.25) {
462
+ backoffWarned50 = true;
463
+ console.warn(
464
+ `[fict] cycle guard: approaching effect limit (${Math.round(ratio * 100)}% of budget used)
465
+ - Current: ${next} effects, Limit: ${limit}
466
+ - Tip: Check for effects that trigger other effects in a loop.
467
+ - Common causes: signal updates inside effects that read and write the same signal.`
468
+ );
469
+ } else if (!backoffWarned75 && ratio >= backoffRatio + 0.25 && ratio < 1) {
470
+ backoffWarned75 = true;
471
+ console.warn(
472
+ `[fict] cycle guard: nearing effect limit (${Math.round(ratio * 100)}% of budget used)
473
+ - Current: ${next} effects, Limit: ${limit}
474
+ - Warning: Consider breaking the reactive dependency cycle.
475
+ - Debug: Use browser devtools to identify the recursive effect chain.`
476
+ );
477
+ }
478
+ }
479
+ if (next > limit) {
449
480
  const message = `[fict] cycle protection triggered: flush-budget-exceeded`;
450
481
  if (options.devMode) {
451
- throw new Error(message);
482
+ throw new Error(
483
+ message + `
484
+ - Effect runs: ${next}, Limit: ${limit}
485
+ - This indicates a reactive cycle where effects keep triggering each other.
486
+ - Check for patterns like: createEffect(() => { signal(); signal(newValue); })`
487
+ );
452
488
  }
453
489
  if (!flushWarned) {
454
490
  flushWarned = true;
455
- console.warn(message, { effectRuns: next });
491
+ console.warn(message, { effectRuns: next, limit });
456
492
  }
457
493
  return false;
458
494
  }
@@ -469,11 +505,16 @@ enterRootGuard = (root) => {
469
505
  if (depth > options.maxRootReentrantDepth) {
470
506
  const message = `[fict] cycle protection triggered: root-reentry`;
471
507
  if (options.devMode) {
472
- throw new Error(message);
508
+ throw new Error(
509
+ message + `
510
+ - Re-entry depth: ${depth}, Max allowed: ${options.maxRootReentrantDepth}
511
+ - This indicates recursive render() or component initialization.
512
+ - Check for components that trigger re-renders during their own render phase.`
513
+ );
473
514
  }
474
515
  if (!rootWarned) {
475
516
  rootWarned = true;
476
- console.warn(message, { depth });
517
+ console.warn(message, { depth, maxAllowed: options.maxRootReentrantDepth });
477
518
  }
478
519
  return false;
479
520
  }
@@ -513,7 +554,7 @@ var reportCycle = (reason, detail = void 0) => {
513
554
  };
514
555
 
515
556
  // src/lifecycle.ts
516
- var isDev3 = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
557
+ var isDev3 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
517
558
  var currentRoot;
518
559
  var currentEffectCleanups;
519
560
  var globalErrorHandlers = /* @__PURE__ */ new WeakMap();
@@ -559,13 +600,19 @@ function onCleanup(fn) {
559
600
  function flushOnMount(root) {
560
601
  const cbs = root.onMountCallbacks;
561
602
  if (!cbs || cbs.length === 0) return;
562
- for (let i = 0; i < cbs.length; i++) {
563
- const cleanup = cbs[i]();
564
- if (typeof cleanup === "function") {
565
- root.cleanups.push(cleanup);
603
+ const prevRoot = currentRoot;
604
+ currentRoot = root;
605
+ try {
606
+ for (let i = 0; i < cbs.length; i++) {
607
+ const cleanup = cbs[i]();
608
+ if (typeof cleanup === "function") {
609
+ root.cleanups.push(cleanup);
610
+ }
566
611
  }
612
+ } finally {
613
+ currentRoot = prevRoot;
614
+ cbs.length = 0;
567
615
  }
568
- cbs.length = 0;
569
616
  }
570
617
  function registerRootCleanup(fn) {
571
618
  if (currentRoot) {
@@ -750,8 +797,164 @@ function handleSuspend(token, startRoot) {
750
797
  return false;
751
798
  }
752
799
 
800
+ // src/effect.ts
801
+ function createEffect(fn) {
802
+ let cleanups = [];
803
+ const rootForError = getCurrentRoot();
804
+ const doCleanup = () => {
805
+ runCleanupList(cleanups);
806
+ cleanups = [];
807
+ };
808
+ const run = () => {
809
+ const bucket = [];
810
+ withEffectCleanups(bucket, () => {
811
+ try {
812
+ const maybeCleanup = fn();
813
+ if (typeof maybeCleanup === "function") {
814
+ bucket.push(maybeCleanup);
815
+ }
816
+ } catch (err) {
817
+ if (handleSuspend(err, rootForError)) {
818
+ return;
819
+ }
820
+ if (handleError(err, { source: "effect" }, rootForError)) {
821
+ return;
822
+ }
823
+ throw err;
824
+ }
825
+ });
826
+ cleanups = bucket;
827
+ };
828
+ const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
829
+ const teardown = () => {
830
+ runCleanupList(cleanups);
831
+ disposeEffect();
832
+ };
833
+ registerRootCleanup(teardown);
834
+ return teardown;
835
+ }
836
+ function createRenderEffect(fn) {
837
+ let cleanup;
838
+ const rootForError = getCurrentRoot();
839
+ const doCleanup = () => {
840
+ if (cleanup) {
841
+ cleanup();
842
+ cleanup = void 0;
843
+ }
844
+ };
845
+ const run = () => {
846
+ try {
847
+ const maybeCleanup = fn();
848
+ if (typeof maybeCleanup === "function") {
849
+ cleanup = maybeCleanup;
850
+ }
851
+ } catch (err) {
852
+ if (handleSuspend(err, rootForError)) {
853
+ return;
854
+ }
855
+ const handled = handleError(err, { source: "effect" }, rootForError);
856
+ if (handled) {
857
+ return;
858
+ }
859
+ throw err;
860
+ }
861
+ };
862
+ const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
863
+ const teardown = () => {
864
+ if (cleanup) {
865
+ cleanup();
866
+ cleanup = void 0;
867
+ }
868
+ disposeEffect();
869
+ };
870
+ registerRootCleanup(teardown);
871
+ return teardown;
872
+ }
873
+
874
+ // src/hooks.ts
875
+ var isDev4 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
876
+ var ctxStack = [];
877
+ function assertRenderContext(ctx, hookName) {
878
+ if (!ctx.rendering) {
879
+ const message = isDev4 ? `${hookName} can only be used during render execution` : "FICT:E_HOOK_RENDER";
880
+ throw new Error(message);
881
+ }
882
+ }
883
+ function __fictUseContext() {
884
+ if (ctxStack.length === 0) {
885
+ 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";
886
+ throw new Error(message);
887
+ }
888
+ const ctx = ctxStack[ctxStack.length - 1];
889
+ if (!ctx.rendering) {
890
+ ctx.cursor = 0;
891
+ ctx.rendering = true;
892
+ }
893
+ return ctx;
894
+ }
895
+ function __fictPushContext() {
896
+ const ctx = { slots: [], cursor: 0 };
897
+ ctxStack.push(ctx);
898
+ return ctx;
899
+ }
900
+ function __fictGetCurrentComponentId() {
901
+ return ctxStack[ctxStack.length - 1]?.componentId;
902
+ }
903
+ function __fictPopContext() {
904
+ const ctx = ctxStack.pop();
905
+ if (ctx) ctx.rendering = false;
906
+ }
907
+ function __fictResetContext() {
908
+ ctxStack.length = 0;
909
+ }
910
+ function __fictUseSignal(ctx, initial, optionsOrSlot, slot) {
911
+ assertRenderContext(ctx, "__fictUseSignal");
912
+ const options2 = typeof optionsOrSlot === "number" ? void 0 : optionsOrSlot;
913
+ const resolvedSlot = typeof optionsOrSlot === "number" ? optionsOrSlot : slot;
914
+ const index = resolvedSlot ?? ctx.cursor++;
915
+ if (!ctx.slots[index]) {
916
+ ctx.slots[index] = signal(initial, options2);
917
+ }
918
+ return ctx.slots[index];
919
+ }
920
+ function __fictUseMemo(ctx, fn, optionsOrSlot, slot) {
921
+ assertRenderContext(ctx, "__fictUseMemo");
922
+ const options2 = typeof optionsOrSlot === "number" ? void 0 : optionsOrSlot;
923
+ const resolvedSlot = typeof optionsOrSlot === "number" ? optionsOrSlot : slot;
924
+ const index = resolvedSlot ?? ctx.cursor++;
925
+ if (!ctx.slots[index]) {
926
+ ctx.slots[index] = createMemo(fn, options2);
927
+ }
928
+ return ctx.slots[index];
929
+ }
930
+ function __fictUseEffect(ctx, fn, slot) {
931
+ if (slot !== void 0) {
932
+ if (ctx.slots[slot]) {
933
+ return;
934
+ }
935
+ ctx.slots[slot] = createEffect(fn);
936
+ return;
937
+ }
938
+ assertRenderContext(ctx, "__fictUseEffect");
939
+ const index = ctx.cursor++;
940
+ if (!ctx.slots[index]) {
941
+ ctx.slots[index] = createEffect(fn);
942
+ }
943
+ }
944
+ function __fictRender(ctx, fn) {
945
+ ctxStack.push(ctx);
946
+ ctx.cursor = 0;
947
+ ctx.rendering = true;
948
+ try {
949
+ return fn();
950
+ } finally {
951
+ ctx.rendering = false;
952
+ ctxStack.pop();
953
+ }
954
+ }
955
+
753
956
  // src/signal.ts
754
- var isDev4 = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
957
+ var isDev5 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
755
958
  var Mutable = 1;
756
959
  var Watching = 2;
757
960
  var Running = 4;
@@ -796,6 +999,7 @@ function link(dep, sub, version) {
796
999
  else sub.deps = newLink;
797
1000
  if (prevSub !== void 0) prevSub.nextSub = newLink;
798
1001
  else dep.subs = newLink;
1002
+ if (isDev5) trackDependencyDevtools(dep, sub);
799
1003
  }
800
1004
  function unlink(lnk, sub = lnk.sub) {
801
1005
  const dep = lnk.dep;
@@ -811,6 +1015,7 @@ function unlink(lnk, sub = lnk.sub) {
811
1015
  else dep.subsTail = prevSub;
812
1016
  if (prevSub !== void 0) prevSub.nextSub = nextSub;
813
1017
  else if ((dep.subs = nextSub) === void 0) unwatched(dep);
1018
+ if (isDev5) untrackDependencyDevtools(dep, sub);
814
1019
  return nextDep;
815
1020
  }
816
1021
  function unwatched(dep) {
@@ -967,6 +1172,11 @@ function shallowPropagate(firstLink) {
967
1172
  function update(node) {
968
1173
  return "getter" in node && node.getter !== void 0 ? updateComputed(node) : updateSignal(node);
969
1174
  }
1175
+ function valuesDiffer(node, prev, next) {
1176
+ if (node.equals === false) return true;
1177
+ if (typeof node.equals === "function") return !node.equals(prev, next);
1178
+ return prev !== next;
1179
+ }
970
1180
  function notify(effect2) {
971
1181
  effect2.flags &= ~Watching;
972
1182
  const effects = [];
@@ -1003,7 +1213,7 @@ function updateSignal(s) {
1003
1213
  s.flags = Mutable;
1004
1214
  const current = s.currentValue;
1005
1215
  const pending = s.pendingValue;
1006
- if (current !== pending) {
1216
+ if (valuesDiffer(s, current, pending)) {
1007
1217
  s.currentValue = pending;
1008
1218
  return true;
1009
1219
  }
@@ -1021,8 +1231,9 @@ function updateComputed(c) {
1021
1231
  activeSub = prevSub;
1022
1232
  c.flags &= ~Running;
1023
1233
  purgeDeps(c);
1024
- if (oldValue !== newValue) {
1234
+ if (valuesDiffer(c, oldValue, newValue)) {
1025
1235
  c.value = newValue;
1236
+ if (isDev5) updateComputedDevtools(c, newValue);
1026
1237
  return true;
1027
1238
  }
1028
1239
  return false;
@@ -1044,7 +1255,7 @@ function runEffect(e) {
1044
1255
  }
1045
1256
  }
1046
1257
  ++cycle;
1047
- effectRunDevtools(e);
1258
+ if (isDev5) effectRunDevtools(e);
1048
1259
  e.depsTail = void 0;
1049
1260
  e.flags = WatchingRunning;
1050
1261
  const prevSub = activeSub;
@@ -1088,7 +1299,7 @@ function runEffect(e) {
1088
1299
  }
1089
1300
  if (isDirty) {
1090
1301
  ++cycle;
1091
- effectRunDevtools(e);
1302
+ if (isDev5) effectRunDevtools(e);
1092
1303
  e.depsTail = void 0;
1093
1304
  e.flags = WatchingRunning;
1094
1305
  const prevSub = activeSub;
@@ -1137,10 +1348,21 @@ function flush() {
1137
1348
  while (highIndex < highPriorityQueue.length) {
1138
1349
  const e = highPriorityQueue[highIndex];
1139
1350
  if (!beforeEffectRunGuard()) {
1140
- if (highIndex > 0) {
1141
- highPriorityQueue.copyWithin(0, highIndex);
1142
- highPriorityQueue.length -= highIndex;
1351
+ for (let i = 0; i < highPriorityQueue.length; i++) {
1352
+ const queued = highPriorityQueue[i];
1353
+ if (queued && queued.flags !== 0) {
1354
+ queued.flags = Watching;
1355
+ }
1356
+ }
1357
+ for (let i = 0; i < lowPriorityQueue.length; i++) {
1358
+ const queued = lowPriorityQueue[i];
1359
+ if (queued && queued.flags !== 0) {
1360
+ queued.flags = Watching;
1361
+ }
1143
1362
  }
1363
+ highPriorityQueue.length = 0;
1364
+ lowPriorityQueue.length = 0;
1365
+ flushScheduled = false;
1144
1366
  endFlushGuard();
1145
1367
  return;
1146
1368
  }
@@ -1161,10 +1383,21 @@ function flush() {
1161
1383
  }
1162
1384
  const e = lowPriorityQueue[lowIndex];
1163
1385
  if (!beforeEffectRunGuard()) {
1164
- if (lowIndex > 0) {
1165
- lowPriorityQueue.copyWithin(0, lowIndex);
1166
- lowPriorityQueue.length -= lowIndex;
1386
+ for (let i = 0; i < highPriorityQueue.length; i++) {
1387
+ const queued = highPriorityQueue[i];
1388
+ if (queued && queued.flags !== 0) {
1389
+ queued.flags = Watching;
1390
+ }
1167
1391
  }
1392
+ for (let i = 0; i < lowPriorityQueue.length; i++) {
1393
+ const queued = lowPriorityQueue[i];
1394
+ if (queued && queued.flags !== 0) {
1395
+ queued.flags = Watching;
1396
+ }
1397
+ }
1398
+ highPriorityQueue.length = 0;
1399
+ lowPriorityQueue.length = 0;
1400
+ flushScheduled = false;
1168
1401
  endFlushGuard();
1169
1402
  return;
1170
1403
  }
@@ -1174,26 +1407,31 @@ function flush() {
1174
1407
  lowPriorityQueue.length = 0;
1175
1408
  endFlushGuard();
1176
1409
  }
1177
- function signal(initialValue) {
1410
+ function signal(initialValue, options2) {
1178
1411
  const s = {
1179
1412
  currentValue: initialValue,
1180
1413
  pendingValue: initialValue,
1181
1414
  subs: void 0,
1182
1415
  subsTail: void 0,
1183
1416
  flags: Mutable,
1184
- __id: void 0
1417
+ __id: void 0,
1418
+ ...options2?.equals !== void 0 ? { equals: options2.equals } : {},
1419
+ ...options2?.name !== void 0 ? { name: options2.name } : {},
1420
+ ...options2?.devToolsSource !== void 0 ? { devToolsSource: options2.devToolsSource } : {}
1185
1421
  };
1186
- registerSignalDevtools(initialValue, s);
1422
+ if (isDev5) registerSignalDevtools(s);
1187
1423
  const accessor = signalOper.bind(s);
1188
1424
  accessor[SIGNAL_MARKER] = true;
1189
1425
  return accessor;
1190
1426
  }
1191
1427
  function signalOper(value) {
1192
1428
  if (arguments.length > 0) {
1193
- if (this.pendingValue !== value) {
1194
- this.pendingValue = value;
1429
+ const next = value;
1430
+ const prev = this.pendingValue;
1431
+ if (valuesDiffer(this, prev, next)) {
1432
+ this.pendingValue = next;
1195
1433
  this.flags = MutableDirty;
1196
- updateSignalDevtools(this, value);
1434
+ if (isDev5) updateSignalDevtools(this, next);
1197
1435
  const subs = this.subs;
1198
1436
  if (subs !== void 0) {
1199
1437
  propagate(subs);
@@ -1220,7 +1458,7 @@ function signalOper(value) {
1220
1458
  }
1221
1459
  return this.currentValue;
1222
1460
  }
1223
- function computed(getter) {
1461
+ function computed(getter, options2) {
1224
1462
  const c = {
1225
1463
  value: void 0,
1226
1464
  subs: void 0,
@@ -1228,13 +1466,21 @@ function computed(getter) {
1228
1466
  deps: void 0,
1229
1467
  depsTail: void 0,
1230
1468
  flags: 0,
1231
- getter
1469
+ getter,
1470
+ __id: void 0,
1471
+ ...options2?.equals !== void 0 ? { equals: options2.equals } : {},
1472
+ ...options2?.name !== void 0 ? { name: options2.name } : {},
1473
+ ...options2?.devToolsSource !== void 0 ? { devToolsSource: options2.devToolsSource } : {}
1232
1474
  };
1233
- const bound = computedOper.bind(c);
1475
+ if (isDev5) registerComputedDevtools(c);
1476
+ const bound = computedOper.bind(
1477
+ c
1478
+ );
1234
1479
  bound[COMPUTED_MARKER] = true;
1235
1480
  return bound;
1236
1481
  }
1237
1482
  function computedOper() {
1483
+ if (inCleanup) return this.value;
1238
1484
  const flags = this.flags;
1239
1485
  if (flags & Dirty) {
1240
1486
  if (updateComputed(this)) {
@@ -1255,6 +1501,7 @@ function computedOper() {
1255
1501
  const prevSub = setActiveSub(this);
1256
1502
  try {
1257
1503
  this.value = this.getter(void 0);
1504
+ if (isDev5) updateComputedDevtools(this, this.value);
1258
1505
  } finally {
1259
1506
  setActiveSub(prevSub);
1260
1507
  this.flags &= ~Running;
@@ -1277,12 +1524,12 @@ function effect(fn) {
1277
1524
  if (root) {
1278
1525
  e.root = root;
1279
1526
  }
1280
- registerEffectDevtools(e);
1527
+ if (isDev5) registerEffectDevtools(e);
1281
1528
  const prevSub = activeSub;
1282
1529
  if (prevSub !== void 0) link(e, prevSub, 0);
1283
1530
  activeSub = e;
1284
1531
  try {
1285
- effectRunDevtools(e);
1532
+ if (isDev5) effectRunDevtools(e);
1286
1533
  fn();
1287
1534
  } finally {
1288
1535
  activeSub = prevSub;
@@ -1307,12 +1554,12 @@ function effectWithCleanup(fn, cleanupRunner, root) {
1307
1554
  if (resolvedRoot) {
1308
1555
  e.root = resolvedRoot;
1309
1556
  }
1310
- registerEffectDevtools(e);
1557
+ if (isDev5) registerEffectDevtools(e);
1311
1558
  const prevSub = activeSub;
1312
1559
  if (prevSub !== void 0) link(e, prevSub, 0);
1313
1560
  activeSub = e;
1314
1561
  try {
1315
- effectRunDevtools(e);
1562
+ if (isDev5) effectRunDevtools(e);
1316
1563
  fn();
1317
1564
  } finally {
1318
1565
  activeSub = prevSub;
@@ -1372,6 +1619,16 @@ function setActiveSub(sub) {
1372
1619
  activeSub = sub;
1373
1620
  return prev;
1374
1621
  }
1622
+ function __resetReactiveState() {
1623
+ highPriorityQueue.length = 0;
1624
+ lowPriorityQueue.length = 0;
1625
+ batchDepth = 0;
1626
+ activeSub = void 0;
1627
+ flushScheduled = false;
1628
+ isInTransition = false;
1629
+ inCleanup = false;
1630
+ cycle = 0;
1631
+ }
1375
1632
  function untrack(fn) {
1376
1633
  const prev = activeSub;
1377
1634
  activeSub = void 0;
@@ -1401,17 +1658,28 @@ function setTransitionContext(value) {
1401
1658
  var registerSignalDevtools = () => void 0;
1402
1659
  var updateSignalDevtools = () => {
1403
1660
  };
1661
+ var registerComputedDevtools = () => void 0;
1662
+ var updateComputedDevtools = () => {
1663
+ };
1404
1664
  var registerEffectDevtools = () => void 0;
1405
1665
  var effectRunDevtools = () => {
1406
1666
  };
1407
- if (isDev4) {
1408
- let devtoolsSignalId = 0;
1409
- let devtoolsEffectId = 0;
1410
- registerSignalDevtools = (value, node) => {
1667
+ var trackDependencyDevtools = () => {
1668
+ };
1669
+ var untrackDependencyDevtools = () => {
1670
+ };
1671
+ if (isDev5) {
1672
+ let nextDevtoolsId = 0;
1673
+ registerSignalDevtools = (node) => {
1411
1674
  const hook = getDevtoolsHook();
1412
1675
  if (!hook) return void 0;
1413
- const id = ++devtoolsSignalId;
1414
- hook.registerSignal(id, value);
1676
+ const id = ++nextDevtoolsId;
1677
+ const options2 = {};
1678
+ if (node.name !== void 0) options2.name = node.name;
1679
+ if (node.devToolsSource !== void 0) options2.source = node.devToolsSource;
1680
+ const ownerId = __fictGetCurrentComponentId();
1681
+ if (ownerId !== void 0) options2.ownerId = ownerId;
1682
+ hook.registerSignal(id, node.currentValue, options2);
1415
1683
  node.__id = id;
1416
1684
  return id;
1417
1685
  };
@@ -1421,11 +1689,32 @@ if (isDev4) {
1421
1689
  const id = node.__id;
1422
1690
  if (id) hook.updateSignal(id, value);
1423
1691
  };
1692
+ registerComputedDevtools = (node) => {
1693
+ const hook = getDevtoolsHook();
1694
+ if (!hook) return void 0;
1695
+ const id = ++nextDevtoolsId;
1696
+ const options2 = {};
1697
+ if (node.name !== void 0) options2.name = node.name;
1698
+ if (node.devToolsSource !== void 0) options2.source = node.devToolsSource;
1699
+ const ownerId = __fictGetCurrentComponentId();
1700
+ if (ownerId !== void 0) options2.ownerId = ownerId;
1701
+ options2.hasValue = false;
1702
+ hook.registerComputed(id, node.value, options2);
1703
+ node.__id = id;
1704
+ return id;
1705
+ };
1706
+ updateComputedDevtools = (node, value) => {
1707
+ const hook = getDevtoolsHook();
1708
+ if (!hook) return;
1709
+ const id = node.__id;
1710
+ if (id) hook.updateComputed(id, value);
1711
+ };
1424
1712
  registerEffectDevtools = (node) => {
1425
1713
  const hook = getDevtoolsHook();
1426
1714
  if (!hook) return void 0;
1427
- const id = ++devtoolsEffectId;
1428
- hook.registerEffect(id);
1715
+ const id = ++nextDevtoolsId;
1716
+ const ownerId = __fictGetCurrentComponentId();
1717
+ hook.registerEffect(id, ownerId !== void 0 ? { ownerId } : void 0);
1429
1718
  node.__id = id;
1430
1719
  return id;
1431
1720
  };
@@ -1435,6 +1724,20 @@ if (isDev4) {
1435
1724
  const id = node.__id;
1436
1725
  if (id) hook.effectRun(id);
1437
1726
  };
1727
+ trackDependencyDevtools = (dep, sub) => {
1728
+ const hook = getDevtoolsHook();
1729
+ if (!hook?.trackDependency) return;
1730
+ const depId = dep.__id;
1731
+ const subId = sub.__id;
1732
+ if (depId && subId) hook.trackDependency(subId, depId);
1733
+ };
1734
+ untrackDependencyDevtools = (dep, sub) => {
1735
+ const hook = getDevtoolsHook();
1736
+ if (!hook?.untrackDependency) return;
1737
+ const depId = dep.__id;
1738
+ const subId = sub.__id;
1739
+ if (depId && subId) hook.untrackDependency(subId, depId);
1740
+ };
1438
1741
  }
1439
1742
  function createSelector(source, equalityFn = (a, b) => a === b) {
1440
1743
  let current = source();
@@ -1463,78 +1766,9 @@ function createSelector(source, equalityFn = (a, b) => a === b) {
1463
1766
  };
1464
1767
  }
1465
1768
 
1466
- // src/effect.ts
1467
- function createEffect(fn) {
1468
- let cleanups = [];
1469
- const rootForError = getCurrentRoot();
1470
- const doCleanup = () => {
1471
- runCleanupList(cleanups);
1472
- cleanups = [];
1473
- };
1474
- const run = () => {
1475
- const bucket = [];
1476
- withEffectCleanups(bucket, () => {
1477
- try {
1478
- const maybeCleanup = fn();
1479
- if (typeof maybeCleanup === "function") {
1480
- bucket.push(maybeCleanup);
1481
- }
1482
- } catch (err) {
1483
- if (handleSuspend(err, rootForError)) {
1484
- return;
1485
- }
1486
- if (handleError(err, { source: "effect" }, rootForError)) {
1487
- return;
1488
- }
1489
- throw err;
1490
- }
1491
- });
1492
- cleanups = bucket;
1493
- };
1494
- const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
1495
- const teardown = () => {
1496
- runCleanupList(cleanups);
1497
- disposeEffect();
1498
- };
1499
- registerRootCleanup(teardown);
1500
- return teardown;
1501
- }
1502
- function createRenderEffect(fn) {
1503
- let cleanup;
1504
- const rootForError = getCurrentRoot();
1505
- const doCleanup = () => {
1506
- if (cleanup) {
1507
- cleanup();
1508
- cleanup = void 0;
1509
- }
1510
- };
1511
- const run = () => {
1512
- try {
1513
- const maybeCleanup = fn();
1514
- if (typeof maybeCleanup === "function") {
1515
- cleanup = maybeCleanup;
1516
- }
1517
- } catch (err) {
1518
- if (handleSuspend(err, rootForError)) {
1519
- return;
1520
- }
1521
- const handled = handleError(err, { source: "effect" }, rootForError);
1522
- if (handled) {
1523
- return;
1524
- }
1525
- throw err;
1526
- }
1527
- };
1528
- const disposeEffect = effectWithCleanup(run, doCleanup, rootForError);
1529
- const teardown = () => {
1530
- if (cleanup) {
1531
- cleanup();
1532
- cleanup = void 0;
1533
- }
1534
- disposeEffect();
1535
- };
1536
- registerRootCleanup(teardown);
1537
- return teardown;
1769
+ // src/memo.ts
1770
+ function createMemo(fn, options2) {
1771
+ return computed(fn, options2);
1538
1772
  }
1539
1773
 
1540
1774
  // src/jsx.ts
@@ -1730,13 +1964,22 @@ function untrack2(fn) {
1730
1964
  }
1731
1965
 
1732
1966
  // src/binding.ts
1733
- var isDev5 = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
1967
+ var isDev6 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
1734
1968
  function isReactive(value) {
1735
1969
  if (typeof value !== "function") return false;
1736
1970
  if (isSignal(value) || isComputed(value)) return true;
1737
1971
  if (isEffect(value) || isEffectScope(value)) return false;
1738
1972
  return value.length === 0;
1739
1973
  }
1974
+ function isStrictlyReactive(value) {
1975
+ if (typeof value !== "function") return false;
1976
+ return isSignal(value) || isComputed(value) || isPropGetterFn(value);
1977
+ }
1978
+ var PROP_GETTER_MARKER = Symbol.for("fict:prop-getter");
1979
+ function isPropGetterFn(value) {
1980
+ if (typeof value !== "function") return false;
1981
+ return value[PROP_GETTER_MARKER] === true;
1982
+ }
1740
1983
  function unwrap(value) {
1741
1984
  return isReactive(value) ? value() : value;
1742
1985
  }
@@ -1903,7 +2146,7 @@ function applyStyle(el, value, prev) {
1903
2146
  }
1904
2147
  }
1905
2148
  }
1906
- var isUnitlessStyleProperty = isDev5 ? (prop2) => UnitlessStyles.has(prop2) : (prop2) => prop2 === "opacity" || prop2 === "zIndex";
2149
+ var isUnitlessStyleProperty = isDev6 ? (prop2) => UnitlessStyles.has(prop2) : (prop2) => prop2 === "opacity" || prop2 === "zIndex";
1907
2150
  function createClassBinding(el, value) {
1908
2151
  if (isReactive(value)) {
1909
2152
  let prev = {};
@@ -2290,7 +2533,7 @@ function bindEvent(el, eventName, handler, options2) {
2290
2533
  if (shouldDelegate) {
2291
2534
  const key = `$$${eventName}`;
2292
2535
  delegateEvents([eventName]);
2293
- const resolveHandler = isReactive(handler) ? handler : () => handler;
2536
+ const resolveHandler = isStrictlyReactive(handler) ? handler : () => handler;
2294
2537
  el[key] = function(...args) {
2295
2538
  try {
2296
2539
  const fn = resolveHandler();
@@ -2305,7 +2548,7 @@ function bindEvent(el, eventName, handler, options2) {
2305
2548
  el[key] = void 0;
2306
2549
  };
2307
2550
  }
2308
- const getHandler = isReactive(handler) ? handler : () => handler;
2551
+ const getHandler = isStrictlyReactive(handler) ? handler : () => handler;
2309
2552
  const wrapped = (event) => {
2310
2553
  try {
2311
2554
  const resolved = getHandler();
@@ -2467,9 +2710,9 @@ function assignProp(node, prop2, value, prev, isSVG, skipRef, props) {
2467
2710
  }
2468
2711
  const isCE = node.nodeName.includes("-") || "is" in props;
2469
2712
  if (!isSVG) {
2470
- const propAlias = isDev5 ? getPropAlias(prop2, node.tagName) : void 0;
2471
- const isProperty = isDev5 ? Properties.has(prop2) : prop2 in node;
2472
- const isChildProp = isDev5 ? ChildProperties.has(prop2) : prop2 === "innerHTML" || prop2 === "textContent" || prop2 === "innerText" || prop2 === "children";
2713
+ const propAlias = isDev6 ? getPropAlias(prop2, node.tagName) : void 0;
2714
+ const isProperty = isDev6 ? Properties.has(prop2) : prop2 in node;
2715
+ const isChildProp = isDev6 ? ChildProperties.has(prop2) : prop2 === "innerHTML" || prop2 === "textContent" || prop2 === "innerText" || prop2 === "children";
2473
2716
  if (propAlias || isProperty || isChildProp || isCE) {
2474
2717
  const propName = propAlias || prop2;
2475
2718
  if (isCE && !isProperty && !isChildProp && !propAlias) {
@@ -2666,79 +2909,8 @@ function createPortal(container, render2, createElementFn) {
2666
2909
  };
2667
2910
  }
2668
2911
 
2669
- // src/memo.ts
2670
- function createMemo(fn) {
2671
- return computed(fn);
2672
- }
2673
-
2674
- // src/hooks.ts
2675
- var isDev6 = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
2676
- var ctxStack = [];
2677
- function assertRenderContext(ctx, hookName) {
2678
- if (!ctx.rendering) {
2679
- const message = isDev6 ? `${hookName} can only be used during render execution` : "FICT:E_HOOK_RENDER";
2680
- throw new Error(message);
2681
- }
2682
- }
2683
- function __fictUseContext() {
2684
- if (ctxStack.length === 0) {
2685
- const ctx2 = { slots: [], cursor: 0, rendering: true };
2686
- ctxStack.push(ctx2);
2687
- return ctx2;
2688
- }
2689
- const ctx = ctxStack[ctxStack.length - 1];
2690
- ctx.cursor = 0;
2691
- ctx.rendering = true;
2692
- return ctx;
2693
- }
2694
- function __fictPushContext() {
2695
- const ctx = { slots: [], cursor: 0 };
2696
- ctxStack.push(ctx);
2697
- return ctx;
2698
- }
2699
- function __fictPopContext() {
2700
- ctxStack.pop();
2701
- }
2702
- function __fictResetContext() {
2703
- ctxStack.length = 0;
2704
- }
2705
- function __fictUseSignal(ctx, initial, slot) {
2706
- assertRenderContext(ctx, "__fictUseSignal");
2707
- const index = slot ?? ctx.cursor++;
2708
- if (!ctx.slots[index]) {
2709
- ctx.slots[index] = signal(initial);
2710
- }
2711
- return ctx.slots[index];
2712
- }
2713
- function __fictUseMemo(ctx, fn, slot) {
2714
- assertRenderContext(ctx, "__fictUseMemo");
2715
- const index = slot ?? ctx.cursor++;
2716
- if (!ctx.slots[index]) {
2717
- ctx.slots[index] = createMemo(fn);
2718
- }
2719
- return ctx.slots[index];
2720
- }
2721
- function __fictUseEffect(ctx, fn, slot) {
2722
- assertRenderContext(ctx, "__fictUseEffect");
2723
- const index = slot ?? ctx.cursor++;
2724
- if (!ctx.slots[index]) {
2725
- ctx.slots[index] = createEffect(fn);
2726
- }
2727
- }
2728
- function __fictRender(ctx, fn) {
2729
- ctxStack.push(ctx);
2730
- ctx.cursor = 0;
2731
- ctx.rendering = true;
2732
- try {
2733
- return fn();
2734
- } finally {
2735
- ctx.rendering = false;
2736
- ctxStack.pop();
2737
- }
2738
- }
2739
-
2740
2912
  // src/props.ts
2741
- var PROP_GETTER_MARKER = Symbol.for("fict:prop-getter");
2913
+ var PROP_GETTER_MARKER2 = Symbol.for("fict:prop-getter");
2742
2914
  var propGetters = /* @__PURE__ */ new WeakSet();
2743
2915
  var rawToProxy = /* @__PURE__ */ new WeakMap();
2744
2916
  var proxyToRaw = /* @__PURE__ */ new WeakMap();
@@ -2748,7 +2920,7 @@ function __fictProp(getter) {
2748
2920
  if (Object.isExtensible(getter)) {
2749
2921
  try {
2750
2922
  ;
2751
- getter[PROP_GETTER_MARKER] = true;
2923
+ getter[PROP_GETTER_MARKER2] = true;
2752
2924
  } catch {
2753
2925
  }
2754
2926
  }
@@ -2758,7 +2930,7 @@ function __fictProp(getter) {
2758
2930
  function isPropGetter(value) {
2759
2931
  if (typeof value !== "function") return false;
2760
2932
  const fn = value;
2761
- return propGetters.has(fn) || fn[PROP_GETTER_MARKER] === true;
2933
+ return propGetters.has(fn) || fn[PROP_GETTER_MARKER2] === true;
2762
2934
  }
2763
2935
  function createPropsProxy(props) {
2764
2936
  if (!props || typeof props !== "object") {
@@ -2882,6 +3054,13 @@ function mergeProps(...sources) {
2882
3054
  }
2883
3055
  });
2884
3056
  }
3057
+ function keyed(target, key, options2) {
3058
+ return prop(() => {
3059
+ const resolvedTarget = isPropGetter(target) ? target() : target;
3060
+ const resolvedKey = typeof key === "function" ? key() : key;
3061
+ return resolvedTarget[resolvedKey];
3062
+ }, options2);
3063
+ }
2885
3064
  function prop(getter, options2) {
2886
3065
  if (isPropGetter(getter)) {
2887
3066
  return getter;
@@ -2902,7 +3081,8 @@ function prop(getter, options2) {
2902
3081
  // src/dom.ts
2903
3082
  var SVG_NS = "http://www.w3.org/2000/svg";
2904
3083
  var MATHML_NS = "http://www.w3.org/1998/Math/MathML";
2905
- var isDev7 = true ? false : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
3084
+ var isDev7 = typeof __DEV__ !== "undefined" ? __DEV__ : typeof process === "undefined" || process.env?.NODE_ENV !== "production";
3085
+ var nextComponentId = 1;
2906
3086
  function render(view, container) {
2907
3087
  const root = createRootContext();
2908
3088
  const prev = pushRoot(root);
@@ -2995,9 +3175,27 @@ function createElementWithContext(node, namespace) {
2995
3175
  }
2996
3176
  });
2997
3177
  const props = createPropsProxy(baseProps);
2998
- __fictPushContext();
3178
+ const hook = isDev7 ? getDevtoolsHook() : void 0;
3179
+ const parentId = hook ? __fictGetCurrentComponentId() : void 0;
3180
+ const componentId = hook ? nextComponentId++ : void 0;
3181
+ if (hook?.registerComponent && componentId !== void 0) {
3182
+ hook.registerComponent(componentId, vnode.type.name || "Anonymous", parentId);
3183
+ }
3184
+ const ctx = __fictPushContext();
3185
+ if (componentId !== void 0) {
3186
+ ctx.componentId = componentId;
3187
+ if (parentId !== void 0) {
3188
+ ctx.parentId = parentId;
3189
+ }
3190
+ }
2999
3191
  try {
3000
3192
  const rendered = vnode.type(props);
3193
+ if (hook && componentId !== void 0) {
3194
+ onMount(() => {
3195
+ hook.componentMount?.(componentId);
3196
+ });
3197
+ onCleanup(() => hook.componentUnmount?.(componentId));
3198
+ }
3001
3199
  return createElementWithContext(rendered, namespace);
3002
3200
  } catch (err) {
3003
3201
  if (handleSuspend(err)) {
@@ -3029,15 +3227,48 @@ function createElementWithContext(node, namespace) {
3029
3227
  function template(html, isImportNode, isSVG, isMathML) {
3030
3228
  let node = null;
3031
3229
  const create = () => {
3032
- const t = isMathML ? document.createElementNS(MATHML_NS, "template") : document.createElement("template");
3033
- t.innerHTML = html;
3230
+ const t = document.createElement("template");
3034
3231
  if (isSVG) {
3035
- return t.content.firstChild.firstChild;
3232
+ t.innerHTML = `<svg>${html}</svg>`;
3233
+ const wrapper = t.content.firstChild;
3234
+ if (isDev7 && wrapper.childNodes.length !== 1) {
3235
+ console.warn(
3236
+ `[fict] template() received multi-root SVG content (${wrapper.childNodes.length} nodes). Returning a DocumentFragment. This may indicate a compiler bug or invalid JSX structure.`
3237
+ );
3238
+ }
3239
+ if (wrapper.childNodes.length === 1) {
3240
+ return wrapper.firstChild;
3241
+ }
3242
+ const fragment = document.createDocumentFragment();
3243
+ fragment.append(...Array.from(wrapper.childNodes));
3244
+ return fragment;
3036
3245
  }
3037
3246
  if (isMathML) {
3038
- return t.firstChild;
3247
+ t.innerHTML = `<math>${html}</math>`;
3248
+ const wrapper = t.content.firstChild;
3249
+ if (isDev7 && wrapper.childNodes.length !== 1) {
3250
+ console.warn(
3251
+ `[fict] template() received multi-root MathML content (${wrapper.childNodes.length} nodes). Returning a DocumentFragment. This may indicate a compiler bug or invalid JSX structure.`
3252
+ );
3253
+ }
3254
+ if (wrapper.childNodes.length === 1) {
3255
+ return wrapper.firstChild;
3256
+ }
3257
+ const fragment = document.createDocumentFragment();
3258
+ fragment.append(...Array.from(wrapper.childNodes));
3259
+ return fragment;
3039
3260
  }
3040
- return t.content.firstChild;
3261
+ t.innerHTML = html;
3262
+ const content = t.content;
3263
+ if (isDev7 && content.childNodes.length !== 1) {
3264
+ console.warn(
3265
+ `[fict] template() received multi-root content (${content.childNodes.length} nodes). Returning a DocumentFragment. This may indicate a compiler bug or invalid JSX structure.`
3266
+ );
3267
+ }
3268
+ if (content.childNodes.length === 1) {
3269
+ return content.firstChild;
3270
+ }
3271
+ return content;
3041
3272
  };
3042
3273
  const fn = isImportNode ? () => untrack2(() => document.importNode(node || (node = create()), true)) : () => (node || (node = create())).cloneNode(true);
3043
3274
  fn.cloneNode = fn;
@@ -3341,11 +3572,21 @@ export {
3341
3572
  registerErrorHandler,
3342
3573
  registerSuspenseHandler,
3343
3574
  handleError,
3575
+ createMemo,
3576
+ __fictUseContext,
3577
+ __fictPushContext,
3578
+ __fictPopContext,
3579
+ __fictResetContext,
3580
+ __fictUseSignal,
3581
+ __fictUseMemo,
3582
+ __fictUseEffect,
3583
+ __fictRender,
3344
3584
  flush,
3345
3585
  signal,
3346
3586
  effectScope,
3347
3587
  batch,
3348
3588
  setActiveSub,
3589
+ __resetReactiveState,
3349
3590
  untrack,
3350
3591
  createSelector,
3351
3592
  createEffect,
@@ -3384,22 +3625,14 @@ export {
3384
3625
  createConditional,
3385
3626
  createShow,
3386
3627
  createPortal,
3387
- createMemo,
3388
- __fictUseContext,
3389
- __fictPushContext,
3390
- __fictPopContext,
3391
- __fictResetContext,
3392
- __fictUseSignal,
3393
- __fictUseMemo,
3394
- __fictUseEffect,
3395
- __fictRender,
3396
3628
  __fictProp,
3397
3629
  createPropsProxy,
3398
3630
  __fictPropsRest,
3399
3631
  mergeProps,
3632
+ keyed,
3400
3633
  prop,
3401
3634
  render,
3402
3635
  createElement,
3403
3636
  template
3404
3637
  };
3405
- //# sourceMappingURL=chunk-YVDWXY44.js.map
3638
+ //# sourceMappingURL=chunk-SO6X7G5S.js.map