@solidjs/web 2.0.0-rc.0 → 2.0.0-rc.10
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 +1 -1
- package/dist/server.dev.js +4472 -0
- package/dist/server.js +1363 -224
- package/dist/{server.cjs → server.observe.js} +1563 -424
- package/dist/{dev.cjs → web.dev.js} +708 -365
- package/dist/web.js +460 -144
- package/dist/{dev.js → web.observe.js} +511 -213
- package/frames/dist/client.dev.js +464 -72
- package/frames/dist/client.js +364 -71
- package/frames/dist/{client.dev.cjs → client.observe.js} +487 -134
- package/frames/dist/server.dev.js +1713 -0
- package/frames/dist/server.js +553 -2495
- package/frames/dist/server.observe.js +1713 -0
- package/frames/package.json +2 -25
- package/package.json +214 -254
- package/performance-tracks/dist/performance-tracks.dev.js +678 -0
- package/performance-tracks/dist/performance-tracks.js +6 -0
- package/performance-tracks/dist/performance-tracks.observe.js +666 -0
- package/performance-tracks/package.json +7 -0
- package/performance-tracks/types/index.d.ts +67 -0
- package/serialization/decode/package.json +2 -15
- package/serialization/dist/decode.js +101 -12
- package/serialization/dist/serialization.js +112 -20
- package/serialization/package.json +2 -15
- package/serialization/types/index.d.ts +76 -157
- package/serialization/types/serializer-decode.d.ts +149 -112
- package/serialization/types/serializer.d.ts +101 -0
- package/server-functions/dist/client.dev.js +1364 -0
- package/server-functions/dist/client.js +745 -85
- package/server-functions/dist/client.observe.js +1343 -0
- package/server-functions/dist/server.dev.js +2203 -175
- package/server-functions/dist/server.js +2111 -176
- package/server-functions/dist/server.observe.js +3043 -0
- package/server-functions/package.json +2 -35
- package/server-functions/rich-args/package.json +2 -15
- package/storage/package.json +2 -15
- package/types/client.d.ts +193 -288
- package/types/constants.d.ts +20 -0
- package/types/cookies.d.ts +32 -84
- package/types/diagnostics.d.ts +56 -0
- package/types/frames/client.d.ts +1 -1
- package/types/frames/frame-client.d.ts +323 -259
- package/types/frames/frame-container-plugin.d.ts +72 -0
- package/types/frames/frame-sink.d.ts +101 -158
- package/types/frames/frame-transport.d.ts +192 -190
- package/types/frames/serializer-decode.d.ts +219 -0
- package/types/frames/serializer.d.ts +76 -157
- package/types/frames/server.d.ts +1 -1
- package/types/head.d.ts +19 -0
- package/types/index.d.ts +62 -76
- package/types/index.server.d.ts +174 -0
- package/types/jsx.d.ts +33 -26
- package/types/observe.d.ts +358 -0
- package/types/reconcile.d.ts +1 -0
- package/types/render.d.ts +9 -0
- package/types/response.d.ts +75 -150
- package/types/serializer-decode.d.ts +149 -112
- package/types/serializer.d.ts +76 -157
- package/types/server-functions/client.d.ts +202 -174
- package/types/server-functions/flash.d.ts +28 -30
- package/types/server-functions/registry.d.ts +102 -0
- package/types/server-functions/rich-args.d.ts +1 -10
- package/types/server-functions/server.d.ts +518 -454
- package/types/server-functions/shared.d.ts +366 -425
- package/types/server-mock.d.ts +110 -13
- package/types/server-observe.d.ts +77 -0
- package/types/server.d.ts +425 -425
- package/types/trace.d.ts +127 -0
- package/LICENSE +0 -21
- package/dist/web.cjs +0 -2007
- package/frames/dist/client.cjs +0 -1916
- package/frames/dist/server.cjs +0 -3667
- package/serialization/dist/decode.cjs +0 -110
- package/serialization/dist/serialization.cjs +0 -232
- package/serialization/types-cjs/index.d.cts +0 -182
- package/serialization/types-cjs/package.json +0 -3
- package/serialization/types-cjs/serializer-decode.d.cts +0 -182
- package/server-functions/dist/client.cjs +0 -646
- package/server-functions/dist/rich-args.cjs +0 -11
- package/server-functions/dist/server.cjs +0 -1077
- package/server-functions/dist/server.dev.cjs +0 -1077
- package/storage/dist/storage.cjs +0 -12
- package/storage/types-cjs/index.d.cts +0 -28
- package/storage/types-cjs/package.json +0 -3
- package/types/core.d.ts +0 -6
- package/types-cjs/client.d.cts +0 -337
- package/types-cjs/cookies.d.cts +0 -93
- package/types-cjs/core.d.cts +0 -6
- package/types-cjs/frames/client.d.cts +0 -36
- package/types-cjs/frames/frame-client.d.cts +0 -338
- package/types-cjs/frames/frame-sink.d.cts +0 -194
- package/types-cjs/frames/frame-transport.d.cts +0 -222
- package/types-cjs/frames/serializer.d.cts +0 -182
- package/types-cjs/frames/server.d.cts +0 -52
- package/types-cjs/index.d.cts +0 -230
- package/types-cjs/jsx-properties.d.cts +0 -93
- package/types-cjs/jsx.d.cts +0 -4150
- package/types-cjs/package.json +0 -3
- package/types-cjs/response.d.cts +0 -174
- package/types-cjs/serializer-decode.d.cts +0 -182
- package/types-cjs/serializer.d.cts +0 -182
- package/types-cjs/server-functions/client.d.cts +0 -201
- package/types-cjs/server-functions/flash.d.cts +0 -38
- package/types-cjs/server-functions/rich-args.d.cts +0 -10
- package/types-cjs/server-functions/server.d.cts +0 -588
- package/types-cjs/server-functions/shared.d.cts +0 -523
- package/types-cjs/server-mock.d.cts +0 -277
- package/types-cjs/server.d.cts +0 -523
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type Component } from "solid-js";
|
|
2
|
+
import type { JSX } from "./jsx.js";
|
|
3
|
+
export * from "./server.js";
|
|
4
|
+
export * from "./response.js";
|
|
5
|
+
export type { CallEvent, CallListener, CallLive, FrameAppliedEvent, FrameEvent, FrameListener, FrameLive, FrameProducedEvent, InvocationEvent, InvocationListener, InvocationLive, RenderEvent, RenderListener, RenderLive } from "./observe.js";
|
|
6
|
+
export type { TraceContext, TraceProvider } from "./trace.js";
|
|
7
|
+
export type { JSX } from "./jsx.js";
|
|
8
|
+
export { For, Show, Loading, Reveal, Switch, Match, Repeat, Errored, NoHydration, Hydration } from "solid-js";
|
|
9
|
+
/**
|
|
10
|
+
* Build-time constant indicating whether code is running on the server. This
|
|
11
|
+
* is the server entry; the value is `true`. The client entry of `@solidjs/web`
|
|
12
|
+
* sets it to `false`. See the client-entry JSDoc for the canonical guard
|
|
13
|
+
* pattern.
|
|
14
|
+
*/
|
|
15
|
+
export declare const isServer: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Build-time constant indicating whether code is running in a dev build.
|
|
18
|
+
* Set by `_SOLID_DEV_` substitution per artifact, exactly like the client
|
|
19
|
+
* entry: `dist/server.dev.*` (the `development` export condition) → `true`,
|
|
20
|
+
* `dist/server.*` → `false`. The server runtime's own `_SOLID_DEV_` gates are
|
|
21
|
+
* replaced by the same pass, so this flag and the bundle's internal behavior
|
|
22
|
+
* cannot disagree.
|
|
23
|
+
*/
|
|
24
|
+
export declare const isDev: boolean;
|
|
25
|
+
export type IntrinsicElement = Extract<keyof JSX.IntrinsicElements, string>;
|
|
26
|
+
export type ValidComponent = IntrinsicElement | Component<any> | (string & {});
|
|
27
|
+
export type ComponentProps<T extends ValidComponent> = T extends Component<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, unknown>;
|
|
28
|
+
export interface DynamicOptions {
|
|
29
|
+
/**
|
|
30
|
+
* SSR only: hold the document's first flush until the source settles, so
|
|
31
|
+
* the resolved component renders into the shell instead of streaming in
|
|
32
|
+
* behind its boundary's fallback. Same meaning as `createMemo`'s
|
|
33
|
+
* `deferStream`. Default `false` — a `dynamic()` source is data of unknown
|
|
34
|
+
* cost and streams by default (a code-split `lazy()` always holds the shell
|
|
35
|
+
* for its module load, since its code is a prerequisite to the render).
|
|
36
|
+
*/
|
|
37
|
+
deferStream?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The source cannot change: call it once, untracked, now, and render the
|
|
40
|
+
* result with no computation per instance (see the client `dynamic`). The
|
|
41
|
+
* source must resolve synchronously.
|
|
42
|
+
*/
|
|
43
|
+
static?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare function dynamic<T extends ValidComponent>(source: () => T | Promise<T> | null | undefined | false, options?: DynamicOptions): Component<ComponentProps<T>>;
|
|
46
|
+
/** @deprecated Props of the deprecated `<Dynamic>`; see `dynamic()`. */
|
|
47
|
+
export type DynamicProps<T extends ValidComponent, P = ComponentProps<T>> = {
|
|
48
|
+
[K in keyof P]: P[K];
|
|
49
|
+
} & {
|
|
50
|
+
component: T | null | undefined | false;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use `dynamic()`. `<Dynamic>` is the same primitive, but its
|
|
54
|
+
* shape puts the tag in the same bag as the element's props: every instance
|
|
55
|
+
* merges `component` in at the call site, `omit()`s it back out here, and
|
|
56
|
+
* builds a fresh `dynamic()` factory (with its memo) because there is nowhere
|
|
57
|
+
* to hoist one. `dynamic()` has none of that and is one line longer:
|
|
58
|
+
*
|
|
59
|
+
* ```tsx
|
|
60
|
+
* // before
|
|
61
|
+
* <Dynamic component={multiline() ? RichTextEditor : "input"} value={value()} />
|
|
62
|
+
*
|
|
63
|
+
* // after — hoist per component instance (or per module for a constant)
|
|
64
|
+
* const Field = dynamic(() => multiline() ? RichTextEditor : "input");
|
|
65
|
+
* <Field value={value()} />
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* Remains available in 2.0 (deprecated, no runtime warning); prefer `dynamic()`
|
|
69
|
+
* in new code.
|
|
70
|
+
*/
|
|
71
|
+
export declare function Dynamic<T extends ValidComponent>(props: DynamicProps<T>): JSX.Element;
|
|
72
|
+
/**
|
|
73
|
+
* Portals are client-only islands: the server renders nothing for them —
|
|
74
|
+
* `props.children` is never evaluated, no async is started, and nothing is
|
|
75
|
+
* serialized. The client renders the content fresh once hydration settles.
|
|
76
|
+
* Throwing here instead (as earlier betas did) is strictly worse: an ancestor
|
|
77
|
+
* `Errored` catches it and bakes the error fallback into the streamed HTML
|
|
78
|
+
* for a tree that renders fine client-side (#2876).
|
|
79
|
+
*
|
|
80
|
+
* The one thing both sides must still agree on is the parent's child-id
|
|
81
|
+
* counter: the client Portal scopes its internals under one owner (one slot),
|
|
82
|
+
* so consume the matching slot here or every hydration id after the portal
|
|
83
|
+
* drifts.
|
|
84
|
+
*/
|
|
85
|
+
export declare function Portal(props: {
|
|
86
|
+
mount?: Element;
|
|
87
|
+
children: JSX.Element;
|
|
88
|
+
}): JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* Server half of `clientOnly`: the wrapped component never renders on the
|
|
91
|
+
* server — the import is never even started — only `props.fallback` is
|
|
92
|
+
* SSR'd. The client build swaps the real component in after load + mount.
|
|
93
|
+
* See the client entry's JSDoc for the full contract.
|
|
94
|
+
*
|
|
95
|
+
* `moduleUrl` is injected by the bundler's module-URL pass (the same one
|
|
96
|
+
* that annotates `lazy()`, padding the options slot when a call site omits
|
|
97
|
+
* it); when present and an asset manifest is set, the render emits early
|
|
98
|
+
* preload hints for the module — see `registerClientOnlyPreload` for why
|
|
99
|
+
* they stay out of the hydration asset map. Without it (untransformed code)
|
|
100
|
+
* or without a manifest, behavior is unchanged.
|
|
101
|
+
*/
|
|
102
|
+
export declare function clientOnly<M extends Record<string, any>, K extends keyof M & string>(fn: () => Promise<M>, options: {
|
|
103
|
+
lazy?: boolean;
|
|
104
|
+
export: K;
|
|
105
|
+
}, moduleUrl?: string): Component<ComponentProps<M[K]> & {
|
|
106
|
+
fallback?: JSX.Element;
|
|
107
|
+
}>;
|
|
108
|
+
export declare function clientOnly<T extends Component<any>>(fn: () => Promise<{
|
|
109
|
+
default: T;
|
|
110
|
+
}>, options?: {
|
|
111
|
+
lazy?: boolean;
|
|
112
|
+
export?: string;
|
|
113
|
+
}, moduleUrl?: string): Component<ComponentProps<T> & {
|
|
114
|
+
fallback?: JSX.Element;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* Declares the HTTP response status (and optional status text) for the
|
|
118
|
+
* lifetime of the current reactive scope during SSR, writing to the request
|
|
119
|
+
* event's `response` head (core's `ResponseStub`, exposed by the
|
|
120
|
+
* integration).
|
|
121
|
+
*
|
|
122
|
+
* Naming note — this is a scope-tied *declaration*, not a mutation: "while
|
|
123
|
+
* this reactive scope is live, the response has this status." Solid reserves
|
|
124
|
+
* `set*` verbs for event-time mutation; `httpStatus` is called bare in a
|
|
125
|
+
* component or reactive-scope body (like `createSignal`/`onCleanup`) and
|
|
126
|
+
* un-declares on scope disposal.
|
|
127
|
+
*
|
|
128
|
+
* Retraction semantics: disposal retracts only this scope's declaration —
|
|
129
|
+
* the response falls back to the latest still-live declaration, or to the
|
|
130
|
+
* base status the integration had set before the first declaration. A
|
|
131
|
+
* boundary that errored, declared a status, and then recovered retracts its
|
|
132
|
+
* write without stomping a status a surviving part of the tree legitimately
|
|
133
|
+
* set (e.g. a 404 page whose inner boundary recovers stays a 404), and
|
|
134
|
+
* sibling scopes may dispose in any order (#2984). Both the write and the
|
|
135
|
+
* cleanup are no-ops once the response head is `committed` (head
|
|
136
|
+
* derived/sent — status can no longer change). The head commits when it
|
|
137
|
+
* freezes: at shell flush for a piped `renderToStream` (`createSSRResponse`
|
|
138
|
+
* commits on the first write), and at completion for an awaited one or for
|
|
139
|
+
* `renderToString` (the render commits right before its final dispose, so
|
|
140
|
+
* the declarations still live at that point are the ones the consumer
|
|
141
|
+
* derives the head from; `createSSRResponse` then passes the committed stub
|
|
142
|
+
* through). On the client this is a no-op.
|
|
143
|
+
*/
|
|
144
|
+
export declare function httpStatus(code: number, text?: string): void;
|
|
145
|
+
/**
|
|
146
|
+
* Declares an HTTP response header (or with `append`, appends to one) for
|
|
147
|
+
* the lifetime of the current reactive scope during SSR, writing to the
|
|
148
|
+
* request event's `response` head (core's `ResponseStub`, exposed by the
|
|
149
|
+
* integration).
|
|
150
|
+
*
|
|
151
|
+
* Naming note — this is a scope-tied *declaration*, not a mutation: "while
|
|
152
|
+
* this reactive scope is live, the response has this header." Solid reserves
|
|
153
|
+
* `set*` verbs for event-time mutation; `httpHeader` is called bare in a
|
|
154
|
+
* component or reactive-scope body (like `createSignal`/`onCleanup`) and
|
|
155
|
+
* un-declares on scope disposal.
|
|
156
|
+
*
|
|
157
|
+
* Retraction semantics: disposal retracts only this scope's declaration —
|
|
158
|
+
* the header is recomputed by replaying the still-live declarations, in
|
|
159
|
+
* their original write order, over the base value the integration had set
|
|
160
|
+
* before the first declaration (deleted when there is neither). Sibling
|
|
161
|
+
* scopes may therefore dispose in any order without disturbing each
|
|
162
|
+
* other's contributions (#2984). For `set-cookie` — the one header whose
|
|
163
|
+
* multiple values must survive as separate entries — the base is captured
|
|
164
|
+
* and replayed entry-exact (`getSetCookie()` + re-append; `get()`/`set()`
|
|
165
|
+
* would comma-join the entries and then collapse them into one corrupt
|
|
166
|
+
* header). Both the write and the cleanup are no-ops once the response head
|
|
167
|
+
* is `committed` (head derived/sent — headers can no longer change); the
|
|
168
|
+
* head commits when it freezes — shell flush for a piped `renderToStream`,
|
|
169
|
+
* completion (right before the final dispose) for an awaited one and for
|
|
170
|
+
* `renderToString` — see `httpStatus`. On the client this is a no-op.
|
|
171
|
+
*/
|
|
172
|
+
export declare function httpHeader(name: string, value: string, options?: {
|
|
173
|
+
append?: boolean;
|
|
174
|
+
}): void;
|
package/types/jsx.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* THIS FILE IS GENERATED by `scripts/jsx-sync.mjs`.
|
|
3
|
+
* Edit `jsx-h.d.ts` and run `pnpm --filter @solidjs/web jsx-sync`
|
|
4
|
+
* (also runs as part of `pnpm types`).
|
|
5
|
+
*/
|
|
5
6
|
|
|
6
7
|
import * as csstype from "csstype";
|
|
7
8
|
import type { PropKey, WidenPropValue } from "./jsx-properties.js";
|
|
8
9
|
import type { Element as SolidElement } from "solid-js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
|
-
* Originally based on JSX types for Surplus and Inferno and adapted for
|
|
12
|
+
* Originally based on JSX types for Surplus and Inferno and adapted for Solid.
|
|
12
13
|
*
|
|
13
14
|
* - https://github.com/adamhaile/surplus/blob/master/index.d.ts
|
|
14
15
|
* - https://github.com/infernojs/inferno/blob/master/packages/inferno/src/core/types.ts
|
|
@@ -1079,6 +1080,7 @@ export namespace JSX {
|
|
|
1079
1080
|
type HTMLFormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
1080
1081
|
type HTMLFormMethod = "post" | "get" | "dialog";
|
|
1081
1082
|
type HTMLCrossorigin = "anonymous" | "use-credentials" | EnumeratedAcceptsEmpty;
|
|
1083
|
+
type HTMLFetchPriority = "high" | "low" | "auto";
|
|
1082
1084
|
type HTMLReferrerPolicy =
|
|
1083
1085
|
| "no-referrer"
|
|
1084
1086
|
| "no-referrer-when-downgrade"
|
|
@@ -1104,21 +1106,20 @@ export namespace JSX {
|
|
|
1104
1106
|
| "allow-top-navigation"
|
|
1105
1107
|
| "allow-top-navigation-by-user-activation"
|
|
1106
1108
|
| "allow-top-navigation-to-custom-protocols";
|
|
1107
|
-
type
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1109
|
+
type HTMLPreloadAs = "fetch" | "font" | "image" | "script" | "style" | "track";
|
|
1110
|
+
type HTMLLinkAs = HTMLPreloadAs | "audio" | "document" | "embed" | "object" | "video" | "worker";
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* `xmlns` on the tags that exist in both HTML and SVG (`a`, `script`, `style`,
|
|
1114
|
+
* `title`). The compiler reads it to pick the namespace when the tag is not
|
|
1115
|
+
* nested under `<svg>` at compile time (e.g. an XML partial), and `dynamic()`
|
|
1116
|
+
* honors it the same way when creating a tag-name element at runtime.
|
|
1117
|
+
*/
|
|
1118
|
+
interface AmbiguousNamespaceAttributes {
|
|
1119
|
+
xmlns?: string | RemoveAttribute;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {
|
|
1122
1123
|
download?: string | EnumeratedAcceptsEmpty | RemoveAttribute;
|
|
1123
1124
|
href?: string | SerializableAttributeValue | RemoveAttribute;
|
|
1124
1125
|
hreflang?: string | RemoveAttribute;
|
|
@@ -1137,7 +1138,7 @@ export namespace JSX {
|
|
|
1137
1138
|
/** Serialized (JSON) history state pushed alongside the navigation. */
|
|
1138
1139
|
state?: string | RemoveAttribute;
|
|
1139
1140
|
/** Suppress scroll restoration/reset after the navigation. */
|
|
1140
|
-
|
|
1141
|
+
noscroll?: BooleanAttribute | RemoveAttribute;
|
|
1141
1142
|
/** Replace the current history entry instead of pushing a new one. */
|
|
1142
1143
|
replace?: BooleanAttribute | RemoveAttribute;
|
|
1143
1144
|
/** Route preload intent; `"false"` disables the integration's default eager preload. */
|
|
@@ -1366,7 +1367,7 @@ export namespace JSX {
|
|
|
1366
1367
|
browsingtopics?: string | RemoveAttribute;
|
|
1367
1368
|
crossorigin?: HTMLCrossorigin | RemoveAttribute;
|
|
1368
1369
|
decoding?: "sync" | "async" | "auto" | RemoveAttribute;
|
|
1369
|
-
fetchpriority?:
|
|
1370
|
+
fetchpriority?: HTMLFetchPriority | RemoveAttribute;
|
|
1370
1371
|
height?: number | string | RemoveAttribute;
|
|
1371
1372
|
ismap?: BooleanAttribute | RemoveAttribute;
|
|
1372
1373
|
loading?: "eager" | "lazy" | RemoveAttribute;
|
|
@@ -1521,7 +1522,7 @@ export namespace JSX {
|
|
|
1521
1522
|
color?: string | RemoveAttribute;
|
|
1522
1523
|
crossorigin?: HTMLCrossorigin | RemoveAttribute;
|
|
1523
1524
|
disabled?: BooleanAttribute | RemoveAttribute;
|
|
1524
|
-
fetchpriority?:
|
|
1525
|
+
fetchpriority?: HTMLFetchPriority | RemoveAttribute;
|
|
1525
1526
|
href?: string | RemoveAttribute;
|
|
1526
1527
|
hreflang?: string | RemoveAttribute;
|
|
1527
1528
|
imagesizes?: string | RemoveAttribute;
|
|
@@ -1707,12 +1708,12 @@ export namespace JSX {
|
|
|
1707
1708
|
max?: number | string | RemoveAttribute;
|
|
1708
1709
|
value?: string | string[] | number | RemoveAttribute;
|
|
1709
1710
|
}
|
|
1710
|
-
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T
|
|
1711
|
+
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {
|
|
1711
1712
|
async?: BooleanAttribute | RemoveAttribute;
|
|
1712
1713
|
blocking?: "render" | RemoveAttribute;
|
|
1713
1714
|
crossorigin?: HTMLCrossorigin | RemoveAttribute;
|
|
1714
1715
|
defer?: BooleanAttribute | RemoveAttribute;
|
|
1715
|
-
fetchpriority?:
|
|
1716
|
+
fetchpriority?: HTMLFetchPriority | RemoveAttribute;
|
|
1716
1717
|
for?: string | RemoveAttribute;
|
|
1717
1718
|
integrity?: string | RemoveAttribute;
|
|
1718
1719
|
nomodule?: BooleanAttribute | RemoveAttribute;
|
|
@@ -1769,7 +1770,7 @@ export namespace JSX {
|
|
|
1769
1770
|
type?: string | RemoveAttribute;
|
|
1770
1771
|
width?: number | string | RemoveAttribute;
|
|
1771
1772
|
}
|
|
1772
|
-
interface StyleHTMLAttributes<T> extends HTMLAttributes<T
|
|
1773
|
+
interface StyleHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {
|
|
1773
1774
|
blocking?: "render" | RemoveAttribute;
|
|
1774
1775
|
media?: string | RemoveAttribute;
|
|
1775
1776
|
|
|
@@ -1870,6 +1871,7 @@ export namespace JSX {
|
|
|
1870
1871
|
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1871
1872
|
datetime?: string | RemoveAttribute;
|
|
1872
1873
|
}
|
|
1874
|
+
interface TitleHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {}
|
|
1873
1875
|
interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1874
1876
|
default?: BooleanAttribute | RemoveAttribute;
|
|
1875
1877
|
kind?:
|
|
@@ -3499,6 +3501,11 @@ export namespace JSX {
|
|
|
3499
3501
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement
|
|
3500
3502
|
*/
|
|
3501
3503
|
select: SelectHTMLAttributes<HTMLSelectElement> & Properties<HTMLSelectElement>;
|
|
3504
|
+
/**
|
|
3505
|
+
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/selectedcontent
|
|
3506
|
+
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectedContentElement
|
|
3507
|
+
*/
|
|
3508
|
+
selectedcontent: HTMLAttributes<HTMLElement> & Properties<HTMLElement>;
|
|
3502
3509
|
/**
|
|
3503
3510
|
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot
|
|
3504
3511
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement
|
|
@@ -3593,7 +3600,7 @@ export namespace JSX {
|
|
|
3593
3600
|
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
|
|
3594
3601
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLTitleElement
|
|
3595
3602
|
*/
|
|
3596
|
-
title:
|
|
3603
|
+
title: TitleHTMLAttributes<HTMLTitleElement> & Properties<HTMLTitleElement>;
|
|
3597
3604
|
/**
|
|
3598
3605
|
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
|
|
3599
3606
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import type { ChangeOrigin, Records } from "solid-js";
|
|
2
|
+
import type { RequestEvent } from "./server.js";
|
|
3
|
+
import type { TraceContext } from "./trace.js";
|
|
4
|
+
/**
|
|
5
|
+
* The records channel — `OBSERVE.records` — or `undefined` outside observe
|
|
6
|
+
* builds and where no observing core has loaded. An emitter's first check.
|
|
7
|
+
*/
|
|
8
|
+
export declare function records(): Records | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* One server function execution, delivered on
|
|
11
|
+
* `OBSERVE.records.subscribe("invocation", …)` once it settled.
|
|
12
|
+
* Serializable — the live handles (`event`, `args`, the thrown error)
|
|
13
|
+
* travel beside it in `InvocationLive`, not on it.
|
|
14
|
+
*/
|
|
15
|
+
export interface InvocationEvent {
|
|
16
|
+
/** The function id — the name a span or a log line carries. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** `true` for an in-process call during SSR, `false` for HTTP dispatch. */
|
|
19
|
+
direct: boolean;
|
|
20
|
+
/** `performance.now()` when the execution started. */
|
|
21
|
+
at: number;
|
|
22
|
+
/**
|
|
23
|
+
* Start → settle of the execution, in milliseconds. The execution is the
|
|
24
|
+
* `wrapInvocation`-wrapped run: what the request spent on the call,
|
|
25
|
+
* policy included (auth guards, per-function middleware). A generator or
|
|
26
|
+
* stream body settles at handoff — see `deferred`.
|
|
27
|
+
*/
|
|
28
|
+
durationMs: number;
|
|
29
|
+
outcome: "ok" | "error";
|
|
30
|
+
/**
|
|
31
|
+
* The settled value is a body the caller drives — a generator, a
|
|
32
|
+
* `ReadableStream` — so `durationMs` covers the call that produced it,
|
|
33
|
+
* not its consumption.
|
|
34
|
+
*/
|
|
35
|
+
deferred?: true;
|
|
36
|
+
/**
|
|
37
|
+
* Direct calls only: the hydration id of the `<Loading>` boundary whose
|
|
38
|
+
* render pass made the call — the `id` of that boundary's `"boundary"`
|
|
39
|
+
* record — so a boundary's wait can be read as the server-function calls
|
|
40
|
+
* it consisted of. Absent for a call outside any boundary's pass (the
|
|
41
|
+
* shell, or HTTP dispatch).
|
|
42
|
+
*/
|
|
43
|
+
boundary?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The live half of an invocation, for in-process consumers. Not part of the
|
|
47
|
+
* record: `args` and `result` are application data (name/PII policy belongs
|
|
48
|
+
* to the consumer), `error` is the value AS THROWN — before the HTTP
|
|
49
|
+
* handler's production sanitization replaces it on the wire — and `event`
|
|
50
|
+
* is the request event the call ran under (the per-call derived event for
|
|
51
|
+
* direct calls).
|
|
52
|
+
*/
|
|
53
|
+
export interface InvocationLive {
|
|
54
|
+
event: RequestEvent;
|
|
55
|
+
/** HTTP dispatch only; absent for direct calls. */
|
|
56
|
+
request?: Request;
|
|
57
|
+
args: unknown[];
|
|
58
|
+
/** The settled value, when `outcome` is `"ok"`. */
|
|
59
|
+
result?: unknown;
|
|
60
|
+
/** The thrown value, when `outcome` is `"error"`. */
|
|
61
|
+
error?: unknown;
|
|
62
|
+
}
|
|
63
|
+
export type InvocationListener = (event: InvocationEvent, live: InvocationLive) => void;
|
|
64
|
+
/**
|
|
65
|
+
* One server render — a `renderToString` or a `renderToStream` (a document,
|
|
66
|
+
* or a frame stream over the same core) — delivered on
|
|
67
|
+
* `OBSERVE.records.subscribe("render", …)` once it ended: the document
|
|
68
|
+
* returned, the stream's last fragment written, or the render torn down.
|
|
69
|
+
* The server-side account of the head's timing: what the shell cost, and
|
|
70
|
+
* how many `<Loading>` boundaries it waited on (each also a `"boundary"`
|
|
71
|
+
* record) — the facts the response's `Server-Timing` `solid-shell` metric
|
|
72
|
+
* is projected from. Serializable; the request the render served and its
|
|
73
|
+
* trace ride beside it in `RenderLive`.
|
|
74
|
+
*/
|
|
75
|
+
export interface RenderEvent {
|
|
76
|
+
/** `"string"` for `renderToString`, `"stream"` for `renderToStream`. */
|
|
77
|
+
mode: "string" | "stream";
|
|
78
|
+
/** `performance.now()` when the render began. */
|
|
79
|
+
at: number;
|
|
80
|
+
/**
|
|
81
|
+
* Render start → the shell complete, in milliseconds: for a stream, the
|
|
82
|
+
* head and shell handed to the sink (the head is frozen from here — a
|
|
83
|
+
* fragment can no longer add to it); for a string, the document assembled
|
|
84
|
+
* (the whole render). What `solid-shell` carries. Absent when the render
|
|
85
|
+
* ended before its shell — torn down or failed pre-shell.
|
|
86
|
+
*/
|
|
87
|
+
shellMs?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Render start → the render's end, in milliseconds: the document
|
|
90
|
+
* returned (`"string"`, equal to `shellMs`), the stream complete (every
|
|
91
|
+
* fragment written), or the teardown for the other outcomes.
|
|
92
|
+
*/
|
|
93
|
+
durationMs: number;
|
|
94
|
+
/**
|
|
95
|
+
* `<Loading>` boundaries the shell waited on — discovered with pending
|
|
96
|
+
* async and settled before the shell completed, each a `"boundary"`
|
|
97
|
+
* record with `streamed: false` and a `solid-boundary` metric. A boundary
|
|
98
|
+
* that settled after the shell streamed as a fragment and is not counted
|
|
99
|
+
* here (its own record says `streamed: true`). Counted from the
|
|
100
|
+
* `"boundary"` records the render filed, under that record's gate: in an
|
|
101
|
+
* observe build with a `"render"` listener but no `"boundary"` listener
|
|
102
|
+
* the boundaries are not measured and this is `0`.
|
|
103
|
+
*/
|
|
104
|
+
boundaries: number;
|
|
105
|
+
/**
|
|
106
|
+
* `"complete"` — the render ran to its end; `"abandoned"` — the consumer
|
|
107
|
+
* left mid-stream (the sink threw, the readable was cancelled — the
|
|
108
|
+
* `SSR_STREAM_ABANDONED` finding is that request's account) and the
|
|
109
|
+
* render was torn down; `"error"` — the render failed: a string render
|
|
110
|
+
* threw, a stream's uncontained failure wound it down through `onError`.
|
|
111
|
+
*/
|
|
112
|
+
outcome: "complete" | "abandoned" | "error";
|
|
113
|
+
}
|
|
114
|
+
/** The live half of a render record. */
|
|
115
|
+
export interface RenderLive {
|
|
116
|
+
/** The request event the render ran under; absent for a render outside a request scope. */
|
|
117
|
+
event?: RequestEvent;
|
|
118
|
+
/** The trace the render belongs to — `getTraceContext()`'s answer for it. */
|
|
119
|
+
trace: TraceContext;
|
|
120
|
+
}
|
|
121
|
+
export type RenderListener = (event: RenderEvent, live: RenderLive) => void;
|
|
122
|
+
/**
|
|
123
|
+
* One server-function call made from the browser — the fetch and its
|
|
124
|
+
* decode, as the caller awaited it — delivered on
|
|
125
|
+
* `OBSERVE.records.subscribe("call", …)` once it settled. The client twin
|
|
126
|
+
* of the server's `"invocation"` record: the two join by `id` (this is the
|
|
127
|
+
* call; that is the execution it caused), and the difference between their
|
|
128
|
+
* durations is the wire. A call an integration answered locally (a
|
|
129
|
+
* handler's `intercept`, at t = 0) made no request and emits nothing.
|
|
130
|
+
*/
|
|
131
|
+
export interface CallEvent {
|
|
132
|
+
/** The function id — the same `id` the server's `"invocation"` record carries. */
|
|
133
|
+
id: string;
|
|
134
|
+
/** `performance.now()` when the call was made. */
|
|
135
|
+
at: number;
|
|
136
|
+
/**
|
|
137
|
+
* Call → settle, in milliseconds: the request built and sent, the
|
|
138
|
+
* response received and decoded (or claimed by the configured
|
|
139
|
+
* `responseHandler`) — the whole await the caller saw. A streaming
|
|
140
|
+
* result settles at handoff — see `deferred`.
|
|
141
|
+
*/
|
|
142
|
+
durationMs: number;
|
|
143
|
+
/** `GET` for a GET-encoded read (`GET(fn)`), `POST` otherwise. */
|
|
144
|
+
method: "GET" | "POST";
|
|
145
|
+
outcome: "ok" | "error";
|
|
146
|
+
/**
|
|
147
|
+
* The response's HTTP status, once one arrived. Absent when the call
|
|
148
|
+
* failed before a response (the fetch itself rejected).
|
|
149
|
+
*/
|
|
150
|
+
status?: number;
|
|
151
|
+
/**
|
|
152
|
+
* What the call ran for, when the attribution engine
|
|
153
|
+
* (`solid-js/attribution`) is enabled and knows: the interaction whose
|
|
154
|
+
* handler made it (`kind: "interaction"`), the navigation whose data
|
|
155
|
+
* needed it (`kind: "navigation"`, its `interaction` the click), the
|
|
156
|
+
* effect or action step, the async landing whose recompute called again —
|
|
157
|
+
* the engine's own origin object, so it IS `InteractionEvent.origin` /
|
|
158
|
+
* `NavigationEvent.origin` / `HoldEvent.origin` by identity: an observer
|
|
159
|
+
* puts the call under the interaction's record without a time join. Read
|
|
160
|
+
* at dispatch, so a call made after an `await` in a handler stamps
|
|
161
|
+
* nothing (the same escape a write there has). Absent without an engine.
|
|
162
|
+
*/
|
|
163
|
+
origin?: ChangeOrigin;
|
|
164
|
+
/**
|
|
165
|
+
* The settled value is a body the caller drives — an async iterable
|
|
166
|
+
* (a `live()` source, a generator result) — so `durationMs` covers the
|
|
167
|
+
* call that produced it, not its consumption.
|
|
168
|
+
*/
|
|
169
|
+
deferred?: true;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* The live half of a call, for in-process consumers. `response` is the
|
|
173
|
+
* transport's own object, not a clone: its status and headers are
|
|
174
|
+
* readable, its body is the decode's (already consumed, or being consumed
|
|
175
|
+
* by the caller for a streaming result). `error` is the value as thrown to
|
|
176
|
+
* the caller — a decoded server error, or the transport's own failure.
|
|
177
|
+
*/
|
|
178
|
+
export interface CallLive {
|
|
179
|
+
args: unknown[];
|
|
180
|
+
response?: Response;
|
|
181
|
+
/** The settled value, when `outcome` is `"ok"`. */
|
|
182
|
+
result?: unknown;
|
|
183
|
+
/** The thrown value, when `outcome` is `"error"`. */
|
|
184
|
+
error?: unknown;
|
|
185
|
+
}
|
|
186
|
+
export type CallListener = (event: CallEvent, live: CallLive) => void;
|
|
187
|
+
interface FrameEventBase {
|
|
188
|
+
/**
|
|
189
|
+
* The frame id on the wire: the server function's id when the stream is a
|
|
190
|
+
* server-function response (the same `id` that call's `"invocation"` and
|
|
191
|
+
* `"call"` records carry), or what the producer named it; `""` for a bare
|
|
192
|
+
* `renderToFrameStream` with no `frame` option.
|
|
193
|
+
*/
|
|
194
|
+
id: string;
|
|
195
|
+
/**
|
|
196
|
+
* The stream version: as the producer stamped it on the server; as the
|
|
197
|
+
* client restamped it on the client (the consumer owns versions — one
|
|
198
|
+
* per stream a boundary consumed — so this is the number the frame's
|
|
199
|
+
* stale-guard saw).
|
|
200
|
+
*/
|
|
201
|
+
version: number;
|
|
202
|
+
/** `performance.now()` at the stream's `start` chunk — written, or read. */
|
|
203
|
+
at: number;
|
|
204
|
+
/**
|
|
205
|
+
* Start → `complete`, in milliseconds: the whole stream, fragments
|
|
206
|
+
* included. On the client this is the body's read and apply — the
|
|
207
|
+
* request that produced the response is the `"call"` record's time.
|
|
208
|
+
*/
|
|
209
|
+
durationMs: number;
|
|
210
|
+
/**
|
|
211
|
+
* Start → the shell (`html`) chunk, in milliseconds: the time to first
|
|
212
|
+
* content. Absent when the stream carried no shell (the server's
|
|
213
|
+
* synchronous failure path).
|
|
214
|
+
*/
|
|
215
|
+
shellMs?: number;
|
|
216
|
+
/** Chunks between `start` and `complete` (exclusive), all types. */
|
|
217
|
+
chunks: number;
|
|
218
|
+
/** `fragment` chunks: `<Loading>` content that settled after the shell. */
|
|
219
|
+
fragments: number;
|
|
220
|
+
/** `slot` chunks: render-prop invocations the client fills. */
|
|
221
|
+
slots: number;
|
|
222
|
+
/**
|
|
223
|
+
* Nested server-content regions (a server JSX slot argument): `html`
|
|
224
|
+
* chunks addressed to a child frame id rather than the stream's own.
|
|
225
|
+
*/
|
|
226
|
+
regions: number;
|
|
227
|
+
/** `error` chunks: fragments that failed (their fallback still revealed), plus a sync failure. */
|
|
228
|
+
errors: number;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* The server half of a `"frame"` record: one frame stream produced — a
|
|
232
|
+
* server component rendered to the frame transport
|
|
233
|
+
* (`renderServerComponent` / `renderToFrameStream`), from its `start`
|
|
234
|
+
* chunk to its `complete` — delivered once it completed.
|
|
235
|
+
*/
|
|
236
|
+
export interface FrameProducedEvent extends FrameEventBase {
|
|
237
|
+
side: "server";
|
|
238
|
+
/**
|
|
239
|
+
* `complete` — the render ran to the end (fragment failures, if any, are
|
|
240
|
+
* in `errors`); `error` — the render threw synchronously, the stream
|
|
241
|
+
* carried the failure as its only content and completed.
|
|
242
|
+
*/
|
|
243
|
+
outcome: "complete" | "error";
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* The client half of a `"frame"` record: one frame stream applied — a
|
|
247
|
+
* frame-stream response read chunk by chunk into the frame host
|
|
248
|
+
* (`applyFrameResponse`), from its `start` to its `complete` — delivered
|
|
249
|
+
* once the stream ended. A single-flight response carries one stream per
|
|
250
|
+
* frame it refreshed; each is its own record, as on the server.
|
|
251
|
+
*/
|
|
252
|
+
export interface FrameAppliedEvent extends FrameEventBase {
|
|
253
|
+
side: "client";
|
|
254
|
+
/**
|
|
255
|
+
* The local id the chunks were applied under, when the consumer remapped
|
|
256
|
+
* the producer's root id onto its own boundary (`applyFrameResponse`'s
|
|
257
|
+
* `as` — the call's address, for the server-component transport).
|
|
258
|
+
* Absent when applied under the wire id.
|
|
259
|
+
*/
|
|
260
|
+
address?: string;
|
|
261
|
+
/**
|
|
262
|
+
* `complete` — the `complete` chunk arrived; `truncated` — the body ended
|
|
263
|
+
* before it (the connection dropped, the producer abandoned the stream);
|
|
264
|
+
* `error` — the read failed (a malformed chunk, a body error), with the
|
|
265
|
+
* failure in `live.error`.
|
|
266
|
+
*/
|
|
267
|
+
outcome: "complete" | "truncated" | "error";
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* One frame stream, from whichever end observed it — delivered on
|
|
271
|
+
* `OBSERVE.records.subscribe("frame", …)`; `side` says which. The two
|
|
272
|
+
* halves share their shape (the same census, the same timings measured
|
|
273
|
+
* where each stands), so a consumer joins them by `id` and `version` and
|
|
274
|
+
* the difference is the wire.
|
|
275
|
+
*/
|
|
276
|
+
export type FrameEvent = FrameProducedEvent | FrameAppliedEvent;
|
|
277
|
+
/** The live half of a frame record. */
|
|
278
|
+
export interface FrameLive {
|
|
279
|
+
/** The value thrown: the server's sync failure, or the client's read failure. */
|
|
280
|
+
error?: unknown;
|
|
281
|
+
/** Client only: the response the stream was read from. */
|
|
282
|
+
response?: Response;
|
|
283
|
+
}
|
|
284
|
+
export type FrameListener = (event: FrameEvent, live: FrameLive) => void;
|
|
285
|
+
declare module "solid-js" {
|
|
286
|
+
interface HostRecordTypes {
|
|
287
|
+
/** Server-function executions, on the server — see `InvocationEvent`. */
|
|
288
|
+
invocation: {
|
|
289
|
+
event: InvocationEvent;
|
|
290
|
+
live: InvocationLive;
|
|
291
|
+
};
|
|
292
|
+
/** Server renders — a document or a frame stream — see `RenderEvent`. */
|
|
293
|
+
render: {
|
|
294
|
+
event: RenderEvent;
|
|
295
|
+
live: RenderLive;
|
|
296
|
+
};
|
|
297
|
+
/** Server-function calls, from the client — see `CallEvent`. */
|
|
298
|
+
call: {
|
|
299
|
+
event: CallEvent;
|
|
300
|
+
live: CallLive;
|
|
301
|
+
};
|
|
302
|
+
/** Frame streams, produced or applied — see `FrameEvent`. */
|
|
303
|
+
frame: {
|
|
304
|
+
event: FrameEvent;
|
|
305
|
+
live: FrameLive;
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
export declare function settledPromise(value: unknown): Promise<unknown> | undefined;
|
|
310
|
+
export declare function isDeferredBody(value: unknown): boolean;
|
|
311
|
+
/**
|
|
312
|
+
* The census one frame stream's chunks add up to, kept by either half: one
|
|
313
|
+
* chunk of `type`, addressed to the stream's own frame (`own`) or to a
|
|
314
|
+
* nested region's.
|
|
315
|
+
*/
|
|
316
|
+
export declare function frameCensus(event: FrameEventBase, type: string, own: boolean): void;
|
|
317
|
+
/** What the client runtime hands a call observation as the call proceeds. */
|
|
318
|
+
export interface CallObservation {
|
|
319
|
+
/** The response arrived (before decode); its status goes on the record. */
|
|
320
|
+
response(response: Response): void;
|
|
321
|
+
/** The call settled as the caller sees it: the value returned, or the error thrown. */
|
|
322
|
+
settle(outcome: "ok" | "error", value: unknown): void;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Opens the observation of one server-function call from the client, as
|
|
326
|
+
* the request is about to be built; the runtime reports the response when
|
|
327
|
+
* it arrives and the settle when the caller gets its answer. `undefined`
|
|
328
|
+
* with no listener or outside observe builds — the runtime then does
|
|
329
|
+
* nothing extra, not even read the clock.
|
|
330
|
+
*/
|
|
331
|
+
export declare function observeCall(id: string, method: "GET" | "POST", args: unknown[]): CallObservation | undefined;
|
|
332
|
+
/** What the client's stream reader hands a frame observation. */
|
|
333
|
+
export interface FrameApplyObservation {
|
|
334
|
+
/**
|
|
335
|
+
* Every chunk read, after the consumer's remapping (`as`, `version`) —
|
|
336
|
+
* `wireId` is the id the chunk carried before it.
|
|
337
|
+
*/
|
|
338
|
+
chunk(chunk: {
|
|
339
|
+
type: string;
|
|
340
|
+
id: string;
|
|
341
|
+
version: number;
|
|
342
|
+
}, wireId: string): void;
|
|
343
|
+
/**
|
|
344
|
+
* The apply ended — cleanly, or with the failure it threw (a read that
|
|
345
|
+
* failed, a chunk that would not parse, a host that rejected a chunk).
|
|
346
|
+
*/
|
|
347
|
+
end(error?: unknown): void;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Opens the observation of one frame-stream response on the client: every
|
|
351
|
+
* `start` chunk opens a stream record (a single-flight response carries
|
|
352
|
+
* several, in sequence), every chunk until its `complete` is counted to
|
|
353
|
+
* it, and the record is delivered at `complete` — or at the body's end as
|
|
354
|
+
* `truncated`, or at a read failure as `error`. `undefined` with no
|
|
355
|
+
* listener or outside observe builds.
|
|
356
|
+
*/
|
|
357
|
+
export declare function observeFrameApply(response: Response): FrameApplyObservation | undefined;
|
|
358
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function reconcileArrays(parentNode: Node, a: Node[], b: Node[], marker?: Node | null): void;
|