@vidact/runtime 0.2.0-beta.0 → 0.2.0-beta.4
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/CHANGELOG.md +37 -0
- package/README.md +1 -1
- package/dist/actions.d.ts +32 -30
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +251 -266
- package/dist/actions.js.map +1 -1
- package/dist/async.d.ts +20 -17
- package/dist/async.d.ts.map +1 -1
- package/dist/async.js +18 -17
- package/dist/async.js.map +1 -1
- package/dist/compiled/async-resource.d.ts +9 -6
- package/dist/compiled/async-resource.d.ts.map +1 -1
- package/dist/compiled/async-resource.js +69 -77
- package/dist/compiled/async-resource.js.map +1 -1
- package/dist/compiled/core.d.ts +136 -147
- package/dist/compiled/core.d.ts.map +1 -1
- package/dist/compiled/core.js +2669 -2985
- package/dist/compiled/core.js.map +1 -1
- package/dist/compiled/types.d.ts +44 -56
- package/dist/compiled/types.d.ts.map +1 -1
- package/dist/compiled/types.js +10 -6
- package/dist/compiled/types.js.map +1 -1
- package/dist/compiled/validation.d.ts +4 -1
- package/dist/compiled/validation.d.ts.map +1 -1
- package/dist/compiled/validation.js +17 -20
- package/dist/compiled/validation.js.map +1 -1
- package/dist/component-spread.d.ts +5 -3
- package/dist/component-spread.d.ts.map +1 -1
- package/dist/component-spread.js +49 -67
- package/dist/component-spread.js.map +1 -1
- package/dist/concurrent.d.ts +20 -18
- package/dist/concurrent.d.ts.map +1 -1
- package/dist/concurrent.js +191 -210
- package/dist/concurrent.js.map +1 -1
- package/dist/direct-dom.d.ts +17 -12
- package/dist/direct-dom.d.ts.map +1 -1
- package/dist/direct-dom.js +187 -221
- package/dist/direct-dom.js.map +1 -1
- package/dist/dom/attributes.d.ts +9 -6
- package/dist/dom/attributes.d.ts.map +1 -1
- package/dist/dom/attributes.js +65 -47
- package/dist/dom/attributes.js.map +1 -1
- package/dist/dom/events.d.ts +5 -2
- package/dist/dom/events.d.ts.map +1 -1
- package/dist/dom/events.js +53 -65
- package/dist/dom/events.js.map +1 -1
- package/dist/dom/forms.d.ts +9 -6
- package/dist/dom/forms.d.ts.map +1 -1
- package/dist/dom/forms.js +152 -198
- package/dist/dom/forms.js.map +1 -1
- package/dist/dom/intrinsic.d.ts +17 -15
- package/dist/dom/intrinsic.d.ts.map +1 -1
- package/dist/dom/intrinsic.js +48 -50
- package/dist/dom/intrinsic.js.map +1 -1
- package/dist/dom/namespace.d.ts +4 -1
- package/dist/dom/namespace.d.ts.map +1 -1
- package/dist/dom/namespace.js +25 -28
- package/dist/dom/namespace.js.map +1 -1
- package/dist/dom/namespaces.d.ts +11 -8
- package/dist/dom/namespaces.d.ts.map +1 -1
- package/dist/dom/namespaces.js +14 -12
- package/dist/dom/namespaces.js.map +1 -1
- package/dist/dom/properties.d.ts +18 -16
- package/dist/dom/properties.d.ts.map +1 -1
- package/dist/dom/properties.js +273 -296
- package/dist/dom/properties.js.map +1 -1
- package/dist/dom/style-properties.d.ts +4 -1
- package/dist/dom/style-properties.d.ts.map +1 -1
- package/dist/dom/style-properties.js +49 -45
- package/dist/dom/style-properties.js.map +1 -1
- package/dist/dom/styles.d.ts +5 -2
- package/dist/dom/styles.d.ts.map +1 -1
- package/dist/dom/styles.js +47 -67
- package/dist/dom/styles.js.map +1 -1
- package/dist/dom-forms.d.ts +4 -1
- package/dist/dom-forms.d.ts.map +1 -1
- package/dist/dom-forms.js +16 -13
- package/dist/dom-forms.js.map +1 -1
- package/dist/dom-styles.d.ts +4 -1
- package/dist/dom-styles.d.ts.map +1 -1
- package/dist/dom-styles.js +10 -7
- package/dist/dom-styles.js.map +1 -1
- package/dist/framework-hydrate.d.ts +20 -17
- package/dist/framework-hydrate.d.ts.map +1 -1
- package/dist/framework-hydrate.js +128 -146
- package/dist/framework-hydrate.js.map +1 -1
- package/dist/framework-protocol.d.ts +27 -25
- package/dist/framework-protocol.d.ts.map +1 -1
- package/dist/framework-protocol.js +173 -211
- package/dist/framework-protocol.js.map +1 -1
- package/dist/framework.d.ts +34 -32
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +74 -93
- package/dist/framework.js.map +1 -1
- package/dist/hydrate.d.ts +11 -8
- package/dist/hydrate.d.ts.map +1 -1
- package/dist/hydrate.js +13 -9
- package/dist/hydrate.js.map +1 -1
- package/dist/hydration-bridge.d.ts +61 -58
- package/dist/hydration-bridge.d.ts.map +1 -1
- package/dist/hydration-bridge.js +67 -66
- package/dist/hydration-bridge.js.map +1 -1
- package/dist/hydration.d.ts +31 -28
- package/dist/hydration.d.ts.map +1 -1
- package/dist/hydration.js +376 -462
- package/dist/hydration.js.map +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +11 -13
- package/dist/indexed-list.d.ts +8 -5
- package/dist/indexed-list.d.ts.map +1 -1
- package/dist/indexed-list.js +14 -7
- package/dist/indexed-list.js.map +1 -1
- package/dist/jsx-runtime.d.ts +10 -8
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx-runtime.js +28 -23
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/keyed-list.d.ts +13 -14
- package/dist/keyed-list.d.ts.map +1 -1
- package/dist/keyed-list.js +132 -160
- package/dist/keyed-list.js.map +1 -1
- package/dist/metadata.d.ts +6 -3
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +131 -164
- package/dist/metadata.js.map +1 -1
- package/dist/nested-prop.d.ts +4 -2
- package/dist/nested-prop.d.ts.map +1 -1
- package/dist/nested-prop.js +17 -16
- package/dist/nested-prop.js.map +1 -1
- package/dist/profiling.d.ts +11 -8
- package/dist/profiling.d.ts.map +1 -1
- package/dist/profiling.js +17 -17
- package/dist/profiling.js.map +1 -1
- package/dist/protocol.d.ts +5 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +8 -5
- package/dist/protocol.js.map +1 -1
- package/dist/raw-html.d.ts +5 -2
- package/dist/raw-html.d.ts.map +1 -1
- package/dist/raw-html.js +86 -146
- package/dist/raw-html.js.map +1 -1
- package/dist/ref.d.ts +8 -3
- package/dist/ref.d.ts.map +1 -1
- package/dist/ref.js +10 -2
- package/dist/ref.js.map +1 -1
- package/dist/renderable-protocol.d.ts +26 -8
- package/dist/renderable-protocol.d.ts.map +1 -1
- package/dist/renderable-protocol.js +30 -9
- package/dist/renderable-protocol.js.map +1 -1
- package/dist/renderable.d.ts +27 -22
- package/dist/renderable.d.ts.map +1 -1
- package/dist/renderable.js +141 -133
- package/dist/renderable.js.map +1 -1
- package/dist/retained-ui.d.ts +9 -6
- package/dist/retained-ui.d.ts.map +1 -1
- package/dist/retained-ui.js +12 -10
- package/dist/retained-ui.js.map +1 -1
- package/dist/root.d.ts +18 -15
- package/dist/root.d.ts.map +1 -1
- package/dist/root.js +73 -85
- package/dist/root.js.map +1 -1
- package/dist/scheduler.d.ts +10 -8
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +97 -105
- package/dist/scheduler.js.map +1 -1
- package/dist/server-framework.d.ts +45 -42
- package/dist/server-framework.d.ts.map +1 -1
- package/dist/server-framework.js +209 -217
- package/dist/server-framework.js.map +1 -1
- package/dist/server.d.ts +130 -128
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +592 -706
- package/dist/server.js.map +1 -1
- package/dist/shared/promise.d.ts +6 -3
- package/dist/shared/promise.d.ts.map +1 -1
- package/dist/shared/promise.js +21 -19
- package/dist/shared/promise.js.map +1 -1
- package/dist/source-mask.d.ts +9 -6
- package/dist/source-mask.d.ts.map +1 -1
- package/dist/source-mask.js +45 -63
- package/dist/source-mask.js.map +1 -1
- package/dist/spread.d.ts +5 -2
- package/dist/spread.d.ts.map +1 -1
- package/dist/spread.js +79 -99
- package/dist/spread.js.map +1 -1
- package/dist/state-slot.d.ts +18 -15
- package/dist/state-slot.d.ts.map +1 -1
- package/dist/state-slot.js +43 -42
- package/dist/state-slot.js.map +1 -1
- package/dist/testing.d.ts +9 -6
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +16 -12
- package/dist/testing.js.map +1 -1
- package/package.json +8 -7
- package/src/actions.ts +415 -0
- package/src/async.ts +78 -0
- package/src/compiled/async-resource.ts +113 -0
- package/src/compiled/core.ts +4026 -0
- package/src/compiled/types.ts +96 -0
- package/src/compiled/validation.ts +23 -0
- package/src/component-spread.ts +86 -0
- package/src/concurrent.ts +310 -0
- package/src/direct-dom.ts +365 -0
- package/src/dom/attributes.ts +55 -0
- package/src/dom/events.ts +93 -0
- package/src/dom/forms.ts +220 -0
- package/src/dom/intrinsic.ts +94 -0
- package/src/dom/namespace.ts +30 -0
- package/src/dom/namespaces.ts +14 -0
- package/src/dom/properties.ts +355 -0
- package/src/dom/style-properties.ts +46 -0
- package/src/dom/styles.ts +86 -0
- package/src/dom-forms.ts +23 -0
- package/src/dom-styles.ts +11 -0
- package/src/env.d.ts +6 -0
- package/src/framework-hydrate.ts +224 -0
- package/src/framework-protocol.ts +335 -0
- package/src/framework.ts +161 -0
- package/src/hydrate.ts +38 -0
- package/src/hydration-bridge.ts +183 -0
- package/src/hydration.ts +556 -0
- package/src/index.ts +92 -0
- package/src/indexed-list.ts +20 -0
- package/src/jsx-runtime.ts +55 -0
- package/src/keyed-list.ts +233 -0
- package/src/metadata.ts +212 -0
- package/src/nested-prop.ts +27 -0
- package/src/profiling.ts +43 -0
- package/src/protocol.ts +8 -0
- package/src/raw-html.ts +206 -0
- package/src/ref.ts +13 -0
- package/src/renderable-protocol.ts +63 -0
- package/src/renderable.ts +283 -0
- package/src/retained-ui.ts +19 -0
- package/src/root.ts +122 -0
- package/src/scheduler.ts +136 -0
- package/src/server-framework.ts +397 -0
- package/src/server.ts +1143 -0
- package/src/shared/promise.ts +28 -0
- package/src/source-mask.ts +83 -0
- package/src/spread.ts +131 -0
- package/src/state-slot.ts +76 -0
- package/src/testing.ts +27 -0
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/framework.js
CHANGED
|
@@ -1,111 +1,92 @@
|
|
|
1
|
-
import { installFrameworkMetadata } from
|
|
2
|
-
import { hoistFrameworkMetadata, installFrameworkMetadataPropRekeying, isFrameworkMetadataElement
|
|
1
|
+
import { installFrameworkMetadata } from "./direct-dom.js";
|
|
2
|
+
import { hoistFrameworkMetadata, installFrameworkMetadataPropRekeying, isFrameworkMetadataElement } from "./metadata.js";
|
|
3
|
+
//#region src/framework.ts
|
|
3
4
|
let metadataInstalled = false;
|
|
4
|
-
const CLIENT_BOUNDARY_DEFINITION = Symbol(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
const CLIENT_BOUNDARY_DEFINITION = Symbol("Vidact.ClientBoundaryDefinition");
|
|
6
|
+
function defineClientBoundary(render, prepare) {
|
|
7
|
+
return Object.freeze({
|
|
8
|
+
[CLIENT_BOUNDARY_DEFINITION]: true,
|
|
9
|
+
render,
|
|
10
|
+
...prepare === void 0 ? {} : { prepare }
|
|
11
|
+
});
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value !== null &&
|
|
15
|
-
CLIENT_BOUNDARY_DEFINITION in value &&
|
|
16
|
-
typeof Reflect.get(value, 'render') === 'function');
|
|
13
|
+
function isClientBoundaryDefinition(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && CLIENT_BOUNDARY_DEFINITION in value && typeof Reflect.get(value, "render") === "function";
|
|
17
15
|
}
|
|
18
16
|
/** @internal */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
installFrameworkMetadata((element, props) => isFrameworkMetadataElement(element, props) ? hoistFrameworkMetadata(element) : element);
|
|
17
|
+
function enableFrameworkMetadata() {
|
|
18
|
+
if (metadataInstalled) return;
|
|
19
|
+
metadataInstalled = true;
|
|
20
|
+
installFrameworkMetadataPropRekeying();
|
|
21
|
+
installFrameworkMetadata((element, props) => isFrameworkMetadataElement(element, props) ? hoistFrameworkMetadata(element) : element);
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
function preconnect(href, options = {}) {
|
|
24
|
+
appendLink("preconnect", href, options);
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
function prefetchDNS(href) {
|
|
27
|
+
appendLink("dns-prefetch", href, {});
|
|
31
28
|
}
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
function preload(href, options) {
|
|
30
|
+
appendLink("preload", href, options);
|
|
34
31
|
}
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
function preloadModule(href, options = {}) {
|
|
33
|
+
appendLink("modulepreload", href, options);
|
|
37
34
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
script.src = href;
|
|
56
|
-
applyResourceOptions(script, options);
|
|
57
|
-
document.head.append(script);
|
|
35
|
+
function preinit(href, options) {
|
|
36
|
+
assertHref(href);
|
|
37
|
+
if (options.as === "style") {
|
|
38
|
+
if (document.head.querySelector(`link[rel="stylesheet"][href="${CSS.escape(href)}"]`)) return;
|
|
39
|
+
const link = document.createElement("link");
|
|
40
|
+
link.rel = "stylesheet";
|
|
41
|
+
link.href = href;
|
|
42
|
+
if (options.precedence !== void 0) link.dataset.precedence = options.precedence;
|
|
43
|
+
applyResourceOptions(link, options);
|
|
44
|
+
document.head.append(link);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (document.head.querySelector(`script[src="${CSS.escape(href)}"]`)) return;
|
|
48
|
+
const script = document.createElement("script");
|
|
49
|
+
script.src = href;
|
|
50
|
+
applyResourceOptions(script, options);
|
|
51
|
+
document.head.append(script);
|
|
58
52
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
document.head.append(script);
|
|
53
|
+
function preinitModule(href, options = {}) {
|
|
54
|
+
assertHref(href);
|
|
55
|
+
if (document.head.querySelector(`script[type="module"][src="${CSS.escape(href)}"]`)) return;
|
|
56
|
+
const script = document.createElement("script");
|
|
57
|
+
script.type = "module";
|
|
58
|
+
script.src = href;
|
|
59
|
+
applyResourceOptions(script, options);
|
|
60
|
+
document.head.append(script);
|
|
68
61
|
}
|
|
69
62
|
function appendLink(relation, href, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
applyResourceOptions(link, options);
|
|
81
|
-
document.head.append(link);
|
|
63
|
+
assertHref(href);
|
|
64
|
+
const as = "as" in options ? options.as : void 0;
|
|
65
|
+
const selector = `link[rel="${CSS.escape(relation)}"][href="${CSS.escape(href)}"]${as === void 0 ? "" : `[as="${CSS.escape(as)}"]`}`;
|
|
66
|
+
if (document.head.querySelector(selector)) return;
|
|
67
|
+
const link = document.createElement("link");
|
|
68
|
+
link.rel = relation;
|
|
69
|
+
link.href = href;
|
|
70
|
+
if (as !== void 0) link.as = as;
|
|
71
|
+
applyResourceOptions(link, options);
|
|
72
|
+
document.head.append(link);
|
|
82
73
|
}
|
|
83
74
|
function applyResourceOptions(element, options) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if ('imageSizes' in options && options.imageSizes !== undefined) {
|
|
95
|
-
element.imageSizes = options.imageSizes;
|
|
96
|
-
}
|
|
97
|
-
if ('imageSrcSet' in options && options.imageSrcSet !== undefined) {
|
|
98
|
-
element.imageSrcset = options.imageSrcSet;
|
|
99
|
-
}
|
|
100
|
-
if ('referrerPolicy' in options && options.referrerPolicy !== undefined) {
|
|
101
|
-
element.referrerPolicy = options.referrerPolicy;
|
|
102
|
-
}
|
|
103
|
-
if ('type' in options && options.type !== undefined)
|
|
104
|
-
element.type = options.type;
|
|
105
|
-
}
|
|
75
|
+
if (options.crossOrigin !== void 0) element.crossOrigin = options.crossOrigin;
|
|
76
|
+
if ("integrity" in options && options.integrity !== void 0) element.integrity = options.integrity;
|
|
77
|
+
if ("nonce" in options && options.nonce !== void 0) element.nonce = options.nonce;
|
|
78
|
+
if (element instanceof HTMLLinkElement) {
|
|
79
|
+
if ("fetchPriority" in options && options.fetchPriority !== void 0) element.fetchPriority = options.fetchPriority;
|
|
80
|
+
if ("imageSizes" in options && options.imageSizes !== void 0) element.imageSizes = options.imageSizes;
|
|
81
|
+
if ("imageSrcSet" in options && options.imageSrcSet !== void 0) element.imageSrcset = options.imageSrcSet;
|
|
82
|
+
if ("referrerPolicy" in options && options.referrerPolicy !== void 0) element.referrerPolicy = options.referrerPolicy;
|
|
83
|
+
if ("type" in options && options.type !== void 0) element.type = options.type;
|
|
84
|
+
}
|
|
106
85
|
}
|
|
107
86
|
function assertHref(href) {
|
|
108
|
-
|
|
109
|
-
throw new TypeError('resource href must be non-empty');
|
|
87
|
+
if (typeof href !== "string" || href.length === 0) throw new TypeError("resource href must be non-empty");
|
|
110
88
|
}
|
|
89
|
+
//#endregion
|
|
90
|
+
export { defineClientBoundary, enableFrameworkMetadata, isClientBoundaryDefinition, preconnect, prefetchDNS, preinit, preinitModule, preload, preloadModule };
|
|
91
|
+
|
|
111
92
|
//# sourceMappingURL=framework.js.map
|
package/dist/framework.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework.js","
|
|
1
|
+
{"version":3,"file":"framework.js","names":[],"sources":["../src/framework.ts"],"mappings":";;;AASA,IAAI,oBAAoB;AACxB,MAAM,6BAA6B,OAAO,iCAAiC;AAQ3E,SAAgB,qBACd,QACA,SAC2C;CAC3C,OA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,cAAc,QAAQ;EAEhC,IAAI,oBAAoB,WAAW,QAAQ,mBAAmB,KAAA,GAC5D,QAAQ,iBAAiB,QAAQ;EAEnC,IAAI,UAAU,WAAW,QAAQ,SAAS,KAAA,GAAW,QAAQ,OAAO,QAAQ;CAC9E;AACF;AAEA,SAAS,WAAW,MAAoB;CACtC,IAAI,OAAO,SAAS,YAAY,KAAK,WAAW,GAC9C,MAAM,IAAI,UAAU,iCAAiC;AACzD"}
|
package/dist/hydrate.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { CompiledComponentResult, CompiledRenderValue } from "./compiled/types.js";
|
|
2
|
+
import { DirectComponent } from "./direct-dom.js";
|
|
3
|
+
import { MountCompiledOptions } from "./compiled/core.js";
|
|
4
|
+
import { CompiledRoot, HotContext } from "./root.js";
|
|
5
|
+
import { CompiledRenderable } from "./renderable.js";
|
|
6
|
+
//#region src/hydrate.d.ts
|
|
7
|
+
declare function createElement(type: string | symbol | DirectComponent | CompiledRenderable, props: Record<string, unknown> | null, ...children: CompiledRenderValue[]): CompiledRenderable;
|
|
8
|
+
declare function hydrateRoot(host: ParentNode, application: () => CompiledComponentResult, options?: MountCompiledOptions): CompiledRoot;
|
|
9
|
+
declare function hydrateHotRoot(hot: HotContext, host: ParentNode, application: () => CompiledComponentResult, options?: MountCompiledOptions): CompiledRoot;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { createElement, hydrateHotRoot, hydrateRoot };
|
|
9
12
|
//# sourceMappingURL=hydrate.d.ts.map
|
package/dist/hydrate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrate.d.ts","
|
|
1
|
+
{"version":3,"file":"hydrate.d.ts","names":[],"sources":["../src/hydrate.ts"],"mappings":";;;;;;iBAcgB,cACd,wBAAwB,kBAAkB,oBAC1C,OAAO,mCACJ,UAAU,wBACZ;iBAIa,YACd,MAAM,YACN,mBAAmB,yBACnB,UAAU,uBACT;iBAIa,eACd,KAAK,YACL,MAAM,YACN,mBAAmB,yBACnB,UAAU,uBACT"}
|
package/dist/hydrate.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { installHydration } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { installHydration } from "./hydration.js";
|
|
2
|
+
import { hydrateHotRoot as hydrateHotRoot$1, hydrateRoot as hydrateRoot$1 } from "./root.js";
|
|
3
|
+
import { createReactElement } from "./renderable.js";
|
|
4
|
+
//#region src/hydrate.ts
|
|
4
5
|
installHydration();
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
function createElement(type, props, ...children) {
|
|
7
|
+
return createReactElement(type, props, ...children);
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
function hydrateRoot(host, application, options) {
|
|
10
|
+
return hydrateRoot$1(host, application, options);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
function hydrateHotRoot(hot, host, application, options) {
|
|
13
|
+
return hydrateHotRoot$1(hot, host, application, options);
|
|
13
14
|
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { createElement, hydrateHotRoot, hydrateRoot };
|
|
17
|
+
|
|
14
18
|
//# sourceMappingURL=hydrate.js.map
|
package/dist/hydrate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydrate.js","
|
|
1
|
+
{"version":3,"file":"hydrate.js","names":["createHydrationRoot","createHotHydrationRoot"],"sources":["../src/hydrate.ts"],"mappings":";;;;AAYA,iBAAiB;AAEjB,SAAgB,cACd,MACA,OACA,GAAG,UACiB;CACpB,OAAO,mBAAmB,MAAM,OAAO,GAAG,QAAQ;AACpD;AAEA,SAAgB,YACd,MACA,aACA,SACc;CACd,OAAOA,cAAoB,MAAM,aAAa,OAAO;AACvD;AAEA,SAAgB,eACd,KACA,MACA,aACA,SACc;CACd,OAAOC,iBAAuB,KAAK,MAAM,aAAa,OAAO;AAC/D"}
|
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
//#region src/hydration-bridge.d.ts
|
|
2
|
+
type HydrationRange = readonly [start: Comment, end: Comment];
|
|
3
|
+
interface HydrationOperations {
|
|
4
|
+
readonly begin: (host: ParentNode) => () => void;
|
|
5
|
+
readonly finish: () => void;
|
|
6
|
+
readonly rootMarkers: () => HydrationRange;
|
|
7
|
+
readonly active: () => boolean;
|
|
8
|
+
readonly createFragment: (children: readonly unknown[]) => DocumentFragment;
|
|
9
|
+
readonly fragmentChildren: (fragment: DocumentFragment) => readonly unknown[] | undefined;
|
|
10
|
+
readonly claimElement: (localName: string, namespace: string | null, matches?: (element: Element) => boolean) => Element | undefined;
|
|
11
|
+
readonly noteStructuralParent: () => void;
|
|
12
|
+
readonly claimComponentRange: () => HydrationRange | undefined;
|
|
13
|
+
readonly withComponentRange: <Result>(range: HydrationRange, operation: () => Result) => Result;
|
|
14
|
+
readonly withCursor: <Result>(parent: Node, value: Node | null, operation: () => Result) => Result;
|
|
15
|
+
readonly claimNode: (parent: Node, node: Node) => boolean;
|
|
16
|
+
readonly claimComponentMount: (parent: Node, start: Comment, end: Comment) => boolean;
|
|
17
|
+
readonly claimText: (parent: Node, expected: string) => Text | null | undefined;
|
|
18
|
+
readonly claimTextRange: (parent: Node, expected: string) => readonly [start: Comment, end: Comment, text: Text | null] | undefined;
|
|
19
|
+
readonly claimArrayRange: (parent: Node) => HydrationRange | undefined;
|
|
20
|
+
readonly finishArrayRange: (parent: Node, end: Comment) => void;
|
|
21
|
+
readonly claimSlotRange: (parent: Node) => HydrationRange | undefined;
|
|
22
|
+
readonly borrowSlotRange: (parent: Node, current: boolean) => HydrationRange | undefined;
|
|
23
|
+
readonly claimSuspenseFallback: (parent: Node) => Comment | undefined;
|
|
24
|
+
readonly withoutHydration: <Result>(operation: () => Result) => Result;
|
|
25
|
+
readonly withInsertion: <Result>(parent: Node, before: Node, operation: () => Result) => Result;
|
|
26
|
+
readonly insertionPoint: () => readonly [parent: Node, before: Node] | undefined;
|
|
27
|
+
readonly cursor: (parent: Node) => Node | null | undefined;
|
|
28
|
+
readonly rangeParent: (start: Comment, end: Comment) => Node | undefined;
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
interface HydrationMismatchInfo {
|
|
31
|
+
readonly message: string;
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
declare class HydrationMismatch extends Error {
|
|
34
|
+
constructor(message: string);
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
36
|
+
declare function beginHydration(host: ParentNode): () => void;
|
|
37
|
+
declare function finishHydration(): void;
|
|
38
|
+
declare function hydrationRootMarkers(): HydrationRange;
|
|
39
|
+
declare function isHydrating(): boolean;
|
|
40
|
+
declare function createHydrationFragment(children: readonly unknown[]): DocumentFragment;
|
|
41
|
+
declare function hydrationFragmentChildren(fragment: DocumentFragment): readonly unknown[] | undefined;
|
|
42
|
+
declare function claimHydrationElement(localName: string, namespace: string | null, matches?: (element: Element) => boolean): Element | undefined;
|
|
43
|
+
declare function noteHydrationStructuralParent(): void;
|
|
44
|
+
declare function claimHydrationComponentRange(): HydrationRange | undefined;
|
|
45
|
+
declare function withHydrationComponentRange<Result>(range: HydrationRange, operation: () => Result): Result;
|
|
46
|
+
declare function withHydrationCursor<Result>(parent: Node, value: Node | null, operation: () => Result): Result;
|
|
47
|
+
declare function claimHydrationNode(parent: Node, node: Node): boolean;
|
|
48
|
+
declare function claimHydrationComponentMount(parent: Node, start: Comment, end: Comment): boolean;
|
|
49
|
+
declare function claimHydrationText(parent: Node, expected: string): Text | null | undefined;
|
|
50
|
+
declare function claimHydrationTextRange(parent: Node, expected: string): readonly [start: Comment, end: Comment, text: Text | null] | undefined;
|
|
51
|
+
declare function claimHydrationArrayRange(parent: Node): HydrationRange | undefined;
|
|
52
|
+
declare function finishHydrationArrayRange(parent: Node, end: Comment): void;
|
|
53
|
+
declare function claimHydrationSlotRange(parent: Node): HydrationRange | undefined;
|
|
54
|
+
declare function borrowHydrationSlotRange(parent: Node, current: boolean): HydrationRange | undefined;
|
|
55
|
+
declare function claimHydrationSuspenseFallback(parent: Node): Comment | undefined;
|
|
56
|
+
declare function withoutHydration<Result>(operation: () => Result): Result;
|
|
57
|
+
declare function withHydrationInsertion<Result>(parent: Node, before: Node, operation: () => Result): Result;
|
|
58
|
+
declare function hydrationInsertionPoint(): readonly [parent: Node, before: Node] | undefined;
|
|
59
|
+
declare function hydrationCursor(parent: Node): Node | null | undefined;
|
|
60
|
+
declare function hydrationRangeParent(start: Comment, end: Comment): Node | undefined;
|
|
61
|
+
declare function isHydrationMismatch(error: unknown): error is HydrationMismatch;
|
|
62
|
+
declare function installHydrationOperations(operations: HydrationOperations): void;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { HydrationMismatch, HydrationMismatchInfo, HydrationOperations, HydrationRange, beginHydration, borrowHydrationSlotRange, claimHydrationArrayRange, claimHydrationComponentMount, claimHydrationComponentRange, claimHydrationElement, claimHydrationNode, claimHydrationSlotRange, claimHydrationSuspenseFallback, claimHydrationText, claimHydrationTextRange, createHydrationFragment, finishHydration, finishHydrationArrayRange, hydrationCursor, hydrationFragmentChildren, hydrationInsertionPoint, hydrationRangeParent, hydrationRootMarkers, installHydrationOperations, isHydrating, isHydrationMismatch, noteHydrationStructuralParent, withHydrationComponentRange, withHydrationCursor, withHydrationInsertion, withoutHydration };
|
|
62
65
|
//# sourceMappingURL=hydration-bridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hydration-bridge.d.ts","
|
|
1
|
+
{"version":3,"file":"hydration-bridge.d.ts","names":[],"sources":["../src/hydration-bridge.ts"],"mappings":";KAAY,2BAA2B,OAAO,SAAS,KAAK;UAE3C;WACN,QAAQ,MAAM;WACd;WACA,mBAAmB;WACnB;WACA,iBAAiB,iCAAiC;WAClD,mBAAmB,UAAU;WAC7B,eACP,mBACA,0BACA,WAAW,SAAS,wBACjB;WACI;WACA,2BAA2B;WAC3B,qBAAqB,QAAQ,OAAO,gBAAgB,iBAAiB,WAAW;WAChF,aAAa,QAAQ,QAAQ,MAAM,OAAO,aAAa,iBAAiB,WAAW;WACnF,YAAY,QAAQ,MAAM,MAAM;WAChC,sBAAsB,QAAQ,MAAM,OAAO,SAAS,KAAK;WACzD,YAAY,QAAQ,MAAM,qBAAqB;WAC/C,iBACP,QAAQ,MACR,+BACa,OAAO,SAAS,KAAK,SAAS,MAAM;WAC1C,kBAAkB,QAAQ,SAAS;WACnC,mBAAmB,QAAQ,MAAM,KAAK;WACtC,iBAAiB,QAAQ,SAAS;WAClC,kBAAkB,QAAQ,MAAM,qBAAqB;WACrD,wBAAwB,QAAQ,SAAS;WACzC,mBAAmB,QAAQ,iBAAiB,WAAW;WACvD,gBAAgB,QAAQ,QAAQ,MAAM,Q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
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "HydrationMismatch";
|
|
6
|
+
}
|
|
7
|
+
};
|
|
7
8
|
let hydration;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return hydration.begin(host);
|
|
9
|
+
function beginHydration(host) {
|
|
10
|
+
if (hydration === void 0) throw new Error("hydrate runtime entry is not installed");
|
|
11
|
+
return hydration.begin(host);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
function finishHydration() {
|
|
14
|
+
hydration?.finish();
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return hydration.rootMarkers();
|
|
16
|
+
function hydrationRootMarkers() {
|
|
17
|
+
if (hydration === void 0) throw new Error("hydrate runtime entry is not installed");
|
|
18
|
+
return hydration.rootMarkers();
|
|
20
19
|
}
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
function isHydrating() {
|
|
21
|
+
return hydration?.active() ?? false;
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return hydration.createFragment(children);
|
|
23
|
+
function createHydrationFragment(children) {
|
|
24
|
+
if (hydration === void 0) throw new Error("hydrate runtime entry is not installed");
|
|
25
|
+
return hydration.createFragment(children);
|
|
28
26
|
}
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
function hydrationFragmentChildren(fragment) {
|
|
28
|
+
return hydration?.fragmentChildren(fragment);
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
function claimHydrationElement(localName, namespace, matches) {
|
|
31
|
+
return hydration?.claimElement(localName, namespace, matches);
|
|
34
32
|
}
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
function noteHydrationStructuralParent() {
|
|
34
|
+
hydration?.noteStructuralParent();
|
|
37
35
|
}
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
function claimHydrationComponentRange() {
|
|
37
|
+
return hydration?.claimComponentRange();
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
function withHydrationComponentRange(range, operation) {
|
|
40
|
+
return hydration === void 0 ? operation() : hydration.withComponentRange(range, operation);
|
|
43
41
|
}
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
function withHydrationCursor(parent, value, operation) {
|
|
43
|
+
return hydration === void 0 ? operation() : hydration.withCursor(parent, value, operation);
|
|
46
44
|
}
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
function claimHydrationNode(parent, node) {
|
|
46
|
+
return hydration?.claimNode(parent, node) ?? false;
|
|
49
47
|
}
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
function claimHydrationComponentMount(parent, start, end) {
|
|
49
|
+
return hydration?.claimComponentMount(parent, start, end) ?? false;
|
|
52
50
|
}
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
function claimHydrationText(parent, expected) {
|
|
52
|
+
return hydration?.claimText(parent, expected);
|
|
55
53
|
}
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
function claimHydrationTextRange(parent, expected) {
|
|
55
|
+
return hydration?.claimTextRange(parent, expected);
|
|
58
56
|
}
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
function claimHydrationArrayRange(parent) {
|
|
58
|
+
return hydration?.claimArrayRange(parent);
|
|
61
59
|
}
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
function finishHydrationArrayRange(parent, end) {
|
|
61
|
+
hydration?.finishArrayRange(parent, end);
|
|
64
62
|
}
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
function claimHydrationSlotRange(parent) {
|
|
64
|
+
return hydration?.claimSlotRange(parent);
|
|
67
65
|
}
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
function borrowHydrationSlotRange(parent, current) {
|
|
67
|
+
return hydration?.borrowSlotRange(parent, current);
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
function claimHydrationSuspenseFallback(parent) {
|
|
70
|
+
return hydration?.claimSuspenseFallback(parent);
|
|
73
71
|
}
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
function withoutHydration(operation) {
|
|
73
|
+
return hydration === void 0 ? operation() : hydration.withoutHydration(operation);
|
|
76
74
|
}
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
function withHydrationInsertion(parent, before, operation) {
|
|
76
|
+
return hydration === void 0 ? operation() : hydration.withInsertion(parent, before, operation);
|
|
79
77
|
}
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
function hydrationInsertionPoint() {
|
|
79
|
+
return hydration?.insertionPoint();
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
function hydrationCursor(parent) {
|
|
82
|
+
return hydration?.cursor(parent);
|
|
85
83
|
}
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
function hydrationRangeParent(start, end) {
|
|
85
|
+
return hydration?.rangeParent(start, end);
|
|
88
86
|
}
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
function isHydrationMismatch(error) {
|
|
88
|
+
return error instanceof HydrationMismatch;
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
function installHydrationOperations(operations) {
|
|
91
|
+
hydration = operations;
|
|
94
92
|
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { HydrationMismatch, beginHydration, borrowHydrationSlotRange, claimHydrationArrayRange, claimHydrationComponentMount, claimHydrationComponentRange, claimHydrationElement, claimHydrationNode, claimHydrationSlotRange, claimHydrationSuspenseFallback, claimHydrationText, claimHydrationTextRange, createHydrationFragment, finishHydration, finishHydrationArrayRange, hydrationCursor, hydrationFragmentChildren, hydrationInsertionPoint, hydrationRangeParent, hydrationRootMarkers, installHydrationOperations, isHydrating, isHydrationMismatch, noteHydrationStructuralParent, withHydrationComponentRange, withHydrationCursor, withHydrationInsertion, withoutHydration };
|
|
95
|
+
|
|
95
96
|
//# sourceMappingURL=hydration-bridge.js.map
|