@shadow-js/web 1.0.0 → 1.0.1

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 (198) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/dev/attributes.d.ts +0 -2
  3. package/dist/dev/attributes.js +1 -2
  4. package/dist/dev/autofocus.d.ts +0 -2
  5. package/dist/dev/autofocus.js +1 -2
  6. package/dist/dev/class-style.d.ts +0 -2
  7. package/dist/dev/class-style.js +1 -2
  8. package/dist/dev/component.d.ts +0 -2
  9. package/dist/dev/component.js +1 -2
  10. package/dist/dev/control-flow/activity.d.ts +0 -2
  11. package/dist/dev/control-flow/activity.js +1 -2
  12. package/dist/dev/control-flow/branch.js +0 -1
  13. package/dist/dev/control-flow/client-only.d.ts +0 -2
  14. package/dist/dev/control-flow/client-only.js +1 -2
  15. package/dist/dev/control-flow/dynamic.d.ts +0 -2
  16. package/dist/dev/control-flow/dynamic.js +1 -2
  17. package/dist/dev/control-flow/error-boundary.d.ts +0 -2
  18. package/dist/dev/control-flow/error-boundary.js +1 -2
  19. package/dist/dev/control-flow/for.d.ts +0 -2
  20. package/dist/dev/control-flow/for.js +1 -2
  21. package/dist/dev/control-flow/fragment.d.ts +0 -2
  22. package/dist/dev/control-flow/fragment.js +1 -2
  23. package/dist/dev/control-flow/hot-link.js +1 -2
  24. package/dist/dev/control-flow/index-list.d.ts +0 -2
  25. package/dist/dev/control-flow/index-list.js +1 -2
  26. package/dist/dev/control-flow/lazy.d.ts +0 -2
  27. package/dist/dev/control-flow/lazy.js +1 -2
  28. package/dist/dev/control-flow/no-hydration.d.ts +0 -2
  29. package/dist/dev/control-flow/no-hydration.js +1 -2
  30. package/dist/dev/control-flow/portal.d.ts +0 -2
  31. package/dist/dev/control-flow/portal.js +1 -2
  32. package/dist/dev/control-flow/root-errors.d.ts +0 -2
  33. package/dist/dev/control-flow/root-errors.js +1 -2
  34. package/dist/dev/control-flow/show.d.ts +0 -2
  35. package/dist/dev/control-flow/show.js +1 -2
  36. package/dist/dev/control-flow/suspense-list.d.ts +0 -2
  37. package/dist/dev/control-flow/suspense-list.js +1 -2
  38. package/dist/dev/control-flow/suspense.d.ts +0 -2
  39. package/dist/dev/control-flow/suspense.js +1 -2
  40. package/dist/dev/control-flow/switch.d.ts +0 -2
  41. package/dist/dev/control-flow/switch.js +1 -2
  42. package/dist/dev/derived.d.ts +0 -2
  43. package/dist/dev/derived.js +1 -2
  44. package/dist/dev/element.d.ts +0 -2
  45. package/dist/dev/element.js +1 -2
  46. package/dist/dev/events.d.ts +0 -2
  47. package/dist/dev/events.js +1 -2
  48. package/dist/dev/head/components.d.ts +0 -2
  49. package/dist/dev/head/components.js +1 -2
  50. package/dist/dev/head/registry.js +1 -2
  51. package/dist/dev/head/server-head.d.ts +0 -2
  52. package/dist/dev/head/server-head.js +1 -2
  53. package/dist/dev/head/sink.js +1 -2
  54. package/dist/dev/head/use-head.d.ts +0 -2
  55. package/dist/dev/head/use-head.js +1 -2
  56. package/dist/dev/head/validate.d.ts +0 -2
  57. package/dist/dev/head/validate.js +1 -2
  58. package/dist/dev/hmr.d.ts +0 -2
  59. package/dist/dev/hmr.js +1 -2
  60. package/dist/dev/hydration.d.ts +0 -2
  61. package/dist/dev/hydration.js +1 -2
  62. package/dist/dev/insert.d.ts +0 -2
  63. package/dist/dev/insert.js +1 -2
  64. package/dist/dev/internal/claim.d.ts +0 -2
  65. package/dist/dev/internal/claim.js +1 -2
  66. package/dist/dev/internal/css-units.js +1 -2
  67. package/dist/dev/internal/diagnostics.d.ts +0 -2
  68. package/dist/dev/internal/diagnostics.js +1 -2
  69. package/dist/dev/internal/early-events.js +1 -2
  70. package/dist/dev/internal/hydration-hooks.d.ts +0 -2
  71. package/dist/dev/internal/hydration-hooks.js +0 -1
  72. package/dist/dev/internal/hydration-scope.d.ts +0 -2
  73. package/dist/dev/internal/hydration-scope.js +1 -2
  74. package/dist/dev/internal/names.d.ts +0 -2
  75. package/dist/dev/internal/names.js +1 -2
  76. package/dist/dev/internal/portal-context.d.ts +0 -2
  77. package/dist/dev/internal/portal-context.js +1 -2
  78. package/dist/dev/internal/react-names.js +1 -2
  79. package/dist/dev/internal/reconcile.d.ts +0 -2
  80. package/dist/dev/internal/reconcile.js +1 -2
  81. package/dist/dev/internal/stream-context.d.ts +0 -2
  82. package/dist/dev/internal/stream-context.js +1 -2
  83. package/dist/dev/jsx/aria.d.ts +0 -2
  84. package/dist/dev/jsx/component.d.ts +0 -2
  85. package/dist/dev/jsx/events.d.ts +0 -2
  86. package/dist/dev/jsx/global.d.ts +0 -2
  87. package/dist/dev/jsx/html.d.ts +0 -2
  88. package/dist/dev/jsx/intrinsic.d.ts +0 -2
  89. package/dist/dev/jsx/mathml.d.ts +0 -2
  90. package/dist/dev/jsx/svg.d.ts +0 -2
  91. package/dist/dev/jsx/types.d.ts +0 -2
  92. package/dist/dev/jsx-runtime.d.ts +0 -2
  93. package/dist/dev/reactive.d.ts +0 -2
  94. package/dist/dev/reactive.js +1 -2
  95. package/dist/dev/render.d.ts +0 -2
  96. package/dist/dev/render.js +1 -2
  97. package/dist/dev/resource-hints.d.ts +0 -2
  98. package/dist/dev/resource-hints.js +1 -2
  99. package/dist/dev/select-value.d.ts +0 -2
  100. package/dist/dev/select-value.js +1 -2
  101. package/dist/dev/server/attributes.d.ts +0 -2
  102. package/dist/dev/server/attributes.js +1 -2
  103. package/dist/dev/server/class-style.d.ts +0 -2
  104. package/dist/dev/server/class-style.js +1 -2
  105. package/dist/dev/server/component.d.ts +0 -2
  106. package/dist/dev/server/component.js +1 -2
  107. package/dist/dev/server/derived.d.ts +0 -2
  108. package/dist/dev/server/derived.js +1 -2
  109. package/dist/dev/server/element.d.ts +0 -2
  110. package/dist/dev/server/element.js +1 -2
  111. package/dist/dev/server/errors.js +1 -2
  112. package/dist/dev/server/escape.d.ts +0 -2
  113. package/dist/dev/server/escape.js +1 -2
  114. package/dist/dev/server/form-controls.d.ts +0 -2
  115. package/dist/dev/server/form-controls.js +1 -2
  116. package/dist/dev/server/hydration-script.d.ts +0 -2
  117. package/dist/dev/server/hydration-script.js +1 -2
  118. package/dist/dev/server/node.d.ts +0 -2
  119. package/dist/dev/server/node.js +1 -2
  120. package/dist/dev/server/portals.d.ts +0 -2
  121. package/dist/dev/server/portals.js +0 -1
  122. package/dist/dev/server/render.d.ts +0 -2
  123. package/dist/dev/server/render.js +1 -2
  124. package/dist/dev/server/serialize.d.ts +0 -2
  125. package/dist/dev/server/serialize.js +1 -2
  126. package/dist/dev/server/stream.d.ts +0 -2
  127. package/dist/dev/server/stream.js +1 -2
  128. package/dist/dev/spread.d.ts +0 -2
  129. package/dist/dev/spread.js +1 -2
  130. package/dist/dev/template.d.ts +0 -2
  131. package/dist/dev/template.js +1 -2
  132. package/dist/dev/view-transition.d.ts +0 -2
  133. package/dist/dev/view-transition.js +1 -2
  134. package/dist/server-dev/attributes.js +1 -2
  135. package/dist/server-dev/autofocus.js +1 -2
  136. package/dist/server-dev/class-style.js +1 -2
  137. package/dist/server-dev/component.js +1 -2
  138. package/dist/server-dev/control-flow/activity.js +1 -2
  139. package/dist/server-dev/control-flow/branch.js +0 -1
  140. package/dist/server-dev/control-flow/client-only.js +1 -2
  141. package/dist/server-dev/control-flow/dynamic.js +1 -2
  142. package/dist/server-dev/control-flow/error-boundary.js +1 -2
  143. package/dist/server-dev/control-flow/for.js +1 -2
  144. package/dist/server-dev/control-flow/fragment.js +1 -2
  145. package/dist/server-dev/control-flow/hot-link.js +1 -2
  146. package/dist/server-dev/control-flow/index-list.js +1 -2
  147. package/dist/server-dev/control-flow/lazy.js +1 -2
  148. package/dist/server-dev/control-flow/no-hydration.js +1 -2
  149. package/dist/server-dev/control-flow/portal.js +1 -2
  150. package/dist/server-dev/control-flow/root-errors.js +1 -2
  151. package/dist/server-dev/control-flow/show.js +1 -2
  152. package/dist/server-dev/control-flow/suspense-list.js +1 -2
  153. package/dist/server-dev/control-flow/suspense.js +1 -2
  154. package/dist/server-dev/control-flow/switch.js +1 -2
  155. package/dist/server-dev/derived.js +1 -2
  156. package/dist/server-dev/element.js +1 -2
  157. package/dist/server-dev/events.js +1 -2
  158. package/dist/server-dev/head/components.js +1 -2
  159. package/dist/server-dev/head/registry.js +1 -2
  160. package/dist/server-dev/head/server-head.js +1 -2
  161. package/dist/server-dev/head/sink.js +1 -2
  162. package/dist/server-dev/head/use-head.js +1 -2
  163. package/dist/server-dev/head/validate.js +1 -2
  164. package/dist/server-dev/hydration.js +1 -2
  165. package/dist/server-dev/insert.js +1 -2
  166. package/dist/server-dev/internal/claim.js +1 -2
  167. package/dist/server-dev/internal/css-units.js +1 -2
  168. package/dist/server-dev/internal/diagnostics.js +1 -2
  169. package/dist/server-dev/internal/early-events.js +1 -2
  170. package/dist/server-dev/internal/hydration-hooks.js +0 -1
  171. package/dist/server-dev/internal/hydration-scope.js +1 -2
  172. package/dist/server-dev/internal/names.js +1 -2
  173. package/dist/server-dev/internal/portal-context.js +1 -2
  174. package/dist/server-dev/internal/react-names.js +1 -2
  175. package/dist/server-dev/internal/reconcile.js +1 -2
  176. package/dist/server-dev/internal/stream-context.js +1 -2
  177. package/dist/server-dev/reactive.js +1 -2
  178. package/dist/server-dev/render.js +1 -2
  179. package/dist/server-dev/resource-hints.js +1 -2
  180. package/dist/server-dev/select-value.js +1 -2
  181. package/dist/server-dev/server/attributes.js +1 -2
  182. package/dist/server-dev/server/class-style.js +1 -2
  183. package/dist/server-dev/server/component.js +1 -2
  184. package/dist/server-dev/server/derived.js +1 -2
  185. package/dist/server-dev/server/element.js +1 -2
  186. package/dist/server-dev/server/errors.js +1 -2
  187. package/dist/server-dev/server/escape.js +1 -2
  188. package/dist/server-dev/server/form-controls.js +1 -2
  189. package/dist/server-dev/server/hydration-script.js +1 -2
  190. package/dist/server-dev/server/node.js +1 -2
  191. package/dist/server-dev/server/portals.js +0 -1
  192. package/dist/server-dev/server/render.js +1 -2
  193. package/dist/server-dev/server/serialize.js +1 -2
  194. package/dist/server-dev/server/stream.js +1 -2
  195. package/dist/server-dev/spread.js +1 -2
  196. package/dist/server-dev/template.js +1 -2
  197. package/dist/server-dev/view-transition.js +1 -2
  198. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { onMount } from "@shadow-js/core";
