solid-js 1.7.0-beta.2 → 1.7.0-beta.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/dist/server.cjs CHANGED
@@ -420,7 +420,7 @@ function ErrorBoundary(props) {
420
420
  if (error) return displayFallback();
421
421
  sync = false;
422
422
  return {
423
- t: `<!e${id}>${resolveSSRNode(res)}<!/e${id}>`
423
+ t: `<!!$e${id}>${resolveSSRNode(res)}<!!$/e${id}>`
424
424
  };
425
425
  }
426
426
  const SuspenseContext = createContext();
package/dist/server.js CHANGED
@@ -418,7 +418,7 @@ function ErrorBoundary(props) {
418
418
  if (error) return displayFallback();
419
419
  sync = false;
420
420
  return {
421
- t: `<!e${id}>${resolveSSRNode(res)}<!/e${id}>`
421
+ t: `<!!$e${id}>${resolveSSRNode(res)}<!!$/e${id}>`
422
422
  };
423
423
  }
424
424
  const SuspenseContext = createContext();
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.7.0-beta.2",
4
+ "version": "1.7.0-beta.3",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
package/web/dist/dev.cjs CHANGED
@@ -119,7 +119,7 @@ function render(code, element, init, options = {}) {
119
119
  element.textContent = "";
120
120
  };
121
121
  }
122
- function template(html, isSVG, isCE) {
122
+ function template(html, isCE, isSVG) {
123
123
  let node;
124
124
  const create = () => {
125
125
  const t = document.createElement("template");
@@ -397,7 +397,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
397
397
  let cleaned = [];
398
398
  for (let i = 0; i < current.length; i++) {
399
399
  const node = current[i];
400
- if (node.nodeType === 8 && node.data === "!") node.remove();else cleaned.push(node);
400
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
401
401
  }
402
402
  current = cleaned;
403
403
  }
package/web/dist/dev.js CHANGED
@@ -118,7 +118,7 @@ function render(code, element, init, options = {}) {
118
118
  element.textContent = "";
119
119
  };
120
120
  }
121
- function template(html, isSVG, isCE) {
121
+ function template(html, isCE, isSVG) {
122
122
  let node;
123
123
  const create = () => {
124
124
  const t = document.createElement("template");
@@ -396,7 +396,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
396
396
  let cleaned = [];
397
397
  for (let i = 0; i < current.length; i++) {
398
398
  const node = current[i];
399
- if (node.nodeType === 8 && node.data === "!") node.remove();else cleaned.push(node);
399
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
400
400
  }
401
401
  current = cleaned;
402
402
  }
@@ -125,10 +125,10 @@ function renderToStream(code, options = {}) {
125
125
  },
126
126
  replace(id, payloadFn) {
127
127
  if (firstFlushed) return;
128
- const placeholder = `<!${id}>`;
128
+ const placeholder = `<!!$${id}>`;
129
129
  const first = html.indexOf(placeholder);
130
130
  if (first === -1) return;
131
- const last = html.indexOf(`<!/${id}>`, first + placeholder.length);
131
+ const last = html.indexOf(`<!!$/${id}>`, first + placeholder.length);
132
132
  html = html.replace(html.slice(first, last + placeholder.length + 1), resolveSSRNode(payloadFn()));
133
133
  },
134
134
  writeResource(id, p, error, wait) {
@@ -388,7 +388,7 @@ function resolveSSRNode(node) {
388
388
  let prev = {};
389
389
  let mapped = "";
390
390
  for (let i = 0, len = node.length; i < len; i++) {
391
- if (typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!-->`;
391
+ if (typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!$-->`;
392
392
  mapped += resolveSSRNode(prev = node[i]);
393
393
  }
394
394
  return mapped;
@@ -124,10 +124,10 @@ function renderToStream(code, options = {}) {
124
124
  },
125
125
  replace(id, payloadFn) {
126
126
  if (firstFlushed) return;
127
- const placeholder = `<!${id}>`;
127
+ const placeholder = `<!!$${id}>`;
128
128
  const first = html.indexOf(placeholder);
129
129
  if (first === -1) return;
130
- const last = html.indexOf(`<!/${id}>`, first + placeholder.length);
130
+ const last = html.indexOf(`<!!$/${id}>`, first + placeholder.length);
131
131
  html = html.replace(html.slice(first, last + placeholder.length + 1), resolveSSRNode(payloadFn()));
132
132
  },
133
133
  writeResource(id, p, error, wait) {
@@ -387,7 +387,7 @@ function resolveSSRNode(node) {
387
387
  let prev = {};
388
388
  let mapped = "";
389
389
  for (let i = 0, len = node.length; i < len; i++) {
390
- if (typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!-->`;
390
+ if (typeof prev !== "object" && typeof node[i] !== "object") mapped += `<!--!$-->`;
391
391
  mapped += resolveSSRNode(prev = node[i]);
392
392
  }
393
393
  return mapped;
package/web/dist/web.cjs CHANGED
@@ -119,7 +119,7 @@ function render(code, element, init, options = {}) {
119
119
  element.textContent = "";
120
120
  };
121
121
  }
122
- function template(html, isSVG, isCE) {
122
+ function template(html, isCE, isSVG) {
123
123
  let node;
124
124
  const create = () => {
125
125
  const t = document.createElement("template");
@@ -397,7 +397,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
397
397
  let cleaned = [];
398
398
  for (let i = 0; i < current.length; i++) {
399
399
  const node = current[i];
400
- if (node.nodeType === 8 && node.data === "!") node.remove();else cleaned.push(node);
400
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
401
401
  }
402
402
  current = cleaned;
403
403
  }
package/web/dist/web.js CHANGED
@@ -118,7 +118,7 @@ function render(code, element, init, options = {}) {
118
118
  element.textContent = "";
119
119
  };
120
120
  }
121
- function template(html, isSVG, isCE) {
121
+ function template(html, isCE, isSVG) {
122
122
  let node;
123
123
  const create = () => {
124
124
  const t = document.createElement("template");
@@ -396,7 +396,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
396
396
  let cleaned = [];
397
397
  for (let i = 0; i < current.length; i++) {
398
398
  const node = current[i];
399
- if (node.nodeType === 8 && node.data === "!") node.remove();else cleaned.push(node);
399
+ if (node.nodeType === 8 && node.data.slice(0, 2) === "!$") node.remove();else cleaned.push(node);
400
400
  }
401
401
  current = cleaned;
402
402
  }
@@ -10,7 +10,7 @@ export function getPropAlias(prop: string, tagName: string): string | undefined;
10
10
 
11
11
  type MountableElement = Element | Document | ShadowRoot | DocumentFragment | Node;
12
12
  export function render(code: () => JSX.Element, element: MountableElement): () => void;
13
- export function template(html: string, isSVG?: boolean, isCE?: boolean): () => Element;
13
+ export function template(html: string, isCE?: boolean, isSVG?: boolean): () => Element;
14
14
  export function effect<T>(fn: (prev?: T) => T, init?: T): void;
15
15
  export function memo<T>(fn: () => T, equal: boolean): () => T;
16
16
  export function untrack<T>(fn: () => T): T;