solid-js 1.8.6 → 1.8.7

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
@@ -162,7 +162,6 @@ const DevHooks = {
162
162
  afterCreateOwner: null,
163
163
  afterCreateSignal: null
164
164
  };
165
- const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
166
165
  function createRoot(fn, detachedOwner) {
167
166
  const listener = Listener,
168
167
  owner = Owner,
@@ -541,6 +540,7 @@ function startTransition(fn) {
541
540
  return t ? t.done : undefined;
542
541
  });
543
542
  }
543
+ const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
544
544
  function useTransition() {
545
545
  return [transPending, startTransition];
546
546
  }
package/dist/dev.js CHANGED
@@ -162,7 +162,6 @@ const DevHooks = {
162
162
  afterCreateOwner: null,
163
163
  afterCreateSignal: null
164
164
  };
165
- const [transPending, setTransPending] = /*@__PURE__*/ createSignal(false);
166
165
  function createRoot(fn, detachedOwner) {
167
166
  const listener = Listener,
168
167
  owner = Owner,
@@ -605,6 +604,7 @@ function startTransition(fn) {
605
604
  return t ? t.done : undefined;
606
605
  });
607
606
  }
607
+ const [transPending, setTransPending] = /*@__PURE__*/ createSignal(false);
608
608
  function useTransition() {
609
609
  return [transPending, startTransition];
610
610
  }
package/dist/solid.cjs CHANGED
@@ -157,7 +157,6 @@ let Listener = null;
157
157
  let Updates = null;
158
158
  let Effects = null;
159
159
  let ExecCount = 0;
160
- const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
161
160
  function createRoot(fn, detachedOwner) {
162
161
  const listener = Listener,
163
162
  owner = Owner,
@@ -523,6 +522,7 @@ function startTransition(fn) {
523
522
  return t ? t.done : undefined;
524
523
  });
525
524
  }
525
+ const [transPending, setTransPending] = /*@__PURE__*/createSignal(false);
526
526
  function useTransition() {
527
527
  return [transPending, startTransition];
528
528
  }
package/dist/solid.js CHANGED
@@ -157,7 +157,6 @@ let Listener = null;
157
157
  let Updates = null;
158
158
  let Effects = null;
159
159
  let ExecCount = 0;
160
- const [transPending, setTransPending] = /*@__PURE__*/ createSignal(false);
161
160
  function createRoot(fn, detachedOwner) {
162
161
  const listener = Listener,
163
162
  owner = Owner,
@@ -581,6 +580,7 @@ function startTransition(fn) {
581
580
  return t ? t.done : undefined;
582
581
  });
583
582
  }
583
+ const [transPending, setTransPending] = /*@__PURE__*/ createSignal(false);
584
584
  function useTransition() {
585
585
  return [transPending, startTransition];
586
586
  }
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.6",
4
+ "version": "1.8.7",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
@@ -215,7 +215,7 @@
215
215
  ],
216
216
  "dependencies": {
217
217
  "csstype": "^3.1.0",
218
- "seroval": "^0.14.1"
218
+ "seroval": "^0.15.1"
219
219
  },