2
2
  import { isHydrating } from "@shadow-js/core/extend";
3
- //#region src/autofocus.ts
3
+ // src/autofocus.ts
4
4
  /**
5
5
  * Focuses an element written with `autoFocus` (React parity) once it is inserted into the document
6
6
  * by a client render or update. The compiler calls this for an `autoFocus` attribute and for
@@ -39,7 +39,6 @@ function autoFocus(el, enabled) {
39
39
  if (el.isConnected && free && (el instanceof HTMLElement || el instanceof SVGElement)) el.focus();
40
40
  });
41
41
  }
42
- //#endregion
43
42
  export { autoFocus };
44
43
 
45
44
  //# sourceMappingURL=autofocus.js.map
@@ -1,6 +1,6 @@
1
1
  import { cssValueText } from "./internal/css-units.js";
2
2
  import { HTML_NS } from "./internal/names.js";
3
- //#region src/class-style.ts
3
+ // src/class-style.ts
4
4
  /** Appends the truthy class names of `value` (strings, numbers, nested arrays, objects) to `parts`. */
5
5
  function collectClasses(root, parts) {
6
6
  const frames = [[root]];
@@ -191,7 +191,6 @@ function style(el, value, prev) {
191
191
  }
192
192
  return next;
193
193
  }
194
- //#endregion
195
194
  export { applyClass, classList, className, setStyleProperty, style, toCssProperty };
