octane 0.6.2 → 0.6.3
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-binding-handoff.cjs +2 -1
- package/dist/cjs/dom-binding-protocol.cjs +4 -3
- package/dist/cjs/dom-binding-styles.cjs +3 -2
- package/dist/cjs/dom-bindings.cjs +24 -23
- package/dist/cjs/error-codes.client.generated.cjs +2 -1
- package/dist/cjs/error-codes.server.generated.cjs +2 -1
- package/dist/cjs/hydration/event-capture.cjs +2 -1
- package/dist/cjs/independent-hydration-protocol.cjs +3 -2
- package/dist/cjs/runtime.cjs +169 -155
- package/dist/cjs/runtime.server.cjs +40 -34
- package/dist/cjs/signals/control-binding.cjs +7 -6
- package/dist/cjs/signals/derived-facade.cjs +2 -1
- package/dist/cjs/signals/document-owner.cjs +4 -3
- package/dist/cjs/signals/facade.cjs +10 -9
- package/dist/cjs/signals/graph.cjs +5 -4
- package/dist/cjs/signals/native-read-client.cjs +4 -3
- package/dist/cjs/signals/owner-context.cjs +4 -3
- package/dist/cjs/signals/query-attempt-observer.cjs +2 -1
- package/dist/cjs/signals/query-facade.cjs +2 -1
- package/dist/cjs/signals/scalar-computations.cjs +2 -1
- package/dist/cjs/signals/transition-action.cjs +10 -9
- package/dist/cjs/signals/transition-candidate.cjs +2 -1
- package/dist/cjs/version.cjs +1 -1
- package/dist/compiler/compile.js +380 -12
- package/dist/node/aria-diagnostics.js +92 -0
- package/dist/node/behavior-form-submissions.js +228 -0
- package/dist/node/behavior-root-types.js +0 -0
- package/dist/node/behavior-root.js +746 -0
- package/dist/node/class-names.js +25 -0
- package/dist/node/compatibility.js +10 -0
- package/dist/node/component-flags.js +23 -0
- package/dist/node/constants.js +113 -0
- package/dist/node/context-epoch.js +13 -0
- package/dist/node/context-identity.js +46 -0
- package/dist/node/css.js +80 -0
- package/dist/node/data-encoding.js +134 -0
- package/dist/node/devtools-hook.js +229 -0
- package/dist/node/dom-binding-claims.js +4 -0
- package/dist/node/dom-binding-classes.js +152 -0
- package/dist/node/dom-binding-controls.js +6 -0
- package/dist/node/dom-binding-handoff.js +77 -0
- package/dist/node/dom-binding-program.js +1617 -0
- package/dist/node/dom-binding-projections.js +204 -0
- package/dist/node/dom-binding-protocol.js +130 -0
- package/dist/node/dom-binding-signals.js +135 -0
- package/dist/node/dom-binding-styles.js +280 -0
- package/dist/node/dom-bindings.js +1087 -0
- package/dist/node/dom-focused-move.js +46 -0
- package/dist/node/dom-stage.js +878 -0
- package/dist/node/dom-tables.js +382 -0
- package/dist/node/error-codes.client.generated.js +1066 -0
- package/dist/node/error-codes.server.generated.js +736 -0
- package/dist/node/error-message.js +27 -0
- package/dist/node/event-names.js +15 -0
- package/dist/node/form-diagnostics.js +96 -0
- package/dist/node/form-submission.js +43 -0
- package/dist/node/has-own.js +4 -0
- package/dist/node/head-ownership.js +31 -0
- package/dist/node/hook-slot-cache.js +91 -0
- package/dist/node/host-property-diagnostics.js +189 -0
- package/dist/node/html-tree-validation.js +193 -0
- package/dist/node/hydration/condition.js +15 -0
- package/dist/node/hydration/control-capture.js +237 -0
- package/dist/node/hydration/document-lifecycle.js +89 -0
- package/dist/node/hydration/event-capture.js +362 -0
- package/dist/node/hydration/idle.js +23 -0
- package/dist/node/hydration/independent-island.js +317 -0
- package/dist/node/hydration/index.js +74 -0
- package/dist/node/hydration/interaction-config.js +61 -0
- package/dist/node/hydration/interaction.js +35 -0
- package/dist/node/hydration/load.js +15 -0
- package/dist/node/hydration/media.js +33 -0
- package/dist/node/hydration/native-intent.js +68 -0
- package/dist/node/hydration/never.js +12 -0
- package/dist/node/hydration/stream-delivery.js +345 -0
- package/dist/node/hydration/stream-receiver.js +190 -0
- package/dist/node/hydration/stream-result-receiver.js +276 -0
- package/dist/node/hydration/streamed-signals.js +186 -0
- package/dist/node/hydration/types.js +0 -0
- package/dist/node/hydration/visible.js +69 -0
- package/dist/node/hydration-markers.js +44 -0
- package/dist/node/independent-hydration-protocol.js +91 -0
- package/dist/node/index.js +461 -0
- package/dist/node/internal/client.js +7 -0
- package/dist/node/internal/context.js +5 -0
- package/dist/node/internal/server.js +5 -0
- package/dist/node/internal/signal-read.js +4 -0
- package/dist/node/method-dep.js +25 -0
- package/dist/node/profiling.js +432 -0
- package/dist/node/public-types.js +0 -0
- package/dist/node/react/fiber-adapter.js +57 -0
- package/dist/node/react/index.js +397 -0
- package/dist/node/react/react-compat-envelope.js +78 -0
- package/dist/node/react/react-compat-server.js +129 -0
- package/dist/node/react/react-compat-shared.js +104 -0
- package/dist/node/react/react-compat.js +223 -0
- package/dist/node/react/server.js +81 -0
- package/dist/node/react/shared.js +75 -0
- package/dist/node/renderer-bridge.js +35 -0
- package/dist/node/resize-observer.js +105 -0
- package/dist/node/resource-hint-diagnostics.js +67 -0
- package/dist/node/runtime-tags.js +22 -0
- package/dist/node/runtime.js +28881 -0
- package/dist/node/runtime.server.js +8016 -0
- package/dist/node/sanitize-url.js +34 -0
- package/dist/node/server/early-signals.js +54 -0
- package/dist/node/server/index.js +336 -0
- package/dist/node/server/rpc-batch.js +129 -0
- package/dist/node/server/rpc-stream.js +125 -0
- package/dist/node/server/rpc.js +48 -0
- package/dist/node/server/signal-query-observation.js +134 -0
- package/dist/node/server/streamed-region.js +31 -0
- package/dist/node/server/streamed-signals.js +557 -0
- package/dist/node/server-call.js +75 -0
- package/dist/node/server-rpc-batch-client.js +119 -0
- package/dist/node/server-rpc-client.js +108 -0
- package/dist/node/server-rpc-protocol.js +109 -0
- package/dist/node/server-rpc-stream-client.js +98 -0
- package/dist/node/shared-value-helpers.js +40 -0
- package/dist/node/signals/actions.js +463 -0
- package/dist/node/signals/client.js +22 -0
- package/dist/node/signals/computations.js +452 -0
- package/dist/node/signals/control-binding.js +388 -0
- package/dist/node/signals/control-handoff.js +12 -0
- package/dist/node/signals/derived-facade.js +25 -0
- package/dist/node/signals/document-owner.js +48 -0
- package/dist/node/signals/early-values.js +124 -0
- package/dist/node/signals/encoding.js +6 -0
- package/dist/node/signals/engine.js +668 -0
- package/dist/node/signals/errors.js +54 -0
- package/dist/node/signals/facade.js +441 -0
- package/dist/node/signals/graph.js +817 -0
- package/dist/node/signals/handle-protocol.js +11 -0
- package/dist/node/signals/index.js +87 -0
- package/dist/node/signals/native-read-client.js +319 -0
- package/dist/node/signals/native-read-collector.js +132 -0
- package/dist/node/signals/native-read-events.js +45 -0
- package/dist/node/signals/native-read-inspection.js +20 -0
- package/dist/node/signals/native-read-retry.js +30 -0
- package/dist/node/signals/native-read-seeds.js +243 -0
- package/dist/node/signals/native-read-server.js +99 -0
- package/dist/node/signals/owner-context.js +88 -0
- package/dist/node/signals/query-attempt-observer.js +42 -0
- package/dist/node/signals/query-facade.js +41 -0
- package/dist/node/signals/read-protocol.js +125 -0
- package/dist/node/signals/requests.js +716 -0
- package/dist/node/signals/scalar-computations.js +57 -0
- package/dist/node/signals/scope-streams.js +147 -0
- package/dist/node/signals/server.js +22 -0
- package/dist/node/signals/transition-action.js +555 -0
- package/dist/node/signals/transition-candidate.js +101 -0
- package/dist/node/signals/transition-coordinator.js +255 -0
- package/dist/node/signals/transition-state.js +82 -0
- package/dist/node/signals/types.js +20 -0
- package/dist/node/static/index.js +10 -0
- package/dist/node/stream-protocol.js +114 -0
- package/dist/node/streamed-signals-protocol.js +130 -0
- package/dist/node/style-values.js +96 -0
- package/dist/node/sub-slot.js +35 -0
- package/dist/node/testing.js +14 -0
- package/dist/node/trusted-html.js +6 -0
- package/dist/node/tsrx-iterable.js +5 -0
- package/dist/node/tsrx-spread.js +10 -0
- package/dist/node/universal-core.js +10010 -0
- package/dist/node/universal-dom-boundary.js +237 -0
- package/dist/node/universal-native.js +28 -0
- package/dist/node/universal.js +17 -0
- package/dist/node/version.js +4 -0
- package/dist/runtime.d.ts +18 -0
- package/dist/runtime.js +13 -2
- package/dist/runtime.server.d.ts +7 -0
- package/dist/runtime.server.js +4 -0
- package/dist/version.js +1 -1
- package/package.json +62 -1
package/dist/cjs/runtime.cjs
CHANGED
|
@@ -102,6 +102,7 @@ __export(runtime_exports, {
|
|
|
102
102
|
createRoot: () => createRoot,
|
|
103
103
|
createScopedElement: () => createScopedElement,
|
|
104
104
|
createScopedValue: () => createScopedValue,
|
|
105
|
+
deferRecord: () => deferRecord,
|
|
105
106
|
delegateCaptureEvents: () => delegateCaptureEvents,
|
|
106
107
|
delegateEvents: () => delegateEvents,
|
|
107
108
|
descriptorChildren: () => descriptorChildren,
|
|
@@ -159,6 +160,7 @@ __export(runtime_exports, {
|
|
|
159
160
|
isChildrenBlock: () => isChildrenBlock,
|
|
160
161
|
isHydratingStyle: () => isHydratingStyle,
|
|
161
162
|
isInActScope: () => isInActScope,
|
|
163
|
+
isRenderCall: () => isRenderCall,
|
|
162
164
|
isValidElement: () => isValidElement,
|
|
163
165
|
keyedForBlock: () => keyedForBlock,
|
|
164
166
|
lazy: () => lazy,
|
|
@@ -366,6 +368,7 @@ var import_early_values = require("./signals/early-values.cjs");
|
|
|
366
368
|
var import_types = require("./signals/types.cjs");
|
|
367
369
|
var import_read_protocol2 = require("./signals/read-protocol.cjs");
|
|
368
370
|
var import_css = require("./css.cjs");
|
|
371
|
+
const __octaneDev = process.env.NODE_ENV !== "production";
|
|
369
372
|
let PROFILE_COMPONENT_OVERRIDE = null;
|
|
370
373
|
function withProfileComponentOverride(target, component, run) {
|
|
371
374
|
const previous = PROFILE_COMPONENT_OVERRIDE;
|
|
@@ -392,7 +395,7 @@ function ensureHooks(scope) {
|
|
|
392
395
|
return scope.hooks ?? (scope.hooks = /* @__PURE__ */ new Map());
|
|
393
396
|
}
|
|
394
397
|
function registerHookCleanup(scope, cleanup) {
|
|
395
|
-
if (
|
|
398
|
+
if (__octaneDev) {
|
|
396
399
|
if (scope.block.body?.[HMR] !== void 0) {
|
|
397
400
|
cleanup[HMR] = true;
|
|
398
401
|
}
|
|
@@ -1176,14 +1179,14 @@ function hydrationMismatchMode(el) {
|
|
|
1176
1179
|
return el.__oct_loc !== void 0 ? 2 : 0;
|
|
1177
1180
|
}
|
|
1178
1181
|
function warnHydrationValueMismatch(loc, what, serverVal, clientVal) {
|
|
1179
|
-
if (
|
|
1182
|
+
if (!__octaneDev) return;
|
|
1180
1183
|
if (!loc) return;
|
|
1181
1184
|
console.error(
|
|
1182
1185
|
`Octane hydration mismatch at ${loc}: server rendered ${what} ${JSON.stringify(serverVal)} but the client rendered ${JSON.stringify(clientVal)}. The client value was used. If this difference is intentional (e.g. a timestamp or random id), add suppressHydrationWarning to the element.`
|
|
1183
1186
|
);
|
|
1184
1187
|
}
|
|
1185
1188
|
function warnHydrationKeptServerValue(loc, what, serverVal, clientVal) {
|
|
1186
|
-
if (
|
|
1189
|
+
if (!__octaneDev || !loc) return;
|
|
1187
1190
|
console.error(
|
|
1188
1191
|
`Octane hydration mismatch at ${loc}: server rendered ${what} ${JSON.stringify(serverVal)} but the client rendered ${JSON.stringify(clientVal)}. The server value was kept. If this difference is intentional, add suppressHydrationWarning to the element.`
|
|
1189
1192
|
);
|
|
@@ -1201,7 +1204,7 @@ function describeHydrationNode(node) {
|
|
|
1201
1204
|
return "a node";
|
|
1202
1205
|
}
|
|
1203
1206
|
function warnHydrationStructuralMismatch(loc, expected, actual) {
|
|
1204
|
-
if (
|
|
1207
|
+
if (!__octaneDev) return;
|
|
1205
1208
|
if (!loc) return;
|
|
1206
1209
|
console.error(
|
|
1207
1210
|
`Octane hydration mismatch at ${loc}: the client expected ${expected} but the server rendered ${actual}. The mismatched subtree was rebuilt on the client.`
|
|
@@ -1213,7 +1216,7 @@ function hydrationNodeMatches(server, template2, partialStyles, path = "") {
|
|
|
1213
1216
|
const s = server;
|
|
1214
1217
|
const t = template2;
|
|
1215
1218
|
if (s.localName !== t.localName) return false;
|
|
1216
|
-
if (
|
|
1219
|
+
if (!__octaneDev) return true;
|
|
1217
1220
|
const tAttrs = (STAGED_DOM?.view(t) ?? t).attributes;
|
|
1218
1221
|
for (let i = 0; i < tAttrs.length; i++) {
|
|
1219
1222
|
const a = tAttrs[i];
|
|
@@ -3176,7 +3179,7 @@ function vtPrepareScopeBoundary(block) {
|
|
|
3176
3179
|
const state = vtBoundaryState(block);
|
|
3177
3180
|
if (state.scopeHost !== null && state.scopeHost !== host) vtReleaseScopeBoundary(block);
|
|
3178
3181
|
if (host === null) {
|
|
3179
|
-
if (
|
|
3182
|
+
if (__octaneDev && block.vt?.scope === "element" && !inInactiveSubtree(block) && !VT_INVALID_SCOPE_WARNED.has(block)) {
|
|
3180
3183
|
VT_INVALID_SCOPE_WARNED.add(block);
|
|
3181
3184
|
console.error(
|
|
3182
3185
|
'ViewTransition scope="element" requires exactly one host element without non-whitespace text siblings. This declaration will commit without its own animation.'
|
|
@@ -3984,7 +3987,7 @@ const ACT_DRAIN_LIMIT = NESTED_UPDATE_LIMIT + 50;
|
|
|
3984
3987
|
let UPDATE_CHAIN_ID = 0;
|
|
3985
3988
|
let PASSIVE_UPDATE_COUNTS = null;
|
|
3986
3989
|
function countPassiveUpdate(block) {
|
|
3987
|
-
if (
|
|
3990
|
+
if (!__octaneDev) return;
|
|
3988
3991
|
const counts = PASSIVE_UPDATE_COUNTS ??= /* @__PURE__ */ new WeakMap();
|
|
3989
3992
|
let state = counts.get(block);
|
|
3990
3993
|
if (state === void 0 || state.chain !== UPDATE_CHAIN_ID) {
|
|
@@ -4014,7 +4017,7 @@ function componentName(block) {
|
|
|
4014
4017
|
return body.displayName || body.name || "Unknown";
|
|
4015
4018
|
}
|
|
4016
4019
|
function warnCrossComponentRenderUpdate(target, source) {
|
|
4017
|
-
if (
|
|
4020
|
+
if (!__octaneDev) return;
|
|
4018
4021
|
const warnings = CROSS_RENDER_WARNINGS ??= /* @__PURE__ */ new WeakMap();
|
|
4019
4022
|
let sources = warnings.get(target.body);
|
|
4020
4023
|
if (sources === void 0) warnings.set(target.body, sources = /* @__PURE__ */ new WeakSet());
|
|
@@ -4026,12 +4029,12 @@ function warnCrossComponentRenderUpdate(target, source) {
|
|
|
4026
4029
|
}
|
|
4027
4030
|
function scheduleRender(block) {
|
|
4028
4031
|
if (block.disposed) return;
|
|
4029
|
-
if (
|
|
4032
|
+
if (__octaneDev && CURRENT_EFFECT_PHASE === INSERTION) {
|
|
4030
4033
|
console.error(
|
|
4031
4034
|
"useInsertionEffect must not schedule state updates. Move this work to a layout or passive effect."
|
|
4032
4035
|
);
|
|
4033
4036
|
}
|
|
4034
|
-
if (
|
|
4037
|
+
if (__octaneDev && isActEnvironment() && actScopeDepth === 0 && !syncFlush) {
|
|
4035
4038
|
console.error(
|
|
4036
4039
|
`An update to ${componentName(block)} was not wrapped in act(...).
|
|
4037
4040
|
|
|
@@ -4653,7 +4656,7 @@ function flushWork() {
|
|
|
4653
4656
|
}
|
|
4654
4657
|
}
|
|
4655
4658
|
function vtCheckNames(group) {
|
|
4656
|
-
if (
|
|
4659
|
+
if (!__octaneDev) return;
|
|
4657
4660
|
const names = /* @__PURE__ */ new Map();
|
|
4658
4661
|
for (const rec of group.recs)
|
|
4659
4662
|
for (const el of rec.els) {
|
|
@@ -5310,7 +5313,7 @@ function drainPassivesBeforeRender() {
|
|
|
5310
5313
|
}
|
|
5311
5314
|
}
|
|
5312
5315
|
function flushSync(fn) {
|
|
5313
|
-
if (
|
|
5316
|
+
if (__octaneDev && (CURRENT_BLOCK !== null || EFFECT_BODY_DEPTH > 0 || REF_CALLBACK_DEPTH > 0)) {
|
|
5314
5317
|
console.error(
|
|
5315
5318
|
"flushSync was called while rendering or running a lifecycle callback. Move the call to an event or scheduled task."
|
|
5316
5319
|
);
|
|
@@ -6404,7 +6407,7 @@ function runEffectBody(e) {
|
|
|
6404
6407
|
reportEffectError(e.scope.block, err);
|
|
6405
6408
|
return;
|
|
6406
6409
|
}
|
|
6407
|
-
if (
|
|
6410
|
+
if (__octaneDev && cleanup !== void 0 && typeof cleanup !== "function") {
|
|
6408
6411
|
const name = e.phase === PASSIVE ? "useEffect" : e.phase === LAYOUT ? "useLayoutEffect" : "useInsertionEffect";
|
|
6409
6412
|
const thenable = cleanup !== null && typeof cleanup.then === "function";
|
|
6410
6413
|
console.error(
|
|
@@ -8094,7 +8097,7 @@ function depsChanged(prev, next, hook = false) {
|
|
|
8094
8097
|
let length = prev.length;
|
|
8095
8098
|
if (length !== next.length) {
|
|
8096
8099
|
if (!hook) return true;
|
|
8097
|
-
if (
|
|
8100
|
+
if (__octaneDev) {
|
|
8098
8101
|
console.error(
|
|
8099
8102
|
`The dependency array must keep the same length between renders (previous: ${length}, next: ${next.length}).`
|
|
8100
8103
|
);
|
|
@@ -8308,7 +8311,7 @@ function useMemo(compute, deps, slot) {
|
|
|
8308
8311
|
const scope = CURRENT_SCOPE;
|
|
8309
8312
|
const entry = readMemoEntry(scope, s, d);
|
|
8310
8313
|
if (entry !== null) return entry.value;
|
|
8311
|
-
const value =
|
|
8314
|
+
const value = __octaneDev ? computeMemoWithDiagnostics(compute, d) : compute.apply(null, d ?? []);
|
|
8312
8315
|
return publishMemoEntry(scope, s, d, value);
|
|
8313
8316
|
}
|
|
8314
8317
|
function useCallback(fn, deps, slot) {
|
|
@@ -8533,7 +8536,7 @@ function useSyncExternalStore(subscribe, getSnapshot, serverSnapshotOrSlot = voi
|
|
|
8533
8536
|
const subs = usesSubslots(slot);
|
|
8534
8537
|
const readSnapshot = activeHydration() !== null && getServerSnapshot !== void 0 ? getServerSnapshot : getSnapshot;
|
|
8535
8538
|
const value = readSnapshot();
|
|
8536
|
-
if (
|
|
8539
|
+
if (__octaneDev && !DID_WARN_UNCACHED_SNAPSHOT && !Object.is(value, readSnapshot())) {
|
|
8537
8540
|
DID_WARN_UNCACHED_SNAPSHOT = true;
|
|
8538
8541
|
console.error(
|
|
8539
8542
|
"The " + (readSnapshot === getSnapshot ? "getSnapshot" : "getServerSnapshot") + " result must be cached to avoid an infinite update loop."
|
|
@@ -8555,7 +8558,7 @@ function useSyncExternalStore(subscribe, getSnapshot, serverSnapshotOrSlot = voi
|
|
|
8555
8558
|
} : () => scheduleStoreRender(block),
|
|
8556
8559
|
onStoreChange: () => {
|
|
8557
8560
|
if (block.disposed) return;
|
|
8558
|
-
if (CURRENT_BLOCK === null && block.pending && block.pendingMode === "urgent" && !block.pendingDeferred && !(typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__) && (
|
|
8561
|
+
if (CURRENT_BLOCK === null && block.pending && block.pendingMode === "urgent" && !block.pendingDeferred && !(typeof __OCTANE_PROFILE_ENABLED__ !== "undefined" && __OCTANE_PROFILE_ENABLED__) && (!__octaneDev || !isActEnvironment() || actScopeDepth !== 0 || syncFlush)) {
|
|
8559
8562
|
return;
|
|
8560
8563
|
}
|
|
8561
8564
|
if (checkStoreChanged(created)) created.forceUpdate();
|
|
@@ -8641,7 +8644,7 @@ function initializeContext(ctx, defaultValue) {
|
|
|
8641
8644
|
ctx.defaultValue = defaultValue;
|
|
8642
8645
|
ctx.$$version = 0;
|
|
8643
8646
|
(0, import_context_identity.registerContext)(ctx);
|
|
8644
|
-
if (
|
|
8647
|
+
if (__octaneDev) {
|
|
8645
8648
|
(0, import_context_identity.defineRemovedContextMembers)(ctx);
|
|
8646
8649
|
}
|
|
8647
8650
|
return ctx;
|
|
@@ -10039,7 +10042,7 @@ const ErrorBoundary = /* @__PURE__ */ (0, import_component_flags.markComponentFl
|
|
|
10039
10042
|
);
|
|
10040
10043
|
const TsrxErrorBoundary = ErrorBoundary;
|
|
10041
10044
|
function use(usable) {
|
|
10042
|
-
if (
|
|
10045
|
+
if (__octaneDev && devMemoComputeDepth !== 0) {
|
|
10043
10046
|
console.error(
|
|
10044
10047
|
"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."
|
|
10045
10048
|
);
|
|
@@ -10464,7 +10467,7 @@ function useThenable(thenable, replaceOnResume = false) {
|
|
|
10464
10467
|
throw new SuspenseException(thenable);
|
|
10465
10468
|
}
|
|
10466
10469
|
if (stored !== void 0 && RESUME_REPLAY && !replaceOnResume) {
|
|
10467
|
-
if (
|
|
10470
|
+
if (__octaneDev) warnUncachedUsePromise(block);
|
|
10468
10471
|
if (stored.status === "fulfilled") return stored.value;
|
|
10469
10472
|
if (stored.status === "rejected") throw stored.reason;
|
|
10470
10473
|
throw new SuspenseException(stored);
|
|
@@ -10473,7 +10476,7 @@ function useThenable(thenable, replaceOnResume = false) {
|
|
|
10473
10476
|
trackThenable(thenable);
|
|
10474
10477
|
if (thenable.status === "fulfilled") return thenable.value;
|
|
10475
10478
|
if (thenable.status === "rejected") throw thenable.reason;
|
|
10476
|
-
if (
|
|
10479
|
+
if (__octaneDev && RESUME_REPLAY && idx > 0 && state[idx - 1] !== void 0)
|
|
10477
10480
|
warnUseWaterfall(block, idx);
|
|
10478
10481
|
throw new SuspenseException(thenable);
|
|
10479
10482
|
}
|
|
@@ -10498,7 +10501,7 @@ function devHintsEnabled() {
|
|
|
10498
10501
|
}
|
|
10499
10502
|
const warnedUncached = /* @__PURE__ */ new WeakSet();
|
|
10500
10503
|
function warnUncachedUsePromise(block) {
|
|
10501
|
-
if (
|
|
10504
|
+
if (!__octaneDev) return;
|
|
10502
10505
|
if (!devHintsEnabled() || warnedUncached.has(block)) return;
|
|
10503
10506
|
warnedUncached.add(block);
|
|
10504
10507
|
console.error(
|
|
@@ -10507,7 +10510,7 @@ function warnUncachedUsePromise(block) {
|
|
|
10507
10510
|
}
|
|
10508
10511
|
const warnedWaterfall = /* @__PURE__ */ new WeakSet();
|
|
10509
10512
|
function warnUseWaterfall(block, idx) {
|
|
10510
|
-
if (
|
|
10513
|
+
if (!__octaneDev) return;
|
|
10511
10514
|
if (!devHintsEnabled() || warnedWaterfall.has(block)) return;
|
|
10512
10515
|
warnedWaterfall.add(block);
|
|
10513
10516
|
console.error(
|
|
@@ -10763,7 +10766,7 @@ function warmChild(comp, props) {
|
|
|
10763
10766
|
const plan = comp.__warm;
|
|
10764
10767
|
if (typeof plan !== "function") return;
|
|
10765
10768
|
if (WARM_DEPTH >= WARM_DEPTH_CAP) {
|
|
10766
|
-
if (
|
|
10769
|
+
if (__octaneDev && devHintsEnabled()) {
|
|
10767
10770
|
console.error(
|
|
10768
10771
|
`warmChild: fetch-tree warm walk exceeded ${WARM_DEPTH_CAP} levels \u2014 stopping speculative prefetch here (rendering is unaffected). Is a recursive component missing its termination guard?`
|
|
10769
10772
|
);
|
|
@@ -11273,7 +11276,7 @@ function initDomOperations() {
|
|
|
11273
11276
|
seedExpando(elementProto, DANGER_HTML_SPREAD_CHILD, false);
|
|
11274
11277
|
seedExpando(elementProto, DEOPT_DESC, false);
|
|
11275
11278
|
seedExpando(elementProto, DEFAULT_VALUE_BASELINE, false);
|
|
11276
|
-
if (
|
|
11279
|
+
if (__octaneDev) {
|
|
11277
11280
|
seedExpando(elementProto, "__oct_loc");
|
|
11278
11281
|
}
|
|
11279
11282
|
}
|
|
@@ -11454,14 +11457,14 @@ class HydrationCapability {
|
|
|
11454
11457
|
}
|
|
11455
11458
|
/** DEV-only: every caller is dev-gated, so prod must not retain the describer. */
|
|
11456
11459
|
describe(node) {
|
|
11457
|
-
return
|
|
11460
|
+
return !__octaneDev ? "" : describeHydrationNode(node);
|
|
11458
11461
|
}
|
|
11459
11462
|
warnStructural(loc, expected, actual) {
|
|
11460
11463
|
warnHydrationStructuralMismatch(loc, expected, actual);
|
|
11461
11464
|
}
|
|
11462
11465
|
recordTextMismatch(node, loc, server) {
|
|
11463
11466
|
if (this.staleServerValues) return;
|
|
11464
|
-
if (
|
|
11467
|
+
if (!__octaneDev && ROOT_ERROR_HANDLERS === null) return;
|
|
11465
11468
|
if (!this.textWarnings.has(node)) this.textWarnings.set(node, { loc, server });
|
|
11466
11469
|
}
|
|
11467
11470
|
flushTextWarnings() {
|
|
@@ -11470,7 +11473,7 @@ class HydrationCapability {
|
|
|
11470
11473
|
const client = (STAGED_DOM?.view(node) ?? node).nodeValue;
|
|
11471
11474
|
if (pending.server !== client) {
|
|
11472
11475
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(61)), this.rootBlock);
|
|
11473
|
-
if (
|
|
11476
|
+
if (__octaneDev)
|
|
11474
11477
|
warnHydrationValueMismatch(pending.loc, "text", pending.server, client);
|
|
11475
11478
|
}
|
|
11476
11479
|
}
|
|
@@ -11628,7 +11631,7 @@ class HydrationCapability {
|
|
|
11628
11631
|
abandonRoot(diagnostic) {
|
|
11629
11632
|
if (PRESENTATION_HYDRATION?.revision !== void 0) presentationMiss();
|
|
11630
11633
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(52)));
|
|
11631
|
-
if (
|
|
11634
|
+
if (__octaneDev && diagnostic !== void 0) {
|
|
11632
11635
|
const [loc, expected, actual] = diagnostic();
|
|
11633
11636
|
if (loc) warnHydrationStructuralMismatch(loc, expected, actual);
|
|
11634
11637
|
}
|
|
@@ -11671,7 +11674,7 @@ class HydrationCapability {
|
|
|
11671
11674
|
if (template2 === null) template2 = resolveLazyTemplate(lazy2);
|
|
11672
11675
|
if (!this.staleServerValues) {
|
|
11673
11676
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(51)));
|
|
11674
|
-
if (
|
|
11677
|
+
if (__octaneDev)
|
|
11675
11678
|
warnHydrationStructuralMismatch(
|
|
11676
11679
|
loc ?? componentSourceLoc(CURRENT_BLOCK?.body) ?? CURRENT_SCOPE?.locFile,
|
|
11677
11680
|
"a non-empty fragment",
|
|
@@ -11686,7 +11689,7 @@ class HydrationCapability {
|
|
|
11686
11689
|
if (remainder === void 0) {
|
|
11687
11690
|
const fragment = template2;
|
|
11688
11691
|
this.abandonRoot(
|
|
11689
|
-
|
|
11692
|
+
__octaneDev ? () => [
|
|
11690
11693
|
componentSourceLoc(this.rootBlock.body),
|
|
11691
11694
|
`a fragment starting with ${describeHydrationNode(getFirstChild(fragment))}`,
|
|
11692
11695
|
describeHydrationNode(cursor)
|
|
@@ -11706,7 +11709,7 @@ class HydrationCapability {
|
|
|
11706
11709
|
if (PRESENTATION_HYDRATION?.revision !== void 0) presentationMiss();
|
|
11707
11710
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(51)));
|
|
11708
11711
|
if (template2 === null) template2 = resolveLazyTemplate(lazy2);
|
|
11709
|
-
if (
|
|
11712
|
+
if (__octaneDev && loc)
|
|
11710
11713
|
warnHydrationStructuralMismatch(
|
|
11711
11714
|
loc,
|
|
11712
11715
|
describeHydrationNode(template2),
|
|
@@ -11747,7 +11750,7 @@ class HydrationCapability {
|
|
|
11747
11750
|
remainder = getNextSibling(remainder);
|
|
11748
11751
|
if (remainder === null) return;
|
|
11749
11752
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(53)), this.rootBlock);
|
|
11750
|
-
if (
|
|
11753
|
+
if (__octaneDev)
|
|
11751
11754
|
warnHydrationStructuralMismatch(
|
|
11752
11755
|
componentSourceLoc(this.rootBlock.body),
|
|
11753
11756
|
"the end of the root",
|
|
@@ -11772,7 +11775,7 @@ class HydrationCapability {
|
|
|
11772
11775
|
}
|
|
11773
11776
|
if (getNextSibling(first) !== null) {
|
|
11774
11777
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(62)), this.rootBlock);
|
|
11775
|
-
if (
|
|
11778
|
+
if (__octaneDev) {
|
|
11776
11779
|
warnHydrationStructuralMismatch(
|
|
11777
11780
|
loc || el.__oct_loc,
|
|
11778
11781
|
"the end of the text element",
|
|
@@ -11818,7 +11821,7 @@ class HydrationCapability {
|
|
|
11818
11821
|
const suppressed = isHydrationSuppressed(host);
|
|
11819
11822
|
if (text !== "" && !suppressed) {
|
|
11820
11823
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(54)));
|
|
11821
|
-
if (
|
|
11824
|
+
if (__octaneDev) {
|
|
11822
11825
|
warnHydrationStructuralMismatch(
|
|
11823
11826
|
host && host.__oct_loc,
|
|
11824
11827
|
`text ${JSON.stringify(text)}`,
|
|
@@ -11862,7 +11865,7 @@ class HydrationCapability {
|
|
|
11862
11865
|
const mode = hydrationMismatchMode(el);
|
|
11863
11866
|
if (mode === 0) return true;
|
|
11864
11867
|
if (mode === 1) return false;
|
|
11865
|
-
if (
|
|
11868
|
+
if (__octaneDev && !this.staleServerValues)
|
|
11866
11869
|
warnHydrationValueMismatch(el.__oct_loc, `attribute \`${name}\``, server, next);
|
|
11867
11870
|
return true;
|
|
11868
11871
|
}
|
|
@@ -11874,7 +11877,7 @@ class HydrationCapability {
|
|
|
11874
11877
|
if (import_dom_binding_claims.domBindingClaims.get(el)?.get("class") === rawServer) return false;
|
|
11875
11878
|
if (mode === 0) return true;
|
|
11876
11879
|
if (mode === 1) return false;
|
|
11877
|
-
if (
|
|
11880
|
+
if (__octaneDev && !this.staleServerValues)
|
|
11878
11881
|
warnHydrationValueMismatch(el.__oct_loc, "attribute `class`", server, next);
|
|
11879
11882
|
return true;
|
|
11880
11883
|
}
|
|
@@ -11931,7 +11934,7 @@ class HydrationCapability {
|
|
|
11931
11934
|
if (before === expected && hadStyleAttribute === expectsStyleAttribute) return true;
|
|
11932
11935
|
if (expectsStyleAttribute) style.cssText = expected;
|
|
11933
11936
|
else (STAGED_DOM?.view(el) ?? el).removeAttribute("style");
|
|
11934
|
-
if (mode === 2 &&
|
|
11937
|
+
if (mode === 2 && __octaneDev && !this.staleServerValues) {
|
|
11935
11938
|
warnHydrationValueMismatch(el.__oct_loc, "style", before, expected);
|
|
11936
11939
|
}
|
|
11937
11940
|
return true;
|
|
@@ -12043,7 +12046,7 @@ function clone(node, loc, partialStyles) {
|
|
|
12043
12046
|
const lazy2 = node.nodeType === void 0 ? (STAGED_DOM?.view(node) ?? node)[LAZY_TEMPLATE] : void 0;
|
|
12044
12047
|
if (lazy2 !== void 0) {
|
|
12045
12048
|
const hydration2 = activeHydration();
|
|
12046
|
-
if (
|
|
12049
|
+
if (!__octaneDev && hydration2 !== null) {
|
|
12047
12050
|
return hydration2.cloneLazy(lazy2, loc);
|
|
12048
12051
|
}
|
|
12049
12052
|
const parsed = resolveLazyTemplate(lazy2);
|
|
@@ -13085,7 +13088,7 @@ function updateDirectSignalBinding(binding) {
|
|
|
13085
13088
|
runWithBlockSignalOwner(binding.scope, () => {
|
|
13086
13089
|
const value = readSignalBinding(binding.handle);
|
|
13087
13090
|
if (!Object.is(binding.value, value)) writeDirectSignalBinding(binding, value);
|
|
13088
|
-
if (
|
|
13091
|
+
if (__octaneDev && STAGED_DOM === null && binding.target.nodeType === 1)
|
|
13089
13092
|
drainDevFormDiagnostics(binding.target);
|
|
13090
13093
|
});
|
|
13091
13094
|
} catch {
|
|
@@ -13846,7 +13849,7 @@ class FragmentInstance {
|
|
|
13846
13849
|
*/
|
|
13847
13850
|
observeUsing(observer) {
|
|
13848
13851
|
if (this._destroyed) return;
|
|
13849
|
-
if (
|
|
13852
|
+
if (__octaneDev) {
|
|
13850
13853
|
let hasText = false;
|
|
13851
13854
|
let hasElement = false;
|
|
13852
13855
|
for (const child2 of this._children) {
|
|
@@ -13874,7 +13877,7 @@ class FragmentInstance {
|
|
|
13874
13877
|
unobserveUsing(observer) {
|
|
13875
13878
|
if (this._destroyed) return;
|
|
13876
13879
|
if (this._observers === null || !this._observers.has(observer)) {
|
|
13877
|
-
if (
|
|
13880
|
+
if (__octaneDev) {
|
|
13878
13881
|
console.error(
|
|
13879
13882
|
"You are calling unobserveUsing() with an observer that is not being observed with this fragment instance. First attach the observer with observeUsing()"
|
|
13880
13883
|
);
|
|
@@ -14175,7 +14178,7 @@ function attrNamespace(name) {
|
|
|
14175
14178
|
}
|
|
14176
14179
|
function setAttribute(el, name, value) {
|
|
14177
14180
|
if (name === "innerText" || name === "textContent") return;
|
|
14178
|
-
if (
|
|
14181
|
+
if (__octaneDev && el.__oct_loc !== void 0 && !isHtmlCustomElement(el) && typeof el.__oct_custom_is !== "string") {
|
|
14179
14182
|
const warning = (0, import_aria_diagnostics.isAriaAttributeName)(name) ? (0, import_aria_diagnostics.ariaAttributeWarning)(name, el.localName) : (0, import_host_property_diagnostics.hostPropertyWarning)(name, value, el.localName, el.namespaceURI === SVG_NS);
|
|
14180
14183
|
if (warning !== null) devWarnAttributeOnce(el, name, warning);
|
|
14181
14184
|
}
|
|
@@ -14185,13 +14188,13 @@ function setAttribute(el, name, value) {
|
|
|
14185
14188
|
}
|
|
14186
14189
|
if (name === "suppressContentEditableWarning") return;
|
|
14187
14190
|
if (name === "suppressNativeChangeWarning") {
|
|
14188
|
-
if (
|
|
14191
|
+
if (__octaneDev) {
|
|
14189
14192
|
el.__oct_native_change_suppressed = value === true;
|
|
14190
14193
|
}
|
|
14191
14194
|
return;
|
|
14192
14195
|
}
|
|
14193
14196
|
if (name === "__octaneNativeChangeDiagnostic") {
|
|
14194
|
-
if (
|
|
14197
|
+
if (__octaneDev) {
|
|
14195
14198
|
setNativeChangeDiagnosticMetadata(el, value);
|
|
14196
14199
|
}
|
|
14197
14200
|
return;
|
|
@@ -14224,7 +14227,7 @@ function setAttribute(el, name, value) {
|
|
|
14224
14227
|
if (name === "autoFocus" && !isHtmlCustomElement(el)) {
|
|
14225
14228
|
return setAutoFocus(el, value);
|
|
14226
14229
|
}
|
|
14227
|
-
if (
|
|
14230
|
+
if (__octaneDev && name === "autofocus" && el.__oct_loc !== void 0) {
|
|
14228
14231
|
devWarnAttributeOnce(
|
|
14229
14232
|
el,
|
|
14230
14233
|
name,
|
|
@@ -14238,7 +14241,7 @@ function setAttribute(el, name, value) {
|
|
|
14238
14241
|
if (t === "input" || t === "textarea" || t === "select") {
|
|
14239
14242
|
return setDefaultValue(el, value);
|
|
14240
14243
|
}
|
|
14241
|
-
} else if (
|
|
14244
|
+
} else if (__octaneDev && name === "defaultvalue" && el.__oct_loc !== void 0) {
|
|
14242
14245
|
devWarnAttributeOnce(
|
|
14243
14246
|
el,
|
|
14244
14247
|
name,
|
|
@@ -14250,7 +14253,7 @@ function setAttribute(el, name, value) {
|
|
|
14250
14253
|
if (name === "defaultChecked" && el.localName === "input") {
|
|
14251
14254
|
return setDefaultChecked(el, value);
|
|
14252
14255
|
}
|
|
14253
|
-
if (
|
|
14256
|
+
if (__octaneDev && name === "defaultchecked" && el.__oct_loc !== void 0) {
|
|
14254
14257
|
devWarnAttributeOnce(
|
|
14255
14258
|
el,
|
|
14256
14259
|
name,
|
|
@@ -14295,7 +14298,7 @@ function setAttribute(el, name, value) {
|
|
|
14295
14298
|
return;
|
|
14296
14299
|
}
|
|
14297
14300
|
if (!import_constants.VALID_ATTR_NAME.test(name)) {
|
|
14298
|
-
if (
|
|
14301
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
14299
14302
|
devWarnAttributeOnce(el, name, `Invalid attribute name: \`${name}\` (skipped).`);
|
|
14300
14303
|
}
|
|
14301
14304
|
return;
|
|
@@ -14363,7 +14366,7 @@ function devValidateHostProps(el, props) {
|
|
|
14363
14366
|
}
|
|
14364
14367
|
}
|
|
14365
14368
|
function setPlainAttribute(el, name, value) {
|
|
14366
|
-
if (
|
|
14369
|
+
if (__octaneDev) return setAttribute(el, name, value);
|
|
14367
14370
|
const type = typeof value;
|
|
14368
14371
|
const next = value == null || type === "boolean" || type === "function" || type === "symbol" ? null : String(value);
|
|
14369
14372
|
const hydration = activeHydration();
|
|
@@ -14373,7 +14376,7 @@ function setPlainAttribute(el, name, value) {
|
|
|
14373
14376
|
else (STAGED_DOM?.view(el) ?? el).setAttribute(name, next);
|
|
14374
14377
|
}
|
|
14375
14378
|
function setURLAttribute(el, name, value) {
|
|
14376
|
-
if (
|
|
14379
|
+
if (__octaneDev) return setAttribute(el, name, value);
|
|
14377
14380
|
const type = typeof value;
|
|
14378
14381
|
let next = value == null || type === "boolean" || type === "function" || type === "symbol" ? null : String(value);
|
|
14379
14382
|
if (next !== null) {
|
|
@@ -14393,7 +14396,7 @@ function setStringData(el, name, value) {
|
|
|
14393
14396
|
if (value == null || t === "function" || t === "symbol") {
|
|
14394
14397
|
next = null;
|
|
14395
14398
|
} else {
|
|
14396
|
-
if (
|
|
14399
|
+
if (__octaneDev && t === "object" && el.__oct_loc !== void 0 && value.toString === Object.prototype.toString) {
|
|
14397
14400
|
devWarnAttributeOnce(
|
|
14398
14401
|
el,
|
|
14399
14402
|
name,
|
|
@@ -14409,7 +14412,7 @@ function setStringData(el, name, value) {
|
|
|
14409
14412
|
else (STAGED_DOM?.view(el) ?? el).setAttribute(name, next);
|
|
14410
14413
|
}
|
|
14411
14414
|
function setBooleanAttribute(el, name, value) {
|
|
14412
|
-
if (
|
|
14415
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
14413
14416
|
const warning = (0, import_host_property_diagnostics.booleanAttributeStringWarning)(name, value);
|
|
14414
14417
|
if (warning !== null) devWarnAttributeOnce(el, name, warning);
|
|
14415
14418
|
}
|
|
@@ -14422,7 +14425,7 @@ function setBooleanAttribute(el, name, value) {
|
|
|
14422
14425
|
else (STAGED_DOM?.view(el) ?? el).setAttribute(name, next);
|
|
14423
14426
|
}
|
|
14424
14427
|
function setAriaAttribute(el, name, value) {
|
|
14425
|
-
if (
|
|
14428
|
+
if (__octaneDev && el.__oct_loc !== void 0 && !isHtmlCustomElement(el)) {
|
|
14426
14429
|
const warning = (0, import_aria_diagnostics.ariaAttributeWarning)(name, el.localName);
|
|
14427
14430
|
if (warning !== null) devWarnAttributeOnce(el, name, warning);
|
|
14428
14431
|
}
|
|
@@ -14441,7 +14444,7 @@ function coerceAttrValue(el, name, value) {
|
|
|
14441
14444
|
if (t === "boolean" && (0, import_constants.isEnumeratedBooleanAttr)(name)) return value ? "true" : "false";
|
|
14442
14445
|
if (t === "boolean" && name.startsWith("data-")) return value ? "true" : "false";
|
|
14443
14446
|
if (t === "function" || t === "symbol") {
|
|
14444
|
-
if (
|
|
14447
|
+
if (__octaneDev && el.__oct_loc !== void 0 && !isHtmlCustomElement(el)) {
|
|
14445
14448
|
if (t === "function" && name.length > 2 && name.charCodeAt(0) === 111 && name.charCodeAt(1) === 110) {
|
|
14446
14449
|
devWarnAttributeOnce(
|
|
14447
14450
|
el,
|
|
@@ -14461,7 +14464,7 @@ function coerceAttrValue(el, name, value) {
|
|
|
14461
14464
|
if (!isHtmlCustomElement(el)) {
|
|
14462
14465
|
const lower = name.toLowerCase();
|
|
14463
14466
|
if (import_constants.BOOLEAN_ATTR_PROPS.has(lower)) {
|
|
14464
|
-
if (
|
|
14467
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
14465
14468
|
const warning = (0, import_host_property_diagnostics.booleanAttributeStringWarning)(name, value);
|
|
14466
14469
|
if (warning !== null) devWarnAttributeOnce(el, name, warning);
|
|
14467
14470
|
}
|
|
@@ -14471,7 +14474,7 @@ function coerceAttrValue(el, name, value) {
|
|
|
14471
14474
|
return value ? "" : null;
|
|
14472
14475
|
}
|
|
14473
14476
|
if (t === "boolean") {
|
|
14474
|
-
if (
|
|
14477
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
14475
14478
|
devWarnAttributeOnce(
|
|
14476
14479
|
el,
|
|
14477
14480
|
name,
|
|
@@ -14489,14 +14492,14 @@ function coerceAttrValue(el, name, value) {
|
|
|
14489
14492
|
}
|
|
14490
14493
|
}
|
|
14491
14494
|
if (value == null || value === false) return null;
|
|
14492
|
-
if (
|
|
14495
|
+
if (__octaneDev && t === "object" && el.__oct_loc !== void 0 && value.toString === Object.prototype.toString) {
|
|
14493
14496
|
devWarnAttributeOnce(
|
|
14494
14497
|
el,
|
|
14495
14498
|
name,
|
|
14496
14499
|
`The provided \`${name}\` attribute is an object; it will stringify to "[object Object]". Pass a string (or a value with a meaningful toString) instead.`
|
|
14497
14500
|
);
|
|
14498
14501
|
}
|
|
14499
|
-
if (
|
|
14502
|
+
if (__octaneDev && t === "number" && Number.isNaN(value) && el.__oct_loc !== void 0) {
|
|
14500
14503
|
devWarnAttributeOnce(
|
|
14501
14504
|
el,
|
|
14502
14505
|
name,
|
|
@@ -14504,7 +14507,7 @@ function coerceAttrValue(el, name, value) {
|
|
|
14504
14507
|
);
|
|
14505
14508
|
}
|
|
14506
14509
|
let v;
|
|
14507
|
-
if (
|
|
14510
|
+
if (__octaneDev && el.__oct_loc !== void 0 && !isHtmlCustomElement(el)) {
|
|
14508
14511
|
try {
|
|
14509
14512
|
v = value === true ? "" : String(value);
|
|
14510
14513
|
} catch (error) {
|
|
@@ -14515,7 +14518,7 @@ function coerceAttrValue(el, name, value) {
|
|
|
14515
14518
|
v = value === true ? "" : String(value);
|
|
14516
14519
|
}
|
|
14517
14520
|
if (v === "" && (name === "src" || name === "href" && el.nodeName !== "A" && el.nodeName !== "AREA" || name === "data" && el.nodeName === "OBJECT")) {
|
|
14518
|
-
if (
|
|
14521
|
+
if (__octaneDev && el.__oct_loc !== void 0 && !isHtmlCustomElement(el)) {
|
|
14519
14522
|
devWarnAttributeOnce(el, "empty:" + name, (0, import_host_property_diagnostics.emptyResourceUrlWarning)(name));
|
|
14520
14523
|
}
|
|
14521
14524
|
return null;
|
|
@@ -14644,7 +14647,7 @@ function applyStyleValue(el, style, value, prev) {
|
|
|
14644
14647
|
function applyStyleProperty(el, style, name, value) {
|
|
14645
14648
|
const prop = (0, import_css.styleName)(name);
|
|
14646
14649
|
let s;
|
|
14647
|
-
if (
|
|
14650
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
14648
14651
|
(0, import_css.devWarnStyleProperty)(name, value, false);
|
|
14649
14652
|
try {
|
|
14650
14653
|
s = (0, import_constants.cssStyleValue)(name, value);
|
|
@@ -14705,11 +14708,11 @@ function removeHostProp(el, name, prevValue) {
|
|
|
14705
14708
|
} else if (name === "suppressHydrationWarning") {
|
|
14706
14709
|
el.__oct_suppress = false;
|
|
14707
14710
|
} else if (name === "suppressNativeChangeWarning") {
|
|
14708
|
-
if (
|
|
14711
|
+
if (__octaneDev) {
|
|
14709
14712
|
el.__oct_native_change_suppressed = false;
|
|
14710
14713
|
}
|
|
14711
14714
|
} else if (name === "__octaneNativeChangeDiagnostic") {
|
|
14712
|
-
if (
|
|
14715
|
+
if (__octaneDev) setNativeChangeDiagnosticMetadata(el, void 0);
|
|
14713
14716
|
} else {
|
|
14714
14717
|
const actionName = formActionAttributeName(el, name);
|
|
14715
14718
|
if (actionName !== null) {
|
|
@@ -14798,7 +14801,7 @@ function resolveHostPropSources(el, sources, props, readStyle) {
|
|
|
14798
14801
|
if (previous.lastOrder >= writer.lastOrder) continue;
|
|
14799
14802
|
needsWinningOrderSort = true;
|
|
14800
14803
|
}
|
|
14801
|
-
writer.name =
|
|
14804
|
+
writer.name = __octaneDev && (rawName === "tabIndex" || rawName === "htmlFor") ? rawName : name;
|
|
14802
14805
|
values.set(identity, writer);
|
|
14803
14806
|
}
|
|
14804
14807
|
if (classMerges !== null) {
|
|
@@ -14917,7 +14920,7 @@ function updateSignalHostPropSources(binding) {
|
|
|
14917
14920
|
binding.hasNestedChildren,
|
|
14918
14921
|
binding.readStyle
|
|
14919
14922
|
);
|
|
14920
|
-
if (
|
|
14923
|
+
if (__octaneDev && STAGED_DOM === null)
|
|
14921
14924
|
drainDevFormDiagnostics(binding.element);
|
|
14922
14925
|
});
|
|
14923
14926
|
} catch {
|
|
@@ -15227,17 +15230,17 @@ function isAggregatedFormControlProp(el, name) {
|
|
|
15227
15230
|
return false;
|
|
15228
15231
|
}
|
|
15229
15232
|
function setSpread(el, value, prev, mountScope, skipDangerouslySetInnerHTML = false, skipFormControls = false) {
|
|
15230
|
-
if (
|
|
15233
|
+
if (__octaneDev && value != null) {
|
|
15231
15234
|
devValidateAriaProps(el, Object(value));
|
|
15232
15235
|
devValidateHostProps(el, Object(value));
|
|
15233
15236
|
}
|
|
15234
15237
|
if (value != null && Object.prototype.propertyIsEnumerable.call(Object(value), "suppressHydrationWarning")) {
|
|
15235
15238
|
el.__oct_suppress = value.suppressHydrationWarning === true;
|
|
15236
15239
|
}
|
|
15237
|
-
if (
|
|
15240
|
+
if (__octaneDev && value != null && Object.prototype.propertyIsEnumerable.call(Object(value), "suppressNativeChangeWarning")) {
|
|
15238
15241
|
el.__oct_native_change_suppressed = value.suppressNativeChangeWarning === true;
|
|
15239
15242
|
}
|
|
15240
|
-
if (
|
|
15243
|
+
if (__octaneDev && value != null && Object.prototype.propertyIsEnumerable.call(Object(value), "__octaneNativeChangeDiagnostic")) {
|
|
15241
15244
|
setNativeChangeDiagnosticMetadata(el, value.__octaneNativeChangeDiagnostic);
|
|
15242
15245
|
}
|
|
15243
15246
|
if (!skipDangerouslySetInnerHTML) {
|
|
@@ -15265,7 +15268,7 @@ function setSpread(el, value, prev, mountScope, skipDangerouslySetInnerHTML = fa
|
|
|
15265
15268
|
}
|
|
15266
15269
|
}
|
|
15267
15270
|
if (value == null) {
|
|
15268
|
-
if (
|
|
15271
|
+
if (__octaneDev) queueDevFormDiagnostic(el, mountScope);
|
|
15269
15272
|
return;
|
|
15270
15273
|
}
|
|
15271
15274
|
const hydration = prev === void 0 ? activeHydration() : null;
|
|
@@ -15320,14 +15323,14 @@ function setSpread(el, value, prev, mountScope, skipDangerouslySetInnerHTML = fa
|
|
|
15320
15323
|
setEventHandler(
|
|
15321
15324
|
el,
|
|
15322
15325
|
ev.key,
|
|
15323
|
-
|
|
15326
|
+
__octaneDev ? devEventListener(k, v) : v
|
|
15324
15327
|
);
|
|
15325
15328
|
continue;
|
|
15326
15329
|
}
|
|
15327
15330
|
if (prev !== void 0 && k === "autoFocus" && !isHtmlCustomElement(el)) continue;
|
|
15328
15331
|
setAttribute(el, k, v);
|
|
15329
15332
|
}
|
|
15330
|
-
if (
|
|
15333
|
+
if (__octaneDev) queueDevFormDiagnostic(el, mountScope);
|
|
15331
15334
|
}
|
|
15332
15335
|
const _injectedStyles = /* @__PURE__ */ new Set();
|
|
15333
15336
|
function journalHeadEventListeners(state) {
|
|
@@ -15465,7 +15468,7 @@ function headBlock(scope, slot, key, tag, attrs, text) {
|
|
|
15465
15468
|
const ev = k.length > 2 && k[0] === "o" && k[1] === "n" ? eventSlot(k) : null;
|
|
15466
15469
|
if (ev !== null) {
|
|
15467
15470
|
const v = attrs[k];
|
|
15468
|
-
const listener =
|
|
15471
|
+
const listener = __octaneDev ? devEventListener(k, v) : v;
|
|
15469
15472
|
const hs = state.handlers;
|
|
15470
15473
|
const prevH = hs?.get(k);
|
|
15471
15474
|
if (prevH === listener) continue;
|
|
@@ -15564,7 +15567,7 @@ function isHandlerBundle(slot) {
|
|
|
15564
15567
|
return typeof slot === "object" && slot !== null && slot[EVENT_SLOT_KIND] === HANDLER_BUNDLE_KIND;
|
|
15565
15568
|
}
|
|
15566
15569
|
function devEventListener(name, listener) {
|
|
15567
|
-
if (
|
|
15570
|
+
if (!__octaneDev) return listener;
|
|
15568
15571
|
if (listener == null || typeof listener === "function") return listener;
|
|
15569
15572
|
if (listener === false) {
|
|
15570
15573
|
console.error(
|
|
@@ -15580,7 +15583,7 @@ If you used to conditionally omit it with ${name}={condition && value}, pass ${n
|
|
|
15580
15583
|
return { [EVENT_SLOT_KIND]: INVALID_EVENT_LISTENER_KIND, name, value: listener };
|
|
15581
15584
|
}
|
|
15582
15585
|
function isInvalidEventListenerSlot(slot) {
|
|
15583
|
-
return
|
|
15586
|
+
return __octaneDev && typeof slot === "object" && slot !== null && slot[EVENT_SLOT_KIND] === INVALID_EVENT_LISTENER_KIND;
|
|
15584
15587
|
}
|
|
15585
15588
|
function isUsableEventSlot(slot) {
|
|
15586
15589
|
return typeof slot === "function" || isHandlerBundle(slot);
|
|
@@ -16249,7 +16252,7 @@ function fireEventSlot(slot, event, recorded) {
|
|
|
16249
16252
|
slot(event);
|
|
16250
16253
|
return;
|
|
16251
16254
|
}
|
|
16252
|
-
if (
|
|
16255
|
+
if (__octaneDev && isInvalidEventListenerSlot(slot)) {
|
|
16253
16256
|
invokeInvalidEventListener(`\`${slot.name}\``, slot.value, event);
|
|
16254
16257
|
return;
|
|
16255
16258
|
}
|
|
@@ -16550,7 +16553,7 @@ function requestFormReset(form) {
|
|
|
16550
16553
|
(PENDING_FORM_RESETS ??= /* @__PURE__ */ new Set()).add(form);
|
|
16551
16554
|
return;
|
|
16552
16555
|
}
|
|
16553
|
-
if (
|
|
16556
|
+
if (__octaneDev)
|
|
16554
16557
|
console.error(
|
|
16555
16558
|
"requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
|
|
16556
16559
|
);
|
|
@@ -16566,7 +16569,7 @@ function flushFormResets() {
|
|
|
16566
16569
|
function setFormAction(el, name, value, _prev) {
|
|
16567
16570
|
if (typeof value === "function") {
|
|
16568
16571
|
(STAGED_DOM?.view(el) ?? el).$$formAction = value;
|
|
16569
|
-
if (
|
|
16572
|
+
if (__octaneDev) queueFormActionAuthoringDiagnostic(el);
|
|
16570
16573
|
if (!el.$$formSubmitWired) {
|
|
16571
16574
|
el.$$formSubmitWired = true;
|
|
16572
16575
|
FORM_SUBMIT_DRIVER = handleFormSubmit;
|
|
@@ -16634,7 +16637,7 @@ let activationCheckable = null;
|
|
|
16634
16637
|
let CHECKED_RESTORE = null;
|
|
16635
16638
|
let SELECT_SYNCS = [];
|
|
16636
16639
|
let SELECT_DEFAULT_SYNCS = [];
|
|
16637
|
-
let DEV_FORM_CHECKS =
|
|
16640
|
+
let DEV_FORM_CHECKS = !__octaneDev ? null : [];
|
|
16638
16641
|
const DEV_FORM_CHECK_MARK = /* @__PURE__ */ Symbol("octane.devFormCheck");
|
|
16639
16642
|
const DEV_FORM_CHECK_LINEAR_LIMIT = 8;
|
|
16640
16643
|
let DEV_FORM_CHECK_GENERATION = 1;
|
|
@@ -16772,7 +16775,7 @@ function valueNeedsWrite(el, raw) {
|
|
|
16772
16775
|
return (STAGED_DOM?.view(el) ?? el).value !== toControlledString(raw);
|
|
16773
16776
|
}
|
|
16774
16777
|
function devWarnControlledFlip(el, toControlled) {
|
|
16775
|
-
if (
|
|
16778
|
+
if (!__octaneDev) return;
|
|
16776
16779
|
if (el.__oct_loc === void 0) return;
|
|
16777
16780
|
console.error(
|
|
16778
16781
|
`A component is changing ${toControlled ? "an uncontrolled" : "a controlled"} ${el.localName} to be ${toControlled ? "controlled" : "uncontrolled"}. This is likely caused by the value changing from ${toControlled ? "undefined to a defined value" : "a defined value to undefined"}, which should not happen. Decide between using a controlled or uncontrolled ${el.localName} for the lifetime of the component (controlled: \`value\`/\`checked\`; uncontrolled: \`defaultValue\`/\`defaultChecked\`).`
|
|
@@ -16814,7 +16817,7 @@ function hasPotentialFormDiagnostic(el) {
|
|
|
16814
16817
|
return ctrl !== void 0 && ctrl.v !== UNCONTROLLED || isUsableEventSlot(el.$$change) || isUsableEventSlot((STAGED_DOM?.view(el) ?? el)["$$capture:change"]);
|
|
16815
16818
|
}
|
|
16816
16819
|
function queueDevFormDiagnostic(el, scope, force = false) {
|
|
16817
|
-
if (
|
|
16820
|
+
if (!__octaneDev) return;
|
|
16818
16821
|
const q = DEV_FORM_CHECKS;
|
|
16819
16822
|
if (q === null || !force && !hasDevFormDiagnosticContext(el, scope)) return;
|
|
16820
16823
|
if (!force && !hasPotentialFormDiagnostic(el)) return;
|
|
@@ -16833,7 +16836,7 @@ function queueDevFormDiagnostic(el, scope, force = false) {
|
|
|
16833
16836
|
host[DEV_FORM_CHECK_MARK] = DEV_FORM_CHECK_GENERATION;
|
|
16834
16837
|
}
|
|
16835
16838
|
function queueFormAuthoringDiagnostic(el, kind, selected) {
|
|
16836
|
-
if (
|
|
16839
|
+
if (!__octaneDev) return;
|
|
16837
16840
|
const state = ensureDevFormDiagnosticState(el);
|
|
16838
16841
|
if (kind === "textarea-children") state.authoringChildren = "textarea";
|
|
16839
16842
|
else if (kind === "option-children") state.authoringChildren = "option";
|
|
@@ -16844,22 +16847,22 @@ function queueFormAuthoringDiagnostic(el, kind, selected) {
|
|
|
16844
16847
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0, true);
|
|
16845
16848
|
}
|
|
16846
16849
|
function queueFormActionAuthoringDiagnostic(el) {
|
|
16847
|
-
if (
|
|
16850
|
+
if (!__octaneDev) return;
|
|
16848
16851
|
if (!hasDevFormDiagnosticContext(el, CURRENT_SCOPE ?? void 0)) return;
|
|
16849
16852
|
ensureDevFormDiagnosticState(el);
|
|
16850
16853
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0, true);
|
|
16851
16854
|
}
|
|
16852
16855
|
function queueNativeChangeDiagnostic(el) {
|
|
16853
|
-
if (
|
|
16856
|
+
if (__octaneDev)
|
|
16854
16857
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0, true);
|
|
16855
16858
|
}
|
|
16856
16859
|
function markNativeChangeDiagnosticStatic(el) {
|
|
16857
|
-
if (
|
|
16860
|
+
if (!__octaneDev) return;
|
|
16858
16861
|
ensureDevFormDiagnosticState(el).staticNativeChange = true;
|
|
16859
16862
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0, true);
|
|
16860
16863
|
}
|
|
16861
16864
|
function setNativeChangeDiagnosticMetadata(el, value) {
|
|
16862
|
-
if (
|
|
16865
|
+
if (!__octaneDev) return;
|
|
16863
16866
|
if (value === "static") {
|
|
16864
16867
|
markNativeChangeDiagnosticStatic(el);
|
|
16865
16868
|
return;
|
|
@@ -16876,17 +16879,17 @@ function setValue(el, value) {
|
|
|
16876
16879
|
const first = !ctrl.sawV;
|
|
16877
16880
|
ctrl.sawV = true;
|
|
16878
16881
|
if (value == null) {
|
|
16879
|
-
if (
|
|
16882
|
+
if (__octaneDev && !first && ctrl.v !== UNCONTROLLED)
|
|
16880
16883
|
devWarnControlledFlip(el, false);
|
|
16881
16884
|
ctrl.v = UNCONTROLLED;
|
|
16882
|
-
if (
|
|
16885
|
+
if (__octaneDev)
|
|
16883
16886
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0);
|
|
16884
16887
|
return;
|
|
16885
16888
|
}
|
|
16886
16889
|
const s = toControlledString(value);
|
|
16887
16890
|
if (first) {
|
|
16888
16891
|
ctrl.v = value;
|
|
16889
|
-
if (
|
|
16892
|
+
if (__octaneDev)
|
|
16890
16893
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0);
|
|
16891
16894
|
const hydration = activeHydration();
|
|
16892
16895
|
if (hydration !== null && !hydration.isFresh(el)) return;
|
|
@@ -16895,11 +16898,11 @@ function setValue(el, value) {
|
|
|
16895
16898
|
(STAGED_DOM?.view(input) ?? input).defaultValue = s;
|
|
16896
16899
|
return;
|
|
16897
16900
|
}
|
|
16898
|
-
if (
|
|
16901
|
+
if (__octaneDev && ctrl.v === UNCONTROLLED)
|
|
16899
16902
|
devWarnControlledFlip(el, true);
|
|
16900
16903
|
const prev = ctrl.v;
|
|
16901
16904
|
ctrl.v = value;
|
|
16902
|
-
if (
|
|
16905
|
+
if (__octaneDev) queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0);
|
|
16903
16906
|
if (!(ctrl.composing && Object.is(prev, value)) && valueNeedsWrite(input, value))
|
|
16904
16907
|
(STAGED_DOM?.view(input) ?? input).value = s;
|
|
16905
16908
|
if ((STAGED_DOM?.view(input) ?? input).defaultValue !== s) {
|
|
@@ -16913,10 +16916,10 @@ function setCheckedState(input, value, ctrl) {
|
|
|
16913
16916
|
const first = !ctrl.sawC;
|
|
16914
16917
|
ctrl.sawC = true;
|
|
16915
16918
|
if (value == null) {
|
|
16916
|
-
if (
|
|
16919
|
+
if (__octaneDev && !first && ctrl.c !== -1)
|
|
16917
16920
|
devWarnControlledFlip(input, false);
|
|
16918
16921
|
ctrl.c = -1;
|
|
16919
|
-
if (
|
|
16922
|
+
if (__octaneDev)
|
|
16920
16923
|
queueDevFormDiagnostic(input, CURRENT_SCOPE ?? void 0);
|
|
16921
16924
|
return;
|
|
16922
16925
|
}
|
|
@@ -16924,7 +16927,7 @@ function setCheckedState(input, value, ctrl) {
|
|
|
16924
16927
|
CHECKED_RESTORE ??= restoreCheckedState;
|
|
16925
16928
|
if (first) {
|
|
16926
16929
|
ctrl.c = b;
|
|
16927
|
-
if (
|
|
16930
|
+
if (__octaneDev)
|
|
16928
16931
|
queueDevFormDiagnostic(input, CURRENT_SCOPE ?? void 0);
|
|
16929
16932
|
const hydration = activeHydration();
|
|
16930
16933
|
if (hydration !== null && !hydration.isFresh(input)) {
|
|
@@ -16937,10 +16940,10 @@ function setCheckedState(input, value, ctrl) {
|
|
|
16937
16940
|
ctrl.sawDC = true;
|
|
16938
16941
|
return;
|
|
16939
16942
|
}
|
|
16940
|
-
if (
|
|
16943
|
+
if (__octaneDev && ctrl.c === -1) devWarnControlledFlip(input, true);
|
|
16941
16944
|
const changed = b !== ctrl.c;
|
|
16942
16945
|
ctrl.c = b;
|
|
16943
|
-
if (
|
|
16946
|
+
if (__octaneDev)
|
|
16944
16947
|
queueDevFormDiagnostic(input, CURRENT_SCOPE ?? void 0);
|
|
16945
16948
|
if ((changed || !inActivationWindow(input)) && (STAGED_DOM?.view(input) ?? input).checked !== b)
|
|
16946
16949
|
(STAGED_DOM?.view(input) ?? input).checked = b;
|
|
@@ -16971,18 +16974,18 @@ function setSelectValue(el, value) {
|
|
|
16971
16974
|
const first = !ctrl.sawV;
|
|
16972
16975
|
ctrl.sawV = true;
|
|
16973
16976
|
if (value == null) {
|
|
16974
|
-
if (
|
|
16977
|
+
if (__octaneDev && !first && ctrl.sv !== null)
|
|
16975
16978
|
devWarnControlledFlip(el, false);
|
|
16976
16979
|
ctrl.sv = null;
|
|
16977
|
-
if (
|
|
16980
|
+
if (__octaneDev)
|
|
16978
16981
|
queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0);
|
|
16979
16982
|
return;
|
|
16980
16983
|
}
|
|
16981
|
-
if (
|
|
16984
|
+
if (__octaneDev && !first && ctrl.sv === null)
|
|
16982
16985
|
devWarnControlledFlip(el, true);
|
|
16983
16986
|
if ((STAGED_DOM?.view(sel) ?? sel).multiple) {
|
|
16984
16987
|
if (!Array.isArray(value)) {
|
|
16985
|
-
if (
|
|
16988
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
16986
16989
|
console.error(
|
|
16987
16990
|
"The `value` prop supplied to <select> must be an array if `multiple` is true."
|
|
16988
16991
|
);
|
|
@@ -16994,7 +16997,7 @@ function setSelectValue(el, value) {
|
|
|
16994
16997
|
ctrl.sv = set;
|
|
16995
16998
|
} else {
|
|
16996
16999
|
if (Array.isArray(value)) {
|
|
16997
|
-
if (
|
|
17000
|
+
if (__octaneDev && el.__oct_loc !== void 0) {
|
|
16998
17001
|
console.error(
|
|
16999
17002
|
"The `value` prop supplied to <select> must be a scalar value if `multiple` is false."
|
|
17000
17003
|
);
|
|
@@ -17003,7 +17006,7 @@ function setSelectValue(el, value) {
|
|
|
17003
17006
|
}
|
|
17004
17007
|
ctrl.sv = toControlledString(value);
|
|
17005
17008
|
}
|
|
17006
|
-
if (
|
|
17009
|
+
if (__octaneDev) queueDevFormDiagnostic(el, CURRENT_SCOPE ?? void 0);
|
|
17007
17010
|
const hydration = activeHydration();
|
|
17008
17011
|
if (hydration !== null && !hydration.isFresh(el)) return;
|
|
17009
17012
|
projectSelectValue(sel, ctrl.sv, false);
|
|
@@ -17217,7 +17220,7 @@ function applyFormControlValues(el, tag, value, defaultValue, checked, defaultCh
|
|
|
17217
17220
|
journalBag();
|
|
17218
17221
|
}
|
|
17219
17222
|
ctrl.formSeen = true;
|
|
17220
|
-
if (
|
|
17223
|
+
if (__octaneDev && hasDevFormDiagnosticContext(el, CURRENT_SCOPE ?? void 0)) {
|
|
17221
17224
|
const diagnostic = ensureDevFormDiagnosticState(el);
|
|
17222
17225
|
diagnostic.authoringProps = { value, defaultValue, checked, defaultChecked, multiple };
|
|
17223
17226
|
if (value !== void 0 && defaultValue !== void 0 || tag === "input" && checked !== void 0 && defaultChecked !== void 0) {
|
|
@@ -17330,7 +17333,7 @@ function formDiagnosticOutcome(el) {
|
|
|
17330
17333
|
};
|
|
17331
17334
|
}
|
|
17332
17335
|
function drainDevFormDiagnostics(target) {
|
|
17333
|
-
if (
|
|
17336
|
+
if (!__octaneDev) return;
|
|
17334
17337
|
let q = DEV_FORM_CHECKS;
|
|
17335
17338
|
if (q === null || q.length === 0) return;
|
|
17336
17339
|
if (target !== void 0) {
|
|
@@ -17888,7 +17891,7 @@ const SCOPED_CHILDREN_PROPERTY = {
|
|
|
17888
17891
|
};
|
|
17889
17892
|
function hasElementConfigKey(config) {
|
|
17890
17893
|
if (config == null || typeof config !== "object" && typeof config !== "function") return false;
|
|
17891
|
-
if (
|
|
17894
|
+
if (__octaneDev && import_has_own.hasOwnProp.call(config, "key")) {
|
|
17892
17895
|
const own = Object.getOwnPropertyDescriptor(config, "key");
|
|
17893
17896
|
if (own?.get != null && own.get.isReactWarning) return false;
|
|
17894
17897
|
}
|
|
@@ -17981,7 +17984,7 @@ function scopedElementRecord(type, props, key, ref, resolve, invocationSite) {
|
|
|
17981
17984
|
return descriptor;
|
|
17982
17985
|
}
|
|
17983
17986
|
function finalizeElementDescriptor(descriptor) {
|
|
17984
|
-
if (
|
|
17987
|
+
if (__octaneDev) {
|
|
17985
17988
|
Object.freeze(descriptor.props);
|
|
17986
17989
|
Object.freeze(descriptor);
|
|
17987
17990
|
}
|
|
@@ -18026,6 +18029,12 @@ const SCOPED_VALUE_PROPERTIES = {
|
|
|
18026
18029
|
function createScopedValue(readElement) {
|
|
18027
18030
|
return scopedValueDescriptor(createScopedResolver(readElement));
|
|
18028
18031
|
}
|
|
18032
|
+
function isRenderCall(scope) {
|
|
18033
|
+
return scope === CURRENT_SCOPE && scope !== null;
|
|
18034
|
+
}
|
|
18035
|
+
function deferRecord(read, ...locals) {
|
|
18036
|
+
return createScopedValue(() => read(...locals));
|
|
18037
|
+
}
|
|
18029
18038
|
function nativeCreateScopedValue(readElement) {
|
|
18030
18039
|
return scopedValueDescriptor(createNativeScopedResolver(readElement));
|
|
18031
18040
|
}
|
|
@@ -18042,7 +18051,7 @@ function scopedValueDescriptor(resolve) {
|
|
|
18042
18051
|
"__octaneInvocationSite",
|
|
18043
18052
|
SCOPED_VALUE_PROPERTIES.__octaneInvocationSite
|
|
18044
18053
|
);
|
|
18045
|
-
if (
|
|
18054
|
+
if (__octaneDev) Object.freeze(descriptor);
|
|
18046
18055
|
return descriptor;
|
|
18047
18056
|
}
|
|
18048
18057
|
function createScopedElement(type, props, readChildren, invocationSite) {
|
|
@@ -18091,7 +18100,7 @@ function createElementFromConfig(invocationSite, type, props, children = EMPTY_A
|
|
|
18091
18100
|
let kids = hasPositional ? children.length === 1 ? children[0] : children : src?.children;
|
|
18092
18101
|
if (children.length > 1) {
|
|
18093
18102
|
POSITIONAL_CHILDREN.add(children);
|
|
18094
|
-
if (
|
|
18103
|
+
if (__octaneDev) Object.freeze(children);
|
|
18095
18104
|
}
|
|
18096
18105
|
const p = copyElementConfig(src);
|
|
18097
18106
|
if (hasPositional) p.children = kids;
|
|
@@ -18556,7 +18565,7 @@ function componentSlotImpl(outputHandler, parentScope, slotKey, domParent, body,
|
|
|
18556
18565
|
const stale = hydrationCursor;
|
|
18557
18566
|
const loc = siteLoc(parentScope, slotKey);
|
|
18558
18567
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(55)));
|
|
18559
|
-
if (
|
|
18568
|
+
if (__octaneDev && loc) {
|
|
18560
18569
|
warnHydrationStructuralMismatch(loc, "a component range", describeHydrationNode(stale));
|
|
18561
18570
|
}
|
|
18562
18571
|
let node = stale;
|
|
@@ -19119,7 +19128,7 @@ function deoptKey(item, index) {
|
|
|
19119
19128
|
const element = item != null && item.$$kind === import_runtime_tags.ELEMENT_TAG;
|
|
19120
19129
|
if (item?.$$kind === import_runtime_tags.PORTAL_TAG && item.key != null) return item.key;
|
|
19121
19130
|
if (element && item.key != null && !ELEMENTS_MISSING_LIST_KEY.has(item)) return item.key;
|
|
19122
|
-
if (element &&
|
|
19131
|
+
if (element && __octaneDev && activeHydration() === null) {
|
|
19123
19132
|
warnMissingListKey(CURRENT_BLOCK);
|
|
19124
19133
|
}
|
|
19125
19134
|
return element && item.key != null ? item.key : index;
|
|
@@ -19162,7 +19171,7 @@ function applyDeoptProp(el, name, v, ownerBlock) {
|
|
|
19162
19171
|
setEventHandler(
|
|
19163
19172
|
el,
|
|
19164
19173
|
ev.key,
|
|
19165
|
-
|
|
19174
|
+
__octaneDev ? devEventListener(name, v) : v
|
|
19166
19175
|
);
|
|
19167
19176
|
if (ev.capture) {
|
|
19168
19177
|
if (!_delegatedCapture.has(ev.type)) delegateCaptureEvents([ev.type]);
|
|
@@ -19190,7 +19199,7 @@ function markInputCheckedness(input) {
|
|
|
19190
19199
|
function applyDeoptProps(el, props, ownerBlock) {
|
|
19191
19200
|
if (props == null) {
|
|
19192
19201
|
if (el.localName === "input") markInputCheckedness(el);
|
|
19193
|
-
if (
|
|
19202
|
+
if (__octaneDev) queueDevFormDiagnostic(el, ownerBlock);
|
|
19194
19203
|
return;
|
|
19195
19204
|
}
|
|
19196
19205
|
let needsCheckedInitialization = el.localName === "input";
|
|
@@ -19206,7 +19215,7 @@ function applyDeoptProps(el, props, ownerBlock) {
|
|
|
19206
19215
|
applyDeoptProp(el, name, value, ownerBlock);
|
|
19207
19216
|
}
|
|
19208
19217
|
if (needsCheckedInitialization) markInputCheckedness(el);
|
|
19209
|
-
if (
|
|
19218
|
+
if (__octaneDev) queueDevFormDiagnostic(el, ownerBlock);
|
|
19210
19219
|
}
|
|
19211
19220
|
function patchDeoptProps(el, prevProps, nextProps, ownerBlock) {
|
|
19212
19221
|
const prevRef = prevProps != null ? prevProps.ref : void 0;
|
|
@@ -19236,7 +19245,7 @@ function patchDeoptProps(el, prevProps, nextProps, ownerBlock) {
|
|
|
19236
19245
|
}
|
|
19237
19246
|
}
|
|
19238
19247
|
}
|
|
19239
|
-
if (
|
|
19248
|
+
if (__octaneDev) queueDevFormDiagnostic(el, ownerBlock);
|
|
19240
19249
|
}
|
|
19241
19250
|
function hostComponent(scope, slot, tag, props, childrenBody, anchor) {
|
|
19242
19251
|
const block = scope.block;
|
|
@@ -19294,7 +19303,7 @@ function applyHostProps(el, props, scope, state) {
|
|
|
19294
19303
|
state.props = props;
|
|
19295
19304
|
if (props == null) {
|
|
19296
19305
|
if (needsCheckedInitialization) markInputCheckedness(el);
|
|
19297
|
-
if (
|
|
19306
|
+
if (__octaneDev) queueDevFormDiagnostic(el, scope);
|
|
19298
19307
|
return;
|
|
19299
19308
|
}
|
|
19300
19309
|
for (const name in props) {
|
|
@@ -19331,18 +19340,18 @@ function applyHostProps(el, props, scope, state) {
|
|
|
19331
19340
|
} else if (!_delegated.has(ev.type)) {
|
|
19332
19341
|
delegateEvents([ev.type]);
|
|
19333
19342
|
}
|
|
19334
|
-
const handler =
|
|
19343
|
+
const handler = __octaneDev ? devEventListener(name, v) : v;
|
|
19335
19344
|
if (!compareLive || (STAGED_DOM?.view(el) ?? el)[ev.key] !== handler)
|
|
19336
19345
|
setEventHandler(el, ev.key, handler);
|
|
19337
19346
|
} else if (prev === void 0 || name !== "autoFocus" || isHtmlCustomElement(el)) {
|
|
19338
|
-
if (compareLive && (
|
|
19347
|
+
if (compareLive && (!__octaneDev || el.__oct_loc === void 0) && typeof v === "string" && (name === "id" || name === "title" || name === "role" || name === "for" || name === "htmlFor" || name.startsWith("data-") || name.startsWith("aria-")) && (STAGED_DOM?.view(el) ?? el).getAttribute(name === "htmlFor" ? "for" : name) === v)
|
|
19339
19348
|
continue;
|
|
19340
19349
|
setAttribute(el, name, v);
|
|
19341
19350
|
}
|
|
19342
19351
|
}
|
|
19343
19352
|
}
|
|
19344
19353
|
if (needsCheckedInitialization) markInputCheckedness(el);
|
|
19345
|
-
if (
|
|
19354
|
+
if (__octaneDev) queueDevFormDiagnostic(el, scope);
|
|
19346
19355
|
}
|
|
19347
19356
|
const DEOPT_DESC = /* @__PURE__ */ Symbol("octane.deoptDesc");
|
|
19348
19357
|
function hasDeoptOwnedChild(el) {
|
|
@@ -20008,7 +20017,7 @@ function hostElementBody(d, block) {
|
|
|
20008
20017
|
return;
|
|
20009
20018
|
}
|
|
20010
20019
|
if (el === null && hydration !== null && hydration.node !== null) {
|
|
20011
|
-
if (
|
|
20020
|
+
if (__octaneDev) {
|
|
20012
20021
|
const mmLoc = domNode(hydration.node).parentNode?.__oct_loc;
|
|
20013
20022
|
if (mmLoc)
|
|
20014
20023
|
hydration.warnStructural(mmLoc, `<${String(d.type)}>`, hydration.describe(hydration.node));
|
|
@@ -20093,7 +20102,7 @@ function hostStringTagBody(d, block) {
|
|
|
20093
20102
|
}
|
|
20094
20103
|
if (hydration !== null && hydration.node !== null) {
|
|
20095
20104
|
noteRecoverableHydrationError(() => new Error((0, import_error_codes_client_generated.formatClientError)(51)));
|
|
20096
|
-
if (
|
|
20105
|
+
if (__octaneDev) {
|
|
20097
20106
|
const mmLoc = domNode(hydration.node).parentNode?.__oct_loc;
|
|
20098
20107
|
if (mmLoc) hydration.warnStructural(mmLoc, `<${tag}>`, hydration.describe(hydration.node));
|
|
20099
20108
|
}
|
|
@@ -20326,7 +20335,7 @@ function mapSlot(scopeOrItems, slotOrMethod, domParent, items, method, native, c
|
|
|
20326
20335
|
callback = native;
|
|
20327
20336
|
native = mapSlot(items, method);
|
|
20328
20337
|
}
|
|
20329
|
-
if (
|
|
20338
|
+
if (__octaneDev && ((flags ?? 0) & 64) !== 0 && items?.length > 0)
|
|
20330
20339
|
warnMissingListKey(scopeOrItems.block);
|
|
20331
20340
|
if (ownEnd === 1) ownEnd = true;
|
|
20332
20341
|
if (native === true) {
|
|
@@ -20889,7 +20898,7 @@ function childSlot(parentScope, slotKey, domParent, value, anchor, ownEnd, ownsH
|
|
|
20889
20898
|
if (!unframedMatch) {
|
|
20890
20899
|
const rootHydration = hydration;
|
|
20891
20900
|
rootHydration.abandonRoot(
|
|
20892
|
-
|
|
20901
|
+
__octaneDev ? () => [
|
|
20893
20902
|
componentSourceLoc(parentBlock.body),
|
|
20894
20903
|
preparedList === null ? "a renderable root" : "a renderable list range",
|
|
20895
20904
|
rootHydration.describe(cursor)
|
|
@@ -21814,8 +21823,11 @@ function hmr(fn) {
|
|
|
21814
21823
|
}
|
|
21815
21824
|
};
|
|
21816
21825
|
function wrapper(props, scope, extra) {
|
|
21817
|
-
if (scope
|
|
21818
|
-
|
|
21826
|
+
if (scope === CURRENT_SCOPE && scope !== null) {
|
|
21827
|
+
meta.liveBlocks.add(scope.block);
|
|
21828
|
+
return meta.fn(props, scope, extra);
|
|
21829
|
+
}
|
|
21830
|
+
return Reflect.apply(meta.fn, this, arguments);
|
|
21819
21831
|
}
|
|
21820
21832
|
Object.defineProperty(wrapper, HMR, {
|
|
21821
21833
|
get() {
|
|
@@ -24113,7 +24125,7 @@ function useActionState(action, initialState, permalinkOrSlot, slot) {
|
|
|
24113
24125
|
}
|
|
24114
24126
|
};
|
|
24115
24127
|
const dispatch = ((payload) => {
|
|
24116
|
-
const outsideTransition =
|
|
24128
|
+
const outsideTransition = __octaneDev && transitionActionBatchForUpdate() === null && ACTIVE_SUBMIT_DISPATCH?.intercepted !== true;
|
|
24117
24129
|
slotRef.pendingCount++;
|
|
24118
24130
|
setPending(true);
|
|
24119
24131
|
slotRef.chain = slotRef.chain.then(
|
|
@@ -24126,7 +24138,7 @@ function useActionState(action, initialState, permalinkOrSlot, slot) {
|
|
|
24126
24138
|
let p;
|
|
24127
24139
|
try {
|
|
24128
24140
|
const result = slotRef.action(prevState, payload);
|
|
24129
|
-
if (
|
|
24141
|
+
if (__octaneDev && outsideTransition && result != null && typeof result.then === "function") {
|
|
24130
24142
|
console.error(
|
|
24131
24143
|
"An async useActionState action was dispatched outside a transition or action. Use an action/formAction prop or wrap the dispatch in startTransition."
|
|
24132
24144
|
);
|
|
@@ -24247,7 +24259,7 @@ function useOptimistic(passthrough, updateFnOrSlot, slot) {
|
|
|
24247
24259
|
updateFn,
|
|
24248
24260
|
armed: false,
|
|
24249
24261
|
add: (value) => {
|
|
24250
|
-
if (
|
|
24262
|
+
if (__octaneDev && TRANSITION_DEPTH === 0 && ASYNC_TRANSITION_COUNT === 0) {
|
|
24251
24263
|
console.error(
|
|
24252
24264
|
"An optimistic update was dispatched outside a transition or action. Wrap it in startTransition or call it from an action."
|
|
24253
24265
|
);
|
|
@@ -24866,7 +24878,7 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
24866
24878
|
if (innerEnd !== state.end && getNextSibling(innerEnd) !== state.end) {
|
|
24867
24879
|
if (PRESENTATION_HYDRATION?.revision !== void 0)
|
|
24868
24880
|
throw new Error((0, import_error_codes_client_generated.formatClientError)(75));
|
|
24869
|
-
if (
|
|
24881
|
+
if (__octaneDev) {
|
|
24870
24882
|
const mmLoc = siteLoc(parentScope, slotKey);
|
|
24871
24883
|
if (mmLoc)
|
|
24872
24884
|
hydration.warnStructural(
|
|
@@ -24910,7 +24922,7 @@ function renderBranchSlot(parentScope, slotKey, state, domParent, next, body, ma
|
|
|
24910
24922
|
}
|
|
24911
24923
|
} else if (hydration !== null && getNextSibling(state.start) !== state.end) {
|
|
24912
24924
|
if (PRESENTATION_HYDRATION?.revision !== void 0) throw new Error((0, import_error_codes_client_generated.formatClientError)(75));
|
|
24913
|
-
if (
|
|
24925
|
+
if (__octaneDev) {
|
|
24914
24926
|
const mmLoc = siteLoc(parentScope, slotKey);
|
|
24915
24927
|
if (mmLoc)
|
|
24916
24928
|
hydration.warnStructural(
|
|
@@ -25724,7 +25736,7 @@ function forBlock(parentScope, slotKey, domParent, inputItems, getKey, itemBody,
|
|
|
25724
25736
|
if (TRANSITION_JOURNAL !== null) journalForSlot(state);
|
|
25725
25737
|
let suspendForEmpty = false;
|
|
25726
25738
|
if (hydration !== null && (serverMarkerState === 1 || serverMarkerState === -1 && hydration.isOpen(getNextSibling(state.start)))) {
|
|
25727
|
-
if (
|
|
25739
|
+
if (__octaneDev) {
|
|
25728
25740
|
const mmLoc = siteLoc(parentScope, slotKey) || domParent.__oct_loc;
|
|
25729
25741
|
if (mmLoc) hydration.warnStructural(mmLoc, "an empty list (@empty)", "a populated list");
|
|
25730
25742
|
}
|
|
@@ -25760,7 +25772,7 @@ function forBlock(parentScope, slotKey, domParent, inputItems, getKey, itemBody,
|
|
|
25760
25772
|
state.emptyBlock = null;
|
|
25761
25773
|
}
|
|
25762
25774
|
if (!isEmpty && hydration !== null && (serverMarkerState === 0 || serverMarkerState === -1 && ((flags || 0) & 16) === 0 && getNextSibling(state.start) !== null && getNextSibling(state.start) !== state.end && !hydration.isOpen(getNextSibling(state.start)))) {
|
|
25763
|
-
if (
|
|
25775
|
+
if (__octaneDev) {
|
|
25764
25776
|
const mmLoc = siteLoc(parentScope, slotKey) || domParent.__oct_loc;
|
|
25765
25777
|
if (mmLoc) hydration.warnStructural(mmLoc, "a populated list", "an empty list (@empty)");
|
|
25766
25778
|
}
|
|
@@ -26178,7 +26190,7 @@ function mountItemsLinear(parentBlock, state, items, keySource, itemBody, single
|
|
|
26178
26190
|
const newLen = items.length;
|
|
26179
26191
|
const observeKey = parentBlock.idState.renderOwner?.signalOwner !== void 0 ? trackSignalRetryListKeys(parentBlock, state, newLen, keySource) : void 0;
|
|
26180
26192
|
if (newLen === 0) return;
|
|
26181
|
-
if (
|
|
26193
|
+
if (__octaneDev) {
|
|
26182
26194
|
keySource = checkedListKey(keySource, normalizeKey);
|
|
26183
26195
|
normalizeKey = false;
|
|
26184
26196
|
}
|
|
@@ -26361,7 +26373,7 @@ function reconcileKeyed(parentBlock, state, items, keySource, itemBody, pure, si
|
|
|
26361
26373
|
return;
|
|
26362
26374
|
}
|
|
26363
26375
|
const observeKey = parentBlock.idState.renderOwner?.signalOwner !== void 0 ? trackSignalRetryListKeys(parentBlock, state, newLen, keySource) : void 0;
|
|
26364
|
-
if (
|
|
26376
|
+
if (__octaneDev) {
|
|
26365
26377
|
keySource = checkedListKey(keySource, normalizeKey);
|
|
26366
26378
|
normalizeKey = false;
|
|
26367
26379
|
}
|
|
@@ -26819,7 +26831,7 @@ function mountItem(parentBlock, parentNode, anchor, item, index, key, body, forS
|
|
|
26819
26831
|
hydration.node = domNode(block3.endMarker)?.nextSibling ?? getNextSibling(root);
|
|
26820
26832
|
return block3;
|
|
26821
26833
|
}
|
|
26822
|
-
if (
|
|
26834
|
+
if (__octaneDev) {
|
|
26823
26835
|
const mmLoc = parentNode.__oct_loc;
|
|
26824
26836
|
if (mmLoc)
|
|
26825
26837
|
hydration.warnStructural(mmLoc, "another list item", hydration.describe(hydration.node));
|
|
@@ -26840,7 +26852,7 @@ function mountItem(parentBlock, parentNode, anchor, item, index, key, body, forS
|
|
|
26840
26852
|
);
|
|
26841
26853
|
}
|
|
26842
26854
|
if (!hydration.isOpen(hydration.node)) {
|
|
26843
|
-
if (
|
|
26855
|
+
if (__octaneDev) {
|
|
26844
26856
|
const mmLoc = parentNode.__oct_loc;
|
|
26845
26857
|
if (mmLoc)
|
|
26846
26858
|
hydration.warnStructural(mmLoc, "another list item", hydration.describe(hydration.node));
|
|
@@ -27527,7 +27539,7 @@ function clearRootContainer(container) {
|
|
|
27527
27539
|
}
|
|
27528
27540
|
}
|
|
27529
27541
|
function claimRootContainer(container) {
|
|
27530
|
-
if (
|
|
27542
|
+
if (!__octaneDev) return null;
|
|
27531
27543
|
const owners = ROOT_CONTAINER_OWNERS ??= /* @__PURE__ */ new WeakMap();
|
|
27532
27544
|
if (owners.has(container)) {
|
|
27533
27545
|
console.error(
|
|
@@ -27545,7 +27557,7 @@ function releaseRootContainer(container, token) {
|
|
|
27545
27557
|
}
|
|
27546
27558
|
function warnCreateRootElementOption(options) {
|
|
27547
27559
|
if (isElementDescriptor(options)) {
|
|
27548
|
-
if (
|
|
27560
|
+
if (__octaneDev) {
|
|
27549
27561
|
console.error(
|
|
27550
27562
|
"You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"
|
|
27551
27563
|
);
|
|
@@ -27555,7 +27567,7 @@ function warnCreateRootElementOption(options) {
|
|
|
27555
27567
|
return options;
|
|
27556
27568
|
}
|
|
27557
27569
|
function warnRootRenderSecondArgument(second, container) {
|
|
27558
|
-
if (
|
|
27570
|
+
if (!__octaneDev) return;
|
|
27559
27571
|
if (typeof second === "function") {
|
|
27560
27572
|
console.error(
|
|
27561
27573
|
"does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
|
|
@@ -27571,14 +27583,14 @@ function warnRootRenderSecondArgument(second, container) {
|
|
|
27571
27583
|
}
|
|
27572
27584
|
}
|
|
27573
27585
|
function warnRootUnmountArgument() {
|
|
27574
|
-
if (
|
|
27586
|
+
if (__octaneDev) {
|
|
27575
27587
|
console.error(
|
|
27576
27588
|
"does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
|
|
27577
27589
|
);
|
|
27578
27590
|
}
|
|
27579
27591
|
}
|
|
27580
27592
|
function warnRootLifecycleUnmount() {
|
|
27581
|
-
if (
|
|
27593
|
+
if (__octaneDev) {
|
|
27582
27594
|
console.error(
|
|
27583
27595
|
"Attempted to synchronously unmount a root while Octane was already rendering. Octane cannot finish unmounting the root until the current render has completed, which may lead to a race condition."
|
|
27584
27596
|
);
|
|
@@ -27586,7 +27598,7 @@ function warnRootLifecycleUnmount() {
|
|
|
27586
27598
|
}
|
|
27587
27599
|
let HTML_NESTING_WARNINGS = null;
|
|
27588
27600
|
function devHtmlNesting(childTag, ancestors, childLocation, ancestorLocation) {
|
|
27589
|
-
if (
|
|
27601
|
+
if (__octaneDev) {
|
|
27590
27602
|
const activeBlock = CURRENT_SCOPE?.block ?? CURRENT_BLOCK;
|
|
27591
27603
|
let message = null;
|
|
27592
27604
|
if (ancestors.length === 0) {
|
|
@@ -27631,7 +27643,7 @@ function devHtmlNesting(childTag, ancestors, childLocation, ancestorLocation) {
|
|
|
27631
27643
|
}
|
|
27632
27644
|
}
|
|
27633
27645
|
function validateRootHtmlNesting(container, body) {
|
|
27634
|
-
if (
|
|
27646
|
+
if (__octaneDev) {
|
|
27635
27647
|
if (container.nodeType !== 1) return;
|
|
27636
27648
|
const element = container;
|
|
27637
27649
|
if (componentSourceLoc(body) === void 0 || element.namespaceURI !== "http://www.w3.org/1999/xhtml" || element.localName === "div" || element.localName === "body" || element.localName === "html" || element.localName.includes("-")) {
|
|
@@ -27785,7 +27797,7 @@ function makeRoot(container, rootBlock, currentBody, currentKey, idState, output
|
|
|
27785
27797
|
try {
|
|
27786
27798
|
renderBlock(mountedRoot);
|
|
27787
27799
|
if (QUEUE.length > 0) drainHydrationRenderPhaseUpdates(mountedRoot);
|
|
27788
|
-
if (
|
|
27800
|
+
if (__octaneDev) {
|
|
27789
27801
|
validateRootHtmlNesting(container, body);
|
|
27790
27802
|
}
|
|
27791
27803
|
} catch (error) {
|
|
@@ -27852,7 +27864,7 @@ function makeRoot(container, rootBlock, currentBody, currentKey, idState, output
|
|
|
27852
27864
|
} else {
|
|
27853
27865
|
body = ROOT_RENDERABLE_BODY;
|
|
27854
27866
|
if (typeof bodyOrElement === "symbol") {
|
|
27855
|
-
if (
|
|
27867
|
+
if (__octaneDev) {
|
|
27856
27868
|
console.error(
|
|
27857
27869
|
`Symbols are not valid as an Octane child.
|
|
27858
27870
|
root.render(${String(bodyOrElement)})`
|
|
@@ -27900,7 +27912,7 @@ function makeRoot(container, rootBlock, currentBody, currentKey, idState, output
|
|
|
27900
27912
|
if (!inFlush && CURRENT_BLOCK === null && !inNestedUpdateCallback() && EFFECT_EVENT_LIFECYCLE_DEPTH === 0) {
|
|
27901
27913
|
UPDATE_CHAIN_ID++;
|
|
27902
27914
|
}
|
|
27903
|
-
if (
|
|
27915
|
+
if (__octaneDev && !renderOwner.preservePresentation && (inFlush || CURRENT_BLOCK !== null || EFFECT_BODY_DEPTH > 0 || EFFECT_EVENT_LIFECYCLE_DEPTH > 0)) {
|
|
27904
27916
|
warnRootLifecycleUnmount();
|
|
27905
27917
|
}
|
|
27906
27918
|
unmounted = true;
|
|
@@ -28032,7 +28044,7 @@ function hydrateRootWithOutputHandler(container, bodyOrElement, propsOrOptions,
|
|
|
28032
28044
|
}
|
|
28033
28045
|
rootOptions = propsOrOptions;
|
|
28034
28046
|
} else if (bodyOrElement === void 0) {
|
|
28035
|
-
if (
|
|
28047
|
+
if (__octaneDev) {
|
|
28036
28048
|
console.error(
|
|
28037
28049
|
"Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
|
|
28038
28050
|
);
|
|
@@ -28415,7 +28427,7 @@ function applyHintAttrs(el, opts) {
|
|
|
28415
28427
|
}
|
|
28416
28428
|
}
|
|
28417
28429
|
function preload(href, options) {
|
|
28418
|
-
if (
|
|
28430
|
+
if (__octaneDev) {
|
|
28419
28431
|
const warning = (0, import_resource_hint_diagnostics.resourceHintWarning)("preload", href, options);
|
|
28420
28432
|
if (warning !== null) console.error(warning);
|
|
28421
28433
|
}
|
|
@@ -28452,7 +28464,7 @@ function preload(href, options) {
|
|
|
28452
28464
|
});
|
|
28453
28465
|
}
|
|
28454
28466
|
function preinit(href, options) {
|
|
28455
|
-
if (
|
|
28467
|
+
if (__octaneDev) {
|
|
28456
28468
|
const warning = (0, import_resource_hint_diagnostics.resourceHintWarning)("preinit", href, options);
|
|
28457
28469
|
if (warning !== null) console.error(warning);
|
|
28458
28470
|
}
|
|
@@ -28476,7 +28488,7 @@ function preinit(href, options) {
|
|
|
28476
28488
|
}
|
|
28477
28489
|
}
|
|
28478
28490
|
function preconnect(href, options) {
|
|
28479
|
-
if (
|
|
28491
|
+
if (__octaneDev) {
|
|
28480
28492
|
const warning = (0, import_resource_hint_diagnostics.resourceHintWarning)("preconnect", href, options);
|
|
28481
28493
|
if (warning !== null) console.error(warning);
|
|
28482
28494
|
}
|
|
@@ -28497,7 +28509,7 @@ function preconnect(href, options) {
|
|
|
28497
28509
|
});
|
|
28498
28510
|
}
|
|
28499
28511
|
function prefetchDNS(href) {
|
|
28500
|
-
if (
|
|
28512
|
+
if (__octaneDev) {
|
|
28501
28513
|
const warning = (0, import_resource_hint_diagnostics.resourceHintWarning)("prefetchDNS", href, arguments[1], arguments.length > 1);
|
|
28502
28514
|
if (warning !== null) console.error(warning);
|
|
28503
28515
|
}
|
|
@@ -28512,7 +28524,7 @@ function prefetchDNS(href) {
|
|
|
28512
28524
|
});
|
|
28513
28525
|
}
|
|
28514
28526
|
function preloadModule(href, options) {
|
|
28515
|
-
if (
|
|
28527
|
+
if (__octaneDev) {
|
|
28516
28528
|
const warning = (0, import_resource_hint_diagnostics.resourceHintWarning)("preloadModule", href, options);
|
|
28517
28529
|
if (warning !== null) console.error(warning);
|
|
28518
28530
|
}
|
|
@@ -28533,7 +28545,7 @@ function preloadModule(href, options) {
|
|
|
28533
28545
|
});
|
|
28534
28546
|
}
|
|
28535
28547
|
function preinitModule(href, options) {
|
|
28536
|
-
if (
|
|
28548
|
+
if (__octaneDev) {
|
|
28537
28549
|
const warning = (0, import_resource_hint_diagnostics.resourceHintWarning)("preinitModule", href, options);
|
|
28538
28550
|
if (warning !== null) console.error(warning);
|
|
28539
28551
|
}
|
|
@@ -28641,7 +28653,7 @@ function warnInvalidStylesheetResource(reason) {
|
|
|
28641
28653
|
);
|
|
28642
28654
|
}
|
|
28643
28655
|
function stylesheetResource(attrs, invalidReason) {
|
|
28644
|
-
if (
|
|
28656
|
+
if (__octaneDev && invalidReason !== void 0) {
|
|
28645
28657
|
warnInvalidStylesheetResource(invalidReason);
|
|
28646
28658
|
return;
|
|
28647
28659
|
}
|
|
@@ -28665,13 +28677,13 @@ function styleResource(attrs, css, development) {
|
|
|
28665
28677
|
if (typeof href !== "string" || href === "") return;
|
|
28666
28678
|
const state = resourceState();
|
|
28667
28679
|
if (state.sheets.has(href)) return;
|
|
28668
|
-
if (
|
|
28680
|
+
if (__octaneDev && development === true && hasHeadHint("preload:style:" + href)) {
|
|
28669
28681
|
console.error(
|
|
28670
28682
|
'A <style> resource with href "' + href + '" follows a stylesheet preload for the same href. Inline styles cannot consume a stylesheet preload; remove the preload or use a stylesheet link.'
|
|
28671
28683
|
);
|
|
28672
28684
|
}
|
|
28673
28685
|
const precedence = attrs.precedence == null ? "" : String(attrs.precedence);
|
|
28674
|
-
if (
|
|
28686
|
+
if (__octaneDev && /<\/style/i.test(css)) {
|
|
28675
28687
|
console.error(
|
|
28676
28688
|
'A <style href precedence> resource contains "</style"; server rendering will skip it. Load it as a stylesheet link instead.'
|
|
28677
28689
|
);
|
|
@@ -28789,6 +28801,7 @@ function scriptResource(attrs) {
|
|
|
28789
28801
|
createRoot,
|
|
28790
28802
|
createScopedElement,
|
|
28791
28803
|
createScopedValue,
|
|
28804
|
+
deferRecord,
|
|
28792
28805
|
delegateCaptureEvents,
|
|
28793
28806
|
delegateEvents,
|
|
28794
28807
|
descriptorChildren,
|
|
@@ -28846,6 +28859,7 @@ function scriptResource(attrs) {
|
|
|
28846
28859
|
isChildrenBlock,
|
|
28847
28860
|
isHydratingStyle,
|
|
28848
28861
|
isInActScope,
|
|
28862
|
+
isRenderCall,
|
|
28849
28863
|
isValidElement,
|
|
28850
28864
|
keyedForBlock,
|
|
28851
28865
|
lazy,
|