@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,4 +1,3 @@
1
- //#region src/jsx/types.d.ts
2
1
  /**
3
2
  * Shared value types for ShadowJS JSX. Everything here is a type: this module emits no code.
4
3
  *
@@ -171,6 +170,5 @@ export type MathMLTagElement<K extends string> = K extends keyof MathMLElementTa
171
170
  export type RefOf<Props> = Props extends {
172
171
  ref?: infer R;
173
172
  } ? Extract<NonNullable<R>, Element> : never;
174
- //#endregion
175
173
  export {};
176
174
  //# sourceMappingURL=types.d.ts.map
@@ -7,7 +7,6 @@ import { HTMLIntrinsicElements } from "./jsx/html.js";
7
7
  import { MathMLIntrinsicElements } from "./jsx/mathml.js";
8
8
  import { SVGIntrinsicElements } from "./jsx/svg.js";
9
9
  import { CustomElementProps, IntrinsicElementMap } from "./jsx/intrinsic.js";
10
- //#region src/jsx-runtime.d.ts
11
10
  /**
12
11
  * The app's custom events, by name, for the `on:` and `oncapture:` prefixes: declaration-merge it so
13
12
  * `on:toast={...}` receives a typed event. Empty by default; a name without an entry is not accepted
@@ -89,6 +88,5 @@ export type ValidComponent = keyof JSX.IntrinsicElements | Component<never>;
89
88
  * @since 1.0.0
90
89
  */
91
90
  export type ComponentProps<T extends ValidComponent> = T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : T extends ((props: infer P) => unknown) ? P : never;
92
- //#endregion
93
91
  export type { AriaAttributes, AriaRole, Booleanish, BoundEventHandler, CSSProperties, ClassValue, Component, CustomElementProps, EventHandler, EventHandlerProp, FlowComponent, HTMLIntrinsicElements, IntrinsicElementMap, JsxChild, ListenerObject, MathMLIntrinsicElements, Maybe, MaybeAccessor, ParentComponent, ParentProps, Ref, SVGIntrinsicElements, TextChild, VoidComponent, VoidProps };
94
92
  //# sourceMappingURL=jsx-runtime.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { Cleanup } from "@shadow-js/core";
2
- //#region src/reactive.d.ts
3
2
  /**
4
3
  * Runs `fn` as a render effect: synchronously when created, and again when the signals it reads
5
4
  * change. It is the effect the compiler emits for DOM bindings; application code usually prefers
@@ -106,5 +105,4 @@ export declare function use<T>(fn: (el: Element, arg: () => T) => unknown, el: E
106
105
  * @since 1.0.0
107
106
  */
108
107
  export declare function refTo(target: unknown, el: Element): void;
109
- //#endregion
110
108
  //# sourceMappingURL=reactive.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { getOwner, onCleanup, untrack, useMemo, useRenderEffect } from "@shadow-js/core";
2
- //#region src/reactive.ts
2
+ // src/reactive.ts
3
3
  function effect(compute, apply) {
4
4
  if (apply === void 0) useRenderEffect(compute);
5
5
  else useRenderEffect(compute, apply);
@@ -79,7 +79,6 @@ function refTo(target, el) {
79
79
  holder.current = null;
80
80
  });
81
81
  }
82
- //#endregion
83
82
  export { effect, memo, refTo, use };
84
83
 
85
84
  //# sourceMappingURL=reactive.js.map
@@ -1,5 +1,4 @@
1
1
  import { RootErrorOptions } from "./control-flow/root-errors.js";
2
- //#region src/render.d.ts
3
2
  /**
4
3
  * Options of {@link render}: the error reporters of the root.
5
4
  * @since 1.0.0
@@ -32,5 +31,4 @@ export type RenderOptions = RootErrorOptions;
32
31
  * @since 1.0.0
33
32
  */
