solid-js 1.5.1 → 1.5.4

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.
@@ -283,9 +283,10 @@ export namespace JSX {
283
283
  onanimationiteration?: EventHandlerUnion<T, AnimationEvent>;
284
284
  ontransitionend?: EventHandlerUnion<T, TransitionEvent>;
285
285
  }
286
-
286
+
287
287
  interface CSSProperties extends csstype.PropertiesHyphen {
288
288
  // Override
289
+ [key: `-${string}`]: string | number | undefined
289
290
  }
290
291
 
291
292
  type HTMLAutocapitalize = "off" | "none" | "on" | "sentences" | "words" | "characters";
@@ -527,6 +528,77 @@ export namespace JSX {
527
528
  "aria-valuenow"?: number | string;
528
529
  /** Defines the human readable text alternative of aria-valuenow for a range widget. */
529
530
  "aria-valuetext"?: string;
531
+ role?: FunctionMaybe<
532
+ | "alert"
533
+ | "alertdialog"
534
+ | "application"
535
+ | "article"
536
+ | "banner"
537
+ | "button"
538
+ | "cell"
539
+ | "checkbox"
540
+ | "columnheader"
541
+ | "combobox"
542
+ | "complementary"
543
+ | "contentinfo"
544
+ | "definition"
545
+ | "dialog"
546
+ | "directory"
547
+ | "document"
548
+ | "feed"
549
+ | "figure"
550
+ | "form"
551
+ | "grid"
552
+ | "gridcell"
553
+ | "group"
554
+ | "heading"
555
+ | "img"
556
+ | "link"
557
+ | "list"
558
+ | "listbox"
559
+ | "listitem"
560
+ | "log"
561
+ | "main"
562
+ | "marquee"
563
+ | "math"
564
+ | "menu"
565
+ | "menubar"
566
+ | "menuitem"
567
+ | "menuitemcheckbox"
568
+ | "menuitemradio"
569
+ | "meter"
570
+ | "navigation"
571
+ | "none"
572
+ | "note"
573
+ | "option"
574
+ | "presentation"
575
+ | "progressbar"
576
+ | "radio"
577
+ | "radiogroup"
578
+ | "region"
579
+ | "row"
580
+ | "rowgroup"
581
+ | "rowheader"
582
+ | "scrollbar"
583
+ | "search"
584
+ | "searchbox"
585
+ | "separator"
586
+ | "slider"
587
+ | "spinbutton"
588
+ | "status"
589
+ | "switch"
590
+ | "tab"
591
+ | "table"
592
+ | "tablist"
593
+ | "tabpanel"
594
+ | "term"
595
+ | "textbox"
596
+ | "timer"
597
+ | "toolbar"
598
+ | "tooltip"
599
+ | "tree"
600
+ | "treegrid"
601
+ | "treeitem">;
530
602
  }
531
603
 
532
604
  interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
