octane 0.2.11 → 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/context-epoch.cjs +38 -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-stage.cjs +896 -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 +24 -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 +9 -0
- package/dist/cjs/runtime.cjs +6397 -1683
- package/dist/cjs/runtime.server.cjs +1465 -213
- package/dist/cjs/server/early-signals.cjs +45 -0
- package/dist/cjs/server/index.cjs +47 -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 +166 -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 +54 -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/trusted-html.cjs +30 -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 +51 -22
- package/dist/compiler/compile.js +2534 -581
- 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 +759 -10
- package/dist/compiler/hydrate-boundaries.js +358 -15
- package/dist/compiler/index.d.ts +39 -2
- package/dist/compiler/index.js +1 -0
- package/dist/compiler/native-attribute-reads.js +127 -0
- package/dist/compiler/native-change-diagnostics.js +32 -38
- package/dist/compiler/native-read-diagnostics.js +69 -8
- package/dist/compiler/native-read-types.js +80 -34
- package/dist/compiler/parser.node.js +1 -1
- package/dist/compiler/renderer-boundaries.js +40 -0
- 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.d.ts +3 -1
- package/dist/compiler/slot-hooks.js +168 -34
- package/dist/compiler/strong-auto-memo.js +90 -0
- package/dist/compiler/strong-html.js +143 -0
- package/dist/compiler/strong-mode.js +764 -66
- package/dist/compiler/strong-template-policy.js +307 -0
- 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.LICENSES.txt +1 -1
- package/dist/compiler/volar.d.ts +6 -1
- package/dist/compiler/volar.js +750 -1433
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +10 -0
- package/dist/context-epoch.d.ts +2 -0
- package/dist/context-epoch.js +13 -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-stage.d.ts +52 -0
- package/dist/dom-stage.js +872 -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 +6 -0
- package/dist/error-codes.server.generated.js +24 -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 +3 -0
- package/dist/index.js +6 -0
- package/dist/internal/signal-read.d.ts +1 -0
- package/dist/internal/signal-read.js +4 -0
- package/dist/jsx-runtime-strong.d.ts +33 -0
- package/dist/jsx-runtime.d.ts +58 -2
- package/dist/public-types.d.ts +15 -1
- package/dist/runtime.d.ts +297 -23
- package/dist/runtime.js +6405 -1679
- package/dist/runtime.server.d.ts +110 -27
- package/dist/runtime.server.js +1458 -213
- package/dist/server/early-signals.d.ts +14 -0
- package/dist/server/early-signals.js +34 -0
- package/dist/server/index.d.ts +11 -2
- package/dist/server/index.js +50 -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 +52 -6
- package/dist/signals/graph.js +174 -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 +37 -2
- package/dist/signals/read-protocol.js +44 -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/trusted-html.d.ts +17 -0
- package/dist/trusted-html.js +6 -0
- package/dist/universal-core.d.ts +6 -0
- package/dist/universal-core.js +214 -202
- package/dist/version.js +1 -1
- package/package.json +48 -5
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,31 @@ 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;
|
|
181
|
+
export { readNativeDomStyle, readNativeDomProps } from './signals/read-protocol.js';
|
|
182
|
+
/**
|
|
183
|
+
* A style binding owns reads in a normal scheduled Block, but owns no DOM range.
|
|
184
|
+
* The enclosing template owns the host and its children. Reusing the native
|
|
185
|
+
* read driver keeps speculative subscriptions, errors, and adoption transactional.
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
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;
|
|
163
196
|
/** @internal Enable invocation collection before an opted-in module renders. */
|
|
164
197
|
export declare function enableNativeReadCollection(abi?: number): void;
|
|
165
198
|
/** @internal Compiler/runtime native-read capability version 1. */
|
|
@@ -178,6 +211,11 @@ type OutputHandler = (block: Block, value: unknown) => void;
|
|
|
178
211
|
interface RootIdState {
|
|
179
212
|
prefix: string;
|
|
180
213
|
next: number;
|
|
214
|
+
/** Shared deterministic namespace for lazily used module-signal instances. */
|
|
215
|
+
signalState?: {
|
|
216
|
+
prefix: string;
|
|
217
|
+
next: number;
|
|
218
|
+
};
|
|
181
219
|
/** Shared render ownership; descendants already carry this root-local record. */
|
|
182
220
|
renderOwner?: RootRenderOwner;
|
|
183
221
|
/** Exclusive end of an SSR-reserved deferred-boundary range. */
|
|
@@ -290,6 +328,17 @@ export interface Block extends Scope {
|
|
|
290
328
|
inactive: boolean;
|
|
291
329
|
/** Direct (own) context reads this render — drives memo invalidation alongside $$ctxReads. */
|
|
292
330
|
$$ctxDirect: Map<Context<any>, any> | null;
|
|
331
|
+
/**
|
|
332
|
+
* The context epoch at which this block's $$ctxReads/$$ctxDirect
|
|
333
|
+
* entries were last known consistent with live context versions: sampled when
|
|
334
|
+
* renderBlock clears the maps (this render repopulates them at current
|
|
335
|
+
* versions) and re-stamped after a bailout verifies every recorded entry.
|
|
336
|
+
* While it equals the current epoch NO context anywhere has changed since, so
|
|
337
|
+
* the per-bail version scans are provably redundant. restampCtxDeps poisons it
|
|
338
|
+
* (-1) when it merges a stale version into this block's map, so a still-pending
|
|
339
|
+
* consumer refresh can never be masked by the fast path.
|
|
340
|
+
*/
|
|
341
|
+
$$ctxDepsEpoch: number;
|
|
293
342
|
/**
|
|
294
343
|
* Armed for React's IMPLICIT same-element bailout (beginWork's
|
|
295
344
|
* oldProps === newProps skip). Set at value-position component mounts
|
|
@@ -445,6 +494,11 @@ interface TransitionActionBatch {
|
|
|
445
494
|
hooksPending: boolean;
|
|
446
495
|
pendingHolds?: number;
|
|
447
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>>;
|
|
448
502
|
}
|
|
449
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[]];
|
|
450
504
|
interface WarmHarvestEntry {
|
|
@@ -469,6 +523,11 @@ interface RootTransitionHold {
|
|
|
469
523
|
}
|
|
470
524
|
interface RootRenderOwner {
|
|
471
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;
|
|
472
531
|
adopt?: (block: Block) => void;
|
|
473
532
|
retry: () => void;
|
|
474
533
|
request: ((mode: 'urgent' | 'transition') => void) | null;
|
|
@@ -476,8 +535,12 @@ interface RootRenderOwner {
|
|
|
476
535
|
wakeable: PromiseLike<unknown> | null;
|
|
477
536
|
/** Lazily allocated only by adapters carrying metadata across fresh retry scopes. */
|
|
478
537
|
retryKey: object | null;
|
|
538
|
+
/** Actual first-mount signal state retained only for the current retry episode. */
|
|
539
|
+
retrySignalOwners?: SignalRetryOwners;
|
|
479
540
|
/** Only native suspended readers allocate a retry lease outside their discarded Scopes. */
|
|
480
541
|
nativeRetry?: NativeReadRetry;
|
|
542
|
+
/** Only roots participating in a native candidate retain cancellation ownership. */
|
|
543
|
+
nativeTransitions?: Set<TransitionActionBatch>;
|
|
481
544
|
transaction: RootRenderTransaction | null;
|
|
482
545
|
/** Installed only when a single-origin transition suspends at this root. */
|
|
483
546
|
transition?: RootTransitionHold;
|
|
@@ -499,6 +562,8 @@ interface RootRenderTransaction {
|
|
|
499
562
|
aborted: boolean;
|
|
500
563
|
rootRequest: boolean;
|
|
501
564
|
hydrating?: boolean;
|
|
565
|
+
/** Collectively validated before a native candidate published canonical state. */
|
|
566
|
+
nativeAdmitted?: boolean;
|
|
502
567
|
}
|
|
503
568
|
/** @internal Opaque retry episode, without retaining an abandoned Scope. */
|
|
504
569
|
export declare function getRootRenderRetryKey(scope: Scope, retryOnly?: boolean): object | null;
|
|
@@ -518,8 +583,14 @@ interface ParkedItem {
|
|
|
518
583
|
}
|
|
519
584
|
/** Animation class value: a class string, 'auto', 'none', or a per-type map. */
|
|
520
585
|
type ViewTransitionClassValue = string | Record<string, string>;
|
|
586
|
+
type ViewTransitionRef = ((instance: ViewTransitionInstance | null) => void | (() => void)) | {
|
|
587
|
+
current: ViewTransitionInstance | null;
|
|
588
|
+
} | readonly ViewTransitionRef[] | null;
|
|
521
589
|
export interface ViewTransitionProps {
|
|
522
590
|
name?: string;
|
|
591
|
+
/** Create an element scope from one persistent host. Omitted boundaries inherit their scope. */
|
|
592
|
+
scope?: 'element';
|
|
593
|
+
ref?: ViewTransitionRef;
|
|
523
594
|
enter?: ViewTransitionClassValue;
|
|
524
595
|
exit?: ViewTransitionClassValue;
|
|
525
596
|
update?: ViewTransitionClassValue;
|
|
@@ -552,9 +623,11 @@ export interface ViewTransitionProps {
|
|
|
552
623
|
export declare class ViewTransitionPseudoElement {
|
|
553
624
|
/** The pseudo-element selector, e.g. `::view-transition-new(hero)`. */
|
|
554
625
|
readonly selector: string;
|
|
555
|
-
|
|
626
|
+
private readonly scope;
|
|
627
|
+
constructor(pseudo: string, name: string, scope?: Element);
|
|
556
628
|
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
557
|
-
getAnimations(): Animation[];
|
|
629
|
+
getAnimations(_options?: GetAnimationsOptions): Animation[];
|
|
630
|
+
getComputedStyle(): CSSStyleDeclaration;
|
|
558
631
|
}
|
|
559
632
|
/**
|
|
560
633
|
* The instance handed to on* callbacks: the resolved view-transition-name plus
|
|
@@ -635,6 +708,8 @@ interface OffscreenCapture {
|
|
|
635
708
|
suspenseCommits: Set<TrySlot> | undefined;
|
|
636
709
|
/** Speculative renderer transactions are released only after commit or discard. */
|
|
637
710
|
renderCleanups: Array<(discarded: boolean) => void> | undefined;
|
|
711
|
+
/** Only a structural binding lease records current-tree adoption receipts. */
|
|
712
|
+
presentations?: PresentationHydrationFrame[];
|
|
638
713
|
}
|
|
639
714
|
/** @internal Preserve the owning renderer's scheduler without racing a staged commit. */
|
|
640
715
|
export declare function scheduleRenderCleanup(schedule: (callback: () => void) => void, receiver: unknown, cleanup: () => void, onDiscard?: () => void): void;
|
|
@@ -723,7 +798,7 @@ export declare function hasPendingWork(): boolean;
|
|
|
723
798
|
*/
|
|
724
799
|
export declare function act<T>(fn: () => T | Promise<T>): Promise<T>;
|
|
725
800
|
export declare function renderBlock(block: Block): void;
|
|
726
|
-
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;
|
|
727
802
|
declare const SLOT_FLAG_TEARDOWN: number;
|
|
728
803
|
/** @internal Invoke a provider that owns the trailing hook-slot ABI. */
|
|
729
804
|
export declare function invokeManualHook<T>(fn: (...args: any[]) => T, receiver: unknown, args: IArguments): T;
|
|
@@ -874,6 +949,11 @@ export interface Context<T> {
|
|
|
874
949
|
* changed value. Consumers record the version they read at; the memo bailout
|
|
875
950
|
* (componentSlot) compares it so a context change forces a re-render through
|
|
876
951
|
* the push-cascade even when props are shallow-equal. See useContextInternal.
|
|
952
|
+
* Every bump must move the shared context epoch too — call bumpContextEpoch
|
|
953
|
+
* adjacent to the write, or (for external bumpers like react-hosted mirrors)
|
|
954
|
+
* guarantee a root.render commit follows, whose renderResolved entry bumps
|
|
955
|
+
* it. The $$ctxDepsEpoch bail fast path treats an unmoved epoch as "nothing
|
|
956
|
+
* changed", so an unpaired bump strands consumers.
|
|
877
957
|
*/
|
|
878
958
|
$$version: number;
|
|
879
959
|
}
|
|
@@ -1058,6 +1138,12 @@ interface TrackedThenable<T = any> extends PromiseLike<T> {
|
|
|
1058
1138
|
value?: T;
|
|
1059
1139
|
reason?: any;
|
|
1060
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
|
+
}
|
|
1061
1147
|
/** Compiler-owned direct use() creations consult their server-proven site outcome first. */
|
|
1062
1148
|
export declare function seedOrCreate<T>(site: string, factory: () => T): T;
|
|
1063
1149
|
/**
|
|
@@ -1160,7 +1246,129 @@ export declare function lazy<C extends ComponentBody<any>>(load: () => PromiseLi
|
|
|
1160
1246
|
displayName?: string;
|
|
1161
1247
|
};
|
|
1162
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
|
+
}
|
|
1163
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
|
+
}
|
|
1164
1372
|
export declare function clone<T extends Node>(node: T, loc?: string, partialStyles?: string): T;
|
|
1165
1373
|
/**
|
|
1166
1374
|
* Compiler-emitted for a multi-root template's mount: drain the cloned
|
|
@@ -1210,6 +1418,44 @@ export declare function htext(el: Node, value: unknown, seeded?: 1 | undefined):
|
|
|
1210
1418
|
* `htext` (which handles the only-child fast path).
|
|
1211
1419
|
*/
|
|
1212
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;
|
|
1213
1459
|
/** Logical index-0 child: `node.firstChild` for both client and hydration. */
|
|
1214
1460
|
export declare function child<T extends Node>(node: T): Node | null;
|
|
1215
1461
|
/**
|
|
@@ -1219,6 +1465,15 @@ export declare function child<T extends Node>(node: T): Node | null;
|
|
|
1219
1465
|
*/
|
|
1220
1466
|
export declare function sibling(node: Node, n?: number): Node | null;
|
|
1221
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;
|
|
1222
1477
|
/**
|
|
1223
1478
|
* Compact compiler binding ABI. Evaluate the authored value first, compare its
|
|
1224
1479
|
* raw identity, then call the ordinary writer. Returning only after that writer
|
|
@@ -1461,6 +1716,10 @@ export declare function setClassName(el: Element, value: unknown): void;
|
|
|
1461
1716
|
export declare function setClassAttr(el: Element, value: unknown): void;
|
|
1462
1717
|
/** Whether a grouped style must compare its complete value during hydration. @internal */
|
|
1463
1718
|
export declare function isHydratingStyle(): boolean;
|
|
1719
|
+
/** Intrinsic prototype used to guard completion of fresh style spread snapshots. @internal */
|
|
1720
|
+
export declare const styleObjectPrototype: Object;
|
|
1721
|
+
/** Whether a spread prefix and its fixed trailing declarations can be diffed separately. @internal */
|
|
1722
|
+
export declare function canSplitStyleProperties(): boolean;
|
|
1464
1723
|
export declare function setStyle(el: HTMLElement | SVGElement, value: any, prev: any): void;
|
|
1465
1724
|
/**
|
|
1466
1725
|
* Update one dynamic declaration after a compiler-baked static style prefix.
|
|
@@ -1483,21 +1742,9 @@ type HostPropSource = readonly [
|
|
|
1483
1742
|
value?: unknown,
|
|
1484
1743
|
merge?: boolean
|
|
1485
1744
|
];
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
* className/class, htmlFor/for, and xlinkHref/xlink:href target one native
|
|
1490
|
-
* property. Canonical identities ensure a vanished earlier source cannot
|
|
1491
|
-
* remove an unchanged later winner, and hydration compares only the final
|
|
1492
|
-
* client value against the final server value.
|
|
1493
|
-
*
|
|
1494
|
-
* A synthesized scope-hash class (4th tuple flag) is not an authored later
|
|
1495
|
-
* writer: after identity last-writer-wins, it composes onto the winning class
|
|
1496
|
-
* instead of replacing a spread's class. An authored `class` beside a spread
|
|
1497
|
-
* stays last-writer-wins because its hash is baked into that authored value
|
|
1498
|
-
* and carries no merge flag.
|
|
1499
|
-
*/
|
|
1500
|
-
export declare function setHostPropSources(el: Element, sources: readonly HostPropSource[], prev: Record<string, unknown> | undefined, scope: Scope, hasNestedChildren?: boolean): 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;
|
|
1501
1748
|
export declare function setSpread(el: Element, value: any, prev: any, mountScope?: Scope, skipDangerouslySetInnerHTML?: boolean, skipFormControls?: boolean): void;
|
|
1502
1749
|
export declare function headBlock(scope: Scope, slot: number, key: string, tag: string, attrs: Record<string, any> | null, text: unknown): void;
|
|
1503
1750
|
interface NamespaceHeadProps {
|
|
@@ -1676,6 +1923,8 @@ export interface ElementDescriptor<P = any> {
|
|
|
1676
1923
|
key: any;
|
|
1677
1924
|
ref: any;
|
|
1678
1925
|
children: any;
|
|
1926
|
+
/** @internal Compiler-stable component invocation identity. */
|
|
1927
|
+
__octaneInvocationSite?: string;
|
|
1679
1928
|
}
|
|
1680
1929
|
export type OctaneNode = unknown;
|
|
1681
1930
|
/**
|
|
@@ -1701,10 +1950,14 @@ export declare function nativeCreateScopedValue<P>(readElement: () => ElementDes
|
|
|
1701
1950
|
*
|
|
1702
1951
|
* @internal
|
|
1703
1952
|
*/
|
|
1704
|
-
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>;
|
|
1705
1954
|
/** @internal Resolve native children in their represented render Scope. */
|
|
1706
|
-
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>;
|
|
1707
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>;
|
|
1708
1961
|
/**
|
|
1709
1962
|
* True for a createElement/JSX descriptor. Known descriptors, including unions,
|
|
1710
1963
|
* retain their prop types; supply P to narrow an element-or-props union.
|
|
@@ -1731,9 +1984,9 @@ export declare const Children: {
|
|
|
1731
1984
|
only<T>(children: T): T;
|
|
1732
1985
|
};
|
|
1733
1986
|
/** Generic component call site: reconcile any JavaScript return value. */
|
|
1734
|
-
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;
|
|
1735
1988
|
/** Compiler-proven `@{}` component call site: the body has no value return. */
|
|
1736
|
-
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;
|
|
1737
1990
|
export declare function positionalChildren(children: any[]): any[];
|
|
1738
1991
|
export declare function hostComponent(scope: Scope, slot: number, tag: string, props: Record<string, any> | null, childrenBody?: ComponentBody | OctaneNode, anchor?: Node | null): Element;
|
|
1739
1992
|
/**
|
|
@@ -1773,7 +2026,11 @@ export declare function compilerCacheImmutableArrayFilter(value: unknown, proper
|
|
|
1773
2026
|
export declare function compilerCacheMappedArray(value: unknown, component: unknown): boolean;
|
|
1774
2027
|
/** Shared compiler ABI: native-array eligibility query plus stable keyed map dispatch. */
|
|
1775
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;
|
|
1776
|
-
|
|
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;
|
|
1777
2034
|
export declare function textSlot(parentScope: Scope, slotKey: number, domParent: Node, value: unknown, anchor?: Node | null, ownEnd?: boolean, compactable?: boolean): void;
|
|
1778
2035
|
export declare function textHole(parentScope: Scope, slotKey: number, domParent: Node, value: unknown, anchor?: Node | null, ownEnd?: boolean, compactable?: boolean): Text | null;
|
|
1779
2036
|
/**
|
|
@@ -1832,6 +2089,8 @@ interface SuspenseHiddenDom {
|
|
|
1832
2089
|
}
|
|
1833
2090
|
declare function teardownTrySlot(state: TrySlot, detachDom: boolean): void;
|
|
1834
2091
|
interface TrySlot {
|
|
2092
|
+
/** Only an initial hydrated primary discarded by suspension needs transfer. */
|
|
2093
|
+
retrySignalOwners?: SignalRetryOwners;
|
|
1835
2094
|
__kind: 'trySlotSlot';
|
|
1836
2095
|
__flags: typeof SLOT_FLAG_TEARDOWN;
|
|
1837
2096
|
__teardown: typeof teardownTrySlot;
|
|
@@ -1898,6 +2157,8 @@ interface TrySlot {
|
|
|
1898
2157
|
* scope teardown so we don't leak callbacks past the slot's lifetime.
|
|
1899
2158
|
*/
|
|
1900
2159
|
transitionTimeoutId: any | null;
|
|
2160
|
+
/** Native candidates own retry; a finite fallback still uses this boundary's lifetime. */
|
|
2161
|
+
nativeTransition?: TransitionActionBatch;
|
|
1901
2162
|
/**
|
|
1902
2163
|
* Host refs detached when this boundary suspended (object refs set to null,
|
|
1903
2164
|
* callback refs invoked with null). React treats ref attachment like a layout
|
|
@@ -2021,11 +2282,22 @@ export interface Root {
|
|
|
2021
2282
|
unmount(): void;
|
|
2022
2283
|
}
|
|
2023
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;
|
|
2024
2292
|
/**
|
|
2025
2293
|
* Caller-controlled useId prefix. createRoot composes it with an automatic
|
|
2026
2294
|
* client-root namespace; hydrateRoot uses it verbatim to match server output.
|
|
2027
2295
|
*/
|
|
2028
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;
|
|
2029
2301
|
/**
|
|
2030
2302
|
* React 19 parity, reporting only: called after an error boundary
|
|
2031
2303
|
* (`@try`/`@catch` or `<ErrorBoundary>`) claims an error from this root's
|
|
@@ -2087,6 +2359,8 @@ export declare function __createVoidRoot(container: RootContainer, options?: Roo
|
|
|
2087
2359
|
*/
|
|
2088
2360
|
export declare function hydrateRoot(container: RootContainer, element: ElementDescriptor, options?: RootOptions): Root;
|
|
2089
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;
|
|
2090
2364
|
/** React DOM `preload(href, {as, …})` — `<link rel="preload">`. */
|
|
2091
2365
|
export declare function preload(href: string, options: {
|
|
2092
2366
|
as: string;
|