34
33
  export declare function render(code: () => unknown, container: Element | Document | DocumentFragment, options?: RenderOptions): () => void;
35
- //#endregion
36
34
  //# sourceMappingURL=render.d.ts.map
@@ -3,7 +3,7 @@ import { claims } from "./internal/hydration-hooks.js";
3
3
  import { bindRegion, createRegion, removeRegion } from "./insert.js";
4
4
  import { attachRootErrors } from "./control-flow/root-errors.js";
5
5
  import { batch, createRoot, flushSync, untrack } from "@shadow-js/core";
6
- //#region src/render.ts
6
+ // src/render.ts
7
7
  /**
8
8
  * Mounts `code` into `container`. Creates an owner, inserts the output, flushes the effects, and
9
9
  * returns a dispose function that stops the owner and removes the nodes this call inserted. A
@@ -46,7 +46,6 @@ function render(code, container, options) {
46
46
  removeRegion(region);
47
47
  };
48
48
  }
49
- //#endregion
50
49
  export { render };
51
50
 
52
51
  //# sourceMappingURL=render.js.map
@@ -1,4 +1,3 @@
1
- //#region src/resource-hints.d.ts
2
1
  /**
3
2
  * Options of {@link preconnect}, {@link preloadModule} and {@link preinitModule}.
4
3
  * @since 1.0.0
@@ -141,5 +140,4 @@ export declare function preinit(href: string, options: PreinitOptions): void;
141
140
  * @since 1.0.0
142
141
  */
143
142
  export declare function preinitModule(href: string, options?: CrossOriginOptions): void;
144
- //#endregion
145
143
  //# sourceMappingURL=resource-hints.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { useHead } from "./head/use-head.js";
2
2
  import { isServer } from "@shadow-js/core";
3
- //#region src/resource-hints.ts
3
+ // src/resource-hints.ts
4
4
  /** Hints are page-level and only ever use http(s) URLs; anything else throws, like head tags do. */
5
5
  function checkUrl(href) {
6
6
  const url = new URL(href, "https://base.invalid");
@@ -194,7 +194,6 @@ function preinitModule(href, options) {
194
194
  ...options?.crossOrigin === void 0 ? {} : { crossorigin: options.crossOrigin }
195
195
  }));
196
196
  }
197
- //#endregion
198
197
  export { preconnect, prefetchDNS, preinit, preinitModule, preload, preloadModule };
199
198
 
200
199
  //# sourceMappingURL=resource-hints.js.map
@@ -1,4 +1,3 @@
1
- //#region src/select-value.d.ts
2
1
  /**
3
2
  * Selects the options a `value` stands for. The compiler calls it for `<select value={...}>`. A
4
3
  * single value behaves like `select.value = value` (`null` and `undefined` are the empty string).
@@ -20,5 +19,4 @@
20
19
  * @since 1.0.0
21
20
  */
22
21
  export declare function setSelectValue(select: HTMLSelectElement, value: unknown): void;
23
- //#endregion
24
22
  //# sourceMappingURL=select-value.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/select-value.ts
1
+ // src/select-value.ts
2
2
  /** The values an array stands for, as strings; null and undefined entries are skipped. */
3
3
  function listed(value) {
4
4
  const values = /* @__PURE__ */ new Set();
@@ -45,7 +45,6 @@ function selectShows(select, value) {
45
45
  }
46
46
  return select.value === single(value);
47
47
  }
48
- //#endregion
49
48
  export { selectShows, setSelectValue };
50
49
 
51
50
  //# sourceMappingURL=select-value.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/attributes.d.ts
2
1
  /**
3
2
  * Renders one attribute as markup with a leading space, or `""` when the attribute is absent: the
4
3
  * helper the compiler's server output calls for a dynamic attribute. It applies the client's value
@@ -29,5 +28,4 @@
29
28
  * @since 1.0.0
30
29
  */
31
30
  export declare function ssrAttribute(name: string, value: unknown, isBoolean?: boolean): string;
