solid-js 1.3.15 → 1.3.16

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/dist/dev.cjs CHANGED
@@ -388,7 +388,7 @@ function createSelector(source, fn = equalFn, options) {
388
388
  const subs = new Map();
389
389
  const node = createComputation(p => {
390
390
  const v = source();
391
- for (const key of subs.keys()) if (fn(key, v) !== (p !== undefined && fn(key, p))) {
391
+ for (const key of subs.keys()) if (fn(key, v) !== fn(key, p)) {
392
392
  const l = subs.get(key);
393
393
  for (const c of l.values()) {
394
394
  c.state = STALE;
package/dist/dev.js CHANGED
@@ -384,7 +384,7 @@ function createSelector(source, fn = equalFn, options) {
384
384
  const subs = new Map();
385
385
  const node = createComputation(p => {
386
386
  const v = source();
387
- for (const key of subs.keys()) if (fn(key, v) !== (p !== undefined && fn(key, p))) {
387
+ for (const key of subs.keys()) if (fn(key, v) !== fn(key, p)) {
388
388
  const l = subs.get(key);
389
389
  for (const c of l.values()) {
390
390
  c.state = STALE;
package/dist/solid.cjs CHANGED
@@ -385,7 +385,7 @@ function createSelector(source, fn = equalFn, options) {
385
385
  const subs = new Map();
386
386
  const node = createComputation(p => {
387
387
  const v = source();
388
- for (const key of subs.keys()) if (fn(key, v) !== (p !== undefined && fn(key, p))) {
388
+ for (const key of subs.keys()) if (fn(key, v) !== fn(key, p)) {
389
389
  const l = subs.get(key);
390
390
  for (const c of l.values()) {
391
391
  c.state = STALE;
package/dist/solid.js CHANGED
@@ -381,7 +381,7 @@ function createSelector(source, fn = equalFn, options) {
381
381
  const subs = new Map();
382
382
  const node = createComputation(p => {
383
383
  const v = source();
384
- for (const key of subs.keys()) if (fn(key, v) !== (p !== undefined && fn(key, p))) {
384
+ for (const key of subs.keys()) if (fn(key, v) !== fn(key, p)) {
385
385
  const l = subs.get(key);
386
386
  for (const c of l.values()) {
387
387
  c.state = STALE;
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.3.15",
4
+ "version": "1.3.16",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -144,5 +144,5 @@
144
144
  "compiler",
145
145
  "performance"
146
146
  ],
147
- "gitHead": "0a6fc7bbeebf14f1a9297358801acf365dfbb716"
147
+ "gitHead": "616d2f521e70f3c4f6c0ef6944d1763a0cf6a73b"
148
148
  }
package/types/jsx.d.ts CHANGED
@@ -24,6 +24,9 @@ export namespace JSX {
24
24
  // empty, libs can define requirements downstream
25
25
  }
26
26
  type LibraryManagedAttributes<Component, Props> = Props;
27
+ interface ElementAttributesProperty {
28
+ // empty, libs can define requirements downstream
29
+ }
27
30
  interface ElementChildrenAttribute {
28
31
  children: {};
29
32
  }
@@ -1997,6 +2000,7 @@ export namespace JSX {
1997
2000
  | "treegrid"
1998
2001
  | "treeitem";
1999
2002
  autocapitalize?: HTMLAutocapitalize;
2003
+ slot?: string;
2000
2004
  color?: string;
2001
2005
  itemprop?: string;
2002
2006
  itemscope?: boolean;
package/web/dist/dev.cjs CHANGED
@@ -29,6 +29,7 @@ const SVGNamespace = {
29
29
  xlink: "http://www.w3.org/1999/xlink",
30
30
  xml: "http://www.w3.org/XML/1998/namespace"
31
31
  };
32
+ const DOMElements = new Set(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "main", "nav", "section", "body", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "details", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "portal", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp", "input"]);
32
33
 
33
34
  function memo(fn, equals) {
34
35
  return solidJs.createMemo(fn, undefined, !equals ? {
@@ -337,7 +338,7 @@ function eventHandler(e) {
337
338
  return node || document;
338
339
  }
339
340
  });
340
- if (window._$HY && !solidJs.sharedConfig.done) {
341
+ if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) {
341
342
  solidJs.sharedConfig.done = true;
342
343
  document.querySelectorAll("[id^=pl-]").forEach(elem => elem.remove());
343
344
  }
@@ -625,6 +626,7 @@ Object.defineProperty(exports, 'mergeProps', {
625
626
  exports.Aliases = Aliases;
626
627
  exports.Assets = Assets;
627
628
  exports.ChildProperties = ChildProperties;
629
+ exports.DOMElements = DOMElements;
628
630
  exports.DelegatedEvents = DelegatedEvents;
629
631
  exports.Dynamic = Dynamic;
630
632
  exports.HydrationScript = Assets;
package/web/dist/dev.js CHANGED
@@ -26,6 +26,7 @@ const SVGNamespace = {
26
26
  xlink: "http://www.w3.org/1999/xlink",
27
27
  xml: "http://www.w3.org/XML/1998/namespace"
28
28
  };
29
+ const DOMElements = new Set(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "main", "nav", "section", "body", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "details", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "portal", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp", "input"]);
29
30
 
30
31
  function memo(fn, equals) {
31
32
  return createMemo(fn, undefined, !equals ? {
@@ -334,7 +335,7 @@ function eventHandler(e) {
334
335
  return node || document;
335
336
  }
336
337
  });
337
- if (window._$HY && !sharedConfig.done) {
338
+ if (sharedConfig.registry && !sharedConfig.done) {
338
339
  sharedConfig.done = true;
339
340
  document.querySelectorAll("[id^=pl-]").forEach(elem => elem.remove());
340
341
  }
@@ -571,4 +572,4 @@ function Dynamic(props) {
571
572
  });
572
573
  }
573
574
 
574
- export { Aliases, Assets, ChildProperties, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrHydrationKey, ssrSpread, ssrStyle, style, template };
575
+ export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrHydrationKey, ssrSpread, ssrStyle, style, template };
@@ -499,6 +499,7 @@ function ssrSpread(props, isSVG, skipChildren) {
499
499
  if (typeof props === "function") props = props();
500
500
  const keys = Object.keys(props);
501
501
  let result = "";
502
+ let classResolved;
502
503
  for (let i = 0; i < keys.length; i++) {
503
504
  const prop = keys[i];
504
505
  if (prop === "children") {
@@ -508,8 +509,11 @@ function ssrSpread(props, isSVG, skipChildren) {
508
509
  const value = props[prop];
509
510
  if (prop === "style") {
510
511
  result += `style="${ssrStyle(value)}"`;
511
- } else if (prop === "classList") {
512
- result += `class="${ssrClassList(value)}"`;
512
+ } else if (prop === "class" || prop === "className" || prop === "classList") {
513
+ if (classResolved) continue;
514
+ let n;
515
+ result += `class="${(n = props.class) ? n + " " : ""}${(n = props.className) ? n + " " : ""}${ssrClassList(props.classList)}"`;
516
+ classResolved = true;
513
517
  } else if (BooleanAttributes.has(prop)) {
514
518
  if (value) result += prop;else continue;
515
519
  } else if (prop === "ref" || prop.slice(0, 2) === "on") {
@@ -496,6 +496,7 @@ function ssrSpread(props, isSVG, skipChildren) {
496
496
  if (typeof props === "function") props = props();
497
497
  const keys = Object.keys(props);
498
498
  let result = "";
499
+ let classResolved;
499
500
  for (let i = 0; i < keys.length; i++) {
500
501
  const prop = keys[i];
501
502
  if (prop === "children") {
@@ -505,8 +506,11 @@ function ssrSpread(props, isSVG, skipChildren) {
505
506
  const value = props[prop];
506
507
  if (prop === "style") {
507
508
  result += `style="${ssrStyle(value)}"`;
508
- } else if (prop === "classList") {
509
- result += `class="${ssrClassList(value)}"`;
509
+ } else if (prop === "class" || prop === "className" || prop === "classList") {
510
+ if (classResolved) continue;
511
+ let n;
512
+ result += `class="${(n = props.class) ? n + " " : ""}${(n = props.className) ? n + " " : ""}${ssrClassList(props.classList)}"`;
513
+ classResolved = true;
510
514
  } else if (BooleanAttributes.has(prop)) {
511
515
  if (value) result += prop;else continue;
512
516
  } else if (prop === "ref" || prop.slice(0, 2) === "on") {
package/web/dist/web.cjs CHANGED
@@ -29,6 +29,7 @@ const SVGNamespace = {
29
29
  xlink: "http://www.w3.org/1999/xlink",
30
30
  xml: "http://www.w3.org/XML/1998/namespace"
31
31
  };
32
+ const DOMElements = new Set(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "main", "nav", "section", "body", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "details", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "portal", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp", "input"]);
32
33
 
33
34
  function memo(fn, equals) {
34
35
  return solidJs.createMemo(fn, undefined, !equals ? {
@@ -336,7 +337,7 @@ function eventHandler(e) {
336
337
  return node || document;
337
338
  }
338
339
  });
339
- if (window._$HY && !solidJs.sharedConfig.done) {
340
+ if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) {
340
341
  solidJs.sharedConfig.done = true;
341
342
  document.querySelectorAll("[id^=pl-]").forEach(elem => elem.remove());
342
343
  }
@@ -621,6 +622,7 @@ Object.defineProperty(exports, 'mergeProps', {
621
622
  exports.Aliases = Aliases;
622
623
  exports.Assets = Assets;
623
624
  exports.ChildProperties = ChildProperties;
625
+ exports.DOMElements = DOMElements;
624
626
  exports.DelegatedEvents = DelegatedEvents;
625
627
  exports.Dynamic = Dynamic;
626
628
  exports.HydrationScript = Assets;
package/web/dist/web.js CHANGED
@@ -26,6 +26,7 @@ const SVGNamespace = {
26
26
  xlink: "http://www.w3.org/1999/xlink",
27
27
  xml: "http://www.w3.org/XML/1998/namespace"
28
28
  };
29
+ const DOMElements = new Set(["html", "base", "head", "link", "meta", "style", "title", "body", "address", "article", "aside", "footer", "header", "main", "nav", "section", "body", "blockquote", "dd", "div", "dl", "dt", "figcaption", "figure", "hr", "li", "ol", "p", "pre", "ul", "a", "abbr", "b", "bdi", "bdo", "br", "cite", "code", "data", "dfn", "em", "i", "kbd", "mark", "q", "rp", "rt", "ruby", "s", "samp", "small", "span", "strong", "sub", "sup", "time", "u", "var", "wbr", "area", "audio", "img", "map", "track", "video", "embed", "iframe", "object", "param", "picture", "portal", "source", "svg", "math", "canvas", "noscript", "script", "del", "ins", "caption", "col", "colgroup", "table", "tbody", "td", "tfoot", "th", "thead", "tr", "button", "datalist", "fieldset", "form", "input", "label", "legend", "meter", "optgroup", "option", "output", "progress", "select", "textarea", "details", "dialog", "menu", "summary", "details", "slot", "template", "acronym", "applet", "basefont", "bgsound", "big", "blink", "center", "content", "dir", "font", "frame", "frameset", "hgroup", "image", "keygen", "marquee", "menuitem", "nobr", "noembed", "noframes", "plaintext", "rb", "rtc", "shadow", "spacer", "strike", "tt", "xmp", "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdi", "bdo", "bgsound", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "hgroup", "hr", "html", "i", "iframe", "image", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noembed", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "plaintext", "portal", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "tt", "u", "ul", "var", "video", "wbr", "xmp", "input"]);
29
30
 
30
31
  function memo(fn, equals) {
31
32
  return createMemo(fn, undefined, !equals ? {
@@ -333,7 +334,7 @@ function eventHandler(e) {
333
334
  return node || document;
334
335
  }
335
336
  });
336
- if (window._$HY && !sharedConfig.done) {
337
+ if (sharedConfig.registry && !sharedConfig.done) {
337
338
  sharedConfig.done = true;
338
339
  document.querySelectorAll("[id^=pl-]").forEach(elem => elem.remove());
339
340
  }
@@ -567,4 +568,4 @@ function Dynamic(props) {
567
568
  });
568
569
  }
569
570
 
570
- export { Aliases, Assets, ChildProperties, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrHydrationKey, ssrSpread, ssrStyle, style, template };
571
+ export { Aliases, Assets, ChildProperties, DOMElements, DelegatedEvents, Dynamic, Assets as HydrationScript, NoHydration, Portal, PropAliases, Properties, SVGElements, SVGNamespace, addEventListener, assign, classList, clearDelegatedEvents, delegateEvents, dynamicProperty, escape, generateHydrationScript, getHydrationKey, getNextElement, getNextMarker, getNextMatch, hydrate, innerHTML, insert, isServer, memo, render, renderToStream, renderToString, renderToStringAsync, resolveSSRNode, runHydrationEvents, setAttribute, setAttributeNS, spread, ssr, ssrBoolean, ssrClassList, ssrHydrationKey, ssrSpread, ssrStyle, style, template };
@@ -4,6 +4,7 @@ export const PropAliases: Record<string, string>;
4
4
  export const Properties: Set<string>;
5
5
  export const ChildProperties: Set<string>;
6
6
  export const DelegatedEvents: Set<string>;
7
+ export const DOMElements: Set<string>;
7
8
  export const SVGElements: Set<string>;
8
9
  export const SVGNamespace: Record<string, string>;
9
10