220
220
  "scripts": {
221
221
  "build": "npm-run-all -nl build:*",
@@ -199,6 +199,7 @@ type HydrationContext = {
199
199
  id: string;
200
200
  count: number;
201
201
  serialize: (id: string, v: Promise<any> | any, deferStream?: boolean) => void;
202
+ nextRoot: (v: any) => string;
202
203
  replace: (id: string, replacement: () => any) => void;
203
204
  block: (p: Promise<any>) => void;
204
205
  resources: Record<string, any>;
@@ -31,7 +31,7 @@ function createSerializer({
31
31
  });
32
32
  }
33
33
  function getLocalHeaderScript(id) {
34
- return seroval.getCrossReferenceHeader(id);
34
+ return seroval.getCrossReferenceHeader(id) + ';';
35
35
  }
36
36
 
37
37
  const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i;
@@ -61,11 +61,9 @@ function renderToString(code, options = {}) {
61
61
  serialize(id, p) {
62
62
  !solidJs.sharedConfig.context.noHydrate && serializer.write(id, p);
63
63
  },
64
- pushed: 0,
65
- push(p) {
66
- const id = this.renderId + "i-" + this.pushed++;
67
- this.serialize(id, p);
68
- return id;
64
+ roots: 0,
65
+ nextRoot() {
66
+ return this.renderId + "i-" + this.roots++;
69
67
  }
70
68
  };
71
69
  let html = solidJs.createRoot(d => {
@@ -188,11 +186,9 @@ function renderToStream(code, options = {}) {
188
186
  });
189
187
  } else if (!serverOnly) serializer.write(id, p);
190
188
  },
191
- pushed: 0,
192
- push(p) {
193
- const id = this.renderId + "i-" + this.pushed++;
194
- this.serialize(id, p);
195
- return id;
189
+ roots: 0,
190
+ nextRoot() {
191
+ return this.renderId + "i-" + this.roots++;
196
192
  },
197
193
  registerFragment(key) {
198
194
  if (!registry.has(key)) {
@@ -265,7 +261,7 @@ function renderToStream(code, options = {}) {
265
261
  if (!registry.size) queue(flushEnd);
266
262
  },
267
263
  pipe(w) {
268
- Promise.allSettled(blockingPromises).then(() => {
264
+ allSettled(blockingPromises).then(() => {
269
265
  doShell();
270
266
  buffer = writable = w;
271
267
  buffer.write(tmp);
@@ -274,7 +270,7 @@ function renderToStream(code, options = {}) {
274
270
  });
275
271
  },
276
272
  pipeTo(w) {
277
- return Promise.allSettled(blockingPromises).then(() => {
273
+ return allSettled(blockingPromises).then(() => {
278
274
  doShell();
279
275
  const encoder = new TextEncoder();
280
276
  const writer = w.getWriter();
@@ -497,6 +493,13 @@ function NoHydration(props) {
497
493
  function queue(fn) {
498
494
  return Promise.resolve().then(fn);
499
495
  }
496
+ function allSettled(promises) {
497
+ let length = promises.length;
498
+ return Promise.allSettled(promises).then(() => {
499
+ if (promises.length !== length) return allSettled(promises);
500
+ return;
501
+ });
502
+ }
500
503
  function injectAssets(assets, html) {
501
504
  if (!assets || !assets.length) return html;
502
505
  let out = "";
@@ -65,7 +65,7 @@ function createSerializer({ onData, onDone, scopeId, onError }) {
65
65
  });
66
66
  }
67
67
  function getLocalHeaderScript(id) {
68
- return getCrossReferenceHeader(id);
68
+ return getCrossReferenceHeader(id) + ";";
69
69
  }
70
70
 
71
71
  const VOID_ELEMENTS =
@@ -94,11 +94,9 @@ function renderToString(code, options = {}) {
94
94
  serialize(id, p) {
95
95
  !sharedConfig.context.noHydrate && serializer.write(id, p);
96
96
  },
97
- pushed: 0,
98
- push(p) {
99
- const id = this.renderId + "i-" + this.pushed++;
100
- this.serialize(id, p);
101
- return id;
97
+ roots: 0,
98
+ nextRoot() {
99
+ return this.renderId + "i-" + this.roots++;
102
100
  }
103
101
  };
104
102
  let html = createRoot(d => {
@@ -220,11 +218,9 @@ function renderToStream(code, options = {}) {
220
218
  });
221
219
  } else if (!serverOnly) serializer.write(id, p);
222
220
  },
223
- pushed: 0,
224
- push(p) {
225
- const id = this.renderId + "i-" + this.pushed++;
226
- this.serialize(id, p);
227
- return id;
221
+ roots: 0,
222
+ nextRoot() {
223
+ return this.renderId + "i-" + this.roots++;
228
224
  },
229
225
  registerFragment(key) {
230
226
  if (!registry.has(key)) {
@@ -295,7 +291,7 @@ function renderToStream(code, options = {}) {
295
291
  if (!registry.size) queue(flushEnd);
296
292
  },
297
293
  pipe(w) {
298
- Promise.allSettled(blockingPromises).then(() => {
294
+ allSettled(blockingPromises).then(() => {
299
295
  doShell();
300
296
  buffer = writable = w;
301
297
  buffer.write(tmp);
@@ -305,7 +301,7 @@ function renderToStream(code, options = {}) {
305
301
  });
306
302
  },
307
303
  pipeTo(w) {
308
- return Promise.allSettled(blockingPromises).then(() => {
304
+ return allSettled(blockingPromises).then(() => {
309
305
  doShell();
310
306
  const encoder = new TextEncoder();
311
307
  const writer = w.getWriter();
@@ -538,6 +534,13 @@ function NoHydration(props) {
538
534
  function queue(fn) {
539
535
  return Promise.resolve().then(fn);
540
536
  }
537
+ function allSettled(promises) {
538
+ let length = promises.length;
539
+ return Promise.allSettled(promises).then(() => {
540
+ if (promises.length !== length) return allSettled(promises);
541
+ return;
542
+ });
543
+ }
541
544
  function injectAssets(assets, html) {
542
545
  if (!assets || !assets.length) return html;
543
546
  let out = "";