solid-js 1.8.0-beta.1 → 1.8.0

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.
@@ -634,7 +634,7 @@ export namespace JSX {
634
634
  interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
635
635
  accessKey?: FunctionMaybe<string>;
636
636
  class?: FunctionMaybe<string> | undefined;
637
- contenteditable?: FunctionMaybe<boolean | "inherit">;
637
+ contenteditable?: FunctionMaybe<boolean | "plaintext-only" | "inherit">;
638
638
  contextmenu?: FunctionMaybe<string>;
639
639
  dir?: FunctionMaybe<HTMLDir>;
640
640
  draggable?: FunctionMaybe<boolean>;
@@ -667,7 +667,7 @@ export namespace JSX {
667
667
  inputmode?: FunctionMaybe<
668
668
  "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search"
669
669
  >;
670
- contentEditable?: FunctionMaybe<boolean | "inherit">;
670
+ contentEditable?: FunctionMaybe<boolean | "plaintext-only" | "inherit">;
671
671
  contextMenu?: FunctionMaybe<string>;
672
672
  tabIndex?: FunctionMaybe<number | string>;
673
673
  autoCapitalize?: FunctionMaybe<HTMLAutocapitalize>;
@@ -1528,6 +1528,15 @@ export namespace JSX {
1528
1528
  azimuth?: FunctionMaybe<number | string>;
1529
1529
  elevation?: FunctionMaybe<number | string>;
1530
1530
  }
1531
+ interface FeDropShadowSVGAttributes<T>
1532
+ extends CoreSVGAttributes<T>,
1533
+ FilterPrimitiveElementSVGAttributes<T>,
1534
+ StylableSVGAttributes,
1535
+ Pick<PresentationSVGAttributes, "color" | "flood-color" | "flood-opacity"> {
1536
+ dx?: FunctionMaybe<number | string>;
1537
+ dy?: FunctionMaybe<number | string>;
1538
+ stdDeviation?: FunctionMaybe<number | string>;
1539
+ }
1531
1540
  interface FeFloodSVGAttributes<T>
1532
1541
  extends FilterPrimitiveElementSVGAttributes<T>,
1533
1542
  StylableSVGAttributes,
@@ -1702,6 +1711,7 @@ export namespace JSX {
1702
1711
  height?: FunctionMaybe<number | string>;
1703
1712
  }
1704
1713
  interface MetadataSVGAttributes<T> extends CoreSVGAttributes<T> {}
1714
+ interface MPathSVGAttributes<T> extends CoreSVGAttributes<T> {}
1705
1715
  interface PathSVGAttributes<T>
1706
1716
  extends GraphicsElementSVGAttributes<T>,
1707
1717
  ShapeElementSVGAttributes<T>,
@@ -1770,6 +1780,10 @@ export namespace JSX {
1770
1780
  rx?: FunctionMaybe<number | string>;
1771
1781
  ry?: FunctionMaybe<number | string>;
1772
1782
  }
1783
+ interface SetSVGAttributes<T>
1784
+ extends CoreSVGAttributes<T>,
1785
+ StylableSVGAttributes,
1786
+ AnimationTimingSVGAttributes {}
1773
1787
  interface StopSVGAttributes<T>
1774
1788
  extends CoreSVGAttributes<T>,
1775
1789
  StylableSVGAttributes,
@@ -2020,7 +2034,7 @@ export namespace JSX {
2020
2034
  feDiffuseLighting: FeDiffuseLightingSVGAttributes<SVGFEDiffuseLightingElement>;
2021
2035
  feDisplacementMap: FeDisplacementMapSVGAttributes<SVGFEDisplacementMapElement>;
2022
2036
  feDistantLight: FeDistantLightSVGAttributes<SVGFEDistantLightElement>;
2023
- feDropShadow: Partial<SVGFEDropShadowElement>;
2037
+ feDropShadow: FeDropShadowSVGAttributes<SVGFEDropShadowElement>;
2024
2038
  feFlood: FeFloodSVGAttributes<SVGFEFloodElement>;
2025
2039
  feFuncA: FeFuncSVGAttributes<SVGFEFuncAElement>;
2026
2040
  feFuncB: FeFuncSVGAttributes<SVGFEFuncBElement>;
@@ -2046,14 +2060,14 @@ export namespace JSX {
2046
2060
  marker: MarkerSVGAttributes<SVGMarkerElement>;
2047
2061
  mask: MaskSVGAttributes<SVGMaskElement>;
2048
2062
  metadata: MetadataSVGAttributes<SVGMetadataElement>;
2049
- mpath: Partial<SVGMPathElement>;
2063
+ mpath: MPathSVGAttributes<SVGMPathElement>;
2050
2064
  path: PathSVGAttributes<SVGPathElement>;
2051
2065
  pattern: PatternSVGAttributes<SVGPatternElement>;
2052
2066
  polygon: PolygonSVGAttributes<SVGPolygonElement>;
2053
2067
  polyline: PolylineSVGAttributes<SVGPolylineElement>;
2054
2068
  radialGradient: RadialGradientSVGAttributes<SVGRadialGradientElement>;
2055
2069
  rect: RectSVGAttributes<SVGRectElement>;
2056
- set: Partial<SVGSetElement>;
2070
+ set: SetSVGAttributes<SVGSetElement>;
2057
2071
  stop: StopSVGAttributes<SVGStopElement>;
2058
2072
  svg: SvgSVGAttributes<SVGSVGElement>;
2059
2073
  switch: SwitchSVGAttributes<SVGSwitchElement>;
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.8.0-beta.1",
4
+ "version": "1.8.0",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
package/types/jsx.d.ts CHANGED
@@ -710,7 +710,7 @@ export namespace JSX {
710
710
  // [key: ClassKeys]: boolean;
711
711
  accessKey?: string;
712
712
  class?: string | undefined;
713
- contenteditable?: boolean | "inherit";
713
+ contenteditable?: boolean | "plaintext-only" | "inherit";
714
714
  contextmenu?: string;
715
715
  dir?: HTMLDir;
716
716
  draggable?: boolean | "false" | "true";
@@ -742,7 +742,7 @@ export namespace JSX {
742
742
  part?: string;
743
743
  exportparts?: string;
744
744
  inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search";
745
- contentEditable?: boolean | "inherit";
745
+ contentEditable?: boolean | "plaintext-only" | "inherit";
746
746
  contextMenu?: string;
747
747
  tabIndex?: number | string;
748
748
  autoCapitalize?: HTMLAutocapitalize;
@@ -1606,6 +1606,15 @@ export namespace JSX {
1606
1606
  azimuth?: number | string;
1607
1607
  elevation?: number | string;
1608
1608
  }
1609
+ interface FeDropShadowSVGAttributes<T>
1610
+ extends CoreSVGAttributes<T>,
1611
+ FilterPrimitiveElementSVGAttributes<T>,
1612
+ StylableSVGAttributes,
1613
+ Pick<PresentationSVGAttributes, "color" | "flood-color" | "flood-opacity"> {
1614
+ dx?: number | string;
1615
+ dy?: number | string;
1616
+ stdDeviation?: number | string;
1617
+ }
1609
1618
  interface FeFloodSVGAttributes<T>
1610
1619
  extends FilterPrimitiveElementSVGAttributes<T>,
1611
1620
  StylableSVGAttributes,
@@ -1780,6 +1789,7 @@ export namespace JSX {
1780
1789
  height?: number | string;
1781
1790
  }
1782
1791
  interface MetadataSVGAttributes<T> extends CoreSVGAttributes<T> {}
1792
+ interface MPathSVGAttributes<T> extends CoreSVGAttributes<T> {}
1783
1793
  interface PathSVGAttributes<T>
1784
1794
  extends GraphicsElementSVGAttributes<T>,
1785
1795
  ShapeElementSVGAttributes<T>,
@@ -1848,6 +1858,10 @@ export namespace JSX {
1848
1858
  rx?: number | string;
1849
1859
  ry?: number | string;
1850
1860
  }
1861
+ interface SetSVGAttributes<T>
1862
+ extends CoreSVGAttributes<T>,
1863
+ StylableSVGAttributes,
1864
+ AnimationTimingSVGAttributes {}
1851
1865
  interface StopSVGAttributes<T>
1852
1866
  extends CoreSVGAttributes<T>,
1853
1867
  StylableSVGAttributes,
@@ -2098,7 +2112,7 @@ export namespace JSX {
2098
2112
  feDiffuseLighting: FeDiffuseLightingSVGAttributes<SVGFEDiffuseLightingElement>;
2099
2113
  feDisplacementMap: FeDisplacementMapSVGAttributes<SVGFEDisplacementMapElement>;
2100
2114
  feDistantLight: FeDistantLightSVGAttributes<SVGFEDistantLightElement>;
2101
- feDropShadow: Partial<SVGFEDropShadowElement>;
2115
+ feDropShadow: FeDropShadowSVGAttributes<SVGFEDropShadowElement>;
2102
2116
  feFlood: FeFloodSVGAttributes<SVGFEFloodElement>;
2103
2117
  feFuncA: FeFuncSVGAttributes<SVGFEFuncAElement>;
2104
2118
  feFuncB: FeFuncSVGAttributes<SVGFEFuncBElement>;
@@ -2124,14 +2138,14 @@ export namespace JSX {
2124
2138
  marker: MarkerSVGAttributes<SVGMarkerElement>;
2125
2139
  mask: MaskSVGAttributes<SVGMaskElement>;
2126
2140
  metadata: MetadataSVGAttributes<SVGMetadataElement>;
2127
- mpath: Partial<SVGMPathElement>;
2141
+ mpath: MPathSVGAttributes<SVGMPathElement>;
2128
2142
  path: PathSVGAttributes<SVGPathElement>;
2129
2143
  pattern: PatternSVGAttributes<SVGPatternElement>;
2130
2144
  polygon: PolygonSVGAttributes<SVGPolygonElement>;
2131
2145
  polyline: PolylineSVGAttributes<SVGPolylineElement>;
2132
2146
  radialGradient: RadialGradientSVGAttributes<SVGRadialGradientElement>;
2133
2147
  rect: RectSVGAttributes<SVGRectElement>;
2134
- set: Partial<SVGSetElement>;
2148
+ set: SetSVGAttributes<SVGSetElement>;
2135
2149
  stop: StopSVGAttributes<SVGStopElement>;
2136
2150
  svg: SvgSVGAttributes<SVGSVGElement>;
2137
2151
  switch: SwitchSVGAttributes<SVGSwitchElement>;
package/web/dist/dev.cjs CHANGED
@@ -146,13 +146,19 @@ function clearDelegatedEvents(document = window.document) {
146
146
  delete document[$$EVENTS];
147
147
  }
148
148
  }
149
+ function setProperty(node, name, value) {
150
+ !solidJs.sharedConfig.context && (node[name] = value);
151
+ }
149
152
  function setAttribute(node, name, value) {
153
+ if (solidJs.sharedConfig.context) return;
150
154
  if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
151
155
  }
152
156
  function setAttributeNS(node, namespace, name, value) {
157
+ if (solidJs.sharedConfig.context) return;
153
158
  if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
154
159
  }
155
160
  function className(node, value) {
161
+ if (solidJs.sharedConfig.context) return;
156
162
  if (value == null) node.removeAttribute("class");else node.className = value;
157
163
  }
158
164
  function addEventListener(node, name, handler, delegate) {
@@ -225,9 +231,6 @@ function dynamicProperty(props, key) {
225
231
  });
226
232
  return props;
227
233
  }
228
- function innerHTML(parent, content) {
229
- !solidJs.sharedConfig.context && (parent.innerHTML = content);
230
- }
231
234
  function use(fn, element, arg) {
232
235
  return solidJs.untrack(() => fn(element, arg));
233
236
  }
@@ -360,7 +363,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
360
363
  if (forceProp) {
361
364
  prop = prop.slice(5);
362
365
  isProp = true;
363
- }
366
+ } else if (solidJs.sharedConfig.context) return value;
364
367
  if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;
365
368
  } else {
366
369
  const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
@@ -534,6 +537,9 @@ function Hydration(props) {
534
537
  return props.children;
535
538
  }
536
539
  function voidFn() {}
540
+ function innerHTML(parent, content) {
541
+ !solidJs.sharedConfig.context && (parent.innerHTML = content);
542
+ }
537
543
 
538
544
  function throwInBrowser(func) {
539
545
  const err = new Error(`${func.name} is not supported in the browser, returning undefined`);
@@ -724,6 +730,7 @@ exports.resolveSSRNode = resolveSSRNode;
724
730
  exports.runHydrationEvents = runHydrationEvents;
725
731
  exports.setAttribute = setAttribute;
726
732
  exports.setAttributeNS = setAttributeNS;
733
+ exports.setProperty = setProperty;
727
734
  exports.spread = spread;
728
735
  exports.ssr = ssr;
729
736
  exports.ssrAttribute = ssrAttribute;
package/web/dist/dev.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRoot,
3
- createRenderEffect,
4
3
  sharedConfig,
4
+ createRenderEffect,
5
5
  untrack,
6
6
  enableHydration,
7
7
  getOwner,
@@ -593,15 +593,21 @@ function clearDelegatedEvents(document = window.document) {
593
593
  delete document[$$EVENTS];
594
594
  }
595
595
  }
596
+ function setProperty(node, name, value) {
597
+ !sharedConfig.context && (node[name] = value);
598
+ }
596
599
  function setAttribute(node, name, value) {
600
+ if (sharedConfig.context) return;
597
601
  if (value == null) node.removeAttribute(name);
598
602
  else node.setAttribute(name, value);
599
603
  }
600
604
  function setAttributeNS(node, namespace, name, value) {
605
+ if (sharedConfig.context) return;
601
606
  if (value == null) node.removeAttributeNS(namespace, name);
602
607
  else node.setAttributeNS(namespace, name, value);
603
608
  }
604
609
  function className(node, value) {
610
+ if (sharedConfig.context) return;
605
611
  if (value == null) node.removeAttribute("class");
606
612
  else node.className = value;
607
613
  }
@@ -677,9 +683,6 @@ function dynamicProperty(props, key) {
677
683
  });
678
684
  return props;
679
685
  }
680
- function innerHTML(parent, content) {
681
- !sharedConfig.context && (parent.innerHTML = content);
682
- }
683
686
  function use(fn, element, arg) {
684
687
  return untrack(() => fn(element, arg));
685
688
  }
@@ -817,7 +820,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
817
820
  if (forceProp) {
818
821
  prop = prop.slice(5);
819
822
  isProp = true;
820
- }
823
+ } else if (sharedConfig.context) return value;
821
824
  if (prop === "class" || prop === "className") className(node, value);
822
825
  else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
823
826
  else node[propAlias || prop] = value;
@@ -1005,6 +1008,9 @@ function Hydration(props) {
1005
1008
  return props.children;
1006
1009
  }
1007
1010
  function voidFn() {}
1011
+ function innerHTML(parent, content) {
1012
+ !sharedConfig.context && (parent.innerHTML = content);
1013
+ }
1008
1014
 
1009
1015
  function throwInBrowser(func) {
1010
1016
  const err = new Error(`${func.name} is not supported in the browser, returning undefined`);
@@ -1145,6 +1151,7 @@ export {
1145
1151
  runHydrationEvents,
1146
1152
  setAttribute,
1147
1153
  setAttributeNS,
1154
+ setProperty,
1148
1155
  spread,
1149
1156
  ssr,
1150
1157
  ssrAttribute,
package/web/dist/web.cjs CHANGED
@@ -146,13 +146,19 @@ function clearDelegatedEvents(document = window.document) {
146
146
  delete document[$$EVENTS];
147
147
  }
148
148
  }
149
+ function setProperty(node, name, value) {
150
+ !solidJs.sharedConfig.context && (node[name] = value);
151
+ }
149
152
  function setAttribute(node, name, value) {
153
+ if (solidJs.sharedConfig.context) return;
150
154
  if (value == null) node.removeAttribute(name);else node.setAttribute(name, value);
151
155
  }
152
156
  function setAttributeNS(node, namespace, name, value) {
157
+ if (solidJs.sharedConfig.context) return;
153
158
  if (value == null) node.removeAttributeNS(namespace, name);else node.setAttributeNS(namespace, name, value);
154
159
  }
155
160
  function className(node, value) {
161
+ if (solidJs.sharedConfig.context) return;
156
162
  if (value == null) node.removeAttribute("class");else node.className = value;
157
163
  }
158
164
  function addEventListener(node, name, handler, delegate) {
@@ -225,9 +231,6 @@ function dynamicProperty(props, key) {
225
231
  });
226
232
  return props;
227
233
  }
228
- function innerHTML(parent, content) {
229
- !solidJs.sharedConfig.context && (parent.innerHTML = content);
230
- }
231
234
  function use(fn, element, arg) {
232
235
  return solidJs.untrack(() => fn(element, arg));
233
236
  }
@@ -360,7 +363,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
360
363
  if (forceProp) {
361
364
  prop = prop.slice(5);
362
365
  isProp = true;
363
- }
366
+ } else if (solidJs.sharedConfig.context) return value;
364
367
  if (prop === "class" || prop === "className") className(node, value);else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;else node[propAlias || prop] = value;
365
368
  } else {
366
369
  const ns = isSVG && prop.indexOf(":") > -1 && SVGNamespace[prop.split(":")[0]];
@@ -534,6 +537,9 @@ function Hydration(props) {
534
537
  return props.children;
535
538
  }
536
539
  function voidFn() {}
540
+ function innerHTML(parent, content) {
541
+ !solidJs.sharedConfig.context && (parent.innerHTML = content);
542
+ }
537
543
 
538
544
  function throwInBrowser(func) {
539
545
  const err = new Error(`${func.name} is not supported in the browser, returning undefined`);
@@ -724,6 +730,7 @@ exports.resolveSSRNode = resolveSSRNode;
724
730
  exports.runHydrationEvents = runHydrationEvents;
725
731
  exports.setAttribute = setAttribute;
726
732
  exports.setAttributeNS = setAttributeNS;
733
+ exports.setProperty = setProperty;
727
734
  exports.spread = spread;
728
735
  exports.ssr = ssr;
729
736
  exports.ssrAttribute = ssrAttribute;
package/web/dist/web.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createRoot,
3
- createRenderEffect,
4
3
  sharedConfig,
4
+ createRenderEffect,
5
5
  untrack,
6
6
  enableHydration,
7
7
  getOwner,
@@ -593,15 +593,21 @@ function clearDelegatedEvents(document = window.document) {
593
593
  delete document[$$EVENTS];
594
594
  }
595
595
  }
596
+ function setProperty(node, name, value) {
597
+ !sharedConfig.context && (node[name] = value);
598
+ }
596
599
  function setAttribute(node, name, value) {
600
+ if (sharedConfig.context) return;
597
601
  if (value == null) node.removeAttribute(name);
598
602
  else node.setAttribute(name, value);
599
603
  }
600
604
  function setAttributeNS(node, namespace, name, value) {
605
+ if (sharedConfig.context) return;
601
606
  if (value == null) node.removeAttributeNS(namespace, name);
602
607
  else node.setAttributeNS(namespace, name, value);
603
608
  }
604
609
  function className(node, value) {
610
+ if (sharedConfig.context) return;
605
611
  if (value == null) node.removeAttribute("class");
606
612
  else node.className = value;
607
613
  }
@@ -677,9 +683,6 @@ function dynamicProperty(props, key) {
677
683
  });
