sibujs 3.3.0 → 3.3.2

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 (60) hide show
  1. package/dist/browser.cjs +230 -40
  2. package/dist/browser.js +5 -5
  3. package/dist/build.cjs +240 -108
  4. package/dist/build.js +13 -13
  5. package/dist/cdn.global.js +7 -7
  6. package/dist/{chunk-BEIKESVL.js → chunk-2ARSB7NG.js} +36 -13
  7. package/dist/{chunk-X3NHE2DK.js → chunk-4NJEAPLI.js} +83 -17
  8. package/dist/{chunk-JBXNCZSC.js → chunk-5VH3GIDX.js} +1 -1
  9. package/dist/{chunk-6G6UNHZI.js → chunk-62V653X2.js} +16 -21
  10. package/dist/{chunk-S4FHR5ZZ.js → chunk-655B7MMR.js} +3 -3
  11. package/dist/{chunk-24DBWDTK.js → chunk-6TCOWMGY.js} +1 -1
  12. package/dist/{chunk-USDR2GFV.js → chunk-A7CZH3GN.js} +3 -3
  13. package/dist/{chunk-SLCUP2EK.js → chunk-AEOLHSSQ.js} +3 -3
  14. package/dist/chunk-CCSJMTRN.js +15 -0
  15. package/dist/{chunk-R3QEDXFS.js → chunk-EX77FXTT.js} +1 -1
  16. package/dist/{chunk-ZUVLC7TM.js → chunk-FJIRS3FM.js} +1 -1
  17. package/dist/{chunk-4WXWJ4SW.js → chunk-FJO2ZL4Q.js} +4 -4
  18. package/dist/{chunk-CVMMULHO.js → chunk-G6N3LMO2.js} +4 -4
  19. package/dist/{chunk-XQ7XSGYP.js → chunk-IQJ36UTJ.js} +1 -1
  20. package/dist/{chunk-5K72I3UQ.js → chunk-JCQG2I2G.js} +21 -4
  21. package/dist/{chunk-7JHWAGRQ.js → chunk-N5TQVEKE.js} +2 -2
  22. package/dist/{chunk-IHBVTURX.js → chunk-P7C7SEJV.js} +4 -4
  23. package/dist/{chunk-M6WSIGYW.js → chunk-Q46YIQYW.js} +2 -2
  24. package/dist/{chunk-Q2ERM6NT.js → chunk-QCFBIVIQ.js} +1 -1
  25. package/dist/{chunk-F4UM7QBJ.js → chunk-RLTFJYDN.js} +2 -2
  26. package/dist/{chunk-GOJMFRBL.js → chunk-S3NFJO6L.js} +20 -14
  27. package/dist/{chunk-MWZFOIBG.js → chunk-YUBEOWII.js} +5 -5
  28. package/dist/{chunk-WVJJUFPC.js → chunk-YUR5SX7F.js} +2 -2
  29. package/dist/{chunk-NUWKIEHE.js → chunk-ZEUP4TUD.js} +2 -2
  30. package/dist/data.cjs +181 -37
  31. package/dist/data.js +7 -7
  32. package/dist/devtools.cjs +265 -45
  33. package/dist/devtools.js +5 -5
  34. package/dist/ecosystem.cjs +203 -59
  35. package/dist/ecosystem.js +8 -8
  36. package/dist/extras.cjs +216 -116
  37. package/dist/extras.js +22 -22
  38. package/dist/index.cjs +242 -108
  39. package/dist/index.d.cts +78 -14
  40. package/dist/index.d.ts +78 -14
  41. package/dist/index.js +17 -13
  42. package/dist/motion.cjs +329 -13
  43. package/dist/motion.js +3 -3
  44. package/dist/patterns.cjs +181 -37
  45. package/dist/patterns.js +6 -6
  46. package/dist/performance.cjs +278 -37
  47. package/dist/performance.js +6 -6
  48. package/dist/plugins.cjs +353 -153
  49. package/dist/plugins.js +95 -94
  50. package/dist/{ssr-6D67RAVB.js → ssr-2PPULEK2.js} +2 -2
  51. package/dist/ssr.cjs +203 -58
  52. package/dist/ssr.js +9 -9
  53. package/dist/testing.cjs +416 -19
  54. package/dist/testing.js +3 -3
  55. package/dist/ui.cjs +256 -65
  56. package/dist/ui.js +8 -8
  57. package/dist/widgets.cjs +166 -40
  58. package/dist/widgets.js +7 -7
  59. package/package.json +1 -1
  60. package/dist/chunk-YT6HQ6AM.js +0 -14
