octane 0.14.3 → 0.16.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/cjs/dom-focused-move.cjs +62 -33
- package/dist/cjs/hydration/dev-values.cjs +1 -1
- package/dist/cjs/index.cjs +4 -0
- package/dist/cjs/internal/universal-children.cjs +30 -0
- package/dist/cjs/runtime/actions.cjs +73 -34
- package/dist/cjs/runtime/block.cjs +2 -2
- package/dist/cjs/runtime/child-slots.cjs +11 -0
- package/dist/cjs/runtime/commit.cjs +17 -5
- package/dist/cjs/runtime/component-slots.cjs +22 -1
- package/dist/cjs/runtime/deopt.cjs +27 -12
- package/dist/cjs/runtime/elements.cjs +5 -1
- package/dist/cjs/runtime/engine.cjs +44 -32
- package/dist/cjs/runtime/events.cjs +19 -12
- package/dist/cjs/runtime/hooks.cjs +2 -1
- package/dist/cjs/runtime/host-props.cjs +48 -17
- package/dist/cjs/runtime/hydration.cjs +4 -5
- package/dist/cjs/runtime/lists.cjs +20 -20
- package/dist/cjs/runtime/render.cjs +2 -0
- package/dist/cjs/runtime/roots.cjs +3 -2
- package/dist/cjs/runtime/signal-bindings.cjs +59 -9
- package/dist/cjs/runtime/suspense.cjs +18 -18
- package/dist/cjs/runtime/templates.cjs +4 -2
- package/dist/cjs/runtime/transitions.cjs +61 -3
- package/dist/cjs/runtime.cjs +2 -0
- package/dist/cjs/runtime.server.cjs +1 -1
- package/dist/cjs/server/streamed-region.cjs +2 -2
- package/dist/cjs/server-rpc-batch-client.cjs +34 -59
- package/dist/cjs/server-rpc-client.cjs +114 -104
- package/dist/cjs/server-rpc-protocol.cjs +0 -59
- package/dist/cjs/server-rpc-stream-client.cjs +57 -1
- package/dist/cjs/signals/computations.cjs +74 -67
- package/dist/cjs/signals/engine.cjs +0 -24
- package/dist/cjs/signals/facade.cjs +15 -81
- package/dist/cjs/signals/index.cjs +14 -4
- package/dist/cjs/signals/native-adoption.cjs +112 -0
- package/dist/cjs/signals/native-read-seeds.cjs +4 -85
- package/dist/cjs/signals/requests.cjs +77 -72
- package/dist/cjs/signals/scalar-computations.cjs +59 -52
- package/dist/cjs/signals/server-reads.cjs +11 -2
- package/dist/cjs/signals/streamed-results.cjs +122 -0
- package/dist/cjs/trusted-types.cjs +41 -0
- package/dist/cjs/universal-children.cjs +183 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/compiler/compile-universal.js +289 -52
- package/dist/compiler/compile.js +331 -97
- package/dist/compiler/index.d.ts +11 -1
- package/dist/compiler/signal-declarations.js +33 -1
- package/dist/compiler/style-scopes.js +4 -1
- package/dist/compiler/typescript-output.js +6 -2
- package/dist/compiler/vite.js +20 -0
- package/dist/dom-binding-program.js +3 -1
- package/dist/dom-focused-move.d.ts +8 -3
- package/dist/dom-focused-move.js +61 -33
- package/dist/hydration/dev-values.d.ts +2 -1
- package/dist/hydration/dev-values.js +1 -1
- package/dist/hydration/stream-receiver.js +2 -1
- package/dist/hydration/streamed-signals.js +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -1
- package/dist/internal/server-rpc.d.ts +8 -0
- package/dist/internal/server-rpc.js +7 -0
- package/dist/internal/universal-children.d.ts +1 -0
- package/dist/internal/universal-children.js +8 -0
- package/dist/node/dom-binding-program.js +3 -1
- package/dist/node/dom-focused-move.js +61 -33
- package/dist/node/hydration/dev-values.js +1 -1
- package/dist/node/hydration/stream-receiver.js +2 -1
- package/dist/node/hydration/streamed-signals.js +2 -1
- package/dist/node/index.js +4 -1
- package/dist/node/internal/server-rpc.js +7 -0
- package/dist/node/internal/universal-children.js +8 -0
- package/dist/node/runtime/actions.js +78 -39
- package/dist/node/runtime/block.js +3 -3
- package/dist/node/runtime/child-slots.js +10 -0
- package/dist/node/runtime/commit.js +16 -5
- package/dist/node/runtime/component-slots.js +28 -2
- package/dist/node/runtime/deopt.js +27 -14
- package/dist/node/runtime/elements.js +7 -1
- package/dist/node/runtime/engine.js +40 -29
- package/dist/node/runtime/events.js +19 -12
- package/dist/node/runtime/hooks.js +2 -1
- package/dist/node/runtime/host-props.js +48 -17
- package/dist/node/runtime/hydration.js +4 -5
- package/dist/node/runtime/lists.js +21 -21
- package/dist/node/runtime/render.js +2 -0
- package/dist/node/runtime/roots.js +4 -2
- package/dist/node/runtime/signal-bindings.js +60 -10
- package/dist/node/runtime/suspense.js +25 -19
- package/dist/node/runtime/templates.js +4 -2
- package/dist/node/runtime/transitions.js +59 -2
- package/dist/node/runtime.js +2 -0
- package/dist/node/runtime.server.js +1 -1
- package/dist/node/server/streamed-region.js +1 -1
- package/dist/node/server-rpc-batch-client.js +38 -58
- package/dist/node/server-rpc-client.js +106 -93
- package/dist/node/server-rpc-protocol.js +0 -57
- package/dist/node/server-rpc-response.js +131 -0
- package/dist/node/server-rpc-stream-client.js +56 -1
- package/dist/node/signals/computations.js +72 -66
- package/dist/node/signals/engine.js +0 -21
- package/dist/node/signals/facade.js +7 -82
- package/dist/node/signals/index.js +12 -4
- package/dist/node/signals/native-adoption.js +91 -0
- package/dist/node/signals/native-read-seeds.js +2 -82
- package/dist/node/signals/requests.js +73 -69
- package/dist/node/signals/scalar-computations.js +57 -51
- package/dist/node/signals/server-reads-elsewhere.js +17 -1
- package/dist/node/signals/server-reads.js +11 -1
- package/dist/node/signals/streamed-results.js +106 -0
- package/dist/node/trusted-types.js +16 -0
- package/dist/node/universal-children.js +158 -0
- package/dist/node/universal-core.js +76 -26
- package/dist/node/universal-native.js +3 -0
- package/dist/node/universal-styles.js +21 -0
- package/dist/node/universal.js +3 -0
- package/dist/node/version.js +1 -1
- package/dist/runtime/actions.js +78 -39
- package/dist/runtime/block.js +3 -3
- package/dist/runtime/child-slots.d.ts +8 -0
- package/dist/runtime/child-slots.js +10 -0
- package/dist/runtime/commit.d.ts +8 -1
- package/dist/runtime/commit.js +16 -5
- package/dist/runtime/component-slots.d.ts +5 -0
- package/dist/runtime/component-slots.js +28 -2
- package/dist/runtime/deopt.d.ts +4 -0
- package/dist/runtime/deopt.js +27 -14
- package/dist/runtime/effects.d.ts +1 -1
- package/dist/runtime/elements.js +7 -1
- package/dist/runtime/engine.d.ts +6 -3
- package/dist/runtime/engine.js +40 -29
- package/dist/runtime/events.js +19 -12
- package/dist/runtime/hooks.js +2 -1
- package/dist/runtime/host-props.d.ts +2 -2
- package/dist/runtime/host-props.js +48 -17
- package/dist/runtime/hydration.d.ts +5 -6
- package/dist/runtime/hydration.js +4 -5
- package/dist/runtime/lists.js +21 -21
- package/dist/runtime/render.js +2 -0
- package/dist/runtime/roots.js +4 -2
- package/dist/runtime/signal-bindings.d.ts +2 -1
- package/dist/runtime/signal-bindings.js +60 -10
- package/dist/runtime/suspense.d.ts +1 -1
- package/dist/runtime/suspense.js +25 -19
- package/dist/runtime/templates.js +4 -2
- package/dist/runtime/transitions.d.ts +12 -1
- package/dist/runtime/transitions.js +59 -2
- package/dist/runtime/types.d.ts +5 -2
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -0
- package/dist/runtime.server.js +1 -1
- package/dist/server/streamed-region.js +1 -1
- package/dist/server-rpc-batch-client.d.ts +12 -4
- package/dist/server-rpc-batch-client.js +38 -58
- package/dist/server-rpc-client.d.ts +24 -1
- package/dist/server-rpc-client.js +106 -93
- package/dist/server-rpc-protocol.d.ts +0 -6
- package/dist/server-rpc-protocol.js +0 -57
- package/dist/server-rpc-response.d.ts +6 -0
- package/dist/server-rpc-response.js +131 -0
- package/dist/server-rpc-stream-client.js +56 -1
- package/dist/signals/computations.d.ts +22 -9
- package/dist/signals/computations.js +72 -66
- package/dist/signals/engine.d.ts +1 -11
- package/dist/signals/engine.js +0 -21
- package/dist/signals/facade.d.ts +10 -16
- package/dist/signals/facade.js +7 -82
- package/dist/signals/index.d.ts +5 -1
- package/dist/signals/index.js +12 -4
- package/dist/signals/native-adoption.d.ts +18 -0
- package/dist/signals/native-adoption.js +91 -0
- package/dist/signals/native-read-seeds.d.ts +12 -17
- package/dist/signals/native-read-seeds.js +2 -82
- package/dist/signals/redeclaration.d.ts +9 -4
- package/dist/signals/requests.d.ts +19 -10
- package/dist/signals/requests.js +73 -69
- package/dist/signals/scalar-computations.d.ts +2 -0
- package/dist/signals/scalar-computations.js +57 -51
- package/dist/signals/server-reads-elsewhere.d.ts +4 -0
- package/dist/signals/server-reads-elsewhere.js +17 -1
- package/dist/signals/server-reads.d.ts +3 -1
- package/dist/signals/server-reads.js +11 -1
- package/dist/signals/streamed-results.d.ts +18 -0
- package/dist/signals/streamed-results.js +106 -0
- package/dist/trusted-types.d.ts +18 -0
- package/dist/trusted-types.js +16 -0
- package/dist/universal-children.d.ts +23 -0
- package/dist/universal-children.js +158 -0
- package/dist/universal-core.d.ts +5 -0
- package/dist/universal-core.js +76 -26
- package/dist/universal-native.d.ts +2 -0
- package/dist/universal-native.js +3 -0
- package/dist/universal-styles.d.ts +15 -0
- package/dist/universal-styles.js +21 -0
- package/dist/universal.d.ts +2 -0
- package/dist/universal.js +3 -0
- package/dist/version.js +1 -1
- package/package.json +17 -1
|
@@ -18,54 +18,83 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var dom_focused_move_exports = {};
|
|
20
20
|
__export(dom_focused_move_exports, {
|
|
21
|
+
isChildOf: () => isChildOf,
|
|
21
22
|
moveNativeNodeBefore: () => moveNativeNodeBefore
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(dom_focused_move_exports);
|
|
24
25
|
function moveNativeNodeBefore(parent, node, anchor, focused, contentEditable) {
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
do {
|
|
29
|
-
if (node.contains(candidate)) {
|
|
30
|
-
containsFocused = true;
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
const root = candidate.getRootNode();
|
|
34
|
-
candidate = root.nodeType === 11 ? root.host : void 0;
|
|
35
|
-
} while (candidate !== void 0);
|
|
36
|
-
}
|
|
37
|
-
if (!containsFocused) {
|
|
38
|
-
parent.insertBefore(node, anchor);
|
|
26
|
+
const move = nativeMove(parent);
|
|
27
|
+
if (move !== null && node.isConnected === true && parent.ownerDocument === node.ownerDocument && !(contentEditable && containsFocus(node, focused))) {
|
|
28
|
+
move.call(parent, node, anchor);
|
|
39
29
|
return;
|
|
40
30
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
moveBefore.call(parent, node, anchor);
|
|
31
|
+
if (!containsFocus(node, focused)) {
|
|
32
|
+
parent.insertBefore(node, anchor);
|
|
44
33
|
return;
|
|
45
34
|
}
|
|
46
|
-
if (node
|
|
35
|
+
if (!isChildOf(node, parent) || anchor !== null && !isChildOf(anchor, parent)) {
|
|
47
36
|
parent.insertBefore(node, anchor);
|
|
48
37
|
return;
|
|
49
38
|
}
|
|
50
|
-
if (node === anchor || node
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
39
|
+
if (node === anchor || nextOf(node) === anchor) return;
|
|
40
|
+
const forward = anchor === null || // 4 is Node.DOCUMENT_POSITION_FOLLOWING.
|
|
41
|
+
(nodeProto(node).compareDocumentPosition.call(node, anchor) & 4) !== 0;
|
|
42
|
+
const siblings = [];
|
|
43
|
+
for (let cursor = forward ? nextOf(node) : anchor; cursor !== null && cursor !== (forward ? anchor : node); cursor = nextOf(cursor))
|
|
44
|
+
siblings.push(cursor);
|
|
45
|
+
const rotate = move ?? parent.insertBefore;
|
|
46
|
+
let after = node;
|
|
47
|
+
for (let i = 0; i < siblings.length; i++) {
|
|
48
|
+
const sibling = siblings[i];
|
|
49
|
+
if (!isChildOf(sibling, parent)) continue;
|
|
50
|
+
if (forward) rotate.call(parent, sibling, node);
|
|
51
|
+
else {
|
|
52
|
+
rotate.call(parent, sibling, nextOf(after));
|
|
53
|
+
if (isChildOf(sibling, parent)) after = sibling;
|
|
65
54
|
}
|
|
66
55
|
}
|
|
67
56
|
}
|
|
57
|
+
let NODE_PROTO;
|
|
58
|
+
let parentNodeGetter;
|
|
59
|
+
let nextSiblingGetter;
|
|
60
|
+
function nodeProto(node) {
|
|
61
|
+
if (NODE_PROTO === void 0) {
|
|
62
|
+
let proto = Object.getPrototypeOf(node);
|
|
63
|
+
while (!Object.prototype.hasOwnProperty.call(proto, "nextSibling"))
|
|
64
|
+
proto = Object.getPrototypeOf(proto);
|
|
65
|
+
NODE_PROTO = proto;
|
|
66
|
+
}
|
|
67
|
+
return NODE_PROTO;
|
|
68
|
+
}
|
|
69
|
+
function nodeGetter(node, name) {
|
|
70
|
+
return Object.getOwnPropertyDescriptor(nodeProto(node), name).get;
|
|
71
|
+
}
|
|
72
|
+
function isChildOf(node, parent) {
|
|
73
|
+
parentNodeGetter ??= nodeGetter(node, "parentNode");
|
|
74
|
+
return parentNodeGetter.call(node) === parent;
|
|
75
|
+
}
|
|
76
|
+
function nextOf(node) {
|
|
77
|
+
nextSiblingGetter ??= nodeGetter(node, "nextSibling");
|
|
78
|
+
return nextSiblingGetter.call(node);
|
|
79
|
+
}
|
|
80
|
+
function nativeMove(parent) {
|
|
81
|
+
if (parent.isConnected !== true) return null;
|
|
82
|
+
const move = parent.moveBefore;
|
|
83
|
+
return typeof move === "function" ? move : null;
|
|
84
|
+
}
|
|
85
|
+
function containsFocus(node, focused) {
|
|
86
|
+
if (node === focused) return true;
|
|
87
|
+
if (focused === null || node.nodeType !== 1) return false;
|
|
88
|
+
let candidate = focused;
|
|
89
|
+
do {
|
|
90
|
+
if (nodeProto(node).contains.call(node, candidate)) return true;
|
|
91
|
+
const root = candidate.getRootNode();
|
|
92
|
+
candidate = root.nodeType === 11 ? root.host : void 0;
|
|
93
|
+
} while (candidate !== void 0);
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
68
96
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
97
|
0 && (module.exports = {
|
|
98
|
+
isChildOf,
|
|
70
99
|
moveNativeNodeBefore
|
|
71
100
|
});
|
|
@@ -77,7 +77,7 @@ function unpatchedHTML(pass, el, next) {
|
|
|
77
77
|
let client;
|
|
78
78
|
if (el.localName === "script") {
|
|
79
79
|
server = el.textContent ?? "";
|
|
80
|
-
client = next.replace(
|
|
80
|
+
client = String(next).replace(
|
|
81
81
|
INLINE_SCRIPT_TOKEN,
|
|
82
82
|
(_match, prefix, s, suffix) => `${prefix}${s === "s" ? "\\u0073" : "\\u0053"}${suffix}`
|
|
83
83
|
).replace(SCRIPT_DATA_NORMALIZATION, (match) => match === "\0" ? "\uFFFD" : "\n");
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
__runOnCatch: () => import_runtime.__runOnCatch,
|
|
45
45
|
__s: () => import_runtime.markSingleRoot,
|
|
46
46
|
__serverRpc: () => import_server_rpc_client.__serverRpc,
|
|
47
|
+
__serverRpcStream: () => import_server_rpc_client.__serverRpcStream,
|
|
47
48
|
__useCommittedState: () => import_runtime.__useCommittedState,
|
|
48
49
|
__useLinkedStateWithGetter: () => import_runtime.__useLinkedStateWithGetter,
|
|
49
50
|
__useReducerWithGetter: () => import_runtime.__useReducerWithGetter,
|
|
@@ -88,6 +89,7 @@ __export(index_exports, {
|
|
|
88
89
|
compilerOwnsContextProvider: () => import_runtime.compilerOwnsContextProvider,
|
|
89
90
|
componentSlot: () => import_runtime.componentSlot,
|
|
90
91
|
componentSlotFromConfig: () => import_runtime.componentSlotFromConfig,
|
|
92
|
+
componentSlotFunction: () => import_runtime.componentSlotFunction,
|
|
91
93
|
componentSlotLite: () => import_runtime.componentSlotLite,
|
|
92
94
|
componentSlotVoid: () => import_runtime.componentSlotVoid,
|
|
93
95
|
createCompiledContext: () => import_runtime.createCompiledContext,
|
|
@@ -301,6 +303,7 @@ var import_method_dep = require("./method-dep.cjs");
|
|
|
301
303
|
__runOnCatch,
|
|
302
304
|
__s,
|
|
303
305
|
__serverRpc,
|
|
306
|
+
__serverRpcStream,
|
|
304
307
|
__useCommittedState,
|
|
305
308
|
__useLinkedStateWithGetter,
|
|
306
309
|
__useReducerWithGetter,
|
|
@@ -345,6 +348,7 @@ var import_method_dep = require("./method-dep.cjs");
|
|
|
345
348
|
compilerOwnsContextProvider,
|
|
346
349
|
componentSlot,
|
|
347
350
|
componentSlotFromConfig,
|
|
351
|
+
componentSlotFunction,
|
|
348
352
|
componentSlotLite,
|
|
349
353
|
componentSlotVoid,
|
|
350
354
|
createCompiledContext,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var universal_children_exports = {};
|
|
20
|
+
__export(universal_children_exports, {
|
|
21
|
+
createUniversalChildren: () => import_universal_children.createUniversalChildren,
|
|
22
|
+
descriptorChildren: () => import_universal_children.descriptorChildren
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(universal_children_exports);
|
|
25
|
+
var import_universal_children = require("../universal-children.cjs");
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
createUniversalChildren,
|
|
29
|
+
descriptorChildren
|
|
30
|
+
});
|
|
@@ -44,6 +44,7 @@ var import_hydration = require("./hydration.cjs");
|
|
|
44
44
|
var import_portals = require("./portals.cjs");
|
|
45
45
|
var import_suspense = require("./suspense.cjs");
|
|
46
46
|
var import_render = require("./render.cjs");
|
|
47
|
+
var import_commit = require("./commit.cjs");
|
|
47
48
|
var import_host_props = require("./host-props.cjs");
|
|
48
49
|
var import_events = require("./events.cjs");
|
|
49
50
|
var import_forms = require("./forms.cjs");
|
|
@@ -405,33 +406,38 @@ function useOptimistic(passthrough, updateFnOrSlot, slot) {
|
|
|
405
406
|
const block = import_render.CURRENT_BLOCK;
|
|
406
407
|
let s = scope.hooks?.get(slot);
|
|
407
408
|
if (s === void 0) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
slotRef.queue.length = 0;
|
|
416
|
-
} else {
|
|
417
|
-
let write = indices[0];
|
|
418
|
-
let skip = 0;
|
|
419
|
-
for (let read = write; read < slotRef.queue.length; read++) {
|
|
420
|
-
if (read === indices[skip]) skip++;
|
|
421
|
-
else slotRef.queue[write++] = slotRef.queue[read];
|
|
422
|
-
}
|
|
423
|
-
slotRef.queue.length = write;
|
|
409
|
+
const compact = (owner) => {
|
|
410
|
+
const queue2 = slotRef.queue;
|
|
411
|
+
const owners2 = slotRef.owners;
|
|
412
|
+
if (owners2 === null) {
|
|
413
|
+
if (owner !== null || queue2.length === 0) return false;
|
|
414
|
+
queue2.length = 0;
|
|
415
|
+
return true;
|
|
424
416
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
417
|
+
let write = 0;
|
|
418
|
+
for (let read = 0; read < queue2.length; read++) {
|
|
419
|
+
if (owners2[read] === owner) continue;
|
|
420
|
+
queue2[write] = queue2[read];
|
|
421
|
+
owners2[write++] = owners2[read];
|
|
430
422
|
}
|
|
423
|
+
const removed = write !== queue2.length;
|
|
424
|
+
queue2.length = write;
|
|
425
|
+
owners2.length = write;
|
|
426
|
+
if (slotRef.batches === null || slotRef.batches.size === 0) slotRef.owners = null;
|
|
427
|
+
return removed;
|
|
428
|
+
};
|
|
429
|
+
const revert = () => {
|
|
430
|
+
if (block.disposed) return;
|
|
431
|
+
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
|
|
432
|
+
(0, import_profiling.__profileSchedule)(block, "optimistic-revert", slot);
|
|
433
|
+
(0, import_engine.scheduleHookPublication)(block);
|
|
431
434
|
};
|
|
432
435
|
const slotRef = {
|
|
433
436
|
queue: [],
|
|
434
|
-
|
|
437
|
+
owners: null,
|
|
438
|
+
batches: null,
|
|
439
|
+
unownedPending: false,
|
|
440
|
+
compact,
|
|
435
441
|
add: (value) => {
|
|
436
442
|
const inAction = (0, import_engine.isTransitionUpdateContext)();
|
|
437
443
|
if (__octaneDev && !inAction) {
|
|
@@ -440,13 +446,33 @@ function useOptimistic(passthrough, updateFnOrSlot, slot) {
|
|
|
440
446
|
);
|
|
441
447
|
}
|
|
442
448
|
slotRef.queue.push(value);
|
|
443
|
-
|
|
444
|
-
|
|
449
|
+
const batch = inAction ? (0, import_transitions.transitionActionBatchForUpdate)() : null;
|
|
450
|
+
if (batch !== null) {
|
|
451
|
+
const owners2 = slotRef.owners ?? (slotRef.owners = new Array(slotRef.queue.length - 1).fill(null));
|
|
452
|
+
owners2.push(batch);
|
|
453
|
+
if (batch.finished) compact(batch);
|
|
454
|
+
else {
|
|
455
|
+
let batches = slotRef.batches;
|
|
456
|
+
if (batches === null) slotRef.batches = batches = /* @__PURE__ */ new Map();
|
|
457
|
+
if (!batches.has(batch))
|
|
458
|
+
batches.set(
|
|
459
|
+
batch,
|
|
460
|
+
(0, import_transitions.onTransitionBatchFinished)(batch, () => {
|
|
461
|
+
batches.delete(batch);
|
|
462
|
+
if (batches.size === 0) slotRef.batches = null;
|
|
463
|
+
if (compact(batch)) revert();
|
|
464
|
+
})
|
|
465
|
+
);
|
|
466
|
+
}
|
|
445
467
|
} else {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
468
|
+
slotRef.owners?.push(null);
|
|
469
|
+
if (!slotRef.unownedPending) {
|
|
470
|
+
slotRef.unownedPending = true;
|
|
471
|
+
queueMicrotask(() => {
|
|
472
|
+
slotRef.unownedPending = false;
|
|
473
|
+
if (compact(null)) revert();
|
|
474
|
+
});
|
|
475
|
+
}
|
|
450
476
|
}
|
|
451
477
|
if (!block.disposed) {
|
|
452
478
|
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
|
|
@@ -458,15 +484,28 @@ function useOptimistic(passthrough, updateFnOrSlot, slot) {
|
|
|
458
484
|
};
|
|
459
485
|
s = slotRef;
|
|
460
486
|
(0, import_hooks.ensureHooks)(scope).set(slot, slotRef);
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
487
|
+
(0, import_hooks.registerHookCleanup)(scope, () => {
|
|
488
|
+
const batches = slotRef.batches;
|
|
489
|
+
if (batches === null) return;
|
|
490
|
+
for (const unsubscribe of batches.values()) unsubscribe();
|
|
491
|
+
batches.clear();
|
|
492
|
+
slotRef.batches = null;
|
|
493
|
+
});
|
|
466
494
|
}
|
|
467
495
|
let optimistic = passthrough;
|
|
468
496
|
const reduce = updateFn ?? basicOptimisticReducer;
|
|
469
|
-
|
|
497
|
+
const queue = s.queue;
|
|
498
|
+
const owners = s.owners;
|
|
499
|
+
const transition = block.currentRenderMode === "transition";
|
|
500
|
+
let reverted = null;
|
|
501
|
+
for (let i = 0; i < queue.length; i++) {
|
|
502
|
+
const owner = owners === null ? null : owners[i];
|
|
503
|
+
if (owner !== null && import_drivers.TRANSITION_ROOT_DRIVER && (transition || ((0, import_transitions.rootTransitionBatch)(owner).pendingHolds ?? 0) !== 0) && import_drivers.TRANSITION_ROOT_DRIVER.fold(owner, transition, import_render.ROOT_RENDER_TRANSACTION)) {
|
|
504
|
+
if (reverted === null) reverted = [owner];
|
|
505
|
+
else if (reverted.indexOf(owner) === -1) reverted.push(owner);
|
|
506
|
+
} else optimistic = reduce(optimistic, queue[i]);
|
|
507
|
+
}
|
|
508
|
+
if (reverted !== null) for (const owner of reverted) (0, import_commit.atCommit)(s.compact, owner);
|
|
470
509
|
return [optimistic, s.add];
|
|
471
510
|
}
|
|
472
511
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -351,7 +351,7 @@ function renderReturnedValue(block, out, reset) {
|
|
|
351
351
|
(0, import_profile_probes.withProfileComponentOverride)(
|
|
352
352
|
d.type,
|
|
353
353
|
null,
|
|
354
|
-
() => (0, import_component_slots.
|
|
354
|
+
() => (0, import_component_slots.componentSlotFunction)(
|
|
355
355
|
block,
|
|
356
356
|
0,
|
|
357
357
|
domParent,
|
|
@@ -366,7 +366,7 @@ function renderReturnedValue(block, out, reset) {
|
|
|
366
366
|
)
|
|
367
367
|
);
|
|
368
368
|
} else {
|
|
369
|
-
(0, import_component_slots.
|
|
369
|
+
(0, import_component_slots.componentSlotFunction)(
|
|
370
370
|
block,
|
|
371
371
|
0,
|
|
372
372
|
domParent,
|
|
@@ -30,6 +30,7 @@ __export(child_slots_exports, {
|
|
|
30
30
|
compilerCacheImmutableArrayFilter: () => compilerCacheImmutableArrayFilter,
|
|
31
31
|
compilerCacheMappedArray: () => compilerCacheMappedArray,
|
|
32
32
|
mapSlot: () => mapSlot,
|
|
33
|
+
renderSignalChildSlot: () => renderSignalChildSlot,
|
|
33
34
|
textHole: () => textHole,
|
|
34
35
|
textHoleUpdate: () => textHoleUpdate,
|
|
35
36
|
textSlot: () => textSlot
|
|
@@ -267,6 +268,13 @@ function mapSlot(scopeOrItems, slotOrMethod, domParent, items, method, native, c
|
|
|
267
268
|
}
|
|
268
269
|
}
|
|
269
270
|
}
|
|
271
|
+
function renderSignalChildSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsHost, compactable, onlyChild, bindingMarker, cachedText) {
|
|
272
|
+
if (onlyChild) return childTextHole(parentScope, slotKey, domParent, value, cachedText);
|
|
273
|
+
if (bindingMarker === void 0)
|
|
274
|
+
childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsHost, compactable);
|
|
275
|
+
else bindingChildSlot(parentScope, slotKey, domParent, value, bindingMarker, anchor, ownEnd);
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
270
278
|
function bindingChildSlot(parentScope, slotKey, domParent, value, marker, anchor, ownEnd) {
|
|
271
279
|
const frame = import_hydration_flag.hydrationStarted ? import_hydration_presentation.PRESENTATION_HYDRATION : null;
|
|
272
280
|
if (frame?.revision !== void 0) {
|
|
@@ -337,6 +345,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
337
345
|
}
|
|
338
346
|
if (import_drivers.SIGNAL_CHILD) {
|
|
339
347
|
if ((0, import_drivers.SIGNAL_CHILD)(
|
|
348
|
+
renderSignalChildSlot,
|
|
340
349
|
parentScope,
|
|
341
350
|
slotKey,
|
|
342
351
|
domParent,
|
|
@@ -349,6 +358,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
349
358
|
))
|
|
350
359
|
return;
|
|
351
360
|
} else if (import_read_protocol.nativeSignalHydration && (0, import_signal_bindings.bindImplicitSignalChild)(
|
|
361
|
+
renderSignalChildSlot,
|
|
352
362
|
parentScope,
|
|
353
363
|
slotKey,
|
|
354
364
|
domParent,
|
|
@@ -1108,6 +1118,7 @@ function childTextHole(parentScope, slotKey, domParent, value, cachedNode) {
|
|
|
1108
1118
|
compilerCacheImmutableArrayFilter,
|
|
1109
1119
|
compilerCacheMappedArray,
|
|
1110
1120
|
mapSlot,
|
|
1121
|
+
renderSignalChildSlot,
|
|
1111
1122
|
textHole,
|
|
1112
1123
|
textHoleUpdate,
|
|
1113
1124
|
textSlot
|
|
@@ -42,6 +42,7 @@ __export(commit_exports, {
|
|
|
42
42
|
bagRecord: () => bagRecord,
|
|
43
43
|
captureFocusSelection: () => captureFocusSelection,
|
|
44
44
|
captureQueuedFocusSelection: () => captureQueuedFocusSelection,
|
|
45
|
+
commitQueuedBag: () => commitQueuedBag,
|
|
45
46
|
defersRootUnmount: () => defersRootUnmount,
|
|
46
47
|
discardMarker: () => discardMarker,
|
|
47
48
|
dropRootOps: () => dropRootOps,
|
|
@@ -130,7 +131,7 @@ function bagRecord(s, next, cell, value, committed, bundle, a0, a1) {
|
|
|
130
131
|
next[size] = s;
|
|
131
132
|
next[size + 1] = transaction.ops.length;
|
|
132
133
|
bag.$ = state | BAG_QUEUED;
|
|
133
|
-
transaction.ops.push(
|
|
134
|
+
transaction.ops.push(commitQueuedBag, bag);
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
next[cell] = changed ? value : bag;
|
|
@@ -147,9 +148,19 @@ function bagResume(bag) {
|
|
|
147
148
|
journalObjectOnce(next);
|
|
148
149
|
return next;
|
|
149
150
|
}
|
|
150
|
-
function bagDone(s, bag
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
function bagDone(s, bag) {
|
|
152
|
+
const next = bag.next;
|
|
153
|
+
const size = bag.$ &= BAG_SIZE;
|
|
154
|
+
next[size] = s;
|
|
155
|
+
next[size + 2](
|
|
156
|
+
bag,
|
|
157
|
+
next,
|
|
158
|
+
import_render.TRANSITION_JOURNAL !== null || import_events._dispatchDepth !== 0 && import_events.CAPTURE_SLOTS.length !== 0
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
function commitQueuedBag(bag, careful) {
|
|
162
|
+
const next = bag.next;
|
|
163
|
+
next[(bag.$ &= BAG_SIZE) + 2](bag, next, careful);
|
|
153
164
|
}
|
|
154
165
|
function slotNext(slot) {
|
|
155
166
|
const tx = import_render.ROOT_RENDER_TRANSACTION;
|
|
@@ -404,7 +415,7 @@ function dropRootOps(transaction, from, retired) {
|
|
|
404
415
|
for (let i = from; i < ops.length; i += 2) {
|
|
405
416
|
const target = ops[i + 1];
|
|
406
417
|
if (ops[i] === applySlotNext) target.next = null;
|
|
407
|
-
else if (
|
|
418
|
+
else if (ops[i] === commitQueuedBag) target.$ &= BAG_SIZE;
|
|
408
419
|
}
|
|
409
420
|
ops.length = from;
|
|
410
421
|
const set = transaction.retired;
|
|
@@ -1061,6 +1072,7 @@ function withRegisteredRefDetachSuppression(entries, fn) {
|
|
|
1061
1072
|
bagRecord,
|
|
1062
1073
|
captureFocusSelection,
|
|
1063
1074
|
captureQueuedFocusSelection,
|
|
1075
|
+
commitQueuedBag,
|
|
1064
1076
|
defersRootUnmount,
|
|
1065
1077
|
discardMarker,
|
|
1066
1078
|
dropRootOps,
|
|
@@ -31,6 +31,7 @@ __export(component_slots_exports, {
|
|
|
31
31
|
compilerCacheContext: () => compilerCacheContext,
|
|
32
32
|
compilerOpaqueTag: () => compilerOpaqueTag,
|
|
33
33
|
componentSlot: () => componentSlot,
|
|
34
|
+
componentSlotFunction: () => componentSlotFunction,
|
|
34
35
|
componentSlotImpl: () => componentSlotImpl,
|
|
35
36
|
componentSlotVoid: () => componentSlotVoid,
|
|
36
37
|
ctxDirectChanged: () => ctxDirectChanged,
|
|
@@ -387,6 +388,7 @@ function componentSlot(parentScope, slotKey, domParent, comp, props, invocationS
|
|
|
387
388
|
if (!activity && typeof comp !== "function" && typeof comp !== "string") {
|
|
388
389
|
throw (0, import_elements.invalidElementTypeError)(comp);
|
|
389
390
|
}
|
|
391
|
+
if (typeof comp === "string" && !import_deopt.DESCRIPTOR_HOST_PROPS) (0, import_deopt.enableHostDescriptors)();
|
|
390
392
|
const body = activity ? dispatch.body : typeof comp === "string" ? import_deopt.hostStringTagBody : comp;
|
|
391
393
|
if (activity) {
|
|
392
394
|
singleRoot = false;
|
|
@@ -422,6 +424,25 @@ function componentSlot(parentScope, slotKey, domParent, comp, props, invocationS
|
|
|
422
424
|
typeof comp === "string" ? import_signal_owners.RENDERER_INVOCATION_SITE : invocationSite
|
|
423
425
|
);
|
|
424
426
|
}
|
|
427
|
+
function componentSlotFunction(parentScope, slotKey, domParent, comp, props, invocationSite, anchor, singleRoot, inherit, key, hasKey) {
|
|
428
|
+
if (typeof comp !== "function") throw (0, import_elements.invalidElementTypeError)(comp);
|
|
429
|
+
componentSlotImpl(
|
|
430
|
+
import_block.renderReturnedValue,
|
|
431
|
+
parentScope,
|
|
432
|
+
slotKey,
|
|
433
|
+
domParent,
|
|
434
|
+
comp,
|
|
435
|
+
comp,
|
|
436
|
+
props,
|
|
437
|
+
props,
|
|
438
|
+
anchor,
|
|
439
|
+
key,
|
|
440
|
+
singleRoot,
|
|
441
|
+
inherit,
|
|
442
|
+
hasKey,
|
|
443
|
+
invocationSite
|
|
444
|
+
);
|
|
445
|
+
}
|
|
425
446
|
function componentSlotVoid(parentScope, slotKey, domParent, comp, props, invocationSite, anchor, singleRoot, inherit, key, hasKey) {
|
|
426
447
|
if (typeof comp !== "function") throw (0, import_elements.invalidElementTypeError)(comp);
|
|
427
448
|
componentSlotImpl(
|
|
@@ -1342,7 +1363,6 @@ function hmr(fn) {
|
|
|
1342
1363
|
meta.liveBlocks.delete(b);
|
|
1343
1364
|
continue;
|
|
1344
1365
|
}
|
|
1345
|
-
b.body = wrapper;
|
|
1346
1366
|
if (typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__)
|
|
1347
1367
|
(0, import_profiling.__profileSchedule)(b, "hmr");
|
|
1348
1368
|
(0, import_block.resetHmrBlock)(b);
|
|
@@ -1385,6 +1405,7 @@ function hmr(fn) {
|
|
|
1385
1405
|
compilerCacheContext,
|
|
1386
1406
|
compilerOpaqueTag,
|
|
1387
1407
|
componentSlot,
|
|
1408
|
+
componentSlotFunction,
|
|
1388
1409
|
componentSlotImpl,
|
|
1389
1410
|
componentSlotVoid,
|
|
1390
1411
|
ctxDirectChanged,
|
|
@@ -20,11 +20,13 @@ var deopt_exports = {};
|
|
|
20
20
|
__export(deopt_exports, {
|
|
21
21
|
DEOPT_DESC: () => DEOPT_DESC,
|
|
22
22
|
DEOPT_REFS_STAMPED: () => DEOPT_REFS_STAMPED,
|
|
23
|
+
DESCRIPTOR_HOST_PROPS: () => DESCRIPTOR_HOST_PROPS,
|
|
23
24
|
POSITIONAL_CHILDREN: () => POSITIONAL_CHILDREN,
|
|
24
25
|
adoptsPureHost: () => adoptsPureHost,
|
|
25
26
|
deoptItemBody: () => deoptItemBody,
|
|
26
27
|
descNeedsBlocks: () => descNeedsBlocks,
|
|
27
28
|
enableDescriptorFragmentRefs: () => enableDescriptorFragmentRefs,
|
|
29
|
+
enableHostDescriptors: () => enableHostDescriptors,
|
|
28
30
|
getDeoptDesc: () => getDeoptDesc,
|
|
29
31
|
hostComponent: () => hostComponent,
|
|
30
32
|
hostElementBody: () => hostElementBody,
|
|
@@ -50,6 +52,7 @@ module.exports = __toCommonJS(deopt_exports);
|
|
|
50
52
|
var import_branches = require("./branches.cjs");
|
|
51
53
|
var import_hydration_flag = require("../hydration-flag.cjs");
|
|
52
54
|
var import_has_own = require("../has-own.cjs");
|
|
55
|
+
var import_dom_focused_move = require("../dom-focused-move.cjs");
|
|
53
56
|
var import_shared_value_helpers = require("../shared-value-helpers.cjs");
|
|
54
57
|
var import_profiling = require("../profiling.cjs");
|
|
55
58
|
var import_error_codes_client_generated = require("../error-codes.client.generated.cjs");
|
|
@@ -77,6 +80,10 @@ var import_templates = require("./templates.cjs");
|
|
|
77
80
|
var import_events = require("./events.cjs");
|
|
78
81
|
var import_forms = require("./forms.cjs");
|
|
79
82
|
const __octaneDev = process.env.NODE_ENV !== "production";
|
|
83
|
+
let DESCRIPTOR_HOST_PROPS = null;
|
|
84
|
+
function enableHostDescriptors() {
|
|
85
|
+
DESCRIPTOR_HOST_PROPS = import_host_props.setHostProps;
|
|
86
|
+
}
|
|
80
87
|
const DEOPT_KEY_WARNED_BLOCKS = /* @__PURE__ */ new WeakSet();
|
|
81
88
|
let DEOPT_KEY_WARNED_WITHOUT_BLOCK = false;
|
|
82
89
|
function warnMissingListKey(owner) {
|
|
@@ -553,7 +560,13 @@ function reconcileDeoptNode(prev, value, ownerBlock, ns) {
|
|
|
553
560
|
pending = pendingDeoptOrder(el);
|
|
554
561
|
desc = changedDeoptRecord(el, value, pending);
|
|
555
562
|
} else {
|
|
556
|
-
(
|
|
563
|
+
DESCRIPTOR_HOST_PROPS(
|
|
564
|
+
el,
|
|
565
|
+
value.props,
|
|
566
|
+
getDeoptDesc(el)?.props ?? null,
|
|
567
|
+
ownerBlock,
|
|
568
|
+
import_host_props.DESCRIPTOR_HOST
|
|
569
|
+
);
|
|
557
570
|
if (import_hydration_flag.hydrating && import_hydration.CURSOR !== null && import_render.ROOT_RENDER_TRANSACTION !== null) {
|
|
558
571
|
defer = true;
|
|
559
572
|
desc = deoptRecord(el, value);
|
|
@@ -565,7 +578,7 @@ function reconcileDeoptNode(prev, value, ownerBlock, ns) {
|
|
|
565
578
|
if (hydration !== null)
|
|
566
579
|
return hydration.suspend(() => reconcileDeoptNode(null, value, ownerBlock, ns));
|
|
567
580
|
el = elNs !== void 0 ? document.createElementNS(elNs, value.type) : document.createElement(value.type);
|
|
568
|
-
(
|
|
581
|
+
DESCRIPTOR_HOST_PROPS(el, value.props, void 0, ownerBlock, import_host_props.DESCRIPTOR_HOST);
|
|
569
582
|
}
|
|
570
583
|
if (desc === null) setDeoptDesc(el, value);
|
|
571
584
|
const nodes = hasHostPropContent(value) ? null : reconcileDeoptChildren(
|
|
@@ -783,13 +796,13 @@ function applyDeoptOrder(order) {
|
|
|
783
796
|
}
|
|
784
797
|
if (order.desc !== null) {
|
|
785
798
|
if (order.owner === null) stampDeoptDesc(node, order.desc);
|
|
786
|
-
else (0, import_render.commitInScope)(order.owner, commitDeoptHost, node, order.desc);
|
|
799
|
+
else (0, import_render.commitInScope)((0, import_branches.owningBlock)(order.owner), commitDeoptHost, node, order.desc);
|
|
787
800
|
}
|
|
788
801
|
if (order.nodes !== null) placeDeoptChildren(node, order.nodes, true, false);
|
|
789
802
|
}
|
|
790
803
|
function commitDeoptHost(el, record, owner) {
|
|
791
804
|
const committed = el[DEOPT_DESC];
|
|
792
|
-
(
|
|
805
|
+
DESCRIPTOR_HOST_PROPS(el, record.props, committed?.props ?? null, owner, import_host_props.DESCRIPTOR_HOST);
|
|
793
806
|
stampDeoptDesc(el, record);
|
|
794
807
|
}
|
|
795
808
|
function placeDeoptChildren(el, result, skip, adopt) {
|
|
@@ -798,7 +811,7 @@ function placeDeoptChildren(el, result, skip, adopt) {
|
|
|
798
811
|
const want = result[i];
|
|
799
812
|
const at = skip ? nextDeoptOwnedChild(cursor, adopt) : cursor;
|
|
800
813
|
if (at !== want) {
|
|
801
|
-
if (import_engine.renderingFocus === null)
|
|
814
|
+
if (import_engine.renderingFocus === null) (0, import_dom_focused_move.moveNativeNodeBefore)(el, want, at, null, false);
|
|
802
815
|
else {
|
|
803
816
|
(0, import_engine.captureFocusedMovement)(el, import_engine.renderingFocus);
|
|
804
817
|
(0, import_lists.moveFocusedNodeBefore)(el, want, at, import_engine.renderingFocus);
|
|
@@ -998,7 +1011,7 @@ function mappedDeoptItemBody(item, scope) {
|
|
|
998
1011
|
}
|
|
999
1012
|
}
|
|
1000
1013
|
try {
|
|
1001
|
-
(0, import_component_slots.
|
|
1014
|
+
(0, import_component_slots.componentSlotFunction)(
|
|
1002
1015
|
scope,
|
|
1003
1016
|
0,
|
|
1004
1017
|
parent,
|
|
@@ -1102,7 +1115,7 @@ function hostElementBody(d, block) {
|
|
|
1102
1115
|
if (el === null && hydration !== null && hydration.node !== null && hydration.node.nodeType === 1 && (0, import_host_props.isHostElementOfType)(hydration.node, d.type) && (elNs === void 0 || hydration.node.namespaceURI === elNs)) {
|
|
1103
1116
|
el = hydration.node;
|
|
1104
1117
|
block.deoptNode = el;
|
|
1105
|
-
(
|
|
1118
|
+
DESCRIPTOR_HOST_PROPS(el, d.props, void 0, block, import_host_props.DESCRIPTOR_HOST);
|
|
1106
1119
|
setDeoptDesc(el, d);
|
|
1107
1120
|
const savedCursor = (0, import_templates.getNextSibling)(hydration.node);
|
|
1108
1121
|
if (!hasHostPropContent(d)) {
|
|
@@ -1148,11 +1161,11 @@ function hostElementBody(d, block) {
|
|
|
1148
1161
|
const frag = (0, import_commit.queueFrontier)(block, parent, block.endMarker);
|
|
1149
1162
|
frag.appendChild(el);
|
|
1150
1163
|
} else parent.insertBefore(el, block.endMarker);
|
|
1151
|
-
(
|
|
1164
|
+
DESCRIPTOR_HOST_PROPS(el, d.props, void 0, block, import_host_props.DESCRIPTOR_HOST);
|
|
1152
1165
|
} else if ((0, import_commit.usesFrontier)(block, el)) {
|
|
1153
1166
|
desc = changedDeoptRecord(el, d, pendingDeoptOrder(el));
|
|
1154
1167
|
} else {
|
|
1155
|
-
(
|
|
1168
|
+
DESCRIPTOR_HOST_PROPS(el, d.props, getDeoptDesc(el)?.props ?? null, block, import_host_props.DESCRIPTOR_HOST);
|
|
1156
1169
|
}
|
|
1157
1170
|
if (desc === null) setDeoptDesc(el, d);
|
|
1158
1171
|
if (!hasHostPropContent(d)) deoptHostChildren(block, el, d, elNs);
|
|
@@ -1169,7 +1182,7 @@ function hostStringTagBody(d, block) {
|
|
|
1169
1182
|
if (hydration !== null && hydration.node !== null && hydration.node.nodeType === 1 && (0, import_host_props.isHostElementOfType)(hydration.node, tag) && (elNs === void 0 || hydration.node.namespaceURI === elNs)) {
|
|
1170
1183
|
el = hydration.node;
|
|
1171
1184
|
block.deoptNode = el;
|
|
1172
|
-
(
|
|
1185
|
+
DESCRIPTOR_HOST_PROPS(el, d.props, void 0, block, import_host_props.DESCRIPTOR_HOST);
|
|
1173
1186
|
setDeoptDesc(el, d);
|
|
1174
1187
|
const savedCursor = (0, import_templates.getNextSibling)(hydration.node);
|
|
1175
1188
|
if (!hasHostPropContent(d)) {
|
|
@@ -1190,11 +1203,11 @@ function hostStringTagBody(d, block) {
|
|
|
1190
1203
|
block.deoptNode = el;
|
|
1191
1204
|
const parent = block.parentNode;
|
|
1192
1205
|
parent.insertBefore(el, block.endMarker);
|
|
1193
|
-
(
|
|
1206
|
+
DESCRIPTOR_HOST_PROPS(el, d.props, void 0, block, import_host_props.DESCRIPTOR_HOST);
|
|
1194
1207
|
} else if ((0, import_commit.usesFrontier)(block, el)) {
|
|
1195
1208
|
desc = changedDeoptRecord(el, d, pendingDeoptOrder(el));
|
|
1196
1209
|
} else {
|
|
1197
|
-
(
|
|
1210
|
+
DESCRIPTOR_HOST_PROPS(el, d.props, getDeoptDesc(el)?.props ?? null, block, import_host_props.DESCRIPTOR_HOST);
|
|
1198
1211
|
}
|
|
1199
1212
|
if (desc === null) setDeoptDesc(el, d);
|
|
1200
1213
|
if (!hasHostPropContent(d)) renderHostTagChildren(d, block, el);
|
|
@@ -1576,11 +1589,13 @@ function renderPreparedChildList(state, parentBlock, domParent, preparedList, hy
|
|
|
1576
1589
|
0 && (module.exports = {
|
|
1577
1590
|
DEOPT_DESC,
|
|
1578
1591
|
DEOPT_REFS_STAMPED,
|
|
1592
|
+
DESCRIPTOR_HOST_PROPS,
|
|
1579
1593
|
POSITIONAL_CHILDREN,
|
|
1580
1594
|
adoptsPureHost,
|
|
1581
1595
|
deoptItemBody,
|
|
1582
1596
|
descNeedsBlocks,
|
|
1583
1597
|
enableDescriptorFragmentRefs,
|
|
1598
|
+
enableHostDescriptors,
|
|
1584
1599
|
getDeoptDesc,
|
|
1585
1600
|
hostComponent,
|
|
1586
1601
|
hostElementBody,
|