solid-js 1.6.14 → 1.6.15

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.
@@ -1209,6 +1209,7 @@ export namespace JSX {
1209
1209
  mask?: FunctionMaybe<string>;
1210
1210
  opacity?: FunctionMaybe<number | string | "inherit">;
1211
1211
  overflow?: FunctionMaybe<"visible" | "hidden" | "scroll" | "auto" | "inherit">;
1212
+ pathLength?: FunctionMaybe<string | number>;
1212
1213
  "pointer-events"?: FunctionMaybe<
1213
1214
  | "bounding-box"
1214
1215
  | "visiblePainted"
@@ -1331,6 +1332,7 @@ export namespace JSX {
1331
1332
  | "stroke-dashoffset"
1332
1333
  | "stroke-opacity"
1333
1334
  | "shape-rendering"
1335
+ | "pathLength"
1334
1336
  > {}
1335
1337
  interface TextContentElementSVGAttributes<T>
1336
1338
  extends CoreSVGAttributes<T>,
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.6.14",
4
+ "version": "1.6.15",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
package/types/jsx.d.ts CHANGED
@@ -1219,6 +1219,7 @@ export namespace JSX {
1219
1219
  mask?: string;
1220
1220
  opacity?: number | string | "inherit";
1221
1221
  overflow?: "visible" | "hidden" | "scroll" | "auto" | "inherit";
1222
+ pathLength?: string | number;
1222
1223
  "pointer-events"?:
1223
1224
  | "bounding-box"
1224
1225
  | "visiblePainted"
@@ -1341,6 +1342,7 @@ export namespace JSX {
1341
1342
  | "stroke-dashoffset"
1342
1343
  | "stroke-opacity"
1343
1344
  | "shape-rendering"
1345
+ | "pathLength"
1344
1346
  > {}
1345
1347
  interface TextContentElementSVGAttributes<T>
1346
1348
  extends CoreSVGAttributes<T>,
package/web/dist/dev.cjs CHANGED
@@ -352,17 +352,7 @@ function eventHandler(e) {
352
352
  return node || document;
353
353
  }
354
354
  });
355
- if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) {
356
- solidJs.sharedConfig.done = true;
357
- document.querySelectorAll("[id^=pl-]").forEach(elem => {
358
- while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
359
- let x = elem.nextSibling;
360
- elem.remove();
361
- elem = x;
362
- }
363
- elem && elem.remove();
364
- });
365
- }
355
+ if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) solidJs.sharedConfig.done = _$HY.done = true;
366
356
  while (node) {
367
357
  const handler = node[key];
368
358
  if (handler && !node.disabled) {
@@ -462,8 +452,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
462
452
  const value = String(item);
463
453
  if (value === "<!>") {
464
454
  if (prev && prev.nodeType === 8) normalized.push(prev);
465
- } else if (prev && prev.nodeType === 3) {
466
- prev.data = value;
455
+ } else if (prev && prev.nodeType === 3 && prev.data === value) {
467
456
  normalized.push(prev);
468
457
  } else normalized.push(document.createTextNode(value));
469
458
  }
package/web/dist/dev.js CHANGED
@@ -351,17 +351,7 @@ function eventHandler(e) {
351
351
  return node || document;
352
352
  }
353
353
  });
