octane 0.3.0 → 0.3.2
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/constants.cjs +18 -25
- package/dist/cjs/css.cjs +6 -0
- package/dist/cjs/dom-binding-protocol.cjs +37 -14
- package/dist/cjs/hydration/control-capture.cjs +12 -4
- package/dist/cjs/hydration/event-capture.cjs +6 -7
- package/dist/cjs/hydration-markers.cjs +40 -2
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/runtime-tags.cjs +55 -0
- package/dist/cjs/runtime.cjs +235 -148
- package/dist/cjs/runtime.server.cjs +110 -80
- package/dist/cjs/server/streamed-signals.cjs +102 -64
- package/dist/cjs/signals/control-binding.cjs +2 -1
- package/dist/cjs/stream-protocol.cjs +9 -8
- package/dist/cjs/version.cjs +1 -1
- package/dist/compiler/compile.js +550 -35
- package/dist/compiler/dom-bindings.js +5 -0
- package/dist/compiler/hydrate-boundaries.js +118 -0
- package/dist/compiler/private-context.js +160 -0
- package/dist/constants.d.ts +7 -18
- package/dist/constants.js +11 -9
- package/dist/css.d.ts +7 -0
- package/dist/css.js +4 -0
- package/dist/dom-binding-program.js +12 -5
- package/dist/dom-binding-protocol.d.ts +14 -1
- package/dist/dom-binding-protocol.js +40 -14
- package/dist/hydration/control-capture.d.ts +2 -0
- package/dist/hydration/control-capture.js +18 -5
- package/dist/hydration/event-capture.js +1 -2
- package/dist/hydration/independent-island.js +5 -5
- package/dist/hydration/stream-delivery.d.ts +1 -1
- package/dist/hydration/stream-delivery.js +16 -9
- package/dist/hydration/stream-result-receiver.d.ts +1 -0
- package/dist/hydration/stream-result-receiver.js +8 -4
- package/dist/hydration-markers.d.ts +30 -0
- package/dist/hydration-markers.js +27 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -0
- package/dist/react/index.js +1 -1
- package/dist/react/react-compat-shared.js +5 -3
- package/dist/react/shared.d.ts +1 -3
- package/dist/react/shared.js +1 -1
- package/dist/runtime-tags.d.ts +34 -0
- package/dist/runtime-tags.js +22 -0
- package/dist/runtime.d.ts +9 -14
- package/dist/runtime.js +213 -106
- package/dist/runtime.server.d.ts +10 -5
- package/dist/runtime.server.js +101 -56
- package/dist/server/streamed-signals.d.ts +1 -0
- package/dist/server/streamed-signals.js +102 -64
- package/dist/signals/control-binding.js +4 -2
- package/dist/stream-protocol.js +20 -9
- package/dist/universal-core.js +8 -4
- package/dist/universal-native.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/dist/cjs/runtime.cjs
CHANGED
|
@@ -31,6 +31,8 @@ __export(runtime_exports, {
|
|
|
31
31
|
TsrxErrorBoundary: () => TsrxErrorBoundary,
|
|
32
32
|
ViewTransition: () => ViewTransition,
|
|
33
33
|
ViewTransitionPseudoElement: () => ViewTransitionPseudoElement,
|
|
34
|
+
__HydrateCompiled: () => __HydrateCompiled,
|
|
35
|
+
__createCompiledContext: () => __createCompiledContext,
|
|
34
36
|
__createVoidRoot: () => __createVoidRoot,
|
|
35
37
|
__hydrateVoidRoot: () => __hydrateVoidRoot,
|
|
36
38
|
__useLinkedStateWithGetter: () => __useLinkedStateWithGetter,
|
|
@@ -147,6 +149,7 @@ __export(runtime_exports, {
|
|
|
147
149
|
hostComponent: () => hostComponent,
|
|
148
150
|
htext: () => htext,
|
|
149
151
|
htextSwap: () => htextSwap,
|
|
152
|
+
hydrateClaimedBindingCaches: () => hydrateClaimedBindingCaches,
|
|
150
153
|
hydrateRoot: () => hydrateRoot,
|
|
151
154
|
ifBlock: () => ifBlock,
|
|
152
155
|
injectStyle: () => injectStyle,
|
|
@@ -334,12 +337,15 @@ var import_profiling = require("./profiling.cjs");
|
|
|
334
337
|
var import_devtools_hook = require("./devtools-hook.cjs");
|
|
335
338
|
var import_interaction_config = require("./hydration/interaction-config.cjs");
|
|
336
339
|
var import_event_capture = require("./hydration/event-capture.cjs");
|
|
340
|
+
var import_control_capture = require("./hydration/control-capture.cjs");
|
|
337
341
|
var import_sanitize_url = require("./sanitize-url.cjs");
|
|
338
342
|
var import_html_tree_validation = require("./html-tree-validation.cjs");
|
|
339
343
|
var import_component_flags = require("./component-flags.cjs");
|
|
340
344
|
var import_error_codes_client_generated = require("./error-codes.client.generated.cjs");
|
|
341
345
|
var import_form_diagnostics = require("./form-diagnostics.cjs");
|
|
342
346
|
var import_dom_binding_protocol = require("./dom-binding-protocol.cjs");
|
|
347
|
+
var import_hydration_markers = require("./hydration-markers.cjs");
|
|
348
|
+
var import_runtime_tags = require("./runtime-tags.cjs");
|
|
343
349
|
var import_dom_focused_move = require("./dom-focused-move.cjs");
|
|
344
350
|
var import_stream_protocol = require("./stream-protocol.cjs");
|
|
345
351
|
var import_renderer_bridge = require("./renderer-bridge.cjs");
|
|
@@ -379,7 +385,7 @@ function profileTrackComponent(subject, fallback) {
|
|
|
379
385
|
function profilePortalComponent(rawBody) {
|
|
380
386
|
if (typeof rawBody === "function" && (0, import_profiling.__profileHasComponentMetadata)(rawBody)) return rawBody;
|
|
381
387
|
const descriptor = rawBody;
|
|
382
|
-
return descriptor != null && descriptor.$$kind === ELEMENT_TAG && typeof descriptor.type === "function" ? descriptor.type : null;
|
|
388
|
+
return descriptor != null && descriptor.$$kind === import_runtime_tags.ELEMENT_TAG && typeof descriptor.type === "function" ? descriptor.type : null;
|
|
383
389
|
}
|
|
384
390
|
function ensureHooks(scope) {
|
|
385
391
|
return scope.hooks ?? (scope.hooks = /* @__PURE__ */ new Map());
|
|
@@ -1137,7 +1143,6 @@ let NEXT_EFFECT_RENDER_VERSION = 1;
|
|
|
1137
1143
|
const ACTIVE_WARM_PLANS = [];
|
|
1138
1144
|
let NEXT_WARM_EPISODE = 1;
|
|
1139
1145
|
let CURRENT_WARM_EPISODE = 0;
|
|
1140
|
-
const RENDERER_REGION_OWNER = /* @__PURE__ */ Symbol.for("octane.renderer-region.owner");
|
|
1141
1146
|
const RENDERER_REGION_DOM_OWNERS = /* @__PURE__ */ new WeakMap();
|
|
1142
1147
|
let RENDERER_REGION_OWNER_COUNT = 0;
|
|
1143
1148
|
const RENDERER_REGION_DOM_BINDINGS = /* @__PURE__ */ new WeakMap();
|
|
@@ -3014,19 +3019,17 @@ function vtCaptureElements(block, owner) {
|
|
|
3014
3019
|
}
|
|
3015
3020
|
const VT_SCOPE_OWNERS = /* @__PURE__ */ new WeakMap();
|
|
3016
3021
|
const VT_INVALID_SCOPE_WARNED = /* @__PURE__ */ new WeakSet();
|
|
3017
|
-
const VT_SCOPE_STYLE_ID = "octane-view-transition-scope";
|
|
3018
|
-
const VT_SCOPE_CSS = '[vt-scope="element"]{view-transition-scope:all!important}';
|
|
3019
3022
|
const VT_SCOPE_STYLED_DOCUMENTS = /* @__PURE__ */ new WeakSet();
|
|
3020
3023
|
function vtInjectScopeStyle(host) {
|
|
3021
3024
|
if (DEFERRED_LAYOUT_DRIVER?.stageAction(() => vtInjectScopeStyle(host), true) === true) return;
|
|
3022
3025
|
const owner = host.ownerDocument;
|
|
3023
3026
|
if (VT_SCOPE_STYLED_DOCUMENTS.has(owner)) return;
|
|
3024
3027
|
if ((STAGED_DOM?.view(owner) ?? owner).querySelector(
|
|
3025
|
-
`style[data-octane="${
|
|
3028
|
+
`style[data-octane="${import_css.VIEW_TRANSITION_SCOPE_STYLE_ID}"],style[data-href~="octane-${import_css.VIEW_TRANSITION_SCOPE_STYLE_ID}"]`
|
|
3026
3029
|
) === null) {
|
|
3027
3030
|
const style = (STAGED_DOM?.view(owner) ?? owner).createElement("style");
|
|
3028
|
-
(STAGED_DOM?.view(style) ?? style).setAttribute("data-octane",
|
|
3029
|
-
(STAGED_DOM?.view(style) ?? style).textContent =
|
|
3031
|
+
(STAGED_DOM?.view(style) ?? style).setAttribute("data-octane", import_css.VIEW_TRANSITION_SCOPE_STYLE_ID);
|
|
3032
|
+
(STAGED_DOM?.view(style) ?? style).textContent = import_css.VIEW_TRANSITION_SCOPE_CSS;
|
|
3030
3033
|
domNode(owner.head).appendChild(style);
|
|
3031
3034
|
}
|
|
3032
3035
|
VT_SCOPE_STYLED_DOCUMENTS.add(owner);
|
|
@@ -6830,7 +6833,7 @@ function returnSlotTail(block, state) {
|
|
|
6830
6833
|
return null;
|
|
6831
6834
|
}
|
|
6832
6835
|
function renderReturnedValue(block, out) {
|
|
6833
|
-
const isComponentDescriptor = out !== null && out.$$kind === ELEMENT_TAG && out.key == null && typeof out.type === "function";
|
|
6836
|
+
const isComponentDescriptor = out !== null && out.$$kind === import_runtime_tags.ELEMENT_TAG && out.key == null && typeof out.type === "function";
|
|
6834
6837
|
const existingRet = block.slots[0];
|
|
6835
6838
|
let replacedStart = null;
|
|
6836
6839
|
let replacedEnd = null;
|
|
@@ -8401,13 +8404,40 @@ function useEffectEvent(fn, slot) {
|
|
|
8401
8404
|
return cell.impl.apply(void 0, args);
|
|
8402
8405
|
});
|
|
8403
8406
|
}
|
|
8404
|
-
const CONTEXT_TAG = /* @__PURE__ */ Symbol.for("octane.context");
|
|
8405
8407
|
// @__NO_SIDE_EFFECTS__
|
|
8406
8408
|
function createContext(defaultValue) {
|
|
8407
8409
|
const ctx = function ProviderBody(props, scope) {
|
|
8408
8410
|
return renderClientContextProvider(ctx, props, scope);
|
|
8409
8411
|
};
|
|
8410
|
-
ctx
|
|
8412
|
+
return initializeContext(ctx, defaultValue);
|
|
8413
|
+
}
|
|
8414
|
+
// @__NO_SIDE_EFFECTS__
|
|
8415
|
+
function __createCompiledContext(defaultValue) {
|
|
8416
|
+
const ctx = function ProviderBody(props, scope) {
|
|
8417
|
+
provideContext(scope, ctx, props.value);
|
|
8418
|
+
const children = props.children;
|
|
8419
|
+
if (children == null) return;
|
|
8420
|
+
const dialect = children[CHILDREN_BODY] ?? children;
|
|
8421
|
+
const previous = scope.hooks?.get(CHILDREN_DIALECT_SLOT);
|
|
8422
|
+
if (previous !== dialect) {
|
|
8423
|
+
if (previous !== void 0 && (previous === 2 || dialect === 2)) {
|
|
8424
|
+
resetScopeChildren(scope);
|
|
8425
|
+
if (scope.block.disposed) return;
|
|
8426
|
+
} else if (previous !== void 0) {
|
|
8427
|
+
invalidateSharedBodyOutput(scope);
|
|
8428
|
+
if (TRANSITION_JOURNAL !== null && !ROOT_RENDER_ROLLBACK) {
|
|
8429
|
+
const hooks = scope.hooks;
|
|
8430
|
+
journalUndo(() => hooks.set(CHILDREN_DIALECT_SLOT, previous));
|
|
8431
|
+
}
|
|
8432
|
+
}
|
|
8433
|
+
ensureHooks(scope).set(CHILDREN_DIALECT_SLOT, dialect);
|
|
8434
|
+
}
|
|
8435
|
+
renderSharedBody(children, void 0, scope, void 0);
|
|
8436
|
+
};
|
|
8437
|
+
return initializeContext(ctx, defaultValue);
|
|
8438
|
+
}
|
|
8439
|
+
function initializeContext(ctx, defaultValue) {
|
|
8440
|
+
ctx.$$kind = import_runtime_tags.CONTEXT_TAG;
|
|
8411
8441
|
ctx.defaultValue = defaultValue;
|
|
8412
8442
|
ctx.$$version = 0;
|
|
8413
8443
|
(0, import_context_identity.registerContext)(ctx);
|
|
@@ -8497,7 +8527,6 @@ function provideContext(scope, context, value) {
|
|
|
8497
8527
|
}
|
|
8498
8528
|
values.set(context, value);
|
|
8499
8529
|
}
|
|
8500
|
-
const CHILDREN_BLOCK = /* @__PURE__ */ Symbol.for("octane.childrenBlock");
|
|
8501
8530
|
const CHILDREN_BODY = /* @__PURE__ */ Symbol.for("octane.childrenBody");
|
|
8502
8531
|
function markSingleRoot(component) {
|
|
8503
8532
|
component.$$singleRoot = true;
|
|
@@ -8505,7 +8534,7 @@ function markSingleRoot(component) {
|
|
|
8505
8534
|
}
|
|
8506
8535
|
function markChildrenBlock(fn, body) {
|
|
8507
8536
|
if (typeof fn === "function") {
|
|
8508
|
-
fn[
|
|
8537
|
+
fn[import_runtime_tags.CHILDREN_BLOCK_TAG] = true;
|
|
8509
8538
|
if (body !== void 0) fn[CHILDREN_BODY] = body;
|
|
8510
8539
|
}
|
|
8511
8540
|
return fn;
|
|
@@ -8514,7 +8543,7 @@ function descriptorChildren(component) {
|
|
|
8514
8543
|
return component;
|
|
8515
8544
|
}
|
|
8516
8545
|
function isChildrenBlock(value) {
|
|
8517
|
-
return typeof value === "function" && value[
|
|
8546
|
+
return typeof value === "function" && value[import_runtime_tags.CHILDREN_BLOCK_TAG] === true;
|
|
8518
8547
|
}
|
|
8519
8548
|
function childrenAsBody(children) {
|
|
8520
8549
|
if (typeof children === "function") return children;
|
|
@@ -8650,7 +8679,6 @@ const HYDRATE_STRATEGY_TYPES = /* @__PURE__ */ new Set([
|
|
|
8650
8679
|
"never",
|
|
8651
8680
|
"dynamic"
|
|
8652
8681
|
]);
|
|
8653
|
-
const HYDRATE_MARKER_SELECTOR = "[data-octane-hydrate-id]";
|
|
8654
8682
|
const HYDRATE_STREAM_ERROR_ATTR = "data-oct-err";
|
|
8655
8683
|
const HYDRATE_STREAM_BOUNDARY_SELECTOR = `template[${import_constants.STREAM_BOUNDARY_ATTR}]`;
|
|
8656
8684
|
const HYDRATE_STREAM_SCAN_MASK = 1 | 128;
|
|
@@ -8785,7 +8813,23 @@ function renderHydrateChild(state, scope, extra) {
|
|
|
8785
8813
|
}
|
|
8786
8814
|
childrenAsBody(state.props.children)(void 0, scope, extra);
|
|
8787
8815
|
}
|
|
8816
|
+
function renderCompiledHydrateChild(state, scope, extra) {
|
|
8817
|
+
if (state.loadedBody !== null) {
|
|
8818
|
+
state.loadedBody(state.props.__data, scope, extra);
|
|
8819
|
+
} else {
|
|
8820
|
+
state.props.children(void 0, scope, extra);
|
|
8821
|
+
}
|
|
8822
|
+
}
|
|
8823
|
+
const EMPTY_HYDRATE_PENDING = () => void 0;
|
|
8788
8824
|
function hydrateBoundaryBody(state) {
|
|
8825
|
+
return createHydrateBoundaryBody(state, renderHydrateChild, (_props, scope) => {
|
|
8826
|
+
childSlot(scope, 0, scope.block.parentNode, state.props.fallback, scope.block.endMarker);
|
|
8827
|
+
});
|
|
8828
|
+
}
|
|
8829
|
+
function compiledHydrateBoundaryBody(state) {
|
|
8830
|
+
return createHydrateBoundaryBody(state, renderCompiledHydrateChild, EMPTY_HYDRATE_PENDING);
|
|
8831
|
+
}
|
|
8832
|
+
function createHydrateBoundaryBody(state, renderChild, pendingBody) {
|
|
8789
8833
|
const contentBody = (_props, scope, extra) => {
|
|
8790
8834
|
try {
|
|
8791
8835
|
if (state.loadedBody === null) {
|
|
@@ -8797,7 +8841,7 @@ function hydrateBoundaryBody(state) {
|
|
|
8797
8841
|
if (thenable.status !== "fulfilled") throw new SuspenseException(thenable);
|
|
8798
8842
|
}
|
|
8799
8843
|
}
|
|
8800
|
-
|
|
8844
|
+
renderChild(state, scope, extra);
|
|
8801
8845
|
} catch (error) {
|
|
8802
8846
|
const hydration = activeHydration();
|
|
8803
8847
|
if (!state.serverPreserved || state.hydrated || hydration === null || !isSuspenseException(error)) {
|
|
@@ -8809,9 +8853,6 @@ function hydrateBoundaryBody(state) {
|
|
|
8809
8853
|
state.hydrated = true;
|
|
8810
8854
|
useEffect(notifyHydrateBoundary, [state, scope], HYDRATE_NOTIFY_SLOT);
|
|
8811
8855
|
};
|
|
8812
|
-
const pendingBody = (_props, scope) => {
|
|
8813
|
-
childSlot(scope, 0, scope.block.parentNode, state.props.fallback, scope.block.endMarker);
|
|
8814
|
-
};
|
|
8815
8856
|
return (_props, scope) => {
|
|
8816
8857
|
tryBlock(
|
|
8817
8858
|
scope,
|
|
@@ -9001,7 +9042,7 @@ function installHydrateInteraction(state, strategy) {
|
|
|
9001
9042
|
// whose strategy could not yet be evaluated. Resolved boundaries get none.
|
|
9002
9043
|
(state.delegatedDynamicIntent ? import_event_capture.HYDRATE_SUPPORTED_INTERACTION_EVENTS : []);
|
|
9003
9044
|
const events = new Set(ownEvents);
|
|
9004
|
-
const descendants = domNode(state.wrapper).querySelectorAll(HYDRATE_MARKER_SELECTOR);
|
|
9045
|
+
const descendants = domNode(state.wrapper).querySelectorAll(import_hydration_markers.HYDRATE_MARKER_SELECTOR);
|
|
9005
9046
|
for (let i = 0; i < descendants.length; i++) {
|
|
9006
9047
|
const nestedEvents = hydrateMarkerInteractionEvents(descendants[i]);
|
|
9007
9048
|
if (nestedEvents !== null) {
|
|
@@ -9014,7 +9055,7 @@ function installHydrateInteraction(state, strategy) {
|
|
|
9014
9055
|
if (state.hydrated) return;
|
|
9015
9056
|
const rawTarget = event.target;
|
|
9016
9057
|
let target = rawTarget instanceof Element ? rawTarget : rawTarget instanceof Node ? (STAGED_DOM?.view(rawTarget) ?? rawTarget).parentElement : null;
|
|
9017
|
-
let marker = (STAGED_DOM?.view(target) ?? target)?.closest(HYDRATE_MARKER_SELECTOR) ?? state.wrapper;
|
|
9058
|
+
let marker = (STAGED_DOM?.view(target) ?? target)?.closest(import_hydration_markers.HYDRATE_MARKER_SELECTOR) ?? state.wrapper;
|
|
9018
9059
|
let matches = ownEvents.includes(event.type);
|
|
9019
9060
|
const delegatedDynamicMarkers = [];
|
|
9020
9061
|
while (marker !== null && domNode(state.wrapper).contains(marker)) {
|
|
@@ -9029,7 +9070,7 @@ function installHydrateInteraction(state, strategy) {
|
|
|
9029
9070
|
}
|
|
9030
9071
|
if (marker === state.wrapper) break;
|
|
9031
9072
|
marker = domNode((STAGED_DOM?.view(marker) ?? marker).parentElement)?.closest(
|
|
9032
|
-
HYDRATE_MARKER_SELECTOR
|
|
9073
|
+
import_hydration_markers.HYDRATE_MARKER_SELECTOR
|
|
9033
9074
|
) ?? null;
|
|
9034
9075
|
}
|
|
9035
9076
|
if (!matches) return;
|
|
@@ -9207,7 +9248,7 @@ function findHydrateSeedSidecar(wrapper, attribute = import_constants.HYDRATE_SE
|
|
|
9207
9248
|
}
|
|
9208
9249
|
return null;
|
|
9209
9250
|
}
|
|
9210
|
-
function createHydrateSlot(props, scope, boundaryId) {
|
|
9251
|
+
function createHydrateSlot(props, scope, boundaryId, boundaryBody) {
|
|
9211
9252
|
const parentBlock = scope.block;
|
|
9212
9253
|
const parentNode = parentBlock.parentNode;
|
|
9213
9254
|
const hydration = activeHydration();
|
|
@@ -9325,7 +9366,7 @@ function createHydrateSlot(props, scope, boundaryId) {
|
|
|
9325
9366
|
scope.slots[0] = state;
|
|
9326
9367
|
registerSlot(scope, state);
|
|
9327
9368
|
if (!state.independent) (0, import_event_capture.registerHydrationIntentBoundary)(wrapper, intentBoundary);
|
|
9328
|
-
block.body =
|
|
9369
|
+
block.body = boundaryBody(state);
|
|
9329
9370
|
const initialStrategy = resolveHydrateStrategy(state);
|
|
9330
9371
|
const pendingIntents = state.independent ? void 0 : (0, import_event_capture.takePendingHydrationIntents)(wrapper);
|
|
9331
9372
|
if (state.independent) {
|
|
@@ -9582,7 +9623,7 @@ function notifyHydrateBoundary(state, scope) {
|
|
|
9582
9623
|
}
|
|
9583
9624
|
}
|
|
9584
9625
|
}
|
|
9585
|
-
function initializeHydrateComponent() {
|
|
9626
|
+
function initializeHydrateComponent(boundaryBody) {
|
|
9586
9627
|
const hydrate = (0, import_component_flags.markComponentFlags)(
|
|
9587
9628
|
function Hydrate2(rawProps, scope) {
|
|
9588
9629
|
const props = rawProps;
|
|
@@ -9590,7 +9631,7 @@ function initializeHydrateComponent() {
|
|
|
9590
9631
|
let state = scope.slots[0];
|
|
9591
9632
|
let renderedChild = false;
|
|
9592
9633
|
if (state === void 0) {
|
|
9593
|
-
state = createHydrateSlot(props, scope, boundaryId);
|
|
9634
|
+
state = createHydrateSlot(props, scope, boundaryId, boundaryBody);
|
|
9594
9635
|
} else {
|
|
9595
9636
|
if (state.independent !== (props.__independent !== void 0)) {
|
|
9596
9637
|
throw new Error((0, import_error_codes_client_generated.formatClientError)(66));
|
|
@@ -9639,7 +9680,8 @@ function initializeHydrateComponent() {
|
|
|
9639
9680
|
Object.defineProperty(hydrate, "__octanePermanentStatic", { value: permanentStatic });
|
|
9640
9681
|
return hydrate;
|
|
9641
9682
|
}
|
|
9642
|
-
const Hydrate = /* @__PURE__ */ initializeHydrateComponent();
|
|
9683
|
+
const Hydrate = /* @__PURE__ */ initializeHydrateComponent(hydrateBoundaryBody);
|
|
9684
|
+
const __HydrateCompiled = /* @__PURE__ */ initializeHydrateComponent(compiledHydrateBoundaryBody);
|
|
9643
9685
|
const Suspense = /* @__PURE__ */ (0, import_component_flags.markComponentFlags)(
|
|
9644
9686
|
function Suspense2(props, scope) {
|
|
9645
9687
|
const block = scope.block;
|
|
@@ -9658,7 +9700,7 @@ const Suspense = /* @__PURE__ */ (0, import_component_flags.markComponentFlags)(
|
|
|
9658
9700
|
},
|
|
9659
9701
|
import_component_flags.COMPONENT_FLAG_BOUNDARY,
|
|
9660
9702
|
"Suspense",
|
|
9661
|
-
|
|
9703
|
+
import_runtime_tags.SUSPENSE_TAG
|
|
9662
9704
|
);
|
|
9663
9705
|
function initializeViewTransitionComponent() {
|
|
9664
9706
|
return (0, import_component_flags.markComponentFlags)(
|
|
@@ -9724,7 +9766,7 @@ function use(usable) {
|
|
|
9724
9766
|
"Do not call use() inside a useMemo() factory. Cached factories can skip context or promise reads; call use() before useMemo() and memoize the returned value instead."
|
|
9725
9767
|
);
|
|
9726
9768
|
}
|
|
9727
|
-
if (usable && usable.$$kind === CONTEXT_TAG) {
|
|
9769
|
+
if (usable && usable.$$kind === import_runtime_tags.CONTEXT_TAG) {
|
|
9728
9770
|
return useContextInternal(usable);
|
|
9729
9771
|
}
|
|
9730
9772
|
if (usable == null || typeof usable.then !== "function") {
|
|
@@ -9732,13 +9774,12 @@ function use(usable) {
|
|
|
9732
9774
|
}
|
|
9733
9775
|
return useThenable(usable);
|
|
9734
9776
|
}
|
|
9735
|
-
const REACT_FOREIGN_CONTEXT_TAG = /* @__PURE__ */ Symbol.for("react.context");
|
|
9736
9777
|
function useForeignContext(usable, api) {
|
|
9737
9778
|
if (usable !== null && typeof usable === "object") {
|
|
9738
9779
|
const bridge = rendererRegionOwnerForBlock(CURRENT_BLOCK);
|
|
9739
9780
|
const mirror = bridge?.resolveForeignContext?.(usable);
|
|
9740
9781
|
if (mirror != null) return useContextInternal(mirror);
|
|
9741
|
-
if (usable.$$typeof ===
|
|
9782
|
+
if (usable.$$typeof === import_runtime_tags.REACT_CONTEXT_TAG) {
|
|
9742
9783
|
throw new Error((0, import_error_codes_client_generated.formatClientError)(18, api));
|
|
9743
9784
|
}
|
|
9744
9785
|
}
|
|
@@ -9748,7 +9789,7 @@ function useRendererThenable(thenable) {
|
|
|
9748
9789
|
return useThenable(thenable, true);
|
|
9749
9790
|
}
|
|
9750
9791
|
function useContext(context) {
|
|
9751
|
-
if (context && context.$$kind === CONTEXT_TAG) {
|
|
9792
|
+
if (context && context.$$kind === import_runtime_tags.CONTEXT_TAG) {
|
|
9752
9793
|
return useContextInternal(context);
|
|
9753
9794
|
}
|
|
9754
9795
|
return useForeignContext(context, "useContext");
|
|
@@ -9777,7 +9818,7 @@ function rendererRegionSuspenseHandler(block) {
|
|
|
9777
9818
|
};
|
|
9778
9819
|
}
|
|
9779
9820
|
function bindRendererRegionOwner(props) {
|
|
9780
|
-
const bridge = props?.[
|
|
9821
|
+
const bridge = props?.[import_runtime_tags.RENDERER_REGION_OWNER_TAG];
|
|
9781
9822
|
if (bridge === void 0) {
|
|
9782
9823
|
throw new Error((0, import_error_codes_client_generated.formatClientError)(19));
|
|
9783
9824
|
}
|
|
@@ -10742,7 +10783,6 @@ function memoPublish(slot, value, ...deps) {
|
|
|
10742
10783
|
function memoPublishAlways(slot, value) {
|
|
10743
10784
|
return publishMemoEntry(CURRENT_SCOPE, slot, void 0, value);
|
|
10744
10785
|
}
|
|
10745
|
-
const LAZY_COMPONENT = /* @__PURE__ */ Symbol.for("octane.lazy");
|
|
10746
10786
|
const LAZY_BODY_CHECK = /* @__PURE__ */ Symbol.for("octane.lazyBodyCheck");
|
|
10747
10787
|
function markLazyBodyCheck(body, check) {
|
|
10748
10788
|
Object.defineProperty(body, LAZY_BODY_CHECK, {
|
|
@@ -10757,11 +10797,11 @@ function resolveLazyModule(mod) {
|
|
|
10757
10797
|
const defaultExport = mod.default;
|
|
10758
10798
|
if (defaultExport !== void 0) comp = defaultExport;
|
|
10759
10799
|
}
|
|
10760
|
-
if (typeof comp !== "function" || comp[
|
|
10800
|
+
if (typeof comp !== "function" || comp[import_runtime_tags.LAZY_COMPONENT_TAG] === true) {
|
|
10761
10801
|
throw new Error(
|
|
10762
10802
|
(0, import_error_codes_client_generated.formatClientError)(
|
|
10763
10803
|
10,
|
|
10764
|
-
comp?.[
|
|
10804
|
+
comp?.[import_runtime_tags.LAZY_COMPONENT_TAG] === true ? "lazy component" : typeof comp
|
|
10765
10805
|
)
|
|
10766
10806
|
);
|
|
10767
10807
|
}
|
|
@@ -10885,7 +10925,7 @@ function lazy(load) {
|
|
|
10885
10925
|
const nestedCheck = current[LAZY_BODY_CHECK];
|
|
10886
10926
|
return nestedCheck === void 0 || nestedCheck(scope);
|
|
10887
10927
|
});
|
|
10888
|
-
Object.defineProperty(lazyWrapper,
|
|
10928
|
+
Object.defineProperty(lazyWrapper, import_runtime_tags.LAZY_COMPONENT_TAG, {
|
|
10889
10929
|
get() {
|
|
10890
10930
|
return this === lazyWrapper;
|
|
10891
10931
|
}
|
|
@@ -10910,7 +10950,7 @@ function useId(slot) {
|
|
|
10910
10950
|
while (owner.limit !== void 0 && owner.next >= owner.limit && owner.overflow !== void 0) {
|
|
10911
10951
|
owner = owner.overflow;
|
|
10912
10952
|
}
|
|
10913
|
-
s = { id:
|
|
10953
|
+
s = { id: (0, import_hydration_markers.formatUseId)(owner.prefix, owner.next++) };
|
|
10914
10954
|
ensureHooks(scope).set(slot, s);
|
|
10915
10955
|
}
|
|
10916
10956
|
return s.id;
|
|
@@ -12206,6 +12246,8 @@ function preparePresentationSignalValue(args, frame) {
|
|
|
12206
12246
|
runWithBlockSignalOwner(scope, () => {
|
|
12207
12247
|
if (!valid()) throw new Error((0, import_error_codes_client_generated.formatClientError)(77));
|
|
12208
12248
|
const before = (0, import_event_capture.snapshotHydrationControl)(element);
|
|
12249
|
+
const priorValue = readSignalBinding(handle);
|
|
12250
|
+
const restored = lease === void 0 ? (0, import_control_capture.isRestoredHydrationTextarea)(element, priorValue) : !before.composing && !lease.composing() && typeof priorValue === "string" && before.value !== priorValue.replace(/\r\n?/g, "\n");
|
|
12209
12251
|
const ctrl = armControlled(element);
|
|
12210
12252
|
ctrl.composing = before.composing || lease?.composing() === true;
|
|
12211
12253
|
if (ctrl.composing) element.addEventListener("blur", onCtrlCompositionEnd);
|
|
@@ -12227,11 +12269,15 @@ function preparePresentationSignalValue(args, frame) {
|
|
|
12227
12269
|
if (lease !== void 0) owner.controlLeases.delete(element);
|
|
12228
12270
|
if (!binding.disposed && !scope.block.disposed) {
|
|
12229
12271
|
const snapshot = (0, import_event_capture.snapshotHydrationControl)(element);
|
|
12230
|
-
binding.value =
|
|
12231
|
-
binding.pendingControl = snapshot.editRevision > (lease === void 0 ? 0 : before.editRevision);
|
|
12272
|
+
binding.value = priorValue;
|
|
12273
|
+
binding.pendingControl = snapshot.editRevision > (lease === void 0 ? 0 : before.editRevision) || restored;
|
|
12232
12274
|
installDirectSignalControl(binding);
|
|
12233
12275
|
if (!binding.pendingControl) (0, import_event_capture.consumeHydrationControl)(element, snapshot.revision);
|
|
12234
|
-
if (binding.pendingControl)
|
|
12276
|
+
if (binding.pendingControl)
|
|
12277
|
+
queueDirectSignalControlAdoption(
|
|
12278
|
+
binding,
|
|
12279
|
+
lease === void 0 ? 0 : before.editRevision
|
|
12280
|
+
);
|
|
12235
12281
|
else {
|
|
12236
12282
|
const current = readSignalBinding(handle);
|
|
12237
12283
|
ctrl.sawV = true;
|
|
@@ -12375,7 +12421,7 @@ function presentationWrite(writer, kind, ...args) {
|
|
|
12375
12421
|
return result;
|
|
12376
12422
|
}
|
|
12377
12423
|
function bindPresentationView(view, id) {
|
|
12378
|
-
view[BINDING_VIEW_ROOT] =
|
|
12424
|
+
view[BINDING_VIEW_ROOT] = (0, import_dom_binding_protocol.bindingRootMarker)(id);
|
|
12379
12425
|
return (0, import_component_flags.markComponentFlags)(view, import_component_flags.COMPONENT_FLAG_BOUNDARY, view.name);
|
|
12380
12426
|
}
|
|
12381
12427
|
const BINDING_CHILDREN_SITE = /* @__PURE__ */ Symbol.for("octane.binding.children-site");
|
|
@@ -12405,7 +12451,8 @@ function presentationStructure(writer, kind, marker, ...args) {
|
|
|
12405
12451
|
}
|
|
12406
12452
|
const range = presentationRange(frame, start, marker, kind);
|
|
12407
12453
|
const expected = args[3][BINDING_VIEW_ROOT];
|
|
12408
|
-
if (expected !==
|
|
12454
|
+
if (range.view === void 0 || expected !== (0, import_dom_binding_protocol.bindingRootMarker)(range.view))
|
|
12455
|
+
presentationMiss(false);
|
|
12409
12456
|
writer(...args);
|
|
12410
12457
|
}
|
|
12411
12458
|
function setBindingClass(element, receipt, values) {
|
|
@@ -12425,7 +12472,7 @@ function hydrationMarkerMultiplicity(data, open) {
|
|
|
12425
12472
|
const marker = open ? import_constants.HYDRATION_START : import_constants.HYDRATION_END;
|
|
12426
12473
|
if (data === marker) return 1;
|
|
12427
12474
|
if (open && (data === import_constants.HYDRATION_FOR_EMPTY || data === import_constants.HYDRATION_FOR_ITEMS)) return 1;
|
|
12428
|
-
if (open && (data.startsWith(
|
|
12475
|
+
if (open && (data.startsWith(import_dom_binding_protocol.BINDING_OPEN_PREFIX) || data.startsWith(import_hydration_markers.HYDRATION_FOR_PREFIX)) && (0, import_dom_binding_protocol.isBindingOpenComment)(data))
|
|
12429
12476
|
return 1;
|
|
12430
12477
|
if (data.length < 2 || data.charCodeAt(0) !== marker.charCodeAt(0)) return 0;
|
|
12431
12478
|
const first = data.charCodeAt(1);
|
|
@@ -12487,7 +12534,7 @@ function ssrForMarkerState(node) {
|
|
|
12487
12534
|
const data = (STAGED_DOM?.view(node) ?? node).data;
|
|
12488
12535
|
if (data === import_constants.HYDRATION_FOR_EMPTY) return 0;
|
|
12489
12536
|
if (data === import_constants.HYDRATION_FOR_ITEMS) return 1;
|
|
12490
|
-
return (0, import_dom_binding_protocol.
|
|
12537
|
+
return (0, import_dom_binding_protocol.isForBindingOpenComment)(data) ? data.charCodeAt(import_hydration_markers.HYDRATION_FOR_ARM_INDEX) === 48 ? 0 : 1 : -1;
|
|
12491
12538
|
}
|
|
12492
12539
|
function child(node) {
|
|
12493
12540
|
if (currentHydration !== null) return (STAGED_DOM?.view(node) ?? node).firstChild;
|
|
@@ -12521,6 +12568,46 @@ function setText(node, value) {
|
|
|
12521
12568
|
(STAGED_DOM?.view(node) ?? node).nodeValue = text;
|
|
12522
12569
|
}
|
|
12523
12570
|
const DIRECT_SIGNAL_BINDING = /* @__PURE__ */ Symbol("octane.direct-signal-binding");
|
|
12571
|
+
const CLAIMED_BINDING_VALUE = /* @__PURE__ */ Symbol("octane.claimed-binding-value");
|
|
12572
|
+
function hydrateClaimedBindingCaches(scope, fields) {
|
|
12573
|
+
if (activeHydration() === null) return;
|
|
12574
|
+
const bag = scope.slots[0];
|
|
12575
|
+
for (let i = 0; i < fields.length; i += 3) {
|
|
12576
|
+
const field = fields[i];
|
|
12577
|
+
const node = bag[fields[i + 1]];
|
|
12578
|
+
const element = node.nodeType === 3 ? (STAGED_DOM?.view(node) ?? node).parentNode : node;
|
|
12579
|
+
const claims = import_dom_binding_claims.domBindingClaims.get(element);
|
|
12580
|
+
if (claims === void 0) continue;
|
|
12581
|
+
const channel = fields[i + 2];
|
|
12582
|
+
const tokenOnly = channel === "#text-token";
|
|
12583
|
+
let claimed = claims.has(
|
|
12584
|
+
tokenOnly ? "#text" : channel.startsWith("style:") ? "style:" + (0, import_css.styleName)(channel.slice(6)) : channel
|
|
12585
|
+
);
|
|
12586
|
+
if (channel === "style") {
|
|
12587
|
+
for (const name of claims.keys())
|
|
12588
|
+
if (name.startsWith("style:")) {
|
|
12589
|
+
claimed = true;
|
|
12590
|
+
break;
|
|
12591
|
+
}
|
|
12592
|
+
}
|
|
12593
|
+
if (!claimed) continue;
|
|
12594
|
+
const value = channel === "style" ? (STAGED_DOM?.view(element) ?? element).style.cssText : CLAIMED_BINDING_VALUE;
|
|
12595
|
+
if (typeof field === "number") {
|
|
12596
|
+
const slots = scope.slots[field].block.slots;
|
|
12597
|
+
journalRootProperty(slots, 0, slots[0]);
|
|
12598
|
+
slots[0] = value;
|
|
12599
|
+
} else {
|
|
12600
|
+
const cached = bag[field];
|
|
12601
|
+
if (cached?.[DIRECT_SIGNAL_BINDING] === true) {
|
|
12602
|
+
if (TRANSITION_JOURNAL !== null) journalObjectOnce(cached);
|
|
12603
|
+
cached.value = value;
|
|
12604
|
+
} else if (!tokenOnly) {
|
|
12605
|
+
if (TRANSITION_JOURNAL !== null) journalBag();
|
|
12606
|
+
bag[field] = value;
|
|
12607
|
+
}
|
|
12608
|
+
}
|
|
12609
|
+
}
|
|
12610
|
+
}
|
|
12524
12611
|
function isSignalHandle(value) {
|
|
12525
12612
|
return (typeof value === "object" || typeof value === "function") && value !== null && value[import_types.SIGNAL_HANDLE] === true;
|
|
12526
12613
|
}
|
|
@@ -12593,7 +12680,7 @@ function writeDirectSignalBoundValue(binding, value) {
|
|
|
12593
12680
|
const element = binding.target;
|
|
12594
12681
|
const tag = element.localName;
|
|
12595
12682
|
if (tag === "select") setSelectValue(element, value);
|
|
12596
|
-
else setValue(element, value
|
|
12683
|
+
else setValue(element, value);
|
|
12597
12684
|
}
|
|
12598
12685
|
function writeDirectSignalBoundChecked(binding, value) {
|
|
12599
12686
|
setChecked(binding.target, value);
|
|
@@ -12722,19 +12809,19 @@ function installDirectSignalControl(binding) {
|
|
|
12722
12809
|
)
|
|
12723
12810
|
);
|
|
12724
12811
|
}
|
|
12725
|
-
function queueDirectSignalControlAdoption(binding) {
|
|
12812
|
+
function queueDirectSignalControlAdoption(binding, priorEditRevision = 0) {
|
|
12726
12813
|
enqueueEffectEventCommitAction(() => {
|
|
12727
12814
|
if (binding.disposed || binding.scope.block.disposed || !binding.pendingControl) return;
|
|
12728
12815
|
(0, import_transition_state.withoutSignalCandidate)(
|
|
12729
12816
|
() => runWithBlockSignalOwner(binding.scope, () => {
|
|
12730
12817
|
const element = binding.target;
|
|
12731
12818
|
const snapshot = (0, import_event_capture.snapshotHydrationControl)(element);
|
|
12732
|
-
if (snapshot.editRevision >
|
|
12819
|
+
if (isWritableSignal(binding.handle) && (snapshot.editRevision > priorEditRevision || element.localName === "textarea" && Object.is(readSignalBinding(binding.handle), binding.value))) {
|
|
12733
12820
|
binding.handle.set(directSignalControlValue(binding, snapshot));
|
|
12734
12821
|
}
|
|
12735
12822
|
if (binding.disposed || binding.scope.block.disposed) return;
|
|
12736
12823
|
if (!(0, import_event_capture.consumeHydrationControl)(element, snapshot.revision)) {
|
|
12737
|
-
queueDirectSignalControlAdoption(binding);
|
|
12824
|
+
queueDirectSignalControlAdoption(binding, priorEditRevision);
|
|
12738
12825
|
return;
|
|
12739
12826
|
}
|
|
12740
12827
|
binding.pendingControl = false;
|
|
@@ -12768,8 +12855,9 @@ function createDirectSignalBinding(scope, target, value, site, policy, name, att
|
|
|
12768
12855
|
};
|
|
12769
12856
|
if (text !== void 0) binding.text = text;
|
|
12770
12857
|
const controlSnapshot = policy.control?.snapshot(target, site) ?? null;
|
|
12771
|
-
binding.pendingControl = activeHydration() !== null && isWritableSignal(handle) && controlSnapshot !== null && controlSnapshot.editRevision > 0;
|
|
12772
12858
|
const initial = handle === null ? value : readSignalBinding(handle);
|
|
12859
|
+
binding.pendingControl = activeHydration() !== null && isWritableSignal(handle) && controlSnapshot !== null && (controlSnapshot.editRevision > 0 || (0, import_control_capture.isRestoredHydrationTextarea)(target, initial));
|
|
12860
|
+
if (binding.pendingControl) binding.value = initial;
|
|
12773
12861
|
if (!binding.pendingControl) writeDirectSignalBinding(binding, initial);
|
|
12774
12862
|
if (STAGED_COMMIT_CAPTURE !== null) {
|
|
12775
12863
|
DEFERRED_LAYOUT_DRIVER.stageAction(() => {
|
|
@@ -12877,6 +12965,8 @@ function bindSignalText(scope, previous, position, value, site, onlyChild = fals
|
|
|
12877
12965
|
);
|
|
12878
12966
|
}
|
|
12879
12967
|
function bindSignalAttribute(scope, previous, element, name, value, site, attributeKind = "attr") {
|
|
12968
|
+
if (previous === value && value !== void 0 && (value === null || typeof value !== "object" && typeof value !== "function"))
|
|
12969
|
+
return previous;
|
|
12880
12970
|
return bindDirectSignal(
|
|
12881
12971
|
scope,
|
|
12882
12972
|
previous,
|
|
@@ -13171,10 +13261,10 @@ function applyRefValue(ref, el, prevTarget) {
|
|
|
13171
13261
|
}
|
|
13172
13262
|
ref.current = el;
|
|
13173
13263
|
}
|
|
13174
|
-
const Fragment =
|
|
13264
|
+
const Fragment = import_runtime_tags.FRAGMENT_TAG;
|
|
13175
13265
|
let activityDescriptorDispatch = null;
|
|
13176
13266
|
function initializeActivitySentinel() {
|
|
13177
|
-
const type =
|
|
13267
|
+
const type = import_runtime_tags.ACTIVITY_TAG;
|
|
13178
13268
|
activityDescriptorDispatch = { type, body: renderActivityDescriptor };
|
|
13179
13269
|
return type;
|
|
13180
13270
|
}
|
|
@@ -14148,7 +14238,14 @@ function setStyleProperty(el, name, value, staticCss, previous) {
|
|
|
14148
14238
|
}
|
|
14149
14239
|
const remove = value == null || typeof value === "boolean";
|
|
14150
14240
|
if (remove && previous === CURRENT_SCOPE) return;
|
|
14151
|
-
if (TRANSITION_JOURNAL !== null)
|
|
14241
|
+
if (TRANSITION_JOURNAL !== null) {
|
|
14242
|
+
const log = TRANSITION_JOURNAL;
|
|
14243
|
+
let tail = log.length - 4;
|
|
14244
|
+
if (log[tail] === JOURNAL_BAG && log[tail + 1] === CURRENT_SCOPE?.slots[0]) tail -= 4;
|
|
14245
|
+
if (tail < TRANSITION_JOURNAL_CHECKPOINT || log[tail] !== JOURNAL_ATTR || log[tail + 1] !== el || log[tail + 2] !== "style")
|
|
14246
|
+
journalAttr(el, "style");
|
|
14247
|
+
else journalBag();
|
|
14248
|
+
}
|
|
14152
14249
|
if (hiddenStyleWriter !== null && hiddenStyleWriter(el, value, previous, name)) return;
|
|
14153
14250
|
const style = (STAGED_DOM?.view(el) ?? el).style;
|
|
14154
14251
|
if (remove) style.removeProperty((0, import_css.styleName)(name));
|
|
@@ -14387,7 +14484,7 @@ function resolveHostPropSources(el, sources, props, readStyle) {
|
|
|
14387
14484
|
if (readStyle !== void 0 && "style" in resolved) resolved.style = readStyle(resolved.style);
|
|
14388
14485
|
return resolved;
|
|
14389
14486
|
}
|
|
14390
|
-
function setHostPropSources(el, sources, prev, scope, hasNestedChildren = false, readStyle, deferControl = false
|
|
14487
|
+
function setHostPropSources(el, sources, prev, scope, hasNestedChildren = false, readStyle, deferControl = false) {
|
|
14391
14488
|
const props = /* @__PURE__ */ new Map();
|
|
14392
14489
|
const resolved = resolveHostPropSources(el, sources, props, readStyle);
|
|
14393
14490
|
const tag = el.localName;
|
|
@@ -14402,8 +14499,7 @@ function setHostPropSources(el, sources, prev, scope, hasNestedChildren = false,
|
|
|
14402
14499
|
props.get("defaultValue")?.value,
|
|
14403
14500
|
props.get("checked")?.value,
|
|
14404
14501
|
props.get("defaultChecked")?.value,
|
|
14405
|
-
props.get("multiple")?.value
|
|
14406
|
-
writableTextareaValue
|
|
14502
|
+
props.get("multiple")?.value
|
|
14407
14503
|
);
|
|
14408
14504
|
return resolved;
|
|
14409
14505
|
}
|
|
@@ -14424,14 +14520,12 @@ function resolveSignalStyle(value, handles, read) {
|
|
|
14424
14520
|
}
|
|
14425
14521
|
return copy ?? value;
|
|
14426
14522
|
}
|
|
14427
|
-
function resolveSignalHostPropSources(sources, readStyle, read = readSignalBinding
|
|
14523
|
+
function resolveSignalHostPropSources(sources, readStyle, read = readSignalBinding) {
|
|
14428
14524
|
const handles = /* @__PURE__ */ new Set();
|
|
14429
14525
|
let rows;
|
|
14430
|
-
let writableTextareaValue = false;
|
|
14431
14526
|
for (let i = 0; i < sources.length; i++) {
|
|
14432
14527
|
const source = sources[i];
|
|
14433
14528
|
if (!source[0]) {
|
|
14434
|
-
if (textarea && source[1] === "value") writableTextareaValue = isWritableSignal(source[2]);
|
|
14435
14529
|
const value = source[1] === "children" || source[1] === "style" && readStyle !== void 0 ? source[2] : source[1] === "style" ? resolveSignalStyle(source[2], handles, read) : isSignalHandle(source[2]) ? (handles.add(source[2]), read(source[2])) : source[2];
|
|
14436
14530
|
if (value !== source[2]) {
|
|
14437
14531
|
rows ??= sources.slice();
|
|
@@ -14444,7 +14538,6 @@ function resolveSignalHostPropSources(sources, readStyle, read = readSignalBindi
|
|
|
14444
14538
|
let copy;
|
|
14445
14539
|
for (const name of Object.keys(spread)) {
|
|
14446
14540
|
const current = spread[name];
|
|
14447
|
-
if (textarea && name === "value") writableTextareaValue = isWritableSignal(current);
|
|
14448
14541
|
const value = name === "children" || name === "style" && readStyle !== void 0 ? current : name === "style" ? resolveSignalStyle(current, handles, read) : isSignalHandle(current) ? (handles.add(current), read(current)) : current;
|
|
14449
14542
|
if (value !== current) {
|
|
14450
14543
|
copy ??= { ...spread };
|
|
@@ -14456,7 +14549,7 @@ function resolveSignalHostPropSources(sources, readStyle, read = readSignalBindi
|
|
|
14456
14549
|
rows[i] = [true, copy];
|
|
14457
14550
|
}
|
|
14458
14551
|
}
|
|
14459
|
-
return
|
|
14552
|
+
return { sources: rows ?? sources, handles };
|
|
14460
14553
|
}
|
|
14461
14554
|
function winningSignalHostControl(sources, name) {
|
|
14462
14555
|
let winner;
|
|
@@ -14476,21 +14569,14 @@ function updateSignalHostPropSources(binding) {
|
|
|
14476
14569
|
if (binding.disposed || binding.pendingControl || binding.scope.block.disposed) return;
|
|
14477
14570
|
try {
|
|
14478
14571
|
runWithBlockSignalOwner(binding.scope, () => {
|
|
14479
|
-
const next = resolveSignalHostPropSources(
|
|
14480
|
-
binding.sources,
|
|
14481
|
-
binding.readStyle,
|
|
14482
|
-
void 0,
|
|
14483
|
-
binding.element.localName === "textarea"
|
|
14484
|
-
);
|
|
14572
|
+
const next = resolveSignalHostPropSources(binding.sources, binding.readStyle);
|
|
14485
14573
|
binding.resolved = setHostPropSources(
|
|
14486
14574
|
binding.element,
|
|
14487
14575
|
next.sources,
|
|
14488
14576
|
binding.resolved,
|
|
14489
14577
|
binding.scope,
|
|
14490
14578
|
binding.hasNestedChildren,
|
|
14491
|
-
binding.readStyle
|
|
14492
|
-
false,
|
|
14493
|
-
next.writableTextareaValue
|
|
14579
|
+
binding.readStyle
|
|
14494
14580
|
);
|
|
14495
14581
|
if (process.env.NODE_ENV !== "production" && STAGED_DOM === null)
|
|
14496
14582
|
drainDevFormDiagnostics(binding.element);
|
|
@@ -14627,22 +14713,22 @@ function disposeSignalHostPropSources(binding) {
|
|
|
14627
14713
|
domNode(binding.element).removeEventListener("input", binding.input);
|
|
14628
14714
|
queueOwnRefDetach(binding.resolved, binding.element);
|
|
14629
14715
|
}
|
|
14630
|
-
function queueSignalHostControlAdoption(binding) {
|
|
14716
|
+
function queueSignalHostControlAdoption(binding, priorValue) {
|
|
14631
14717
|
enqueueEffectEventCommitAction(() => {
|
|
14632
14718
|
if (binding.disposed || binding.scope.block.disposed || !binding.pendingControl) return;
|
|
14633
14719
|
(0, import_transition_state.withoutSignalCandidate)(
|
|
14634
14720
|
() => runWithBlockSignalOwner(binding.scope, () => {
|
|
14635
14721
|
const snapshot = (0, import_event_capture.snapshotHydrationControl)(binding.element);
|
|
14636
|
-
|
|
14722
|
+
const value = winningSignalHostControl(binding.sources, "value");
|
|
14723
|
+
if (snapshot.editRevision > 0 || binding.element.localName === "textarea" && isWritableSignal(value) && Object.is(readSignalBinding(value), priorValue)) {
|
|
14637
14724
|
const checked = winningSignalHostControl(binding.sources, "checked");
|
|
14638
|
-
const value = winningSignalHostControl(binding.sources, "value");
|
|
14639
14725
|
if (isWritableSignal(checked) && snapshot.checked !== void 0)
|
|
14640
14726
|
checked.set(snapshot.checked);
|
|
14641
14727
|
if (isWritableSignal(value)) value.set(snapshot.selectedValues ?? snapshot.value);
|
|
14642
14728
|
}
|
|
14643
14729
|
if (binding.disposed || binding.scope.block.disposed) return;
|
|
14644
14730
|
if (!(0, import_event_capture.consumeHydrationControl)(binding.element, snapshot.revision)) {
|
|
14645
|
-
queueSignalHostControlAdoption(binding);
|
|
14731
|
+
queueSignalHostControlAdoption(binding, priorValue);
|
|
14646
14732
|
return;
|
|
14647
14733
|
}
|
|
14648
14734
|
binding.pendingControl = false;
|
|
@@ -14755,14 +14841,9 @@ function bindSignalHostPropSources(scope, previous, element, sources, site, hasN
|
|
|
14755
14841
|
const controlSnapshot = isWritableSignal(valueControl) || isWritableSignal(checkedControl) ? (0, import_event_capture.snapshotHydrationControl)(element) : null;
|
|
14756
14842
|
if (controlSnapshot !== null) {
|
|
14757
14843
|
validateDirectSignalControl(element, site);
|
|
14758
|
-
binding.pendingControl ||= activeHydration() !== null && controlSnapshot.editRevision > 0;
|
|
14844
|
+
binding.pendingControl ||= activeHydration() !== null && (controlSnapshot.editRevision > 0 || isWritableSignal(valueControl) && (0, import_control_capture.isRestoredHydrationTextarea)(element, readSignalBinding(valueControl)));
|
|
14759
14845
|
}
|
|
14760
|
-
const next = resolveSignalHostPropSources(
|
|
14761
|
-
sources,
|
|
14762
|
-
readStyle,
|
|
14763
|
-
void 0,
|
|
14764
|
-
element.localName === "textarea"
|
|
14765
|
-
);
|
|
14846
|
+
const next = resolveSignalHostPropSources(sources, readStyle);
|
|
14766
14847
|
binding.resolved = setHostPropSources(
|
|
14767
14848
|
element,
|
|
14768
14849
|
next.sources,
|
|
@@ -14770,8 +14851,7 @@ function bindSignalHostPropSources(scope, previous, element, sources, site, hasN
|
|
|
14770
14851
|
scope,
|
|
14771
14852
|
hasNestedChildren,
|
|
14772
14853
|
readStyle,
|
|
14773
|
-
binding.pendingControl
|
|
14774
|
-
next.writableTextareaValue
|
|
14854
|
+
binding.pendingControl
|
|
14775
14855
|
);
|
|
14776
14856
|
if (STAGED_COMMIT_CAPTURE !== null) {
|
|
14777
14857
|
DEFERRED_LAYOUT_DRIVER.stageAction(() => {
|
|
@@ -14793,7 +14873,7 @@ function bindSignalHostPropSources(scope, previous, element, sources, site, hasN
|
|
|
14793
14873
|
if (!binding.pendingControl && controlSnapshot !== null)
|
|
14794
14874
|
(0, import_event_capture.consumeHydrationControl)(element, controlSnapshot.revision);
|
|
14795
14875
|
}
|
|
14796
|
-
if (binding.pendingControl) queueSignalHostControlAdoption(committed);
|
|
14876
|
+
if (binding.pendingControl) queueSignalHostControlAdoption(committed, binding.resolved?.value);
|
|
14797
14877
|
return committed;
|
|
14798
14878
|
}
|
|
14799
14879
|
function isAggregatedFormControlProp(el, name) {
|
|
@@ -15189,14 +15269,16 @@ function setEventHandler(el, key, handler) {
|
|
|
15189
15269
|
SCOPE_SIGNAL_OWNERS.set(owner, false);
|
|
15190
15270
|
const owners = SIGNAL_EVENT_OWNERS ??= /* @__PURE__ */ new WeakMap();
|
|
15191
15271
|
if (STAGED_COMMIT_CAPTURE !== null)
|
|
15192
|
-
DEFERRED_LAYOUT_DRIVER.stageAction(() =>
|
|
15272
|
+
DEFERRED_LAYOUT_DRIVER.stageAction(() => {
|
|
15273
|
+
if (owners.get(el) !== owner) owners.set(el, owner);
|
|
15274
|
+
});
|
|
15193
15275
|
else {
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
if (
|
|
15276
|
+
const previous = owners.get(el);
|
|
15277
|
+
if (previous !== owner) {
|
|
15278
|
+
if (TRANSITION_JOURNAL !== null)
|
|
15197
15279
|
TRANSITION_JOURNAL.push(JOURNAL_EVENT_OWNER, owners, el, previous);
|
|
15280
|
+
owners.set(el, owner);
|
|
15198
15281
|
}
|
|
15199
|
-
owners.set(el, owner);
|
|
15200
15282
|
}
|
|
15201
15283
|
}
|
|
15202
15284
|
}
|
|
@@ -15208,9 +15290,11 @@ function evt0(el, key, fn) {
|
|
|
15208
15290
|
}
|
|
15209
15291
|
function evt0u(d, fn) {
|
|
15210
15292
|
if (STAGED_COMMIT_CAPTURE !== null) d = DEFERRED_LAYOUT_DRIVER.projectEventBundle(d);
|
|
15211
|
-
if (
|
|
15212
|
-
|
|
15213
|
-
|
|
15293
|
+
if (d.fn !== fn) {
|
|
15294
|
+
if (_dispatchDepth !== 0) preserveDispatchedBundle(d);
|
|
15295
|
+
if (TRANSITION_JOURNAL !== null) journalObjectOnce(d);
|
|
15296
|
+
d.fn = fn;
|
|
15297
|
+
}
|
|
15214
15298
|
if ((SIGNAL_BINDINGS_ENABLED || import_document_owner.signalDocumentEnabled || import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || SIGNAL_EVENT_OWNERS !== null) && (import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || STAGED_COMMIT_CAPTURE !== null || import_document_owner.signalDocumentEnabled || CURRENT_SCOPE?.block.idState.renderOwner?.signalOwner !== void 0 || SIGNAL_EVENT_OWNERS?.get(d.el) !== CURRENT_SCOPE))
|
|
15215
15299
|
setEventHandler(d.el);
|
|
15216
15300
|
}
|
|
@@ -15221,10 +15305,12 @@ function evt1(el, key, fn, a0) {
|
|
|
15221
15305
|
}
|
|
15222
15306
|
function evt1u(d, fn, a0) {
|
|
15223
15307
|
if (STAGED_COMMIT_CAPTURE !== null) d = DEFERRED_LAYOUT_DRIVER.projectEventBundle(d);
|
|
15224
|
-
if (
|
|
15225
|
-
|
|
15226
|
-
|
|
15227
|
-
|
|
15308
|
+
if (d.fn !== fn || !Object.is(d.a0, a0)) {
|
|
15309
|
+
if (_dispatchDepth !== 0) preserveDispatchedBundle(d);
|
|
15310
|
+
if (TRANSITION_JOURNAL !== null) journalObjectOnce(d);
|
|
15311
|
+
d.fn = fn;
|
|
15312
|
+
d.a0 = a0;
|
|
15313
|
+
}
|
|
15228
15314
|
if ((SIGNAL_BINDINGS_ENABLED || import_document_owner.signalDocumentEnabled || import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || SIGNAL_EVENT_OWNERS !== null) && (import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || STAGED_COMMIT_CAPTURE !== null || import_document_owner.signalDocumentEnabled || CURRENT_SCOPE?.block.idState.renderOwner?.signalOwner !== void 0 || SIGNAL_EVENT_OWNERS?.get(d.el) !== CURRENT_SCOPE))
|
|
15229
15315
|
setEventHandler(d.el);
|
|
15230
15316
|
}
|
|
@@ -15235,11 +15321,13 @@ function evt2(el, key, fn, a0, a1) {
|
|
|
15235
15321
|
}
|
|
15236
15322
|
function evt2u(d, fn, a0, a1) {
|
|
15237
15323
|
if (STAGED_COMMIT_CAPTURE !== null) d = DEFERRED_LAYOUT_DRIVER.projectEventBundle(d);
|
|
15238
|
-
if (
|
|
15239
|
-
|
|
15240
|
-
|
|
15241
|
-
|
|
15242
|
-
|
|
15324
|
+
if (d.fn !== fn || !Object.is(d.a0, a0) || !Object.is(d.a1, a1)) {
|
|
15325
|
+
if (_dispatchDepth !== 0) preserveDispatchedBundle(d);
|
|
15326
|
+
if (TRANSITION_JOURNAL !== null) journalObjectOnce(d);
|
|
15327
|
+
d.fn = fn;
|
|
15328
|
+
d.a0 = a0;
|
|
15329
|
+
d.a1 = a1;
|
|
15330
|
+
}
|
|
15243
15331
|
if ((SIGNAL_BINDINGS_ENABLED || import_document_owner.signalDocumentEnabled || import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || SIGNAL_EVENT_OWNERS !== null) && (import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || STAGED_COMMIT_CAPTURE !== null || import_document_owner.signalDocumentEnabled || CURRENT_SCOPE?.block.idState.renderOwner?.signalOwner !== void 0 || SIGNAL_EVENT_OWNERS?.get(d.el) !== CURRENT_SCOPE))
|
|
15244
15332
|
setEventHandler(d.el);
|
|
15245
15333
|
}
|
|
@@ -15260,10 +15348,12 @@ function evtN(el, key, fn, args) {
|
|
|
15260
15348
|
}
|
|
15261
15349
|
function evtNu(d, fn, args) {
|
|
15262
15350
|
if (STAGED_COMMIT_CAPTURE !== null) d = DEFERRED_LAYOUT_DRIVER.projectEventBundle(d);
|
|
15263
|
-
if (
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15351
|
+
if (d.fn !== fn || d.args !== args) {
|
|
15352
|
+
if (_dispatchDepth !== 0) preserveDispatchedBundle(d);
|
|
15353
|
+
if (TRANSITION_JOURNAL !== null) journalObjectOnce(d);
|
|
15354
|
+
d.fn = fn;
|
|
15355
|
+
d.args = args;
|
|
15356
|
+
}
|
|
15267
15357
|
if ((SIGNAL_BINDINGS_ENABLED || import_document_owner.signalDocumentEnabled || import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || SIGNAL_EVENT_OWNERS !== null) && (import_owner_context.activeSynchronousSignalOwner !== null || import_owner_context.activeSignalOwnerEnvironment !== void 0 || STAGED_COMMIT_CAPTURE !== null || import_document_owner.signalDocumentEnabled || CURRENT_SCOPE?.block.idState.renderOwner?.signalOwner !== void 0 || SIGNAL_EVENT_OWNERS?.get(d.el) !== CURRENT_SCOPE))
|
|
15268
15358
|
setEventHandler(d.el);
|
|
15269
15359
|
}
|
|
@@ -16429,7 +16519,7 @@ function setNativeChangeDiagnosticMetadata(el, value) {
|
|
|
16429
16519
|
if (state !== void 0) state.staticNativeChange = false;
|
|
16430
16520
|
if (value === "runtime") queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0, true);
|
|
16431
16521
|
}
|
|
16432
|
-
function setValue(el, value
|
|
16522
|
+
function setValue(el, value) {
|
|
16433
16523
|
if (CURRENT_SCOPE?.block.idState.renderOwner?.controlLeases?.has(el)) presentationMiss(false);
|
|
16434
16524
|
const input = el;
|
|
16435
16525
|
const ctrl = armControlled(el);
|
|
@@ -16461,17 +16551,14 @@ function setValue(el, value, writableTextareaEcho = false) {
|
|
|
16461
16551
|
const prev = ctrl.v;
|
|
16462
16552
|
ctrl.v = value;
|
|
16463
16553
|
if (process.env.NODE_ENV !== "production") queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0);
|
|
16464
|
-
if (writableTextareaEcho) {
|
|
16465
|
-
if ((STAGED_DOM?.view(input) ?? input).value === s) return;
|
|
16466
|
-
if (!(ctrl.composing && Object.is(prev, value))) (STAGED_DOM?.view(input) ?? input).value = s;
|
|
16467
|
-
if ((STAGED_DOM?.view(input) ?? input).defaultValue !== s)
|
|
16468
|
-
(STAGED_DOM?.view(input) ?? input).defaultValue = s;
|
|
16469
|
-
return;
|
|
16470
|
-
}
|
|
16471
16554
|
if (!(ctrl.composing && Object.is(prev, value)) && valueNeedsWrite(input, value))
|
|
16472
16555
|
(STAGED_DOM?.view(input) ?? input).value = s;
|
|
16473
|
-
if ((STAGED_DOM?.view(input) ?? input).defaultValue !== s)
|
|
16474
|
-
|
|
16556
|
+
if ((STAGED_DOM?.view(input) ?? input).defaultValue !== s) {
|
|
16557
|
+
const text = STAGED_DOM === null && el.localName === "textarea" ? getFirstChild(el) : null;
|
|
16558
|
+
if (text !== null && text.nodeType === 3 && getNextSibling(text) === null)
|
|
16559
|
+
domNode(text).data = s;
|
|
16560
|
+
else (STAGED_DOM?.view(input) ?? input).defaultValue = s;
|
|
16561
|
+
}
|
|
16475
16562
|
}
|
|
16476
16563
|
function setCheckedState(input, value, ctrl) {
|
|
16477
16564
|
const first = !ctrl.sawC;
|
|
@@ -16772,7 +16859,7 @@ function setFormControlSources(el, sources) {
|
|
|
16772
16859
|
}
|
|
16773
16860
|
applyFormControlValues(el, tag, value, defaultValue, checked, defaultChecked, multiple);
|
|
16774
16861
|
}
|
|
16775
|
-
function applyFormControlValues(el, tag, value, defaultValue, checked, defaultChecked, multiple
|
|
16862
|
+
function applyFormControlValues(el, tag, value, defaultValue, checked, defaultChecked, multiple) {
|
|
16776
16863
|
const ctrl = armControlled(el);
|
|
16777
16864
|
const first = !ctrl.formSeen;
|
|
16778
16865
|
const previousMultiple = ctrl.formMultiple;
|
|
@@ -16802,7 +16889,7 @@ function applyFormControlValues(el, tag, value, defaultValue, checked, defaultCh
|
|
|
16802
16889
|
}
|
|
16803
16890
|
if (tag === "textarea") {
|
|
16804
16891
|
const textarea = el;
|
|
16805
|
-
setValue(textarea, value
|
|
16892
|
+
setValue(textarea, value);
|
|
16806
16893
|
if (value == null) {
|
|
16807
16894
|
if (defaultValue != null) setDefaultValue(textarea, defaultValue, first);
|
|
16808
16895
|
else if (!first && (STAGED_DOM?.view(textarea) ?? textarea).defaultValue !== "")
|
|
@@ -17414,7 +17501,7 @@ function normalizePortalBody(rawBody, rawProps) {
|
|
|
17414
17501
|
if (typeof rawBody === "function") {
|
|
17415
17502
|
return { body: rawBody, props: rawProps };
|
|
17416
17503
|
}
|
|
17417
|
-
if (rawBody != null && rawBody.$$kind === ELEMENT_TAG && typeof rawBody.type === "function") {
|
|
17504
|
+
if (rawBody != null && rawBody.$$kind === import_runtime_tags.ELEMENT_TAG && typeof rawBody.type === "function") {
|
|
17418
17505
|
return {
|
|
17419
17506
|
body: rawBody.type,
|
|
17420
17507
|
props: rawBody.props
|
|
@@ -17428,16 +17515,14 @@ function normalizePortalBody(rawBody, rawProps) {
|
|
|
17428
17515
|
function genericPortalBody(value, scope) {
|
|
17429
17516
|
childSlot(scope, 0, scope.parentNode, value, scope.endMarker);
|
|
17430
17517
|
}
|
|
17431
|
-
const PORTAL_TAG = /* @__PURE__ */ Symbol.for("octane.portal");
|
|
17432
17518
|
function portalKey(value) {
|
|
17433
17519
|
return typeof value === "string" || typeof value === "number" ? String(value) : null;
|
|
17434
17520
|
}
|
|
17435
17521
|
// @__NO_SIDE_EFFECTS__
|
|
17436
17522
|
function createPortal(body, target, props = void 0) {
|
|
17437
17523
|
const key = portalKey(props);
|
|
17438
|
-
return { $$kind: PORTAL_TAG, body, target, key, props: key === null ? props : void 0 };
|
|
17524
|
+
return { $$kind: import_runtime_tags.PORTAL_TAG, body, target, key, props: key === null ? props : void 0 };
|
|
17439
17525
|
}
|
|
17440
|
-
const ELEMENT_TAG = /* @__PURE__ */ Symbol.for("octane.element");
|
|
17441
17526
|
const KEYED_ELEMENT_DESCRIPTORS = /* @__PURE__ */ new WeakSet();
|
|
17442
17527
|
function elementKeyWasProvided(descriptor) {
|
|
17443
17528
|
return descriptor.key !== null || KEYED_ELEMENT_DESCRIPTORS.has(descriptor);
|
|
@@ -17540,7 +17625,7 @@ function copyScopedElementConfig(type, config, resolve) {
|
|
|
17540
17625
|
return props;
|
|
17541
17626
|
}
|
|
17542
17627
|
function scopedElementRecord(type, props, key, ref, resolve, invocationSite) {
|
|
17543
|
-
const descriptor = { $$kind: ELEMENT_TAG, type, props, key, ref };
|
|
17628
|
+
const descriptor = { $$kind: import_runtime_tags.ELEMENT_TAG, type, props, key, ref };
|
|
17544
17629
|
if (invocationSite !== void 0) descriptor.__octaneInvocationSite = invocationSite;
|
|
17545
17630
|
Object.defineProperty(descriptor, SCOPED_CHILDREN_RESOLVER, { value: resolve });
|
|
17546
17631
|
Object.defineProperty(descriptor, "children", SCOPED_CHILDREN_PROPERTY);
|
|
@@ -17596,7 +17681,7 @@ function nativeCreateScopedValue(readElement) {
|
|
|
17596
17681
|
return scopedValueDescriptor(createNativeScopedResolver(readElement));
|
|
17597
17682
|
}
|
|
17598
17683
|
function scopedValueDescriptor(resolve) {
|
|
17599
|
-
const descriptor = { $$kind: ELEMENT_TAG };
|
|
17684
|
+
const descriptor = { $$kind: import_runtime_tags.ELEMENT_TAG };
|
|
17600
17685
|
Object.defineProperty(descriptor, SCOPED_VALUE_RECORD, { value: resolve });
|
|
17601
17686
|
Object.defineProperty(descriptor, "type", SCOPED_VALUE_PROPERTIES.type);
|
|
17602
17687
|
Object.defineProperty(descriptor, "props", SCOPED_VALUE_PROPERTIES.props);
|
|
@@ -17664,7 +17749,7 @@ function createElementFromConfig(invocationSite, type, props, children = EMPTY_A
|
|
|
17664
17749
|
(0, import_shared_value_helpers.applyElementDefaultProps)(type, p);
|
|
17665
17750
|
kids = p.children;
|
|
17666
17751
|
const descriptor = {
|
|
17667
|
-
$$kind: ELEMENT_TAG,
|
|
17752
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
17668
17753
|
type,
|
|
17669
17754
|
props: p,
|
|
17670
17755
|
key,
|
|
@@ -17678,10 +17763,10 @@ function createElementFromConfig(invocationSite, type, props, children = EMPTY_A
|
|
|
17678
17763
|
return finalizeElementDescriptor(descriptor);
|
|
17679
17764
|
}
|
|
17680
17765
|
function isElementDescriptor(v) {
|
|
17681
|
-
return v != null && v.$$kind === ELEMENT_TAG;
|
|
17766
|
+
return v != null && v.$$kind === import_runtime_tags.ELEMENT_TAG;
|
|
17682
17767
|
}
|
|
17683
17768
|
function isHostDescriptor(v) {
|
|
17684
|
-
return v != null && v.$$kind === ELEMENT_TAG && typeof v.type === "string";
|
|
17769
|
+
return v != null && v.$$kind === import_runtime_tags.ELEMENT_TAG && typeof v.type === "string";
|
|
17685
17770
|
}
|
|
17686
17771
|
function isValidElement(v) {
|
|
17687
17772
|
return isElementDescriptor(v);
|
|
@@ -17761,7 +17846,7 @@ function cloneElement(element, config, ...children) {
|
|
|
17761
17846
|
);
|
|
17762
17847
|
} else {
|
|
17763
17848
|
descriptor = {
|
|
17764
|
-
$$kind: ELEMENT_TAG,
|
|
17849
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
17765
17850
|
type: element.type,
|
|
17766
17851
|
props,
|
|
17767
17852
|
key,
|
|
@@ -17803,7 +17888,7 @@ function cloneAndReplaceElementKey(element, key) {
|
|
|
17803
17888
|
} else {
|
|
17804
17889
|
const copiedGetter = get === SCOPED_VALUE_PROPERTIES.children.get ? () => get.call(element) : get;
|
|
17805
17890
|
descriptor = {
|
|
17806
|
-
$$kind: ELEMENT_TAG,
|
|
17891
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
17807
17892
|
type: element.type,
|
|
17808
17893
|
props: element.props,
|
|
17809
17894
|
key,
|
|
@@ -17820,7 +17905,7 @@ function cloneAndReplaceElementKey(element, key) {
|
|
|
17820
17905
|
}
|
|
17821
17906
|
} else {
|
|
17822
17907
|
descriptor = {
|
|
17823
|
-
$$kind: ELEMENT_TAG,
|
|
17908
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
17824
17909
|
type: element.type,
|
|
17825
17910
|
props: element.props,
|
|
17826
17911
|
key,
|
|
@@ -17863,7 +17948,7 @@ function mapIntoChildren(children, out, escapedPrefix, nameSoFar, callback, vali
|
|
|
17863
17948
|
children = null;
|
|
17864
17949
|
type = "object";
|
|
17865
17950
|
}
|
|
17866
|
-
const isLeaf = children === null || type === "string" || type === "number" || type === "bigint" || isElementDescriptor(children) || children != null && children.$$kind === PORTAL_TAG;
|
|
17951
|
+
const isLeaf = children === null || type === "string" || type === "number" || type === "bigint" || isElementDescriptor(children) || children != null && children.$$kind === import_runtime_tags.PORTAL_TAG;
|
|
17867
17952
|
if (isLeaf) {
|
|
17868
17953
|
const child2 = children;
|
|
17869
17954
|
let mapped = callback(child2);
|
|
@@ -17989,7 +18074,7 @@ function componentSlot(parentScope, slotKey, domParent, comp, props, anchor, key
|
|
|
17989
18074
|
}
|
|
17990
18075
|
}
|
|
17991
18076
|
const renderProps = typeof comp === "string" ? {
|
|
17992
|
-
$$kind: ELEMENT_TAG,
|
|
18077
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
17993
18078
|
type: comp,
|
|
17994
18079
|
props,
|
|
17995
18080
|
key: null,
|
|
@@ -18670,8 +18755,8 @@ function warnMissingListKey(owner) {
|
|
|
18670
18755
|
}
|
|
18671
18756
|
}
|
|
18672
18757
|
function deoptKey(item, index) {
|
|
18673
|
-
const element = item != null && item.$$kind === ELEMENT_TAG;
|
|
18674
|
-
if (item?.$$kind === PORTAL_TAG && item.key != null) return item.key;
|
|
18758
|
+
const element = item != null && item.$$kind === import_runtime_tags.ELEMENT_TAG;
|
|
18759
|
+
if (item?.$$kind === import_runtime_tags.PORTAL_TAG && item.key != null) return item.key;
|
|
18675
18760
|
if (element && item.key != null && !ELEMENTS_MISSING_LIST_KEY.has(item)) return item.key;
|
|
18676
18761
|
if (element && process.env.NODE_ENV !== "production" && activeHydration() === null) {
|
|
18677
18762
|
warnMissingListKey(CURRENT_BLOCK);
|
|
@@ -18680,7 +18765,7 @@ function deoptKey(item, index) {
|
|
|
18680
18765
|
}
|
|
18681
18766
|
const POSITIONAL_CHILDREN = /* @__PURE__ */ new WeakSet();
|
|
18682
18767
|
function deoptKeyPositional(item, index) {
|
|
18683
|
-
return item != null && (item.$$kind === ELEMENT_TAG || item.$$kind === PORTAL_TAG) && item.key != null ? item.key : index;
|
|
18768
|
+
return item != null && (item.$$kind === import_runtime_tags.ELEMENT_TAG || item.$$kind === import_runtime_tags.PORTAL_TAG) && item.key != null ? item.key : index;
|
|
18684
18769
|
}
|
|
18685
18770
|
function positionalChildren(children) {
|
|
18686
18771
|
POSITIONAL_CHILDREN.add(children);
|
|
@@ -18932,7 +19017,7 @@ function setDeoptDesc(el, d) {
|
|
|
18932
19017
|
const children = record.children;
|
|
18933
19018
|
const previous = getDeoptDesc(el);
|
|
18934
19019
|
record = sameDeoptDesc(previous, record, children) ? previous : {
|
|
18935
|
-
$$kind: ELEMENT_TAG,
|
|
19020
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
18936
19021
|
type: record.type,
|
|
18937
19022
|
props: record.props,
|
|
18938
19023
|
key: record.key,
|
|
@@ -18955,7 +19040,7 @@ function fragmentDescriptorChildren(value) {
|
|
|
18955
19040
|
}
|
|
18956
19041
|
function fragmentRefDescriptor(value) {
|
|
18957
19042
|
return {
|
|
18958
|
-
$$kind: ELEMENT_TAG,
|
|
19043
|
+
$$kind: import_runtime_tags.ELEMENT_TAG,
|
|
18959
19044
|
type: renderFragmentRefDescriptor,
|
|
18960
19045
|
props: value,
|
|
18961
19046
|
key: value.key,
|
|
@@ -19020,7 +19105,7 @@ function nestedDeoptKeyPrefix(path) {
|
|
|
19020
19105
|
return "[" + JSON.stringify(path) + ",";
|
|
19021
19106
|
}
|
|
19022
19107
|
function appendScopedDeoptKey(outKeys, path, item, index, key, keyPrefix) {
|
|
19023
|
-
const explicit = (isElementDescriptor(item) || item?.$$kind === PORTAL_TAG) && item.key != null;
|
|
19108
|
+
const explicit = (isElementDescriptor(item) || item?.$$kind === import_runtime_tags.PORTAL_TAG) && item.key != null;
|
|
19024
19109
|
if (path.length === 0) {
|
|
19025
19110
|
outKeys.push(explicit ? "k" + String(key) : index);
|
|
19026
19111
|
return keyPrefix;
|
|
@@ -19073,7 +19158,7 @@ function flattenReactChildContainer(outItems, outKeys, children, kind, path) {
|
|
|
19073
19158
|
}
|
|
19074
19159
|
}
|
|
19075
19160
|
function singleDeoptKey(item, key) {
|
|
19076
|
-
return (isElementDescriptor(item) || item?.$$kind === PORTAL_TAG) && item.key != null ? "k" + String(key) : 0;
|
|
19161
|
+
return (isElementDescriptor(item) || item?.$$kind === import_runtime_tags.PORTAL_TAG) && item.key != null ? "k" + String(key) : 0;
|
|
19077
19162
|
}
|
|
19078
19163
|
function prepareDeoptList(value, forceSingle = false, includeKeyedSingle = true) {
|
|
19079
19164
|
if (isFragmentDescriptor(value)) {
|
|
@@ -19137,7 +19222,7 @@ function flattenDeoptChildrenKeyed(outVals, outKeys, v, prefix) {
|
|
|
19137
19222
|
if (prefix === "") {
|
|
19138
19223
|
outKeys.push(typeof k2 === "string" && k2[0] === ":" ? ":" + k2 : k2);
|
|
19139
19224
|
} else {
|
|
19140
|
-
const explicit = item?.$$kind === ELEMENT_TAG && item.key != null;
|
|
19225
|
+
const explicit = item?.$$kind === import_runtime_tags.ELEMENT_TAG && item.key != null;
|
|
19141
19226
|
outKeys.push(prefix + ":" + (explicit ? "k" : "i") + String(k2));
|
|
19142
19227
|
}
|
|
19143
19228
|
}
|
|
@@ -19145,7 +19230,7 @@ function flattenDeoptChildrenKeyed(outVals, outKeys, v, prefix) {
|
|
|
19145
19230
|
return;
|
|
19146
19231
|
}
|
|
19147
19232
|
outVals.push(v);
|
|
19148
|
-
const k = v?.$$kind === ELEMENT_TAG && v.key != null ? v.key : 0;
|
|
19233
|
+
const k = v?.$$kind === import_runtime_tags.ELEMENT_TAG && v.key != null ? v.key : 0;
|
|
19149
19234
|
outKeys.push(
|
|
19150
19235
|
prefix === "" ? typeof k === "string" && k[0] === ":" ? ":" + k : k : prefix + ":i0"
|
|
19151
19236
|
);
|
|
@@ -19536,12 +19621,12 @@ function descNeedsBlocks(value) {
|
|
|
19536
19621
|
return false;
|
|
19537
19622
|
}
|
|
19538
19623
|
if (!isElementDescriptor(value) && (0, import_shared_value_helpers.childrenIterator)(value) !== null) return true;
|
|
19539
|
-
if (value.$$kind === ELEMENT_TAG) {
|
|
19624
|
+
if (value.$$kind === import_runtime_tags.ELEMENT_TAG) {
|
|
19540
19625
|
if (value.type === Fragment || activityDescriptorDispatch !== null && value.type === activityDescriptorDispatch.type)
|
|
19541
19626
|
return true;
|
|
19542
19627
|
return typeof value.type === "function" || descNeedsBlocks(value.children);
|
|
19543
19628
|
}
|
|
19544
|
-
if (value.$$kind === PORTAL_TAG) return true;
|
|
19629
|
+
if (value.$$kind === import_runtime_tags.PORTAL_TAG) return true;
|
|
19545
19630
|
return false;
|
|
19546
19631
|
}
|
|
19547
19632
|
function hostElementBody(d, block) {
|
|
@@ -19795,7 +19880,7 @@ function compilerCacheArray(value, previous) {
|
|
|
19795
19880
|
continue;
|
|
19796
19881
|
}
|
|
19797
19882
|
if (item !== null && typeof item === "object") {
|
|
19798
|
-
if (item.$$kind !== ELEMENT_TAG) {
|
|
19883
|
+
if (item.$$kind !== import_runtime_tags.ELEMENT_TAG) {
|
|
19799
19884
|
renderable = false;
|
|
19800
19885
|
continue;
|
|
19801
19886
|
}
|
|
@@ -20337,7 +20422,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
20337
20422
|
return;
|
|
20338
20423
|
}
|
|
20339
20424
|
while (value !== null && (typeof value === "object" || typeof value === "function")) {
|
|
20340
|
-
if (value.$$kind === CONTEXT_TAG) {
|
|
20425
|
+
if (value.$$kind === import_runtime_tags.CONTEXT_TAG) {
|
|
20341
20426
|
value = useContextInternal(value);
|
|
20342
20427
|
continue;
|
|
20343
20428
|
}
|
|
@@ -20493,7 +20578,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
20493
20578
|
state.start = start;
|
|
20494
20579
|
state.end = end;
|
|
20495
20580
|
}
|
|
20496
|
-
const portalDesc = value != null && value.$$kind === PORTAL_TAG ? value : null;
|
|
20581
|
+
const portalDesc = value != null && value.$$kind === import_runtime_tags.PORTAL_TAG ? value : null;
|
|
20497
20582
|
if (portalDesc === null && state.portal != null) {
|
|
20498
20583
|
teardownPortalState(state.portal);
|
|
20499
20584
|
state.portal = null;
|
|
@@ -25090,6 +25175,7 @@ function forBlock(parentScope, slotKey, domParent, inputItems, getKey, itemBody,
|
|
|
25090
25175
|
parentScope.slots[slotKey] = state;
|
|
25091
25176
|
registerSlot(parentScope, state);
|
|
25092
25177
|
}
|
|
25178
|
+
if (hydration !== null && state.size === 0) hydration.node = getNextSibling(state.start);
|
|
25093
25179
|
const serverMarkerState = hydration?.markerState(state.start) ?? -1;
|
|
25094
25180
|
if (ROOT_RENDER_TRANSACTION !== null && state.env !== deps)
|
|
25095
25181
|
journalRootProperty(state, "env", state.env);
|
|
@@ -25183,6 +25269,7 @@ function forBlock(parentScope, slotKey, domParent, inputItems, getKey, itemBody,
|
|
|
25183
25269
|
(f & 2) !== 0,
|
|
25184
25270
|
(f & 16) !== 0
|
|
25185
25271
|
);
|
|
25272
|
+
if (hydration !== null) discardLeftoverHydrationItems(state.end, hydration);
|
|
25186
25273
|
} else {
|
|
25187
25274
|
reconcileKeyed(
|
|
25188
25275
|
parentBlock,
|
|
@@ -25197,10 +25284,7 @@ function forBlock(parentScope, slotKey, domParent, inputItems, getKey, itemBody,
|
|
|
25197
25284
|
(f & 16) !== 0
|
|
25198
25285
|
);
|
|
25199
25286
|
}
|
|
25200
|
-
if (hydration !== null)
|
|
25201
|
-
discardLeftoverHydrationItems(state.end, hydration);
|
|
25202
|
-
hydration.node = getNextSibling(state.end);
|
|
25203
|
-
}
|
|
25287
|
+
if (hydration !== null) hydration.node = getNextSibling(state.end);
|
|
25204
25288
|
}
|
|
25205
25289
|
function keyedForBlock(parentScope, slotKey, domParent, items, getKey, itemBody, flags, deps, emptyBody, anchor, ownEnd, selectionBody) {
|
|
25206
25290
|
if (CURRENT_BLOCK?.pending && !CURRENT_BLOCK.crossRenderUpdate) return;
|
|
@@ -27959,6 +28043,8 @@ function scriptResource(attrs) {
|
|
|
27959
28043
|
TsrxErrorBoundary,
|
|
27960
28044
|
ViewTransition,
|
|
27961
28045
|
ViewTransitionPseudoElement,
|
|
28046
|
+
__HydrateCompiled,
|
|
28047
|
+
__createCompiledContext,
|
|
27962
28048
|
__createVoidRoot,
|
|
27963
28049
|
__hydrateVoidRoot,
|
|
27964
28050
|
__useLinkedStateWithGetter,
|
|
@@ -28075,6 +28161,7 @@ function scriptResource(attrs) {
|
|
|
28075
28161
|
hostComponent,
|
|
28076
28162
|
htext,
|
|
28077
28163
|
htextSwap,
|
|
28164
|
+
hydrateClaimedBindingCaches,
|
|
28078
28165
|
hydrateRoot,
|
|
28079
28166
|
ifBlock,
|
|
28080
28167
|
injectStyle,
|