@@ -552,77 +624,6 @@ export namespace JSX {
552
624
  resource?: FunctionMaybe<string>;
553
625
  typeof?: FunctionMaybe<string>;
554
626
  vocab?: FunctionMaybe<string>;
555
- role?: FunctionMaybe<
556
- | "alert"
557
- | "alertdialog"
558
- | "application"
559
- | "article"
560
- | "banner"
561
- | "button"
562
- | "cell"
563
- | "checkbox"
564
- | "columnheader"
565
- | "combobox"
566
- | "complementary"
567
- | "contentinfo"
568
- | "definition"
569
- | "dialog"
570
- | "directory"
571
- | "document"
572
- | "feed"
573
- | "figure"
574
- | "form"
575
- | "grid"
576
- | "gridcell"
577
- | "group"
578
- | "heading"
579
- | "img"
580
- | "link"
581
- | "list"
582
- | "listbox"
583
- | "listitem"
584
- | "log"
585
- | "main"
586
- | "marquee"
587
- | "math"
588
- | "menu"
589
- | "menubar"
590
- | "menuitem"
591
- | "menuitemcheckbox"
592
- | "menuitemradio"
593
- | "meter"
594
- | "navigation"
595
- | "none"
596
- | "note"
597
- | "option"
598
- | "presentation"
599
- | "progressbar"
600
- | "radio"
601
- | "radiogroup"
602
- | "region"
603
- | "row"
604
- | "rowgroup"
605
- | "rowheader"
606
- | "scrollbar"
607
- | "search"
608
- | "searchbox"
609
- | "separator"
610
- | "slider"
611
- | "spinbutton"
612
- | "status"
613
- | "switch"
614
- | "tab"
615
- | "table"
616
- | "tablist"
617
- | "tabpanel"
618
- | "term"
619
- | "textbox"
620
- | "timer"
621
- | "toolbar"
622
- | "tooltip"
623
- | "tree"
624
- | "treegrid"
625
- | "treeitem">;
626
627
  autocapitalize?: FunctionMaybe<HTMLAutocapitalize>;
627
628
  slot?: FunctionMaybe<string>;
628
629
  color?: FunctionMaybe<string>;
@@ -1082,7 +1083,7 @@ export namespace JSX {
1082
1083
  | "defer xMidYMax slice"
1083
1084
  | "defer xMaxYMax slice";
1084
1085
  type SVGUnits = "userSpaceOnUse" | "objectBoundingBox";
1085
- interface CoreSVGAttributes<T> extends DOMAttributes<T> {
1086
+ interface CoreSVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
1086
1087
  id?: FunctionMaybe<string>;
1087
1088
  lang?: FunctionMaybe<string>;
1088
1089
  tabIndex?: FunctionMaybe<number | string>;
package/h/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "solid-js/h",
3
+ "main": "./dist/h.cjs",
4
+ "module": "./dist/h.js",
5
+ "types": "./types/index.d.ts",
6
+ "type": "module",
7
+ "sideEffects": false
8
+ }
@@ -420,7 +420,7 @@ function createHTML(r, {
420
420
  options.first = false;
421
421
  processChildren(node, options);
422
422
  if (topDecl) {
423
- options.decl[0] = options.hasCustomElement ? `const ${tag} = document.importNode(tmpls[${templateId}].content.firstChild, true)` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
423
+ options.decl[0] = options.hasCustomElement ? `const ${tag} = r.untrack(() => document.importNode(tmpls[${templateId}].content.firstChild, true))` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
424
424
  }
425
425
  } else if (node.type === "text") {
426
426
  const tag = `_$el${uuid++}`;
@@ -479,6 +479,7 @@ var index = createHTML({
479
479
  effect: web.effect,
480
480
  style: web.style,
481
481
  insert: web.insert,
482
+ untrack: web.untrack,
482
483
  spread: web.spread,
483
484
  createComponent: web.createComponent,
484
485
  delegateEvents: web.delegateEvents,
package/html/dist/html.js CHANGED
@@ -1,4 +1,4 @@
1
- import { effect, style, insert, spread, createComponent, delegateEvents, classList, mergeProps, dynamicProperty, setAttribute, setAttributeNS, addEventListener, Aliases, PropAliases, Properties, ChildProperties, DelegatedEvents, SVGElements, SVGNamespace } from 'solid-js/web';
1
+ import { effect, style, insert, untrack, spread, createComponent, delegateEvents, classList, mergeProps, dynamicProperty, setAttribute, setAttributeNS, addEventListener, Aliases, PropAliases, Properties, ChildProperties, DelegatedEvents, SVGElements, SVGNamespace } from 'solid-js/web';
2
2
 
3
3
  const tagRE = /(?:<!--[\S\s]*?-->|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g;
4
4
  const attrRE = /(?:\s(?<boolean>[^/\s><=]+?)(?=[\s/>]))|(?:(?<name>\S+?)(?:\s*=\s*(?:(['"])(?<quotedValue>[\s\S]*?)\3|(?<unquotedValue>[^\s>]+))))/g;
@@ -418,7 +418,7 @@ function createHTML(r, {
418
418
  options.first = false;
419
419
  processChildren(node, options);
420
420
  if (topDecl) {
421
- options.decl[0] = options.hasCustomElement ? `const ${tag} = document.importNode(tmpls[${templateId}].content.firstChild, true)` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
421
+ options.decl[0] = options.hasCustomElement ? `const ${tag} = r.untrack(() => document.importNode(tmpls[${templateId}].content.firstChild, true))` : `const ${tag} = tmpls[${templateId}].content.firstChild.cloneNode(true)`;
422
422
  }
423
423
  } else if (node.type === "text") {
424
424
  const tag = `_$el${uuid++}`;
@@ -477,6 +477,7 @@ var index = createHTML({
477
477
  effect,
478
478
  style,
479
479
  insert,
480
+ untrack,
480
481
  spread,
481
482
  createComponent,
482
483
  delegateEvents,
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "solid-js/html",
3
+ "main": "./dist/html.cjs",
4
+ "module": "./dist/html.js",
5
+ "types": "./types/index.d.ts",
6
+ "type": "module",
7
+ "sideEffects": false
8
+ }
@@ -1,6 +1,7 @@
1
1
  declare type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
2
2
  interface Runtime {
3
3
  effect<T>(fn: (prev?: T) => T, init?: T): any;
4
+ untrack<T>(fn: () => T): T;
4
5
  insert(parent: MountableElement, accessor: any, marker?: Node | null, init?: any): any;
5
6
  spread<T>(node: Element, accessor: (() => T) | T, isSVG?: Boolean, skipChildren?: Boolean): void;
6
7
  createComponent(Comp: (props: any) => any, props: any): any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "A declarative JavaScript library for building user interfaces.",
4
- "version": "1.5.1",
4
+ "version": "1.5.4",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -23,16 +23,22 @@
23
23
  "dist",
24
24
  "store/dist",
25
25
  "store/types",
26
+ "store/package.json",
26
27
  "web/dist",
27
28
  "web/types",
29
+ "web/package.json",
28
30
  "h/dist",
29
31
  "h/types",
32
+ "h/package.json",
30
33
  "h/jsx-runtime/dist",
31
34
  "h/jsx-runtime/types",
35
+ "h/jsx-runtime/package.json",
32
36
  "html/dist",
33
37
  "html/types",
38
+ "html/package.json",
34
39
  "universal/dist",
35
40
  "universal/types",
41
+ "universal/package.json",
36
42
  "types",
37
43
  "jsx-runtime.d.ts"
38
44
  ],
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "solid-js/store",
3
+ "main": "./dist/server.cjs",
4
+ "module": "./dist/server.js",
5
+ "browser": {
6
+ "./dist/server.cjs": "./dist/store.cjs",
7
+ "./dist/server.js": "./dist/store.js"
8
+ },
9
+ "unpkg": "./dist/store.cjs",
10
+ "types": "./types/index.d.ts",
11
+ "type": "module",
12
+ "sideEffects": false,
13
+ "exports": {
14
+ ".": {
15
+ "browser": {
16
+ "development": {
17
+ "import": {
18
+ "types": "./types/index.d.ts",
19
+ "default": "./dist/dev.js"
20
+ },
21
+ "require": "./dist/dev.cjs"
22
+ },
23
+ "import": {
24
+ "types": "./types/index.d.ts",
25
+ "default": "./dist/store.js"
26
+ },
27
+ "require": "./dist/store.cjs"
28
+ },
29
+ "node": {
30
+ "import": {
31
+ "types": "./types/index.d.ts",
32
+ "default": "./dist/server.js"
33
+ },
34
+ "require": "./dist/server.cjs"
35
+ },
36
+ "development": {
37
+ "import": {
38
+ "types": "./types/index.d.ts",
39
+ "default": "./dist/dev.js"
40
+ },
41
+ "require": "./dist/dev.cjs"
42
+ },
43
+ "import": {
44
+ "types": "./types/index.d.ts",
45
+ "default": "./dist/store.js"
46
+ },
47
+ "require": "./dist/store.cjs"
48
+ }
49
+ }
50
+ }
package/types/jsx.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as csstype from 'csstype/index.js';
1
+ import * as csstype from 'csstype';
2
2
 
3
3
  /**
4
4
  * Based on JSX types for Surplus and Inferno and adapted for `dom-expressions`.
@@ -285,6 +285,7 @@ export namespace JSX {
285
285
 
286
286
  interface CSSProperties extends csstype.PropertiesHyphen {
287
287
  // Override
288
+ [key: `-${string}`]: string | number | undefined
288
289
  }
289
290
 
290
291
  type HTMLAutocapitalize = "off" | "none" | "on" | "sentences" | "words" | "characters";
@@ -526,40 +527,6 @@ export namespace JSX {
526
527
  "aria-valuenow"?: number | string;
527
528
  /** Defines the human readable text alternative of aria-valuenow for a range widget. */
528
529
  "aria-valuetext"?: string;
529
- }
530
-
531
- // TODO: Should we allow this?
532
- // type ClassKeys = `class:${string}`;
533
- // type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
534
-
535
- // type CSSAttributes = {
536
- // [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
537
- // };
538
-
539
- interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
540
- // [key: ClassKeys]: boolean;
541
- accessKey?: string;
542
- class?: string;
543
- contenteditable?: boolean | "inherit";
544
- contextmenu?: string;
545
- dir?: HTMLDir;
546
- draggable?: boolean;
547
- hidden?: boolean;
548
- id?: string;
549
- lang?: string;
550
- spellcheck?: boolean;
551
- style?: CSSProperties | string;
552
- tabindex?: number | string;
553
- title?: string;
554
- translate?: "yes" | "no";
555
- about?: string;
556
- datatype?: string;
557
- inlist?: any;
558
- prefix?: string;
559
- property?: string;
560
- resource?: string;
561
- typeof?: string;
562
- vocab?: string;
563
530
  role?:
564
531
  | "alert"
565
532
  | "alertdialog"
@@ -631,6 +598,40 @@ export namespace JSX {
631
598
  | "tree"
632
599
  | "treegrid"
633
600
  | "treeitem";
601
+ }
602
+
603
+ // TODO: Should we allow this?
604
+ // type ClassKeys = `class:${string}`;
605
+ // type CSSKeys = Exclude<keyof csstype.PropertiesHyphen, `-${string}`>;
606
+
607
+ // type CSSAttributes = {
608
+ // [key in CSSKeys as `style:${key}`]: csstype.PropertiesHyphen[key];
609
+ // };
610
+
611
+ interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
612
+ // [key: ClassKeys]: boolean;
613
+ accessKey?: string;
614
+ class?: string;
615
+ contenteditable?: boolean | "inherit";
616
+ contextmenu?: string;
617
+ dir?: HTMLDir;
618
+ draggable?: boolean;
619
+ hidden?: boolean;
620
+ id?: string;
621
+ lang?: string;
622
+ spellcheck?: boolean;
623
+ style?: CSSProperties | string;
624
+ tabindex?: number | string;
625
+ title?: string;
626
+ translate?: "yes" | "no";
627
+ about?: string;
628
+ datatype?: string;
629
+ inlist?: any;
630
+ prefix?: string;
631
+ property?: string;
632
+ resource?: string;
633
+ typeof?: string;
634
+ vocab?: string;
634
635
  autocapitalize?: HTMLAutocapitalize;
635
636
  slot?: string;
636
637
  color?: string;
@@ -1090,7 +1091,7 @@ export namespace JSX {
1090
1091
  | "defer xMidYMax slice"
1091
1092
  | "defer xMaxYMax slice";
1092
1093
  type SVGUnits = "userSpaceOnUse" | "objectBoundingBox";
1093
- interface CoreSVGAttributes<T> extends DOMAttributes<T> {
1094
+ interface CoreSVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
1094
1095
  id?: string;
1095
1096
  lang?: string;
1096
1097
  tabIndex?: number | string;
@@ -25,8 +25,8 @@ export declare function observable<T>(input: Accessor<T>): {
25
25
  };
26
26
  [Symbol.observable](): any;
27
27
  };
28
- export declare function from<T>(producer: ((setter: Setter<T>) => () => void) | {
28
+ export declare function from<T>(producer: ((setter: Setter<T | undefined>) => () => void) | {
29
29
  subscribe: (fn: (v: T) => void) => (() => void) | {
30
30
  unsubscribe: () => void;
31
31
  };
32
- }): Accessor<T>;
32
+ }): Accessor<T | undefined>;
@@ -234,7 +234,7 @@ interface Errored {
234
234
  export declare type Resource<T> = Unresolved | Pending | Ready<T> | Refreshing<T> | Errored;
235
235
  export declare type InitializedResource<T> = Ready<T> | Refreshing<T> | Errored;
236
236
  export declare type ResourceActions<T, R = unknown> = {
237
- mutate: Setter<T | undefined>;
237
+ mutate: Setter<T>;
238
238
  refetch: (info?: R) => T | Promise<T> | undefined | null;
239
239
  };
240
240
  export declare type ResourceSource<S> = S | false | null | undefined | (() => S | false | null | undefined);
@@ -256,7 +256,10 @@ export declare type ResourceOptions<T, S = unknown> = {
256
256
  export declare type InitializedResourceOptions<T, S = unknown> = ResourceOptions<T, S> & {
257
257
  initialValue: T;
258
258
  };
259
- export declare type ResourceReturn<T, R = unknown> = [Resource<T>, ResourceActions<T, R>];
259
+ export declare type ResourceReturn<T, R = unknown> = [
260
+ Resource<T>,
261
+ ResourceActions<T | undefined, R>
262
+ ];
260
263
  export declare type InitializedResourceReturn<T, R = unknown> = [
261
264
  InitializedResource<T>,
262
265
  ResourceActions<T, R>
@@ -1,3 +1,3 @@
1
- export { createRoot, createSignal, createComputed, createRenderEffect, createEffect, createReaction, createDeferred, createSelector, createMemo, getListener, onMount, onCleanup, onError, untrack, batch, on, children, createContext, useContext, getOwner, runWithOwner, equalFn, requestCallback, mapArray, observable, from, $PROXY, $DEVCOMP, DEV, enableExternalSource } from "./reactive.js";
1
+ export { createRoot, createSignal, createComputed, createRenderEffect, createEffect, createReaction, createDeferred, createSelector, createMemo, getListener, onMount, onCleanup, onError, untrack, batch, on, children, createContext, useContext, getOwner, runWithOwner, equalFn, requestCallback, mapArray, observable, from, $PROXY, $DEVCOMP, $TRACK, DEV, enableExternalSource } from "./reactive.js";
2
2
  export { mergeProps, splitProps, createComponent, For, Index, Show, Switch, Match, ErrorBoundary, Suspense, SuspenseList, createResource, resetErrorBoundaries, enableScheduling, enableHydration, startTransition, useTransition, createUniqueId, lazy, sharedConfig } from "./rendering.js";
3
3
  export type { Component, Resource } from "./rendering.js";
@@ -1,5 +1,6 @@
1
1
  export declare const equalFn: <T>(a: T, b: T) => boolean;
2
2
  export declare const $PROXY: unique symbol;
3
+ export declare const $TRACK: unique symbol;
3
4
  export declare const $DEVCOMP: unique symbol;
4
5
  export declare const DEV: {};
5
6
  export declare type Accessor<T> = () => T;
@@ -82,7 +82,6 @@ declare type SuspenseContextType = {
82
82
  loading: boolean;
83
83
  error: any;
84
84
  }>;
85
- complete: boolean;
86
85
  completed: () => void;
87
86
  };
88
87
  export declare type ResourceActions<T> = {
@@ -131,6 +130,7 @@ declare type HydrationContext = {
131
130
  count: number;
132
131
  writeResource: (id: string, v: Promise<any> | any, error?: boolean, deferStream?: boolean) => void;
133
132
  replace: (id: string, replacement: () => any) => void;
133
+ block: (p: Promise<any>) => void;
134
134
  resources: Record<string, any>;
135
135
  suspense: Record<string, SuspenseContextType>;
136
136
  registerFragment: (v: string) => (v?: string, err?: any) => boolean;
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "solid-js/universal",
3
+ "main": "./dist/universal.cjs",
4
+ "module": "./dist/universal.js",
5
+ "types": "./types/index.d.ts",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "development": {
11
+ "import": {
12
+ "types": "./types/index.d.ts",
13
+ "default": "./dist/dev.js"
14
+ },
15
+ "require": "./dist/dev.cjs"
16
+ },
17
+ "import": {
18
+ "types": "./types/index.d.ts",
19
+ "default": "./dist/universal.js"
20
+ },
21
+ "require": "./dist/universal.cjs"
22
+ }
23
+ }
24
+ }
package/web/dist/dev.cjs CHANGED
@@ -250,6 +250,8 @@ function hydrate$1(code, element, options = {}) {
250
250
  function getNextElement(template) {
251
251
  let node, key;
252
252
  if (!solidJs.sharedConfig.context || !(node = solidJs.sharedConfig.registry.get(key = getHydrationKey()))) {
253
+ if (solidJs.sharedConfig.context) console.warn("Unable to find DOM nodes for hydration key:", key);
254
+ if (!template) throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
253
255
  return template.cloneNode(true);
254
256
  }
255
257
  if (solidJs.sharedConfig.completed) solidJs.sharedConfig.completed.add(node);
@@ -458,7 +460,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
458
460
  } else if ((typeof item) === "function") {
459
461
  if (unwrap) {
460
462
  while (typeof item === "function") item = item();
461
- dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], prev) || dynamic;
463
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
462
464
  } else {
463
465
  normalized.push(item);
464
466
  dynamic = true;
@@ -644,6 +646,10 @@ Object.defineProperty(exports, 'mergeProps', {
644
646
  enumerable: true,
645
647
  get: function () { return solidJs.mergeProps; }
646
648
  });
649
+ Object.defineProperty(exports, 'untrack', {
650
+ enumerable: true,
651
+ get: function () { return solidJs.untrack; }
652
+ });
647
653
  exports.Aliases = Aliases;
648
654
  exports.Assets = voidFn;
649
655
  exports.ChildProperties = ChildProperties;
package/web/dist/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createMemo, createRoot, createRenderEffect, sharedConfig, untrack, enableHydration, createSignal, onCleanup, splitProps, $DEVCOMP } from 'solid-js';
2
- export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps } from 'solid-js';
2
+ export { ErrorBoundary, For, Index, Match, Show, Suspense, SuspenseList, Switch, createComponent, createRenderEffect as effect, getOwner, mergeProps, untrack } from 'solid-js';
3
3
 
4
4
  const booleans = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"];
5
5
  const Properties = /*#__PURE__*/new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...booleans]);
@@ -247,6 +247,8 @@ function hydrate$1(code, element, options = {}) {
247
247
  function getNextElement(template) {
248
248
  let node, key;
249
249
  if (!sharedConfig.context || !(node = sharedConfig.registry.get(key = getHydrationKey()))) {
250
+ if (sharedConfig.context) console.warn("Unable to find DOM nodes for hydration key:", key);
251
+ if (!template) throw new Error("Unrecoverable Hydration Mismatch. No template for key: " + key);
250
252
  return template.cloneNode(true);
251
253
  }
252
254
  if (sharedConfig.completed) sharedConfig.completed.add(node);
@@ -455,7 +457,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
455
457
  } else if ((typeof item) === "function") {
456
458
  if (unwrap) {
457
459
  while (typeof item === "function") item = item();
458
- dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], prev) || dynamic;
460
+ dynamic = normalizeIncomingArray(normalized, Array.isArray(item) ? item : [item], Array.isArray(prev) ? prev : [prev]) || dynamic;
459
461
  } else {
460
462
  normalized.push(item);
461
463
  dynamic = true;
@@ -266,8 +266,7 @@ function toRefParam(index) {
266
266
  const REPLACE_SCRIPT = `function $df(e,t,d,l){d=document.getElementById(e),(l=document.getElementById("pl-"+e))&&l.replaceWith(...d.childNodes),d.remove(),_$HY.set(e,t)}`;
267
267
  function renderToString(code, options = {}) {
268
268
  let scripts = "";
269
- let context;
270
- solidJs.sharedConfig.context = context = {
269
+ solidJs.sharedConfig.context = {
271
270
  id: options.renderId || "",
272
271
  count: 0,
273
272
  suspense: {},
@@ -279,8 +278,8 @@ function renderToString(code, options = {}) {
279
278
  }
280
279
  };
281
280
  let html = resolveSSRNode(escape(code()));
282
- solidJs.sharedConfig.context = undefined;
283
- html = injectAssets(context.assets, html);
281
+ solidJs.sharedConfig.context.noHydrate = true;
282
+ html = injectAssets(solidJs.sharedConfig.context.assets, html);
284
283
  if (scripts.length) html = injectScripts(html, scripts, options.nonce);
285
284
  return html;
286
285
  }
@@ -354,6 +353,9 @@ function renderToStream(code, options = {}) {
354
353
  suspense: {},
355
354
  assets: [],
356
355
  nonce,
356
+ block(p) {
357
+ if (!firstFlushed) blockingResources.push(p);
358
+ },
357
359
  replace(id, payloadFn) {
358
360
  if (firstFlushed) return;
359
361
  const placeholder = `<!${id}>`;
@@ -393,14 +395,15 @@ function renderToStream(code, options = {}) {
393
395
  }
394
396
  }
395
397
  }
396
- Promise.resolve().then(checkEnd);
398
+ if (!registry.size) Promise.resolve().then(checkEnd);
397
399
  return firstFlushed;
398
400
  };
399
401
  }
400
402
  };
401
403
  let html = resolveSSRNode(escape(code()));
402
404
  function doShell() {
403
- solidJs.sharedConfig.context = undefined;
405
+ solidJs.sharedConfig.context = context;
406
+ context.noHydrate = true;
404
407
  html = injectAssets(context.assets, html);
405
408
  for (const key in context.resources) {
406
409
  if (!("data" in context.resources[key] || context.resources[key].ref[0].error)) pushTask(`_$HY.init("${key}")`);
@@ -429,7 +432,7 @@ function renderToStream(code, options = {}) {
429
432
  complete();
430
433
  };
431
434
  } else onCompleteAll = complete;
432
- checkEnd();
435
+ if (!registry.size) Promise.resolve().then(checkEnd);
433
436
  },
434
437
  pipe(w) {
435
438
  Promise.allSettled(blockingResources).then(() => {
@@ -528,8 +531,8 @@ function ssrElement(tag, props, children, needsId) {
528
531
  let classResolved;
529
532
  for (let i = 0; i < keys.length; i++) {
530
533
  const prop = keys[i];
531
- if (ChildProperties.has(prop) && children === undefined) {
532
- children = prop === "innerHTML" ? props[prop] : escape(props[prop]);
534
+ if (ChildProperties.has(prop)) {
535
+ if (children === undefined) children = prop === "innerHTML" ? props[prop] : escape(props[prop]);
533
536
  continue;
534
537
  }
535
538
  const value = props[prop];
@@ -760,7 +763,9 @@ function ssrSpread(props, isSVG, skipChildren) {
760
763
  }
761
764
 
762
765
  const isServer = true;
766
+ function insert() {}
763
767
  function spread() {}
768
+ function delegateEvents() {}
764
769
  function Dynamic(props) {
765
770
  const [p, others] = solidJs.splitProps(props, ["component"]);
766
771
  const comp = p.component,
@@ -820,10 +825,12 @@ exports.Dynamic = Dynamic;
820
825
  exports.HydrationScript = HydrationScript;
821
826
  exports.NoHydration = NoHydration;
822
827
  exports.Portal = Portal;
828
+ exports.delegateEvents = delegateEvents;
823
829
  exports.escape = escape;
824
830
  exports.generateHydrationScript = generateHydrationScript;
825
831
  exports.getAssets = getAssets;
826
832
  exports.getHydrationKey = getHydrationKey;
833
+ exports.insert = insert;
827
834
  exports.isServer = isServer;
828
835
  exports.pipeToNodeWritable = pipeToNodeWritable;
829
836
  exports.pipeToWritable = pipeToWritable;