@atom.io/spa 0.0.0-stage → 0.0.0
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/LICENSE +373 -0
- package/README.md +401 -2
- package/README.mdx +150 -0
- package/dist/astro-application.d.ts +15 -0
- package/dist/astro-application.d.ts.map +1 -0
- package/dist/astro-application.js +62 -0
- package/dist/astro-application.js.map +1 -0
- package/dist/astro-client.d.ts +9 -0
- package/dist/astro-client.d.ts.map +1 -0
- package/dist/astro-client.js +98 -0
- package/dist/astro-client.js.map +1 -0
- package/dist/astro-context-OdlexHR4.js +79 -0
- package/dist/astro-context-OdlexHR4.js.map +1 -0
- package/dist/astro-middleware.d.ts +4 -0
- package/dist/astro-middleware.d.ts.map +1 -0
- package/dist/astro-middleware.js +49 -0
- package/dist/astro-middleware.js.map +1 -0
- package/dist/astro-request-DRKvDjsO.js +70 -0
- package/dist/astro-request-DRKvDjsO.js.map +1 -0
- package/dist/astro-server.d.ts +4 -0
- package/dist/astro-server.d.ts.map +1 -0
- package/dist/astro-server.js +30 -0
- package/dist/astro-server.js.map +1 -0
- package/dist/astro-shared-BT45auwR.js +29 -0
- package/dist/astro-shared-BT45auwR.js.map +1 -0
- package/dist/astro-shared-DkZaqX7L.d.ts +31 -0
- package/dist/astro-shared-DkZaqX7L.d.ts.map +1 -0
- package/dist/astro.d.ts +6 -0
- package/dist/astro.d.ts.map +1 -0
- package/dist/astro.js +26 -0
- package/dist/astro.js.map +1 -0
- package/dist/client.min.d.ts +1 -0
- package/dist/client.min.js +1 -0
- package/dist/core-BhiA9fFi.d.ts +44 -0
- package/dist/core-BhiA9fFi.d.ts.map +1 -0
- package/dist/core-Dvqm7w2y.js +231 -0
- package/dist/core-Dvqm7w2y.js.map +1 -0
- package/dist/development/astro-application.js +62 -0
- package/dist/development/astro-application.js.map +1 -0
- package/dist/development/astro-client.js +98 -0
- package/dist/development/astro-client.js.map +1 -0
- package/dist/development/astro-context-OdlexHR4.js +79 -0
- package/dist/development/astro-context-OdlexHR4.js.map +1 -0
- package/dist/development/astro-middleware.js +49 -0
- package/dist/development/astro-middleware.js.map +1 -0
- package/dist/development/astro-request-DRKvDjsO.js +70 -0
- package/dist/development/astro-request-DRKvDjsO.js.map +1 -0
- package/dist/development/astro-server.js +30 -0
- package/dist/development/astro-server.js.map +1 -0
- package/dist/development/astro-shared-BT45auwR.js +29 -0
- package/dist/development/astro-shared-BT45auwR.js.map +1 -0
- package/dist/development/astro.js +26 -0
- package/dist/development/astro.js.map +1 -0
- package/dist/development/core-DB3sQz4h.js +234 -0
- package/dist/development/core-DB3sQz4h.js.map +1 -0
- package/dist/development/dom-D9cY6l1R.js +194 -0
- package/dist/development/dom-D9cY6l1R.js.map +1 -0
- package/dist/development/index.js +40 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/jsx-runtime.js +25 -0
- package/dist/development/jsx-runtime.js.map +1 -0
- package/dist/development/server.js +78 -0
- package/dist/development/server.js.map +1 -0
- package/dist/development/vite-BadrFSIM.js +126 -0
- package/dist/development/vite-BadrFSIM.js.map +1 -0
- package/dist/development/vite.js +1 -0
- package/dist/dom-BR9o9wZW.js +188 -0
- package/dist/dom-BR9o9wZW.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx-runtime-BzGV18VO.d.ts +965 -0
- package/dist/jsx-runtime-BzGV18VO.d.ts.map +1 -0
- package/dist/jsx-runtime.d.ts +2 -0
- package/dist/jsx-runtime.js +25 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +78 -0
- package/dist/server.js.map +1 -0
- package/dist/size.json +30 -0
- package/dist/vite-BadrFSIM.js +126 -0
- package/dist/vite-BadrFSIM.js.map +1 -0
- package/dist/vite.d.ts +6 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +1 -0
- package/package.json +131 -5
- package/src/astro-application.ts +71 -0
- package/src/astro-client.ts +136 -0
- package/src/astro-context.ts +102 -0
- package/src/astro-middleware.ts +48 -0
- package/src/astro-request.ts +79 -0
- package/src/astro-server.ts +43 -0
- package/src/astro-shared.ts +78 -0
- package/src/astro.ts +47 -0
- package/src/compiler.ts +189 -0
- package/src/core.ts +385 -0
- package/src/dom.ts +385 -0
- package/src/env.d.ts +1 -0
- package/src/index.ts +24 -0
- package/src/jsx-runtime.ts +63 -0
- package/src/jsx-types.d.ts +909 -0
- package/src/server.ts +150 -0
- package/src/use-loadable.ts +67 -0
- package/src/vite.ts +48 -0
|
@@ -0,0 +1,909 @@
|
|
|
1
|
+
import type { Child } from "./core.ts"
|
|
2
|
+
|
|
3
|
+
/** Native events retain their target; only currentTarget is the attached element. */
|
|
4
|
+
export type TargetedEvent<E extends Element, T extends Event = Event> = Omit<
|
|
5
|
+
T,
|
|
6
|
+
`currentTarget`
|
|
7
|
+
> & { readonly currentTarget: E }
|
|
8
|
+
export type EventHandler<E extends Element, T extends Event = Event> = (
|
|
9
|
+
event: TargetedEvent<E, T>,
|
|
10
|
+
) => void
|
|
11
|
+
export type Ref<E extends Element> = (element: E | null) => void
|
|
12
|
+
|
|
13
|
+
type Attributes<T> = { [K in keyof T]?: T[K] | null | undefined }
|
|
14
|
+
|
|
15
|
+
// DOM event names are lowercase; JSX convention capitalizes each word.
|
|
16
|
+
interface EventNames {
|
|
17
|
+
afterprint: `AfterPrint`
|
|
18
|
+
beforeprint: `BeforePrint`
|
|
19
|
+
beforeunload: `BeforeUnload`
|
|
20
|
+
hashchange: `HashChange`
|
|
21
|
+
languagechange: `LanguageChange`
|
|
22
|
+
messageerror: `MessageError`
|
|
23
|
+
pagehide: `PageHide`
|
|
24
|
+
pagereveal: `PageReveal`
|
|
25
|
+
pageshow: `PageShow`
|
|
26
|
+
pageswap: `PageSwap`
|
|
27
|
+
popstate: `PopState`
|
|
28
|
+
rejectionhandled: `RejectionHandled`
|
|
29
|
+
unhandledrejection: `UnhandledRejection`
|
|
30
|
+
animationcancel: `AnimationCancel`
|
|
31
|
+
animationend: `AnimationEnd`
|
|
32
|
+
animationiteration: `AnimationIteration`
|
|
33
|
+
animationstart: `AnimationStart`
|
|
34
|
+
auxclick: `AuxClick`
|
|
35
|
+
beforeinput: `BeforeInput`
|
|
36
|
+
beforematch: `BeforeMatch`
|
|
37
|
+
beforetoggle: `BeforeToggle`
|
|
38
|
+
canplay: `CanPlay`
|
|
39
|
+
canplaythrough: `CanPlayThrough`
|
|
40
|
+
compositionend: `CompositionEnd`
|
|
41
|
+
compositionstart: `CompositionStart`
|
|
42
|
+
compositionupdate: `CompositionUpdate`
|
|
43
|
+
cuechange: `CueChange`
|
|
44
|
+
formdata: `FormData`
|
|
45
|
+
waitingforkey: `WaitingForKey`
|
|
46
|
+
enterpictureinpicture: `EnterPictureInPicture`
|
|
47
|
+
leavepictureinpicture: `LeavePictureInPicture`
|
|
48
|
+
contextlost: `ContextLost`
|
|
49
|
+
contextmenu: `ContextMenu`
|
|
50
|
+
contextrestored: `ContextRestored`
|
|
51
|
+
dblclick: `DoubleClick` | `DblClick`
|
|
52
|
+
dragend: `DragEnd`
|
|
53
|
+
dragenter: `DragEnter`
|
|
54
|
+
dragexit: `DragExit`
|
|
55
|
+
dragleave: `DragLeave`
|
|
56
|
+
dragover: `DragOver`
|
|
57
|
+
dragstart: `DragStart`
|
|
58
|
+
durationchange: `DurationChange`
|
|
59
|
+
focusin: `FocusIn`
|
|
60
|
+
focusout: `FocusOut`
|
|
61
|
+
fullscreenchange: `FullscreenChange`
|
|
62
|
+
fullscreenerror: `FullscreenError`
|
|
63
|
+
gotpointercapture: `GotPointerCapture`
|
|
64
|
+
keydown: `KeyDown`
|
|
65
|
+
keypress: `KeyPress`
|
|
66
|
+
keyup: `KeyUp`
|
|
67
|
+
loadeddata: `LoadedData`
|
|
68
|
+
loadedmetadata: `LoadedMetadata`
|
|
69
|
+
loadstart: `LoadStart`
|
|
70
|
+
lostpointercapture: `LostPointerCapture`
|
|
71
|
+
mousedown: `MouseDown`
|
|
72
|
+
mouseenter: `MouseEnter`
|
|
73
|
+
mouseleave: `MouseLeave`
|
|
74
|
+
mousemove: `MouseMove`
|
|
75
|
+
mouseout: `MouseOut`
|
|
76
|
+
mouseover: `MouseOver`
|
|
77
|
+
mouseup: `MouseUp`
|
|
78
|
+
pointercancel: `PointerCancel`
|
|
79
|
+
pointerdown: `PointerDown`
|
|
80
|
+
pointerenter: `PointerEnter`
|
|
81
|
+
pointerleave: `PointerLeave`
|
|
82
|
+
pointermove: `PointerMove`
|
|
83
|
+
pointerout: `PointerOut`
|
|
84
|
+
pointerover: `PointerOver`
|
|
85
|
+
pointerrawupdate: `PointerRawUpdate`
|
|
86
|
+
pointerup: `PointerUp`
|
|
87
|
+
ratechange: `RateChange`
|
|
88
|
+
scrollend: `ScrollEnd`
|
|
89
|
+
securitypolicyviolation: `SecurityPolicyViolation`
|
|
90
|
+
selectionchange: `SelectionChange`
|
|
91
|
+
selectstart: `SelectStart`
|
|
92
|
+
slotchange: `SlotChange`
|
|
93
|
+
timeupdate: `TimeUpdate`
|
|
94
|
+
touchcancel: `TouchCancel`
|
|
95
|
+
touchend: `TouchEnd`
|
|
96
|
+
touchmove: `TouchMove`
|
|
97
|
+
touchstart: `TouchStart`
|
|
98
|
+
transitioncancel: `TransitionCancel`
|
|
99
|
+
transitionend: `TransitionEnd`
|
|
100
|
+
transitionrun: `TransitionRun`
|
|
101
|
+
transitionstart: `TransitionStart`
|
|
102
|
+
volumechange: `VolumeChange`
|
|
103
|
+
webkitanimationend: `WebkitAnimationEnd`
|
|
104
|
+
webkitanimationiteration: `WebkitAnimationIteration`
|
|
105
|
+
webkitanimationstart: `WebkitAnimationStart`
|
|
106
|
+
webkittransitionend: `WebkitTransitionEnd`
|
|
107
|
+
}
|
|
108
|
+
type EventName<K extends string> =
|
|
109
|
+
| K
|
|
110
|
+
| Capitalize<K>
|
|
111
|
+
| (K extends keyof EventNames ? EventNames[K] : never)
|
|
112
|
+
type ElementEvents<E extends Element> = E extends HTMLVideoElement
|
|
113
|
+
? HTMLVideoElementEventMap
|
|
114
|
+
: E extends HTMLMediaElement
|
|
115
|
+
? HTMLMediaElementEventMap
|
|
116
|
+
: E extends HTMLBodyElement
|
|
117
|
+
? HTMLBodyElementEventMap
|
|
118
|
+
: E extends HTMLFrameSetElement
|
|
119
|
+
? HTMLFrameSetElementEventMap
|
|
120
|
+
: E extends SVGSVGElement
|
|
121
|
+
? SVGSVGElementEventMap
|
|
122
|
+
: E extends SVGElement
|
|
123
|
+
? SVGElementEventMap
|
|
124
|
+
: HTMLElementEventMap
|
|
125
|
+
export type EventAttributes<E extends Element> = {
|
|
126
|
+
[
|
|
127
|
+
K in keyof ElementEvents<E> & string as `on${EventName<K>}${`` | `Capture`}`
|
|
128
|
+
]?: EventHandler<E, Extract<ElementEvents<E>[K], Event>> | null | undefined
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
type Booleanish = boolean | `true` | `false`
|
|
132
|
+
export type AriaAttributes = Attributes<{
|
|
133
|
+
[`aria-activedescendant`]: string
|
|
134
|
+
[`aria-atomic`]: Booleanish
|
|
135
|
+
[`aria-autocomplete`]: `none` | `inline` | `list` | `both`
|
|
136
|
+
[`aria-braillelabel`]: string
|
|
137
|
+
[`aria-brailleroledescription`]: string
|
|
138
|
+
[`aria-busy`]: Booleanish
|
|
139
|
+
[`aria-checked`]: Booleanish | `mixed`
|
|
140
|
+
[`aria-colcount`]: number
|
|
141
|
+
[`aria-colindex`]: number
|
|
142
|
+
[`aria-colindextext`]: string
|
|
143
|
+
[`aria-colspan`]: number
|
|
144
|
+
[`aria-controls`]: string
|
|
145
|
+
[`aria-current`]: Booleanish | `page` | `step` | `location` | `date` | `time`
|
|
146
|
+
[`aria-describedby`]: string
|
|
147
|
+
[`aria-description`]: string
|
|
148
|
+
[`aria-details`]: string
|
|
149
|
+
[`aria-disabled`]: Booleanish
|
|
150
|
+
[`aria-dropeffect`]: `none` | `copy` | `execute` | `link` | `move` | `popup`
|
|
151
|
+
[`aria-errormessage`]: string
|
|
152
|
+
[`aria-expanded`]: Booleanish
|
|
153
|
+
[`aria-flowto`]: string
|
|
154
|
+
[`aria-grabbed`]: Booleanish
|
|
155
|
+
[`aria-haspopup`]: Booleanish | `menu` | `listbox` | `tree` | `grid` | `dialog`
|
|
156
|
+
[`aria-hidden`]: Booleanish
|
|
157
|
+
[`aria-invalid`]: Booleanish | `grammar` | `spelling`
|
|
158
|
+
[`aria-keyshortcuts`]: string
|
|
159
|
+
[`aria-label`]: string
|
|
160
|
+
[`aria-labelledby`]: string
|
|
161
|
+
[`aria-level`]: number
|
|
162
|
+
[`aria-live`]: `off` | `assertive` | `polite`
|
|
163
|
+
[`aria-modal`]: Booleanish
|
|
164
|
+
[`aria-multiline`]: Booleanish
|
|
165
|
+
[`aria-multiselectable`]: Booleanish
|
|
166
|
+
[`aria-orientation`]: `horizontal` | `vertical`
|
|
167
|
+
[`aria-owns`]: string
|
|
168
|
+
[`aria-placeholder`]: string
|
|
169
|
+
[`aria-posinset`]: number
|
|
170
|
+
[`aria-pressed`]: Booleanish | `mixed`
|
|
171
|
+
[`aria-readonly`]: Booleanish
|
|
172
|
+
[`aria-relevant`]:
|
|
173
|
+
| `additions`
|
|
174
|
+
| `additions removals`
|
|
175
|
+
| `additions text`
|
|
176
|
+
| `all`
|
|
177
|
+
| `removals`
|
|
178
|
+
| `removals additions`
|
|
179
|
+
| `removals text`
|
|
180
|
+
| `text`
|
|
181
|
+
| `text additions`
|
|
182
|
+
| `text removals`
|
|
183
|
+
[`aria-required`]: Booleanish
|
|
184
|
+
[`aria-roledescription`]: string
|
|
185
|
+
[`aria-rowcount`]: number
|
|
186
|
+
[`aria-rowindex`]: number
|
|
187
|
+
[`aria-rowindextext`]: string
|
|
188
|
+
[`aria-rowspan`]: number
|
|
189
|
+
[`aria-selected`]: Booleanish
|
|
190
|
+
[`aria-setsize`]: number
|
|
191
|
+
[`aria-sort`]: `none` | `ascending` | `descending` | `other`
|
|
192
|
+
[`aria-valuemax`]: number
|
|
193
|
+
[`aria-valuemin`]: number
|
|
194
|
+
[`aria-valuenow`]: number
|
|
195
|
+
[`aria-valuetext`]: string
|
|
196
|
+
}>
|
|
197
|
+
|
|
198
|
+
export type DOMAttributes<E extends Element> = EventAttributes<E> &
|
|
199
|
+
AriaAttributes &
|
|
200
|
+
Attributes<{
|
|
201
|
+
children: Child
|
|
202
|
+
key: string | number
|
|
203
|
+
ref: Ref<E>
|
|
204
|
+
id: string
|
|
205
|
+
class: string
|
|
206
|
+
className: string
|
|
207
|
+
style: string
|
|
208
|
+
role: string
|
|
209
|
+
slot: string
|
|
210
|
+
tabIndex: number
|
|
211
|
+
tabindex: number
|
|
212
|
+
}> & { [K in `data-${string}`]?: string | number | boolean | null | undefined }
|
|
213
|
+
|
|
214
|
+
// HTML attribute names are case-insensitive. Support reflected property names
|
|
215
|
+
// as well as their lowercase markup spellings, without exposing DOM methods.
|
|
216
|
+
type HTMLAliases<T> = Attributes<T> & {
|
|
217
|
+
[K in keyof T as K extends string ? Lowercase<K> : never]?:
|
|
218
|
+
| T[K]
|
|
219
|
+
| null
|
|
220
|
+
| undefined
|
|
221
|
+
}
|
|
222
|
+
export type HTMLAttributes<E extends HTMLElement = HTMLElement> =
|
|
223
|
+
DOMAttributes<E> &
|
|
224
|
+
HTMLAliases<{
|
|
225
|
+
accessKey: string
|
|
226
|
+
autoCapitalize:
|
|
227
|
+
| `off`
|
|
228
|
+
| `none`
|
|
229
|
+
| `on`
|
|
230
|
+
| `sentences`
|
|
231
|
+
| `words`
|
|
232
|
+
| `characters`
|
|
233
|
+
autoCorrect: `on` | `off`
|
|
234
|
+
autoFocus: boolean
|
|
235
|
+
contentEditable: `true` | `false` | `plaintext-only` | `inherit`
|
|
236
|
+
dir: `auto` | `ltr` | `rtl`
|
|
237
|
+
draggable: boolean
|
|
238
|
+
enterKeyHint:
|
|
239
|
+
| `enter`
|
|
240
|
+
| `done`
|
|
241
|
+
| `go`
|
|
242
|
+
| `next`
|
|
243
|
+
| `previous`
|
|
244
|
+
| `search`
|
|
245
|
+
| `send`
|
|
246
|
+
exportparts: string
|
|
247
|
+
hidden: boolean | `hidden` | `until-found`
|
|
248
|
+
inert: boolean
|
|
249
|
+
inputMode:
|
|
250
|
+
| `none`
|
|
251
|
+
| `text`
|
|
252
|
+
| `tel`
|
|
253
|
+
| `url`
|
|
254
|
+
| `email`
|
|
255
|
+
| `numeric`
|
|
256
|
+
| `decimal`
|
|
257
|
+
| `search`
|
|
258
|
+
is: string
|
|
259
|
+
itemID: string
|
|
260
|
+
itemProp: string
|
|
261
|
+
itemRef: string
|
|
262
|
+
itemScope: boolean
|
|
263
|
+
itemType: string
|
|
264
|
+
lang: string
|
|
265
|
+
nonce: string
|
|
266
|
+
part: string
|
|
267
|
+
popover: `auto` | `hint` | `manual`
|
|
268
|
+
spellcheck: boolean
|
|
269
|
+
title: string
|
|
270
|
+
translate: `yes` | `no`
|
|
271
|
+
virtualKeyboardPolicy: `auto` | `manual`
|
|
272
|
+
writingSuggestions: `true` | `false`
|
|
273
|
+
// RDFa
|
|
274
|
+
about: string
|
|
275
|
+
datatype: string
|
|
276
|
+
inlist: string
|
|
277
|
+
prefix: string
|
|
278
|
+
property: string
|
|
279
|
+
resource: string
|
|
280
|
+
typeof: string
|
|
281
|
+
vocab: string
|
|
282
|
+
}>
|
|
283
|
+
|
|
284
|
+
type NumberOrString = number | string
|
|
285
|
+
type ReferrerPolicy =
|
|
286
|
+
| ``
|
|
287
|
+
| `no-referrer`
|
|
288
|
+
| `no-referrer-when-downgrade`
|
|
289
|
+
| `origin`
|
|
290
|
+
| `origin-when-cross-origin`
|
|
291
|
+
| `same-origin`
|
|
292
|
+
| `strict-origin`
|
|
293
|
+
| `strict-origin-when-cross-origin`
|
|
294
|
+
| `unsafe-url`
|
|
295
|
+
type CrossOrigin = `` | `anonymous` | `use-credentials`
|
|
296
|
+
type FormOverrides = {
|
|
297
|
+
form: string
|
|
298
|
+
formAction: string
|
|
299
|
+
formEncType: string
|
|
300
|
+
formMethod: string
|
|
301
|
+
formNoValidate: boolean
|
|
302
|
+
formTarget: string
|
|
303
|
+
}
|
|
304
|
+
type MediaAttributes = {
|
|
305
|
+
autoPlay: boolean
|
|
306
|
+
controls: boolean
|
|
307
|
+
controlsList: string
|
|
308
|
+
crossOrigin: CrossOrigin
|
|
309
|
+
disableRemotePlayback: boolean
|
|
310
|
+
loop: boolean
|
|
311
|
+
muted: boolean
|
|
312
|
+
preload: `` | `none` | `metadata` | `auto`
|
|
313
|
+
src: string
|
|
314
|
+
}
|
|
315
|
+
type LinkAttributes = {
|
|
316
|
+
download: string | boolean
|
|
317
|
+
href: string
|
|
318
|
+
hrefLang: string
|
|
319
|
+
ping: string
|
|
320
|
+
referrerPolicy: ReferrerPolicy
|
|
321
|
+
rel: string
|
|
322
|
+
target: string
|
|
323
|
+
type: string
|
|
324
|
+
}
|
|
325
|
+
type CellAttributes = {
|
|
326
|
+
abbr: string
|
|
327
|
+
colSpan: number
|
|
328
|
+
headers: string
|
|
329
|
+
rowSpan: number
|
|
330
|
+
scope: `row` | `col` | `rowgroup` | `colgroup`
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** Attributes specific to each HTML tag, in addition to global attributes. */
|
|
334
|
+
interface HTMLTagAttributes {
|
|
335
|
+
a: LinkAttributes
|
|
336
|
+
area: LinkAttributes & {
|
|
337
|
+
alt: string
|
|
338
|
+
coords: string
|
|
339
|
+
shape: `default` | `rect` | `circle` | `poly`
|
|
340
|
+
}
|
|
341
|
+
audio: MediaAttributes
|
|
342
|
+
base: { href: string; target: string }
|
|
343
|
+
blockquote: { cite: string }
|
|
344
|
+
button: FormOverrides & {
|
|
345
|
+
disabled: boolean
|
|
346
|
+
name: string
|
|
347
|
+
type: `button` | `submit` | `reset`
|
|
348
|
+
value: NumberOrString
|
|
349
|
+
popoverTarget: string
|
|
350
|
+
popoverTargetAction: `hide` | `show` | `toggle`
|
|
351
|
+
command: string
|
|
352
|
+
commandFor: string
|
|
353
|
+
}
|
|
354
|
+
canvas: { height: NumberOrString; width: NumberOrString }
|
|
355
|
+
col: { span: number }
|
|
356
|
+
colgroup: { span: number }
|
|
357
|
+
data: { value: NumberOrString }
|
|
358
|
+
del: { cite: string; dateTime: string }
|
|
359
|
+
details: { name: string; open: boolean }
|
|
360
|
+
dialog: { open: boolean; closedBy: `any` | `closerequest` | `none` }
|
|
361
|
+
embed: {
|
|
362
|
+
height: NumberOrString
|
|
363
|
+
src: string
|
|
364
|
+
type: string
|
|
365
|
+
width: NumberOrString
|
|
366
|
+
}
|
|
367
|
+
fieldset: { disabled: boolean; form: string; name: string }
|
|
368
|
+
form: {
|
|
369
|
+
acceptCharset: string
|
|
370
|
+
[`accept-charset`]: string
|
|
371
|
+
action: string
|
|
372
|
+
autoComplete: `on` | `off`
|
|
373
|
+
encType: string
|
|
374
|
+
method: string
|
|
375
|
+
name: string
|
|
376
|
+
noValidate: boolean
|
|
377
|
+
rel: string
|
|
378
|
+
target: string
|
|
379
|
+
}
|
|
380
|
+
html: { xmlns: string }
|
|
381
|
+
iframe: {
|
|
382
|
+
allow: string
|
|
383
|
+
allowFullScreen: boolean
|
|
384
|
+
credentialless: boolean
|
|
385
|
+
height: NumberOrString
|
|
386
|
+
loading: `eager` | `lazy`
|
|
387
|
+
name: string
|
|
388
|
+
referrerPolicy: ReferrerPolicy
|
|
389
|
+
sandbox: string
|
|
390
|
+
src: string
|
|
391
|
+
srcDoc: string
|
|
392
|
+
width: NumberOrString
|
|
393
|
+
}
|
|
394
|
+
img: {
|
|
395
|
+
alt: string
|
|
396
|
+
crossOrigin: CrossOrigin
|
|
397
|
+
decoding: `async` | `sync` | `auto`
|
|
398
|
+
fetchPriority: `high` | `low` | `auto`
|
|
399
|
+
height: NumberOrString
|
|
400
|
+
isMap: boolean
|
|
401
|
+
loading: `eager` | `lazy`
|
|
402
|
+
referrerPolicy: ReferrerPolicy
|
|
403
|
+
sizes: string
|
|
404
|
+
src: string
|
|
405
|
+
srcSet: string
|
|
406
|
+
useMap: string
|
|
407
|
+
width: NumberOrString
|
|
408
|
+
}
|
|
409
|
+
input: FormOverrides & {
|
|
410
|
+
accept: string
|
|
411
|
+
alt: string
|
|
412
|
+
autoComplete: string
|
|
413
|
+
capture: boolean | `user` | `environment`
|
|
414
|
+
checked: boolean
|
|
415
|
+
defaultChecked: boolean
|
|
416
|
+
defaultValue: NumberOrString
|
|
417
|
+
dirName: string
|
|
418
|
+
disabled: boolean
|
|
419
|
+
height: NumberOrString
|
|
420
|
+
list: string
|
|
421
|
+
max: NumberOrString
|
|
422
|
+
maxLength: number
|
|
423
|
+
min: NumberOrString
|
|
424
|
+
minLength: number
|
|
425
|
+
multiple: boolean
|
|
426
|
+
name: string
|
|
427
|
+
pattern: string
|
|
428
|
+
placeholder: string
|
|
429
|
+
popoverTarget: string
|
|
430
|
+
popoverTargetAction: `hide` | `show` | `toggle`
|
|
431
|
+
readOnly: boolean
|
|
432
|
+
required: boolean
|
|
433
|
+
size: number
|
|
434
|
+
src: string
|
|
435
|
+
step: NumberOrString
|
|
436
|
+
type: string
|
|
437
|
+
value: NumberOrString
|
|
438
|
+
width: NumberOrString
|
|
439
|
+
}
|
|
440
|
+
ins: { cite: string; dateTime: string }
|
|
441
|
+
label: { for: string; htmlFor: string; form: string }
|
|
442
|
+
li: { value: number }
|
|
443
|
+
link: {
|
|
444
|
+
as: string
|
|
445
|
+
blocking: string
|
|
446
|
+
crossOrigin: CrossOrigin
|
|
447
|
+
disabled: boolean
|
|
448
|
+
fetchPriority: `high` | `low` | `auto`
|
|
449
|
+
href: string
|
|
450
|
+
hrefLang: string
|
|
451
|
+
imageSizes: string
|
|
452
|
+
imageSrcSet: string
|
|
453
|
+
integrity: string
|
|
454
|
+
media: string
|
|
455
|
+
referrerPolicy: ReferrerPolicy
|
|
456
|
+
rel: string
|
|
457
|
+
sizes: string
|
|
458
|
+
type: string
|
|
459
|
+
}
|
|
460
|
+
map: { name: string }
|
|
461
|
+
meta: {
|
|
462
|
+
charSet: string
|
|
463
|
+
content: string
|
|
464
|
+
httpEquiv: string
|
|
465
|
+
[`http-equiv`]: string
|
|
466
|
+
media: string
|
|
467
|
+
name: string
|
|
468
|
+
}
|
|
469
|
+
meter: {
|
|
470
|
+
high: number
|
|
471
|
+
low: number
|
|
472
|
+
max: number
|
|
473
|
+
min: number
|
|
474
|
+
optimum: number
|
|
475
|
+
value: number
|
|
476
|
+
}
|
|
477
|
+
object: {
|
|
478
|
+
data: string
|
|
479
|
+
form: string
|
|
480
|
+
height: NumberOrString
|
|
481
|
+
name: string
|
|
482
|
+
type: string
|
|
483
|
+
useMap: string
|
|
484
|
+
width: NumberOrString
|
|
485
|
+
}
|
|
486
|
+
ol: { reversed: boolean; start: number; type: `1` | `a` | `A` | `i` | `I` }
|
|
487
|
+
optgroup: { disabled: boolean; label: string }
|
|
488
|
+
option: {
|
|
489
|
+
disabled: boolean
|
|
490
|
+
label: string
|
|
491
|
+
selected: boolean
|
|
492
|
+
value: NumberOrString
|
|
493
|
+
}
|
|
494
|
+
output: { for: string; htmlFor: string; form: string; name: string }
|
|
495
|
+
progress: { max: number; value: number }
|
|
496
|
+
q: { cite: string }
|
|
497
|
+
script: {
|
|
498
|
+
async: boolean
|
|
499
|
+
blocking: string
|
|
500
|
+
charSet: string
|
|
501
|
+
crossOrigin: CrossOrigin
|
|
502
|
+
defer: boolean
|
|
503
|
+
fetchPriority: `high` | `low` | `auto`
|
|
504
|
+
integrity: string
|
|
505
|
+
noModule: boolean
|
|
506
|
+
referrerPolicy: ReferrerPolicy
|
|
507
|
+
src: string
|
|
508
|
+
type: string
|
|
509
|
+
}
|
|
510
|
+
select: {
|
|
511
|
+
autoComplete: string
|
|
512
|
+
disabled: boolean
|
|
513
|
+
form: string
|
|
514
|
+
multiple: boolean
|
|
515
|
+
name: string
|
|
516
|
+
required: boolean
|
|
517
|
+
size: number
|
|
518
|
+
value: NumberOrString
|
|
519
|
+
}
|
|
520
|
+
slot: { name: string }
|
|
521
|
+
source: {
|
|
522
|
+
height: NumberOrString
|
|
523
|
+
media: string
|
|
524
|
+
sizes: string
|
|
525
|
+
src: string
|
|
526
|
+
srcSet: string
|
|
527
|
+
type: string
|
|
528
|
+
width: NumberOrString
|
|
529
|
+
}
|
|
530
|
+
style: { blocking: string; media: string; title: string; type: string }
|
|
531
|
+
table: { cellPadding: NumberOrString; cellSpacing: NumberOrString }
|
|
532
|
+
td: CellAttributes
|
|
533
|
+
template: {
|
|
534
|
+
shadowRootClonable: boolean
|
|
535
|
+
shadowRootDelegatesFocus: boolean
|
|
536
|
+
shadowRootMode: `open` | `closed`
|
|
537
|
+
shadowRootSerializable: boolean
|
|
538
|
+
}
|
|
539
|
+
textarea: {
|
|
540
|
+
autoComplete: string
|
|
541
|
+
cols: number
|
|
542
|
+
defaultValue: string
|
|
543
|
+
dirName: string
|
|
544
|
+
disabled: boolean
|
|
545
|
+
form: string
|
|
546
|
+
maxLength: number
|
|
547
|
+
minLength: number
|
|
548
|
+
name: string
|
|
549
|
+
placeholder: string
|
|
550
|
+
readOnly: boolean
|
|
551
|
+
required: boolean
|
|
552
|
+
rows: number
|
|
553
|
+
value: string
|
|
554
|
+
wrap: `hard` | `soft` | `off`
|
|
555
|
+
}
|
|
556
|
+
th: CellAttributes
|
|
557
|
+
time: { dateTime: string }
|
|
558
|
+
track: {
|
|
559
|
+
default: boolean
|
|
560
|
+
kind: `subtitles` | `captions` | `descriptions` | `chapters` | `metadata`
|
|
561
|
+
label: string
|
|
562
|
+
src: string
|
|
563
|
+
srcLang: string
|
|
564
|
+
}
|
|
565
|
+
video: MediaAttributes & {
|
|
566
|
+
disablePictureInPicture: boolean
|
|
567
|
+
height: NumberOrString
|
|
568
|
+
playsInline: boolean
|
|
569
|
+
poster: string
|
|
570
|
+
width: NumberOrString
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export type HTMLIntrinsicElements = {
|
|
575
|
+
[Tag in keyof HTMLElementTagNameMap]: HTMLAttributes<
|
|
576
|
+
HTMLElementTagNameMap[Tag]
|
|
577
|
+
> &
|
|
578
|
+
(Tag extends keyof HTMLTagAttributes
|
|
579
|
+
? HTMLAliases<HTMLTagAttributes[Tag]>
|
|
580
|
+
: {})
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/** SVG uses literal attribute names: e.g. stroke-width, not strokeWidth. */
|
|
584
|
+
export type SVGAttributes<E extends SVGElement = SVGElement> = DOMAttributes<E> &
|
|
585
|
+
Attributes<{
|
|
586
|
+
lang: string
|
|
587
|
+
[`xml:lang`]: string
|
|
588
|
+
[`xml:space`]: `default` | `preserve`
|
|
589
|
+
xmlns: string
|
|
590
|
+
[`xmlns:xlink`]: string
|
|
591
|
+
[`alignment-baseline`]: string
|
|
592
|
+
[`baseline-shift`]: NumberOrString
|
|
593
|
+
clip: string
|
|
594
|
+
[`clip-path`]: string
|
|
595
|
+
[`clip-rule`]: `nonzero` | `evenodd` | `inherit`
|
|
596
|
+
color: string
|
|
597
|
+
[`color-interpolation`]: string
|
|
598
|
+
[`color-interpolation-filters`]: string
|
|
599
|
+
[`color-rendering`]: string
|
|
600
|
+
cursor: string
|
|
601
|
+
direction: `ltr` | `rtl` | `inherit`
|
|
602
|
+
display: string
|
|
603
|
+
[`dominant-baseline`]: string
|
|
604
|
+
fill: string
|
|
605
|
+
[`fill-opacity`]: NumberOrString
|
|
606
|
+
[`fill-rule`]: `nonzero` | `evenodd` | `inherit`
|
|
607
|
+
filter: string
|
|
608
|
+
[`flood-color`]: string
|
|
609
|
+
[`flood-opacity`]: NumberOrString
|
|
610
|
+
[`font-family`]: string
|
|
611
|
+
[`font-size`]: NumberOrString
|
|
612
|
+
[`font-size-adjust`]: NumberOrString
|
|
613
|
+
[`font-stretch`]: string
|
|
614
|
+
[`font-style`]: string
|
|
615
|
+
[`font-variant`]: string
|
|
616
|
+
[`font-weight`]: NumberOrString
|
|
617
|
+
[`image-rendering`]: string
|
|
618
|
+
[`letter-spacing`]: NumberOrString
|
|
619
|
+
[`lighting-color`]: string
|
|
620
|
+
[`marker-end`]: string
|
|
621
|
+
[`marker-mid`]: string
|
|
622
|
+
[`marker-start`]: string
|
|
623
|
+
mask: string
|
|
624
|
+
opacity: NumberOrString
|
|
625
|
+
overflow: string
|
|
626
|
+
[`paint-order`]: string
|
|
627
|
+
[`pointer-events`]: string
|
|
628
|
+
[`shape-rendering`]: string
|
|
629
|
+
[`stop-color`]: string
|
|
630
|
+
[`stop-opacity`]: NumberOrString
|
|
631
|
+
stroke: string
|
|
632
|
+
[`stroke-dasharray`]: NumberOrString
|
|
633
|
+
[`stroke-dashoffset`]: NumberOrString
|
|
634
|
+
[`stroke-linecap`]: `butt` | `round` | `square` | `inherit`
|
|
635
|
+
[`stroke-linejoin`]: `miter` | `round` | `bevel` | `inherit`
|
|
636
|
+
[`stroke-miterlimit`]: NumberOrString
|
|
637
|
+
[`stroke-opacity`]: NumberOrString
|
|
638
|
+
[`stroke-width`]: NumberOrString
|
|
639
|
+
[`text-anchor`]: `start` | `middle` | `end` | `inherit`
|
|
640
|
+
[`text-decoration`]: string
|
|
641
|
+
[`text-rendering`]: string
|
|
642
|
+
transform: string
|
|
643
|
+
[`transform-origin`]: string
|
|
644
|
+
[`unicode-bidi`]: string
|
|
645
|
+
[`vector-effect`]: string
|
|
646
|
+
visibility: string
|
|
647
|
+
[`word-spacing`]: NumberOrString
|
|
648
|
+
[`writing-mode`]: string
|
|
649
|
+
}>
|
|
650
|
+
|
|
651
|
+
type SVGBox = {
|
|
652
|
+
x: NumberOrString
|
|
653
|
+
y: NumberOrString
|
|
654
|
+
width: NumberOrString
|
|
655
|
+
height: NumberOrString
|
|
656
|
+
}
|
|
657
|
+
type SVGViewBox = { viewBox: string; preserveAspectRatio: string }
|
|
658
|
+
type SVGLink = { href: string; [`xlink:href`]: string }
|
|
659
|
+
type SVGFilterPrimitive = SVGBox & { result: string }
|
|
660
|
+
type SVGAnimation = SVGLink & {
|
|
661
|
+
attributeName: string
|
|
662
|
+
attributeType: string
|
|
663
|
+
begin: NumberOrString
|
|
664
|
+
dur: NumberOrString
|
|
665
|
+
end: NumberOrString
|
|
666
|
+
min: NumberOrString
|
|
667
|
+
max: NumberOrString
|
|
668
|
+
restart: string
|
|
669
|
+
repeatCount: NumberOrString
|
|
670
|
+
repeatDur: NumberOrString
|
|
671
|
+
calcMode: string
|
|
672
|
+
values: string
|
|
673
|
+
keyTimes: string
|
|
674
|
+
keySplines: string
|
|
675
|
+
from: NumberOrString
|
|
676
|
+
to: NumberOrString
|
|
677
|
+
by: NumberOrString
|
|
678
|
+
additive: string
|
|
679
|
+
accumulate: string
|
|
680
|
+
}
|
|
681
|
+
type SVGText = {
|
|
682
|
+
x: NumberOrString
|
|
683
|
+
y: NumberOrString
|
|
684
|
+
dx: NumberOrString
|
|
685
|
+
dy: NumberOrString
|
|
686
|
+
rotate: NumberOrString
|
|
687
|
+
textLength: NumberOrString
|
|
688
|
+
lengthAdjust: `spacing` | `spacingAndGlyphs`
|
|
689
|
+
}
|
|
690
|
+
interface SVGTagAttributes {
|
|
691
|
+
a: SVGLink & {
|
|
692
|
+
target: string
|
|
693
|
+
download: string
|
|
694
|
+
rel: string
|
|
695
|
+
hreflang: string
|
|
696
|
+
type: string
|
|
697
|
+
}
|
|
698
|
+
animate: SVGAnimation
|
|
699
|
+
animateMotion: SVGAnimation & {
|
|
700
|
+
path: string
|
|
701
|
+
keyPoints: string
|
|
702
|
+
rotate: NumberOrString
|
|
703
|
+
origin: string
|
|
704
|
+
}
|
|
705
|
+
animateTransform: SVGAnimation & {
|
|
706
|
+
type: `translate` | `scale` | `rotate` | `skewX` | `skewY`
|
|
707
|
+
}
|
|
708
|
+
circle: {
|
|
709
|
+
cx: NumberOrString
|
|
710
|
+
cy: NumberOrString
|
|
711
|
+
r: NumberOrString
|
|
712
|
+
pathLength: number
|
|
713
|
+
}
|
|
714
|
+
clipPath: { clipPathUnits: `userSpaceOnUse` | `objectBoundingBox` }
|
|
715
|
+
ellipse: {
|
|
716
|
+
cx: NumberOrString
|
|
717
|
+
cy: NumberOrString
|
|
718
|
+
rx: NumberOrString
|
|
719
|
+
ry: NumberOrString
|
|
720
|
+
pathLength: number
|
|
721
|
+
}
|
|
722
|
+
feBlend: SVGFilterPrimitive & { in: string; in2: string; mode: string }
|
|
723
|
+
feColorMatrix: SVGFilterPrimitive & {
|
|
724
|
+
in: string
|
|
725
|
+
type: string
|
|
726
|
+
values: string
|
|
727
|
+
}
|
|
728
|
+
feComponentTransfer: SVGFilterPrimitive & { in: string }
|
|
729
|
+
feComposite: SVGFilterPrimitive & {
|
|
730
|
+
in: string
|
|
731
|
+
in2: string
|
|
732
|
+
operator: string
|
|
733
|
+
k1: number
|
|
734
|
+
k2: number
|
|
735
|
+
k3: number
|
|
736
|
+
k4: number
|
|
737
|
+
}
|
|
738
|
+
feConvolveMatrix: SVGFilterPrimitive & {
|
|
739
|
+
in: string
|
|
740
|
+
order: NumberOrString
|
|
741
|
+
kernelMatrix: string
|
|
742
|
+
divisor: number
|
|
743
|
+
bias: number
|
|
744
|
+
targetX: number
|
|
745
|
+
targetY: number
|
|
746
|
+
edgeMode: string
|
|
747
|
+
preserveAlpha: Booleanish
|
|
748
|
+
}
|
|
749
|
+
feDiffuseLighting: SVGFilterPrimitive & {
|
|
750
|
+
in: string
|
|
751
|
+
surfaceScale: number
|
|
752
|
+
diffuseConstant: number
|
|
753
|
+
kernelUnitLength: NumberOrString
|
|
754
|
+
}
|
|
755
|
+
feDisplacementMap: SVGFilterPrimitive & {
|
|
756
|
+
in: string
|
|
757
|
+
in2: string
|
|
758
|
+
scale: number
|
|
759
|
+
xChannelSelector: string
|
|
760
|
+
yChannelSelector: string
|
|
761
|
+
}
|
|
762
|
+
feDistantLight: { azimuth: number; elevation: number }
|
|
763
|
+
feDropShadow: SVGFilterPrimitive & {
|
|
764
|
+
dx: NumberOrString
|
|
765
|
+
dy: NumberOrString
|
|
766
|
+
stdDeviation: NumberOrString
|
|
767
|
+
}
|
|
768
|
+
feFlood: SVGFilterPrimitive
|
|
769
|
+
feFuncA: {
|
|
770
|
+
type: string
|
|
771
|
+
tableValues: string
|
|
772
|
+
slope: number
|
|
773
|
+
intercept: number
|
|
774
|
+
amplitude: number
|
|
775
|
+
exponent: number
|
|
776
|
+
offset: number
|
|
777
|
+
}
|
|
778
|
+
feFuncB: SVGTagAttributes[`feFuncA`]
|
|
779
|
+
feFuncG: SVGTagAttributes[`feFuncA`]
|
|
780
|
+
feFuncR: SVGTagAttributes[`feFuncA`]
|
|
781
|
+
feGaussianBlur: SVGFilterPrimitive & {
|
|
782
|
+
in: string
|
|
783
|
+
stdDeviation: NumberOrString
|
|
784
|
+
edgeMode: string
|
|
785
|
+
}
|
|
786
|
+
feImage: SVGFilterPrimitive &
|
|
787
|
+
SVGLink & { preserveAspectRatio: string; crossOrigin: CrossOrigin }
|
|
788
|
+
feMerge: SVGFilterPrimitive
|
|
789
|
+
feMergeNode: { in: string }
|
|
790
|
+
feMorphology: SVGFilterPrimitive & {
|
|
791
|
+
in: string
|
|
792
|
+
operator: `erode` | `dilate`
|
|
793
|
+
radius: NumberOrString
|
|
794
|
+
}
|
|
795
|
+
feOffset: SVGFilterPrimitive & {
|
|
796
|
+
in: string
|
|
797
|
+
dx: NumberOrString
|
|
798
|
+
dy: NumberOrString
|
|
799
|
+
}
|
|
800
|
+
fePointLight: { x: number; y: number; z: number }
|
|
801
|
+
feSpecularLighting: SVGFilterPrimitive & {
|
|
802
|
+
in: string
|
|
803
|
+
surfaceScale: number
|
|
804
|
+
specularConstant: number
|
|
805
|
+
specularExponent: number
|
|
806
|
+
kernelUnitLength: NumberOrString
|
|
807
|
+
}
|
|
808
|
+
feSpotLight: {
|
|
809
|
+
x: number
|
|
810
|
+
y: number
|
|
811
|
+
z: number
|
|
812
|
+
pointsAtX: number
|
|
813
|
+
pointsAtY: number
|
|
814
|
+
pointsAtZ: number
|
|
815
|
+
specularExponent: number
|
|
816
|
+
limitingConeAngle: number
|
|
817
|
+
}
|
|
818
|
+
feTile: SVGFilterPrimitive & { in: string }
|
|
819
|
+
feTurbulence: SVGFilterPrimitive & {
|
|
820
|
+
baseFrequency: NumberOrString
|
|
821
|
+
numOctaves: number
|
|
822
|
+
seed: number
|
|
823
|
+
stitchTiles: string
|
|
824
|
+
type: string
|
|
825
|
+
}
|
|
826
|
+
filter: SVGBox & { filterUnits: string; primitiveUnits: string }
|
|
827
|
+
foreignObject: SVGBox
|
|
828
|
+
image: SVGBox &
|
|
829
|
+
SVGLink & {
|
|
830
|
+
preserveAspectRatio: string
|
|
831
|
+
crossOrigin: CrossOrigin
|
|
832
|
+
decoding: `async` | `sync` | `auto`
|
|
833
|
+
}
|
|
834
|
+
line: {
|
|
835
|
+
x1: NumberOrString
|
|
836
|
+
y1: NumberOrString
|
|
837
|
+
x2: NumberOrString
|
|
838
|
+
y2: NumberOrString
|
|
839
|
+
pathLength: number
|
|
840
|
+
}
|
|
841
|
+
linearGradient: SVGLink & {
|
|
842
|
+
x1: NumberOrString
|
|
843
|
+
y1: NumberOrString
|
|
844
|
+
x2: NumberOrString
|
|
845
|
+
y2: NumberOrString
|
|
846
|
+
gradientUnits: string
|
|
847
|
+
gradientTransform: string
|
|
848
|
+
spreadMethod: string
|
|
849
|
+
}
|
|
850
|
+
marker: SVGViewBox & {
|
|
851
|
+
refX: NumberOrString
|
|
852
|
+
refY: NumberOrString
|
|
853
|
+
markerWidth: NumberOrString
|
|
854
|
+
markerHeight: NumberOrString
|
|
855
|
+
markerUnits: string
|
|
856
|
+
orient: NumberOrString
|
|
857
|
+
}
|
|
858
|
+
mask: SVGBox & { maskUnits: string; maskContentUnits: string }
|
|
859
|
+
mpath: SVGLink
|
|
860
|
+
path: { d: string; pathLength: number }
|
|
861
|
+
pattern: SVGBox &
|
|
862
|
+
SVGViewBox &
|
|
863
|
+
SVGLink & {
|
|
864
|
+
patternUnits: string
|
|
865
|
+
patternContentUnits: string
|
|
866
|
+
patternTransform: string
|
|
867
|
+
}
|
|
868
|
+
polygon: { points: string; pathLength: number }
|
|
869
|
+
polyline: SVGTagAttributes[`polygon`]
|
|
870
|
+
radialGradient: SVGLink & {
|
|
871
|
+
cx: NumberOrString
|
|
872
|
+
cy: NumberOrString
|
|
873
|
+
r: NumberOrString
|
|
874
|
+
fx: NumberOrString
|
|
875
|
+
fy: NumberOrString
|
|
876
|
+
fr: NumberOrString
|
|
877
|
+
gradientUnits: string
|
|
878
|
+
gradientTransform: string
|
|
879
|
+
spreadMethod: string
|
|
880
|
+
}
|
|
881
|
+
rect: SVGBox & { rx: NumberOrString; ry: NumberOrString; pathLength: number }
|
|
882
|
+
script: SVGLink & { type: string; crossOrigin: CrossOrigin }
|
|
883
|
+
set: SVGAnimation
|
|
884
|
+
stop: { offset: NumberOrString }
|
|
885
|
+
style: { type: string; media: string; title: string }
|
|
886
|
+
svg: SVGBox & SVGViewBox & { version: string }
|
|
887
|
+
symbol: SVGBox & SVGViewBox & { refX: NumberOrString; refY: NumberOrString }
|
|
888
|
+
text: SVGText
|
|
889
|
+
textPath: SVGLink & {
|
|
890
|
+
startOffset: NumberOrString
|
|
891
|
+
method: string
|
|
892
|
+
spacing: string
|
|
893
|
+
side: string
|
|
894
|
+
textLength: NumberOrString
|
|
895
|
+
lengthAdjust: string
|
|
896
|
+
}
|
|
897
|
+
tspan: SVGText
|
|
898
|
+
use: SVGBox & SVGLink
|
|
899
|
+
view: SVGViewBox & { viewTarget: string }
|
|
900
|
+
}
|
|
901
|
+
export type SVGIntrinsicElements = {
|
|
902
|
+
[Tag in keyof SVGElementTagNameMap]: SVGAttributes<SVGElementTagNameMap[Tag]> &
|
|
903
|
+
(Tag extends keyof SVGTagAttributes ? Attributes<SVGTagAttributes[Tag]> : {})
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
// JSX cannot infer namespace from parents. Shared names (a, script, style,
|
|
907
|
+
// title) use HTML types; unambiguous SVG tags retain their concrete SVG type.
|
|
908
|
+
export type NativeElements = HTMLIntrinsicElements &
|
|
909
|
+
Omit<SVGIntrinsicElements, keyof HTMLIntrinsicElements>
|