678
684
  return props;
679
685
  }
680
- function innerHTML(parent, content) {
681
- !sharedConfig.context && (parent.innerHTML = content);
682
- }
683
686
  function use(fn, element, arg) {
684
687
  return untrack(() => fn(element, arg));
685
688
  }
@@ -817,7 +820,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
817
820
  if (forceProp) {
818
821
  prop = prop.slice(5);
819
822
  isProp = true;
820
- }
823
+ } else if (sharedConfig.context) return value;
821
824
  if (prop === "class" || prop === "className") className(node, value);
822
825
  else if (isCE && !isProp && !isChildProp) node[toPropertyName(prop)] = value;
823
826
  else node[propAlias || prop] = value;
@@ -1005,6 +1008,9 @@ function Hydration(props) {
1005
1008
  return props.children;
1006
1009
  }
1007
1010
  function voidFn() {}
1011
+ function innerHTML(parent, content) {
1012
+ !sharedConfig.context && (parent.innerHTML = content);
1013
+ }
1008
1014
 
1009
1015
  function throwInBrowser(func) {
1010
1016
  const err = new Error(`${func.name} is not supported in the browser, returning undefined`);
@@ -1145,6 +1151,7 @@ export {
1145
1151
  runHydrationEvents,
1146
1152
  setAttribute,
1147
1153
  setAttributeNS,
1154
+ setProperty,
1148
1155
  spread,
1149
1156
  ssr,
1150
1157
  ssrAttribute,
@@ -33,7 +33,7 @@ export function assign(node: Element, props: any, isSVG?: Boolean, skipChildren?
33
33
  export function setAttribute(node: Element, name: string, value: string): void;
34
34
  export function setAttributeNS(node: Element, namespace: string, name: string, value: string): void;
35
35
  export function className(node: Element, value: string): void;
36
- export function innerHTML(node: Element, content: string): void;
36
+ export function setProperty(node: Element, name: string, value: any): void;
37
37
  export function addEventListener(
38
38
  node: Element,
39
39
  name: string,