@pyreon/core 0.7.4 → 0.7.6
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/lib/jsx-dev-runtime.js.map +1 -1
- package/lib/jsx-runtime.js.map +1 -1
- package/lib/types/index.d.ts +514 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/jsx-dev-runtime.d.ts +29 -29
- package/lib/types/jsx-dev-runtime.d.ts.map +1 -1
- package/lib/types/jsx-runtime.d.ts +30 -30
- package/lib/types/jsx-runtime.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +13 -0
- package/src/jsx-runtime.ts +30 -30
package/src/jsx-runtime.ts
CHANGED
|
@@ -36,11 +36,11 @@ export const jsxs = jsx
|
|
|
36
36
|
// ─── JSX types ────────────────────────────────────────────────────────────────
|
|
37
37
|
|
|
38
38
|
type Booleanish = boolean | "true" | "false"
|
|
39
|
-
type CSSProperties = { [K in keyof CSSStyleDeclaration]?: string | number }
|
|
40
|
-
type StyleValue = string | CSSProperties
|
|
39
|
+
export type CSSProperties = { [K in keyof CSSStyleDeclaration]?: string | number }
|
|
40
|
+
export type StyleValue = string | CSSProperties
|
|
41
41
|
|
|
42
42
|
/** Common HTML attributes accepted by all Pyreon elements */
|
|
43
|
-
interface PyreonHTMLAttributes {
|
|
43
|
+
export interface PyreonHTMLAttributes<E extends Element = HTMLElement> {
|
|
44
44
|
// Identity
|
|
45
45
|
id?: string | undefined
|
|
46
46
|
class?: string | (() => string) | undefined
|
|
@@ -92,7 +92,7 @@ interface PyreonHTMLAttributes {
|
|
|
92
92
|
"aria-rowindex"?: number | undefined
|
|
93
93
|
"aria-rowspan"?: number | undefined
|
|
94
94
|
// DOM lifecycle ref — object ref or callback ref
|
|
95
|
-
ref?: { current:
|
|
95
|
+
ref?: { current: E | null } | ((el: E | null) => void) | undefined
|
|
96
96
|
// Key for list reconciliation
|
|
97
97
|
key?: string | number | undefined
|
|
98
98
|
// Children — allows null, undefined, boolean in JSX children positions
|
|
@@ -155,7 +155,7 @@ interface PyreonHTMLAttributes {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/** Attributes specific to form inputs */
|
|
158
|
-
interface InputAttributes extends PyreonHTMLAttributes {
|
|
158
|
+
export interface InputAttributes extends PyreonHTMLAttributes<HTMLInputElement> {
|
|
159
159
|
type?: string | (() => string) | undefined
|
|
160
160
|
value?: string | number | (() => string | number) | undefined
|
|
161
161
|
defaultValue?: string | number | undefined
|
|
@@ -185,14 +185,14 @@ interface InputAttributes extends PyreonHTMLAttributes {
|
|
|
185
185
|
height?: number | string | undefined
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
interface AnchorAttributes extends PyreonHTMLAttributes {
|
|
188
|
+
export interface AnchorAttributes extends PyreonHTMLAttributes<HTMLAnchorElement> {
|
|
189
189
|
href?: string | (() => string) | undefined
|
|
190
190
|
target?: "_blank" | "_self" | "_parent" | "_top" | string | undefined
|
|
191
191
|
rel?: string | undefined
|
|
192
192
|
download?: string | boolean | undefined
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
interface ButtonAttributes extends PyreonHTMLAttributes {
|
|
195
|
+
export interface ButtonAttributes extends PyreonHTMLAttributes<HTMLButtonElement> {
|
|
196
196
|
type?: "button" | "submit" | "reset" | undefined
|
|
197
197
|
disabled?: boolean | (() => boolean) | undefined
|
|
198
198
|
name?: string | undefined
|
|
@@ -205,7 +205,7 @@ interface ButtonAttributes extends PyreonHTMLAttributes {
|
|
|
205
205
|
formTarget?: string | undefined
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
interface TextareaAttributes extends PyreonHTMLAttributes {
|
|
208
|
+
export interface TextareaAttributes extends PyreonHTMLAttributes<HTMLTextAreaElement> {
|
|
209
209
|
value?: string | (() => string) | undefined
|
|
210
210
|
defaultValue?: string | undefined
|
|
211
211
|
placeholder?: string | (() => string) | undefined
|
|
@@ -222,7 +222,7 @@ interface TextareaAttributes extends PyreonHTMLAttributes {
|
|
|
222
222
|
wrap?: "hard" | "soft" | undefined
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
interface SelectAttributes extends PyreonHTMLAttributes {
|
|
225
|
+
export interface SelectAttributes extends PyreonHTMLAttributes<HTMLSelectElement> {
|
|
226
226
|
value?: string | string[] | (() => string | string[]) | undefined
|
|
227
227
|
defaultValue?: string | string[] | undefined
|
|
228
228
|
disabled?: boolean | (() => boolean) | undefined
|
|
@@ -234,14 +234,14 @@ interface SelectAttributes extends PyreonHTMLAttributes {
|
|
|
234
234
|
autoFocus?: boolean | undefined
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
interface OptionAttributes extends PyreonHTMLAttributes {
|
|
237
|
+
interface OptionAttributes extends PyreonHTMLAttributes<HTMLOptionElement> {
|
|
238
238
|
value?: string | number | (() => string | number) | undefined
|
|
239
239
|
disabled?: boolean | (() => boolean) | undefined
|
|
240
240
|
selected?: boolean | (() => boolean) | undefined
|
|
241
241
|
label?: string | undefined
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
interface FormAttributes extends PyreonHTMLAttributes {
|
|
244
|
+
export interface FormAttributes extends PyreonHTMLAttributes<HTMLFormElement> {
|
|
245
245
|
action?: string | undefined
|
|
246
246
|
method?: "get" | "post" | undefined
|
|
247
247
|
encType?: string | undefined
|
|
@@ -251,7 +251,7 @@ interface FormAttributes extends PyreonHTMLAttributes {
|
|
|
251
251
|
autoComplete?: string | undefined
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
interface ImgAttributes extends PyreonHTMLAttributes {
|
|
254
|
+
export interface ImgAttributes extends PyreonHTMLAttributes<HTMLImageElement> {
|
|
255
255
|
src?: string | (() => string) | undefined
|
|
256
256
|
alt?: string | (() => string) | undefined
|
|
257
257
|
width?: number | string | (() => number | string) | undefined
|
|
@@ -264,7 +264,7 @@ interface ImgAttributes extends PyreonHTMLAttributes {
|
|
|
264
264
|
sizes?: string | undefined
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
interface VideoAttributes extends PyreonHTMLAttributes {
|
|
267
|
+
interface VideoAttributes extends PyreonHTMLAttributes<HTMLVideoElement> {
|
|
268
268
|
src?: string | (() => string) | undefined
|
|
269
269
|
width?: number | string | undefined
|
|
270
270
|
height?: number | string | undefined
|
|
@@ -278,7 +278,7 @@ interface VideoAttributes extends PyreonHTMLAttributes {
|
|
|
278
278
|
crossOrigin?: "anonymous" | "use-credentials" | undefined
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
interface AudioAttributes extends PyreonHTMLAttributes {
|
|
281
|
+
interface AudioAttributes extends PyreonHTMLAttributes<HTMLAudioElement> {
|
|
282
282
|
src?: string | (() => string) | undefined
|
|
283
283
|
controls?: boolean | undefined
|
|
284
284
|
autoPlay?: boolean | undefined
|
|
@@ -288,13 +288,13 @@ interface AudioAttributes extends PyreonHTMLAttributes {
|
|
|
288
288
|
crossOrigin?: "anonymous" | "use-credentials" | undefined
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
interface LabelAttributes extends PyreonHTMLAttributes {
|
|
291
|
+
interface LabelAttributes extends PyreonHTMLAttributes<HTMLLabelElement> {
|
|
292
292
|
htmlFor?: string | undefined
|
|
293
293
|
for?: string | undefined
|
|
294
294
|
form?: string | undefined
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
interface ThAttributes extends PyreonHTMLAttributes {
|
|
297
|
+
interface ThAttributes extends PyreonHTMLAttributes<HTMLTableCellElement> {
|
|
298
298
|
colSpan?: number | undefined
|
|
299
299
|
rowSpan?: number | undefined
|
|
300
300
|
scope?: "col" | "row" | "colgroup" | "rowgroup" | undefined
|
|
@@ -302,17 +302,17 @@ interface ThAttributes extends PyreonHTMLAttributes {
|
|
|
302
302
|
headers?: string | undefined
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
interface TdAttributes extends PyreonHTMLAttributes {
|
|
305
|
+
interface TdAttributes extends PyreonHTMLAttributes<HTMLTableCellElement> {
|
|
306
306
|
colSpan?: number | undefined
|
|
307
307
|
rowSpan?: number | undefined
|
|
308
308
|
headers?: string | undefined
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
interface ColAttributes extends PyreonHTMLAttributes {
|
|
311
|
+
interface ColAttributes extends PyreonHTMLAttributes<HTMLTableColElement> {
|
|
312
312
|
span?: number | undefined
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
interface IframeAttributes extends PyreonHTMLAttributes {
|
|
315
|
+
interface IframeAttributes extends PyreonHTMLAttributes<HTMLIFrameElement> {
|
|
316
316
|
src?: string | (() => string) | undefined
|
|
317
317
|
width?: number | string | undefined
|
|
318
318
|
height?: number | string | undefined
|
|
@@ -325,7 +325,7 @@ interface IframeAttributes extends PyreonHTMLAttributes {
|
|
|
325
325
|
title?: string | undefined
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
interface LinkAttributes extends PyreonHTMLAttributes {
|
|
328
|
+
interface LinkAttributes extends PyreonHTMLAttributes<HTMLLinkElement> {
|
|
329
329
|
href?: string | (() => string) | undefined
|
|
330
330
|
rel?: string | undefined
|
|
331
331
|
type?: string | undefined
|
|
@@ -336,7 +336,7 @@ interface LinkAttributes extends PyreonHTMLAttributes {
|
|
|
336
336
|
referrerPolicy?: string | undefined
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
interface MetaAttributes extends PyreonHTMLAttributes {
|
|
339
|
+
interface MetaAttributes extends PyreonHTMLAttributes<HTMLMetaElement> {
|
|
340
340
|
name?: string | undefined
|
|
341
341
|
content?: string | (() => string) | undefined
|
|
342
342
|
httpEquiv?: string | undefined
|
|
@@ -344,7 +344,7 @@ interface MetaAttributes extends PyreonHTMLAttributes {
|
|
|
344
344
|
property?: string | undefined
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
interface ScriptAttributes extends PyreonHTMLAttributes {
|
|
347
|
+
interface ScriptAttributes extends PyreonHTMLAttributes<HTMLScriptElement> {
|
|
348
348
|
src?: string | (() => string) | undefined
|
|
349
349
|
type?: string | undefined
|
|
350
350
|
async?: boolean | undefined
|
|
@@ -355,7 +355,7 @@ interface ScriptAttributes extends PyreonHTMLAttributes {
|
|
|
355
355
|
referrerPolicy?: string | undefined
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
interface SourceAttributes extends PyreonHTMLAttributes {
|
|
358
|
+
interface SourceAttributes extends PyreonHTMLAttributes<HTMLSourceElement> {
|
|
359
359
|
src?: string | (() => string) | undefined
|
|
360
360
|
type?: string | undefined
|
|
361
361
|
srcSet?: string | undefined
|
|
@@ -363,12 +363,12 @@ interface SourceAttributes extends PyreonHTMLAttributes {
|
|
|
363
363
|
media?: string | undefined
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
interface ProgressAttributes extends PyreonHTMLAttributes {
|
|
366
|
+
interface ProgressAttributes extends PyreonHTMLAttributes<HTMLProgressElement> {
|
|
367
367
|
value?: number | (() => number) | undefined
|
|
368
368
|
max?: number | undefined
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
interface MeterAttributes extends PyreonHTMLAttributes {
|
|
371
|
+
interface MeterAttributes extends PyreonHTMLAttributes<HTMLMeterElement> {
|
|
372
372
|
value?: number | (() => number) | undefined
|
|
373
373
|
min?: number | undefined
|
|
374
374
|
max?: number | undefined
|
|
@@ -377,21 +377,21 @@ interface MeterAttributes extends PyreonHTMLAttributes {
|
|
|
377
377
|
optimum?: number | undefined
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
interface DetailsAttributes extends PyreonHTMLAttributes {
|
|
380
|
+
interface DetailsAttributes extends PyreonHTMLAttributes<HTMLDetailsElement> {
|
|
381
381
|
open?: boolean | (() => boolean) | undefined
|
|
382
382
|
}
|
|
383
383
|
|
|
384
|
-
interface DialogAttributes extends PyreonHTMLAttributes {
|
|
384
|
+
interface DialogAttributes extends PyreonHTMLAttributes<HTMLDialogElement> {
|
|
385
385
|
open?: boolean | (() => boolean) | undefined
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
interface OlAttributes extends PyreonHTMLAttributes {
|
|
388
|
+
interface OlAttributes extends PyreonHTMLAttributes<HTMLOListElement> {
|
|
389
389
|
start?: number | undefined
|
|
390
390
|
reversed?: boolean | undefined
|
|
391
391
|
type?: "1" | "a" | "A" | "i" | "I" | undefined
|
|
392
392
|
}
|
|
393
393
|
|
|
394
|
-
interface SvgAttributes extends PyreonHTMLAttributes {
|
|
394
|
+
export interface SvgAttributes extends PyreonHTMLAttributes<SVGElement> {
|
|
395
395
|
viewBox?: string | undefined
|
|
396
396
|
xmlns?: string | undefined
|
|
397
397
|
fill?: string | (() => string) | undefined
|
|
@@ -587,7 +587,7 @@ declare global {
|
|
|
587
587
|
slot: PyreonHTMLAttributes
|
|
588
588
|
portal: PyreonHTMLAttributes
|
|
589
589
|
// Catch-all for custom elements and data-* attrs
|
|
590
|
-
[tagName: string]: PyreonHTMLAttributes
|
|
590
|
+
[tagName: string]: PyreonHTMLAttributes<any>
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
}
|