@@ -3,7 +3,7 @@ import {
3
3
  isDev
4
4
  } from "./chunk-COY6PUD2.js";
5
5
 
6
- // src/reactivity/track.ts
6
+ // src/reactivity/track-core.ts
7
7
  var _isDev = isDev();
8
8
  var POOL_MAX = 4096;
9
9
  var nodePool = [];
@@ -117,6 +117,9 @@ function resumeTracking() {
117
117
  trackingSuspended = false;
118
118
  }
119
119
  }
120
+ function isTrackingSuspended() {
121
+ return trackingSuspended;
122
+ }
120
123
  function untracked(fn) {
121
124
  suspendTracking();
122
125
  try {
@@ -234,6 +237,11 @@ function cleanup(subscriber) {
234
237
  var maxSubscriberRepeats = 50;
235
238
  var maxDrainIterations = 1e6;
236
239
  var drainEpoch = 0;
240
+ function setMaxSubscriberRepeats(n) {
241
+ const prev = maxSubscriberRepeats;
242
+ if (Number.isFinite(n) && n > 0) maxSubscriberRepeats = Math.floor(n);
243
+ return prev;
244
+ }
237
245
  function setMaxDrainIterations(n) {
238
246
  const prev = maxDrainIterations;
239
247
  if (Number.isFinite(n) && n > 0) maxDrainIterations = Math.floor(n);
@@ -409,21 +417,79 @@ function forEachSubscriber(signal, visit) {
409
417
  }
410
418
  }
411
419
 
420
+ // src/reactivity/track.ts
421
+ var _isDev2 = isDev();
422
+ var _runtimeVersion = true ? "3.3.2" : "dev";
423
+ var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.v1");
424
+ function resolveReactiveApi() {
425
+ const g = globalThis;
426
+ const existing = g[REGISTRY_KEY];
427
+ if (existing) {
428
+ if (_isDev2 && !existing.__dupWarned) {
429
+ existing.__dupWarned = true;
430
+ devWarn(
431
+ `Multiple instances of the reactive runtime detected on this page (active: ${existing.version}, duplicate: ${_runtimeVersion}). Reactivity still works \u2014 all copies share the first one \u2014 but de-duplicate sibujs in your bundler (e.g. Vite optimizeDeps.exclude: ['sibujs'] or resolve.dedupe: ['sibujs']).`
432
+ );
433
+ }
434
+ return existing;
435
+ }
436
+ const local = {
437
+ suspendTracking,
438
+ resumeTracking,
439
+ isTrackingSuspended,
440
+ untracked,
441
+ retrack,
442
+ track,
443
+ reactiveBinding,
444
+ recordDependency,
445
+ cleanup,
446
+ setMaxSubscriberRepeats,
447
+ setMaxDrainIterations,
448
+ drainNotificationQueue,
449
+ queueSignalNotification,
450
+ notifySubscribers,
451
+ getSubscriberCount,
452
+ getSubscriberDeps,
453
+ forEachSubscriber,
454
+ version: _runtimeVersion
455
+ };
456
+ g[REGISTRY_KEY] = local;
457
+ return local;
458
+ }
459
+ var API = resolveReactiveApi();
460
+ var suspendTracking2 = API.suspendTracking;
461
+ var resumeTracking2 = API.resumeTracking;
462
+ var isTrackingSuspended2 = API.isTrackingSuspended;
463
+ var untracked2 = API.untracked;
464
+ var retrack2 = API.retrack;
465
+ var track2 = API.track;
466
+ var reactiveBinding2 = API.reactiveBinding;
467
+ var recordDependency2 = API.recordDependency;
468
+ var cleanup2 = API.cleanup;
469
+ var setMaxSubscriberRepeats2 = API.setMaxSubscriberRepeats;
470
+ var setMaxDrainIterations2 = API.setMaxDrainIterations;
471
+ var drainNotificationQueue2 = API.drainNotificationQueue;
472
+ var queueSignalNotification2 = API.queueSignalNotification;
473
+ var notifySubscribers2 = API.notifySubscribers;
474
+ var getSubscriberCount2 = API.getSubscriberCount;
475
+ var getSubscriberDeps2 = API.getSubscriberDeps;
476
+ var forEachSubscriber2 = API.forEachSubscriber;
477
+
412
478
  export {
413
- trackingSuspended,
414
- suspendTracking,
415
- resumeTracking,
416
- untracked,
417
- retrack,
418
- track,
419
- reactiveBinding,
420
- recordDependency,
421
- cleanup,
422
- setMaxDrainIterations,
423
- drainNotificationQueue,
424
- queueSignalNotification,
425
- notifySubscribers,
426
- getSubscriberCount,
427
- getSubscriberDeps,
428
- forEachSubscriber
479
+ suspendTracking2 as suspendTracking,
480
+ resumeTracking2 as resumeTracking,
481
+ isTrackingSuspended2 as isTrackingSuspended,
482
+ untracked2 as untracked,
483
+ retrack2 as retrack,
484
+ track2 as track,
485
+ reactiveBinding2 as reactiveBinding,
486
+ recordDependency2 as recordDependency,
487
+ cleanup2 as cleanup,
488
+ setMaxDrainIterations2 as setMaxDrainIterations,
489
+ drainNotificationQueue2 as drainNotificationQueue,
490
+ queueSignalNotification2 as queueSignalNotification,
491
+ notifySubscribers2 as notifySubscribers,
492
+ getSubscriberCount2 as getSubscriberCount,
493
+ getSubscriberDeps2 as getSubscriberDeps,
494
+ forEachSubscriber2 as forEachSubscriber
429
495
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-5K72I3UQ.js";
3
+ } from "./chunk-JCQG2I2G.js";
4
4
 
5
5
  // src/core/rendering/context.ts
6
6
  function context(defaultValue) {
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  bindAttribute
3
- } from "./chunk-Q2ERM6NT.js";
3
+ } from "./chunk-QCFBIVIQ.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-CVMMULHO.js";
6
+ } from "./chunk-G6N3LMO2.js";
7
7
  import {
8
8
  dispose,
9
9
  registerDisposer
10
10
  } from "./chunk-5VGSK6D2.js";
11
11
  import {
12
12
  effect
13
- } from "./chunk-7JHWAGRQ.js";
13
+ } from "./chunk-N5TQVEKE.js";
14
14
  import {
15
15
  signal
16
- } from "./chunk-5K72I3UQ.js";
16
+ } from "./chunk-JCQG2I2G.js";
17
17
  import {
18
18
  track
19
- } from "./chunk-X3NHE2DK.js";
19
+ } from "./chunk-4NJEAPLI.js";
20
20
 