196
195
 
197
196
  //# sourceMappingURL=class-style.js.map
@@ -1,6 +1,6 @@
1
1
  import { currentScope, enterComponent } from "./internal/hydration-scope.js";
2
2
  import { DEVTOOLS_EVENT, addCleanup, createOwner, devtoolsReport, runInScope } from "@shadow-js/core/extend";
3
- //#region src/component.ts
3
+ // src/component.ts
4
4
  /** Dev-only: the name each component was created with, for devtools. Weak, so components are not kept alive. */
5
5
  const componentNames = /* @__PURE__ */ new WeakMap();
6
6
  /**
@@ -36,7 +36,6 @@ function createComponent(component, props, name) {
36
36
  return result;
37
37
  });
38
38
  }
39
- //#endregion
40
39
  export { createComponent };
41
40
 
42
41
  //# sourceMappingURL=component.js.map
@@ -1,6 +1,6 @@
1
1
  import "@shadow-js/core";
2
2
  import "@shadow-js/core/extend";
3
- //#region src/control-flow/activity.ts
3
+ // src/control-flow/activity.ts
4
4
  /**
5
5
  * Keeps its children alive while hidden: `mode="hidden"` removes them from sight but keeps their state,
6
6
  * their DOM nodes and their focus and scroll position. Hidden content is paused: its effects run their
@@ -35,7 +35,6 @@ import "@shadow-js/core/extend";
35
35
  function Activity(props) {
36
36
  return () => props.children;
37
37
  }
38
- //#endregion
39
38
  export { Activity };
40
39
 
41
40
  //# sourceMappingURL=activity.js.map
@@ -98,7 +98,6 @@ function createBranches(name, select, fallback) {
98
98
  return result;
99
99
  }, { allowWrites: true });
100
100
  }
101
- //#endregion
102
101
  export { createBranches };
103
102
 
104
103
  //# sourceMappingURL=branch.js.map
@@ -1,6 +1,6 @@
1
1
  import { Show } from "./show.js";
2
2
  import { onMount, useSignal } from "@shadow-js/core";
3
- //#region src/control-flow/client-only.ts
3
+ // src/control-flow/client-only.ts
4
4
  /**
5
5
  * Renders `children` in the browser only. The server (and the first client pass, which must match
6
6
  * the server's markup) renders `fallback`; once mounted, the children replace it. Use it for
@@ -44,7 +44,6 @@ function ClientOnly(props) {
44
44
  }
45
45
  });
46
46
  }
47
- //#endregion
48
47
  export { ClientOnly };
49
48
 
50
49
  //# sourceMappingURL=client-only.js.map
@@ -1,7 +1,7 @@
1
1
  import { createComponent } from "../component.js";
2
2
  import { ssrElement, ssrRaw } from "../server/element.js";
3
3
  import { mergeProps, splitProps, untrack, useMemo } from "@shadow-js/core";
4
- //#region src/control-flow/dynamic.ts
4
+ // src/control-flow/dynamic.ts
5
5
  /** Shape of a tag name: a letter, then letters, digits or dashes. Anything else is refused. */