32
- //#endregion
33
31
  //# sourceMappingURL=attributes.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { invalid } from "./errors.js";
2
2
  import { escapeHtml, resolveValue } from "./escape.js";
3
- //#region src/server/attributes.ts
3
+ // src/server/attributes.ts
4
4
  /** Names that can appear in markup: an XML-name subset without `@` or whitespace. Same as the client. */
5
5
  const ATTRIBUTE_NAME = /^[A-Za-z_:][A-Za-z0-9_:.-]*$/;
6
6
  /** Attributes whose value is a URL and is therefore checked for script schemes. Same as the client. */
@@ -149,7 +149,6 @@ function ssrAttribute(name, value, isBoolean = false) {
149
149
  if (isUnsafeAttributeValue(lowerName, text)) return "";
150
150
  return ` ${name}="${escapeHtml(text)}"`;
151
151
  }
152
- //#endregion
153
152
  export { BOOLEAN_ATTRIBUTES, assertAttributeName, attributeText, isEventName, isUnsafeUrl, ssrAttribute };
154
153
 
155
154
  //# sourceMappingURL=attributes.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/class-style.d.ts
2
1
  /**
3
2
  * Renders a `class` attribute from a class value: the helper the compiler's server output calls for
4
3
  * `class`, `className` and `classList`, with the same clsx rules as the client's `className`.
@@ -42,5 +41,4 @@ export declare function ssrClass(value: unknown): string;
42
41
  * @since 1.0.0
43
42
  */
44
43
  export declare function ssrStyle(value: unknown): string;
45
- //#endregion
46
44
  //# sourceMappingURL=class-style.d.ts.map
@@ -2,7 +2,7 @@ import { cssValueText } from "../internal/css-units.js";
2
2
  import { invalid } from "./errors.js";
3
3
  import { isSsrNode } from "./node.js";
4
4
  import { escapeHtml, resolveValue } from "./escape.js";
5
- //#region src/server/class-style.ts
5
+ // src/server/class-style.ts
6
6
  /** A CSS property name: a custom property, or a lower-case name with an optional vendor dash. */
7
7
  const CSS_PROPERTY = /^(--[A-Za-z0-9_-]+|-?[a-z][a-z0-9-]*)$/;
8
8
  /**
@@ -167,7 +167,6 @@ function ssrStyle(value) {
167
167
  const text = styleText(value);
168
168
  return text === "" ? "" : ` style="${escapeHtml(text)}"`;
169
169
  }
170
- //#endregion
171
170
  export { classText, collectClasses, isSafeCssValue, ssrClass, ssrStyle, styleText, toCssProperty };
172
171
 
173
172
  //# sourceMappingURL=class-style.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/component.d.ts
2
1
  /**
3
2
  * Calls a component on the server, untracked, with its own owner and hydration scope, so the
4
3
  * hydration keys it hands out depend only on where it sits in the tree. The server twin of the client
@@ -38,5 +37,4 @@ export declare function createComponent<P>(component: (props: P) => unknown, pro
38
37
  * @since 1.0.0
39
38
  */
40
39
  export declare function memo<T>(fn: () => T): () => T;
41
- //#endregion
42
40
  //# sourceMappingURL=component.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { currentScope, enterComponent } from "../internal/hydration-scope.js";
2
2
  import { untrack } from "@shadow-js/core";
3
3
  import { createOwner, runInScope } from "@shadow-js/core/extend";
4
- //#region src/server/component.ts
4
+ // src/server/component.ts
5
5
  /**
6
6
  * Calls a component on the server, untracked, with its own owner and hydration scope, so the
7
7
  * hydration keys it hands out depend only on where it sits in the tree. The server twin of the client
@@ -66,7 +66,6 @@ function memo(fn) {
66
66
  }
67
67
  };
68
68
  }
69
- //#endregion
70
69
  export { createComponent, memo };
71
70
 
72
71
  //# sourceMappingURL=component.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/derived.d.ts
2
1
  /**
3
2
  * The server twin of the client `Derived`: what {@link derived} returns. Nothing is reactive on the
4
3
  * server, so it holds the value computed once. Read it as `x.value` or call it as `x()`.
@@ -37,5 +36,4 @@ export interface Derived<T> {
37
36
  * @since 1.0.0
38
37
  */