21
21
  // src/ui/form.ts
22
22
  function required(message = "This field is required") {
@@ -74,23 +74,18 @@ function custom(fn, message) {
74
74
  return (value) => fn(value) ? null : message;
75
75
  }
76
76
  function bindField(field, extras) {
77
+ const readControlValue = (target) => {
78
+ if ("checked" in target && target.type === "checkbox") {
79
+ return target.checked;
80
+ }
81
+ if (target instanceof HTMLSelectElement && target.multiple) {
82
+ return Array.from(target.selectedOptions, (o) => o.value);
83
+ }
84
+ return target.value;
85
+ };
77
86
  const fieldOn = {
78
- input: (e) => {
79
- const target = e.target;
80
- if (target.type === "checkbox") {
81
- field.set(target.checked);
82
- } else {
83
- field.set(target.value);
84
- }
85
- },
86
- change: (e) => {
87
- const target = e.target;
88
- if ("checked" in target && target.type === "checkbox") {
89
- field.set(target.checked);
90
- } else {
91
- field.set(target.value);
92
- }
93
- },
87
+ input: (e) => field.set(readControlValue(e.target)),
88
+ change: (e) => field.set(readControlValue(e.target)),
94
89
  blur: () => field.touch()
95
90
  };
96
91
  const { on: extraOn, value: _ignoreValue, ...restExtras } = extras ?? {};
@@ -4,14 +4,14 @@ import {
4
4
  } from "./chunk-H3SRKIYX.js";
5
5
  import {
6
6
  derived
7
- } from "./chunk-CVMMULHO.js";
7
+ } from "./chunk-G6N3LMO2.js";
8
8
  import {
9
9
  effect
10
- } from "./chunk-7JHWAGRQ.js";
10
+ } from "./chunk-N5TQVEKE.js";
11
11
  import {
12
12
  batch,
13
13
  signal
14
- } from "./chunk-5K72I3UQ.js";
14
+ } from "./chunk-JCQG2I2G.js";
15
15
 
16
16
  // src/patterns/machine.ts