6
6
  const TAG_PATTERN = /^[a-z][a-z0-9-]*$/i;
7
7
  /** Tags refused in any letter case: a script would bypass CSP nonces and Trusted Types. */
@@ -100,7 +100,6 @@ function createDynamic(component, props = {}) {
100
100
  return component();
101
101
  } }, props));
102
102
  }
103
- //#endregion
104
103
  export { Dynamic, createDynamic };
105
104
 
106
105
  //# sourceMappingURL=dynamic.js.map
@@ -3,7 +3,7 @@ import { attachHotModules, createHotLink } from "./hot-link.js";
3
3
  import { rootErrorsOf } from "./root-errors.js";
4
4
  import { catchError, createRoot, getOwner, onCleanup, untrack, useMemo, useSignal } from "@shadow-js/core";
5
5
  import { createSignalNode, handleError, readSignal, writeSignal } from "@shadow-js/core/extend";
6
- //#region src/control-flow/error-boundary.ts
6
+ // src/control-flow/error-boundary.ts
7
7
  function ErrorBoundary(props) {
8
8
  const failureCell = createSignalNode(void 0, Object.is);
9
9
  /** Where an error of this boundary's own fallback goes: the boundary that encloses it. */
@@ -109,7 +109,6 @@ function ErrorBoundary(props) {
109
109
  });
110
110
  return body;
111
111
  }
112
- //#endregion
113
112
  export { ErrorBoundary };
114
113
 
115
114
  //# sourceMappingURL=error-boundary.js.map
@@ -1,5 +1,5 @@
1
1
  import { mapArray, untrack } from "@shadow-js/core";
2
- //#region src/control-flow/for.ts
2
+ // src/control-flow/for.ts
3
3
  /**
4
4
  * Calls the row callback. `props.children` is read untracked, once per row.
5
5
  * @internal
@@ -17,7 +17,6 @@ function For(props) {
17
17
  fallback
18
18
  });
19
19
  }
20
- //#endregion
21
20
  export { For };
22
21
 
23
22
  //# sourceMappingURL=for.js.map
@@ -1,4 +1,4 @@
1
- //#region src/control-flow/fragment.ts
1
+ // src/control-flow/fragment.ts
2
2
  /**
3
3
  * A no-op wrapper: returns `props.children` untouched, so the children are created by the caller's
4
4
  * getter exactly as if no wrapper existed. Use it to group several children under one element.
@@ -25,7 +25,6 @@
25
25
  function Fragment(props) {
26
26
  return props.children;
27
27
  }
28
- //#endregion
29
28
  export { Fragment };
30
29
 
31
30
  //# sourceMappingURL=fragment.js.map
@@ -1,5 +1,5 @@
1
1
  import { getOwner } from "@shadow-js/core";
2
- //#region src/control-flow/hot-link.ts
2
+ // src/control-flow/hot-link.ts
3
3
  /**
4
4
  * The hot-update link between an error boundary and the modules its children were built from. Dev
5
5
  * only: the callers reach this code behind `__DEV__`, so production bundles never include it.
@@ -51,7 +51,6 @@ function createHotLink(onUpdate) {
51
51
  disarm
52
52
  };
53
53
  }
54
- //#endregion
55
54
  export { attachHotModules, createHotLink };
56
55
 
57
56
  //# sourceMappingURL=hot-link.js.map
@@ -1,5 +1,5 @@
1
1
  import { indexArray, untrack } from "@shadow-js/core";
2
- //#region src/control-flow/index-list.ts
2
+ // src/control-flow/index-list.ts
3
3
  /**
4
4
  * Renders one row per position. Rows are created and removed only when the length changes; the
5
5
  * row at position `i` stays, and its item accessor follows the value at `i`. Use it for
@@ -25,7 +25,6 @@ import { indexArray, untrack } from "@shadow-js/core";
25
25
  function Index(props) {
26
26
  return indexArray(() => props.each, (item, index) => untrack(() => props.children)(item, index), { fallback: () => props.fallback });
27
27
  }
28
- //#endregion
29
28
  export { Index };
30
29
 
31
30
  //# sourceMappingURL=index-list.js.map
@@ -1,5 +1,5 @@
1
1
  import { untrack, useMemo, useResource } from "@shadow-js/core";
2
- //#region src/control-flow/lazy.ts
2
+ // src/control-flow/lazy.ts
3
3
  /**
4
4
  * Defines a component whose code is loaded on first render. While loading, the nearest
5
5
  * `<Suspense>` shows its fallback; a failed load throws to the nearest `<ErrorBoundary>` and the
@@ -58,7 +58,6 @@ function lazy(loader) {
58
58
  Lazy.preload = load;
59
59
  return Lazy;
60
60
  }
61
- //#endregion
62
61
  export { lazy };
63
62
 
64
63
  //# sourceMappingURL=lazy.js.map
@@ -1,6 +1,6 @@
1
1
  import { nextKey, withScope } from "../internal/hydration-scope.js";
2
2
  import { ssrRaw } from "../server/element.js";
3
- //#region src/control-flow/no-hydration.ts
3
+ // src/control-flow/no-hydration.ts
4
4
  /**
5
5
  * Content the browser never hydrates: the server renders it without hydration keys, and while the
6
6
  * page hydrates the browser leaves that markup exactly as it is (no code runs for it, no event
@@ -34,7 +34,6 @@ function NoHydration(props) {
34
34
  ];
35
35
  }
36
36
  }
37
- //#endregion
38
37
  export { NoHydration };
39
38
 
40
39
  //# sourceMappingURL=no-hydration.js.map
@@ -4,7 +4,7 @@ import { bindRegion, createRegion, removeRegion } from "../insert.js";
4
4
  import { PortalContext } from "../internal/portal-context.js";
5
5
  import { renderServerPortal } from "../server/portals.js";
6
6
  import { createRoot, isServer, onCleanup, useContext, useRenderEffect } from "@shadow-js/core";
7
- //#region src/control-flow/portal.ts
7
+ // src/control-flow/portal.ts
8
8
  /** Appends `node` to `target`, moving it in place when the target supports `moveBefore`. */