39
38
  export declare function derived<T>(compute: () => T): Derived<T>;
40
- //#endregion
41
39
  //# sourceMappingURL=derived.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/server/derived.ts
1
+ // src/server/derived.ts
2
2
  /**
3
3
  * The server twin of the client `derived`, which the compiler emits for `const x = <expression
4
4
  * reading signals>` inside a component. On the server it calls `compute` once, immediately, and
@@ -20,7 +20,6 @@ function derived(compute) {
20
20
  Object.defineProperty(read, "value", { value: current });
21
21
  return read;
22
22
  }
23
- //#endregion
24
23
  export { derived };
25
24
 
26
25
  //# sourceMappingURL=derived.js.map
@@ -1,5 +1,4 @@
1
1
  import { SsrNode } from "./node.js";
2
- //#region src/server/element.d.ts
3
2
  /**
4
3
  * Joins the static parts of a server template with its dynamic holes into trusted markup: the
5
4
  * function compiled server output calls for each element tree. Holes are inserted unchanged, so each
@@ -85,5 +84,4 @@ export declare function ssrHydrationKey(): string;
85
84
  * @since 1.0.0
86
85
  */
87
86
  export declare function ssrElement(tag: string, props: unknown, children?: unknown, needsKey?: boolean, svg?: boolean): SsrNode;
88
- //#endregion
89
87
  //# sourceMappingURL=element.d.ts.map
@@ -6,7 +6,7 @@ import { escape, escapeHtml, resolveValue } from "./escape.js";
6
6
  import { BOOLEAN_ATTRIBUTES, isEventName, ssrAttribute } from "./attributes.js";
7
7
  import { classText, ssrStyle, styleText } from "./class-style.js";
8
8
  import { markSelectedOptions, textareaContent } from "./form-controls.js";
9
- //#region src/server/element.ts
9
+ // src/server/element.ts
10
10
  /** A tag name: letters, digits and dashes, starting with a letter. Anything else could break out. */
11
11
  const TAG_NAME = /^[A-Za-z][A-Za-z0-9-]*$/;
12
12
  /** Elements that never have children or a closing tag. */
@@ -210,7 +210,6 @@ function plainHtml(value) {
210
210
  if (typeof value === "symbol") throw invalid("UNRECOGNIZED_INSERT_VALUE", "A symbol cannot be innerHTML.");
211
211
  return String(value);
212
212
  }
213
- //#endregion
214
213
  export { ssr, ssrElement, ssrHydrationKey, ssrRaw };
215
214
 
216
215
  //# sourceMappingURL=element.js.map
@@ -1,4 +1,4 @@
1
- //#region src/server/errors.ts
1
+ // src/server/errors.ts
2
2
  /**
3
3
  * Error thrown by the server renderer, carrying a stable code. Dev builds carry the full text;
4
4
  * production builds keep only the code (the same split as core's diagnostics).
@@ -20,7 +20,6 @@ var SsrError = class extends Error {
20
20
  function invalid(code, detail) {
21
21
  return /* @__PURE__ */ new TypeError(`[shadow ${code}] ${detail}`);
22
22
  }
23
- //#endregion
24
23
  export { SsrError, invalid };
25
24
 
26
25
  //# sourceMappingURL=errors.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/escape.d.ts
2
1
  /**
3
2
  * Converts any value a JSX child may hold to escaped HTML: the helper compiled server output calls
4
3
  * for every dynamic child, and what the renderers call on the app's result.
@@ -26,5 +25,4 @@
26
25
  * @since 1.0.0
27
26
  */
