solid-js 1.8.0 → 1.8.2

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.
Files changed (47) hide show
  1. package/dist/dev.cjs +5 -1
  2. package/dist/dev.js +301 -532
  3. package/dist/server.cjs +18 -4
  4. package/dist/server.js +89 -170
  5. package/dist/solid.cjs +5 -1
  6. package/dist/solid.js +259 -459
  7. package/h/dist/h.js +8 -34
  8. package/h/jsx-runtime/dist/jsx.js +1 -1
  9. package/h/jsx-runtime/types/index.d.ts +8 -11
  10. package/h/types/hyperscript.d.ts +11 -11
  11. package/html/dist/html.js +94 -216
  12. package/html/types/lit.d.ts +31 -45
  13. package/package.json +2 -2
  14. package/store/dist/dev.js +42 -114
  15. package/store/dist/server.js +8 -19
  16. package/store/dist/store.js +39 -105
  17. package/store/types/index.d.ts +7 -21
  18. package/store/types/modifiers.d.ts +3 -6
  19. package/store/types/mutable.d.ts +2 -5
  20. package/store/types/server.d.ts +4 -12
  21. package/store/types/store.d.ts +61 -218
  22. package/types/index.d.ts +9 -72
  23. package/types/reactive/array.d.ts +4 -12
  24. package/types/reactive/observable.d.ts +17 -25
  25. package/types/reactive/scheduler.d.ts +6 -9
  26. package/types/reactive/signal.d.ts +140 -228
  27. package/types/render/Suspense.d.ts +5 -5
  28. package/types/render/component.d.ts +31 -62
  29. package/types/render/flow.d.ts +31 -43
  30. package/types/render/hydration.d.ts +14 -14
  31. package/types/server/index.d.ts +2 -56
  32. package/types/server/reactive.d.ts +44 -68
  33. package/types/server/rendering.d.ts +95 -166
  34. package/universal/dist/dev.js +12 -28
  35. package/universal/dist/universal.js +12 -28
  36. package/universal/types/index.d.ts +1 -3
  37. package/universal/types/universal.d.ts +1 -0
  38. package/web/dist/dev.cjs +2 -2
  39. package/web/dist/dev.js +81 -613
  40. package/web/dist/server.cjs +1 -1
  41. package/web/dist/server.js +93 -176
  42. package/web/dist/web.cjs +1 -6
  43. package/web/dist/web.js +80 -617
  44. package/web/types/client.d.ts +2 -2
  45. package/web/types/core.d.ts +1 -10
  46. package/web/types/index.d.ts +10 -27
  47. package/web/types/server-mock.d.ts +32 -47
package/dist/dev.cjs CHANGED
@@ -286,7 +286,7 @@ function createResource(pSource, pFetcher, pOptions) {
286
286
  if (sharedConfig.context) {
287
287
  id = `${sharedConfig.context.id}${sharedConfig.context.count++}`;
288
288
  let v;
289
- if (options.ssrLoadFrom === "initial") initP = options.initialValue;else if (sharedConfig.load && (v = sharedConfig.load(id))) initP = isPromise(v) && "value" in v ? v.value : v;
289
+ if (options.ssrLoadFrom === "initial") initP = options.initialValue;else if (sharedConfig.load && (v = sharedConfig.load(id))) initP = v;
290
290
  }
291
291
  function loadEnd(p, v, error, key) {
292
292
  if (pr === p) {
@@ -352,6 +352,10 @@ function createResource(pSource, pFetcher, pOptions) {
352
352
  loadEnd(pr, p, undefined, lookup);
353
353
  return p;
354
354
  }
355
+ if ("value" in p) {
356
+ if (p.status === "success") loadEnd(pr, p.value, undefined, lookup);else loadEnd(pr, undefined, undefined, lookup);
357
+ return p;
358
+ }
355
359
  pr = p;
356
360
  scheduled = true;
357
361
  queueMicrotask(() => scheduled = false);