9
9
  function appendMoved(target, node) {
10
10
  if (typeof target.moveBefore === "function") target.moveBefore(node, null);
@@ -128,7 +128,6 @@ function Portal(props) {
128
128
  onCleanup(unmount);
129
129
  return null;
130
130
  }
131
- //#endregion
132
131
  export { Portal };
133
132
 
134
133
  //# sourceMappingURL=portal.js.map
@@ -1,5 +1,5 @@
1
1
  import { getOwner } from "@shadow-js/core";
2
- //#region src/control-flow/root-errors.ts
2
+ // src/control-flow/root-errors.ts
3
3
  /**
4
4
  * The key the reporters are stored under in an owner's context map. A symbol the context map inherits
5
5
  * (as a Provider's value is inherited), so every node below the root sees it, detached roots included.
@@ -27,7 +27,6 @@ function attachRootErrors(options) {
27
27
  function rootErrorsOf(owner) {
28
28
  return owner?.context?.[ROOT_ERRORS];
29
29
  }
30
- //#endregion
31
30
  export { attachRootErrors, rootErrorsOf };
32
31
 
33
32
  //# sourceMappingURL=root-errors.js.map
@@ -1,5 +1,5 @@
1
1
  import { createBranches } from "./branch.js";
2
- //#region src/control-flow/show.ts
2
+ // src/control-flow/show.ts
3
3
  function Show(props) {
4
4
  return createBranches("Show", () => {
5
5
  const when = props.when;
@@ -12,7 +12,6 @@ function Show(props) {
12
12
  };
13
13
  }, () => props.fallback);
14
14
  }
15
- //#endregion
16
15
  export { Show };
17
16
 
18
17
  //# sourceMappingURL=show.js.map
@@ -1,6 +1,6 @@
1
1
  import { createContext, onCleanup } from "@shadow-js/core";
2
2
  import { createSignalNode, readSignal, writeSignal } from "@shadow-js/core/extend";
3
- //#region src/control-flow/suspense-list.ts
3
+ // src/control-flow/suspense-list.ts
4
4
  /** The enclosing list, or null. @internal */
5
5
  const SuspenseListContext = /* @__PURE__ */ createContext(null, { name: "SuspenseList" });
6
6
  /**
@@ -94,7 +94,6 @@ function SuspenseList(props) {
94
94
  }
95
95
  });
96
96
  }
97
- //#endregion
98
97
  export { SuspenseList, SuspenseListContext };
99
98
 
100
99
  //# sourceMappingURL=suspense-list.js.map
@@ -4,7 +4,7 @@ import { ssrRaw } from "../server/element.js";
4
4
  import { StreamContext } from "../internal/stream-context.js";
5
5
  import { SuspenseContext, getOwner, runWithOwner, useContext } from "@shadow-js/core";
6
6
  import { createOwner, createSignalNode, readSignal, transitionHooks, writeSignal } from "@shadow-js/core/extend";
7
- //#region src/control-flow/suspense.ts
7
+ // src/control-flow/suspense.ts
8
8
  /**
9
9
  * A counter the resources of one boundary report to (see {@link SuspenseTracker}), and the hold a
10
10
  * transition takes on the boundary. A transition that reads pending data while the boundary shows
@@ -113,7 +113,6 @@ function suspenseOnServer(props, key, count, content) {
113
113
  ssrRaw("<!--]-->")
114
114
  ];
115
115
  }
116
- //#endregion
117
116
  export { Suspense };
118
117
 
119
118
  //# sourceMappingURL=suspense.js.map
@@ -1,6 +1,6 @@
1
1
  import { createBranches } from "./branch.js";
2
2
  import { children } from "@shadow-js/core";
3
- //#region src/control-flow/switch.ts
3
+ // src/control-flow/switch.ts
4
4
  /**
5
5
  * Describes one branch of a {@link Switch}. It returns its props unchanged.
6
6
  *
@@ -84,7 +84,6 @@ function Switch(props) {
84
84
  };
85
85
  }, () => props.fallback);
86
86
  }
87
- //#endregion
88
87
  export { Match, Switch };
89
88
 
90
89
  //# sourceMappingURL=switch.js.map
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from "@shadow-js/core";
2
- //#region src/derived.ts
2
+ // src/derived.ts
3
3
  /**
4
4
  * Wraps a computation as a {@link Derived} value that recomputes only when the signals it reads
5
5
  * change. The compiler emits it for `const x = <expression reading signals>` inside components; it
@@ -28,7 +28,6 @@ function derived(compute) {
28
28
  Object.defineProperty(read, "value", { get: memo });
29
29
  return read;
30
30
  }
31
- //#endregion
32
31
  export { derived };
33
32
 
34
33
  //# sourceMappingURL=derived.js.map
@@ -1,6 +1,6 @@
1
1
  import { ssrElement, ssrRaw } from "./server/element.js";
2
2
  import "@shadow-js/core";
3
- //#region src/element.ts
3
+ // src/element.ts
4
4
  /**
5
5
  * The slim element primitive: one HTML element with attributes, event listeners, `ref` and children,
6
6
  * and no generic prop runtime. `Dynamic` and `spread` cover every prop shape; this covers the common
@@ -60,7 +60,6 @@ function element(tag, props) {
60
60
  ];
61
61
  }, true);
62
62
  }
63
- //#endregion
64
63
  export { element };
65
64
 
66
65
  //# sourceMappingURL=element.js.map
@@ -1,5 +1,5 @@
1
1
  import { batch, getOwner, onCleanup, untrack } from "@shadow-js/core";
2
- //#region src/events.ts
2
+ // src/events.ts
3
3
  /**
4
4
  * Events that may be delegated: composed events, which leave a shadow root and reach the document.
5
5
  * `change` is not composed, so it is bound on its element (see the note on `bindEvent`).
@@ -259,7 +259,6 @@ function addEventListener(el, name, handler, delegate, capture) {
259
259
  const unbind = bindEvent(el, name, handler, delegate === true, capture === true);
260
260
  if (unbind !== void 0 && getOwner() !== null) onCleanup(unbind);
261
261
  }
262
- //#endregion
263
262
  export { addEventListener, bindEvent, chainEvents, clearDelegatedEvents, delegateEvents };
264
263
 
265
264
  //# sourceMappingURL=events.js.map
@@ -1,5 +1,5 @@
1
1
  import { useHead } from "./use-head.js";
2
- //#region src/head/components.ts
2
+ // src/head/components.ts
3
3
  /** Text of a value that may be an accessor. Anything but text or an array of text throws. */
4
4
  function partText(value) {
5
5
  if (typeof value === "string") return value;
@@ -164,7 +164,6 @@ function Base(props) {
164
164
  useHead(() => attributeTag("base", props, ["children"]));
165
165
  return null;
166
166
  }
167
- //#endregion
168
167
  export { Base, Link, Meta, Style, Title };
169
168
 
170
169
  //# sourceMappingURL=components.js.map
@@ -1,4 +1,4 @@
1
- //#region src/head/registry.ts
1
+ // src/head/registry.ts
2
2
  const noop = () => void 0;
3
3
  /**
4
4
  * Creates an empty head registry. `onChange` runs after every effective add or removal, so the
@@ -62,7 +62,6 @@ function createHeadRegistry(onChange) {
62
62
  }
63
63
  };
64
64
  }
65
- //#endregion
66
65
  export { createHeadRegistry };
67
66
 
68
67
  //# sourceMappingURL=registry.js.map
@@ -2,7 +2,7 @@ import { escapeHtml } from "../server/escape.js";
2
2
  import { createHeadRegistry } from "./registry.js";
3
3
  import { HEAD_KEY, HEAD_MARKER } from "./validate.js";
4
4
  import { createContext } from "@shadow-js/core";
5
- //#region src/head/server-head.ts
5
+ // src/head/server-head.ts
6
6
  /** Elements that never have content or a closing tag. */
7
7
  const VOID_TAGS = /* @__PURE__ */ new Set([
8
8
  "meta",
@@ -70,7 +70,6 @@ function runWithServerHead(head, fn) {
70
70
  });
71
71
  return holder.value;
72
72
  }
73
- //#endregion
74
73
  export { ServerHeadContext, createServerHead, runWithServerHead };
75
74
 
76
75
  //# sourceMappingURL=server-head.js.map
@@ -1,5 +1,5 @@
1
1
  import { HEAD_KEY, HEAD_MARKER, identityOfElement } from "./validate.js";
2
- //#region src/head/sink.ts
2
+ // src/head/sink.ts
3
3
  /** Removes or restores one element the sink owned. Elements already gone are ignored. */
4
4
  function release(head, record) {
5
5
  const el = record.el;
@@ -90,7 +90,6 @@ function createDomHeadSink(doc) {
90
90
  }
91
91
  };
92
92
  }
93
- //#endregion
94
93
  export { createDomHeadSink };
95
94
 
96
95
  //# sourceMappingURL=sink.js.map
@@ -3,7 +3,7 @@ import { normalizeTags } from "./validate.js";
3
3
  import { ServerHeadContext } from "./server-head.js";
4
4
  import { createDomHeadSink } from "./sink.js";
5
5
  import { createRoot, getOwner, isServer, untrack, useContext, useEffect, useRenderEffect, useSignal } from "@shadow-js/core";
6
- //#region src/head/use-head.ts
6
+ // src/head/use-head.ts
7
7
  /** One registry per document, shared by every `useHead` call on it. */
8
8
  const registries = /* @__PURE__ */ new WeakMap();
9
9
  /**
@@ -78,7 +78,6 @@ function useHead(input) {
78
78
  const registry = registryFor(document);
79
79
  useRenderEffect(() => normalizeTags(typeof input === "function" ? input() : input), (tags) => registry.add(tags));
80
80
  }
81
- //#endregion
82
81
  export { useHead };
83
82
 
84
83
  //# sourceMappingURL=use-head.js.map
@@ -1,6 +1,6 @@
1
1
  import { warnOnce } from "../internal/diagnostics.js";
2
2
  import { isUnsafeUrlAttribute } from "../attributes.js";
3
- //#region src/head/validate.ts
3
+ // src/head/validate.ts
4
4
  /** Marks every element the sink created or adopted. Callers may not supply it. @internal */
5
5
  const HEAD_MARKER = "data-shadow-head";
6
6
  /** Carries a style's key so a server-rendered style can be adopted. @internal */
@@ -262,7 +262,6 @@ function identityOfElement(element) {
262
262
  }
263
263
  return identityOf(name, lookup, element.getAttribute("data-shadow-key") ?? void 0);
264
264
  }
