@potok-web-framework/core 0.6.0 → 0.9.0

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 (72) hide show
  1. package/dist/block.d.ts +12 -7
  2. package/dist/client/hydrate.d.ts +6 -0
  3. package/dist/client/potok-preload.d.ts +6 -0
  4. package/dist/client/utils/dom.d.ts +4 -0
  5. package/dist/client.mjs +108 -116
  6. package/dist/constants-Bxn0R4hW.mjs +34 -0
  7. package/dist/constants.d.ts +4 -2
  8. package/dist/css-BercB0Kp.mjs +8 -0
  9. package/dist/escape-from-script-tag-CRT2evI1.mjs +4 -0
  10. package/dist/exports/client.d.ts +1 -1
  11. package/dist/exports/hmr.d.ts +2 -0
  12. package/dist/exports/index.d.ts +3 -3
  13. package/dist/exports/jsx-runtime.d.ts +2 -1
  14. package/dist/exports/server.d.ts +2 -1
  15. package/dist/exports/store.d.ts +2 -0
  16. package/dist/footer-scripts.d.ts +2 -0
  17. package/dist/fragment-CXNEPBWB.mjs +18 -0
  18. package/dist/get-component-instance-id-CP6LDtpX.mjs +97 -0
  19. package/dist/header-scripts.d.ts +2 -0
  20. package/dist/hmr/constants.d.ts +12 -0
  21. package/dist/hmr/register-component.d.ts +4 -0
  22. package/dist/hmr/register-style.d.ts +1 -0
  23. package/dist/hmr/registered-component.d.ts +1 -6
  24. package/dist/hmr/remove-style.d.ts +1 -0
  25. package/dist/hmr/utils.d.ts +0 -2
  26. package/dist/hmr.mjs +13 -41
  27. package/dist/html-element-DBut4UCf.mjs +31 -0
  28. package/dist/html-element.d.ts +9 -1
  29. package/dist/index.mjs +203 -130
  30. package/dist/is-pure-object-s_MkQp1w.mjs +4 -0
  31. package/dist/jsx-runtime.mjs +4 -4
  32. package/dist/lib-node-DyXPvvVQ.mjs +192 -0
  33. package/dist/lib-node.d.ts +6 -0
  34. package/dist/list.d.ts +3 -0
  35. package/dist/normalize-children-BWrn16R7.mjs +48 -0
  36. package/dist/prop-types.d.ts +232 -253
  37. package/dist/register-component-B92kGFqC.mjs +67 -0
  38. package/dist/serialization-qOayQbjE.mjs +108 -0
  39. package/dist/{bootstrap-app.d.ts → server/bootstrap-app.d.ts} +3 -4
  40. package/dist/{render-to-string.d.ts → server/render-to-string.d.ts} +1 -1
  41. package/dist/server-node.d.ts +1 -1
  42. package/dist/server.mjs +82 -1150
  43. package/dist/signals.d.ts +5 -0
  44. package/dist/store/create-store.d.ts +2 -0
  45. package/dist/store/http-extension.d.ts +26 -0
  46. package/dist/store/types.d.ts +40 -0
  47. package/dist/store.mjs +137 -0
  48. package/dist/text-node.d.ts +12 -0
  49. package/dist/types.d.ts +12 -18
  50. package/dist/utils/css.d.ts +2 -0
  51. package/dist/utils/deep-assign-object.d.ts +1 -0
  52. package/dist/utils/escape-from-script-tag.d.ts +1 -0
  53. package/dist/utils/escape-html.d.ts +1 -0
  54. package/dist/utils/get-component-instance-id.d.ts +2 -0
  55. package/dist/utils/is-pure-object.d.ts +1 -0
  56. package/dist/utils/merge-context.d.ts +2 -0
  57. package/dist/utils/normalize-array.d.ts +2 -0
  58. package/dist/utils/normalize-children.d.ts +2 -0
  59. package/dist/utils/serialization.d.ts +2 -0
  60. package/package.json +6 -5
  61. package/dist/constants-BOAOReQ3.mjs +0 -26
  62. package/dist/fragment-BahmURhz.mjs +0 -17
  63. package/dist/hmr/hmr-dev.d.ts +0 -9
  64. package/dist/html-element-Cm0RtMkT.mjs +0 -42
  65. package/dist/lib-scripts.d.ts +0 -2
  66. package/dist/lifecycle-4vjEuXGy.mjs +0 -57
  67. package/dist/portal-CbcYOHLv.mjs +0 -44
  68. package/dist/render-to-dom.d.ts +0 -8
  69. package/dist/store.d.ts +0 -26
  70. package/dist/text.d.ts +0 -5
  71. package/dist/utils-CAe_kbSH.mjs +0 -345
  72. package/dist/utils.d.ts +0 -11
@@ -0,0 +1,48 @@
1
+ import { t as LibNode } from "./lib-node-DyXPvvVQ.mjs";
2
+ function mergeContext(e, t) {
3
+ return {
4
+ parentBlock: t.parentBlock,
5
+ get index() {
6
+ return t.index;
7
+ },
8
+ portals: e.portals,
9
+ preload: e.preload,
10
+ states: e.states,
11
+ contexts: {
12
+ ...e.contexts,
13
+ ...t.contexts
14
+ },
15
+ isServer: e.isServer,
16
+ promises: e.promises,
17
+ get isHydrating() {
18
+ return e.isHydrating;
19
+ },
20
+ insertNode: e.insertNode,
21
+ removeNode: e.removeNode
22
+ };
23
+ }
24
+ function normalizeArray(e) {
25
+ return Array.isArray(e) ? e : [e];
26
+ }
27
+ var LibTextNode = class extends LibNode {
28
+ constructor(e, t) {
29
+ super(), this.props = e, this.context = t, this.insert();
30
+ }
31
+ isTextNode() {
32
+ return !0;
33
+ }
34
+ };
35
+ function text(e) {
36
+ return function(t) {
37
+ return new LibTextNode(e, t);
38
+ };
39
+ }
40
+ function normalizeChild(e) {
41
+ return typeof e == "string" || typeof e == "number" ? [text({ get text() {
42
+ return String(e);
43
+ } })] : Array.isArray(e) ? e.flatMap(normalizeChildren) : [e];
44
+ }
45
+ function normalizeChildren(e) {
46
+ return e ? normalizeArray(e).filter((e) => e != null).flatMap(normalizeChild) : [];
47
+ }
48
+ export { mergeContext as i, text as n, normalizeArray as r, normalizeChildren as t };