@solidjs/web 2.0.0-rc.2 → 2.0.0-rc.20
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 +5065 -0
- package/dist/server.js +1757 -355
- package/dist/{server.cjs → server.observe.js} +1951 -558
- package/dist/{dev.cjs → web.dev.js} +945 -550
- package/dist/web.js +635 -332
- package/dist/{dev.js → web.observe.js} +688 -403
- package/frames/dist/assets.js +92 -0
- package/frames/dist/client.dev.js +1296 -1198
- package/frames/dist/client.js +1128 -1191
- package/frames/dist/client.observe.js +2041 -0
- package/frames/dist/regions.js +171 -0
- package/frames/dist/server.dev.js +2549 -0
- package/frames/dist/server.js +1688 -3005
- package/frames/dist/server.observe.js +2548 -0
- package/frames/dist/trace.js +45 -0
- package/frames/dist/wire.js +594 -0
- package/frames/package.json +2 -25
- package/package.json +244 -256
- package/performance-tracks/dist/performance-tracks.dev.js +679 -0
- package/performance-tracks/dist/performance-tracks.js +6 -0
- package/performance-tracks/dist/performance-tracks.observe.js +667 -0
- package/performance-tracks/package.json +7 -0
- package/performance-tracks/types/index.d.ts +69 -0
- package/serialization/decode/package.json +2 -15
- package/serialization/dist/decode.js +121 -25
- package/serialization/dist/serialization.js +242 -88
- package/serialization/package.json +2 -15
- package/serialization/types/index.d.ts +85 -158
- package/serialization/types/serializer-decode.d.ts +173 -114
- package/serialization/types/serializer.d.ts +109 -0
- package/server-functions/dist/client.dev.js +1462 -0
- package/server-functions/dist/client.js +667 -165
- package/server-functions/dist/client.observe.js +1441 -0
- package/server-functions/dist/rich-args.js +84 -1
- package/server-functions/dist/server.dev.js +2714 -297
- package/server-functions/dist/server.js +2595 -271
- package/server-functions/dist/server.observe.js +3594 -0
- package/server-functions/package.json +2 -35
- package/server-functions/rich-args/package.json +2 -15
- package/skills/server-components/SKILL.md +117 -0
- package/storage/package.json +2 -15
- package/types/client.d.ts +342 -288
- package/types/constants.d.ts +22 -0
- package/types/cookies.d.ts +32 -84
- package/types/diagnostics.d.ts +80 -0
- package/types/frames/assets-tier.d.ts +78 -0
- package/types/frames/client.d.ts +40 -1
- package/types/frames/frame-client.d.ts +443 -280
- package/types/frames/frame-container-plugin.d.ts +64 -0
- package/types/frames/frame-morph.d.ts +29 -0
- package/types/frames/frame-sink.d.ts +141 -161
- package/types/frames/frame-transport.d.ts +263 -184
- package/types/frames/regions-tier.d.ts +60 -0
- package/types/frames/serializer-decode.d.ts +241 -0
- package/types/frames/serializer.d.ts +85 -158
- package/types/frames/server.d.ts +2 -2
- package/types/frames/trace-tier.d.ts +2 -0
- package/types/frames/tree-rewrite.d.ts +39 -0
- package/types/frames/wire-tier.d.ts +169 -0
- package/types/head.d.ts +20 -0
- package/types/index.d.ts +98 -81
- package/types/index.server.d.ts +159 -0
- package/types/jsx.d.ts +49 -44
- package/types/observe.d.ts +535 -0
- package/types/reconcile.d.ts +1 -0
- package/types/render.d.ts +11 -0
- package/types/request-error-hook.d.ts +5 -0
- package/types/response.d.ts +95 -147
- package/types/serializer-decode.d.ts +173 -114
- package/types/serializer.d.ts +85 -158
- package/types/server-functions/argument-codec.d.ts +30 -0
- package/types/server-functions/client.d.ts +238 -223
- package/types/server-functions/flash.d.ts +28 -30
- package/types/server-functions/registry.d.ts +105 -0
- package/types/server-functions/rich-args.d.ts +1 -10
- package/types/server-functions/server.d.ts +539 -531
- package/types/server-functions/shared.d.ts +398 -425
- package/types/server-functions/uploads.d.ts +50 -0
- package/types/server-mock.d.ts +120 -13
- package/types/server-observe.d.ts +86 -0
- package/types/server.d.ts +571 -422
- package/types/trace.d.ts +127 -0
- package/LICENSE +0 -21
- package/dist/web.cjs +0 -2033
- package/frames/dist/client.cjs +0 -2002
- package/frames/dist/client.dev.cjs +0 -2022
- package/frames/dist/server.cjs +0 -3877
- package/serialization/dist/decode.cjs +0 -139
- package/serialization/dist/serialization.cjs +0 -261
- 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 -834
- package/server-functions/dist/rich-args.cjs +0 -11
- package/server-functions/dist/server.cjs +0 -1242
- package/server-functions/dist/server.dev.cjs +0 -1242
- 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 -9
- package/types-cjs/client.d.cts +0 -337
- package/types-cjs/cookies.d.cts +0 -93
- package/types-cjs/core.d.cts +0 -9
- package/types-cjs/frames/client.d.cts +0 -36
- package/types-cjs/frames/frame-client.d.cts +0 -356
- 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 -244
- package/types-cjs/jsx-properties.d.cts +0 -93
- package/types-cjs/jsx.d.cts +0 -4159
- 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 -262
- 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 -681
- package/types-cjs/server-functions/shared.d.cts +0 -523
- package/types-cjs/server-mock.d.cts +0 -286
- package/types-cjs/server.d.cts +0 -544
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
|
|
@@ -230,7 +231,7 @@ export namespace JSX {
|
|
|
230
231
|
| boolean
|
|
231
232
|
| null
|
|
232
233
|
| undefined
|
|
233
|
-
| Record<string, boolean>
|
|
234
|
+
| Record<string, boolean | undefined>
|
|
234
235
|
| ClassValue[];
|
|
235
236
|
|
|
236
237
|
const SERIALIZABLE: unique symbol;
|
|
@@ -250,12 +251,12 @@ export namespace JSX {
|
|
|
250
251
|
children?: Element | undefined;
|
|
251
252
|
$ServerOnly?: boolean | undefined;
|
|
252
253
|
/**
|
|
253
|
-
* Entity identity for server markup
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* identity
|
|
254
|
+
* Entity identity for server markup: the frame morph matches keyed
|
|
255
|
+
* elements across responses by it, so client state attached to the
|
|
256
|
+
* element (focus, selection) follows the entity through reorders and
|
|
257
|
+
* refetches. SSR compiles it to the `_key` attribute; a DOM compile strips
|
|
258
|
+
* it. On a component, `$key` is slot occurrence identity across
|
|
259
|
+
* responses (optional; without it identity is positional).
|
|
259
260
|
*/
|
|
260
261
|
$key?: string | number | undefined;
|
|
261
262
|
}
|
|
@@ -894,6 +895,13 @@ export namespace JSX {
|
|
|
894
895
|
extends CustomAttributes<T>, PropAttributes, EventHandlersElement<T>, AriaAttributes {
|
|
895
896
|
// [key: ClassKeys]: boolean;
|
|
896
897
|
|
|
898
|
+
/**
|
|
899
|
+
* `data-*` attributes. JSX already accepts hyphenated names; this types
|
|
900
|
+
* them in props objects too (`ComponentProps<"div">`, a spread's source).
|
|
901
|
+
* `true` writes `""`; `false` and `undefined` remove the attribute.
|
|
902
|
+
*/
|
|
903
|
+
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
904
|
+
|
|
897
905
|
// properties
|
|
898
906
|
innerHTML?: string;
|
|
899
907
|
textContent?: string | number;
|
|
@@ -1088,6 +1096,7 @@ export namespace JSX {
|
|
|
1088
1096
|
type HTMLFormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain";
|
|
1089
1097
|
type HTMLFormMethod = "post" | "get" | "dialog";
|
|
1090
1098
|
type HTMLCrossorigin = "anonymous" | "use-credentials" | EnumeratedAcceptsEmpty;
|
|
1099
|
+
type HTMLFetchPriority = "high" | "low" | "auto";
|
|
1091
1100
|
type HTMLReferrerPolicy =
|
|
1092
1101
|
| "no-referrer"
|
|
1093
1102
|
| "no-referrer-when-downgrade"
|
|
@@ -1113,21 +1122,20 @@ export namespace JSX {
|
|
|
1113
1122
|
| "allow-top-navigation"
|
|
1114
1123
|
| "allow-top-navigation-by-user-activation"
|
|
1115
1124
|
| "allow-top-navigation-to-custom-protocols";
|
|
1116
|
-
type
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1125
|
+
type HTMLPreloadAs = "fetch" | "font" | "image" | "script" | "style" | "track";
|
|
1126
|
+
type HTMLLinkAs = HTMLPreloadAs | "audio" | "document" | "embed" | "object" | "video" | "worker";
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* `xmlns` on the tags that exist in both HTML and SVG (`a`, `script`, `style`,
|
|
1130
|
+
* `title`). The compiler reads it to pick the namespace when the tag is not
|
|
1131
|
+
* nested under `<svg>` at compile time (e.g. an XML partial), and `dynamic()`
|
|
1132
|
+
* honors it the same way when creating a tag-name element at runtime.
|
|
1133
|
+
*/
|
|
1134
|
+
interface AmbiguousNamespaceAttributes {
|
|
1135
|
+
xmlns?: string | RemoveAttribute;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {
|
|
1131
1139
|
download?: string | EnumeratedAcceptsEmpty | RemoveAttribute;
|
|
1132
1140
|
href?: string | SerializableAttributeValue | RemoveAttribute;
|
|
1133
1141
|
hreflang?: string | RemoveAttribute;
|
|
@@ -1137,20 +1145,11 @@ export namespace JSX {
|
|
|
1137
1145
|
target?: "_self" | "_blank" | "_parent" | "_top" | (string & {}) | RemoveAttribute;
|
|
1138
1146
|
type?: string | RemoveAttribute;
|
|
1139
1147
|
|
|
1140
|
-
// Client-side navigation contract.
|
|
1141
|
-
//
|
|
1142
|
-
//
|
|
1143
|
-
// so plain `<a>` elements participate without per-router augmentation.
|
|
1148
|
+
// Client-side navigation contract. `link` is inert markup on its own —
|
|
1149
|
+
// a routing integration that delegates anchor clicks (e.g. @solidjs/router)
|
|
1150
|
+
// reads it off the element at event time.
|
|
1144
1151
|
/** Marks the anchor as a client-navigation link when the integration requires explicit opt-in. */
|
|
1145
1152
|
link?: BooleanAttribute | RemoveAttribute;
|
|
1146
|
-
/** Serialized (JSON) history state pushed alongside the navigation. */
|
|
1147
|
-
state?: string | RemoveAttribute;
|
|
1148
|
-
/** Suppress scroll restoration/reset after the navigation. */
|
|
1149
|
-
noScroll?: BooleanAttribute | RemoveAttribute;
|
|
1150
|
-
/** Replace the current history entry instead of pushing a new one. */
|
|
1151
|
-
replace?: BooleanAttribute | RemoveAttribute;
|
|
1152
|
-
/** Route preload intent; `"false"` disables the integration's default eager preload. */
|
|
1153
|
-
preload?: boolean | "false" | RemoveAttribute;
|
|
1154
1153
|
|
|
1155
1154
|
/** @experimental */
|
|
1156
1155
|
attributionsrc?: string | RemoveAttribute;
|
|
@@ -1375,7 +1374,7 @@ export namespace JSX {
|
|
|
1375
1374
|
browsingtopics?: string | RemoveAttribute;
|
|
1376
1375
|
crossorigin?: HTMLCrossorigin | RemoveAttribute;
|
|
1377
1376
|
decoding?: "sync" | "async" | "auto" | RemoveAttribute;
|
|
1378
|
-
fetchpriority?:
|
|
1377
|
+
fetchpriority?: HTMLFetchPriority | RemoveAttribute;
|
|
1379
1378
|
height?: number | string | RemoveAttribute;
|
|
1380
1379
|
ismap?: BooleanAttribute | RemoveAttribute;
|
|
1381
1380
|
loading?: "eager" | "lazy" | RemoveAttribute;
|
|
@@ -1530,7 +1529,7 @@ export namespace JSX {
|
|
|
1530
1529
|
color?: string | RemoveAttribute;
|
|
1531
1530
|
crossorigin?: HTMLCrossorigin | RemoveAttribute;
|
|
1532
1531
|
disabled?: BooleanAttribute | RemoveAttribute;
|
|
1533
|
-
fetchpriority?:
|
|
1532
|
+
fetchpriority?: HTMLFetchPriority | RemoveAttribute;
|
|
1534
1533
|
href?: string | RemoveAttribute;
|
|
1535
1534
|
hreflang?: string | RemoveAttribute;
|
|
1536
1535
|
imagesizes?: string | RemoveAttribute;
|
|
@@ -1716,12 +1715,12 @@ export namespace JSX {
|
|
|
1716
1715
|
max?: number | string | RemoveAttribute;
|
|
1717
1716
|
value?: string | string[] | number | RemoveAttribute;
|
|
1718
1717
|
}
|
|
1719
|
-
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T
|
|
1718
|
+
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {
|
|
1720
1719
|
async?: BooleanAttribute | RemoveAttribute;
|
|
1721
1720
|
blocking?: "render" | RemoveAttribute;
|
|
1722
1721
|
crossorigin?: HTMLCrossorigin | RemoveAttribute;
|
|
1723
1722
|
defer?: BooleanAttribute | RemoveAttribute;
|
|
1724
|
-
fetchpriority?:
|
|
1723
|
+
fetchpriority?: HTMLFetchPriority | RemoveAttribute;
|
|
1725
1724
|
for?: string | RemoveAttribute;
|
|
1726
1725
|
integrity?: string | RemoveAttribute;
|
|
1727
1726
|
nomodule?: BooleanAttribute | RemoveAttribute;
|
|
@@ -1778,7 +1777,7 @@ export namespace JSX {
|
|
|
1778
1777
|
type?: string | RemoveAttribute;
|
|
1779
1778
|
width?: number | string | RemoveAttribute;
|
|
1780
1779
|
}
|
|
1781
|
-
interface StyleHTMLAttributes<T> extends HTMLAttributes<T
|
|
1780
|
+
interface StyleHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {
|
|
1782
1781
|
blocking?: "render" | RemoveAttribute;
|
|
1783
1782
|
media?: string | RemoveAttribute;
|
|
1784
1783
|
|
|
@@ -1879,6 +1878,7 @@ export namespace JSX {
|
|
|
1879
1878
|
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1880
1879
|
datetime?: string | RemoveAttribute;
|
|
1881
1880
|
}
|
|
1881
|
+
interface TitleHTMLAttributes<T> extends HTMLAttributes<T>, AmbiguousNamespaceAttributes {}
|
|
1882
1882
|
interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1883
1883
|
default?: BooleanAttribute | RemoveAttribute;
|
|
1884
1884
|
kind?:
|
|
@@ -3508,6 +3508,11 @@ export namespace JSX {
|
|
|
3508
3508
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement
|
|
3509
3509
|
*/
|
|
3510
3510
|
select: SelectHTMLAttributes<HTMLSelectElement> & Properties<HTMLSelectElement>;
|
|
3511
|
+
/**
|
|
3512
|
+
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/selectedcontent
|
|
3513
|
+
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectedContentElement
|
|
3514
|
+
*/
|
|
3515
|
+
selectedcontent: HTMLAttributes<HTMLElement> & Properties<HTMLElement>;
|
|
3511
3516
|
/**
|
|
3512
3517
|
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot
|
|
3513
3518
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLSlotElement
|
|
@@ -3602,7 +3607,7 @@ export namespace JSX {
|
|
|
3602
3607
|
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
|
|
3603
3608
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLTitleElement
|
|
3604
3609
|
*/
|
|
3605
|
-
title:
|
|
3610
|
+
title: TitleHTMLAttributes<HTMLTitleElement> & Properties<HTMLTitleElement>;
|
|
3606
3611
|
/**
|
|
3607
3612
|
* @url https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
|
|
3608
3613
|
* @url https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement
|