28
27
  export declare function escape(value: unknown): string;
29
- //#endregion
30
28
  //# sourceMappingURL=escape.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { invalid } from "./errors.js";
2
2
  import { isSsrNode } from "./node.js";
3
3
  import { untrack } from "@shadow-js/core";
4
- //#region src/server/escape.ts
4
+ // src/server/escape.ts
5
5
  const HTML_ESCAPES = {
6
6
  "&": "&amp;",
7
7
  "<": "&lt;",
@@ -113,7 +113,6 @@ function escape(value) {
113
113
  item = next;
114
114
  }
115
115
  }
116
- //#endregion
117
116
  export { escape, escapeHtml, resolveValue };
118
117
 
119
118
  //# sourceMappingURL=escape.js.map
@@ -1,5 +1,4 @@
1
1
  import { SsrNode } from "./node.js";
2
- //#region src/server/form-controls.d.ts
3
2
  /**
4
3
  * Renders the content of a `<textarea>` from its value: the helper compiled server output calls for
5
4
  * `<textarea value={...}>` and `defaultValue`, since a browser ignores a `value` attribute on a
@@ -46,5 +45,4 @@ export declare function ssrTextArea(value: unknown): SsrNode;
46
45
  * @since 1.0.0
47
46
  */
48
47
  export declare function ssrSelectValue(value: unknown, children: unknown): SsrNode;
49
- //#endregion
50
48
  //# sourceMappingURL=form-controls.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { invalid } from "./errors.js";
2
2
  import { SsrNode } from "./node.js";
3
3
  import { escape, escapeHtml, resolveValue } from "./escape.js";
4
- //#region src/server/form-controls.ts
4
+ // src/server/form-controls.ts
5
5
  /**
6
6
  * Server markup for the controls whose state is not an attribute. A browser ignores `value` on a
7
7
  * `<textarea>` and on a `<select>`: the textarea's text is its content, and the select's value is
@@ -187,7 +187,6 @@ function ssrSelectValue(value, children) {
187
187
  function markSelectedOptions(value, html) {
188
188
  return markOptions(html, wantedValues(value));
189
189
  }
190
- //#endregion
191
190
  export { markSelectedOptions, ssrSelectValue, ssrTextArea, textareaContent };
192
191
 
193
192
  //# sourceMappingURL=form-controls.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/hydration-script.d.ts
2
1
  /**
3
2
  * Options of {@link generateHydrationScript} and {@link HydrationScript}.
4
3
  * @since 1.0.0
@@ -61,5 +60,4 @@ export declare function generateHydrationScript(options?: HydrationScriptOptions
61
60
  * @since 1.0.0
62
61
  */
63
62
  export declare function HydrationScript(props?: HydrationScriptOptions): unknown;
64
- //#endregion
65
63
  //# sourceMappingURL=hydration-script.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { ssrRaw } from "./element.js";
2
2
  import { DEFAULT_EARLY_EVENTS, captureScriptBody } from "../internal/early-events.js";
3
- //#region src/server/hydration-script.ts
3
+ // src/server/hydration-script.ts
4
4
  const NONCE = /^[A-Za-z0-9+/=_-]+$/;