17
17
  function machine(config) {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SVG_NS,
3
3
  tagFactory
4
- } from "./chunk-NUWKIEHE.js";
4
+ } from "./chunk-ZEUP4TUD.js";
5
5
 
6
6
  // src/core/rendering/html.ts
7
7
  var html = tagFactory("html");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  div,
3
3
  span
4
- } from "./chunk-24DBWDTK.js";
4
+ } from "./chunk-6TCOWMGY.js";
5
5
  import {
6
6
  isEventHandlerAttr,
7
7
  sanitizeUrl,
@@ -9,11 +9,11 @@ import {
9
9
  } from "./chunk-L3GAGWCC.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-7JHWAGRQ.js";
12
+ } from "./chunk-N5TQVEKE.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-5K72I3UQ.js";
16
+ } from "./chunk-JCQG2I2G.js";
17
17
 
18
18
  // src/platform/head.ts
19
19
  var HEAD_URL_ATTRS = /* @__PURE__ */ new Set(["href", "src"]);
@@ -6,15 +6,15 @@ import {
6
6
  } from "./chunk-L3GAGWCC.js";
7
7
  import {
8
8
  effect
9
- } from "./chunk-7JHWAGRQ.js";
9
+ } from "./chunk-N5TQVEKE.js";
10
10
  import {
11
11
  signal
12
- } from "./chunk-5K72I3UQ.js";
12
+ } from "./chunk-JCQG2I2G.js";
13
13
  import {
14
14
  forEachSubscriber,
15
15
  getSubscriberCount,
16
16
  getSubscriberDeps
17
- } from "./chunk-X3NHE2DK.js";
17
+ } from "./chunk-4NJEAPLI.js";
18
18
  import {
19
19
  isDev
20
20
  } from "./chunk-COY6PUD2.js";
@@ -0,0 +1,15 @@
1
+ // src/core/rendering/createId.ts
2
+ var COUNTER_KEY = /* @__PURE__ */ Symbol.for("sibujs.createId.v1");
3
+ var _counter = globalThis[COUNTER_KEY] ?? (globalThis[COUNTER_KEY] = { n: 0 });
4
+ function createId(prefix = "sibu") {
5
+ _counter.n++;
6
+ return `${prefix}-${_counter.n}`;
7
+ }
8
+ function __resetIdCounter() {
9
+ _counter.n = 0;
10
+ }
11
+
12
+ export {
13
+ createId,
14
+ __resetIdCounter
15
+ };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-L3GAGWCC.js";
7
7
  import {
8
8
  getSSRStore
9
- } from "./chunk-GOJMFRBL.js";
9
+ } from "./chunk-S3NFJO6L.js";
10
10
  import {
11
11
  isDev
12
12
  } from "./chunk-COY6PUD2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderToString
3
- } from "./chunk-R3QEDXFS.js";
3
+ } from "./chunk-EX77FXTT.js";
4
4
 
5
5
  // src/plugins/modular.ts
6
6
  function createModuleRegistry() {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  watch
3
- } from "./chunk-F4UM7QBJ.js";
3
+ } from "./chunk-RLTFJYDN.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-CVMMULHO.js";
6
+ } from "./chunk-G6N3LMO2.js";
7
7
  import {
8
8
  stripHtml
9
9
  } from "./chunk-L3GAGWCC.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-7JHWAGRQ.js";
12
+ } from "./chunk-N5TQVEKE.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-5K72I3UQ.js";
16
+ } from "./chunk-JCQG2I2G.js";
17
17
 
18
18
  // src/widgets/Combobox.ts
19
19
  var comboboxIdCounter = 0;
@@ -1,9 +1,9 @@
1
1
  import {
2
+ isTrackingSuspended,
2
3
  recordDependency,
3
4
  retrack,
4
- track,
5
- trackingSuspended
6
- } from "./chunk-X3NHE2DK.js";
5
+ track
6
+ } from "./chunk-4NJEAPLI.js";
7
7
  import {
8
8
  devAssert
9
9
  } from "./chunk-COY6PUD2.js";
@@ -49,7 +49,7 @@ function derived(getter, options) {
49
49
  `[SibuJS] Circular dependency detected in derived${debugName ? ` "${debugName}"` : ""}. A derived signal cannot read itself (directly or through a chain).`
50
50
  );
51
51
  }
