@solidjs/web 2.0.0-rc.6 → 2.0.0-rc.8

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 (82) hide show
  1. package/dist/{server.cjs → server.dev.js} +274 -272
  2. package/dist/server.js +119 -36
  3. package/dist/{dev.js → web.dev.js} +131 -399
  4. package/dist/web.js +78 -388
  5. package/dist/{web.cjs → web.observe.js} +174 -622
  6. package/frames/dist/client.dev.js +11 -3
  7. package/frames/dist/client.js +11 -3
  8. package/frames/dist/{server.cjs → server.dev.js} +375 -125
  9. package/frames/dist/server.js +253 -32
  10. package/frames/package.json +7 -15
  11. package/package.json +88 -251
  12. package/serialization/decode/package.json +3 -9
  13. package/serialization/dist/decode.js +18 -4
  14. package/serialization/dist/serialization.js +18 -4
  15. package/serialization/package.json +3 -9
  16. package/serialization/types/serializer-decode.d.ts +49 -2
  17. package/server-functions/dist/client.js +13 -14
  18. package/server-functions/dist/server.dev.js +359 -85
  19. package/server-functions/dist/server.js +352 -86
  20. package/server-functions/package.json +6 -24
  21. package/server-functions/rich-args/package.json +3 -9
  22. package/storage/package.json +3 -9
  23. package/types/client.d.ts +17 -3
  24. package/types/frames/frame-client.d.ts +1 -1
  25. package/types/frames/serializer-decode.d.ts +49 -2
  26. package/types/head.d.ts +3 -0
  27. package/types/index.d.ts +18 -7
  28. package/types/index.server.d.ts +31 -9
  29. package/types/render.d.ts +3 -1
  30. package/types/serializer-decode.d.ts +49 -2
  31. package/types/server-functions/flash.d.ts +12 -3
  32. package/types/server-functions/server.d.ts +50 -3
  33. package/types/server-mock.d.ts +43 -7
  34. package/types/server.d.ts +48 -6
  35. package/dist/dev.cjs +0 -2590
  36. package/frames/dist/client.cjs +0 -2035
  37. package/frames/dist/client.dev.cjs +0 -2055
  38. package/serialization/dist/decode.cjs +0 -141
  39. package/serialization/dist/serialization.cjs +0 -261
  40. package/serialization/types-cjs/index.d.cts +0 -101
  41. package/serialization/types-cjs/package.json +0 -3
  42. package/serialization/types-cjs/serializer-decode.d.cts +0 -172
  43. package/serialization/types-cjs/serializer.d.cts +0 -101
  44. package/server-functions/dist/client.cjs +0 -1070
  45. package/server-functions/dist/rich-args.cjs +0 -11
  46. package/server-functions/dist/server.cjs +0 -2133
  47. package/server-functions/dist/server.dev.cjs +0 -2153
  48. package/storage/dist/storage.cjs +0 -12
  49. package/storage/types-cjs/index.d.cts +0 -28
  50. package/storage/types-cjs/package.json +0 -3
  51. package/types/patch-driver.d.ts +0 -3
  52. package/types-cjs/client.d.cts +0 -200
  53. package/types-cjs/constants.d.cts +0 -20
  54. package/types-cjs/cookies.d.cts +0 -41
  55. package/types-cjs/frames/client.d.cts +0 -36
  56. package/types-cjs/frames/frame-client.d.cts +0 -370
  57. package/types-cjs/frames/frame-container-plugin.d.cts +0 -71
  58. package/types-cjs/frames/frame-sink.d.cts +0 -92
  59. package/types-cjs/frames/frame-transport.d.cts +0 -189
  60. package/types-cjs/frames/serializer-decode.d.cts +0 -172
  61. package/types-cjs/frames/serializer.d.cts +0 -101
  62. package/types-cjs/frames/server.d.cts +0 -52
  63. package/types-cjs/head.d.cts +0 -16
  64. package/types-cjs/index.d.cts +0 -180
  65. package/types-cjs/index.server.d.cts +0 -125
  66. package/types-cjs/jsx-properties.d.cts +0 -93
  67. package/types-cjs/jsx.d.cts +0 -4146
  68. package/types-cjs/package.json +0 -3
  69. package/types-cjs/patch-driver.d.cts +0 -3
  70. package/types-cjs/reconcile.d.cts +0 -1
  71. package/types-cjs/render.d.cts +0 -4
  72. package/types-cjs/response.d.cts +0 -81
  73. package/types-cjs/serializer-decode.d.cts +0 -172
  74. package/types-cjs/serializer.d.cts +0 -101
  75. package/types-cjs/server-functions/client.d.cts +0 -184
  76. package/types-cjs/server-functions/flash.d.cts +0 -27
  77. package/types-cjs/server-functions/registry.d.cts +0 -100
  78. package/types-cjs/server-functions/rich-args.d.cts +0 -1
  79. package/types-cjs/server-functions/server.d.cts +0 -522
  80. package/types-cjs/server-functions/shared.d.cts +0 -283
  81. package/types-cjs/server-mock.d.cts +0 -301
  82. package/types-cjs/server.d.cts +0 -366
@@ -1,6 +1,5 @@
1
- 'use strict';
2
-
3
- var solidJs = require('solid-js');
1
+ import { createRenderEffect, createMemo, sharedConfig, enableHydration, $PROXY, untrack, runWithOwner, createRoot, flatten, flush, mergeSources, OBSERVE, createComponent, omit, createOwner, createSignal, onCleanup, getOwner, createEffect } from 'solid-js';
2
+ export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Reveal, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
4
3
 
