@solidjs/web 2.0.0-beta.0 → 2.0.0-beta.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.
package/dist/dev.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var solidJs = require('solid-js');
4
+ var signals = require('@solidjs/signals');
4
5
 
5
6
  const Properties = /*#__PURE__*/new Set([
6
7
  "value", "checked", "selected", "muted"]);
@@ -22,7 +23,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
22
23
  const effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
23
24
  transparent: true
24
25
  });
25
- const memo = fn => solidJs.createMemo(() => fn());
26
+ const memo = (fn, transparent) => transparent ? fn.$r ? fn : signals.createMemo(() => fn(), undefined, {
27
+ transparent: true
28
+ }) : solidJs.createMemo(() => fn());
26
29
 
27
30
  function reconcileArrays(parentNode, a, b) {
28
31
  let bLength = b.length,
@@ -82,7 +85,7 @@ function reconcileArrays(parentNode, a, b) {
82
85
  }
83
86
 
84
87
  const $$EVENTS = "_$DX_DELEGATE";
85
- function render(code, element, init, options = {}) {
88
+ function render$1(code, element, init, options = {}) {
86
89
  if (!element) {
87
90
  throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
88
91
  }
@@ -242,17 +245,26 @@ function ref(fn, element) {
242
245
  function insert(parent, accessor, marker, initial) {
243
246
  const multi = marker !== undefined;
244
247
  if (multi && !initial) initial = [];
245
- if (isHydrating(parent) && Array.isArray(initial)) {
246
- let j = 0;
247
- for (let i = 0; i < initial.length; i++) {
248
- if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
248
+ if (isHydrating(parent)) {
249
+ if (!multi && initial === undefined && parent) initial = [...parent.childNodes];
250
+ if (Array.isArray(initial)) {
251
+ let j = 0;
252
+ for (let i = 0; i < initial.length; i++) {
253
+ if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
254
+ }
255
+ initial.length = j;
249
256
  }
250
- initial.length = j;
251
257
  }
252
258
  if (typeof accessor !== "function") {
253
259
  accessor = normalize(accessor, initial, multi, true);
254
260
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
255
261
  }
262
+ accessor = memo(accessor, true);
263
+ if (multi && initial.length === 0 && !isHydrating(parent)) {
264
+ const placeholder = document.createTextNode("");
265
+ parent.insertBefore(placeholder, marker);
266
+ initial = [placeholder];
267
+ }
256
268
  effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
257
269
  }
258
270
  function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
@@ -273,7 +285,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
273
285
  }
274
286
  }
275
287
  function hydrate$1(code, element, options = {}) {
276
- if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
288
+ if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
277
289
  options.renderId ||= "";
278
290
  if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
279
291
  if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
@@ -310,7 +322,7 @@ function hydrate$1(code, element, options = {}) {
310
322
  }
311
323
  try {
312
324
  gatherHydratable(element, options.renderId);
313
- return render(code, element, [...element.childNodes], options);
325
+ return render$1(code, element, [...element.childNodes], options);
314
326
  } finally {
315
327
  solidJs.sharedConfig.hydrating = false;
316
328
  }
@@ -602,12 +614,6 @@ function gatherHydratable(element, root) {
602
614
  function getHydrationKey() {
603
615
  return solidJs.sharedConfig.getNextContextId();
604
616
  }
605
- function NoHydration(props) {
606
- return solidJs.sharedConfig.hydrating ? undefined : props.children;
607
- }
608
- function Hydration(props) {
609
- return props.children;
610
- }
611
617
  const voidFn = () => undefined;
612
618
  const RequestContext = Symbol();
613
619
 
@@ -633,6 +639,31 @@ function ssrHydrationKey() {}
633
639
  function resolveSSRNode(node) {}
634
640
  function escape(html) {}
635
641
 
642
+ function render(...args) {
643
+ let unhandledAsync = false;
644
+ {
645
+ solidJs.setOnUnhandledAsync(() => {
646
+ unhandledAsync = true;
647
+ });
648
+ }
649
+ const result = render$1(...args);
650
+ {
651
+ solidJs.setOnUnhandledAsync(null);
652
+ if (unhandledAsync) {
653
+ const message = "Async content was used in JSX without a <Loading> boundary. " + "Wrap async content in <Loading> to show a fallback while loading.";
654
+ result();
655
+ const container = args[1];
656
+ container.textContent = "";
657
+ const msg = document.createElement("pre");
658
+ msg.style.cssText = "color:#e53e3e;background:#fff5f5;border:2px solid #e53e3e;" + "border-radius:4px;padding:16px;margin:16px;font-family:monospace;" + "white-space:pre-wrap;word-break:break-word;";
659
+ msg.textContent = message;
660
+ container.appendChild(msg);
661
+ console.error(message);
662
+ return () => {};
663
+ }
664
+ }
665
+ return result;
666
+ }
636
667
  const isServer = false;
637
668
  const isDev = true;
638
669
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
@@ -713,6 +744,10 @@ Object.defineProperty(exports, "For", {
713
744
  enumerable: true,
714
745
  get: function () { return solidJs.For; }
715
746
  });
747
+ Object.defineProperty(exports, "Hydration", {
748
+ enumerable: true,
749
+ get: function () { return solidJs.Hydration; }
750
+ });
716
751
  Object.defineProperty(exports, "Loading", {
717
752
  enumerable: true,
718
753
  get: function () { return solidJs.Loading; }
@@ -721,6 +756,10 @@ Object.defineProperty(exports, "Match", {
721
756
  enumerable: true,
722
757
  get: function () { return solidJs.Match; }
723
758
  });
759
+ Object.defineProperty(exports, "NoHydration", {
760
+ enumerable: true,
761
+ get: function () { return solidJs.NoHydration; }
762
+ });
724
763
  Object.defineProperty(exports, "Show", {
725
764
  enumerable: true,
726
765
  get: function () { return solidJs.Show; }
@@ -750,9 +789,7 @@ exports.ChildProperties = ChildProperties;
750
789
  exports.DOMElements = DOMElements;
751
790
  exports.DelegatedEvents = DelegatedEvents;
752
791
  exports.Dynamic = Dynamic;
753
- exports.Hydration = Hydration;
754
792
  exports.HydrationScript = voidFn;
755
- exports.NoHydration = NoHydration;
756
793
  exports.Portal = Portal;
757
794
  exports.Properties = Properties;
758
795
  exports.RequestContext = RequestContext;
package/dist/dev.js CHANGED
@@ -1,5 +1,6 @@
1
- import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, createRoot, flatten, omit, $DEVCOMP, enableHydration } from 'solid-js';
2
- export { Errored, For, Loading, Match, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
1
+ import { createRenderEffect, createMemo as createMemo$1, sharedConfig, untrack, runWithOwner, flatten, createRoot, omit, $DEVCOMP, enableHydration, setOnUnhandledAsync } from 'solid-js';
2
+ export { Errored, For, Hydration, Loading, Match, NoHydration, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
3
+ import { createMemo } from '@solidjs/signals';
3
4
 
4
5
  const Properties = /*#__PURE__*/new Set([
5
6
  "value", "checked", "selected", "muted"]);
@@ -21,7 +22,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
21
22
  const effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
22
23
  transparent: true
23
24
  });
24
- const memo = fn => createMemo(() => fn());
25
+ const memo = (fn, transparent) => transparent ? fn.$r ? fn : createMemo(() => fn(), undefined, {
26
+ transparent: true
27
+ }) : createMemo$1(() => fn());
25
28
 
26
29
  function reconcileArrays(parentNode, a, b) {
27
30
  let bLength = b.length,
@@ -81,7 +84,7 @@ function reconcileArrays(parentNode, a, b) {
81
84
  }
82
85
 
83
86
  const $$EVENTS = "_$DX_DELEGATE";
84
- function render(code, element, init, options = {}) {
87
+ function render$1(code, element, init, options = {}) {
85
88
  if (!element) {
86
89
  throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");
87
90
  }
@@ -241,17 +244,26 @@ function ref(fn, element) {
241
244
  function insert(parent, accessor, marker, initial) {
242
245
  const multi = marker !== undefined;
243
246
  if (multi && !initial) initial = [];
244
- if (isHydrating(parent) && Array.isArray(initial)) {
245
- let j = 0;
246
- for (let i = 0; i < initial.length; i++) {
247
- if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
247
+ if (isHydrating(parent)) {
248
+ if (!multi && initial === undefined && parent) initial = [...parent.childNodes];
249
+ if (Array.isArray(initial)) {
250
+ let j = 0;
251
+ for (let i = 0; i < initial.length; i++) {
252
+ if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
253
+ }
254
+ initial.length = j;
248
255
  }
249
- initial.length = j;
250
256
  }
251
257
  if (typeof accessor !== "function") {
252
258
  accessor = normalize(accessor, initial, multi, true);
253
259
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
254
260
  }
261
+ accessor = memo(accessor, true);
262
+ if (multi && initial.length === 0 && !isHydrating(parent)) {
263
+ const placeholder = document.createTextNode("");
264
+ parent.insertBefore(placeholder, marker);
265
+ initial = [placeholder];
266
+ }
255
267
  effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
256
268
  }
257
269
  function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
@@ -272,7 +284,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
272
284
  }
273
285
  }
274
286
  function hydrate$1(code, element, options = {}) {
275
- if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
287
+ if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
276
288
  options.renderId ||= "";
277
289
  if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
278
290
  if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
@@ -309,7 +321,7 @@ function hydrate$1(code, element, options = {}) {
309
321
  }
310
322
  try {
311
323
  gatherHydratable(element, options.renderId);
312
- return render(code, element, [...element.childNodes], options);
324
+ return render$1(code, element, [...element.childNodes], options);
313
325
  } finally {
314
326
  sharedConfig.hydrating = false;
315
327
  }
@@ -601,12 +613,6 @@ function gatherHydratable(element, root) {
601
613
  function getHydrationKey() {
602
614
  return sharedConfig.getNextContextId();
603
615
  }
604
- function NoHydration(props) {
605
- return sharedConfig.hydrating ? undefined : props.children;
606
- }
607
- function Hydration(props) {
608
- return props.children;
609
- }
610
616
  const voidFn = () => undefined;
611
617
  const RequestContext = Symbol();
612
618
 
@@ -632,6 +638,31 @@ function ssrHydrationKey() {}
632
638
  function resolveSSRNode(node) {}
633
639
  function escape(html) {}
634
640
 
641
+ function render(...args) {
642
+ let unhandledAsync = false;
643
+ {
644
+ setOnUnhandledAsync(() => {
645
+ unhandledAsync = true;
646
+ });
647
+ }
648
+ const result = render$1(...args);
649
+ {
650
+ setOnUnhandledAsync(null);
651
+ if (unhandledAsync) {
652
+ const message = "Async content was used in JSX without a <Loading> boundary. " + "Wrap async content in <Loading> to show a fallback while loading.";
653
+ result();
654
+ const container = args[1];
655
+ container.textContent = "";
656
+ const msg = document.createElement("pre");
657
+ msg.style.cssText = "color:#e53e3e;background:#fff5f5;border:2px solid #e53e3e;" + "border-radius:4px;padding:16px;margin:16px;font-family:monospace;" + "white-space:pre-wrap;word-break:break-word;";
658
+ msg.textContent = message;
659
+ container.appendChild(msg);
660
+ console.error(message);
661
+ return () => {};
662
+ }
663
+ }
664
+ return result;
665
+ }
635
666
  const isServer = false;
636
667
  const isDev = true;
637
668
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
@@ -649,7 +680,7 @@ function Portal(props) {
649
680
  startMarker = document.createTextNode(""),
650
681
  endMarker = document.createTextNode(""),
651
682
  mount = () => createElementProxy(props.mount || document.body, treeMarker);
652
- let content = createMemo(() => [startMarker, props.children]);
683
+ let content = createMemo$1(() => [startMarker, props.children]);
653
684
  createRenderEffect(() => [mount(), content()], ([m, c]) => {
654
685
  m.appendChild(endMarker);
655
686
  insert(m, c, endMarker);
@@ -682,8 +713,8 @@ function createElementProxy(el, marker) {
682
713
  });
683
714
  }
684
715
  function createDynamic(component, props) {
685
- const cached = createMemo(component);
686
- return createMemo(() => {
716
+ const cached = createMemo$1(component);
717
+ return createMemo$1(() => {
687
718
  const component = cached();
688
719
  switch (typeof component) {
689
720
  case "function":
@@ -704,4 +735,4 @@ function Dynamic(props) {
704
735
  return createDynamic(() => props.component, others);
705
736
  }
706
737
 
707
- export { voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, applyRef, assign, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
738
+ export { voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, voidFn as HydrationScript, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, applyRef, assign, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
package/dist/server.cjs CHANGED
@@ -3,6 +3,7 @@
3
3
  var solidJs = require('solid-js');
4
4
  var seroval = require('seroval');
5
5
  var web = require('seroval-plugins/web');
6
+ var signals = require('@solidjs/signals');
6
7
 
7
8
  const Properties = /*#__PURE__*/new Set([
8
9
  "value", "checked", "selected", "muted"]);
@@ -24,7 +25,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
24
25
  const effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
25
26
  transparent: true
26
27
  });
27
- const memo = fn => solidJs.createMemo(() => fn());
28
+ const memo = (fn, transparent) => transparent ? fn.$r ? fn : signals.createMemo(() => fn(), undefined, {
29
+ transparent: true
30
+ }) : solidJs.createMemo(() => fn());
28
31
 
29
32
  const ES2017FLAG = seroval.Feature.AggregateError
30
33
  | seroval.Feature.BigIntTypedArray;
@@ -56,6 +59,7 @@ function getLocalHeaderScript(id) {
56
59
 
57
60
  function resolveAssets(moduleUrl, manifest) {
58
61
  if (!manifest) return null;
62
+ const base = manifest._base || "/";
59
63
  const entry = manifest[moduleUrl];
60
64
  if (!entry) return null;
61
65
  const css = [];
@@ -66,8 +70,8 @@ function resolveAssets(moduleUrl, manifest) {
66
70
  visited.add(key);
67
71
  const e = manifest[key];
68
72
  if (!e) return;
69
- js.push(e.file);
70
- if (e.css) for (let i = 0; i < e.css.length; i++) css.push(e.css[i]);
73
+ js.push(base + e.file);
74
+ if (e.css) for (let i = 0; i < e.css.length; i++) css.push(base + e.css[i]);
71
75
  if (e.imports) for (let i = 0; i < e.imports.length; i++) walk(e.imports[i]);
72
76
  };
73
77
  walk(moduleUrl);
@@ -646,7 +650,7 @@ function mergeProps(...sources) {
646
650
  }
647
651
  function getHydrationKey() {
648
652
  const hydrate = solidJs.sharedConfig.context;
649
- return hydrate && !hydrate.noHydrate && solidJs.sharedConfig.getNextContextId();
653
+ return hydrate && solidJs.sharedConfig.getNextContextId();
650
654
  }
651
655
  function applyRef(r, element) {
652
656
  Array.isArray(r) ? r.flat(Infinity).forEach(f => f && f(element)) : r(element);
@@ -666,27 +670,6 @@ function generateHydrationScript({
666
670
  } = {}) {
667
671
  return `<script${nonce ? ` nonce="${nonce}"` : ""}>window._$HY||(e=>{let t=e=>e&&e.hasAttribute&&(e.hasAttribute("_hk")?e:t(e.host&&e.host.nodeType?e.host:e.parentNode));["${eventNames.join('", "')}"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let s=t(o.composedPath&&o.composedPath()[0]||o.target);s&&!e.completed.has(s)&&e.events.push([s,o])}))))})(_$HY={events:[],completed:new WeakSet,r:{},fe(){}});</script><!--xs-->`;
668
672
  }
669
- function Hydration(props) {
670
- if (!solidJs.sharedConfig.context.noHydrate) return props.children;
671
- const context = solidJs.sharedConfig.context;
672
- solidJs.sharedConfig.context = {
673
- ...context,
674
- noHydrate: false
675
- };
676
- const res = props.children;
677
- solidJs.sharedConfig.context = context;
678
- return res;
679
- }
680
- function NoHydration(props) {
681
- let context = solidJs.sharedConfig.context;
682
- if (context) solidJs.sharedConfig.context = {
683
- ...context,
684
- noHydrate: true
685
- };
686
- const res = props.children;
687
- if (context) solidJs.sharedConfig.context = context;
688
- return res;
689
- }
690
673
  function queue(fn) {
691
674
  return Promise.resolve().then(fn);
692
675
  }
@@ -882,6 +865,10 @@ Object.defineProperty(exports, "For", {
882
865
  enumerable: true,
883
866
  get: function () { return solidJs.For; }
884
867
  });
868
+ Object.defineProperty(exports, "Hydration", {
869
+ enumerable: true,
870
+ get: function () { return solidJs.Hydration; }
871
+ });
885
872
  Object.defineProperty(exports, "Loading", {
886
873
  enumerable: true,
887
874
  get: function () { return solidJs.Loading; }
@@ -890,6 +877,10 @@ Object.defineProperty(exports, "Match", {
890
877
  enumerable: true,
891
878
  get: function () { return solidJs.Match; }
892
879
  });
880
+ Object.defineProperty(exports, "NoHydration", {
881
+ enumerable: true,
882
+ get: function () { return solidJs.NoHydration; }
883
+ });
893
884
  Object.defineProperty(exports, "Repeat", {
894
885
  enumerable: true,
895
886
  get: function () { return solidJs.Repeat; }
@@ -922,9 +913,7 @@ exports.ChildProperties = ChildProperties;
922
913
  exports.DOMElements = DOMElements;
923
914
  exports.DelegatedEvents = DelegatedEvents;
924
915
  exports.Dynamic = Dynamic;
925
- exports.Hydration = Hydration;
926
916
  exports.HydrationScript = HydrationScript;
927
- exports.NoHydration = NoHydration;
928
917
  exports.Portal = Portal;
929
918
  exports.Properties = Properties;
930
919
  exports.RequestContext = RequestContext;
package/dist/server.js CHANGED
@@ -1,7 +1,8 @@
1
- import { createRenderEffect, createMemo, sharedConfig, createRoot, ssrHandleError, omit, getOwner, getNextChildId, createOwner, runWithOwner } from 'solid-js';
2
- export { Errored, For, Loading, Match, Repeat, Show, Switch, createComponent, getOwner, ssrRunInScope, untrack } from 'solid-js';
1
+ import { createRenderEffect, createMemo as createMemo$1, sharedConfig, createRoot, ssrHandleError, omit, getOwner, getNextChildId, createOwner, runWithOwner } from 'solid-js';
2
+ export { Errored, For, Hydration, Loading, Match, NoHydration, Repeat, Show, Switch, createComponent, getOwner, ssrRunInScope, untrack } from 'solid-js';
3
3
  import { Serializer, Feature, getCrossReferenceHeader } from 'seroval';
4
4
  import { AbortSignalPlugin, CustomEventPlugin, DOMExceptionPlugin, EventPlugin, FormDataPlugin, HeadersPlugin, ReadableStreamPlugin, RequestPlugin, ResponsePlugin, URLSearchParamsPlugin, URLPlugin } from 'seroval-plugins/web';
5
+ import { createMemo } from '@solidjs/signals';
5
6
 
6
7
  const Properties = /*#__PURE__*/new Set([
7
8
  "value", "checked", "selected", "muted"]);
@@ -23,7 +24,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
23
24
  const effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
24
25
  transparent: true
25
26
  });
26
- const memo = fn => createMemo(() => fn());
27
+ const memo = (fn, transparent) => transparent ? fn.$r ? fn : createMemo(() => fn(), undefined, {
28
+ transparent: true
29
+ }) : createMemo$1(() => fn());
27
30
 
28
31
  const ES2017FLAG = Feature.AggregateError
29
32
  | Feature.BigIntTypedArray;
@@ -55,6 +58,7 @@ function getLocalHeaderScript(id) {
55
58
 
56
59
  function resolveAssets(moduleUrl, manifest) {
57
60
  if (!manifest) return null;
61
+ const base = manifest._base || "/";
58
62
  const entry = manifest[moduleUrl];
59
63
  if (!entry) return null;
60
64
  const css = [];
@@ -65,8 +69,8 @@ function resolveAssets(moduleUrl, manifest) {
65
69
  visited.add(key);
66
70
  const e = manifest[key];
67
71
  if (!e) return;
68
- js.push(e.file);
69
- if (e.css) for (let i = 0; i < e.css.length; i++) css.push(e.css[i]);
72
+ js.push(base + e.file);
73
+ if (e.css) for (let i = 0; i < e.css.length; i++) css.push(base + e.css[i]);
70
74
  if (e.imports) for (let i = 0; i < e.imports.length; i++) walk(e.imports[i]);
71
75
  };
72
76
  walk(moduleUrl);
@@ -645,7 +649,7 @@ function mergeProps(...sources) {
645
649
  }
646
650
  function getHydrationKey() {
647
651
  const hydrate = sharedConfig.context;
648
- return hydrate && !hydrate.noHydrate && sharedConfig.getNextContextId();
652
+ return hydrate && sharedConfig.getNextContextId();
649
653
  }
650
654
  function applyRef(r, element) {
651
655
  Array.isArray(r) ? r.flat(Infinity).forEach(f => f && f(element)) : r(element);
@@ -665,27 +669,6 @@ function generateHydrationScript({
665
669
  } = {}) {
666
670
  return `<script${nonce ? ` nonce="${nonce}"` : ""}>window._$HY||(e=>{let t=e=>e&&e.hasAttribute&&(e.hasAttribute("_hk")?e:t(e.host&&e.host.nodeType?e.host:e.parentNode));["${eventNames.join('", "')}"].forEach((o=>document.addEventListener(o,(o=>{if(!e.events)return;let s=t(o.composedPath&&o.composedPath()[0]||o.target);s&&!e.completed.has(s)&&e.events.push([s,o])}))))})(_$HY={events:[],completed:new WeakSet,r:{},fe(){}});</script><!--xs-->`;
667
671
  }
668
- function Hydration(props) {
669
- if (!sharedConfig.context.noHydrate) return props.children;
670
- const context = sharedConfig.context;
671
- sharedConfig.context = {
672
- ...context,
673
- noHydrate: false
674
- };
675
- const res = props.children;
676
- sharedConfig.context = context;
677
- return res;
678
- }
679
- function NoHydration(props) {
680
- let context = sharedConfig.context;
681
- if (context) sharedConfig.context = {
682
- ...context,
683
- noHydrate: true
684
- };
685
- const res = props.children;
686
- if (context) sharedConfig.context = context;
687
- return res;
688
- }
689
672
  function queue(fn) {
690
673
  return Promise.resolve().then(fn);
691
674
  }
@@ -873,4 +856,4 @@ function Portal(props) {
873
856
  throw new Error("Portal is not supported on the server");
874
857
  }
875
858
 
876
- export { ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, notSup as addEventListener, applyRef, notSup as assign, notSup as className, createDynamic, notSup as delegateEvents, notSup as dynamicProperty, effect, escape, generateHydrationScript, getAssets, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, mergeProps, notSup as render, renderToStream, renderToString, renderToStringAsync, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setProperty, notSup as spread, ssr, ssrAttribute, ssrClassName, ssrElement, ssrHydrationKey, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, useAssets };
859
+ export { ChildProperties, DOMElements, DelegatedEvents, Dynamic, HydrationScript, Portal, Properties, RequestContext, SVGElements, SVGNamespace, notSup as addEventListener, applyRef, notSup as assign, notSup as className, createDynamic, notSup as delegateEvents, notSup as dynamicProperty, effect, escape, generateHydrationScript, getAssets, getHydrationKey, notSup as getNextElement, notSup as getNextMarker, notSup as getNextMatch, getRequestEvent, notSup as hydrate, notSup as insert, isDev, isServer, memo, mergeProps, notSup as render, renderToStream, renderToString, renderToStringAsync, notSup as runHydrationEvents, notSup as setAttribute, notSup as setAttributeNS, notSup as setProperty, notSup as spread, ssr, ssrAttribute, ssrClassName, ssrElement, ssrHydrationKey, ssrStyle, ssrStyleProperty, notSup as style, notSup as template, useAssets };
package/dist/web.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var solidJs = require('solid-js');
4
+ var signals = require('@solidjs/signals');
4
5
 
5
6
  const Properties = /*#__PURE__*/new Set([
6
7
  "value", "checked", "selected", "muted"]);
@@ -22,7 +23,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
22
23
  const effect = (fn, effectFn, initial) => solidJs.createRenderEffect(fn, effectFn, initial, {
23
24
  transparent: true
24
25
  });
25
- const memo = fn => solidJs.createMemo(() => fn());
26
+ const memo = (fn, transparent) => transparent ? fn.$r ? fn : signals.createMemo(() => fn(), undefined, {
27
+ transparent: true
28
+ }) : solidJs.createMemo(() => fn());
26
29
 
27
30
  function reconcileArrays(parentNode, a, b) {
28
31
  let bLength = b.length,
@@ -82,7 +85,7 @@ function reconcileArrays(parentNode, a, b) {
82
85
  }
83
86
 
84
87
  const $$EVENTS = "_$DX_DELEGATE";
85
- function render(code, element, init, options = {}) {
88
+ function render$1(code, element, init, options = {}) {
86
89
  let disposer;
87
90
  solidJs.createRoot(dispose => {
88
91
  disposer = dispose;
@@ -237,17 +240,26 @@ function ref(fn, element) {
237
240
  function insert(parent, accessor, marker, initial) {
238
241
  const multi = marker !== undefined;
239
242
  if (multi && !initial) initial = [];
240
- if (isHydrating(parent) && Array.isArray(initial)) {
241
- let j = 0;
242
- for (let i = 0; i < initial.length; i++) {
243
- if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
243
+ if (isHydrating(parent)) {
244
+ if (!multi && initial === undefined && parent) initial = [...parent.childNodes];
245
+ if (Array.isArray(initial)) {
246
+ let j = 0;
247
+ for (let i = 0; i < initial.length; i++) {
248
+ if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
249
+ }
250
+ initial.length = j;
244
251
  }
245
- initial.length = j;
246
252
  }
247
253
  if (typeof accessor !== "function") {
248
254
  accessor = normalize(accessor, initial, multi, true);
249
255
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
250
256
  }
257
+ accessor = memo(accessor, true);
258
+ if (multi && initial.length === 0 && !isHydrating(parent)) {
259
+ const placeholder = document.createTextNode("");
260
+ parent.insertBefore(placeholder, marker);
261
+ initial = [placeholder];
262
+ }
251
263
  effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
252
264
  }
253
265
  function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
@@ -268,7 +280,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
268
280
  }
269
281
  }
270
282
  function hydrate$1(code, element, options = {}) {
271
- if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
283
+ if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
272
284
  options.renderId ||= "";
273
285
  if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
274
286
  if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
@@ -297,7 +309,7 @@ function hydrate$1(code, element, options = {}) {
297
309
  solidJs.sharedConfig.hydrating = true;
298
310
  try {
299
311
  gatherHydratable(element, options.renderId);
300
- return render(code, element, [...element.childNodes], options);
312
+ return render$1(code, element, [...element.childNodes], options);
301
313
  } finally {
302
314
  solidJs.sharedConfig.hydrating = false;
303
315
  }
@@ -548,12 +560,6 @@ function gatherHydratable(element, root) {
548
560
  function getHydrationKey() {
549
561
  return solidJs.sharedConfig.getNextContextId();
550
562
  }
551
- function NoHydration(props) {
552
- return solidJs.sharedConfig.hydrating ? undefined : props.children;
553
- }
554
- function Hydration(props) {
555
- return props.children;
556
- }
557
563
  const voidFn = () => undefined;
558
564
  const RequestContext = Symbol();
559
565
 
@@ -579,6 +585,10 @@ function ssrHydrationKey() {}
579
585
  function resolveSSRNode(node) {}
580
586
  function escape(html) {}
581
587
 
588
+ function render(...args) {
589
+ const result = render$1(...args);
590
+ return result;
591
+ }
582
592
  const isServer = false;
583
593
  const isDev = false;
584
594
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
@@ -656,6 +666,10 @@ Object.defineProperty(exports, "For", {
656
666
  enumerable: true,
657
667
  get: function () { return solidJs.For; }
658
668
  });
669
+ Object.defineProperty(exports, "Hydration", {
670
+ enumerable: true,
671
+ get: function () { return solidJs.Hydration; }
672
+ });
659
673
  Object.defineProperty(exports, "Loading", {
660
674
  enumerable: true,
661
675
  get: function () { return solidJs.Loading; }
@@ -664,6 +678,10 @@ Object.defineProperty(exports, "Match", {
664
678
  enumerable: true,
665
679
  get: function () { return solidJs.Match; }
666
680
  });
681
+ Object.defineProperty(exports, "NoHydration", {
682
+ enumerable: true,
683
+ get: function () { return solidJs.NoHydration; }
684
+ });
667
685
  Object.defineProperty(exports, "Show", {
668
686
  enumerable: true,
669
687
  get: function () { return solidJs.Show; }
@@ -693,9 +711,7 @@ exports.ChildProperties = ChildProperties;
693
711
  exports.DOMElements = DOMElements;
694
712
  exports.DelegatedEvents = DelegatedEvents;
695
713
  exports.Dynamic = Dynamic;
696
- exports.Hydration = Hydration;
697
714
  exports.HydrationScript = voidFn;
698
- exports.NoHydration = NoHydration;
699
715
  exports.Portal = Portal;
700
716
  exports.Properties = Properties;
701
717
  exports.RequestContext = RequestContext;
package/dist/web.js CHANGED
@@ -1,5 +1,6 @@
1
- import { createRenderEffect, createMemo, sharedConfig, untrack, runWithOwner, createRoot, flatten, omit, enableHydration } from 'solid-js';
2
- export { Errored, For, Loading, Match, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
1
+ import { createRenderEffect, createMemo as createMemo$1, sharedConfig, untrack, runWithOwner, flatten, createRoot, omit, enableHydration } from 'solid-js';
2
+ export { Errored, For, Hydration, Loading, Match, NoHydration, Show, Switch, createComponent, getOwner, merge as mergeProps, untrack } from 'solid-js';
3
+ import { createMemo } from '@solidjs/signals';
3
4
 
4
5
  const Properties = /*#__PURE__*/new Set([
5
6
  "value", "checked", "selected", "muted"]);
@@ -21,7 +22,9 @@ const DOMElements = /*#__PURE__*/new Set(["html", "base", "head", "link", "meta"
21
22
  const effect = (fn, effectFn, initial) => createRenderEffect(fn, effectFn, initial, {
22
23
  transparent: true
23
24
  });
24
- const memo = fn => createMemo(() => fn());
25
+ const memo = (fn, transparent) => transparent ? fn.$r ? fn : createMemo(() => fn(), undefined, {
26
+ transparent: true
27
+ }) : createMemo$1(() => fn());
25
28
 
26
29
  function reconcileArrays(parentNode, a, b) {
27
30
  let bLength = b.length,
@@ -81,7 +84,7 @@ function reconcileArrays(parentNode, a, b) {
81
84
  }
82
85
 
83
86
  const $$EVENTS = "_$DX_DELEGATE";
84
- function render(code, element, init, options = {}) {
87
+ function render$1(code, element, init, options = {}) {
85
88
  let disposer;
86
89
  createRoot(dispose => {
87
90
  disposer = dispose;
@@ -236,17 +239,26 @@ function ref(fn, element) {
236
239
  function insert(parent, accessor, marker, initial) {
237
240
  const multi = marker !== undefined;
238
241
  if (multi && !initial) initial = [];
239
- if (isHydrating(parent) && Array.isArray(initial)) {
240
- let j = 0;
241
- for (let i = 0; i < initial.length; i++) {
242
- if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
242
+ if (isHydrating(parent)) {
243
+ if (!multi && initial === undefined && parent) initial = [...parent.childNodes];
244
+ if (Array.isArray(initial)) {
245
+ let j = 0;
246
+ for (let i = 0; i < initial.length; i++) {
247
+ if (initial[i].nodeType === 8 && initial[i].nodeValue === "!$") initial[i].remove();else initial[j++] = initial[i];
248
+ }
249
+ initial.length = j;
243
250
  }
244
- initial.length = j;
245
251
  }
246
252
  if (typeof accessor !== "function") {
247
253
  accessor = normalize(accessor, initial, multi, true);
248
254
  if (typeof accessor !== "function") return insertExpression(parent, accessor, initial, marker);
249
255
  }
256
+ accessor = memo(accessor, true);
257
+ if (multi && initial.length === 0 && !isHydrating(parent)) {
258
+ const placeholder = document.createTextNode("");
259
+ parent.insertBefore(placeholder, marker);
260
+ initial = [placeholder];
261
+ }
250
262
  effect(prev => normalize(accessor, prev, multi), (value, current) => insertExpression(parent, value, current, marker), initial);
251
263
  }
252
264
  function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = false) {
@@ -267,7 +279,7 @@ function assign(node, props, isSVG, skipChildren, prevProps = {}, skipRef = fals
267
279
  }
268
280
  }
269
281
  function hydrate$1(code, element, options = {}) {
270
- if (globalThis._$HY.done) return render(code, element, [...element.childNodes], options);
282
+ if (globalThis._$HY.done) return render$1(code, element, [...element.childNodes], options);
271
283
  options.renderId ||= "";
272
284
  if (!globalThis._$HY.modules) globalThis._$HY.modules = {};
273
285
  if (!globalThis._$HY.loading) globalThis._$HY.loading = {};
@@ -296,7 +308,7 @@ function hydrate$1(code, element, options = {}) {
296
308
  sharedConfig.hydrating = true;
297
309
  try {
298
310
  gatherHydratable(element, options.renderId);
299
- return render(code, element, [...element.childNodes], options);
311
+ return render$1(code, element, [...element.childNodes], options);
300
312
  } finally {
301
313
  sharedConfig.hydrating = false;
302
314
  }
@@ -547,12 +559,6 @@ function gatherHydratable(element, root) {
547
559
  function getHydrationKey() {
548
560
  return sharedConfig.getNextContextId();
549
561
  }
550
- function NoHydration(props) {
551
- return sharedConfig.hydrating ? undefined : props.children;
552
- }
553
- function Hydration(props) {
554
- return props.children;
555
- }
556
562
  const voidFn = () => undefined;
557
563
  const RequestContext = Symbol();
558
564
 
@@ -578,6 +584,10 @@ function ssrHydrationKey() {}
578
584
  function resolveSSRNode(node) {}
579
585
  function escape(html) {}
580
586
 
587
+ function render(...args) {
588
+ const result = render$1(...args);
589
+ return result;
590
+ }
581
591
  const isServer = false;
582
592
  const isDev = false;
583
593
  const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
@@ -595,7 +605,7 @@ function Portal(props) {
595
605
  startMarker = document.createTextNode(""),
596
606
  endMarker = document.createTextNode(""),
597
607
  mount = () => createElementProxy(props.mount || document.body, treeMarker);
598
- let content = createMemo(() => [startMarker, props.children]);
608
+ let content = createMemo$1(() => [startMarker, props.children]);
599
609
  createRenderEffect(() => [mount(), content()], ([m, c]) => {
600
610
  m.appendChild(endMarker);
601
611
  insert(m, c, endMarker);
@@ -628,8 +638,8 @@ function createElementProxy(el, marker) {
628
638
  });
629
639
  }
630
640
  function createDynamic(component, props) {
631
- const cached = createMemo(component);
632
- return createMemo(() => {
641
+ const cached = createMemo$1(component);
642
+ return createMemo$1(() => {
633
643
  const component = cached();
634
644
  switch (typeof component) {
635
645
  case "function":
@@ -647,4 +657,4 @@ function Dynamic(props) {
647
657
  return createDynamic(() => props.component, others);
648
658
  }
649
659
 
650
- export { voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Hydration, voidFn as HydrationScript, NoHydration, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, applyRef, assign, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
660
+ export { voidFn as Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, voidFn as HydrationScript, Portal, Properties, RequestContext, SVGElements, SVGNamespace, addEventListener, applyRef, assign, className, clearDelegatedEvents, createDynamic, delegateEvents, dynamicProperty, effect, escape, voidFn as generateHydrationScript, voidFn as getAssets, getFirstChild, getHydrationKey, getNextElement, getNextMarker, getNextMatch, getNextSibling, voidFn as getRequestEvent, hydrate, insert, isDev, isServer, memo, ref, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, setProperty, setStyleProperty, spread, ssr, ssrAttribute, ssrClassList, ssrElement, ssrHydrationKey, ssrStyle, style, template, voidFn as useAssets };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@solidjs/web",
3
3
  "description": "Solid's web runtime for the browser and the server",
4
- "version": "2.0.0-beta.0",
4
+ "version": "2.0.0-beta.2",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -75,10 +75,11 @@
75
75
  "seroval-plugins": "^1.1.0"
76
76
  },
77
77
  "peerDependencies": {
78
- "solid-js": "^2.0.0-beta.0"
78
+ "solid-js": "^2.0.0-beta.2",
79
+ "@solidjs/signals": "^0.12.0"
79
80
  },
80
81
  "devDependencies": {
81
- "solid-js": "2.0.0-beta.0"
82
+ "solid-js": "2.0.0-beta.2"
82
83
  },
83
84
  "scripts": {
84
85
  "build": "npm-run-all -nl build:*",
@@ -1,7 +1,8 @@
1
- import { hydrate as hydrateCore } from "./client.js";
1
+ import { hydrate as hydrateCore, render as renderCore } from "./client.js";
2
2
  import { JSX, ComponentProps, ValidComponent } from "solid-js";
3
3
  export * from "./client.js";
4
- export { For, Show, Switch, Match, Errored, Loading, merge as mergeProps } from "solid-js";
4
+ export declare function render(...args: Parameters<typeof renderCore>): ReturnType<typeof renderCore>;
5
+ export { For, Show, Switch, Match, Errored, Loading, NoHydration, Hydration, merge as mergeProps } from "solid-js";
5
6
  export * from "./server-mock.js";
6
7
  export declare const isServer: boolean;
7
8
  export declare const isDev: boolean;
package/types/client.d.ts CHANGED
@@ -79,8 +79,6 @@ export function getAssets(): string;
79
79
  export function HydrationScript(props?: { nonce?: string; eventNames?: string[] }): JSX.Element;
80
80
  export function generateHydrationScript(options?: { nonce?: string; eventNames?: string[] }): string;
81
81
  export function Assets(props: { children?: JSX.Element }): JSX.Element;
82
- export function Hydration(props: { children?: JSX.Element }): JSX.Element;
83
- export function NoHydration(props: { children?: JSX.Element }): JSX.Element;
84
82
  export interface RequestEvent {
85
83
  request: Request;
86
84
  locals: Record<string | number | symbol, any>;
package/types/core.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { getOwner, runWithOwner, createComponent, createRoot as root, sharedConfig, untrack, merge as mergeProps, flatten, ssrHandleError, ssrRunInScope } from "solid-js";
2
2
  export declare const effect: (fn: any, effectFn: any, initial: any) => void;
3
- export declare const memo: (fn: any) => import("solid-js").Accessor<any>;
3
+ export declare const memo: (fn: any, transparent: any) => any;
package/types/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { hydrate as hydrateCore } from "./client.js";
1
+ import { hydrate as hydrateCore, render as renderCore } from "./client.js";
2
2
  import { JSX, ComponentProps, ValidComponent } from "solid-js";
3
3
  export * from "./client.js";
4
- export { For, Show, Switch, Match, Errored, Loading, merge as mergeProps } from "solid-js";
4
+ export declare function render(...args: Parameters<typeof renderCore>): ReturnType<typeof renderCore>;
5
+ export { For, Show, Switch, Match, Errored, Loading, NoHydration, Hydration, merge as mergeProps } from "solid-js";
5
6
  export * from "./server-mock.js";
6
7
  export declare const isServer: boolean;
7
8
  export declare const isDev: boolean;
package/types/server.d.ts CHANGED
@@ -15,6 +15,7 @@ export function renderToString<T>(
15
15
  renderId?: string;
16
16
  noScripts?: boolean;
17
17
  plugins?: any[];
18
+ manifest?: Record<string, { file: string; css?: string[]; isEntry?: boolean; imports?: string[] }> & { _base?: string };
18
19
  onError?: (err: any) => void;
19
20
  }
20
21
  ): string;
@@ -27,6 +28,7 @@ export function renderToStringAsync<T>(
27
28
  renderId?: string;
28
29
  noScripts?: boolean;
29
30
  plugins?: any[];
31
+ manifest?: Record<string, { file: string; css?: string[]; isEntry?: boolean; imports?: string[] }> & { _base?: string };
30
32
  onError?: (err: any) => void;
31
33
  }
32
34
  ): Promise<string>;
@@ -37,6 +39,7 @@ export function renderToStream<T>(
37
39
  renderId?: string;
38
40
  noScripts?: boolean;
39
41
  plugins?: any[];
42
+ manifest?: Record<string, { file: string; css?: string[]; isEntry?: boolean; imports?: string[] }> & { _base?: string };
40
43
  onCompleteShell?: (info: { write: (v: string) => void }) => void;
41
44
  onCompleteAll?: (info: { write: (v: string) => void }) => void;
42
45
  onError?: (err: any) => void;
@@ -80,8 +83,6 @@ export interface RequestEvent {
80
83
  }
81
84
  export function getRequestEvent(): RequestEvent | undefined;
82
85
 
83
- export function Hydration(props: { children?: JSX.Element }): JSX.Element;
84
- export function NoHydration(props: { children?: JSX.Element }): JSX.Element;
85
86
  export function Assets(props: { children?: JSX.Element }): JSX.Element;
86
87
  export function untrack<T>(fn: () => T): T;
87
88