5
5
  /**
6
6
  * Returns the inline `<script>` that records the events a user makes before the app has hydrated, so
@@ -53,7 +53,6 @@ function generateHydrationScript(options = {}) {
53
53
  function HydrationScript(props = {}) {
54
54
  return ssrRaw(generateHydrationScript(props));
55
55
  }
56
- //#endregion
57
56
  export { HydrationScript, generateHydrationScript };
58
57
 
59
58
  //# sourceMappingURL=hydration-script.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/node.d.ts
2
1
  /**
3
2
  * Markup that is already safe to insert: the only value `escape` writes without encoding.
4
3
  * A class instance, not a `{ t }` shape, so a plain object parsed from user input can never be
@@ -9,5 +8,4 @@ export declare class SsrNode {
9
8
  readonly t: string;
10
9
  constructor(t: string);
11
10
  }
12
- //#endregion
13
11
  //# sourceMappingURL=node.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/server/node.ts
1
+ // src/server/node.ts
2
2
  /**
3
3
  * Markup that is already safe to insert: the only value `escape` writes without encoding.
4
4
  * A class instance, not a `{ t }` shape, so a plain object parsed from user input can never be
@@ -15,7 +15,6 @@ var SsrNode = class {
15
15
  function isSsrNode(value) {
16
16
  return value instanceof SsrNode;
17
17
  }
18
- //#endregion
19
18
  export { SsrNode, isSsrNode };
20
19
 
21
20
  //# sourceMappingURL=node.js.map
@@ -1,5 +1,4 @@
1
1
  import "../internal/portal-context.js";
2
- //#region src/server/portals.d.ts
3
2
  /**
4
3
  * The markup of the portals a server render produced (see {@link createServerPortals}). Pass it to
5
4
  * the render as its `portals` option, then emit `html()` at the end of `<body>`, after the app markup.
@@ -42,5 +41,4 @@ export interface ServerPortals {
42
41
  * @since 1.0.0
43
42
  */
44
43
  export declare function createServerPortals(): ServerPortals;
45
- //#endregion
46
44
  //# sourceMappingURL=portals.d.ts.map
@@ -93,7 +93,6 @@ function portalCollectorFor(portals) {
93
93
  collector.clear();
94
94
  return collector;
95
95
  }
96
- //#endregion
97
96
  export { PortalCollector, collectorOf, createServerPortals, portalCollectorFor, renderServerPortal, withPortalSink };
98
97
 
99
98
  //# sourceMappingURL=portals.js.map
@@ -1,6 +1,5 @@
1
1
  import { ServerHead } from "../head/server-head.js";
2
2
  import { ServerPortals } from "./portals.js";
3
- //#region src/server/render.d.ts
4
3
  /**
5
4
  * Options of {@link renderToString}, and the base of {@link AsyncRenderOptions}.
6
5
  * @since 1.0.0
@@ -125,5 +124,4 @@ export declare function renderToString(code: () => unknown, options?: RenderOpti
125
124
  * @since 1.0.0
126
125
  */
127
126
  export declare function renderToStringAsync(code: () => unknown, options?: AsyncRenderOptions): Promise<AsyncRenderResult>;
128
- //#endregion
129
127
  //# sourceMappingURL=render.d.ts.map
@@ -5,7 +5,7 @@ import { attachRootErrors } from "../control-flow/root-errors.js";
5
5
  import { portalCollectorFor, withPortalSink } from "./portals.js";
6
6
  import { runWithServerHead } from "../head/server-head.js";
7
7
  import { ResourceCacheContext, createRoot } from "@shadow-js/core";
8
- //#region src/server/render.ts
8
+ // src/server/render.ts
9
9
  const DEFAULT_TIMEOUT_MS = 1e4;
10
10
  const DEFAULT_MAX_PASSES = 10;
11
11
  const RENDER_ID = /^[A-Za-z0-9_-]+$/;
@@ -250,7 +250,6 @@ async function renderToStringAsync(code, options) {
250
250
  for (const dispose of job.roots.splice(0)) dispose();
251
251
  }
252
252
  }
253
- //#endregion
254
253
  export { renderToString, renderToStringAsync };
255
254
 
256
255
  //# sourceMappingURL=render.js.map
@@ -1,4 +1,3 @@
1
- //#region src/server/serialize.d.ts
2
1
  /**
3
2
  * Serializes data for embedding in a page, as JSON that is safe inside a
4
3
  * `<script type="application/json">` element. It carries what JSON cannot: undefined, NaN,
@@ -41,5 +40,4 @@ export declare function serialize(data: unknown): string;
41
40
  * @since 1.0.0
42
41
  */