5
4
  const DOMWithState = {
6
5
  INPUT: {
@@ -59,14 +58,15 @@ const syncOptions = {
59
58
  sync: true
60
59
  };
61
60
  function effect(fn, effectFn, options) {
62
- solidJs.createRenderEffect(fn, effectFn, options ? {
61
+ const nodeOptions = options ? {
63
62
  sync: true,
64
63
  ...options,
65
64
  transparent: !options.scope
66
- } : transparentOptions);
65
+ } : transparentOptions;
66
+ createRenderEffect(fn, effectFn, nodeOptions);
67
67
  }
68
68
  function memo(fn) {
69
- return solidJs.createMemo(() => fn(), syncOptions);
69
+ return createMemo(() => fn(), syncOptions);
70
70
  }
71
71
 
72
72
  function reconcileArrays(parentNode, a, b, marker) {
@@ -212,12 +212,24 @@ function classifyHeadTag(desc) {
212
212
  resource: false
213
213
  };
214
214
  }
215
+ function qualifierValue(name, value) {
216
+ if (value == null || value === false) return null;
217
+ if (name === "imagesrcset" || name === "imagesizes") return typeof value === "string" && value !== "" ? value : null;
218
+ const v = value === true ? "" : String(value);
219
+ if (name === "as") return asciiLowerCase(v);
220
+ if (name !== "crossorigin") return v;
221
+ return v.length === 15 && v.toLowerCase() === "use-credentials" ? v.toLowerCase() : "anonymous";
222
+ }
223
+ function asciiLowerCase(value) {
224
+ return value.replace(/[A-Z]/g, c => String.fromCharCode(c.charCodeAt(0) + 32));
225
+ }
215
226
  function resourceIdentity(tag, props) {
216
- let id = "res:" + tag + ":" + (props.rel || "") + ":" + (props.href || props.src || "");
227
+ const url = String(props.href || props.src || "");
228
+ let id = "res:" + tag + ":" + (props.rel || "") + ":" + url.length + ":" + url;
217
229
  for (let i = 0; i < RESOURCE_QUALIFIERS.length; i++) {
218
230
  const q = RESOURCE_QUALIFIERS[i];
219
- const value = props[q];
220
- if (value != null) id += ":" + q + "=" + (value === true ? "" : value);
231
+ const value = qualifierValue(q, props[q]);
232
+ if (value !== null) id += ":" + q + "=" + value.length + ":" + value;
221
233
  }
222
234
  return id;
223
235
  }
@@ -329,17 +341,13 @@ const assetGates = new WeakMap();
329
341
  const waitAsset = promise => {
330
342
  let gate = assetGates.get(promise);
331
343
  if (!gate) {
332
- solidJs.runWithOwner(null, () => {
333
- gate = solidJs.createMemo(() => promise);
344
+ runWithOwner(null, () => {
345
+ gate = createMemo(() => promise);
334
346
  });
335
347
  assetGates.set(promise, gate);
336
348
  }
337
349
  gate();
338
350
  };
339
- exports.listDriver = void 0;
340
- function installListDriver(driver) {
341
- exports.listDriver = driver;
342
- }
343
351
  const $$EVENT_OWNER = "_$SOLID_EVENT_OWNER";
344
352
  const $$EVENT_TUPLE = Symbol();
345
353
  const hasOwn = Object.prototype.hasOwnProperty;
@@ -358,11 +366,11 @@ function render(code, element, init, options = {}) {
358
366
  let disposer;
359
367
  registerDelegatedRoot(element);
360
368
  try {
361
- solidJs.createRoot(dispose => {
369
+ createRoot(dispose => {
362
370
  disposer = dispose;
363
371
  if (element === document) {
364
372
  const tree = code();
365
- effect(() => solidJs.flatten(tree), () => {});
373
+ effect(() => flatten(tree), () => {});
366
374
  } else {
367
375
  const tree = code();
368
376
  insert(element, () => tree, element.firstChild ? null : undefined, init, {
@@ -373,7 +381,7 @@ function render(code, element, init, options = {}) {
373
381
  }, {
374
382
  id: options.renderId
375
383
  });
376
- solidJs.flush();
384
+ flush();
377
385
  } catch (err) {
378
386
  if (disposer) disposer();
379
387
  unregisterDelegatedRoot(element);
@@ -436,10 +444,27 @@ function unregisterDelegatedContainer(container, owner = container) {
436
444
  }
437
445
  function attachDelegatedEvent(name, container, state) {
438
446
  if (state.handlers.has(name)) return;
439
- const handler = e => eventHandler(e, container, state);
447
+ const handler = e => dispatchAsInteraction(e, () => eventHandler(e, container, state)) ;
440
448
  state.handlers.set(name, handler);
441
449
  container.addEventListener(name, handler);
442
450
  }
451
+ function describeEventTarget(target) {
452
+ if (!target || typeof target.tagName !== "string") return undefined;
453
+ const tag = target.tagName.toLowerCase();
454
+ let out = tag;
455
+ if (target.id) out += `#${target.id}`;else if (typeof target.name === "string" && target.name) out += `[name=${target.name}]`;
456
+ if (tag !== "input" && tag !== "textarea" && tag !== "select") {
457
+ const text = (target.textContent || "").trim().replace(/\s+/g, " ");
458
+ if (text) out += ` "${text.length > 30 ? text.slice(0, 29) + "…" : text}"`;
459
+ }
460
+ return out;
461
+ }
462
+ function dispatchAsInteraction(e, fn) {
463
+ return OBSERVE.attribution.withInteraction({
464
+ type: e.type,
465
+ target: describeEventTarget(e.target)
466
+ }, fn);
467
+ }
443
468
  function getDelegatedRoot(node) {
444
469
  while (node) {
445
470
  if (delegatedContainers.get(node)?.roots) return node;
@@ -566,11 +591,16 @@ function addEvent(node, name, handler, delegate) {
566
591
  }
567
592
  if (Array.isArray(handler)) {
568
593
  const handlerFn = handler[0];
569
- const listener = e => handlerFn.call(node, handler[1], e);
594
+ const listener = e => dispatchAsInteraction(e, () => handlerFn.call(node, handler[1], e)) ;
570
595
  listener[$$EVENT_TUPLE] = handler;
571
596
  node.addEventListener(name, listener);
572
597
  return listener;
573
598
  }
599
+ if (typeof handler === "function") {
600
+ const listener = e => dispatchAsInteraction(e, () => handler.call(node, e));
601
+ node.addEventListener(name, listener);
602
+ return listener;
603
+ }
574
604
  node.addEventListener(name, handler, typeof handler !== "function" && handler);
575
605
  return handler;
576
606
  }
@@ -614,13 +644,28 @@ function style(node, value, prev) {
614
644
  }
615
645
  }
616
646
  }
647
+ function readShallow(value) {
648
+ if (value === null || typeof value !== "object") return value;
649
+ if (Array.isArray(value)) return value.map(readShallow);
650
+ if (value[$PROXY] !== value) return value;
651
+ const keys = ownKeys(value);
652
+ const out = {};
653
+ for (let i = 0; i < keys.length; i++) {
654
+ const k = keys[i];
655
+ if (typeof k === "string") out[k] = value[k];
656
+ }
657
+ return out;
658
+ }
659
+ function ownKeys(o) {
660
+ return o[$PROXY] === o ? Reflect.ownKeys(o) : Object.keys(o);
661
+ }
617
662
  function setStyleProperty(node, name, value) {
618
663
  if (isHydrating(node)) return;
619
664
  value != null ? node.style.setProperty(name, value) : node.style.removeProperty(name);
620
665
  }
621
- function spread(node, props = {}, skipChildren) {
666
+ function spread(node, props, skipChildren) {
622
667
  const prevProps = {};
623
- const get = typeof props === "function" ? props : () => props;
668
+ const get = () => (typeof props === "function" ? props() : props) ?? {};
624
669
  if (!skipChildren) insert(node, () => {
625
670
  const source = get();
626
671
  return hasOwn.call(source, "children") ? source.children : undefined;
@@ -633,15 +678,27 @@ function spread(node, props = {}, skipChildren) {
633
678
  effect(() => {
634
679
  const source = get();
635
680
  const newProps = {};
636
- for (const prop in source) {
637
- if (!hasOwn.call(source, prop)) continue;
638
- if (prop === "children" || prop === "ref") continue;
639
- newProps[prop] = source[prop];
640
- }
681
+ const sources = mergeSources(source);
682
+ if (sources !== undefined) {
683
+ for (let i = 0; i < sources.length; i++) {
684
+ let s = sources[i];
685
+ if (typeof s === "function") s = s();
686
+ if (s != null) collectProps(newProps, s);
687
+ }
688
+ } else collectProps(newProps, source);
641
689
  return newProps;
642
690
  }, props => assign(node, props, true, prevProps, true));
643
691
  return prevProps;
644
692
  }
693
+ function collectProps(out, s) {
694
+ const keys = ownKeys(s);
695
+ for (let i = 0; i < keys.length; i++) {
696
+ const prop = keys[i];
697
+ if (typeof prop !== "string" || prop === "children" || prop === "ref") continue;
698
+ const v = s[prop];
699
+ out[prop] = prop === "style" || prop === "class" ? readShallow(v) : v;
700
+ }
701
+ }
645
702
  function dynamicProperty(props, key) {
646
703
  const src = props[key];
647
704
  Object.defineProperty(props, key, {
@@ -656,8 +713,8 @@ function applyRef(r, element) {
656
713
  Array.isArray(r) ? r.flat(Infinity).forEach(f => f && f(element)) : r(element);
657
714
  }
658
715
  function ref(fn, element) {
659
- const resolved = solidJs.untrack(fn);
660
- solidJs.runWithOwner(null, () => applyRef(resolved, element));
716
+ const resolved = untrack(fn);
717
+ runWithOwner(null, () => applyRef(resolved, element));
661
718
  }
662
719
  function scope(fn) {
663
720
  fn.$s = true;
@@ -666,19 +723,6 @@ function scope(fn) {
666
723
  const SCOPE_OPTIONS = {
667
724
  scope: true
668
725
  };
669
- let insertionParent = null;
670
- function getInsertionParent() {
671
- return insertionParent;
672
- }
673
- function withInsertionParent(parent, fn) {
674
- const prev = insertionParent;
675
- insertionParent = parent;
676
- try {
677
- return fn();
678
- } finally {
679
- insertionParent = prev;
680
- }
681
- }
682
726
  let hydrationRt = null;
683
727
  function installHydrationRuntime() {
684
728
  hydrationRt = {
@@ -690,7 +734,7 @@ function installHydrationRuntime() {
690
734
  return initial;
691
735
  },
692
736
  reclaimRegion(current, parent, marker) {
693
- if (!solidJs.sharedConfig.hydrating || !current || !parent.isConnected) return current;
737
+ if (!sharedConfig.hydrating || !current || !parent.isConnected) return current;
694
738
  const first = Array.isArray(current) ? current[0] : current;
695
739
  if (!first || !first.nodeType || first.isConnected) return current;
696
740
  let nodes;
@@ -713,7 +757,7 @@ function installHydrationRuntime() {
713
757
  return stripTextSeparators(nodes);
714
758
  },
715
759
  dedupEvent(e) {
716
- return !!(solidJs.sharedConfig.registry && solidJs.sharedConfig.events && solidJs.sharedConfig.events.find(([el, ev]) => ev === e));
760
+ return !!(sharedConfig.registry && sharedConfig.events && sharedConfig.events.find(([el, ev]) => ev === e));
717
761
  }
718
762
  };
719
763
  }
@@ -740,13 +784,8 @@ function insert(parent, accessor, marker, initial, options) {
740
784
  const host = options && options.host;
741
785
  if (multi && !initial) initial = [];
742
786
  if (hydrationRt !== null) initial = hydrationRt.claimInitial(parent, multi, initial);
743
- if (exports.listDriver !== undefined && typeof accessor === "function" && accessor.$ll !== undefined) {
744
- const listAccessor = accessor;
745
- const owner = solidJs.getOwner();
746
- if (exports.listDriver(parent, accessor, marker, () => solidJs.runWithOwner(owner, () => insert(parent, () => listAccessor(), marker, marker !== undefined ? [] : undefined, options)))) return;
747
- }
748
787
  if (typeof accessor !== "function") {
749
- accessor = withInsertionParent(parent, () => normalize(accessor, initial, multi, true));
788
+ accessor = normalize(accessor, initial, multi, true);
750
789
  if (typeof accessor !== "function") {
751
790
  insertExpression(parent, accessor, initial, marker);
752
791
  host && tagHost(accessor, host);
@@ -761,9 +800,9 @@ function insert(parent, accessor, marker, initial, options) {
761
800
  let current = initial;
762
801
  effect(prev => {
763
802
  if (hydrationRt !== null) current = hydrationRt.reclaimRegion(current, parent, marker);
764
- const value = withInsertionParent(parent, () => normalize(accessor(), current, multi, true));
803
+ const value = normalize(accessor(), current, multi, true);
765
804
  if (typeof value !== "function") return value;
766
- effect(() => (hydrationRt !== null && (current = hydrationRt.reclaimRegion(current, parent, marker)), withInsertionParent(parent, () => normalize(value, current, multi))), inner => {
805
+ effect(() => (hydrationRt !== null && (current = hydrationRt.reclaimRegion(current, parent, marker)), normalize(value, current, multi)), inner => {
767
806
  current = insertExpression(parent, inner, current, marker);
768
807
  host && tagHost(current, host);
769
808
  }, prev !== undefined && !(options && options.schedule) ? {
@@ -804,10 +843,16 @@ function assetEntryKey(descriptor) {
804
843
  if (descriptor.policy === "exclusive") return "x|" + descriptor.key;
805
844
  return descriptor.type === "inline-style" ? "i|" + descriptor.id : descriptor.type + "|" + descriptor.href;
806
845
  }
807
- function findAssetElement(selector, attr, value) {
846
+ function findAssetElement(selector, attr, value, qualifiers) {
808
847
  const nodes = document.querySelectorAll(selector);
809
- for (let i = 0; i < nodes.length; i++) {
810
- if (nodes[i].getAttribute(attr) === value) return nodes[i];
848
+ outer: for (let i = 0; i < nodes.length; i++) {
849
+ if (nodes[i].getAttribute(attr) !== value) continue;
850
+ if (!qualifiers) return nodes[i];
851
+ for (let q = 0; q < RESOURCE_QUALIFIERS.length; q++) {
852
+ const name = RESOURCE_QUALIFIERS[q];
853
+ if (qualifierValue(name, qualifiers[name]) !== qualifierValue(name, nodes[i].getAttribute(name))) continue outer;
854
+ }
855
+ return nodes[i];
811
856
  }
812
857
  return null;
813
858
  }
@@ -1024,7 +1069,7 @@ function scheduleHeadApply() {
1024
1069
  queueMicrotask(flushHeadRegistry);
1025
1070
  }
1026
1071
  function flushHeadRegistry() {
1027
- if (solidJs.sharedConfig.hydrating) {
1072
+ if (sharedConfig.hydrating) {
1028
1073
  setTimeout(flushHeadRegistry, 0);
1029
1074
  return;
1030
1075
  }
@@ -1111,8 +1156,8 @@ function mountHeadResource(tag, props) {
1111
1156
  headMountedResources.add(identity);
1112
1157
  const url = props.href || props.src;
1113
1158
  let el = null;
1114
- if (url != null) {
1115
- if (tag === "link") el = findAssetElement(`link[rel="${props.rel}"]`, "href", url);else if (tag === "script") el = findAssetElement("script[src]", "src", url);else el = findAssetElement("style[href]", "href", url);
1159
+ if (tag === "link" && url == null && typeof props.imagesrcset === "string") el = findAssetElement(`link[rel="${props.rel}"]`, "href", null, props);else if (url != null) {
1160
+ if (tag === "link") el = findAssetElement(`link[rel="${props.rel}"]`, "href", url, props);else if (tag === "script") el = findAssetElement("script[src]", "src", url);else el = findAssetElement("style[href]", "href", url);
1116
1161
  }
1117
1162
  if (!el) document.head.appendChild(createHeadElement(tag, props));
1118
1163
  }
@@ -1217,7 +1262,7 @@ function loadModuleAssets(mapping) {
1217
1262
  return pending.length ? Promise.all(pending).then(() => {}) : undefined;
1218
1263
  }
1219
1264
  function hydrate(code, element, options = {}) {
1220
- solidJs.enableHydration();
1265
+ enableHydration();
1221
1266
  installHydrationRuntime();
1222
1267
  if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
1223
1268
  const head = (element.nodeType === 9 ? element : element.ownerDocument).head;
@@ -1232,13 +1277,13 @@ function hydrate(code, element, options = {}) {
1232
1277
  options.renderId ||= "";
1233
1278
  if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
1234
1279
  if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
1235
- solidJs.sharedConfig.completed = globalThis._$HY.completed;
1236
- solidJs.sharedConfig.events = globalThis._$HY.events;
1237
- solidJs.sharedConfig.load = id => globalThis._$HY.r[id];
1238
- solidJs.sharedConfig.has = id => id in globalThis._$HY.r;
1239
- solidJs.sharedConfig.gather = root => gatherHydratable(element, root);
1240
- solidJs.sharedConfig.loadModuleAssets = loadModuleAssets;
1241
- solidJs.sharedConfig.cleanupFragment = id => {
1280
+ sharedConfig.completed = globalThis._$HY.completed;
1281
+ sharedConfig.events = globalThis._$HY.events;
1282
+ sharedConfig.load = id => globalThis._$HY.r[id];
1283
+ sharedConfig.has = id => id in globalThis._$HY.r;
1284
+ sharedConfig.gather = root => gatherHydratable(element, root);
1285
+ sharedConfig.loadModuleAssets = loadModuleAssets;
1286
+ sharedConfig.cleanupFragment = id => {
1242
1287
  const tpl = document.getElementById("pl-" + id);
1243
1288
  if (tpl) {
1244
1289
  let node = tpl.nextSibling;
@@ -1254,37 +1299,41 @@ function hydrate(code, element, options = {}) {
1254
1299
  tpl.remove();
1255
1300
  }
1256
1301
  };
1257
- solidJs.sharedConfig.registry = new Map();
1258
- if (!solidJs.sharedConfig.boundaryScopes) solidJs.sharedConfig.boundaryScopes = new Map();
1259
- solidJs.sharedConfig.captureBoundaryScope = id => {
1260
- if (solidJs.sharedConfig.registry) solidJs.sharedConfig.boundaryScopes.set(id, {
1261
- registry: solidJs.sharedConfig.registry,
1262
- gather: solidJs.sharedConfig.gather
1302
+ sharedConfig.registry = new Map();
1303
+ if (!sharedConfig.boundaryScopes) sharedConfig.boundaryScopes = new Map();
1304
+ sharedConfig.captureBoundaryScope = id => {
1305
+ if (sharedConfig.registry) sharedConfig.boundaryScopes.set(id, {
1306
+ registry: sharedConfig.registry,
1307
+ gather: sharedConfig.gather
1263
1308
  });
1264
1309
  };
1265
- solidJs.sharedConfig.hydrating = true;
1310
+ sharedConfig.hydrating = true;
1266
1311
  const hyr = globalThis._$HY.r;
1267
1312
  const rootMapping = hyr && (hyr[options.renderId + "_assets"] || hyr["_assets"]);
1268
1313
  if (rootMapping && typeof rootMapping === "object") {
1269
1314
  const p = loadModuleAssets(rootMapping);
1270
1315
  if (p) {
1271
1316
  gatherHydratable(element, options.renderId);
1272
- const registry = solidJs.sharedConfig.registry;
1273
- const gather = solidJs.sharedConfig.gather;
1317
+ const registry = sharedConfig.registry;
1318
+ const gather = sharedConfig.gather;
1274
1319
  let disposer;
1275
1320
  p.then(() => {
1276
- solidJs.sharedConfig.registry = registry;
1277
- solidJs.sharedConfig.gather = gather;
1278
- solidJs.sharedConfig.hydrating = true;
1321
+ sharedConfig.registry = registry;
1322
+ sharedConfig.gather = gather;
1323
+ sharedConfig.hydrating = true;
1279
1324
  try {
1280
1325
  disposer = render(code, element, [...element.childNodes], options);
1281
1326
  } finally {
1282
- solidJs.sharedConfig.hydrating = false;
1327
+ sharedConfig.hydrating = false;
1283
1328
  }
1284
1329
  }, err => {
1330
+ sharedConfig.hydrating = false;
1331
+ sharedConfig.registry = undefined;
1332
+ if (element.nodeType === 9) {
1333
+ (globalThis.reportError || console.error)(err);
1334
+ return;
1335
+ }
1285
1336
  console.error("Hydration module preload failed, falling back to client render:", err);
1286
- solidJs.sharedConfig.hydrating = false;
1287
- solidJs.sharedConfig.registry = undefined;
1288
1337
  disposer = render(code, element, [...element.childNodes], options);
1289
1338
  });
1290
1339
  return () => disposer && disposer();
@@ -1294,21 +1343,21 @@ function hydrate(code, element, options = {}) {
1294
1343
  gatherHydratable(element, options.renderId);
1295
1344
  return render(code, element, [...element.childNodes], options);
1296
1345
  } finally {
1297
- solidJs.sharedConfig.hydrating = false;
1346
+ sharedConfig.hydrating = false;
1298
1347
  }
1299
1348
  }
1300
1349
  function getNextElement(template) {
1301
1350
  let node,
1302
1351
  key,
1303
1352
  hydrating = isHydrating();
1304
- if (!hydrating || !(node = solidJs.sharedConfig.registry.get(key = getHydrationKey()))) {
1353
+ if (!hydrating || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
1305
1354
  if (!template) {
1306
1355
  throw new Error(`Hydration Mismatch. Unable to find DOM nodes for hydration key: ${key}`);
1307
1356
  }
1308
1357
  return template(true);
1309
1358
  }
1310
- if (solidJs.sharedConfig.completed) solidJs.sharedConfig.completed.add(node);
1311
- solidJs.sharedConfig.registry.delete(key);
1359
+ if (sharedConfig.completed) sharedConfig.completed.add(node);
1360
+ sharedConfig.registry.delete(key);
1312
1361
  return node;
1313
1362
  }
1314
1363
  function getNextMatch(el, nodeName) {
@@ -1343,12 +1392,12 @@ function getNextSibling(node, expectedTag) {
1343
1392
  return sibling;
1344
1393
  }
1345
1394
  function runHydrationEvents() {
1346
- if (solidJs.sharedConfig.events && !solidJs.sharedConfig.events.queued) {
1395
+ if (sharedConfig.events && !sharedConfig.events.queued) {
1347
1396
  queueMicrotask(() => {
1348
1397
  const {
1349
1398
  completed,
1350
1399
  events
1351
- } = solidJs.sharedConfig;
1400
+ } = sharedConfig;
1352
1401
  if (!events) return;
1353
1402
  events.queued = false;
1354
1403
  while (events.length) {
@@ -1382,18 +1431,18 @@ function runHydrationEvents() {
1382
1431
  for (let i = 0; i < matches.length; i++) eventHandler(e, matches[i].container, matches[i].state);
1383
1432
  } else if (matchContainer) eventHandler(e, matchContainer, matchState);
1384
1433
  }
1385
- if (solidJs.sharedConfig.done) {
1386
- solidJs.sharedConfig.events = _$HY.events = null;
1387
- solidJs.sharedConfig.completed = _$HY.completed = null;
1434
+ if (sharedConfig.done) {
1435
+ sharedConfig.events = _$HY.events = null;
1436
+ sharedConfig.completed = _$HY.completed = null;
1388
1437
  }
1389
1438
  });
1390
- solidJs.sharedConfig.events.queued = true;
1439
+ sharedConfig.events.queued = true;
1391
1440
  }
1392
1441
  }
1393
1442
  function isHydrating(node) {
1394
- if (!solidJs.sharedConfig.hydrating) return false;
1443
+ if (!sharedConfig.hydrating) return false;
1395
1444
  if (!node || node.isConnected) return true;
1396
- const roots = solidJs.sharedConfig.claimRoots;
1445
+ const roots = sharedConfig.claimRoots;
1397
1446
  if (roots) {
1398
1447
  for (let i = 0; i < roots.length; i++) {
1399
1448
  if (roots[i].contains(node)) return true;
@@ -1595,13 +1644,13 @@ function insertExpression(parent, value, current, marker) {
1595
1644
  return value;
1596
1645
  }
1597
1646
  function normalize(value, current, multi, doNotUnwrap) {
1598
- value = solidJs.flatten(value, {
1647
+ value = flatten(value, {
1599
1648
  skipNonRendered: true,
1600
1649
  doNotUnwrap
1601
1650
  });
1602
1651
  if (doNotUnwrap && typeof value === "function") return value;
1603
1652
  if (multi && !Array.isArray(value)) value = [value != null ? value : ""];
1604
- if (solidJs.sharedConfig.hydrating && Array.isArray(value)) {
1653
+ if (sharedConfig.hydrating && Array.isArray(value)) {
1605
1654
  for (let i = 0, len = value.length; i < len; i++) {
1606
1655
  const item = value[i],
1607
1656
  prev = current && current[i],
@@ -1681,330 +1730,14 @@ function gatherHydratable(element, root) {
1681
1730
  const frame = node.closest("[data-fid]");
1682
1731
  if (frame && frame !== element && element.contains(frame)) continue;
1683
1732
  }
1684
- if (!solidJs.sharedConfig.registry.has(key)) solidJs.sharedConfig.registry.set(key, node);
1733
+ if (!sharedConfig.registry.has(key)) sharedConfig.registry.set(key, node);
1685
1734
  }
1686
1735
  }
1687
1736
  function getHydrationKey() {
1688
- return solidJs.sharedConfig.getNextContextId();
1737
+ return sharedConfig.getNextContextId();
1689
1738
  }
1690
1739
  const RequestContext = Symbol();
1691
1740
 
1692
- const PURE_ROW = Symbol.for("solid.pure-row");
1693
- const arm = () => {
1694
- installListDriver(driveList);
1695
- };
1696
- function rowProof(fn) {
1697
- arm();
1698
- fn[PURE_ROW] = true;
1699
- return fn;
1700
- }
1701
- let rowCollector = null;
1702
- const lisPositions = sources => {
1703
- const n = sources.length;
1704
- const tails = [];
1705
- const tailsIdx = [];
1706
- const prev = new Array(n).fill(-1);
1707
- for (let j = 0; j < n; j++) {
1708
- const v = sources[j];
1709
- if (v === -1) continue;
1710
- let lo = 0,
1711
- hi = tails.length;
1712
- while (lo < hi) {
1713
- const mid = lo + hi >> 1;
1714
- if (tails[mid] < v) lo = mid + 1;else hi = mid;
1715
- }
1716
- if (lo > 0) prev[j] = tailsIdx[lo - 1];
1717
- tails[lo] = v;
1718
- tailsIdx[lo] = j;
1719
- }
1720
- const stable = new Set();
1721
- let k = tailsIdx.length ? tailsIdx[tails.length - 1] : -1;
1722
- while (k >= 0) {
1723
- stable.add(k);
1724
- k = prev[k];
1725
- }
1726
- return stable;
1727
- };
1728
- const driveList = (parent, listFn, marker, lateClassic) => {
1729
- const meta = listFn.$ll;
1730
- if (meta.row?.[PURE_ROW] !== true) return false;
1731
- if (typeof meta.keyed === "function") return false;
1732
- const evalOwner = solidJs.createOwner({
1733
- id: "&each"
1734
- });
1735
- let subject = solidJs.runWithOwner(evalOwner, () => solidJs.untrack(meta.each));
1736
- evalOwner.dispose();
1737
- let raw = subject != null ? solidJs.patchableRaw(subject) : undefined;
1738
- if (raw === undefined || !Array.isArray(raw)) return false;
1739
- const optimistic = solidJs.storeHasOptimisticFamily(subject);
1740
- if (optimistic) raw = solidJs.untrack(() => Array.from(subject));
1741
- const hydrating = !!solidJs.sharedConfig.hydrating;
1742
- if (hydrating && raw.length === 0) return false;
1743
- let domRows;
1744
- let rowIds;
1745
- if (hydrating) {
1746
- if (marker !== undefined) return false;
1747
- domRows = Array.from(parent.children);
1748
- if (domRows.length !== raw.length) return false;
1749
- rowIds = new Array(raw.length);
1750
- for (let i = 0; i < domRows.length; i++) {
1751
- const key = domRows[i].getAttribute("_hk");
1752
- if (key === null || !key.endsWith("0") || key.length < 2) return false;
1753
- rowIds[i] = key.slice(0, -1);
1754
- }
1755
- }
1756
- const rowFn = meta.row;
1757
- const endAnchor = marker ?? null;
1758
- const shallow = solidJs.storeIsShallow(subject);
1759
- let lastBodies = null;
1760
- let lastUnbinds = null;
1761
- const collectBind = (abs, build) => {
1762
- const prevC = rowCollector;
1763
- rowCollector = {
1764
- row: shallow ? subject[abs] : undefined,
1765
- bodies: [],
1766
- unbinds: []
1767
- };
1768
- try {
1769
- return build();
1770
- } finally {
1771
- lastBodies = rowCollector.bodies;
1772
- lastUnbinds = rowCollector.unbinds;
1773
- rowCollector = prevC;
1774
- }
1775
- };
1776
- const listOwner = solidJs.createOwner();
1777
- let declined = false;
1778
- const bindRow = (abs, claimId) => {
1779
- return collectBind(abs, () => solidJs.runWithOwner(listOwner, () => claimId !== undefined ? solidJs.runWithOwner(solidJs.createOwner({
1780
- id: claimId
1781
- }), () => solidJs.untrack(() => rowFn(subject[abs]))) : solidJs.untrack(() => rowFn(subject[abs]))));
1782
- };
1783
- let entries = new Array(raw.length);
1784
- let rowBodies = shallow ? new Array(raw.length) : null;
1785
- let rowUnbinds = new Array(raw.length);
1786
- const runUnbinds = list => {
1787
- if (list !== undefined) for (let u = 0; u < list.length; u++) list[u]();
1788
- };
1789
- const unbindAllRows = () => {
1790
- for (let j = 0; j < rowUnbinds.length; j++) runUnbinds(rowUnbinds[j]);
1791
- rowUnbinds = [];
1792
- };
1793
- let prevRaws = raw.slice();
1794
- try {
1795
- if (hydrating) {
1796
- for (let i = 0; i < raw.length; i++) {
1797
- entries[i] = bindRow(i, rowIds[i]);
1798
- if (rowBodies !== null) rowBodies[i] = lastBodies;
1799
- rowUnbinds[i] = lastUnbinds;
1800
- }
1801
- } else {
1802
- for (let i = 0; i < raw.length; i++) {
1803
- const node = bindRow(i);
1804
- entries[i] = node;
1805
- if (rowBodies !== null) rowBodies[i] = lastBodies;
1806
- rowUnbinds[i] = lastUnbinds;
1807
- parent.insertBefore(node, endAnchor);
1808
- }
1809
- }
1810
- } catch (err) {
1811
- unbindAllRows();
1812
- runUnbinds(lastUnbinds ?? undefined);
1813
- for (let j = 0; j < entries.length; j++) {
1814
- const n = entries[j];
1815
- if (n !== undefined && n.parentNode === parent) n.remove();
1816
- }
1817
- listOwner.dispose();
1818
- throw err;
1819
- }
1820
- const identityOps = nextArr => {
1821
- const keyOf = r => {
1822
- const w = r != null ? solidJs.patchableRaw(r) : undefined;
1823
- return w !== undefined ? w : r;
1824
- };
1825
- const oldIndex = new Map();
1826
- for (let j = 0; j < prevRaws.length; j++) {
1827
- const k = keyOf(prevRaws[j]);
1828
- const existing = oldIndex.get(k);
1829
- if (existing === undefined) oldIndex.set(k, j);else if (Array.isArray(existing)) existing.push(j);else oldIndex.set(k, [existing, j]);
1830
- }
1831
- const sources = new Array(nextArr.length);
1832
- for (let k = 0; k < nextArr.length; k++) {
1833
- const m = oldIndex.get(keyOf(nextArr[k]));
1834
- if (m === undefined) sources[k] = -1;else if (Array.isArray(m)) {
1835
- sources[k] = m.shift();
1836
- if (m.length === 1) oldIndex.set(keyOf(nextArr[k]), m[0]);
1837
- } else {
1838
- sources[k] = m;
1839
- oldIndex.delete(keyOf(nextArr[k]));
1840
- }
1841
- }
1842
- return {
1843
- prefix: 0,
1844
- sources
1845
- };
1846
- };
1847
- let resyncNeeded = false;
1848
- const applyOps = (next, ops) => {
1849
- if (declined) return;
1850
- if (resyncNeeded) ops = null;
1851
- if (ops === null) ops = identityOps(next);
1852
- const {
1853
- prefix,
1854
- sources
1855
- } = ops;
1856
- const built = new Array(sources.length);
1857
- const builtBodies = rowBodies !== null ? new Array(sources.length) : null;
1858
- const builtUnbinds = new Array(sources.length);
1859
- let j = 0;
1860
- try {
1861
- for (; j < sources.length; j++) {
1862
- const abs = prefix + j;
1863
- const src = sources[j];
1864
- if (src === -1 || refRebuild && src >= 0 && next[abs] !== prevRaws[src]) {
1865
- built[j] = bindRow(abs);
1866
- if (builtBodies !== null) builtBodies[j] = lastBodies;
1867
- builtUnbinds[j] = lastUnbinds;
1868
- }
1869
- }
1870
- } catch (err) {
1871
- for (let k = 0; k < j; k++) runUnbinds(builtUnbinds[k]);
1872
- runUnbinds(lastUnbinds ?? undefined);
1873
- resyncNeeded = true;
1874
- throw err;
1875
- }
1876
- const retained = new Set();
1877
- for (let k = 0; k < sources.length; k++) {
1878
- if (sources[k] >= 0 && built[k] === undefined) retained.add(sources[k]);
1879
- }
1880
- for (let k = prefix; k < entries.length; k++) {
1881
- if (!retained.has(k)) {
1882
- entries[k].remove();
1883
- runUnbinds(rowUnbinds[k]);
1884
- }
1885
- }
1886
- const newEntries = new Array(prefix + sources.length);
1887
- const newBodies = rowBodies !== null ? new Array(prefix + sources.length) : null;
1888
- const newUnbinds = new Array(prefix + sources.length);
1889
- for (let i = 0; i < prefix; i++) {
1890
- newEntries[i] = entries[i];
1891
- if (newBodies !== null) newBodies[i] = rowBodies[i];
1892
- newUnbinds[i] = rowUnbinds[i];
1893
- }
1894
- const stable = lisPositions(sources);
1895
- let anchor = endAnchor;
1896
- for (let k = sources.length - 1; k >= 0; k--) {
1897
- const abs = prefix + k;
1898
- const src = sources[k];
1899
- let node;
1900
- if (built[k] !== undefined) {
1901
- node = built[k];
1902
- if (newBodies !== null) newBodies[abs] = builtBodies[k];
1903
- newUnbinds[abs] = builtUnbinds[k];
1904
- parent.insertBefore(node, anchor);
1905
- } else {
1906
- node = entries[src];
1907
- if (newBodies !== null) newBodies[abs] = rowBodies[src];
1908
- newUnbinds[abs] = rowUnbinds[src];
1909
- if (!stable.has(k)) parent.insertBefore(node, anchor);
1910
- }
1911
- newEntries[abs] = node;
1912
- anchor = node;
1913
- }
1914
- entries = newEntries;
1915
- if (newBodies !== null) rowBodies = newBodies;
1916
- rowUnbinds = newUnbinds;
1917
- prevRaws = next.slice();
1918
- resyncNeeded = false;
1919
- };
1920
- let unbindOps = solidJs.runWithOwner(listOwner, () => solidJs.registerRowOps(subject, applyOps));
1921
- const refRebuild = shallow && typeof meta.keyed !== "function";
1922
- const rebuildSlot = i => {
1923
- runUnbinds(rowUnbinds[i]);
1924
- const old = entries[i];
1925
- const node = bindRow(i);
1926
- rowBodies[i] = lastBodies;
1927
- rowUnbinds[i] = lastUnbinds;
1928
- parent.insertBefore(node, old);
1929
- old.remove();
1930
- entries[i] = node;
1931
- };
1932
- const applySlot = (i, next, prev) => {
1933
- if (declined) return;
1934
- if (resyncNeeded) {
1935
- const live = subject != null ? solidJs.patchableRaw(subject) : undefined;
1936
- if (live !== undefined && Array.isArray(live)) applyOps(live, null);
1937
- return;
1938
- }
1939
- if (refRebuild) {
1940
- rebuildSlot(i);
1941
- prevRaws[i] = next;
1942
- return;
1943
- }
1944
- const bodies = rowBodies[i];
1945
- if (bodies !== undefined) {
1946
- for (let b = 0; b < bodies.length; b++) bodies[b](next, prev, false);
1947
- }
1948
- prevRaws[i] = next;
1949
- };
1950
- let unbindSlots = shallow ? solidJs.runWithOwner(listOwner, () => solidJs.registerSlotPatch(subject, applySlot)) : null;
1951
- solidJs.runWithOwner(listOwner, () => effect(() => meta.each(), value => {
1952
- if (declined || value === subject) return;
1953
- const nextRaw = value != null ? solidJs.patchableRaw(value) : undefined;
1954
- unbindOps();
1955
- unbindSlots?.();
1956
- if (nextRaw !== undefined && Array.isArray(nextRaw) && solidJs.storeIsShallow(value) !== shallow) {
1957
- for (let j = 0; j < entries.length; j++) entries[j].remove();
1958
- entries = [];
1959
- prevRaws = [];
1960
- unbindAllRows();
1961
- subject = value;
1962
- declined = true;
1963
- listOwner.dispose();
1964
- lateClassic?.();
1965
- return;
1966
- }
1967
- if (nextRaw === undefined || !Array.isArray(nextRaw)) {
1968
- for (let j = 0; j < entries.length; j++) entries[j].remove();
1969
- entries = [];
1970
- prevRaws = [];
1971
- unbindAllRows();
1972
- subject = value;
1973
- declined = true;
1974
- listOwner.dispose();
1975
- lateClassic?.();
1976
- return;
1977
- }
1978
- const swapOps = identityOps(nextRaw);
1979
- subject = value;
1980
- unbindOps = solidJs.runWithOwner(listOwner, () => solidJs.registerRowOps(subject, applyOps));
1981
- if (shallow) unbindSlots = solidJs.runWithOwner(listOwner, () => solidJs.registerSlotPatch(subject, applySlot));
1982
- applyOps(nextRaw, swapOps);
1983
- }));
1984
- solidJs.onCleanup(() => {
1985
- unbindOps();
1986
- unbindSlots?.();
1987
- unbindAllRows();
1988
- listOwner.dispose();
1989
- });
1990
- return true;
1991
- };
1992
- const patchDriver = (subject, body) => {
1993
- const raw = solidJs.patchableRaw(subject);
1994
- if (raw !== undefined) {
1995
- if (!solidJs.sharedConfig.hydrating) body(raw, undefined, true);
1996
- const unbind = solidJs.registerPatch(subject, body);
1997
- if (rowCollector !== null) rowCollector.unbinds.push(unbind);
1998
- else solidJs.onCleanup(unbind);
1999
- } else if (rowCollector !== null && subject === rowCollector.row) {
2000
- rowCollector.bodies.push(body);
2001
- if (!solidJs.sharedConfig.hydrating) body(subject, undefined, true);
2002
- } else {
2003
- effect(() => body(subject, subject, false),
2004
- () => solidJs.untrack(() => body(subject, undefined, true)));
2005
- }
2006
- };
2007
-
2008
1741
  function throwInBrowser(func) {
2009
1742
  const err = new Error(`${func.name} is not supported in the browser, returning undefined`);
2010
1743
  console.error(err);
@@ -2167,22 +1900,22 @@ function respond(value, init = {}) {
2167
1900
  const isServer = false;
2168
1901
  const isDev = false;
2169
1902
  function Portal(props) {
2170
- return solidJs.runWithOwner(solidJs.createOwner(), () => portalImpl(props));
1903
+ return runWithOwner(createOwner(), () => portalImpl(props));
2171
1904
  }
2172
1905
  function portalImpl(props) {
2173
1906
  const treeMarker = document.createTextNode(""),
2174
1907
  startMarker = document.createTextNode(""),
2175
1908
  endMarker = document.createTextNode(""),
2176
1909
  mount = () => props.mount || document.body,
2177
- content = solidJs.createMemo(() => [startMarker, props.children], {
1910
+ content = createMemo(() => [startMarker, props.children], {
2178
1911
  ssrSource: "client",
2179
1912
  loadingValue: undefined
2180
1913
  });
2181
- solidJs.createRenderEffect(
2182
- () => [mount(), content(), solidJs.getOwner()], ([, c, owner]) => {
2183
- const m = solidJs.untrack(mount);
1914
+ createRenderEffect(
1915
+ () => [mount(), content(), getOwner()], ([, c, owner]) => {
1916
+ const m = untrack(mount);
2184
1917
  m.appendChild(endMarker);
2185
- const dispose = solidJs.runWithOwner(owner, () => solidJs.createRoot(d => {
1918
+ const dispose = runWithOwner(owner, () => createRoot(d => {
2186
1919
  insert(m, c, endMarker, undefined, {
2187
1920
  host: () => treeMarker.parentNode
2188
1921
  });
@@ -2203,8 +1936,8 @@ function portalImpl(props) {
2203
1936
  schedule: true,
2204
1937
  ssrSource: "client"
2205
1938
  });
2206
- solidJs.createEffect(mount, () => {
2207
- const m = solidJs.untrack(mount);
1939
+ createEffect(mount, () => {
1940
+ const m = untrack(mount);
2208
1941
  const ownerRoot = getDelegatedRoot(treeMarker);
2209
1942
  if (!ownerRoot || ownerRoot.contains(m)) return;
2210
1943
  registerDelegatedContainer(m, ownerRoot);
@@ -2212,7 +1945,7 @@ function portalImpl(props) {
2212
1945
  }, {
2213
1946
  ssrSource: "client"
2214
1947
  });
2215
- if (solidJs.sharedConfig.hydrating) return solidJs.createMemo(() => treeMarker, {
1948
+ if (sharedConfig.hydrating) return createMemo(() => treeMarker, {
2216
1949
  ssrSource: "client",
2217
1950
  loadingValue: undefined
2218
1951
  });
@@ -2222,7 +1955,7 @@ const COMPONENT_BINDING = Symbol.for("solid.component-binding");
2222
1955
  function bindingOf(value) {
2223
1956
  return value !== null && (typeof value === "function" || typeof value === "object") && value[COMPONENT_BINDING] || undefined;
2224
1957
  }
2225
- function dynamic(source) {
1958
+ function dynamic(source, _options) {
2226
1959
  let latest = 0;
2227
1960
  const sites = new Set();
2228
1961
  let deliveredAddress;
@@ -2237,7 +1970,7 @@ function dynamic(source) {
2237
1970
  }
2238
1971
  return next;
2239
1972
  };
2240
- const cached = solidJs.createMemo(prev => {
1973
+ const cached = createMemo(prev => {
2241
1974
  const next = source();
2242
1975
  if (!next || typeof next.then !== "function") return resolveBinding(next, prev);
2243
1976
  const token = ++latest;
@@ -2248,56 +1981,34 @@ function dynamic(source) {
2248
1981
  lazy: true
2249
1982
  });
2250
1983
  return props => {
2251
- return solidJs.createMemo(() => {
1984
+ return createMemo(() => {
2252
1985
  const component = cached();
2253
1986
  switch (typeof component) {
2254
1987
  case "function":
2255
1988
  {
2256
1989
  const binding = bindingOf(component);
2257
1990
  if (binding) {
2258
- const [address, setAddress] = solidJs.createSignal(deliveredAddress ?? binding.address);
1991
+ const [address, setAddress] = createSignal(deliveredAddress ?? binding.address);
2259
1992
  sites.add(setAddress);
2260
- solidJs.onCleanup(() => sites.delete(setAddress));
2261
- return solidJs.untrack(() => binding.component(props, address));
1993
+ onCleanup(() => sites.delete(setAddress));
1994
+ return untrack(() => binding.component(props, address));
2262
1995
  }
2263
- return solidJs.untrack(() => component(props));
1996
+ return untrack(() => component(props));
2264
1997
  }
2265
1998
  case "string":
2266
- {
2267
- if (solidJs.sharedConfig.hydrating) {
2268
- const el = getNextElement();
2269
- spread(el, props);
2270
- return el;
2271
- }
2272
- const owner = solidJs.getOwner();
2273
- let el;
2274
- return () => {
2275
- if (!el) {
2276
- solidJs.runWithOwner(owner, () => {
2277
- el = createElement(component, solidJs.untrack(() => props.is));
2278
- spread(el, props);
2279
- });
2280
- }
2281
- return el;
2282
- };
2283
- }
1999
+ const el = sharedConfig.hydrating ? getNextElement() : createElement(component, untrack(() => props.is));
2000
+ spread(el, props);
2001
+ return el;
2284
2002
  }
2285
2003
  });
2286
2004
  };
2287
2005
  }
2288
2006
  function Dynamic(props) {
2289
2007
  const Comp = dynamic(() => props.component);
2290
- return solidJs.createComponent(Comp, solidJs.omit(props, "component"));
2008
+ return createComponent(Comp, omit(props, "component"));
2291
2009
  }
2292
- const AmbiguousSVGElements = /*#__PURE__*/new Set(["a", "script", "style", "title"]);
2293
2010
  function createElement(tagName, is = undefined) {
2294
- if (SVGElements.has(tagName)) return document.createElementNS(Namespaces.svg, tagName);
2295
- if (MathMLElements.has(tagName)) return document.createElementNS(Namespaces.mathml, tagName);
2296
- if (AmbiguousSVGElements.has(tagName)) {
2297
- const parent = getInsertionParent();
2298
- if (parent && parent.namespaceURI === Namespaces.svg && parent.localName !== "foreignObject") return document.createElementNS(Namespaces.svg, tagName);
2299
- }
2300
- return document.createElement(tagName, {
2011
+ return SVGElements.has(tagName) ? document.createElementNS(Namespaces.svg, tagName) : MathMLElements.has(tagName) ? document.createElementNS(Namespaces.mathml, tagName) : document.createElement(tagName, {
2301
2012
  is
2302
2013
  });
2303
2014
  }
@@ -2306,21 +2017,21 @@ function loadClientOnly(fn, setComp, exportName) {
2306
2017
  }
2307
2018
  function clientOnly(fn, options = {},
2308
2019
  _moduleUrl) {
2309
- const [comp, setComp] = solidJs.createSignal();
2020
+ const [comp, setComp] = createSignal();
2310
2021
  let started = !options.lazy;
2311
2022
  started && loadClientOnly(fn, setComp, options.export);
2312
2023
  return props => {
2313
2024
  let Comp;
2314
2025
  let m;
2315
- const rest = solidJs.omit(props, "fallback");
2026
+ const rest = omit(props, "fallback");
2316
2027
  if (!started) {
2317
2028
  started = true;
2318
2029
  loadClientOnly(fn, setComp, options.export);
2319
2030
  }
2320
- if ((Comp = solidJs.untrack(comp)) && !solidJs.sharedConfig.hydrating) return Comp(rest);
2321
- const [mounted, setMounted] = solidJs.createSignal(!solidJs.sharedConfig.hydrating);
2322
- const gate = solidJs.createMemo(() => (Comp = comp(), m = mounted(), solidJs.untrack(() => Comp && m ? Comp(rest) : props.fallback)));
2323
- const onHydrationEnd = solidJs.sharedConfig.onHydrationEnd;
2031
+ if ((Comp = untrack(comp)) && !sharedConfig.hydrating) return Comp(rest);
2032
+ const [mounted, setMounted] = createSignal(!sharedConfig.hydrating);
2033
+ const gate = createMemo(() => (Comp = comp(), m = mounted(), untrack(() => Comp && m ? Comp(rest) : props.fallback)));
2034
+ const onHydrationEnd = sharedConfig.onHydrationEnd;
2324
2035
  const release = () => setMounted(true);
2325
2036
  onHydrationEnd ? onHydrationEnd(release) : queueMicrotask(release);
2326
2037
  return gate;
@@ -2329,163 +2040,4 @@ _moduleUrl) {
2329
2040
  function httpStatus(_code, _text) {}
2330
2041
  function httpHeader(_name, _value, _options) {}
2331
2042
 
2332
- Object.defineProperty(exports, "Errored", {
2333
- enumerable: true,
2334
- get: function () { return solidJs.Errored; }
2335
- });
2336
- Object.defineProperty(exports, "For", {
2337
- enumerable: true,
2338
- get: function () { return solidJs.For; }
2339
- });
2340
- Object.defineProperty(exports, "Hydration", {
2341
- enumerable: true,
2342
- get: function () { return solidJs.Hydration; }
2343
- });
2344
- Object.defineProperty(exports, "Loading", {
2345
- enumerable: true,
2346
- get: function () { return solidJs.Loading; }
2347
- });
2348
- Object.defineProperty(exports, "Match", {
2349
- enumerable: true,
2350
- get: function () { return solidJs.Match; }
2351
- });
2352
- Object.defineProperty(exports, "NoHydration", {
2353
- enumerable: true,
2354
- get: function () { return solidJs.NoHydration; }
2355
- });
2356
- Object.defineProperty(exports, "Repeat", {
2357
- enumerable: true,
2358
- get: function () { return solidJs.Repeat; }
2359
- });
2360
- Object.defineProperty(exports, "Reveal", {
2361
- enumerable: true,
2362
- get: function () { return solidJs.Reveal; }
2363
- });
2364
- Object.defineProperty(exports, "Show", {
2365
- enumerable: true,
2366
- get: function () { return solidJs.Show; }
2367
- });
2368
- Object.defineProperty(exports, "Switch", {
2369
- enumerable: true,
2370
- get: function () { return solidJs.Switch; }
2371
- });
2372
- Object.defineProperty(exports, "createComponent", {
2373
- enumerable: true,
2374
- get: function () { return solidJs.createComponent; }
2375
- });
2376
- Object.defineProperty(exports, "getOwner", {
2377
- enumerable: true,
2378
- get: function () { return solidJs.getOwner; }
2379
- });
2380
- Object.defineProperty(exports, "mergeProps", {
2381
- enumerable: true,
2382
- get: function () { return solidJs.merge; }
2383
- });
2384
- Object.defineProperty(exports, "untrack", {
2385
- enumerable: true,
2386
- get: function () { return solidJs.untrack; }
2387
- });
2388
- exports.ChildProperties = ChildProperties;
2389
- exports.DOMElements = DOMElements;
2390
- exports.DOMWithState = DOMWithState;
2391
- exports.DelegatedEvents = DelegatedEvents;
2392
- exports.Dynamic = Dynamic;
2393
- exports.HREF = HREF;
2394
- exports.HydrationScript = HydrationScript;
2395
- exports.MathMLElements = MathMLElements;
2396
- exports.NULL_BODY_STATUSES = NULL_BODY_STATUSES;
2397
- exports.Namespaces = Namespaces;
2398
- exports.Portal = Portal;
2399
- exports.RESPONSE_HEADER_VALUE_LIMIT = RESPONSE_HEADER_VALUE_LIMIT;
2400
- exports.REVALIDATE_HEADER = REVALIDATE_HEADER;
2401
- exports.RawTextElements = RawTextElements;
2402
- exports.RequestContext = RequestContext;
2403
- exports.ResponseEnvelope = ResponseEnvelope;
2404
- exports.SAFE_ERROR = SAFE_ERROR;
2405
- exports.SVGElements = SVGElements;
2406
- exports.VoidElements = VoidElements;
2407
- exports.acquireAsset = acquireAsset;
2408
- exports.addEvent = addEvent;
2409
- exports.applyRef = applyRef;
2410
- exports.assign = assign;
2411
- exports.claimElement = claimElement;
2412
- exports.claimElementTree = claimElementTree;
2413
- exports.className = className;
2414
- exports.clearFlashCookie = clearFlashCookie;
2415
- exports.clientOnly = clientOnly;
2416
- exports.commitEventResponse = commitEventResponse;
2417
- exports.composeMiddleware = composeMiddleware;
2418
- exports.createRequestEvent = createRequestEvent;
2419
- exports.createResponseStub = createResponseStub;
2420
- exports.createSSRResponse = createSSRResponse;
2421
- exports.delegateEvents = delegateEvents;
2422
- exports.driveList = driveList;
2423
- exports.dynamic = dynamic;
2424
- exports.dynamicProperty = dynamicProperty;
2425
- exports.effect = effect;
2426
- exports.escape = escape;
2427
- exports.generateHydrationScript = generateHydrationScript;
2428
- exports.getDelegatedRoot = getDelegatedRoot;
2429
- exports.getExpectedRedirectStatus = getExpectedRedirectStatus;
2430
- exports.getFirstChild = getFirstChild;
2431
- exports.getHydrationKey = getHydrationKey;
2432
- exports.getInsertionParent = getInsertionParent;
2433
- exports.getNextElement = getNextElement;
2434
- exports.getNextMarker = getNextMarker;
2435
- exports.getNextMatch = getNextMatch;
2436
- exports.getNextSibling = getNextSibling;
2437
- exports.getRequestEvent = getRequestEvent;
2438
- exports.getServerFunctionMetadata = getServerFunctionMetadata;
2439
- exports.getServerFunctionRPC = getServerFunctionRPC;
2440
- exports.hasFlashCookie = hasFlashCookie;
2441
- exports.httpHeader = httpHeader;
2442
- exports.httpStatus = httpStatus;
2443
- exports.hydrate = hydrate;
2444
- exports.insert = insert;
2445
- exports.installHydrationRuntime = installHydrationRuntime;
2446
- exports.installListDriver = installListDriver;
2447
- exports.isDev = isDev;
2448
- exports.isHref = isHref;
2449
- exports.isResponseEnvelope = isResponseEnvelope;
2450
- exports.isSafeError = isSafeError;
2451
- exports.isServer = isServer;
2452
- exports.isServerFunction = isServerFunction;
2453
- exports.markSafeError = markSafeError;
2454
- exports.memo = memo;
2455
- exports.parseCookieHeader = parseCookieHeader;
2456
- exports.patchDriver = patchDriver;
2457
- exports.redirect = redirect;
2458
- exports.ref = ref;
2459
- exports.registerDelegatedContainer = registerDelegatedContainer;
2460
- exports.registerDelegatedRoot = registerDelegatedRoot;
2461
- exports.registerElementClaim = registerElementClaim;
2462
- exports.reload = reload;
2463
- exports.render = render;
2464
- exports.renderToStream = renderToStream;
2465
- exports.renderToString = renderToString;
2466
- exports.resolveSSRNode = resolveSSRNode;
2467
- exports.respond = respond;
2468
- exports.rowProof = rowProof;
2469
- exports.runHydrationEvents = runHydrationEvents;
2470
- exports.scope = scope;
2471
- exports.serializeCookie = serializeCookie;
2472
- exports.setAttribute = setAttribute;
2473
- exports.setAttributeNS = setAttributeNS;
2474
- exports.setProperty = setProperty;
2475
- exports.setStyleProperty = setStyleProperty;
2476
- exports.spread = spread;
2477
- exports.ssr = ssr;
2478
- exports.ssrAttribute = ssrAttribute;
2479
- exports.ssrClassName = ssrClassName;
2480
- exports.ssrElement = ssrElement;
2481
- exports.ssrGroup = ssrGroup;
2482
- exports.ssrHydrationKey = ssrHydrationKey;
2483
- exports.ssrStyle = ssrStyle;
2484
- exports.ssrStyleProperty = ssrStyleProperty;
2485
- exports.style = style;
2486
- exports.template = template;
2487
- exports.unregisterDelegatedContainer = unregisterDelegatedContainer;
2488
- exports.unregisterDelegatedRoot = unregisterDelegatedRoot;
2489
- exports.useHead = useHead;
2490
- exports.waitAsset = waitAsset;
2491
- exports.warmAsset = warmAsset;
2043
+ export { ChildProperties, DOMElements, DOMWithState, DelegatedEvents, Dynamic, HREF, HydrationScript, MathMLElements, NULL_BODY_STATUSES, Namespaces, Portal, RESPONSE_HEADER_VALUE_LIMIT, REVALIDATE_HEADER, RawTextElements, RequestContext, ResponseEnvelope, SAFE_ERROR, SVGElements, VoidElements, acquireAsset, addEvent, applyRef, assign, claimElement, claimElementTree, className, clearFlashCookie, clientOnly, commitEventResponse, composeMiddleware, createRequestEvent, createResponseStub, createSSRResponse, delegateEvents, dynamic, dynamicProperty, effect, escape, generateHydrationScript, getDelegatedRoot, getExpectedRedirectStatus, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, getRequestEvent, getServerFunctionMetadata, getServerFunctionRPC, hasFlashCookie, httpHeader, httpStatus, hydrate, insert, installHydrationRuntime, isDev, isHref, isResponseEnvelope, isSafeError, isServer, isServerFunction, markSafeError, memo, parseCookieHeader, readShallow, redirect, ref, registerDelegatedContainer, registerDelegatedRoot, registerElementClaim, reload, render, renderToStream, renderToString, resolveSSRNode, respond, runHydrationEvents, scope, serializeCookie, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassName, ssrElement, ssrGroup, ssrHydrationKey, ssrStyle, ssrStyleProperty, style, template, unregisterDelegatedContainer, unregisterDelegatedRoot, useHead, waitAsset, warmAsset };