solid-js 1.9.2 → 1.9.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.
Files changed (46) hide show
  1. package/dist/dev.js +559 -318
  2. package/dist/server.js +168 -74
  3. package/dist/solid.js +486 -276
  4. package/h/dist/h.js +40 -9
  5. package/h/jsx-runtime/dist/jsx.js +1 -1
  6. package/h/jsx-runtime/types/index.d.ts +11 -8
  7. package/h/jsx-runtime/types/jsx.d.ts +93 -91
  8. package/h/types/hyperscript.d.ts +11 -11
  9. package/html/dist/html.js +219 -94
  10. package/html/types/lit.d.ts +52 -33
  11. package/package.json +1 -1
  12. package/store/dist/dev.js +123 -43
  13. package/store/dist/server.js +20 -8
  14. package/store/dist/store.js +114 -40
  15. package/store/types/index.d.ts +21 -7
  16. package/store/types/modifiers.d.ts +6 -3
  17. package/store/types/mutable.d.ts +5 -2
  18. package/store/types/server.d.ts +25 -5
  19. package/store/types/store.d.ts +218 -61
  20. package/types/index.d.ts +75 -10
  21. package/types/jsx.d.ts +143 -157
  22. package/types/reactive/array.d.ts +12 -4
  23. package/types/reactive/observable.d.ts +25 -17
  24. package/types/reactive/scheduler.d.ts +9 -6
  25. package/types/reactive/signal.d.ts +233 -142
  26. package/types/render/Suspense.d.ts +5 -5
  27. package/types/render/component.d.ts +71 -35
  28. package/types/render/flow.d.ts +43 -31
  29. package/types/render/hydration.d.ts +15 -15
  30. package/types/server/index.d.ts +57 -2
  31. package/types/server/reactive.d.ts +73 -42
  32. package/types/server/rendering.d.ts +169 -98
  33. package/universal/dist/dev.js +28 -12
  34. package/universal/dist/universal.js +28 -12
  35. package/universal/types/index.d.ts +3 -1
  36. package/universal/types/universal.d.ts +0 -1
  37. package/web/dist/dev.js +639 -89
  38. package/web/dist/server.cjs +13 -10
  39. package/web/dist/server.js +653 -118
  40. package/web/dist/web.js +627 -87
  41. package/web/storage/dist/storage.js +3 -3
  42. package/web/types/client.d.ts +1 -1
  43. package/web/types/core.d.ts +10 -1
  44. package/web/types/index.d.ts +27 -10
  45. package/web/types/server-mock.d.ts +47 -32
  46. package/web/types/server.d.ts +1 -1
@@ -421,8 +421,13 @@ function ssrElement(tag, props, children, needsId) {
421
421
  classResolved = true;
422
422
  } else if (BooleanAttributes.has(prop)) {
423
423
  if (value) result += prop;else continue;
424
- } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on") {
424
+ } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
425
425
  continue;
426
+ } else if (prop.slice(0, 5) === "bool:") {
427
+ if (!value) continue;
428
+ result += escape(prop.slice(5));
429
+ } else if (prop.slice(0, 5) === "attr:") {
430
+ result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
426
431
  } else {
427
432
  result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
428
433
  }
@@ -539,7 +544,7 @@ function Hydration(props) {
539
544
  return res;
540
545
  }
541
546
  function NoHydration(props) {
542
- solidJs.sharedConfig.context.noHydrate = true;
547
+ if (solidJs.sharedConfig.context) solidJs.sharedConfig.context.noHydrate = true;
543
548
  return props.children;
544
549
  }
545
550
  function queue(fn) {
@@ -643,15 +648,13 @@ function ssrSpread(props, isSVG, skipChildren) {
643
648
  if (value) result += prop;else continue;
644
649
  } else if (value == undefined || prop === "ref" || prop.slice(0, 2) === "on" || prop.slice(0, 5) === "prop:") {
645
650
  continue;
651
+ } else if (prop.slice(0, 5) === "bool:") {
652
+ if (!value) continue;
653
+ result += escape(prop.slice(5));
654
+ } else if (prop.slice(0, 5) === "attr:") {
655
+ result += `${escape(prop.slice(5))}="${escape(value, true)}"`;
646
656
  } else {
647
- if (prop.slice(0, 5) === "bool:") {
648
- if (!value) continue;
649
- prop = prop.slice(5);
650
- result += `${escape(prop)}`;
651
- } else {
652
- if (prop.slice(0, 5) === "attr:") prop = prop.slice(5);
653
- result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
654
- }
657
+ result += `${Aliases[prop] || escape(prop)}="${escape(value, true)}"`;
655
658
  }
656
659
  if (i !== keys.length - 1) result += " ";
657
660
  }