52
- if (trackingSuspended) {
52
+ if (isTrackingSuspended()) {
53
53
  if (cs._d) {
54
54
  const prev = cs._v;
55
55
  evaluating = true;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  signal
3
- } from "./chunk-5K72I3UQ.js";
3
+ } from "./chunk-JCQG2I2G.js";
4
4
 
5
5
  // src/ui/transition.ts
6
6
  function transition(element, options = {}) {
@@ -3,7 +3,7 @@ import {
3
3
  notifySubscribers,
4
4
  queueSignalNotification,
5
5
  recordDependency
6
- } from "./chunk-X3NHE2DK.js";
6
+ } from "./chunk-4NJEAPLI.js";
7
7
  import {
8
8
  isDev
9
9
  } from "./chunk-COY6PUD2.js";
@@ -11,7 +11,7 @@ import {
11
11
  // src/reactivity/batch.ts
12
12
  var batchDepth = 0;
13
13
  var pendingSignals = /* @__PURE__ */ new Set();
14
- function batch(fn) {
14
+ function batchImpl(fn) {
15
15
  batchDepth++;
16
16
  try {
17
17
  return fn();
@@ -22,12 +22,12 @@ function batch(fn) {
22
22
  }
23
23
  }
24
24
  }
25
- function enqueueBatchedSignal(signal2) {
25
+ function enqueueBatchedSignalImpl(signal2) {
26
26
  if (batchDepth === 0) return false;
27
27
  pendingSignals.add(signal2);
28
28
  return true;
29
29
  }
30
- function isBatching() {
30
+ function isBatchingImpl() {
31
31
  return batchDepth > 0;
32
32
  }
33
33
  function flushBatch() {
@@ -40,6 +40,23 @@ function flushBatch() {
40
40
  }
41
41
  drainNotificationQueue();
42
42
  }
43
+ var BATCH_REGISTRY_KEY = /* @__PURE__ */ Symbol.for("sibujs.reactive.batch.v1");
44
+ function resolveBatchApi() {
45
+ const g = globalThis;
46
+ const existing = g[BATCH_REGISTRY_KEY];
47
+ if (existing) return existing;
48
+ const local = {
49
+ batch: batchImpl,
50
+ enqueueBatchedSignal: enqueueBatchedSignalImpl,
51
+ isBatching: isBatchingImpl
52
+ };
53
+ g[BATCH_REGISTRY_KEY] = local;
54
+ return local;
55
+ }
56
+ var API = resolveBatchApi();
57
+ var batch = API.batch;
58
+ var enqueueBatchedSignal = API.enqueueBatchedSignal;
59
+ var isBatching = API.isBatching;
43
60
 
44
61
  // src/core/signals/signal.ts
45
62
  var _g = globalThis;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  isSSR
3
- } from "./chunk-GOJMFRBL.js";
3
+ } from "./chunk-S3NFJO6L.js";
4
4
  import {
5
5
  cleanup,
6
6
  retrack,
7
7
  untracked
8
- } from "./chunk-X3NHE2DK.js";
8
+ } from "./chunk-4NJEAPLI.js";
9
9
  import {
10
10
  devAssert
11
11
  } from "./chunk-COY6PUD2.js";
@@ -3,17 +3,17 @@ import {
3
3
  } from "./chunk-3JHCYHWN.js";
4
4
  import {
5
5
  tagFactory
6
- } from "./chunk-NUWKIEHE.js";
6
+ } from "./chunk-ZEUP4TUD.js";
7
7
  import {
8
8
  derived
9
- } from "./chunk-CVMMULHO.js";
9
+ } from "./chunk-G6N3LMO2.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-7JHWAGRQ.js";
12
+ } from "./chunk-N5TQVEKE.js";
13
13
  import {
14
14
  batch,
15
15
  signal
16
- } from "./chunk-5K72I3UQ.js";
16
+ } from "./chunk-JCQG2I2G.js";
17
17
 
18
18
  // src/ecosystem/adapters/mobx.ts
19
19
  function mobXAdapter(options) {
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-H3SRKIYX.js";
4
4
  import {
5
5
  effect
6
- } from "./chunk-7JHWAGRQ.js";
6
+ } from "./chunk-N5TQVEKE.js";
7
7
  import {
8
8
  batch,
9
9
  signal
10
- } from "./chunk-5K72I3UQ.js";
10
+ } from "./chunk-JCQG2I2G.js";
11
11
 
12
12
  // src/browser/media.ts