354
- if (sharedConfig.registry && !sharedConfig.done) {
355
- sharedConfig.done = true;
356
- document.querySelectorAll("[id^=pl-]").forEach(elem => {
357
- while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
358
- let x = elem.nextSibling;
359
- elem.remove();
360
- elem = x;
361
- }
362
- elem && elem.remove();
363
- });
364
- }
354
+ if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
365
355
  while (node) {
366
356
  const handler = node[key];
367
357
  if (handler && !node.disabled) {
@@ -461,8 +451,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
461
451
  const value = String(item);
462
452
  if (value === "<!>") {
463
453
  if (prev && prev.nodeType === 8) normalized.push(prev);
464
- } else if (prev && prev.nodeType === 3) {
465
- prev.data = value;
454
+ } else if (prev && prev.nodeType === 3 && prev.data === value) {
466
455
  normalized.push(prev);
467
456
  } else normalized.push(document.createTextNode(value));
468
457
  }
@@ -262,7 +262,7 @@ function toRefParam(index) {
262
262
  }
263
263
 
264
264
  const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
265
- const REPLACE_SCRIPT = `function $df(e,t,n,o,d){if(n=document.getElementById(e),o=document.getElementById("pl-"+e)){for(;o&&8!==o.nodeType&&o.nodeValue!=="pl-"+e;)d=o.nextSibling,o.remove(),o=d;o.replaceWith(n.content)}n.remove(),_$HY.set(e,t),_$HY.fe(e)}`;
265
+ const REPLACE_SCRIPT = `function $df(e,n,t,o,d){if(t=document.getElementById(e),o=document.getElementById("pl-"+e)){for(;o&&8!==o.nodeType&&o.nodeValue!=="pl-"+e;)d=o.nextSibling,o.remove(),o=d;_$HY.done?o.remove():o.replaceWith(t.content)}t.remove(),_$HY.set(e,n),_$HY.fe(e)}`;
266
266
  function renderToString(code, options = {}) {
267
267
  let scripts = "";
268
268
  solidJs.sharedConfig.context = {
@@ -279,9 +279,8 @@ function renderToString(code, options = {}) {
279
279
  }
280
280
  };
281
281
  let html = solidJs.createRoot(d => {
282
- const r = resolveSSRNode(escape(code()));
283
- d();
284
- return r;
282
+ setTimeout(d);
283
+ return resolveSSRNode(escape(code()));
285
284
  });
286
285
  solidJs.sharedConfig.context.noHydrate = true;
287
286
  html = injectAssets(solidJs.sharedConfig.context.assets, html);
@@ -322,7 +321,7 @@ function renderToStream(code, options = {}) {
322
321
  });
323
322
  writable && writable.end();
324
323
  completed = true;
325
- dispose();
324
+ setTimeout(dispose);
326
325
  }
327
326
  };
328
327
  const pushTask = task => {
@@ -511,7 +510,7 @@ function ssrClassList(value) {
511
510
  classValue = !!value[key];
512
511
  if (!key || key === "undefined" || !classValue) continue;
513
512
  i && (result += " ");
514
- result += key;
513
+ result += escape(key);
515
514
  }
516
515
  return result;
517
516
  }
@@ -548,7 +547,7 @@ function ssrElement(tag, props, children, needsId) {
548
547
  } else if (prop === "class" || prop === "className" || prop === "classList") {
549
548
  if (classResolved) continue;
550
549
  let n;
551
- result += `class="${(n = props.class) ? n + " " : ""}${(n = props.className) ? n + " " : ""}${ssrClassList(props.classList)}"`;
550
+ result += `class="${escape(((n = props.class) ? n + " " : "") + ((n = props.className) ? n + " " : ""), true) + ssrClassList(props.classList)}"`;
552
551
  classResolved = true;
553
552
  } else if (BooleanAttributes.has(prop)) {
554
553
  if (value) result += prop;else continue;
@@ -561,7 +560,7 @@ function ssrElement(tag, props, children, needsId) {
561
560
  }
562
561
  if (skipChildren) {
563
562
  return {
564
- t: result + '/>'
563
+ t: result + "/>"
565
564
  };
566
565
  }
567
566
  return {
@@ -261,7 +261,7 @@ function toRefParam(index) {
261
261
  }
262
262
 
263
263
  const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
264
- const REPLACE_SCRIPT = `function $df(e,t,n,o,d){if(n=document.getElementById(e),o=document.getElementById("pl-"+e)){for(;o&&8!==o.nodeType&&o.nodeValue!=="pl-"+e;)d=o.nextSibling,o.remove(),o=d;o.replaceWith(n.content)}n.remove(),_$HY.set(e,t),_$HY.fe(e)}`;
264
+ const REPLACE_SCRIPT = `function $df(e,n,t,o,d){if(t=document.getElementById(e),o=document.getElementById("pl-"+e)){for(;o&&8!==o.nodeType&&o.nodeValue!=="pl-"+e;)d=o.nextSibling,o.remove(),o=d;_$HY.done?o.remove():o.replaceWith(t.content)}t.remove(),_$HY.set(e,n),_$HY.fe(e)}`;
265
265
  function renderToString(code, options = {}) {
266
266
  let scripts = "";
267
267
  sharedConfig.context = {
@@ -278,9 +278,8 @@ function renderToString(code, options = {}) {
278
278
  }
279
279
  };
280
280
  let html = createRoot(d => {
281
- const r = resolveSSRNode(escape(code()));
282
- d();
283
- return r;
281
+ setTimeout(d);
282
+ return resolveSSRNode(escape(code()));
284
283
  });
285
284
  sharedConfig.context.noHydrate = true;
286
285
  html = injectAssets(sharedConfig.context.assets, html);
@@ -321,7 +320,7 @@ function renderToStream(code, options = {}) {
321
320
  });
322
321
  writable && writable.end();
323
322
  completed = true;
324
- dispose();
323
+ setTimeout(dispose);
325
324
  }
326
325
  };