43
42
  export declare function deserialize(text: string): unknown;
44
- //#endregion
45
43
  //# sourceMappingURL=serialize.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { invalid } from "./errors.js";
2
- //#region src/server/serialize.ts
2
+ // src/server/serialize.ts
3
3
  /** Characters that may not appear raw in the output: they would end a script element or a line. */
4
4
  const UNSAFE_TEXT = /[<>&\u2028\u2029]/g;
5
5
  /** Escapes text for `<script type="application/json">`: the JSON stays valid, the markup cannot close. */
@@ -309,7 +309,6 @@ function deserialize(text) {
309
309
  }
310
310
  return decodeValue(own(payload, "r"), made);
311
311
  }
312
- //#endregion
313
312
  export { deserialize, serialize };
314
313
 
315
314
  //# sourceMappingURL=serialize.js.map
@@ -1,6 +1,5 @@
1
1
  import { ServerHead } from "../head/server-head.js";
2
2
  import { ServerPortals } from "./portals.js";
3
- //#region src/server/stream.d.ts
4
3
  /**
5
4
  * Options of {@link renderToStream}.
6
5
  * @since 1.0.0
@@ -90,5 +89,4 @@ export interface StreamOptions {
90
89
  * @since 1.0.0
91
90
  */
92
91
  export declare function renderToStream(code: () => unknown, options?: StreamOptions): ReadableStream<Uint8Array>;
93
- //#endregion
94
92
  //# sourceMappingURL=stream.d.ts.map
@@ -7,7 +7,7 @@ import { portalCollectorFor, withPortalSink } from "./portals.js";
7
7
  import { runWithServerHead } from "../head/server-head.js";
8
8
  import { serialize } from "./serialize.js";
9
9
  import { ResourceCacheContext, createRoot, untrack } from "@shadow-js/core";
10
- //#region src/server/stream.ts
10
+ // src/server/stream.ts
11
11
  const RENDER_ID = /^[A-Za-z0-9_-]+$/;
12
12
  const DEFAULT_TIMEOUT_MS = 3e4;
13
13
  /**
@@ -229,7 +229,6 @@ function renderToStream(code, options = {}) {
229
229
  }
230
230
  });
231
231
  }
232
- //#endregion
233
232
  export { renderToStream };
234
233
 
235
234
  //# sourceMappingURL=stream.js.map
@@ -1,4 +1,3 @@
1
- //#region src/spread.d.ts
2
1
  /**
3
2
  * Applies a whole props object to an element and keeps it in sync: the helper compiled JSX calls for
4
3
  * `{...props}` on an element. The props are read inside a render effect, so a getter (or the props
@@ -45,5 +44,4 @@
45
44
  * @since 1.0.0
46
45
  */
47
46
  export declare function spread(el: Element, props: unknown, isSVG?: boolean, skipChildren?: boolean): void;
48
- //#endregion
49
47
  //# sourceMappingURL=spread.d.ts.map
@@ -7,7 +7,7 @@ import { IGNORED_KEYS, attributeName, eventPlan } from "./internal/react-names.j
7
7
  import { bindEvent } from "./events.js";
8
8
  import { selectShows, setSelectValue } from "./select-value.js";
9
9
  import { onCleanup, untrack, useRenderEffect } from "@shadow-js/core";
10
- //#region src/spread.ts
10
+ // src/spread.ts
11
11
  /** The namespace of `xlink:` attributes (SVG's legacy links). */
12
12
  const XLINK_NS = "http://www.w3.org/1999/xlink";
13
13
  /** The HTML of a `dangerouslySetInnerHTML` value (`{ __html }`); null and undefined mean empty. */
@@ -290,7 +290,6 @@ function spread(el, props, isSVG = false, skipChildren = false) {
290
290
  applyEntries(el, entries, state, isSVG);
291
291
  });