265
- //#endregion
266
265
  export { HEAD_KEY, HEAD_MARKER, identityOf, identityOfElement, isHeadTagName, normalizeTag, normalizeTags };
267
266
 
268
267
  //# sourceMappingURL=validate.js.map
@@ -6,7 +6,7 @@ import { attachRootErrors } from "./control-flow/root-errors.js";
6
6
  import { replayEarlyEvents } from "./internal/early-events.js";
7
7
  import { ResourceCacheContext, batch, createRoot, flushSync, runWithOwner, untrack } from "@shadow-js/core";
8
8
  import { withHydration } from "@shadow-js/core/extend";
9
- //#region src/hydration.ts
9
+ // src/hydration.ts
10
10
  function dataCache(data) {
11
11
  const used = /* @__PURE__ */ new Set();
12
12
  return {
@@ -114,7 +114,6 @@ function hydrate(code, container, options = {}) {
114
114
  removeRegion(region);
115
115
  };
116
116
  }
117
- //#endregion
118
117
  export { hydrate };
119
118
 
120
119
  //# sourceMappingURL=hydration.js.map
@@ -3,7 +3,7 @@ import { claims } from "./internal/hydration-hooks.js";
3
3
  import { reconcileNodes } from "./internal/reconcile.js";
4
4
  import { useRenderEffect } from "@shadow-js/core";
5
5
  import { createComputation, currentOwner, disposeOwner, readComputation } from "@shadow-js/core/extend";
6
- //#region src/insert.ts
6
+ // src/insert.ts
7
7
  /** Longest chain of accessors a single value may hold (a function returning a function ...). */
8
8
  const MAX_ACCESSOR_DEPTH = 1e4;
9
9
  /** The document a node belongs to (a Document is its own document). */
@@ -351,7 +351,6 @@ function insert(parent, value, anchorNode, initial) {
351
351
  const resolvedAnchor = anchorNode ?? null;
352
352
  return bindRegion(createRegion(parent, resolvedAnchor, initial === void 0 ? claims.current.takeRegion(parent, resolvedAnchor) : initial), value);
353
353
  }
354
- //#endregion
355
354
  export { anchor, bindRegion, createRegion, insert, removeRegion };
356
355
 
357
356
  //# sourceMappingURL=insert.js.map
@@ -1,5 +1,5 @@
1
1
  import { DEVTOOLS_EVENT, devtoolsReport } from "@shadow-js/core/extend";
2
- //#region src/internal/claim.ts
2
+ // src/internal/claim.ts
3
3
  let state = null;
4
4
  /** Starts a claiming pass over the given server elements. @internal */
5
5
  function beginClaiming(registry, recoverable) {
@@ -351,7 +351,6 @@ function isComment(node, data) {
351
351
  function isRegionMarker(comment) {
352
352
  return comment.data === "[" || comment.data === "]";
353
353
  }
354
- //#endregion
355
354
  export { beginClaiming, checkClaimedTag, checkClaimedText, claimElement, claimPortal, endClaiming, isClaiming, liftedRegions, releaseUnclaimedPortals, takeRegion, withoutClaiming };
356
355
 
357
356
  //# sourceMappingURL=claim.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/css-units.ts
1
+ // src/internal/css-units.ts
2
2
  /**
3
3
  * React's unitless style properties. A number given to any other property is in pixels (`0` stays
4
4
  * `0`); these properties take the bare number. Vendor prefixes do not change the answer.
@@ -20,7 +20,6 @@ function cssValueText(property, value) {
20
20
  const bare = property.replace(/^-(?:webkit|moz|ms|o)-/, "");
21
21
  return UNITLESS.has(bare) ? String(value) : `${value}px`;
22
22
  }
23
- //#endregion
24
23
  export { cssValueText };
25
24
 
26
25
  //# sourceMappingURL=css-units.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/diagnostics.ts
1
+ // src/internal/diagnostics.ts
2
2
  const seen = /* @__PURE__ */ new Set();
3
3
  /**
4
4
  * Prints a development warning as `[shadow CODE] detail`, at most once per code for the life of the
@@ -32,7 +32,6 @@ function warnOnce(code, detail) {
32
32
  function invalidAttributeName(name) {
33
33
  return /* @__PURE__ */ new TypeError(`[shadow INVALID_ATTRIBUTE_NAME] "${name}" is not a valid attribute name.`);
34
34
  }
35
- //#endregion
36
35
  export { invalidAttributeName, warnOnce };
37
36
 
38
37
  //# sourceMappingURL=diagnostics.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/early-events.ts
1
+ // src/internal/early-events.ts
2
2
  /**
3
3
  * Early event capture (ADR-016): a tiny inline script, placed before the bundle, records the events a
4
4
  * user makes before the application has hydrated. `hydrate()` then replays them once its handlers are
@@ -70,7 +70,6 @@ function replayEarlyEvents() {
70
70
  if (target instanceof Node) target.dispatchEvent(reissue(event));
71
71
  }
72
72
  }
73
- //#endregion
74
73
  export { DEFAULT_EARLY_EVENTS, EARLY_CAPTURE_KEY, captureScriptBody, replayEarlyEvents };
75
74
 
76
75
  //# sourceMappingURL=early-events.js.map
@@ -21,7 +21,6 @@ const claims = { current: {
21
21
  isClaiming: () => false,
22
22
  withoutClaiming: (fn) => fn()
23
23
  } };
24
- //#endregion
25
24
  export { claims };
26
25
 
27
26
  //# sourceMappingURL=hydration-hooks.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/hydration-scope.ts
1
+ // src/internal/hydration-scope.ts
2
2
  let current = null;
3
3
  /**
4
4
  * Creates the scope a render or a hydration starts from: what `renderToString` and `hydrate()` put in
@@ -150,7 +150,6 @@ function childScope(key) {
150
150
  resources: 0
151
151
  };
152
152
  }
153
- //#endregion
154
153
  export { childScope, createRootScope, currentScope, enterComponent, nextKey, resourceKey, withScope };
155
154
 
156
155
  //# sourceMappingURL=hydration-scope.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/names.ts
1
+ // src/internal/names.ts
2
2
  /**
3
3
  * The XHTML namespace URI: the `namespaceURI` of ordinary HTML elements.
4
4
  *
@@ -29,7 +29,6 @@ const SVG_NS = "http://www.w3.org/2000/svg";
29
29
  * @since 1.0.0
30
30
  */
31
31
  const MATHML_NS = "http://www.w3.org/1998/Math/MathML";
32
- //#endregion
33
32
  export { HTML_NS, MATHML_NS, SVG_NS };
34
33
 
35
34
  //# sourceMappingURL=names.js.map
@@ -1,5 +1,5 @@
1
1
  import { createContext } from "@shadow-js/core";
2
- //#region src/internal/portal-context.ts
2
+ // src/internal/portal-context.ts
3
3
  /**
4
4
  * The context through which a server render hands portals their collector: the renderers provide it
5
5
  * when they are given a `portals` option (see `createServerPortals`). A custom portal reads it on the
@@ -22,7 +22,6 @@ import { createContext } from "@shadow-js/core";
22
22
  * @since 1.0.0
23
23
  */
24
24
  const PortalContext = /* @__PURE__ */ createContext(null, { name: "Portal" });
25
- //#endregion
26
25
  export { PortalContext };
27
26
 
28
27
  //# sourceMappingURL=portal-context.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/react-names.ts
1
+ // src/internal/react-names.ts
2
2
  /**
3
3
  * React spellings at run time: the attribute and event names that a props object (a spread) passes
4
4
  * through. The compiler resolves the same names at build time (`packages/compiler/src/internal/
@@ -110,7 +110,6 @@ function eventPlan(attribute, tag, type) {
110
110
  passive: false
111
111
  };
112
112
  }
113
- //#endregion
114
113
  export { IGNORED_KEYS, attributeName, eventPlan };
115
114
 
116
115
  //# sourceMappingURL=react-names.js.map
@@ -1,4 +1,4 @@
1
- //#region src/internal/reconcile.ts
1
+ // src/internal/reconcile.ts
2
2
  /** Removes `node` only when it is still a child of `parent`, so detached nodes are ignored. */
3
3
  function removeNode(parent, node) {
4
4
  if (node !== void 0 && node.parentNode === parent) parent.removeChild(node);
@@ -116,7 +116,6 @@ function reconcileNodes(parent, prev, next, end) {
116
116
  anchorNode = node;
117
117
  }
118
118
  }
119
- //#endregion
120
119
  export { reconcileNodes };
121
120
 
122
121
  //# sourceMappingURL=reconcile.js.map