@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.
- package/dist/block.d.ts +12 -7
- package/dist/client/hydrate.d.ts +6 -0
- package/dist/client/potok-preload.d.ts +6 -0
- package/dist/client/utils/dom.d.ts +4 -0
- package/dist/client.mjs +108 -116
- package/dist/constants-Bxn0R4hW.mjs +34 -0
- package/dist/constants.d.ts +4 -2
- package/dist/css-BercB0Kp.mjs +8 -0
- package/dist/escape-from-script-tag-CRT2evI1.mjs +4 -0
- package/dist/exports/client.d.ts +1 -1
- package/dist/exports/hmr.d.ts +2 -0
- package/dist/exports/index.d.ts +3 -3
- package/dist/exports/jsx-runtime.d.ts +2 -1
- package/dist/exports/server.d.ts +2 -1
- package/dist/exports/store.d.ts +2 -0
- package/dist/footer-scripts.d.ts +2 -0
- package/dist/fragment-CXNEPBWB.mjs +18 -0
- package/dist/get-component-instance-id-CP6LDtpX.mjs +97 -0
- package/dist/header-scripts.d.ts +2 -0
- package/dist/hmr/constants.d.ts +12 -0
- package/dist/hmr/register-component.d.ts +4 -0
- package/dist/hmr/register-style.d.ts +1 -0
- package/dist/hmr/registered-component.d.ts +1 -6
- package/dist/hmr/remove-style.d.ts +1 -0
- package/dist/hmr/utils.d.ts +0 -2
- package/dist/hmr.mjs +13 -41
- package/dist/html-element-DBut4UCf.mjs +31 -0
- package/dist/html-element.d.ts +9 -1
- package/dist/index.mjs +203 -130
- package/dist/is-pure-object-s_MkQp1w.mjs +4 -0
- package/dist/jsx-runtime.mjs +4 -4
- package/dist/lib-node-DyXPvvVQ.mjs +192 -0
- package/dist/lib-node.d.ts +6 -0
- package/dist/list.d.ts +3 -0
- package/dist/normalize-children-BWrn16R7.mjs +48 -0
- package/dist/prop-types.d.ts +232 -253
- package/dist/register-component-B92kGFqC.mjs +67 -0
- package/dist/serialization-qOayQbjE.mjs +108 -0
- package/dist/{bootstrap-app.d.ts → server/bootstrap-app.d.ts} +3 -4
- package/dist/{render-to-string.d.ts → server/render-to-string.d.ts} +1 -1
- package/dist/server-node.d.ts +1 -1
- package/dist/server.mjs +82 -1150
- package/dist/signals.d.ts +5 -0
- package/dist/store/create-store.d.ts +2 -0
- package/dist/store/http-extension.d.ts +26 -0
- package/dist/store/types.d.ts +40 -0
- package/dist/store.mjs +137 -0
- package/dist/text-node.d.ts +12 -0
- package/dist/types.d.ts +12 -18
- package/dist/utils/css.d.ts +2 -0
- package/dist/utils/deep-assign-object.d.ts +1 -0
- package/dist/utils/escape-from-script-tag.d.ts +1 -0
- package/dist/utils/escape-html.d.ts +1 -0
- package/dist/utils/get-component-instance-id.d.ts +2 -0
- package/dist/utils/is-pure-object.d.ts +1 -0
- package/dist/utils/merge-context.d.ts +2 -0
- package/dist/utils/normalize-array.d.ts +2 -0
- package/dist/utils/normalize-children.d.ts +2 -0
- package/dist/utils/serialization.d.ts +2 -0
- package/package.json +6 -5
- package/dist/constants-BOAOReQ3.mjs +0 -26
- package/dist/fragment-BahmURhz.mjs +0 -17
- package/dist/hmr/hmr-dev.d.ts +0 -9
- package/dist/html-element-Cm0RtMkT.mjs +0 -42
- package/dist/lib-scripts.d.ts +0 -2
- package/dist/lifecycle-4vjEuXGy.mjs +0 -57
- package/dist/portal-CbcYOHLv.mjs +0 -44
- package/dist/render-to-dom.d.ts +0 -8
- package/dist/store.d.ts +0 -26
- package/dist/text.d.ts +0 -5
- package/dist/utils-CAe_kbSH.mjs +0 -345
- 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 };
|