@solidjs/web 2.0.0-rc.6 → 2.0.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{server.cjs → server.dev.js} +274 -272
- package/dist/server.js +119 -36
- package/dist/{dev.js → web.dev.js} +131 -399
- package/dist/web.js +78 -388
- package/dist/{web.cjs → web.observe.js} +174 -622
- package/frames/dist/client.dev.js +11 -3
- package/frames/dist/client.js +11 -3
- package/frames/dist/{server.cjs → server.dev.js} +375 -125
- package/frames/dist/server.js +253 -32
- package/frames/package.json +7 -15
- package/package.json +88 -251
- package/serialization/decode/package.json +3 -9
- package/serialization/dist/decode.js +18 -4
- package/serialization/dist/serialization.js +18 -4
- package/serialization/package.json +3 -9
- package/serialization/types/serializer-decode.d.ts +49 -2
- package/server-functions/dist/client.js +13 -14
- package/server-functions/dist/server.dev.js +359 -85
- package/server-functions/dist/server.js +352 -86
- package/server-functions/package.json +6 -24
- package/server-functions/rich-args/package.json +3 -9
- package/storage/package.json +3 -9
- package/types/client.d.ts +17 -3
- package/types/frames/frame-client.d.ts +1 -1
- package/types/frames/serializer-decode.d.ts +49 -2
- package/types/head.d.ts +3 -0
- package/types/index.d.ts +18 -7
- package/types/index.server.d.ts +31 -9
- package/types/render.d.ts +3 -1
- package/types/serializer-decode.d.ts +49 -2
- package/types/server-functions/flash.d.ts +12 -3
- package/types/server-functions/server.d.ts +50 -3
- package/types/server-mock.d.ts +43 -7
- package/types/server.d.ts +48 -6
- package/dist/dev.cjs +0 -2590
- package/frames/dist/client.cjs +0 -2035
- package/frames/dist/client.dev.cjs +0 -2055
- package/serialization/dist/decode.cjs +0 -141
- package/serialization/dist/serialization.cjs +0 -261
- package/serialization/types-cjs/index.d.cts +0 -101
- package/serialization/types-cjs/package.json +0 -3
- package/serialization/types-cjs/serializer-decode.d.cts +0 -172
- package/serialization/types-cjs/serializer.d.cts +0 -101
- package/server-functions/dist/client.cjs +0 -1070
- package/server-functions/dist/rich-args.cjs +0 -11
- package/server-functions/dist/server.cjs +0 -2133
- package/server-functions/dist/server.dev.cjs +0 -2153
- 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/patch-driver.d.ts +0 -3
- package/types-cjs/client.d.cts +0 -200
- package/types-cjs/constants.d.cts +0 -20
- package/types-cjs/cookies.d.cts +0 -41
- package/types-cjs/frames/client.d.cts +0 -36
- package/types-cjs/frames/frame-client.d.cts +0 -370
- package/types-cjs/frames/frame-container-plugin.d.cts +0 -71
- package/types-cjs/frames/frame-sink.d.cts +0 -92
- package/types-cjs/frames/frame-transport.d.cts +0 -189
- package/types-cjs/frames/serializer-decode.d.cts +0 -172
- package/types-cjs/frames/serializer.d.cts +0 -101
- package/types-cjs/frames/server.d.cts +0 -52
- package/types-cjs/head.d.cts +0 -16
- package/types-cjs/index.d.cts +0 -180
- package/types-cjs/index.server.d.cts +0 -125
- package/types-cjs/jsx-properties.d.cts +0 -93
- package/types-cjs/jsx.d.cts +0 -4146
- package/types-cjs/package.json +0 -3
- package/types-cjs/patch-driver.d.cts +0 -3
- package/types-cjs/reconcile.d.cts +0 -1
- package/types-cjs/render.d.cts +0 -4
- package/types-cjs/response.d.cts +0 -81
- package/types-cjs/serializer-decode.d.cts +0 -172
- package/types-cjs/serializer.d.cts +0 -101
- package/types-cjs/server-functions/client.d.cts +0 -184
- package/types-cjs/server-functions/flash.d.cts +0 -27
- package/types-cjs/server-functions/registry.d.cts +0 -100
- package/types-cjs/server-functions/rich-args.d.cts +0 -1
- package/types-cjs/server-functions/server.d.cts +0 -522
- package/types-cjs/server-functions/shared.d.cts +0 -283
- package/types-cjs/server-mock.d.cts +0 -301
- package/types-cjs/server.d.cts +0 -366
package/types/server.d.ts
CHANGED
|
@@ -5,10 +5,7 @@ export { clearFlashCookie, hasFlashCookie } from "./cookies.js";
|
|
|
5
5
|
export { getServerFunctionMetadata, getServerFunctionRPC, isServerFunction } from "./server-functions/registry.js";
|
|
6
6
|
import { JSX } from "./jsx.js";
|
|
7
7
|
import { SerializerPlugin } from "./serializer-decode.js";
|
|
8
|
-
|
|
9
|
-
export type PreloadLink = {
|
|
10
|
-
href: string;
|
|
11
|
-
as: JSX.HTMLPreloadAs;
|
|
8
|
+
type PreloadLinkAttributes = {
|
|
12
9
|
type?: string;
|
|
13
10
|
crossorigin?: JSX.HTMLCrossorigin;
|
|
14
11
|
integrity?: string;
|
|
@@ -16,7 +13,44 @@ export type PreloadLink = {
|
|
|
16
13
|
fetchpriority?: JSX.HTMLFetchPriority;
|
|
17
14
|
media?: string;
|
|
18
15
|
};
|
|
19
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* An explicit `<link rel="preload">` emitted by the SSR asset pipeline.
|
|
18
|
+
*
|
|
19
|
+
* `as` is the HTML Standard's set of preload destinations exactly — anything
|
|
20
|
+
* else translates to null and the browser does nothing with the link.
|
|
21
|
+
*
|
|
22
|
+
* `imagesrcset` candidates must already be resolved by the integration: they
|
|
23
|
+
* are carried verbatim (a relative candidate resolves against the DOCUMENT
|
|
24
|
+
* URL, not the manifest base). Pair it with `imagesizes` whenever a candidate
|
|
25
|
+
* uses a width descriptor, which the spec requires — without it the source
|
|
26
|
+
* size falls back to `100vw` and the preload can miss the image the `<img>`
|
|
27
|
+
* selects. Omitting `href` is the spec's own recommendation for the source-set
|
|
28
|
+
* form: it would only serve browsers without `imagesrcset` support, and there
|
|
29
|
+
* it would likely preload the wrong candidate.
|
|
30
|
+
*/
|
|
31
|
+
export type PreloadLink = PreloadLinkAttributes & ({
|
|
32
|
+
href: string;
|
|
33
|
+
as: Exclude<JSX.HTMLPreloadAs, "image">;
|
|
34
|
+
imagesrcset?: never;
|
|
35
|
+
imagesizes?: never;
|
|
36
|
+
} | {
|
|
37
|
+
href: string;
|
|
38
|
+
as: "image";
|
|
39
|
+
imagesrcset?: string;
|
|
40
|
+
imagesizes?: string;
|
|
41
|
+
} | {
|
|
42
|
+
href?: never;
|
|
43
|
+
as: "image";
|
|
44
|
+
imagesrcset: string;
|
|
45
|
+
imagesizes?: string;
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Static asset graph consumed by the SSR pipeline. This is Solid's own
|
|
49
|
+
* contract — a parsed Vite client manifest satisfies it structurally
|
|
50
|
+
* (unknown fields pass through untyped), but any bundler integration can
|
|
51
|
+
* produce it. Only these fields are ever read: `preloads` is Solid's
|
|
52
|
+
* extension slot for explicit typed links the integration selects.
|
|
53
|
+
*/
|
|
20
54
|
export type AssetManifest = Record<string, {
|
|
21
55
|
file: string;
|
|
22
56
|
css?: string[];
|
|
@@ -233,6 +267,14 @@ export declare function renderToStream<T>(fn: () => T, options?: {
|
|
|
233
267
|
* await renderToStream(...)`). Render errors route through `onError` and
|
|
234
268
|
* the promise resolves with whatever HTML the render produced; it never
|
|
235
269
|
* rejects.
|
|
270
|
+
*
|
|
271
|
+
* Completion is this path's head-freeze point: the request event's
|
|
272
|
+
* `response` head (the request scope the render was started in) is
|
|
273
|
+
* committed right before the render's final dispose, so
|
|
274
|
+
* `httpStatus`/`httpHeader` declarations still live at completion survive
|
|
275
|
+
* into `createSSRResponse(html, event)` — which sees the already-committed
|
|
276
|
+
* stub and passes it through. The piped forms freeze at shell flush
|
|
277
|
+
* instead.
|
|
236
278
|
*/
|
|
237
279
|
then<TResult1 = string, TResult2 = never>(onfulfilled?: ((html: string) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
238
280
|
pipe: (writable: {
|
|
@@ -362,5 +404,5 @@ export declare function composeMiddleware(middlewares: FetchMiddleware[]): (requ
|
|
|
362
404
|
export declare function registerElementClaim(handler: (element: Element) => void): () => void;
|
|
363
405
|
export declare function claimElement<T extends Element>(node: T): T;
|
|
364
406
|
export declare function claimElementTree<T extends Node>(root: T): T;
|
|
365
|
-
export { notSup as style, notSup as insert, notSup as spread, notSup as delegateEvents, notSup as registerDelegatedRoot, notSup as unregisterDelegatedRoot, notSup as registerDelegatedContainer, notSup as unregisterDelegatedContainer, notSup as getDelegatedRoot, notSup as dynamicProperty, notSup as setAttribute, notSup as setAttributeNS, notSup as addEvent, notSup as render, notSup as template, notSup as setProperty, notSup as className, notSup as assign, notSup as hydrate, notSup as getNextElement, notSup as getNextMatch, notSup as getNextMarker, notSup as runHydrationEvents, notSup as ref, notSup as setStyleProperty, notSup as acquireAsset };
|
|
407
|
+
export { notSup as style, notSup as insert, notSup as spread, notSup as delegateEvents, notSup as registerDelegatedRoot, notSup as unregisterDelegatedRoot, notSup as registerDelegatedContainer, notSup as unregisterDelegatedContainer, notSup as getDelegatedRoot, notSup as dynamicProperty, notSup as setAttribute, notSup as setAttributeNS, notSup as addEvent, notSup as render, notSup as template, notSup as setProperty, notSup as className, notSup as assign, notSup as hydrate, notSup as getNextElement, notSup as getNextMatch, notSup as getNextMarker, notSup as runHydrationEvents, notSup as ref, notSup as setStyleProperty, notSup as readShallow, notSup as acquireAsset };
|
|
366
408
|
declare function notSup(): void;
|