13
13
  function media(query) {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-L3GAGWCC.js";
5
5
  import {
6
6
  reactiveBinding
7
- } from "./chunk-X3NHE2DK.js";
7
+ } from "./chunk-4NJEAPLI.js";
8
8
  import {
9
9
  devWarn,
10
10
  isDev
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  isSSR
3
- } from "./chunk-GOJMFRBL.js";
3
+ } from "./chunk-S3NFJO6L.js";
4
4
  import {
5
5
  resumeTracking,
6
6
  suspendTracking,
7
7
  track
8
- } from "./chunk-X3NHE2DK.js";
8
+ } from "./chunk-4NJEAPLI.js";
9
9
  import {
10
10
  devAssert
11
11
  } from "./chunk-COY6PUD2.js";
@@ -1,21 +1,27 @@
1
1
  // src/core/ssr-context.ts
2
- var als = null;
3
- try {
4
- if (typeof process !== "undefined" && process.versions && process.versions.node) {
5
- let mod = null;
6
- const getBuiltin = process.getBuiltinModule;
7
- if (typeof getBuiltin === "function") {
8
- mod = getBuiltin("node:async_hooks");
9
- } else {
10
- const req = Function("return typeof require==='function'?require:null")();
11
- if (req) mod = req("node:async_hooks");
2
+ var SSR_KEY = /* @__PURE__ */ Symbol.for("sibujs.ssr.v1");
3
+ function detectSSRShared() {
4
+ let detected = null;
5
+ try {
6
+ if (typeof process !== "undefined" && process.versions && process.versions.node) {
7
+ let mod = null;
8
+ const getBuiltin = process.getBuiltinModule;
9
+ if (typeof getBuiltin === "function") {
10
+ mod = getBuiltin("node:async_hooks");
11
+ } else {
12
+ const req = Function("return typeof require==='function'?require:null")();
13
+ if (req) mod = req("node:async_hooks");
14
+ }
15
+ if (mod) detected = new mod.AsyncLocalStorage();
12
16
  }
13
- if (mod) als = new mod.AsyncLocalStorage();
17
+ } catch {
18
+ detected = null;
14
19
  }
15
- } catch {
16
- als = null;
20
+ return { als: detected, fallbackStore: { ssr: false, suspenseIdCounter: 0 } };
17
21
  }
18
- var fallbackStore = { ssr: false, suspenseIdCounter: 0 };
22
+ var _shared = globalThis[SSR_KEY] ?? (globalThis[SSR_KEY] = detectSSRShared());
23
+ var als = _shared.als;
24
+ var fallbackStore = _shared.fallbackStore;
19
25
  function getSSRStore() {
20
26
  if (als) {
21
27
  const s = als.getStore();
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  context
3
- } from "./chunk-JBXNCZSC.js";
3
+ } from "./chunk-5VH3GIDX.js";
4
4
  import {
5
5
  derived
6
- } from "./chunk-CVMMULHO.js";
6
+ } from "./chunk-G6N3LMO2.js";
7
7
  import {
8
8
  sanitizeUrl
9
9
  } from "./chunk-L3GAGWCC.js";
10
10
  import {
11
11
  effect
12
- } from "./chunk-7JHWAGRQ.js";
12
+ } from "./chunk-N5TQVEKE.js";
13
13
  import {
14
14
  getRequestScopedCache
15
- } from "./chunk-GOJMFRBL.js";
15
+ } from "./chunk-S3NFJO6L.js";
16
16
  import {
17
17
  batch,
18
18
  signal
19
- } from "./chunk-5K72I3UQ.js";
19
+ } from "./chunk-JCQG2I2G.js";
20
20
 
21
21
  // src/data/retry.ts
22
22
  function calculateDelay(attempt, strategy, baseDelay, maxDelay, jitter) {
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-L3GAGWCC.js";
7
7
  import {
8
8
  effect
9
- } from "./chunk-7JHWAGRQ.js";
9
+ } from "./chunk-N5TQVEKE.js";
10
10
  import {
11
11
  signal
12
- } from "./chunk-5K72I3UQ.js";
12
+ } from "./chunk-JCQG2I2G.js";
13
13
  import {
14
14
  devWarn,
15
15
  isDev
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bindAttribute
3
- } from "./chunk-Q2ERM6NT.js";
3
+ } from "./chunk-QCFBIVIQ.js";
4
4
  import {
5
5
  dispose,
6
6
  registerDisposer
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  reactiveBinding,
15
15
  track
16
- } from "./chunk-X3NHE2DK.js";
16
+ } from "./chunk-4NJEAPLI.js";
17
17
  import {
18
18
  devWarn,
19
19
  isDev