solid-js 1.9.1 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web/dist/dev.cjs CHANGED
@@ -689,59 +689,59 @@ function Dynamic(props) {
689
689
  });
690
690
  }
691
691
 
692
- Object.defineProperty(exports, 'ErrorBoundary', {
692
+ Object.defineProperty(exports, "ErrorBoundary", {
693
693
  enumerable: true,
694
694
  get: function () { return solidJs.ErrorBoundary; }
695
695
  });
696
- Object.defineProperty(exports, 'For', {
696
+ Object.defineProperty(exports, "For", {
697
697
  enumerable: true,
698
698
  get: function () { return solidJs.For; }
699
699
  });
700
- Object.defineProperty(exports, 'Index', {
700
+ Object.defineProperty(exports, "Index", {
701
701
  enumerable: true,
702
702
  get: function () { return solidJs.Index; }
703
703
  });
704
- Object.defineProperty(exports, 'Match', {
704
+ Object.defineProperty(exports, "Match", {
705
705
  enumerable: true,
706
706
  get: function () { return solidJs.Match; }
707
707
  });
708
- Object.defineProperty(exports, 'Show', {
708
+ Object.defineProperty(exports, "Show", {
709
709
  enumerable: true,
710
710
  get: function () { return solidJs.Show; }
711
711
  });
712
- Object.defineProperty(exports, 'Suspense', {
712
+ Object.defineProperty(exports, "Suspense", {
713
713
  enumerable: true,
714
714
  get: function () { return solidJs.Suspense; }
715
715
  });
716
- Object.defineProperty(exports, 'SuspenseList', {
716
+ Object.defineProperty(exports, "SuspenseList", {
717
717
  enumerable: true,
718
718
  get: function () { return solidJs.SuspenseList; }
719
719
  });
720
- Object.defineProperty(exports, 'Switch', {
720
+ Object.defineProperty(exports, "Switch", {
721
721
  enumerable: true,
722
722
  get: function () { return solidJs.Switch; }
723
723
  });
724
- Object.defineProperty(exports, 'createComponent', {
724
+ Object.defineProperty(exports, "createComponent", {
725
725
  enumerable: true,
726
726
  get: function () { return solidJs.createComponent; }
727
727
  });
728
- Object.defineProperty(exports, 'effect', {
728
+ Object.defineProperty(exports, "effect", {
729
729
  enumerable: true,
730
730
  get: function () { return solidJs.createRenderEffect; }
731
731
  });
732
- Object.defineProperty(exports, 'getOwner', {
732
+ Object.defineProperty(exports, "getOwner", {
733
733
  enumerable: true,
734
734
  get: function () { return solidJs.getOwner; }
735
735
  });
736
- Object.defineProperty(exports, 'memo', {
736
+ Object.defineProperty(exports, "memo", {
737
737
  enumerable: true,
738
738
  get: function () { return solidJs.createMemo; }
739
739
  });
740
- Object.defineProperty(exports, 'mergeProps', {
740
+ Object.defineProperty(exports, "mergeProps", {
741
741
  enumerable: true,
742
742
  get: function () { return solidJs.mergeProps; }
743
743
  });
744
- Object.defineProperty(exports, 'untrack', {
744
+ Object.defineProperty(exports, "untrack", {
745
745
  enumerable: true,
746
746
  get: function () { return solidJs.untrack; }
747
747
  });
@@ -421,8 +421,13 @@ function ssrElement(tag, props, children, needsId) {
421
421
  classResolved = true;
422
422
  } else if (BooleanAttributes.has(prop)) {
423
423
  if (value) result += prop;else continue;
424
- } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on") {
424
+ } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
425
425
  continue;
426
+ } else if (prop.slice(0, 5) === "bool:") {
427
+ if (!value) continue;
428
+ result += escape(prop.slice(5));
429
+ } else if (prop.slice(0, 5) === "attr:") {
430
+ result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
426
431
  } else {
427
432
  result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
428
433
  }
@@ -539,7 +544,7 @@ function Hydration(props) {
539
544
  return res;
540
545
  }
541
546
  function NoHydration(props) {
542
- solidJs.sharedConfig.context.noHydrate = true;
547
+ if (solidJs.sharedConfig.context) solidJs.sharedConfig.context.noHydrate = true;
543
548
  return props.children;
544
549
  }
545
550
  function queue(fn) {
@@ -643,15 +648,13 @@ function ssrSpread(props, isSVG, skipChildren) {
643
648
  if (value) result += prop;else continue;
644
649
  } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
645
650
  continue;
651
+ } else if (prop.slice(0, 5) === "bool:") {
652
+ if (!value) continue;
653
+ result += escape(prop.slice(5));
654
+ } else if (prop.slice(0, 5) === "attr:") {
655
+ result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
646
656
  } else {
647
- if (prop.slice(0, 5) === "bool:") {
648
- if (!value) continue;
649
- prop = prop.slice(5);
650
- result += `${escape(prop)}`;
651
- } else {
652
- if (prop.slice(0, 5) === "attr:") prop = prop.slice(5);
653
- result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
654
- }
657
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
655
658
  }
656
659
  if (i !== keys.length - 1) result += " ";
657
660
  }
@@ -677,59 +680,59 @@ function Portal(props) {
677
680
  return "";
678
681
  }
679
682
 
680
- Object.defineProperty(exports, 'ErrorBoundary', {
683
+ Object.defineProperty(exports, "ErrorBoundary", {
681
684
  enumerable: true,
682
685
  get: function () { return solidJs.ErrorBoundary; }
683
686
  });
684
- Object.defineProperty(exports, 'For', {
687
+ Object.defineProperty(exports, "For", {
685
688
  enumerable: true,
686
689
  get: function () { return solidJs.For; }
687
690
  });
688
- Object.defineProperty(exports, 'Index', {
691
+ Object.defineProperty(exports, "Index", {
689
692
  enumerable: true,
690
693
  get: function () { return solidJs.Index; }
691
694
  });
692
- Object.defineProperty(exports, 'Match', {
695
+ Object.defineProperty(exports, "Match", {
693
696
  enumerable: true,
694
697
  get: function () { return solidJs.Match; }
695
698
  });
696
- Object.defineProperty(exports, 'Show', {
699
+ Object.defineProperty(exports, "Show", {
697
700
  enumerable: true,
698
701
  get: function () { return solidJs.Show; }
699
702
  });
700
- Object.defineProperty(exports, 'Suspense', {
703
+ Object.defineProperty(exports, "Suspense", {
701
704
  enumerable: true,
702
705
  get: function () { return solidJs.Suspense; }
703
706
  });
704
- Object.defineProperty(exports, 'SuspenseList', {
707
+ Object.defineProperty(exports, "SuspenseList", {
705
708
  enumerable: true,
706
709
  get: function () { return solidJs.SuspenseList; }
707
710
  });
708
- Object.defineProperty(exports, 'Switch', {
711
+ Object.defineProperty(exports, "Switch", {
709
712
  enumerable: true,
710
713
  get: function () { return solidJs.Switch; }
711
714
  });
712
- Object.defineProperty(exports, 'createComponent', {
715
+ Object.defineProperty(exports, "createComponent", {
713
716
  enumerable: true,
714
717
  get: function () { return solidJs.createComponent; }
715
718
  });
716
- Object.defineProperty(exports, 'effect', {
719
+ Object.defineProperty(exports, "effect", {
717
720
  enumerable: true,
718
721
  get: function () { return solidJs.createRenderEffect; }
719
722
  });
720
- Object.defineProperty(exports, 'getOwner', {
723
+ Object.defineProperty(exports, "getOwner", {
721
724
  enumerable: true,
722
725
  get: function () { return solidJs.getOwner; }
723
726
  });
724
- Object.defineProperty(exports, 'memo', {
727
+ Object.defineProperty(exports, "memo", {
725
728
  enumerable: true,
726
729
  get: function () { return solidJs.createMemo; }
727
730
  });
728
- Object.defineProperty(exports, 'mergeProps', {
731
+ Object.defineProperty(exports, "mergeProps", {
729
732
  enumerable: true,
730
733
  get: function () { return solidJs.mergeProps; }
731
734
  });
732
- Object.defineProperty(exports, 'untrack', {
735
+ Object.defineProperty(exports, "untrack", {
733
736
  enumerable: true,
734
737
  get: function () { return solidJs.untrack; }
735
738
  });
@@ -875,8 +875,18 @@ function ssrElement(tag, props, children, needsId) {
875
875
  } else if (BooleanAttributes.has(prop)) {
876
876
  if (value) result += prop;
877
877
  else continue;
878
- } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on") {
878
+ } else if (
879
+ value == undefined ||
880
+ prop === "ref" ||
881
+ prop.slice(0, 2) === "on" ||
882
+ prop.slice(0, 5) === "prop:"
883
+ ) {
879
884
  continue;
885
+ } else if (prop.slice(0, 5) === "bool:") {
886
+ if (!value) continue;
887
+ result += escape(prop.slice(5));
888
+ } else if (prop.slice(0, 5) === "attr:") {
889
+ result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
880
890
  } else {
881
891
  result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
882
892
  }
@@ -996,7 +1006,7 @@ function Hydration(props) {
996
1006
  return res;
997
1007
  }
998
1008
  function NoHydration(props) {
999
- sharedConfig.context.noHydrate = true;
1009
+ if (sharedConfig.context) sharedConfig.context.noHydrate = true;
1000
1010
  return props.children;
1001
1011
  }
1002
1012
  function queue(fn) {
@@ -1110,15 +1120,13 @@ function ssrSpread(props, isSVG, skipChildren) {
1110
1120
  prop.slice(0, 5) === "prop:"
1111
1121
  ) {
1112
1122
  continue;
1123
+ } else if (prop.slice(0, 5) === "bool:") {
1124
+ if (!value) continue;
1125
+ result += escape(prop.slice(5));
1126
+ } else if (prop.slice(0, 5) === "attr:") {
1127
+ result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
1113
1128
  } else {
1114
- if (prop.slice(0, 5) === "bool:") {
1115
- if (!value) continue;
1116
- prop = prop.slice(5);
1117
- result += `${escape(prop)}`;
1118
- } else {
1119
- if (prop.slice(0, 5) === "attr:") prop = prop.slice(5);
1120
- result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
1121
- }
1129
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
1122
1130
  }
1123
1131
  if (i !== keys.length - 1) result += " ";
1124
1132
  }
package/web/dist/web.cjs CHANGED
@@ -678,59 +678,59 @@ function Dynamic(props) {
678
678
  });
679
679
  }
680
680
 
681
- Object.defineProperty(exports, 'ErrorBoundary', {
681
+ Object.defineProperty(exports, "ErrorBoundary", {
682
682
  enumerable: true,
683
683
  get: function () { return solidJs.ErrorBoundary; }
684
684
  });
685
- Object.defineProperty(exports, 'For', {
685
+ Object.defineProperty(exports, "For", {
686
686
  enumerable: true,
687
687
  get: function () { return solidJs.For; }
688
688
  });
689
- Object.defineProperty(exports, 'Index', {
689
+ Object.defineProperty(exports, "Index", {
690
690
  enumerable: true,
691
691
  get: function () { return solidJs.Index; }
692
692
  });
693
- Object.defineProperty(exports, 'Match', {
693
+ Object.defineProperty(exports, "Match", {
694
694
  enumerable: true,
695
695
  get: function () { return solidJs.Match; }
696
696
  });
697
- Object.defineProperty(exports, 'Show', {
697
+ Object.defineProperty(exports, "Show", {
698
698
  enumerable: true,
699
699
  get: function () { return solidJs.Show; }
700
700
  });
701
- Object.defineProperty(exports, 'Suspense', {
701
+ Object.defineProperty(exports, "Suspense", {
702
702
  enumerable: true,
703
703
  get: function () { return solidJs.Suspense; }
704
704
  });
705
- Object.defineProperty(exports, 'SuspenseList', {
705
+ Object.defineProperty(exports, "SuspenseList", {
706
706
  enumerable: true,
707
707
  get: function () { return solidJs.SuspenseList; }
708
708
  });
709
- Object.defineProperty(exports, 'Switch', {
709
+ Object.defineProperty(exports, "Switch", {
710
710
  enumerable: true,
711
711
  get: function () { return solidJs.Switch; }
712
712
  });
713
- Object.defineProperty(exports, 'createComponent', {
713
+ Object.defineProperty(exports, "createComponent", {
714
714
  enumerable: true,
715
715
  get: function () { return solidJs.createComponent; }
716
716
  });
717
- Object.defineProperty(exports, 'effect', {
717
+ Object.defineProperty(exports, "effect", {
718
718
  enumerable: true,
719
719
  get: function () { return solidJs.createRenderEffect; }
720
720
  });
721
- Object.defineProperty(exports, 'getOwner', {
721
+ Object.defineProperty(exports, "getOwner", {
722
722
  enumerable: true,
723
723
  get: function () { return solidJs.getOwner; }
724
724
  });
725
- Object.defineProperty(exports, 'memo', {
725
+ Object.defineProperty(exports, "memo", {
726
726
  enumerable: true,
727
727
  get: function () { return solidJs.createMemo; }
728
728
  });
729
- Object.defineProperty(exports, 'mergeProps', {
729
+ Object.defineProperty(exports, "mergeProps", {
730
730
  enumerable: true,
731
731
  get: function () { return solidJs.mergeProps; }
732
732
  });
733
- Object.defineProperty(exports, 'untrack', {
733
+ Object.defineProperty(exports, "untrack", {
734
734
  enumerable: true,
735
735
  get: function () { return solidJs.untrack; }
736
736
  });
@@ -25,7 +25,7 @@ export function delegateEvents(eventNames: string[], d?: Document): void;
25
25
  export function clearDelegatedEvents(d?: Document): void;
26
26
  export function spread<T>(
27
27
  node: Element,
28
- accessor: (() => T) | T,
28
+ accessor: T,
29
29
  isSVG?: Boolean,
30
30
  skipChildren?: Boolean
31
31
  ): void;
@@ -129,7 +129,7 @@ export function insert<T>(
129
129
  /** @deprecated not supported on the server side */
130
130
  export function spread<T>(
131
131
  node: Element,
132
- accessor: (() => T) | T,
132
+ accessor: T,
133
133
  isSVG?: Boolean,
134
134
  skipChildren?: Boolean
135
135
  ): void;