octane 0.2.12 → 0.2.13
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/README.md +5 -0
- package/dist/behavior-root.d.ts +13 -3
- package/dist/behavior-root.js +28 -5
- package/dist/cjs/behavior-root.cjs +32 -6
- package/dist/cjs/class-names.cjs +49 -0
- package/dist/cjs/constants.cjs +9 -0
- package/dist/cjs/css.cjs +6 -27
- package/dist/cjs/data-encoding.cjs +160 -0
- package/dist/cjs/dom-binding-handoff.cjs +93 -0
- package/dist/cjs/dom-binding-protocol.cjs +115 -0
- package/dist/cjs/dom-binding-styles.cjs +292 -0
- package/dist/cjs/dom-bindings.cjs +700 -0
- package/dist/cjs/dom-focused-move.cjs +66 -0
- package/dist/cjs/dom-tables.cjs +4 -94
- package/dist/cjs/error-codes.client.generated.cjs +33 -0
- package/dist/cjs/error-codes.server.generated.cjs +19 -0
- package/dist/cjs/hydration/control-capture.cjs +244 -0
- package/dist/cjs/hydration/event-capture.cjs +125 -43
- package/dist/cjs/hydration/interaction-config.cjs +50 -2
- package/dist/cjs/hydration-markers.cjs +37 -0
- package/dist/cjs/independent-hydration-protocol.cjs +106 -0
- package/dist/cjs/index.cjs +6 -0
- package/dist/cjs/runtime.cjs +2791 -215
- package/dist/cjs/runtime.server.cjs +716 -76
- package/dist/cjs/server/early-signals.cjs +45 -0
- package/dist/cjs/server/index.cjs +44 -0
- package/dist/cjs/server/rpc-batch.cjs +149 -0
- package/dist/cjs/server/rpc-stream.cjs +146 -0
- package/dist/cjs/server/rpc.cjs +34 -15
- package/dist/cjs/server/signal-query-observation.cjs +158 -0
- package/dist/cjs/server/streamed-region.cjs +52 -0
- package/dist/cjs/server/streamed-signals.cjs +512 -0
- package/dist/cjs/server-call.cjs +103 -0
- package/dist/cjs/server-rpc-batch-client.cjs +141 -0
- package/dist/cjs/server-rpc-client.cjs +94 -27
- package/dist/cjs/server-rpc-protocol.cjs +141 -0
- package/dist/cjs/server-rpc-stream-client.cjs +118 -0
- package/dist/cjs/signals/actions.cjs +474 -0
- package/dist/cjs/signals/client.cjs +4 -1
- package/dist/cjs/signals/computations.cjs +460 -0
- package/dist/cjs/signals/control-binding.cjs +368 -0
- package/dist/cjs/signals/derived-facade.cjs +50 -0
- package/dist/cjs/signals/document-owner.cjs +71 -0
- package/dist/cjs/signals/early-values.cjs +155 -0
- package/dist/cjs/signals/encoding.cjs +6 -95
- package/dist/cjs/signals/engine.cjs +276 -12
- package/dist/cjs/signals/errors.cjs +18 -0
- package/dist/cjs/signals/facade.cjs +477 -0
- package/dist/cjs/signals/graph.cjs +163 -20
- package/dist/cjs/signals/handle-protocol.cjs +36 -0
- package/dist/cjs/signals/index.cjs +81 -2
- package/dist/cjs/signals/native-read-client.cjs +10 -0
- package/dist/cjs/signals/owner-context.cjs +112 -0
- package/dist/cjs/signals/query-attempt-observer.cjs +68 -0
- package/dist/cjs/signals/query-facade.cjs +72 -0
- package/dist/cjs/signals/read-protocol.cjs +32 -0
- package/dist/cjs/signals/requests.cjs +287 -14
- package/dist/cjs/signals/scalar-computations.cjs +76 -0
- package/dist/cjs/signals/server.cjs +4 -1
- package/dist/cjs/signals/transition-candidate.cjs +567 -0
- package/dist/cjs/signals/transition-state.cjs +106 -0
- package/dist/cjs/signals/types.cjs +50 -0
- package/dist/cjs/stream-protocol.cjs +3 -0
- package/dist/cjs/streamed-signals-protocol.cjs +159 -0
- package/dist/cjs/style-values.cjs +122 -0
- package/dist/cjs/version.cjs +1 -1
- package/dist/class-names.d.ts +5 -0
- package/dist/class-names.js +25 -0
- package/dist/compiler/bundler.js +34 -6
- package/dist/compiler/compile.js +2234 -559
- package/dist/compiler/dom-binding-program.js +935 -0
- package/dist/compiler/dom-binding-request.js +57 -0
- package/dist/compiler/dom-bindings.js +2245 -0
- package/dist/compiler/hook-deps.js +26 -0
- package/dist/compiler/hydrate-boundaries.js +358 -15
- package/dist/compiler/index.d.ts +38 -1
- package/dist/compiler/index.js +1 -0
- package/dist/compiler/native-attribute-reads.js +127 -0
- package/dist/compiler/native-read-diagnostics.js +48 -9
- package/dist/compiler/native-read-types.js +55 -32
- package/dist/compiler/server-context.js +118 -0
- package/dist/compiler/signal-attempt-reads.js +479 -0
- package/dist/compiler/signal-declarations.js +557 -0
- package/dist/compiler/signal-start-reads.js +413 -0
- package/dist/compiler/slot-hooks.js +57 -10
- package/dist/compiler/template-ir.js +200 -0
- package/dist/compiler/typescript.d.ts +2 -0
- package/dist/compiler/typescript.js +2 -0
- package/dist/compiler/vite.d.ts +3 -1
- package/dist/compiler/vite.js +122 -4
- package/dist/compiler/volar.d.ts +6 -1
- package/dist/compiler/volar.js +674 -143
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +10 -0
- package/dist/css.d.ts +2 -5
- package/dist/css.js +2 -23
- package/dist/data-encoding.d.ts +9 -0
- package/dist/data-encoding.js +134 -0
- package/dist/dom-binding-classes.d.ts +15 -0
- package/dist/dom-binding-classes.js +129 -0
- package/dist/dom-binding-controls.d.ts +2 -0
- package/dist/dom-binding-controls.js +6 -0
- package/dist/dom-binding-handoff.d.ts +55 -0
- package/dist/dom-binding-handoff.js +62 -0
- package/dist/dom-binding-program.d.ts +300 -0
- package/dist/dom-binding-program.js +1625 -0
- package/dist/dom-binding-projections.d.ts +15 -0
- package/dist/dom-binding-projections.js +187 -0
- package/dist/dom-binding-protocol.d.ts +13 -0
- package/dist/dom-binding-protocol.js +88 -0
- package/dist/dom-binding-signals.d.ts +21 -0
- package/dist/dom-binding-signals.js +109 -0
- package/dist/dom-binding-styles.d.ts +17 -0
- package/dist/dom-binding-styles.js +272 -0
- package/dist/dom-bindings.d.ts +89 -0
- package/dist/dom-bindings.js +670 -0
- package/dist/dom-focused-move.d.ts +6 -0
- package/dist/dom-focused-move.js +42 -0
- package/dist/dom-tables.d.ts +1 -3
- package/dist/dom-tables.js +1 -91
- package/dist/error-codes.client.generated.d.ts +9 -0
- package/dist/error-codes.client.generated.js +33 -0
- package/dist/error-codes.server.generated.d.ts +5 -0
- package/dist/error-codes.server.generated.js +19 -0
- package/dist/hydration/control-capture.d.ts +62 -0
- package/dist/hydration/control-capture.js +223 -0
- package/dist/hydration/document-lifecycle.d.ts +23 -0
- package/dist/hydration/document-lifecycle.js +80 -0
- package/dist/hydration/event-capture.d.ts +20 -1
- package/dist/hydration/event-capture.js +128 -42
- package/dist/hydration/independent-island.d.ts +45 -0
- package/dist/hydration/independent-island.js +233 -0
- package/dist/hydration/index.d.ts +8 -1
- package/dist/hydration/index.js +55 -1
- package/dist/hydration/interaction-config.d.ts +5 -0
- package/dist/hydration/interaction-config.js +44 -1
- package/dist/hydration/stream-delivery.d.ts +32 -0
- package/dist/hydration/stream-delivery.js +333 -0
- package/dist/hydration/stream-receiver.d.ts +26 -0
- package/dist/hydration/stream-receiver.js +204 -0
- package/dist/hydration/stream-result-receiver.d.ts +70 -0
- package/dist/hydration/stream-result-receiver.js +246 -0
- package/dist/hydration/streamed-signals.d.ts +44 -0
- package/dist/hydration/streamed-signals.js +186 -0
- package/dist/hydration/types.d.ts +6 -0
- package/dist/hydration-markers.d.ts +7 -0
- package/dist/hydration-markers.js +10 -0
- package/dist/independent-hydration-protocol.d.ts +31 -0
- package/dist/independent-hydration-protocol.js +80 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/internal/signal-read.d.ts +1 -0
- package/dist/internal/signal-read.js +4 -0
- package/dist/jsx-runtime.d.ts +45 -6
- package/dist/public-types.d.ts +15 -1
- package/dist/runtime.d.ts +259 -21
- package/dist/runtime.js +2812 -220
- package/dist/runtime.server.d.ts +86 -6
- package/dist/runtime.server.js +712 -76
- package/dist/server/early-signals.d.ts +14 -0
- package/dist/server/early-signals.js +34 -0
- package/dist/server/index.d.ts +10 -2
- package/dist/server/index.js +48 -1
- package/dist/server/rpc-batch.d.ts +17 -0
- package/dist/server/rpc-batch.js +129 -0
- package/dist/server/rpc-stream.d.ts +9 -0
- package/dist/server/rpc-stream.js +125 -0
- package/dist/server/rpc.d.ts +5 -1
- package/dist/server/rpc.js +37 -13
- package/dist/server/signal-query-observation.d.ts +3 -0
- package/dist/server/signal-query-observation.js +134 -0
- package/dist/server/streamed-region.d.ts +15 -0
- package/dist/server/streamed-region.js +30 -0
- package/dist/server/streamed-signals.d.ts +45 -0
- package/dist/server/streamed-signals.js +488 -0
- package/dist/server-call.d.ts +41 -0
- package/dist/server-call.js +75 -0
- package/dist/server-rpc-batch-client.d.ts +7 -0
- package/dist/server-rpc-batch-client.js +119 -0
- package/dist/server-rpc-client.d.ts +3 -1
- package/dist/server-rpc-client.js +99 -27
- package/dist/server-rpc-protocol.d.ts +47 -0
- package/dist/server-rpc-protocol.js +109 -0
- package/dist/server-rpc-stream-client.d.ts +5 -0
- package/dist/server-rpc-stream-client.js +98 -0
- package/dist/signals/actions.d.ts +12 -0
- package/dist/signals/actions.js +466 -0
- package/dist/signals/client.d.ts +2 -0
- package/dist/signals/client.js +1 -0
- package/dist/signals/computations.d.ts +37 -0
- package/dist/signals/computations.js +455 -0
- package/dist/signals/control-binding.d.ts +31 -0
- package/dist/signals/control-binding.js +353 -0
- package/dist/signals/derived-facade.d.ts +3 -0
- package/dist/signals/derived-facade.js +25 -0
- package/dist/signals/document-owner.d.ts +10 -0
- package/dist/signals/document-owner.js +43 -0
- package/dist/signals/early-values.d.ts +24 -0
- package/dist/signals/early-values.js +124 -0
- package/dist/signals/encoding.d.ts +1 -3
- package/dist/signals/encoding.js +3 -93
- package/dist/signals/engine.d.ts +53 -4
- package/dist/signals/engine.js +275 -16
- package/dist/signals/errors.d.ts +7 -0
- package/dist/signals/errors.js +16 -0
- package/dist/signals/facade.d.ts +74 -0
- package/dist/signals/facade.js +452 -0
- package/dist/signals/graph.d.ts +50 -5
- package/dist/signals/graph.js +170 -19
- package/dist/signals/handle-protocol.d.ts +4 -0
- package/dist/signals/handle-protocol.js +11 -0
- package/dist/signals/index.d.ts +12 -3
- package/dist/signals/index.js +71 -2
- package/dist/signals/native-read-client.d.ts +3 -0
- package/dist/signals/native-read-client.js +10 -0
- package/dist/signals/owner-context.d.ts +22 -0
- package/dist/signals/owner-context.js +77 -0
- package/dist/signals/query-attempt-observer.d.ts +49 -0
- package/dist/signals/query-attempt-observer.js +41 -0
- package/dist/signals/query-facade.d.ts +3 -0
- package/dist/signals/query-facade.js +49 -0
- package/dist/signals/read-protocol.d.ts +32 -3
- package/dist/signals/read-protocol.js +26 -0
- package/dist/signals/requests.d.ts +38 -5
- package/dist/signals/requests.js +298 -15
- package/dist/signals/scalar-computations.d.ts +2 -0
- package/dist/signals/scalar-computations.js +60 -0
- package/dist/signals/server.d.ts +2 -0
- package/dist/signals/server.js +1 -0
- package/dist/signals/transition-candidate.d.ts +71 -0
- package/dist/signals/transition-candidate.js +557 -0
- package/dist/signals/transition-state.d.ts +51 -0
- package/dist/signals/transition-state.js +70 -0
- package/dist/signals/types.d.ts +95 -5
- package/dist/signals/types.js +20 -0
- package/dist/stream-protocol.d.ts +0 -5
- package/dist/stream-protocol.js +3 -0
- package/dist/streamed-signals-protocol.d.ts +60 -0
- package/dist/streamed-signals-protocol.js +130 -0
- package/dist/style-values.d.ts +3 -0
- package/dist/style-values.js +96 -0
- package/dist/version.js +1 -1
- package/package.json +37 -1
package/dist/runtime.d.ts
CHANGED
|
@@ -12,10 +12,18 @@
|
|
|
12
12
|
* Effects: three-phase pipeline (insertion sync → layout sync → passive post-paint).
|
|
13
13
|
* Reconciliation: LIS-based keyed list inside forBlock (ported from Ripple's patchKeyedChildrenComplex).
|
|
14
14
|
*/
|
|
15
|
+
import type { BindingHandle } from './dom-bindings.js';
|
|
16
|
+
import { type BindingHandoff } from './dom-binding-handoff.js';
|
|
15
17
|
import { EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY } from './constants.js';
|
|
16
18
|
import type { HydrateProps } from './hydration/types.js';
|
|
19
|
+
import type { IndependentHydrateActivator } from './hydration/independent-island.js';
|
|
17
20
|
import { validateNativeReadWitness, type NativeReadWitness } from './signals/native-read-collector.js';
|
|
18
21
|
import { type NativeReadRetry } from './signals/native-read-retry.js';
|
|
22
|
+
import { SignalCandidateFrame } from './signals/transition-candidate.js';
|
|
23
|
+
import { setNativeAdoptionResolver } from './signals/read-protocol.js';
|
|
24
|
+
import { type NativeAdoptionState } from './signals/native-read-seeds.js';
|
|
25
|
+
export { documentSignalOwner, installStreamedSignalOwnerActivator, } from './signals/document-owner.js';
|
|
26
|
+
import { type SignalOwner, type SignalRendererOwnerIdentity } from './signals/types.js';
|
|
19
27
|
export { EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY };
|
|
20
28
|
export { validateNativeReadWitness };
|
|
21
29
|
export type ComponentBody<P = any, E = any> = (props: P, scope: Scope, extra: E) => void;
|
|
@@ -160,6 +168,16 @@ interface ChildScope {
|
|
|
160
168
|
key: symbol | string | number;
|
|
161
169
|
scope: Scope;
|
|
162
170
|
}
|
|
171
|
+
interface SignalRetryNode {
|
|
172
|
+
children?: Map<unknown, SignalRetryNode>;
|
|
173
|
+
owner?: SignalRendererOwnerIdentity;
|
|
174
|
+
}
|
|
175
|
+
interface SignalRetryOwners {
|
|
176
|
+
paths: SignalRetryNode;
|
|
177
|
+
owners: Set<SignalRendererOwnerIdentity>;
|
|
178
|
+
}
|
|
179
|
+
/** @internal Compiler/runtime module-signal capability version 1. */
|
|
180
|
+
export declare function enableSignalBindings(abi?: number, potentialOnly?: boolean): void;
|
|
163
181
|
export { readNativeDomStyle, readNativeDomProps } from './signals/read-protocol.js';
|
|
164
182
|
/**
|
|
165
183
|
* A style binding owns reads in a normal scheduled Block, but owns no DOM range.
|
|
@@ -168,6 +186,13 @@ export { readNativeDomStyle, readNativeDomProps } from './signals/read-protocol.
|
|
|
168
186
|
* @internal
|
|
169
187
|
*/
|
|
170
188
|
export declare function nativeStyleBinding(owner: Scope, slotIndex: number, el: HTMLElement | SVGElement, value: any): void;
|
|
189
|
+
interface NativeProjectionProps {
|
|
190
|
+
el: HTMLElement | SVGElement;
|
|
191
|
+
compute: () => Record<string, unknown> | null | undefined;
|
|
192
|
+
fields: readonly string[];
|
|
193
|
+
}
|
|
194
|
+
/** One scheduled native read owns every field of a compiler-proven projection. @internal */
|
|
195
|
+
export declare function nativeProjectionBinding(owner: Scope, slotIndex: number, el: HTMLElement | SVGElement, compute: NativeProjectionProps['compute'], fields: readonly string[]): void;
|
|
171
196
|
/** @internal Enable invocation collection before an opted-in module renders. */
|
|
172
197
|
export declare function enableNativeReadCollection(abi?: number): void;
|
|
173
198
|
/** @internal Compiler/runtime native-read capability version 1. */
|
|
@@ -186,6 +211,11 @@ type OutputHandler = (block: Block, value: unknown) => void;
|
|
|
186
211
|
interface RootIdState {
|
|
187
212
|
prefix: string;
|
|
188
213
|
next: number;
|
|
214
|
+
/** Shared deterministic namespace for lazily used module-signal instances. */
|
|
215
|
+
signalState?: {
|
|
216
|
+
prefix: string;
|
|
217
|
+
next: number;
|
|
218
|
+
};
|
|
189
219
|
/** Shared render ownership; descendants already carry this root-local record. */
|
|
190
220
|
renderOwner?: RootRenderOwner;
|
|
191
221
|
/** Exclusive end of an SSR-reserved deferred-boundary range. */
|
|
@@ -464,6 +494,11 @@ interface TransitionActionBatch {
|
|
|
464
494
|
hooksPending: boolean;
|
|
465
495
|
pendingHolds?: number;
|
|
466
496
|
workComplete?: boolean;
|
|
497
|
+
/** Allocated only by a native write inside this Action. */
|
|
498
|
+
native?: SignalCandidateFrame;
|
|
499
|
+
nativeWake?: () => void;
|
|
500
|
+
nativeBlocks?: Set<Block>;
|
|
501
|
+
nativeBoundaries?: Map<TrySlot, TrackedThenable<any>>;
|
|
467
502
|
}
|
|
468
503
|
type TransitionMemoSwap = [kind: 0, hooks: Map<HookSlot, unknown>, slot: HookSlot, previous: unknown, next: unknown] | [kind: 1, cells: any[], base: number, previous: any[], next: any[]];
|
|
469
504
|
interface WarmHarvestEntry {
|
|
@@ -488,6 +523,11 @@ interface RootTransitionHold {
|
|
|
488
523
|
}
|
|
489
524
|
interface RootRenderOwner {
|
|
490
525
|
current: Block | null;
|
|
526
|
+
/** Shared document/account data owner; distinct from this root's presentation owner. */
|
|
527
|
+
signalOwner?: SignalOwner;
|
|
528
|
+
bindingLeases?: Set<BindingHandoff>;
|
|
529
|
+
preservePresentation?: boolean;
|
|
530
|
+
bindingContainer?: Node;
|
|
491
531
|
adopt?: (block: Block) => void;
|
|
492
532
|
retry: () => void;
|
|
493
533
|
request: ((mode: 'urgent' | 'transition') => void) | null;
|
|
@@ -495,8 +535,12 @@ interface RootRenderOwner {
|
|
|
495
535
|
wakeable: PromiseLike<unknown> | null;
|
|
496
536
|
/** Lazily allocated only by adapters carrying metadata across fresh retry scopes. */
|
|
497
537
|
retryKey: object | null;
|
|
538
|
+
/** Actual first-mount signal state retained only for the current retry episode. */
|
|
539
|
+
retrySignalOwners?: SignalRetryOwners;
|
|
498
540
|
/** Only native suspended readers allocate a retry lease outside their discarded Scopes. */
|
|
499
541
|
nativeRetry?: NativeReadRetry;
|
|
542
|
+
/** Only roots participating in a native candidate retain cancellation ownership. */
|
|
543
|
+
nativeTransitions?: Set<TransitionActionBatch>;
|
|
500
544
|
transaction: RootRenderTransaction | null;
|
|
501
545
|
/** Installed only when a single-origin transition suspends at this root. */
|
|
502
546
|
transition?: RootTransitionHold;
|
|
@@ -518,6 +562,8 @@ interface RootRenderTransaction {
|
|
|
518
562
|
aborted: boolean;
|
|
519
563
|
rootRequest: boolean;
|
|
520
564
|
hydrating?: boolean;
|
|
565
|
+
/** Collectively validated before a native candidate published canonical state. */
|
|
566
|
+
nativeAdmitted?: boolean;
|
|
521
567
|
}
|
|
522
568
|
/** @internal Opaque retry episode, without retaining an abandoned Scope. */
|
|
523
569
|
export declare function getRootRenderRetryKey(scope: Scope, retryOnly?: boolean): object | null;
|
|
@@ -662,6 +708,8 @@ interface OffscreenCapture {
|
|
|
662
708
|
suspenseCommits: Set<TrySlot> | undefined;
|
|
663
709
|
/** Speculative renderer transactions are released only after commit or discard. */
|
|
664
710
|
renderCleanups: Array<(discarded: boolean) => void> | undefined;
|
|
711
|
+
/** Only a structural binding lease records current-tree adoption receipts. */
|
|
712
|
+
presentations?: PresentationHydrationFrame[];
|
|
665
713
|
}
|
|
666
714
|
/** @internal Preserve the owning renderer's scheduler without racing a staged commit. */
|
|
667
715
|
export declare function scheduleRenderCleanup(schedule: (callback: () => void) => void, receiver: unknown, cleanup: () => void, onDiscard?: () => void): void;
|
|
@@ -750,7 +798,7 @@ export declare function hasPendingWork(): boolean;
|
|
|
750
798
|
*/
|
|
751
799
|
export declare function act<T>(fn: () => T | Promise<T>): Promise<T>;
|
|
752
800
|
export declare function renderBlock(block: Block): void;
|
|
753
|
-
export declare function componentSlotLite<P>(parentScope: Scope, slotKey: number, host: Node, comp: ComponentBody<P>, props: P, anchor?: Node): void;
|
|
801
|
+
export declare function componentSlotLite<P>(parentScope: Scope, slotKey: number, host: Node, comp: ComponentBody<P>, props: P, anchor?: Node, invocationSite?: string): void;
|
|
754
802
|
declare const SLOT_FLAG_TEARDOWN: number;
|
|
755
803
|
/** @internal Invoke a provider that owns the trailing hook-slot ABI. */
|
|
756
804
|
export declare function invokeManualHook<T>(fn: (...args: any[]) => T, receiver: unknown, args: IArguments): T;
|
|
@@ -1090,6 +1138,12 @@ interface TrackedThenable<T = any> extends PromiseLike<T> {
|
|
|
1090
1138
|
value?: T;
|
|
1091
1139
|
reason?: any;
|
|
1092
1140
|
}
|
|
1141
|
+
declare const HYDRATION_REJECTION_EXCEPTION: unique symbol;
|
|
1142
|
+
declare class HydrationRejectionException {
|
|
1143
|
+
readonly reason: unknown;
|
|
1144
|
+
readonly [HYDRATION_REJECTION_EXCEPTION] = true;
|
|
1145
|
+
constructor(reason: unknown);
|
|
1146
|
+
}
|
|
1093
1147
|
/** Compiler-owned direct use() creations consult their server-proven site outcome first. */
|
|
1094
1148
|
export declare function seedOrCreate<T>(site: string, factory: () => T): T;
|
|
1095
1149
|
/**
|
|
@@ -1192,7 +1246,129 @@ export declare function lazy<C extends ComponentBody<any>>(load: () => PromiseLi
|
|
|
1192
1246
|
displayName?: string;
|
|
1193
1247
|
};
|
|
1194
1248
|
export declare function useId(slot?: symbol): string;
|
|
1249
|
+
interface LazyTemplateRecord {
|
|
1250
|
+
html: string;
|
|
1251
|
+
ns: 0 | 1 | 2 | 3;
|
|
1252
|
+
frag: number;
|
|
1253
|
+
parsed: Array<Node | null>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Lazily computed adoption-root descriptor for PROD hydration's parse-free
|
|
1256
|
+
* root check (see HydrationCapability.cloneLazy): 0 = not computed yet, a
|
|
1257
|
+
* string = the root element's tag as written in `html`, 3 / 8 = a text /
|
|
1258
|
+
* comment-anchor root (nodeType-only match). Declared in the `template()`
|
|
1259
|
+
* literal so the record's hidden class never transitions.
|
|
1260
|
+
*/
|
|
1261
|
+
root: string | 0 | 3 | 8;
|
|
1262
|
+
}
|
|
1195
1263
|
export declare function template(html: string, ns?: number, frag?: number): Element;
|
|
1264
|
+
/**
|
|
1265
|
+
* Lite component calls deliberately allocate no CompSlot/Block range owner,
|
|
1266
|
+
* but hydration still adopts their server frame pair. Keep that pair in an
|
|
1267
|
+
* ephemeral map for the one post-hydration compaction pass; the live lite
|
|
1268
|
+
* scope only needs its end marker re-pointed if the pair is borrowed.
|
|
1269
|
+
*/
|
|
1270
|
+
interface HydratedLiteRange {
|
|
1271
|
+
start: Comment;
|
|
1272
|
+
end: Comment;
|
|
1273
|
+
}
|
|
1274
|
+
interface PendingHydrationClassWrite {
|
|
1275
|
+
next: string | null;
|
|
1276
|
+
absentIsEmpty: boolean;
|
|
1277
|
+
useAttribute: boolean;
|
|
1278
|
+
remove: boolean;
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Root-local hydration state and the dynamic dispatch boundary for hydration-only
|
|
1282
|
+
* code. The class is constructed only by hydrateRoot, so client-only bundles can
|
|
1283
|
+
* discard its methods together with the marker/mismatch/seed helper graph.
|
|
1284
|
+
*/
|
|
1285
|
+
declare class HydrationCapability {
|
|
1286
|
+
rootBlock: Block;
|
|
1287
|
+
node: Node | null;
|
|
1288
|
+
seeds: unknown[] | null;
|
|
1289
|
+
depth: number;
|
|
1290
|
+
seedCursor: number;
|
|
1291
|
+
hasAdjacentRangePair: boolean;
|
|
1292
|
+
private abandoned;
|
|
1293
|
+
private readonly freshNodes;
|
|
1294
|
+
private readonly unframedRootRanges;
|
|
1295
|
+
/** Pairs discovered while matching an outer range; released with this hydration pass. */
|
|
1296
|
+
private matchingCloses;
|
|
1297
|
+
/** First unclaimed root sibling after a compiled root clone; undefined until known. */
|
|
1298
|
+
private rootRemainder;
|
|
1299
|
+
private rootCleanupBoundary;
|
|
1300
|
+
readonly deferredActivities: Array<() => void>;
|
|
1301
|
+
readonly liteRanges: WeakMap<Scope, HydratedLiteRange>;
|
|
1302
|
+
readonly classWrites: Map<Element, PendingHydrationClassWrite>;
|
|
1303
|
+
private readonly textWarnings;
|
|
1304
|
+
/** Skip component-frame adoption until the declared container owner. */
|
|
1305
|
+
passthroughRanges: boolean;
|
|
1306
|
+
nativeAdoption?: NativeAdoptionState;
|
|
1307
|
+
retryPresentation?: () => void;
|
|
1308
|
+
presentation?: boolean;
|
|
1309
|
+
constructor(rootBlock: Block, node: Node | null, seeds: unknown[] | null);
|
|
1310
|
+
isActive(): boolean;
|
|
1311
|
+
owns(block: Block): boolean;
|
|
1312
|
+
suspend<T>(fn: () => T): T;
|
|
1313
|
+
isOpen(node: Node | null): node is Comment;
|
|
1314
|
+
isClose(node: Node | null): node is Comment;
|
|
1315
|
+
close(open: Node): Comment;
|
|
1316
|
+
resolveOpen(anchor: Node | null | undefined, domParent: Node): Comment | null;
|
|
1317
|
+
markerState(node: Node): -1 | 0 | 1;
|
|
1318
|
+
describe(node: Node | null): string;
|
|
1319
|
+
warnStructural(loc: string | undefined, expected: string, actual: string): void;
|
|
1320
|
+
recordTextMismatch(node: Text, loc: string | undefined, server: string | null): void;
|
|
1321
|
+
flushTextWarnings(): void;
|
|
1322
|
+
removeRange(start: Node, end: Node): void;
|
|
1323
|
+
parseSeeds(raw: string): unknown[] | null;
|
|
1324
|
+
isRejection(error: unknown): error is HydrationRejectionException;
|
|
1325
|
+
rejectionFromSeed(seed: unknown): HydrationRejectionException | null;
|
|
1326
|
+
seedOrCreate<T>(site: string, factory: () => T): T;
|
|
1327
|
+
useSeed<T>(thenable: TrackedThenable<T>, state: TrackedThenable<any>[], index: number, replaceOnResume: boolean): T;
|
|
1328
|
+
/** Mark a client-built hydration replacement (and its descendants) as fresh DOM. */
|
|
1329
|
+
markFresh(node: Node): void;
|
|
1330
|
+
isFresh(node: Node): boolean;
|
|
1331
|
+
/** Keep a client-owned root anchor alive while stale server siblings are swept. */
|
|
1332
|
+
protectRootAnchor(node: Node): void;
|
|
1333
|
+
/** Bound an unframed third-party component root so its returned host can adopt it. */
|
|
1334
|
+
wrapUnframedRoot(cursor: Node): readonly [Comment, Comment];
|
|
1335
|
+
isUnframedRootRange(start: Node, end: Node): boolean;
|
|
1336
|
+
/** Record the first node outside a root-owned range exactly once. */
|
|
1337
|
+
claimRootRemainder(node: Node | null): void;
|
|
1338
|
+
private freshClone;
|
|
1339
|
+
private fragmentRemainder;
|
|
1340
|
+
/**
|
|
1341
|
+
* If a top-level cursor sits inside a server marker frame, return the first
|
|
1342
|
+
* sibling after that OUTERMOST frame. A clone can execute in a lite/provider
|
|
1343
|
+
* descendant while its DOM is still a direct child of the root container;
|
|
1344
|
+
* `cursor.nextSibling` would then be only the descendant's close marker.
|
|
1345
|
+
*/
|
|
1346
|
+
private framedRootRemainder;
|
|
1347
|
+
/** Give up root adoption after an unframed return/fragment mismatch. */
|
|
1348
|
+
abandonRoot(expected: string, actual: string, loc?: string): void;
|
|
1349
|
+
clone<T extends Node>(template: T, loc?: string, partialStyles?: string): T;
|
|
1350
|
+
/**
|
|
1351
|
+
* PROD adoption entry for lazy compiler templates: the root check runs off
|
|
1352
|
+
* the template SOURCE (lazyRootMatches), so the happy path never forces the
|
|
1353
|
+
* parse — `adopt` resolves the parsed template on demand only on its cold
|
|
1354
|
+
* paths (mismatch recovery, client-side builds mid-hydration, fragment root
|
|
1355
|
+
* claims).
|
|
1356
|
+
*/
|
|
1357
|
+
cloneLazy(lazy: LazyTemplateRecord, loc?: string): Node;
|
|
1358
|
+
/** `template` is null only in prod lazy mode (then `lazy` is set) — every cold path resolves it. */
|
|
1359
|
+
private adopt;
|
|
1360
|
+
/** Remove server siblings left after the root's complete client shape was adopted. */
|
|
1361
|
+
finishRoot(): void;
|
|
1362
|
+
htext(el: Node, text: string, loc?: string): Text;
|
|
1363
|
+
htextSwap(posNode: Node | null, text: string): Text;
|
|
1364
|
+
sibling(node: Node, count: number): Node | null;
|
|
1365
|
+
allowAttribute(el: Element, name: string, next: string | null): boolean;
|
|
1366
|
+
allowClass(el: Element, next: string | null, absentIsEmpty?: boolean): boolean;
|
|
1367
|
+
queueClass(el: Element, next: string | null, absentIsEmpty: boolean, useAttribute: boolean, remove: boolean): void;
|
|
1368
|
+
flushClassWrites(): void;
|
|
1369
|
+
applyStyle(el: HTMLElement | SVGElement, value: any, _prev: any, staticCss?: string, entries?: readonly unknown[]): boolean;
|
|
1370
|
+
coalesce(): void;
|
|
1371
|
+
}
|
|
1196
1372
|
export declare function clone<T extends Node>(node: T, loc?: string, partialStyles?: string): T;
|
|
1197
1373
|
/**
|
|
1198
1374
|
* Compiler-emitted for a multi-root template's mount: drain the cloned
|
|
@@ -1242,6 +1418,44 @@ export declare function htext(el: Node, value: unknown, seeded?: 1 | undefined):
|
|
|
1242
1418
|
* `htext` (which handles the only-child fast path).
|
|
1243
1419
|
*/
|
|
1244
1420
|
export declare function htextSwap(posNode: Node | null, value: unknown): Text;
|
|
1421
|
+
/** @internal Text holes in authored binding views retain an addressable range, including when empty. */
|
|
1422
|
+
export declare function bindingText(posNode: Node | null, value: unknown, marker: string): Text;
|
|
1423
|
+
interface PresentationHydrationFrame {
|
|
1424
|
+
previous: PresentationHydrationFrame | null;
|
|
1425
|
+
scope: Scope;
|
|
1426
|
+
writes: Map<object, Map<string, () => void>>;
|
|
1427
|
+
native: ReturnType<typeof setNativeAdoptionResolver>;
|
|
1428
|
+
readToken: number;
|
|
1429
|
+
witnessToken: number;
|
|
1430
|
+
witnesses: Map<object, NativeReadWitness | null>;
|
|
1431
|
+
completed: boolean;
|
|
1432
|
+
lease: BindingHandoff;
|
|
1433
|
+
revision?: number;
|
|
1434
|
+
/** Installed only for structural receipts so ordinary commits do not retain the validator. */
|
|
1435
|
+
current?: typeof currentPresentation;
|
|
1436
|
+
hydration: HydrationCapability | null;
|
|
1437
|
+
}
|
|
1438
|
+
/** @internal Preserve the early presentation when an authored preparation throws. */
|
|
1439
|
+
export declare function presentationFailure(error: unknown): never;
|
|
1440
|
+
declare function currentPresentation(frame: PresentationHydrationFrame): boolean;
|
|
1441
|
+
/** @internal Only compiler-proven native views enter this publication boundary. */
|
|
1442
|
+
export declare function beginPresentationHydration(scope: Scope, id: string, supported?: boolean, structural?: boolean, conditionalRest?: boolean): PresentationHydrationFrame | null;
|
|
1443
|
+
/** @internal Restore the read frame even when preparation suspends or throws. */
|
|
1444
|
+
export declare function endPresentationHydration(frame: PresentationHydrationFrame | null, completed?: boolean): void;
|
|
1445
|
+
/** @internal Only authored host spreads retain generic host preparation. */
|
|
1446
|
+
export declare function presentationHostWrite<T>(writer: (...args: any[]) => T, ...args: any[]): T;
|
|
1447
|
+
/** @internal Compiler-selected writer seam; ordinary renderer setters stay unchanged. */
|
|
1448
|
+
export declare function presentationWrite<T>(writer: (...args: any[]) => T, kind: string, ...args: any[]): T;
|
|
1449
|
+
/** @internal Authored presentation ranges may not inherit an unrelated caller's boundary. */
|
|
1450
|
+
export declare function bindPresentationView<T extends Function>(view: T, id: string): T;
|
|
1451
|
+
/** @internal A lexical children body carries its authored invocation site across modules. */
|
|
1452
|
+
export declare function markBindingChildren<T extends Function>(body: T, site: string): T;
|
|
1453
|
+
/** @internal The existing renderer adopts only the current compiler-owned branch or child range. */
|
|
1454
|
+
export declare function presentationStructure(writer: (...args: any[]) => void, kind: 'if' | 'view', marker: string, ...args: any[]): void;
|
|
1455
|
+
/** @internal Keep historical class ownership beside the full renderer's composed class. */
|
|
1456
|
+
export declare function setBindingClass(element: Element, receipt: string, values: [unknown, unknown[]]): void;
|
|
1457
|
+
/** @internal Attribute-binding comparison ABI for the opt-in class receipt writer. */
|
|
1458
|
+
export declare function setBindingClassIfChanged(value: [unknown, unknown[]], previous: unknown, element: Element, receipt: string): unknown;
|
|
1245
1459
|
/** Logical index-0 child: `node.firstChild` for both client and hydration. */
|
|
1246
1460
|
export declare function child<T extends Node>(node: T): Node | null;
|
|
1247
1461
|
/**
|
|
@@ -1251,6 +1465,15 @@ export declare function child<T extends Node>(node: T): Node | null;
|
|
|
1251
1465
|
*/
|
|
1252
1466
|
export declare function sibling(node: Node, n?: number): Node | null;
|
|
1253
1467
|
export declare function setText(node: Text, value: any): void;
|
|
1468
|
+
type DirectSignalAttributeKind = 'attr' | 'class' | 'booleanAttr' | 'ariaAttr' | 'stringData';
|
|
1469
|
+
/** @internal Compiler target for a direct signal/scalar text binding. */
|
|
1470
|
+
export declare function bindSignalText(scope: Scope, previous: unknown, position: Node, value: unknown, site: string, onlyChild?: boolean, seededText?: 1 | undefined, bindingMarker?: string, previousValue?: unknown): unknown;
|
|
1471
|
+
/** @internal Compiler target for a direct signal/scalar attribute binding. */
|
|
1472
|
+
export declare function bindSignalAttribute(scope: Scope, previous: unknown, element: Element, name: string, value: unknown, site: string, attributeKind?: DirectSignalAttributeKind): unknown;
|
|
1473
|
+
/** @internal Compiler target for a direct signal/scalar value binding. */
|
|
1474
|
+
export declare function bindSignalValue(scope: Scope, previous: unknown, element: Element, value: unknown, site: string): unknown;
|
|
1475
|
+
/** @internal Compiler target for a direct signal/scalar checked binding. */
|
|
1476
|
+
export declare function bindSignalChecked(scope: Scope, previous: unknown, element: Element, value: unknown, site: string): unknown;
|
|
1254
1477
|
/**
|
|
1255
1478
|
* Compact compiler binding ABI. Evaluate the authored value first, compare its
|
|
1256
1479
|
* raw identity, then call the ordinary writer. Returning only after that writer
|
|
@@ -1519,21 +1742,9 @@ type HostPropSource = readonly [
|
|
|
1519
1742
|
value?: unknown,
|
|
1520
1743
|
merge?: boolean
|
|
1521
1744
|
];
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
* className/class, htmlFor/for, and xlinkHref/xlink:href target one native
|
|
1526
|
-
* property. Canonical identities ensure a vanished earlier source cannot
|
|
1527
|
-
* remove an unchanged later winner, and hydration compares only the final
|
|
1528
|
-
* client value against the final server value.
|
|
1529
|
-
*
|
|
1530
|
-
* A synthesized scope-hash class (4th tuple flag) is not an authored later
|
|
1531
|
-
* writer: after identity last-writer-wins, it composes onto the winning class
|
|
1532
|
-
* instead of replacing a spread's class. An authored `class` beside a spread
|
|
1533
|
-
* stays last-writer-wins because its hash is baked into that authored value
|
|
1534
|
-
* and carries no merge flag.
|
|
1535
|
-
*/
|
|
1536
|
-
export declare function setHostPropSources(el: Element, sources: readonly HostPropSource[], prev: Record<string, unknown> | undefined, scope: Scope, hasNestedChildren?: boolean, readStyle?: (value: unknown) => unknown): Record<string, unknown>;
|
|
1745
|
+
export declare function setHostPropSources(el: Element, sources: readonly HostPropSource[], prev: Record<string, unknown> | undefined, scope: Scope, hasNestedChildren?: boolean, readStyle?: (value: unknown) => unknown, deferControl?: boolean): Record<string, unknown>;
|
|
1746
|
+
/** @internal Compiler target for spread-bearing hosts containing direct signals. */
|
|
1747
|
+
export declare function bindSignalHostPropSources(scope: Scope, previous: unknown, element: Element, sources: readonly HostPropSource[], site: string, hasNestedChildren?: boolean, readStyle?: (value: unknown) => unknown): unknown;
|
|
1537
1748
|
export declare function setSpread(el: Element, value: any, prev: any, mountScope?: Scope, skipDangerouslySetInnerHTML?: boolean, skipFormControls?: boolean): void;
|
|
1538
1749
|
export declare function headBlock(scope: Scope, slot: number, key: string, tag: string, attrs: Record<string, any> | null, text: unknown): void;
|
|
1539
1750
|
interface NamespaceHeadProps {
|
|
@@ -1712,6 +1923,8 @@ export interface ElementDescriptor<P = any> {
|
|
|
1712
1923
|
key: any;
|
|
1713
1924
|
ref: any;
|
|
1714
1925
|
children: any;
|
|
1926
|
+
/** @internal Compiler-stable component invocation identity. */
|
|
1927
|
+
__octaneInvocationSite?: string;
|
|
1715
1928
|
}
|
|
1716
1929
|
export type OctaneNode = unknown;
|
|
1717
1930
|
/**
|
|
@@ -1737,10 +1950,14 @@ export declare function nativeCreateScopedValue<P>(readElement: () => ElementDes
|
|
|
1737
1950
|
*
|
|
1738
1951
|
* @internal
|
|
1739
1952
|
*/
|
|
1740
|
-
export declare function createScopedElement<P>(type: ComponentBody<P> | string | typeof Fragment, props: P | undefined, readChildren: () => unknown): ElementDescriptor<P>;
|
|
1953
|
+
export declare function createScopedElement<P>(type: ComponentBody<P> | string | typeof Fragment, props: P | undefined, readChildren: () => unknown, invocationSite?: string): ElementDescriptor<P>;
|
|
1741
1954
|
/** @internal Resolve native children in their represented render Scope. */
|
|
1742
|
-
export declare function nativeCreateScopedElement<P>(type: ComponentBody<P> | string | typeof Fragment, props: P | undefined, readChildren: () => unknown): ElementDescriptor<P>;
|
|
1955
|
+
export declare function nativeCreateScopedElement<P>(type: ComponentBody<P> | string | typeof Fragment, props: P | undefined, readChildren: () => unknown, invocationSite?: string): ElementDescriptor<P>;
|
|
1743
1956
|
export declare function createElement<P>(type: ComponentBody<P> | string | typeof Fragment, props?: P, ...children: any[]): ElementDescriptor<P>;
|
|
1957
|
+
/** @internal Compiler-authored element descriptor with stable invocation identity. */
|
|
1958
|
+
export declare function createElementAt<P>(invocationSite: string, type: ComponentBody<P> | string | typeof Fragment, props?: P, ...children: any[]): ElementDescriptor<P>;
|
|
1959
|
+
/** @internal Compiler-owned positional children; omitted children allocate no rest array. */
|
|
1960
|
+
export declare function createElementFromConfig<P>(invocationSite: string | undefined, type: ComponentBody<P> | string | typeof Fragment, props: P | undefined, children?: any[]): ElementDescriptor<P>;
|
|
1744
1961
|
/**
|
|
1745
1962
|
* True for a createElement/JSX descriptor. Known descriptors, including unions,
|
|
1746
1963
|
* retain their prop types; supply P to narrow an element-or-props union.
|
|
@@ -1767,9 +1984,9 @@ export declare const Children: {
|
|
|
1767
1984
|
only<T>(children: T): T;
|
|
1768
1985
|
};
|
|
1769
1986
|
/** Generic component call site: reconcile any JavaScript return value. */
|
|
1770
|
-
export declare function componentSlot(parentScope: Scope, slotKey: number, domParent: Node, comp: ComponentBody | string, props: any, anchor?: Node | null, key?: any, singleRoot?: boolean | 2, inherit?: boolean, hasKey?: boolean): void;
|
|
1987
|
+
export declare function componentSlot(parentScope: Scope, slotKey: number, domParent: Node, comp: ComponentBody | string, props: any, anchor?: Node | null, key?: any, singleRoot?: boolean | 2, inherit?: boolean, hasKey?: boolean, invocationSite?: string): void;
|
|
1771
1988
|
/** Compiler-proven `@{}` component call site: the body has no value return. */
|
|
1772
|
-
export declare function componentSlotVoid(parentScope: Scope, slotKey: number, domParent: Node, comp: ComponentBody | string, props: any, anchor?: Node | null, key?: any, singleRoot?: boolean | 2, inherit?: boolean, hasKey?: boolean): void;
|
|
1989
|
+
export declare function componentSlotVoid(parentScope: Scope, slotKey: number, domParent: Node, comp: ComponentBody | string, props: any, anchor?: Node | null, key?: any, singleRoot?: boolean | 2, inherit?: boolean, hasKey?: boolean, invocationSite?: string): void;
|
|
1773
1990
|
export declare function positionalChildren(children: any[]): any[];
|
|
1774
1991
|
export declare function hostComponent(scope: Scope, slot: number, tag: string, props: Record<string, any> | null, childrenBody?: ComponentBody | OctaneNode, anchor?: Node | null): Element;
|
|
1775
1992
|
/**
|
|
@@ -1809,7 +2026,11 @@ export declare function compilerCacheImmutableArrayFilter(value: unknown, proper
|
|
|
1809
2026
|
export declare function compilerCacheMappedArray(value: unknown, component: unknown): boolean;
|
|
1810
2027
|
/** Shared compiler ABI: native-array eligibility query plus stable keyed map dispatch. */
|
|
1811
2028
|
export declare function mapSlot(scopeOrItems: any, slotOrMethod: any, domParent?: Node, items?: any, method?: any, native?: boolean | ((...args: any[]) => any), callback?: (...args: any[]) => any, getKey?: (item: any, index: number) => any, itemBody?: (item: any, scope: Scope) => void, flags?: number, deps?: any[], anchor?: Node | null, ownEnd?: boolean | 1): boolean | void;
|
|
1812
|
-
|
|
2029
|
+
/** @internal Capability-routed renderable hole with targeted signal text updates. */
|
|
2030
|
+
export declare function bindSignalChild(parentScope: Scope, previous: unknown, slotKey: number, domParent: Node, value: unknown, _site: string, anchor?: Node | null, ownEnd?: boolean, ownsHost?: Element, compactable?: boolean, onlyChild?: boolean, bindingMarker?: string): unknown;
|
|
2031
|
+
/** @internal Address an ordinary renderable slot without narrowing its value semantics. */
|
|
2032
|
+
export declare function bindingChildSlot(parentScope: Scope, slotKey: number, domParent: Node, value: unknown, marker: string, anchor?: Node | null, ownEnd?: boolean): void;
|
|
2033
|
+
export declare function childSlot(parentScope: Scope, slotKey: number, domParent: Node, value: unknown, anchor?: Node | null, ownEnd?: boolean, ownsHost?: Element, compactable?: boolean, includeKeyedSingle?: boolean, compiledMapBody?: (item: any, scope: Scope) => void, compiledMapKey?: (item: any, index: number) => any, compiledMapFlags?: number, compiledMapDeps?: any[], mappedFallback?: boolean, bindingMarker?: string): void;
|
|
1813
2034
|
export declare function textSlot(parentScope: Scope, slotKey: number, domParent: Node, value: unknown, anchor?: Node | null, ownEnd?: boolean, compactable?: boolean): void;
|
|
1814
2035
|
export declare function textHole(parentScope: Scope, slotKey: number, domParent: Node, value: unknown, anchor?: Node | null, ownEnd?: boolean, compactable?: boolean): Text | null;
|
|
1815
2036
|
/**
|
|
@@ -1868,6 +2089,8 @@ interface SuspenseHiddenDom {
|
|
|
1868
2089
|
}
|
|
1869
2090
|
declare function teardownTrySlot(state: TrySlot, detachDom: boolean): void;
|
|
1870
2091
|
interface TrySlot {
|
|
2092
|
+
/** Only an initial hydrated primary discarded by suspension needs transfer. */
|
|
2093
|
+
retrySignalOwners?: SignalRetryOwners;
|
|
1871
2094
|
__kind: 'trySlotSlot';
|
|
1872
2095
|
__flags: typeof SLOT_FLAG_TEARDOWN;
|
|
1873
2096
|
__teardown: typeof teardownTrySlot;
|
|
@@ -1934,6 +2157,8 @@ interface TrySlot {
|
|
|
1934
2157
|
* scope teardown so we don't leak callbacks past the slot's lifetime.
|
|
1935
2158
|
*/
|
|
1936
2159
|
transitionTimeoutId: any | null;
|
|
2160
|
+
/** Native candidates own retry; a finite fallback still uses this boundary's lifetime. */
|
|
2161
|
+
nativeTransition?: TransitionActionBatch;
|
|
1937
2162
|
/**
|
|
1938
2163
|
* Host refs detached when this boundary suspended (object refs set to null,
|
|
1939
2164
|
* callback refs invoked with null). React treats ref attachment like a layout
|
|
@@ -2057,11 +2282,22 @@ export interface Root {
|
|
|
2057
2282
|
unmount(): void;
|
|
2058
2283
|
}
|
|
2059
2284
|
export interface RootOptions {
|
|
2285
|
+
/** Adopt fixed native early bindings only when their matching hydration capture commits. */
|
|
2286
|
+
bindingLeases?: readonly BindingHandle[];
|
|
2287
|
+
/**
|
|
2288
|
+
* Shared document/account owner for module signals. Roots borrow this owner;
|
|
2289
|
+
* unmounting a presentation root never retires shared data state.
|
|
2290
|
+
*/
|
|
2291
|
+
signalOwner?: SignalOwner;
|
|
2060
2292
|
/**
|
|
2061
2293
|
* Caller-controlled useId prefix. createRoot composes it with an automatic
|
|
2062
2294
|
* client-root namespace; hydrateRoot uses it verbatim to match server output.
|
|
2063
2295
|
*/
|
|
2064
2296
|
identifierPrefix?: string;
|
|
2297
|
+
/** @internal Compiler-owned starting useId slot for an independently hydrated range. */
|
|
2298
|
+
identifierSeed?: number;
|
|
2299
|
+
/** @internal Stable instance namespace for an independently hydrated root. */
|
|
2300
|
+
signalInstancePrefix?: string;
|
|
2065
2301
|
/**
|
|
2066
2302
|
* React 19 parity, reporting only: called after an error boundary
|
|
2067
2303
|
* (`@try`/`@catch` or `<ErrorBoundary>`) claims an error from this root's
|
|
@@ -2123,6 +2359,8 @@ export declare function __createVoidRoot(container: RootContainer, options?: Roo
|
|
|
2123
2359
|
*/
|
|
2124
2360
|
export declare function hydrateRoot(container: RootContainer, element: ElementDescriptor, options?: RootOptions): Root;
|
|
2125
2361
|
export declare function hydrateRoot(container: RootContainer, body: ComponentBody, props?: any, options?: RootOptions): Root;
|
|
2362
|
+
/** @internal Adapt a compiler-extracted body to the parent-free island loader contract. */
|
|
2363
|
+
export declare function createIndependentHydrateActivator(body: ComponentBody): IndependentHydrateActivator;
|
|
2126
2364
|
/** React DOM `preload(href, {as, …})` — `<link rel="preload">`. */
|
|
2127
2365
|
export declare function preload(href: string, options: {
|
|
2128
2366
|
as: string;
|