327
326
  const pushTask = task => {
@@ -510,7 +509,7 @@ function ssrClassList(value) {
510
509
  classValue = !!value[key];
511
510
  if (!key || key === "undefined" || !classValue) continue;
512
511
  i && (result += " ");
513
- result += key;
512
+ result += escape(key);
514
513
  }
515
514
  return result;
516
515
  }
@@ -547,7 +546,7 @@ function ssrElement(tag, props, children, needsId) {
547
546
  } else if (prop === "class" || prop === "className" || prop === "classList") {
548
547
  if (classResolved) continue;
549
548
  let n;
550
- result += `class="${(n = props.class) ? n + " " : ""}${(n = props.className) ? n + " " : ""}${ssrClassList(props.classList)}"`;
549
+ result += `class="${escape(((n = props.class) ? n + " " : "") + ((n = props.className) ? n + " " : ""), true) + ssrClassList(props.classList)}"`;
551
550
  classResolved = true;
552
551
  } else if (BooleanAttributes.has(prop)) {
553
552
  if (value) result += prop;else continue;
@@ -560,7 +559,7 @@ function ssrElement(tag, props, children, needsId) {
560
559
  }
561
560
  if (skipChildren) {
562
561
  return {
563
- t: result + '/>'
562
+ t: result + "/>"
564
563
  };
565
564
  }
566
565
  return {
package/web/dist/web.cjs CHANGED
@@ -352,17 +352,7 @@ function eventHandler(e) {
352
352
  return node || document;
353
353
  }
354
354
  });
355
- if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) {
356
- solidJs.sharedConfig.done = true;
357
- document.querySelectorAll("[id^=pl-]").forEach(elem => {
358
- while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
359
- let x = elem.nextSibling;
360
- elem.remove();
361
- elem = x;
362
- }
363
- elem && elem.remove();
364
- });
365
- }
355
+ if (solidJs.sharedConfig.registry && !solidJs.sharedConfig.done) solidJs.sharedConfig.done = _$HY.done = true;
366
356
  while (node) {
367
357
  const handler = node[key];
368
358
  if (handler && !node.disabled) {
@@ -462,8 +452,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
462
452
  const value = String(item);
463
453
  if (value === "<!>") {
464
454
  if (prev && prev.nodeType === 8) normalized.push(prev);
465
- } else if (prev && prev.nodeType === 3) {
466
- prev.data = value;
455
+ } else if (prev && prev.nodeType === 3 && prev.data === value) {
467
456
  normalized.push(prev);
468
457
  } else normalized.push(document.createTextNode(value));
469
458
  }
package/web/dist/web.js CHANGED
@@ -351,17 +351,7 @@ function eventHandler(e) {
351
351
  return node || document;
352
352
  }
353
353
  });
354
- if (sharedConfig.registry && !sharedConfig.done) {
355
- sharedConfig.done = true;
356
- document.querySelectorAll("[id^=pl-]").forEach(elem => {
357
- while (elem && elem.nodeType !== 8 && elem.nodeValue !== "pl-" + e) {
358
- let x = elem.nextSibling;
359
- elem.remove();
360
- elem = x;
361
- }
362
- elem && elem.remove();
363
- });
364
- }
354
+ if (sharedConfig.registry && !sharedConfig.done) sharedConfig.done = _$HY.done = true;
365
355
  while (node) {
366
356
  const handler = node[key];
367
357
  if (handler && !node.disabled) {
@@ -461,8 +451,7 @@ function normalizeIncomingArray(normalized, array, current, unwrap) {
461
451
  const value = String(item);
462
452
  if (value === "<!>") {
463
453
  if (prev && prev.nodeType === 8) normalized.push(prev);
464
- } else if (prev && prev.nodeType === 3) {
465
- prev.data = value;
454
+ } else if (prev && prev.nodeType === 3 && prev.data === value) {
466
455
  normalized.push(prev);
467
456
  } else normalized.push(document.createTextNode(value));
468
457
  }