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.server.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export { trustHTML, type TrustedHTML } from './trusted-html.js';
|
|
2
2
|
export { readNativeDomStyle, readNativeDomProps } from './signals/read-protocol.js';
|
|
3
3
|
import { EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY } from './constants.js';
|
|
4
|
+
import { type IndependentHydrateBuildRecord } from './independent-hydration-protocol.js';
|
|
4
5
|
import { normalizeClass } from './css.js';
|
|
5
6
|
import { validateNativeReadWitness, type NativeReadWitness } from './signals/native-read-collector.js';
|
|
6
7
|
import { type NativeSignalManifest } from './signals/native-read-seeds.js';
|
|
8
|
+
import { type ServerSignalQueryAttempt, type ServerSignalQueryAttemptObservations } from './signals/query-attempt-observer.js';
|
|
9
|
+
import { type SignalOwner, type SignalRendererOwnerIdentity } from './signals/types.js';
|
|
7
10
|
export { EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY, normalizeClass };
|
|
8
11
|
export { validateNativeReadWitness };
|
|
9
12
|
export type { NativeSignalManifest };
|
|
13
|
+
/** @internal Compiler target for strict server reads of a direct signal binding. */
|
|
14
|
+
export declare function ssrSignalValue(value: unknown): unknown;
|
|
15
|
+
/** @internal Preserve a writable control's identity until the final JSX winner is known. */
|
|
16
|
+
export declare function ssrSignalControlValue(value: unknown, site: string): unknown;
|
|
10
17
|
/** Server twin of the compiler's guarded native-array map ABI. */
|
|
11
18
|
export declare function mapSlot(receiver: any, method: any, callback?: (...args: any[]) => any): any;
|
|
12
19
|
interface SSRScope {
|
|
@@ -38,6 +45,7 @@ export declare function beginNativeReadWitness(detached?: boolean): number;
|
|
|
38
45
|
export declare function finishNativeReadWitness(token: number, completed: boolean): NativeReadWitness | null;
|
|
39
46
|
/** @internal Shared automatic-cache witness ABI. */
|
|
40
47
|
export declare function replayNativeReadWitness(witness: NativeReadWitness | null | undefined): void;
|
|
48
|
+
type ServerSignalInstanceKey = string | Frame;
|
|
41
49
|
interface InjectedStyle {
|
|
42
50
|
css: string;
|
|
43
51
|
nonce?: string;
|
|
@@ -53,6 +61,11 @@ interface Frame {
|
|
|
53
61
|
asyncScope: string;
|
|
54
62
|
/** Parser context supplied by, or inherited through, the component call site. */
|
|
55
63
|
namespace: 'html' | 'svg' | 'mathml' | undefined;
|
|
64
|
+
signalParentKey?: ServerSignalInstanceKey;
|
|
65
|
+
signalInvocationSite?: string;
|
|
66
|
+
signalListKeys?: readonly string[];
|
|
67
|
+
signalKey?: string;
|
|
68
|
+
signalInstanceKey?: string;
|
|
56
69
|
}
|
|
57
70
|
type ScopedCounts = (string | number)[] | Map<string, number>;
|
|
58
71
|
/** Compiler ABI: validate and scope one native element during a DEV SSR render. */
|
|
@@ -84,16 +97,22 @@ interface ElementDescriptor {
|
|
|
84
97
|
key: any;
|
|
85
98
|
ref: any;
|
|
86
99
|
children: any;
|
|
100
|
+
/** @internal Compiler-stable component invocation identity. */
|
|
101
|
+
__octaneInvocationSite?: string;
|
|
87
102
|
}
|
|
88
103
|
/** Server twin of the compiler-only complete JSX-record deferral helper. */
|
|
89
104
|
export declare function createScopedValue(readElement: () => ElementDescriptor): ElementDescriptor;
|
|
90
105
|
/** @internal Native complete-record deferral with request-local evidence. */
|
|
91
106
|
export declare function nativeCreateScopedValue(readElement: () => ElementDescriptor): ElementDescriptor;
|
|
92
107
|
/** Server twin of the compiler-only scope-preserving JSX descriptor factory. */
|
|
93
|
-
export declare function createScopedElement(type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props: any, readChildren: () => unknown): ElementDescriptor;
|
|
108
|
+
export declare function createScopedElement(type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props: any, readChildren: () => unknown, invocationSite?: string): ElementDescriptor;
|
|
94
109
|
/** @internal Native child deferral with evidence on every resolving scope. */
|
|
95
|
-
export declare function nativeCreateScopedElement(type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props: any, readChildren: () => unknown): ElementDescriptor;
|
|
110
|
+
export declare function nativeCreateScopedElement(type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props: any, readChildren: () => unknown, invocationSite?: string): ElementDescriptor;
|
|
96
111
|
export declare function createElement(type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props?: any, ...children: any[]): ElementDescriptor;
|
|
112
|
+
/** @internal Compiler-authored element descriptor with stable invocation identity. */
|
|
113
|
+
export declare function createElementAt(invocationSite: string, type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props?: any, ...children: any[]): ElementDescriptor;
|
|
114
|
+
/** @internal Compiler-owned positional children; omitted children allocate no rest array. */
|
|
115
|
+
export declare function createElementFromConfig(invocationSite: string | undefined, type: ServerEntryComponent | string | typeof Fragment | typeof Activity, props: any, children?: any[]): ElementDescriptor;
|
|
97
116
|
export declare function positionalChildren(children: unknown[]): unknown[];
|
|
98
117
|
/** True if `v` is an element descriptor from `createElement` / JSX-at-value. */
|
|
99
118
|
export declare function isValidElement(v: unknown): v is ElementDescriptor;
|
|
@@ -116,6 +135,10 @@ export declare const Children: {
|
|
|
116
135
|
export declare function createPortal(body: unknown, target: unknown, props?: any): unknown;
|
|
117
136
|
/** @internal Brand the final serialized output of a compiled server body. */
|
|
118
137
|
export declare function ssrHtml(html: string): string;
|
|
138
|
+
/** @internal Preserve the existing component range while identifying an authored binding view. */
|
|
139
|
+
export declare function ssrBindingHtml(html: string, id: string): string;
|
|
140
|
+
/** @internal Match the client definition-site boundary capability. */
|
|
141
|
+
export declare function bindPresentationView<T extends Function>(view: T, _id: string): T;
|
|
119
142
|
export declare function escapeHtml(v: unknown): string;
|
|
120
143
|
export declare function escapeAttr(v: unknown): string;
|
|
121
144
|
/** A dynamic text hole. null/false/undefined render as empty (React parity). */
|
|
@@ -136,6 +159,8 @@ export declare function ssrTextPre(v: unknown): string;
|
|
|
136
159
|
* `{x as string}` / literals / `+`-concats to `ssrText`, everything else here.
|
|
137
160
|
*/
|
|
138
161
|
export declare function ssrChild(v: unknown, scope: SSRScope): string;
|
|
162
|
+
/** @internal Give an authored child slot an identity without adding a second hydration range. */
|
|
163
|
+
export declare function ssrBindingChild(value: unknown, scope: SSRScope, marker: string): string;
|
|
139
164
|
export declare function ssrChildText(v: unknown, scope: SSRScope): string;
|
|
140
165
|
/** @internal First-child renderable hole in a newline-eating HTML element. */
|
|
141
166
|
export declare function ssrChildTextPre(v: unknown, scope: SSRScope): string;
|
|
@@ -148,6 +173,12 @@ export declare function ssrChildPre(v: unknown, scope: SSRScope): string;
|
|
|
148
173
|
* protocol (shared constants in ./constants).
|
|
149
174
|
*/
|
|
150
175
|
export declare function ssrBlock(content: string): string;
|
|
176
|
+
/** @internal Opt-in identity payload on an otherwise ordinary hydration range. */
|
|
177
|
+
export declare function ssrBindingBlock(content: string, marker: string): string;
|
|
178
|
+
/** @internal Authenticate keyed item identity before emitting any item HTML. */
|
|
179
|
+
export declare function ssrBindingKey(key: unknown, seen: Set<string>): string;
|
|
180
|
+
/** @internal One evaluation supplies both presentation classes and their adoption receipt. */
|
|
181
|
+
export declare function ssrBindingClass(receipt: string, values: [unknown, unknown[]]): string;
|
|
151
182
|
/**
|
|
152
183
|
* Preserve a Fragment ref's authored evaluation order without attaching its
|
|
153
184
|
* value. Hydratable output needs the exact comments its client template adopts;
|
|
@@ -182,7 +213,7 @@ export declare function ssrControl<T>(siteKey: string, fn: () => T): T;
|
|
|
182
213
|
/** Compiler-emitted identity membrane for one arm/item inside ssrControl. */
|
|
183
214
|
export declare function ssrArm<T>(armKey: unknown, fn: () => T): T;
|
|
184
215
|
/** Invoke a compiled list body without allocating a callback per item. */
|
|
185
|
-
export declare function ssrForItem(armKey: unknown, fn: (...args: any[]) => string, item: unknown, index: number | undefined, scope: SSRScope, block: boolean): string;
|
|
216
|
+
export declare function ssrForItem(armKey: unknown, fn: (...args: any[]) => string, item: unknown, index: number | undefined, scope: SSRScope, block: boolean, mapped?: boolean): string;
|
|
186
217
|
/**
|
|
187
218
|
* A portal's site marker. The portal body renders into a foreign target at the
|
|
188
219
|
* client, so server-side it leaves a single anchor comment placeholder.
|
|
@@ -230,7 +261,7 @@ export declare function ssrClass(sources: Array<[boolean, unknown]>): string;
|
|
|
230
261
|
* string keys participate, and getters run once at the spread's authored
|
|
231
262
|
* evaluation position before later direct prop expressions.
|
|
232
263
|
*/
|
|
233
|
-
export declare function ssrSnapshotSpread(obj: unknown): Record<string, unknown> | null;
|
|
264
|
+
export declare function ssrSnapshotSpread(obj: unknown, controlSite?: string, deferStyle?: boolean): Record<string, unknown> | null;
|
|
234
265
|
/** A spread `{...obj}`: serialize attr-like keys; drop events/refs/key/children. */
|
|
235
266
|
export declare function ssrSpread(obj: unknown, tag?: string, skipClass?: boolean, namespace?: AttributeNamespace, skipFormControls?: boolean): string;
|
|
236
267
|
export declare function ssrInnerHtml(sources: readonly (readonly [boolean, unknown])[], renderChildren?: () => string, definitelyHasChildren?: boolean, childrenSources?: readonly (readonly [boolean, unknown])[]): string | undefined;
|
|
@@ -275,6 +306,8 @@ export declare function ssrCheckedAttr(v: unknown): string;
|
|
|
275
306
|
*/
|
|
276
307
|
export declare function ssrInputAttrs(sources: Array<readonly [isSpread: boolean, sourceOrName: unknown, value?: unknown]>): string;
|
|
277
308
|
type SsrFormControlSource = readonly [isSpread: boolean, sourceOrName: unknown, value?: unknown];
|
|
309
|
+
/** @internal Join the final writable control winners to the baked control-site key. */
|
|
310
|
+
export declare function ssrSignalControlAttrs(sources: readonly SsrFormControlSource[]): string;
|
|
278
311
|
/**
|
|
279
312
|
* Controlled `<textarea>` content: escaped text + the leading-newline guard
|
|
280
313
|
* (the parser eats a '\n' right after the opening tag — see ssrTextPre).
|
|
@@ -322,9 +355,9 @@ export declare function nativeLocalHook<T>(name: string, initialize: () => T, di
|
|
|
322
355
|
* parent's own range bounds it; the client borrows that range). Applies to
|
|
323
356
|
* both the component branch (frame wrap) and the string-tag branch (ssrBlock).
|
|
324
357
|
*/
|
|
325
|
-
export declare function ssrComponent(parent: SSRScope, comp: ServerComponent | string | typeof Activity, props: any, inherit?: boolean, key?: unknown, identityScoped?: boolean): string;
|
|
358
|
+
export declare function ssrComponent(parent: SSRScope, comp: ServerComponent | string | typeof Activity, props: any, inherit?: boolean, key?: unknown, identityScoped?: boolean, invocationSite?: string, bindingMarker?: string): string;
|
|
326
359
|
/** Compiler ABI for a component call whose output is parsed in foreign content. */
|
|
327
|
-
export declare function ssrComponentNS(parent: SSRScope, comp: ServerComponent | string | typeof Activity, props: any, namespace: 'html' | 'svg' | 'mathml', inherit?: boolean, key?: unknown): string;
|
|
360
|
+
export declare function ssrComponentNS(parent: SSRScope, comp: ServerComponent | string | typeof Activity, props: any, namespace: 'html' | 'svg' | 'mathml', inherit?: boolean, key?: unknown, invocationSite?: string, bindingMarker?: string): string;
|
|
328
361
|
/** Run a renderable hole under a lexically proven parser namespace. */
|
|
329
362
|
export declare function ssrInNamespace(namespace: 'html' | 'svg' | 'mathml', render: () => string): string;
|
|
330
363
|
export declare const Hydrate: ServerComponent;
|
|
@@ -630,6 +663,24 @@ export interface RenderResult {
|
|
|
630
663
|
}
|
|
631
664
|
/** Options accepted by the buffered render entry points (React-shaped subset). */
|
|
632
665
|
export interface RenderOptions {
|
|
666
|
+
/** The host already emitted earlySignalBootstrapScript before interactive HTML. */
|
|
667
|
+
earlySignalBootstrap?: 'external';
|
|
668
|
+
/** Shared request/account data owner borrowed across sibling SSR regions. */
|
|
669
|
+
signalOwner?: SignalOwner;
|
|
670
|
+
/** Automatically publish query attempts into the pre-module streamed receiver. */
|
|
671
|
+
streamedSignals?: {
|
|
672
|
+
readonly buildId: string;
|
|
673
|
+
readonly documentId: string;
|
|
674
|
+
readonly selectionGeneration?: number;
|
|
675
|
+
readonly maxFrameBytes?: number;
|
|
676
|
+
readonly maxTotalBytes?: number;
|
|
677
|
+
readonly timeoutMs?: number;
|
|
678
|
+
};
|
|
679
|
+
/** Compiler/bundler records for strict independently activated Hydrate boundaries. */
|
|
680
|
+
independentHydration?: {
|
|
681
|
+
readonly buildId: string;
|
|
682
|
+
readonly resolve: (templateBoundaryId: string) => IndependentHydrateBuildRecord | undefined;
|
|
683
|
+
};
|
|
633
684
|
/** Caller-controlled namespace for `useId`; use distinct prefixes for sibling roots. */
|
|
634
685
|
identifierPrefix?: string;
|
|
635
686
|
/** Called with any error thrown during the render (before it propagates). */
|
|
@@ -691,6 +742,11 @@ type ResolvedMap = Map<string, SuspenseOutcome> & {
|
|
|
691
742
|
resourceOptions?: RenderOptions | null;
|
|
692
743
|
/** Optional renderer resources; allocated only by a participating adapter. */
|
|
693
744
|
resources?: ServerRenderResources;
|
|
745
|
+
/** One request/account owner shared by every pass and streamed region. */
|
|
746
|
+
signalOwner?: SignalOwner;
|
|
747
|
+
ownedSignalOwner?: boolean;
|
|
748
|
+
signalInstances?: Map<string, SignalRendererOwnerIdentity>;
|
|
749
|
+
hasSignalControls?: boolean;
|
|
694
750
|
/** Render-local stable ids for non-primitive and long string control/list keys. */
|
|
695
751
|
asyncIdentities: Map<unknown, number>;
|
|
696
752
|
/** Cross-pass fallback ids for transient object keys at one lexical position. */
|
|
@@ -721,6 +777,8 @@ type ResolvedMap = Map<string, SuspenseOutcome> & {
|
|
|
721
777
|
touched?: Set<PromiseLike<unknown>>;
|
|
722
778
|
};
|
|
723
779
|
};
|
|
780
|
+
/** @internal Compiler/runtime server signal capability version 1. */
|
|
781
|
+
export declare function enableServerSignalBindings(abi?: number, potentialOnly?: boolean): void;
|
|
724
782
|
/** @internal Request lifetime for an optional renderer's asynchronous server work. */
|
|
725
783
|
export interface ServerRenderResourceContext {
|
|
726
784
|
readonly signal: AbortSignal | undefined;
|
|
@@ -855,11 +913,27 @@ export declare function ssrTry(scope: SSRScope, siteKey: string, tryFn: (arg: un
|
|
|
855
913
|
* construction.
|
|
856
914
|
*/
|
|
857
915
|
export interface StreamInjectionSource {
|
|
916
|
+
/** @internal Pending query authority must precede shell-time module execution. */
|
|
917
|
+
takeInitialSelections?(): string;
|
|
918
|
+
/** This source emits validated renderer frames and needs the pre-module mailbox. */
|
|
919
|
+
readonly streamedRenderer?: true;
|
|
920
|
+
/** @internal Automatic query-attempt sink installed by streamedSignals. */
|
|
921
|
+
readonly observeSignalAttempt?: (attempt: ServerSignalQueryAttempt, run: <T>(callback: () => T) => T) => void;
|
|
922
|
+
/** @internal Server-only mirrors paired with the automatic attempt sink. */
|
|
923
|
+
readonly createSignalAttemptObservations?: () => ServerSignalQueryAttemptObservations;
|
|
858
924
|
/**
|
|
859
925
|
* Pull all queued HTML (concatenated, verbatim). Called at emission
|
|
860
926
|
* boundaries and after `subscribe` notifications; return '' when empty.
|
|
861
927
|
*/
|
|
862
928
|
take(): string;
|
|
929
|
+
/**
|
|
930
|
+
* Optional transport acknowledgement for demand-driven producers. Called
|
|
931
|
+
* after the string returned by take() has been accepted by the renderer's
|
|
932
|
+
* sink. A producer may defer its next iterator pull until this callback.
|
|
933
|
+
*/
|
|
934
|
+
accepted?(): void;
|
|
935
|
+
/** Release this response's producer when rendering fails or its request is canceled. */
|
|
936
|
+
cancel?(reason: unknown): void;
|
|
863
937
|
/**
|
|
864
938
|
* The source notifies when new HTML is queued; the renderer then drains
|
|
865
939
|
* promptly — even while the render itself is idle awaiting `done`.
|
|
@@ -884,6 +958,12 @@ export interface StreamInjectionSource {
|
|
|
884
958
|
}
|
|
885
959
|
export interface StreamOptions extends RenderOptions {
|
|
886
960
|
onShellReady?: () => void;
|
|
961
|
+
/**
|
|
962
|
+
* The initial shell uses signals requiring activation before document EOF.
|
|
963
|
+
* Called before shell publication, after its query authority is serialized.
|
|
964
|
+
* Feature-free renders do not call this hook.
|
|
965
|
+
*/
|
|
966
|
+
onEarlyHydrationReady?: () => void;
|
|
887
967
|
onShellError?: (err: unknown) => void;
|
|
888
968
|
onAllReady?: () => void;
|
|
889
969
|
/**
|