@vue-jsx/runtime 3.3.0-beta.0 → 3.3.0-rc.1
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/h.d.ts +19 -16
- package/dist/h.js +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/jsx.d.ts +96 -95
- package/dist/props.d.ts +6 -9
- package/dist/props.js +5 -5
- package/dist/raw.d.ts +9 -10
- package/dist/raw.js +5 -5
- package/dist/ssr.d.ts +2 -4
- package/dist/types.d.ts +17 -20
- package/dist/vapor.d.ts +39 -83
- package/dist/vapor.js +8 -6
- package/dist/vdom.d.ts +20 -46
- package/package.json +20 -20
package/dist/jsx.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EmitFnToProps, ExtractExposed, NodeRef, RenderResult, SlotsToProps } from "./types.js";
|
|
2
2
|
import { AriaAttributes, ReservedProps, StyleValue, UnwrapRef, VNodeRef, VaporComponentInstance } from "vue";
|
|
3
|
-
|
|
4
3
|
//#region src/jsx.d.ts
|
|
5
4
|
type NativeElement = Element;
|
|
6
|
-
|
|
5
|
+
type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
6
|
+
export declare namespace JSX {
|
|
7
7
|
type Element = RenderResult;
|
|
8
8
|
interface ElementAttributesProperty {
|
|
9
9
|
$props: {};
|
|
@@ -18,9 +18,9 @@ declare namespace JSX {
|
|
|
18
18
|
class?: ClassValue | undefined;
|
|
19
19
|
style?: StyleValue | undefined;
|
|
20
20
|
}
|
|
21
|
-
type LibraryManagedAttributes<Component, Props> =
|
|
21
|
+
type LibraryManagedAttributes<Component, Props> = DistributiveOmit<Props, 'ref'> & (Component extends (abstract new (...args: any[]) => infer Instance) ? {
|
|
22
22
|
ref?: NodeRef<ExtractExposed<Props, 'exposed' extends keyof Instance ? string extends keyof NonNullable<NonNullable<Instance['exposed']>> ? Instance : UnwrapRef<Instance['exposed']> : Instance>>;
|
|
23
|
-
} & ('v-slots' extends keyof Props ? {} : '$slots' extends keyof Instance ? SlotsToProps<Instance['$slots'] & {}> : 'slots' extends keyof Instance ? SlotsToProps<Instance['slots'] & {}> : {}) : Component extends ((props:
|
|
23
|
+
} & ('v-slots' extends keyof Props ? {} : '$slots' extends keyof Instance ? SlotsToProps<Instance['$slots'] & {}> : 'slots' extends keyof Instance ? SlotsToProps<Instance['slots'] & {}> : {}) : Component extends ((props: any, ctx: {
|
|
24
24
|
slots: infer Slots;
|
|
25
25
|
attrs: any;
|
|
26
26
|
emit: infer Emit;
|
|
@@ -40,7 +40,7 @@ interface StyleMedia {}
|
|
|
40
40
|
*/
|
|
41
41
|
type CrossOrigin = 'anonymous' | 'use-credentials' | '';
|
|
42
42
|
type ClassValue = false | null | undefined | string | Record<string, any> | Array<ClassValue>;
|
|
43
|
-
interface HTMLAttributes<T = HTMLElement> extends AriaAttributes, EventHandlers<Events<T>> {
|
|
43
|
+
export interface HTMLAttributes<T = HTMLElement> extends AriaAttributes, EventHandlers<Events<T>> {
|
|
44
44
|
innerHTML?: string | undefined;
|
|
45
45
|
class?: ClassValue | undefined;
|
|
46
46
|
style?: StyleValue | undefined;
|
|
@@ -63,6 +63,7 @@ interface HTMLAttributes<T = HTMLElement> extends AriaAttributes, EventHandlers<
|
|
|
63
63
|
nonce?: string | undefined;
|
|
64
64
|
placeholder?: string | undefined;
|
|
65
65
|
spellcheck?: Booleanish | undefined;
|
|
66
|
+
slot?: string | undefined;
|
|
66
67
|
tabindex?: Numberish | undefined;
|
|
67
68
|
title?: string | undefined;
|
|
68
69
|
translate?: 'yes' | 'no' | undefined;
|
|
@@ -110,7 +111,7 @@ interface HTMLAttributes<T = HTMLElement> extends AriaAttributes, EventHandlers<
|
|
|
110
111
|
part?: string;
|
|
111
112
|
}
|
|
112
113
|
type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
113
|
-
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
114
|
+
export interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
114
115
|
download?: any | undefined;
|
|
115
116
|
href?: string | undefined;
|
|
116
117
|
hreflang?: string | undefined;
|
|
@@ -121,7 +122,7 @@ interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
121
122
|
type?: string | undefined;
|
|
122
123
|
referrerpolicy?: HTMLAttributeReferrerPolicy | undefined;
|
|
123
124
|
}
|
|
124
|
-
interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
125
|
+
export interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
125
126
|
alt?: string | undefined;
|
|
126
127
|
coords?: string | undefined;
|
|
127
128
|
download?: any | undefined;
|
|
@@ -132,15 +133,15 @@ interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
132
133
|
shape?: string | undefined;
|
|
133
134
|
target?: string | undefined;
|
|
134
135
|
}
|
|
135
|
-
interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
|
|
136
|
-
interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
136
|
+
export interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
|
|
137
|
+
export interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
137
138
|
href?: string | undefined;
|
|
138
139
|
target?: string | undefined;
|
|
139
140
|
}
|
|
140
|
-
interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
141
|
+
export interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
141
142
|
cite?: string | undefined;
|
|
142
143
|
}
|
|
143
|
-
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
144
|
+
export interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
144
145
|
disabled?: Booleanish | undefined;
|
|
145
146
|
form?: string | undefined;
|
|
146
147
|
formaction?: string | undefined;
|
|
@@ -152,45 +153,45 @@ interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
152
153
|
type?: 'submit' | 'reset' | 'button' | undefined;
|
|
153
154
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
154
155
|
}
|
|
155
|
-
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
156
|
+
export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
156
157
|
height?: Numberish | undefined;
|
|
157
158
|
width?: Numberish | undefined;
|
|
158
159
|
}
|
|
159
|
-
interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
160
|
+
export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
160
161
|
span?: Numberish | undefined;
|
|
161
162
|
width?: Numberish | undefined;
|
|
162
163
|
}
|
|
163
|
-
interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
164
|
+
export interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
164
165
|
span?: Numberish | undefined;
|
|
165
166
|
}
|
|
166
|
-
interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
167
|
+
export interface DataHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
167
168
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
168
169
|
}
|
|
169
|
-
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
170
|
+
export interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
170
171
|
name?: string | undefined;
|
|
171
172
|
open?: Booleanish | undefined;
|
|
172
173
|
}
|
|
173
|
-
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
174
|
+
export interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
174
175
|
cite?: string | undefined;
|
|
175
176
|
datetime?: string | undefined;
|
|
176
177
|
}
|
|
177
|
-
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
178
|
+
export interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
178
179
|
onCancel?: EventHandler<SyntheticEvent<T>> | undefined;
|
|
179
180
|
onClose?: EventHandler<SyntheticEvent<T>> | undefined;
|
|
180
181
|
open?: boolean | undefined;
|
|
181
182
|
}
|
|
182
|
-
interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
183
|
+
export interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
183
184
|
height?: Numberish | undefined;
|
|
184
185
|
src?: string | undefined;
|
|
185
186
|
type?: string | undefined;
|
|
186
187
|
width?: Numberish | undefined;
|
|
187
188
|
}
|
|
188
|
-
interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
189
|
+
export interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
189
190
|
disabled?: Booleanish | undefined;
|
|
190
191
|
form?: string | undefined;
|
|
191
192
|
name?: string | undefined;
|
|
192
193
|
}
|
|
193
|
-
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
194
|
+
export interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
194
195
|
acceptcharset?: string | undefined;
|
|
195
196
|
action?: string | undefined;
|
|
196
197
|
autocomplete?: string | undefined;
|
|
@@ -200,10 +201,10 @@ interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
200
201
|
novalidate?: Booleanish | undefined;
|
|
201
202
|
target?: string | undefined;
|
|
202
203
|
}
|
|
203
|
-
interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
204
|
+
export interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
204
205
|
manifest?: string | undefined;
|
|
205
206
|
}
|
|
206
|
-
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
207
|
+
export interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
207
208
|
allow?: string | undefined;
|
|
208
209
|
allowfullscreen?: Booleanish | undefined;
|
|
209
210
|
allowtransparency?: Booleanish | undefined;
|
|
@@ -225,7 +226,7 @@ interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
225
226
|
srcdoc?: string | undefined;
|
|
226
227
|
width?: Numberish | undefined;
|
|
227
228
|
}
|
|
228
|
-
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
229
|
+
export interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
229
230
|
alt?: string | undefined;
|
|
230
231
|
crossorigin?: CrossOrigin | undefined;
|
|
231
232
|
decoding?: 'async' | 'auto' | 'sync' | undefined;
|
|
@@ -239,11 +240,11 @@ interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
239
240
|
usemap?: string | undefined;
|
|
240
241
|
width?: Numberish | undefined;
|
|
241
242
|
}
|
|
242
|
-
interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
243
|
+
export interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
243
244
|
cite?: string | undefined;
|
|
244
245
|
datetime?: string | undefined;
|
|
245
246
|
}
|
|
246
|
-
type InputTypeHTMLAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {});
|
|
247
|
+
export type InputTypeHTMLAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {});
|
|
247
248
|
type AutoFillAddressKind = 'billing' | 'shipping';
|
|
248
249
|
type AutoFillBase = '' | 'off' | 'on';
|
|
249
250
|
type AutoFillContactField = 'email' | 'tel' | 'tel-area-code' | 'tel-country-code' | 'tel-extension' | 'tel-local' | 'tel-local-prefix' | 'tel-local-suffix' | 'tel-national';
|
|
@@ -256,7 +257,7 @@ type AutoFillField = AutoFillNormalField | `${OptionalPrefixToken<AutoFillContac
|
|
|
256
257
|
type AutoFillSection = `section-${string}`;
|
|
257
258
|
type AutoFill = AutoFillBase | `${OptionalPrefixToken<AutoFillSection>}${OptionalPrefixToken<AutoFillAddressKind>}${AutoFillField}${OptionalPostfixToken<AutoFillCredentialField>}`;
|
|
258
259
|
type HTMLInputAutoCompleteAttribute = AutoFill | (string & {});
|
|
259
|
-
interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
260
|
+
export interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
260
261
|
accept?: string | undefined;
|
|
261
262
|
alt?: string | undefined;
|
|
262
263
|
autocomplete?: HTMLInputAutoCompleteAttribute | undefined;
|
|
@@ -289,7 +290,7 @@ interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
289
290
|
value?: any;
|
|
290
291
|
width?: Numberish | undefined;
|
|
291
292
|
}
|
|
292
|
-
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
293
|
+
export interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
293
294
|
challenge?: string | undefined;
|
|
294
295
|
disabled?: Booleanish | undefined;
|
|
295
296
|
form?: string | undefined;
|
|
@@ -297,14 +298,14 @@ interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
297
298
|
keyparams?: string | undefined;
|
|
298
299
|
name?: string | undefined;
|
|
299
300
|
}
|
|
300
|
-
interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
301
|
+
export interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
301
302
|
for?: string | undefined;
|
|
302
303
|
form?: string | undefined;
|
|
303
304
|
}
|
|
304
|
-
interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
305
|
+
export interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
305
306
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
306
307
|
}
|
|
307
|
-
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
308
|
+
export interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
308
309
|
as?: string | undefined;
|
|
309
310
|
crossorigin?: CrossOrigin | undefined;
|
|
310
311
|
fetchPriority?: 'high' | 'low' | 'auto' | undefined;
|
|
@@ -319,13 +320,13 @@ interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
319
320
|
type?: string | undefined;
|
|
320
321
|
charset?: string | undefined;
|
|
321
322
|
}
|
|
322
|
-
interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
323
|
+
export interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
323
324
|
name?: string | undefined;
|
|
324
325
|
}
|
|
325
|
-
interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
326
|
+
export interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
326
327
|
type?: string | undefined;
|
|
327
328
|
}
|
|
328
|
-
interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
329
|
+
export interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
329
330
|
autoplay?: Booleanish | undefined;
|
|
330
331
|
controls?: Booleanish | undefined;
|
|
331
332
|
controlslist?: string | undefined;
|
|
@@ -337,14 +338,14 @@ interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
337
338
|
preload?: string | undefined;
|
|
338
339
|
src?: string | undefined;
|
|
339
340
|
}
|
|
340
|
-
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
341
|
+
export interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
341
342
|
charset?: string | undefined;
|
|
342
343
|
content?: string | undefined;
|
|
343
344
|
httpequiv?: string | undefined;
|
|
344
345
|
media?: string | undefined | undefined;
|
|
345
346
|
name?: string | undefined;
|
|
346
347
|
}
|
|
347
|
-
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
348
|
+
export interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
348
349
|
form?: string | undefined;
|
|
349
350
|
high?: Numberish | undefined;
|
|
350
351
|
low?: Numberish | undefined;
|
|
@@ -353,10 +354,10 @@ interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
353
354
|
optimum?: Numberish | undefined;
|
|
354
355
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
355
356
|
}
|
|
356
|
-
interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
357
|
+
export interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
357
358
|
cite?: string | undefined;
|
|
358
359
|
}
|
|
359
|
-
interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
360
|
+
export interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
360
361
|
classid?: string | undefined;
|
|
361
362
|
data?: string | undefined;
|
|
362
363
|
form?: string | undefined;
|
|
@@ -367,35 +368,35 @@ interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
367
368
|
width?: Numberish | undefined;
|
|
368
369
|
wmode?: string | undefined;
|
|
369
370
|
}
|
|
370
|
-
interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
371
|
+
export interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
371
372
|
reversed?: Booleanish | undefined;
|
|
372
373
|
start?: Numberish | undefined;
|
|
373
374
|
type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined;
|
|
374
375
|
}
|
|
375
|
-
interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
376
|
+
export interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
376
377
|
disabled?: Booleanish | undefined;
|
|
377
378
|
label?: string | undefined;
|
|
378
379
|
}
|
|
379
|
-
interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
380
|
+
export interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
380
381
|
disabled?: Booleanish | undefined;
|
|
381
382
|
label?: string | undefined;
|
|
382
383
|
selected?: Booleanish | undefined;
|
|
383
384
|
value?: any;
|
|
384
385
|
}
|
|
385
|
-
interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
386
|
+
export interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
386
387
|
for?: string | undefined;
|
|
387
388
|
form?: string | undefined;
|
|
388
389
|
name?: string | undefined;
|
|
389
390
|
}
|
|
390
|
-
interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
391
|
+
export interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
391
392
|
name?: string | undefined;
|
|
392
393
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
393
394
|
}
|
|
394
|
-
interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
395
|
+
export interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
395
396
|
max?: Numberish | undefined;
|
|
396
397
|
value?: string | ReadonlyArray<string> | number | undefined;
|
|
397
398
|
}
|
|
398
|
-
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
399
|
+
export interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
399
400
|
async?: Booleanish | undefined;
|
|
400
401
|
/** @deprecated */
|
|
401
402
|
charset?: string | undefined;
|
|
@@ -407,7 +408,7 @@ interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
407
408
|
src?: string | undefined;
|
|
408
409
|
type?: string | undefined;
|
|
409
410
|
}
|
|
410
|
-
interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
411
|
+
export interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
411
412
|
autocomplete?: string | undefined;
|
|
412
413
|
disabled?: Booleanish | undefined;
|
|
413
414
|
form?: string | undefined;
|
|
@@ -417,7 +418,7 @@ interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
417
418
|
size?: Numberish | undefined;
|
|
418
419
|
value?: any;
|
|
419
420
|
}
|
|
420
|
-
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
421
|
+
export interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
421
422
|
height?: number | undefined;
|
|
422
423
|
media?: string | undefined;
|
|
423
424
|
sizes?: string | undefined;
|
|
@@ -426,12 +427,12 @@ interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
426
427
|
type?: string | undefined;
|
|
427
428
|
width?: number | undefined;
|
|
428
429
|
}
|
|
429
|
-
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
430
|
+
export interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
430
431
|
media?: string | undefined;
|
|
431
432
|
scoped?: Booleanish | undefined;
|
|
432
433
|
type?: string | undefined;
|
|
433
434
|
}
|
|
434
|
-
interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
435
|
+
export interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
435
436
|
align?: 'left' | 'center' | 'right' | undefined;
|
|
436
437
|
bgcolor?: string | undefined;
|
|
437
438
|
border?: number | undefined;
|
|
@@ -442,7 +443,7 @@ interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
442
443
|
summary?: string | undefined;
|
|
443
444
|
width?: Numberish | undefined;
|
|
444
445
|
}
|
|
445
|
-
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
446
|
+
export interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
446
447
|
autocomplete?: string | undefined;
|
|
447
448
|
cols?: Numberish | undefined;
|
|
448
449
|
dirname?: string | undefined;
|
|
@@ -458,7 +459,7 @@ interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
458
459
|
value?: string | ReadonlyArray<string> | number | null | undefined;
|
|
459
460
|
wrap?: string | undefined;
|
|
460
461
|
}
|
|
461
|
-
interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
462
|
+
export interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
462
463
|
align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined;
|
|
463
464
|
colspan?: Numberish | undefined;
|
|
464
465
|
headers?: string | undefined;
|
|
@@ -469,7 +470,7 @@ interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
469
470
|
width?: Numberish | undefined;
|
|
470
471
|
valign?: 'top' | 'middle' | 'bottom' | 'baseline' | undefined;
|
|
471
472
|
}
|
|
472
|
-
interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
473
|
+
export interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
473
474
|
align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined;
|
|
474
475
|
colspan?: Numberish | undefined;
|
|
475
476
|
headers?: string | undefined;
|
|
@@ -477,17 +478,17 @@ interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
477
478
|
scope?: string | undefined;
|
|
478
479
|
abbr?: string | undefined;
|
|
479
480
|
}
|
|
480
|
-
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
481
|
+
export interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
481
482
|
datetime?: string | undefined;
|
|
482
483
|
}
|
|
483
|
-
interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
484
|
+
export interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
484
485
|
default?: Booleanish | undefined;
|
|
485
486
|
kind?: string | undefined;
|
|
486
487
|
label?: string | undefined;
|
|
487
488
|
src?: string | undefined;
|
|
488
489
|
srclang?: string | undefined;
|
|
489
490
|
}
|
|
490
|
-
interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
491
|
+
export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
491
492
|
height?: Numberish | undefined;
|
|
492
493
|
playsinline?: Booleanish | undefined;
|
|
493
494
|
poster?: string | undefined;
|
|
@@ -495,7 +496,7 @@ interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
|
495
496
|
disablePictureInPicture?: Booleanish | undefined;
|
|
496
497
|
disableRemotePlayback?: Booleanish | undefined;
|
|
497
498
|
}
|
|
498
|
-
interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
499
|
+
export interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
499
500
|
allowfullscreen?: Booleanish | undefined;
|
|
500
501
|
allowpopups?: Booleanish | undefined;
|
|
501
502
|
autosize?: Booleanish | undefined;
|
|
@@ -513,7 +514,7 @@ interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
|
513
514
|
useragent?: string | undefined;
|
|
514
515
|
webpreferences?: string | undefined;
|
|
515
516
|
}
|
|
516
|
-
interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
517
|
+
export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
517
518
|
innerHTML?: string | undefined;
|
|
518
519
|
/**
|
|
519
520
|
* SVG Styling Attributes
|
|
@@ -774,7 +775,7 @@ interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
|
774
775
|
z?: Numberish | undefined;
|
|
775
776
|
zoomAndPan?: string | undefined;
|
|
776
777
|
}
|
|
777
|
-
interface IntrinsicElementAttributes {
|
|
778
|
+
export interface IntrinsicElementAttributes {
|
|
778
779
|
a: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
779
780
|
abbr: HTMLAttributes<HTMLElement>;
|
|
780
781
|
address: HTMLAttributes<HTMLElement>;
|
|
@@ -952,7 +953,7 @@ interface IntrinsicElementAttributes {
|
|
|
952
953
|
use: SVGAttributes;
|
|
953
954
|
view: SVGAttributes;
|
|
954
955
|
}
|
|
955
|
-
interface Events<T = Element> {
|
|
956
|
+
export interface Events<T = Element> {
|
|
956
957
|
onCopy: ClipboardEventHandler<T>;
|
|
957
958
|
onCut: ClipboardEventHandler<T>;
|
|
958
959
|
onPaste: ClipboardEventHandler<T>;
|
|
@@ -1037,11 +1038,12 @@ interface Events<T = Element> {
|
|
|
1037
1038
|
onTransitionend: TransitionEventHandler<T>;
|
|
1038
1039
|
onTransitionstart: TransitionEventHandler<T>;
|
|
1039
1040
|
}
|
|
1040
|
-
type EventHandlers<E> = { [K in keyof E]?: E[K] extends ((...args: any) => any) ? E[K] : (payload: E[K]) => void };
|
|
1041
|
-
type
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1041
|
+
export type EventHandlers<E> = { [K in keyof E]?: E[K] extends ((...args: any) => any) ? E[K] : (payload: E[K]) => void; };
|
|
1042
|
+
type IntrinsicElement<K> = K extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[K] : K extends keyof SVGElementTagNameMap ? SVGElementTagNameMap[K] : Element;
|
|
1043
|
+
export type NativeElements = { [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & Omit<ReservedProps, 'ref'> & {
|
|
1044
|
+
ref?: NodeRef<IntrinsicElement<K>>;
|
|
1045
|
+
}; };
|
|
1046
|
+
export interface BaseSyntheticEvent<E = object, C = unknown, T = unknown> {
|
|
1045
1047
|
nativeEvent: E;
|
|
1046
1048
|
currentTarget: C;
|
|
1047
1049
|
target: T;
|
|
@@ -1065,35 +1067,35 @@ interface BaseSyntheticEvent<E = object, C = unknown, T = unknown> {
|
|
|
1065
1067
|
* This might be a child element to the element on which the event listener is registered.
|
|
1066
1068
|
* If you thought this should be `EventTarget & T`, see https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11508#issuecomment-256045682
|
|
1067
1069
|
*/
|
|
1068
|
-
interface SyntheticEvent<T = Element, E = Event> extends BaseSyntheticEvent<E, EventTarget & T, EventTarget> {}
|
|
1069
|
-
type EventHandler<E extends SyntheticEvent<any>> = {
|
|
1070
|
+
export interface SyntheticEvent<T = Element, E = Event> extends BaseSyntheticEvent<E, EventTarget & T, EventTarget> {}
|
|
1071
|
+
export type EventHandler<E extends SyntheticEvent<any>> = {
|
|
1070
1072
|
bivarianceHack: (event: E) => void;
|
|
1071
1073
|
}['bivarianceHack'];
|
|
1072
|
-
type BaseEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
|
|
1073
|
-
interface ClipboardEvent<T = Element> extends SyntheticEvent<T, globalThis.ClipboardEvent> {
|
|
1074
|
+
export type BaseEventHandler<T = Element> = EventHandler<SyntheticEvent<T>>;
|
|
1075
|
+
export interface ClipboardEvent<T = Element> extends SyntheticEvent<T, globalThis.ClipboardEvent> {
|
|
1074
1076
|
clipboardData: DataTransfer;
|
|
1075
1077
|
}
|
|
1076
|
-
type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
|
|
1077
|
-
interface CompositionEvent<T = Element> extends SyntheticEvent<T, globalThis.CompositionEvent> {
|
|
1078
|
+
export type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent<T>>;
|
|
1079
|
+
export interface CompositionEvent<T = Element> extends SyntheticEvent<T, globalThis.CompositionEvent> {
|
|
1078
1080
|
data: string;
|
|
1079
1081
|
}
|
|
1080
|
-
type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
|
|
1081
|
-
interface DragEvent<T = Element> extends MouseEvent<T, globalThis.DragEvent> {
|
|
1082
|
+
export type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent<T>>;
|
|
1083
|
+
export interface DragEvent<T = Element> extends MouseEvent<T, globalThis.DragEvent> {
|
|
1082
1084
|
dataTransfer: DataTransfer;
|
|
1083
1085
|
}
|
|
1084
|
-
type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
|
|
1085
|
-
interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, globalThis.FocusEvent> {
|
|
1086
|
+
export type DragEventHandler<T = Element> = EventHandler<DragEvent<T>>;
|
|
1087
|
+
export interface FocusEvent<Target = Element, RelatedTarget = Element> extends SyntheticEvent<Target, globalThis.FocusEvent> {
|
|
1086
1088
|
relatedTarget: (EventTarget & RelatedTarget) | null;
|
|
1087
1089
|
target: EventTarget & Target;
|
|
1088
1090
|
}
|
|
1089
|
-
type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
|
|
1090
|
-
interface FormEvent<T = Element> extends SyntheticEvent<T> {}
|
|
1091
|
-
type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
|
|
1092
|
-
interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
|
|
1091
|
+
export type FocusEventHandler<T = Element> = EventHandler<FocusEvent<T>>;
|
|
1092
|
+
export interface FormEvent<T = Element> extends SyntheticEvent<T> {}
|
|
1093
|
+
export type FormEventHandler<T = Element> = EventHandler<FormEvent<T>>;
|
|
1094
|
+
export interface ChangeEvent<T = Element> extends SyntheticEvent<T> {
|
|
1093
1095
|
target: EventTarget & T;
|
|
1094
1096
|
}
|
|
1095
|
-
type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
|
|
1096
|
-
interface KeyboardEvent<T = Element> extends UIEvent<T, globalThis.KeyboardEvent> {
|
|
1097
|
+
export type ChangeEventHandler<T = Element> = EventHandler<ChangeEvent<T>>;
|
|
1098
|
+
export interface KeyboardEvent<T = Element> extends UIEvent<T, globalThis.KeyboardEvent> {
|
|
1097
1099
|
altKey: boolean;
|
|
1098
1100
|
/** @deprecated */
|
|
1099
1101
|
charCode: number;
|
|
@@ -1117,9 +1119,9 @@ interface KeyboardEvent<T = Element> extends UIEvent<T, globalThis.KeyboardEvent
|
|
|
1117
1119
|
/** @deprecated */
|
|
1118
1120
|
which: number;
|
|
1119
1121
|
}
|
|
1120
|
-
type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
|
|
1121
|
-
type ModifierKey = 'Alt' | 'AltGraph' | 'CapsLock' | 'Control' | 'Fn' | 'FnLock' | 'Hyper' | 'Meta' | 'NumLock' | 'ScrollLock' | 'Shift' | 'Super' | 'Symbol' | 'SymbolLock';
|
|
1122
|
-
interface MouseEvent<T = Element, E = globalThis.MouseEvent> extends UIEvent<T, E> {
|
|
1122
|
+
export type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent<T>>;
|
|
1123
|
+
export type ModifierKey = 'Alt' | 'AltGraph' | 'CapsLock' | 'Control' | 'Fn' | 'FnLock' | 'Hyper' | 'Meta' | 'NumLock' | 'ScrollLock' | 'Shift' | 'Super' | 'Symbol' | 'SymbolLock';
|
|
1124
|
+
export interface MouseEvent<T = Element, E = globalThis.MouseEvent> extends UIEvent<T, E> {
|
|
1123
1125
|
altKey: boolean;
|
|
1124
1126
|
button: number;
|
|
1125
1127
|
buttons: number;
|
|
@@ -1140,34 +1142,33 @@ interface MouseEvent<T = Element, E = globalThis.MouseEvent> extends UIEvent<T,
|
|
|
1140
1142
|
screenY: number;
|
|
1141
1143
|
shiftKey: boolean;
|
|
1142
1144
|
}
|
|
1143
|
-
type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
|
|
1144
|
-
interface AbstractView {
|
|
1145
|
+
export type MouseEventHandler<T = Element> = EventHandler<MouseEvent<T>>;
|
|
1146
|
+
export interface AbstractView {
|
|
1145
1147
|
styleMedia: StyleMedia;
|
|
1146
1148
|
document: Document;
|
|
1147
1149
|
}
|
|
1148
|
-
interface UIEvent<T = Element, E = globalThis.UIEvent> extends SyntheticEvent<T, E> {
|
|
1150
|
+
export interface UIEvent<T = Element, E = globalThis.UIEvent> extends SyntheticEvent<T, E> {
|
|
1149
1151
|
detail: number;
|
|
1150
1152
|
view: AbstractView;
|
|
1151
1153
|
}
|
|
1152
|
-
type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
|
|
1153
|
-
interface WheelEvent<T = Element> extends MouseEvent<T, globalThis.WheelEvent> {
|
|
1154
|
+
export type UIEventHandler<T = Element> = EventHandler<UIEvent<T>>;
|
|
1155
|
+
export interface WheelEvent<T = Element> extends MouseEvent<T, globalThis.WheelEvent> {
|
|
1154
1156
|
deltaMode: number;
|
|
1155
1157
|
deltaX: number;
|
|
1156
1158
|
deltaY: number;
|
|
1157
1159
|
deltaZ: number;
|
|
1158
1160
|
}
|
|
1159
|
-
type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
|
|
1160
|
-
interface AnimationEvent<T = Element> extends SyntheticEvent<T, globalThis.AnimationEvent> {
|
|
1161
|
+
export type WheelEventHandler<T = Element> = EventHandler<WheelEvent<T>>;
|
|
1162
|
+
export interface AnimationEvent<T = Element> extends SyntheticEvent<T, globalThis.AnimationEvent> {
|
|
1161
1163
|
animationName: string;
|
|
1162
1164
|
elapsedTime: number;
|
|
1163
1165
|
pseudoElement: string;
|
|
1164
1166
|
}
|
|
1165
|
-
type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
|
|
1166
|
-
interface TransitionEvent<T = Element> extends SyntheticEvent<T, globalThis.TransitionEvent> {
|
|
1167
|
+
export type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent<T>>;
|
|
1168
|
+
export interface TransitionEvent<T = Element> extends SyntheticEvent<T, globalThis.TransitionEvent> {
|
|
1167
1169
|
elapsedTime: number;
|
|
1168
1170
|
propertyName: string;
|
|
1169
1171
|
pseudoElement: string;
|
|
1170
1172
|
}
|
|
1171
|
-
type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
|
|
1172
|
-
//#endregion
|
|
1173
|
-
export { AbstractView, AnchorHTMLAttributes, AnimationEvent, AnimationEventHandler, AreaHTMLAttributes, AudioHTMLAttributes, BaseEventHandler, BaseHTMLAttributes, BaseSyntheticEvent, BlockquoteHTMLAttributes, ButtonHTMLAttributes, CanvasHTMLAttributes, ChangeEvent, ChangeEventHandler, ClipboardEvent, ClipboardEventHandler, ColHTMLAttributes, ColgroupHTMLAttributes, CompositionEvent, CompositionEventHandler, DataHTMLAttributes, DelHTMLAttributes, DetailsHTMLAttributes, DialogHTMLAttributes, DragEvent, DragEventHandler, EmbedHTMLAttributes, EventHandler, EventHandlers, Events, FieldsetHTMLAttributes, FocusEvent, FocusEventHandler, FormEvent, FormEventHandler, FormHTMLAttributes, HTMLAttributes, HtmlHTMLAttributes, IframeHTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, InputTypeHTMLAttribute, InsHTMLAttributes, IntrinsicElementAttributes, JSX, KeyboardEvent, KeyboardEventHandler, KeygenHTMLAttributes, LabelHTMLAttributes, LiHTMLAttributes, LinkHTMLAttributes, MapHTMLAttributes, MediaHTMLAttributes, MenuHTMLAttributes, MetaHTMLAttributes, MeterHTMLAttributes, ModifierKey, MouseEvent, MouseEventHandler, NativeElements, ObjectHTMLAttributes, OlHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, OutputHTMLAttributes, ParamHTMLAttributes, ProgressHTMLAttributes, QuoteHTMLAttributes, SVGAttributes, ScriptHTMLAttributes, SelectHTMLAttributes, SourceHTMLAttributes, StyleHTMLAttributes, SyntheticEvent, TableHTMLAttributes, TdHTMLAttributes, TextareaHTMLAttributes, ThHTMLAttributes, TimeHTMLAttributes, TrackHTMLAttributes, TransitionEvent, TransitionEventHandler, UIEvent, UIEventHandler, VideoHTMLAttributes, WebViewHTMLAttributes, WheelEvent, WheelEventHandler };
|
|
1173
|
+
export type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent<T>>;
|
|
1174
|
+
//#endregion
|
package/dist/props.d.ts
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import * as _$vue from "vue";
|
|
2
|
-
|
|
3
1
|
//#region src/props.d.ts
|
|
4
|
-
declare function getCurrentInstance():
|
|
2
|
+
export declare function getCurrentInstance(): import('vue').GenericComponentInstance | null;
|
|
5
3
|
/**
|
|
6
4
|
* Returns the props of the current component instance.
|
|
7
5
|
*
|
|
8
6
|
* @example
|
|
9
7
|
* ```tsx
|
|
10
|
-
* import { useProps } from 'vue-jsx
|
|
8
|
+
* import { useProps } from 'vue-jsx'
|
|
11
9
|
*
|
|
12
10
|
* defineComponent(({ foo = '' })=>{
|
|
13
11
|
* const props = useProps() // { foo: '' }
|
|
14
12
|
* })
|
|
15
13
|
* ```
|
|
16
14
|
*/
|
|
17
|
-
declare function useProps(): {
|
|
15
|
+
export declare function useProps(): {
|
|
18
16
|
[x: string]: unknown;
|
|
19
17
|
};
|
|
20
18
|
/**
|
|
@@ -23,12 +21,11 @@ declare function useProps(): {
|
|
|
23
21
|
*
|
|
24
22
|
* @example
|
|
25
23
|
* ```tsx
|
|
26
|
-
* import { useFullProps } from 'vue-jsx
|
|
24
|
+
* import { useFullProps } from 'vue-jsx'
|
|
27
25
|
*
|
|
28
26
|
* defineComponent((props) => {
|
|
29
27
|
* const fullProps = useFullProps() // = useAttrs() + useProps()
|
|
30
28
|
* })
|
|
31
29
|
*/
|
|
32
|
-
declare function useFullProps(): {};
|
|
33
|
-
//#endregion
|
|
34
|
-
export { getCurrentInstance, useFullProps, useProps };
|
|
30
|
+
export declare function useFullProps(): {};
|
|
31
|
+
//#endregion
|
package/dist/props.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Vue from "vue";
|
|
2
2
|
import { computed, useAttrs } from "vue";
|
|
3
3
|
//#region src/props.ts
|
|
4
|
-
|
|
4
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
5
5
|
function getCurrentInstance() {
|
|
6
6
|
return Vue.currentInstance || Vue.getCurrentInstance();
|
|
7
7
|
}
|
|
@@ -10,14 +10,14 @@ function getCurrentInstance() {
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
13
|
-
* import { useProps } from 'vue-jsx
|
|
13
|
+
* import { useProps } from 'vue-jsx'
|
|
14
14
|
*
|
|
15
15
|
* defineComponent(({ foo = '' })=>{
|
|
16
16
|
* const props = useProps() // { foo: '' }
|
|
17
17
|
* })
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
21
21
|
function useProps() {
|
|
22
22
|
return (/* @__PURE__ */ getCurrentInstance()).props;
|
|
23
23
|
}
|
|
@@ -27,13 +27,13 @@ function useProps() {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* ```tsx
|
|
30
|
-
* import { useFullProps } from 'vue-jsx
|
|
30
|
+
* import { useFullProps } from 'vue-jsx'
|
|
31
31
|
*
|
|
32
32
|
* defineComponent((props) => {
|
|
33
33
|
* const fullProps = useFullProps() // = useAttrs() + useProps()
|
|
34
34
|
* })
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
37
37
|
function useFullProps() {
|
|
38
38
|
const attrs = useAttrs();
|
|
39
39
|
if (!(/* @__PURE__ */ getCurrentInstance()).type.props) return attrs;
|
package/dist/raw.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
//#region src/raw.d.ts
|
|
2
|
-
declare const propsHelperCode: string;
|
|
3
|
-
declare const vdomHelperCode: string;
|
|
4
|
-
declare const vaporHelperCode: string;
|
|
5
|
-
declare const ssrHelperCode: string;
|
|
6
|
-
declare const propsHelperId = "/vue-jsx
|
|
7
|
-
declare const vdomHelperId = "/vue-jsx
|
|
8
|
-
declare const vaporHelperId = "/vue-jsx
|
|
9
|
-
declare const ssrHelperId = "/vue-jsx
|
|
10
|
-
//#endregion
|
|
11
|
-
export { propsHelperCode, propsHelperId, ssrHelperCode, ssrHelperId, vaporHelperCode, vaporHelperId, vdomHelperCode, vdomHelperId };
|
|
2
|
+
export declare const propsHelperCode: string;
|
|
3
|
+
export declare const vdomHelperCode: string;
|
|
4
|
+
export declare const vaporHelperCode: string;
|
|
5
|
+
export declare const ssrHelperCode: string;
|
|
6
|
+
export declare const propsHelperId = "/vue-jsx/props";
|
|
7
|
+
export declare const vdomHelperId = "/vue-jsx/vdom";
|
|
8
|
+
export declare const vaporHelperId = "/vue-jsx/vapor";
|
|
9
|
+
export declare const ssrHelperId = "/vue-jsx/ssr";
|
|
10
|
+
//#endregion
|