292
292
  }
293
- //#endregion
294
293
  export { spread };
295
294
 
296
295
  //# sourceMappingURL=spread.js.map
@@ -1,4 +1,3 @@
1
- //#region src/template.d.ts
2
1
  /**
3
2
  * Turns a static HTML string into a factory of fresh DOM copies: the helper compiled JSX uses for the
4
3
  * static part of every element tree. The markup is parsed on the first call and cloned on every call
@@ -22,5 +21,4 @@
22
21
  * @since 1.0.0
23
22
  */
24
23
  export declare function template(html: string, flags?: number): () => Node;
25
- //#endregion
26
24
  //# sourceMappingURL=template.d.ts.map
@@ -3,7 +3,7 @@ import { MATHML_NS } from "./internal/names.js";
3
3
  import { nextKey } from "./internal/hydration-scope.js";
4
4
  import { checkClaimedTag } from "./internal/claim.js";
5
5
  import { claims } from "./internal/hydration-hooks.js";
6
- //#region src/template.ts
6
+ // src/template.ts
7
7
  /** One start tag: its name, then its attribute text (group 1). */
8
8
  const START_TAG = /<[a-zA-Z][^\s/>]*((?:\s+[^\s"'>/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]+))?)*)\s*\/?>/g;
9
9
  /** One attribute inside the attribute text of a start tag: its name (group 1). */
@@ -114,7 +114,6 @@ function template(html, flags = 0) {
114
114
  return fragment;
115
115
  };
116
116
  }
117
- //#endregion
118
117
  export { template };
119
118
 
120
119
  //# sourceMappingURL=template.js.map
@@ -1,5 +1,4 @@
1
1
  import { Accessor } from "@shadow-js/core";
2
- //#region src/view-transition.d.ts
3
2
  /**
4
3
  * Options of {@link startViewTransition}.
5
4
  * @since 1.0.0
@@ -93,5 +92,4 @@ export interface ViewTransitionProps {
93
92
  * @since 1.0.0
94
93
  */
95
94
  export declare function ViewTransition(props: ViewTransitionProps): Accessor<unknown>;
96
- //#endregion
97
95
  //# sourceMappingURL=view-transition.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { flushSync, untrack, useEffect, useId } from "@shadow-js/core";
2
- //#region src/view-transition.ts
2
+ // src/view-transition.ts
3
3
  /**
4
4
  * Runs `update` inside a browser view transition, so the change animates from the old screen to the
5
5
  * new one, and resolves when the animation has finished. Without the API (older browsers, or a
@@ -115,7 +115,6 @@ function setOrClear(element, property, value) {
115
115
  if (value === void 0 || value === "") element.style.removeProperty(property);
116
116
  else element.style.setProperty(property, value);
117
117
  }
118
- //#endregion
119
118
  export { ViewTransition, startViewTransition };
120
119
 
121
120
  //# sourceMappingURL=view-transition.js.map
@@ -1,5 +1,5 @@
1
1
  import { invalidAttributeName, warnOnce } from "./internal/diagnostics.js";
2
- //#region src/attributes.ts
2
+ // src/attributes.ts
3
3
  /** Names that can appear in markup: an XML-name subset without `@` or whitespace. */
4
4
  const ATTRIBUTE_NAME = /^[A-Za-z_:][A-Za-z0-9_:.-]*$/;
5
5
  /**
@@ -190,7 +190,6 @@ function setBoolAttribute(el, name, value) {
190
190
  if (!present) el.setAttribute(name, "");
191
191
  } else if (present) el.removeAttribute(name);
192
192
  }
193
- //#endregion
194
193
  export { assertAttributeName, isUnsafeUrlAttribute, setAttribute, setAttributeNS, setBoolAttribute };
195
194
 
196
195
  //# sourceMappingURL=attributes.js.map