@vue/runtime-dom 3.6.0-rc.1 → 3.6.0-rc.10
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/runtime-dom.cjs.js +106 -76
- package/dist/runtime-dom.cjs.prod.js +95 -68
- package/dist/runtime-dom.d.ts +147 -157
- package/dist/runtime-dom.esm-browser.js +929 -648
- package/dist/runtime-dom.esm-browser.prod.js +4 -3
- package/dist/runtime-dom.esm-bundler.js +153 -121
- package/dist/runtime-dom.global.js +929 -648
- package/dist/runtime-dom.global.prod.js +4 -3
- package/package.json +5 -5
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { App, BaseTransitionProps, Component, ComponentCustomElementInterface, ComponentInjectOptions, ComponentObjectPropsOptions, ComponentOptions, ComponentOptionsBase, ComponentOptionsMixin, ComponentProvideOptions, ComponentPublicInstance, ComputedOptions, ConcreteComponent, CreateAppFunction, CreateComponentPublicInstanceWithMixins, DefineComponent, Directive, EmitsOptions, EmitsToProps, ExtractPropTypes, FunctionalComponent, MethodOptions, ObjectDirective, RenderFunction, RendererOptions, RootHydrateFunction, RootRenderFunction, SetupContext, SlotsType, VNodeRef } from "@vue/runtime-core";
|
|
2
2
|
import * as CSS from "csstype";
|
|
3
3
|
export * from "@vue/runtime-core";
|
|
4
|
-
|
|
5
4
|
//#region temp/packages/runtime-dom/src/nodeOps.d.ts
|
|
6
5
|
export declare const nodeOps: Omit<RendererOptions<Node, Element>, "patchProp">;
|
|
7
6
|
//#endregion
|
|
@@ -32,9 +31,9 @@ export interface TransitionProps extends BaseTransitionProps<Element> {
|
|
|
32
31
|
leaveToClass?: string;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
|
-
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
36
|
-
* base Transition component, with DOM-specific logic.
|
|
37
|
-
*/
|
|
34
|
+
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
35
|
+
* base Transition component, with DOM-specific logic.
|
|
36
|
+
*/
|
|
38
37
|
export declare const Transition: FunctionalComponent<TransitionProps>;
|
|
39
38
|
//#endregion
|
|
40
39
|
//#region temp/packages/runtime-dom/src/components/TransitionGroup.d.ts
|
|
@@ -66,8 +65,8 @@ type CompatModifiers = keyof typeof keyNames;
|
|
|
66
65
|
type VOnModifiers = SystemModifiers | ModifierGuards | CompatModifiers;
|
|
67
66
|
type ModifierGuards = "shift" | "ctrl" | "alt" | "meta" | "left" | "right" | "stop" | "prevent" | "self" | "middle" | "exact";
|
|
68
67
|
/**
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
71
70
|
export declare const withModifiers: <T extends (event: Event, ...args: unknown[]) => any>(fn: T & {
|
|
72
71
|
_withMods?: {
|
|
73
72
|
[key: string]: T;
|
|
@@ -75,8 +74,8 @@ export declare const withModifiers: <T extends (event: Event, ...args: unknown[]
|
|
|
75
74
|
}, modifiers: VOnModifiers[]) => T;
|
|
76
75
|
declare const keyNames: Record<"esc" | "space" | "up" | "left" | "right" | "down" | "delete", string>;
|
|
77
76
|
/**
|
|
78
|
-
* @private
|
|
79
|
-
*/
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
80
79
|
export declare const withKeys: <T extends (event: KeyboardEvent) => any>(fn: T & {
|
|
81
80
|
_withKeys?: {
|
|
82
81
|
[k: string]: T;
|
|
@@ -87,9 +86,11 @@ type VOnDirective = Directive<any, any, VOnModifiers>;
|
|
|
87
86
|
//#region temp/packages/runtime-dom/src/directives/vModel.d.ts
|
|
88
87
|
type AssignerFn = (value: any) => void;
|
|
89
88
|
declare const assignKey: unique symbol;
|
|
89
|
+
declare const initialValueKey: unique symbol;
|
|
90
90
|
type ModelDirective<T, Modifiers extends string = string> = ObjectDirective<T & {
|
|
91
91
|
[assignKey]: AssignerFn;
|
|
92
|
-
|
|
92
|
+
[initialValueKey]?: string;
|
|
93
|
+
_pendingValue?: [multiple: boolean, value: any];
|
|
93
94
|
}, any, Modifiers>;
|
|
94
95
|
export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement, "trim" | "number" | "lazy">;
|
|
95
96
|
export declare const vModelCheckbox: ModelDirective<HTMLInputElement>;
|
|
@@ -101,13 +102,13 @@ type VModelDirective = typeof vModelText | typeof vModelCheckbox | typeof vModel
|
|
|
101
102
|
//#region temp/packages/runtime-dom/src/jsx.d.ts
|
|
102
103
|
export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> {
|
|
103
104
|
/**
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
* The index signature was removed to enable closed typing for style
|
|
106
|
+
* using CSSType. You're able to use type assertion or module augmentation
|
|
107
|
+
* to add properties or an index signature of your own.
|
|
108
|
+
*
|
|
109
|
+
* For examples and more information, visit:
|
|
110
|
+
* https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors
|
|
111
|
+
*/
|
|
111
112
|
[v: `--${string}`]: string | number | undefined;
|
|
112
113
|
}
|
|
113
114
|
type Booleanish = boolean | "true" | "false";
|
|
@@ -118,99 +119,99 @@ export interface AriaAttributes {
|
|
|
118
119
|
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
|
|
119
120
|
"aria-atomic"?: Booleanish | undefined;
|
|
120
121
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
* Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
|
|
123
|
+
* presented if they are made.
|
|
124
|
+
*/
|
|
124
125
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
125
126
|
/** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
|
|
126
127
|
"aria-busy"?: Booleanish | undefined;
|
|
127
128
|
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
|
|
130
|
+
* @see aria-pressed @see aria-selected.
|
|
131
|
+
*/
|
|
131
132
|
"aria-checked"?: Booleanish | "mixed" | undefined;
|
|
132
133
|
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
* Defines the total number of columns in a table, grid, or treegrid.
|
|
135
|
+
* @see aria-colindex.
|
|
136
|
+
*/
|
|
136
137
|
"aria-colcount"?: Numberish | undefined;
|
|
137
138
|
/**
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
* Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
|
|
140
|
+
* @see aria-colcount @see aria-colspan.
|
|
141
|
+
*/
|
|
141
142
|
"aria-colindex"?: Numberish | undefined;
|
|
142
143
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
|
|
145
|
+
* @see aria-colindex @see aria-rowspan.
|
|
146
|
+
*/
|
|
146
147
|
"aria-colspan"?: Numberish | undefined;
|
|
147
148
|
/**
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
|
|
150
|
+
* @see aria-owns.
|
|
151
|
+
*/
|
|
151
152
|
"aria-controls"?: string | undefined;
|
|
152
153
|
/** Indicates the element that represents the current item within a container or set of related elements. */
|
|
153
154
|
"aria-current"?: Booleanish | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
154
155
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
* Identifies the element (or elements) that describes the object.
|
|
157
|
+
* @see aria-labelledby
|
|
158
|
+
*/
|
|
158
159
|
"aria-describedby"?: string | undefined;
|
|
159
160
|
/**
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
* Identifies the element that provides a detailed, extended description for the object.
|
|
162
|
+
* @see aria-describedby.
|
|
163
|
+
*/
|
|
163
164
|
"aria-details"?: string | undefined;
|
|
164
165
|
/**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
|
167
|
+
* @see aria-hidden @see aria-readonly.
|
|
168
|
+
*/
|
|
168
169
|
"aria-disabled"?: Booleanish | undefined;
|
|
169
170
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
* Indicates what functions can be performed when a dragged object is released on the drop target.
|
|
172
|
+
* @deprecated in ARIA 1.1
|
|
173
|
+
*/
|
|
173
174
|
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
174
175
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
* Identifies the element that provides an error message for the object.
|
|
177
|
+
* @see aria-invalid @see aria-describedby.
|
|
178
|
+
*/
|
|
178
179
|
"aria-errormessage"?: string | undefined;
|
|
179
180
|
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
|
180
181
|
"aria-expanded"?: Booleanish | undefined;
|
|
181
182
|
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
|
|
184
|
+
* allows assistive technology to override the general default of reading in document source order.
|
|
185
|
+
*/
|
|
185
186
|
"aria-flowto"?: string | undefined;
|
|
186
187
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
* Indicates an element's "grabbed" state in a drag-and-drop operation.
|
|
189
|
+
* @deprecated in ARIA 1.1
|
|
190
|
+
*/
|
|
190
191
|
"aria-grabbed"?: Booleanish | undefined;
|
|
191
192
|
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
|
|
192
193
|
"aria-haspopup"?: Booleanish | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
193
194
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
* Indicates whether the element is exposed to an accessibility API.
|
|
196
|
+
* @see aria-disabled.
|
|
197
|
+
*/
|
|
197
198
|
"aria-hidden"?: Booleanish | undefined;
|
|
198
199
|
/**
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
201
|
+
* @see aria-errormessage.
|
|
202
|
+
*/
|
|
202
203
|
"aria-invalid"?: Booleanish | "grammar" | "spelling" | undefined;
|
|
203
204
|
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
|
|
204
205
|
"aria-keyshortcuts"?: string | undefined;
|
|
205
206
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
* Defines a string value that labels the current element.
|
|
208
|
+
* @see aria-labelledby.
|
|
209
|
+
*/
|
|
209
210
|
"aria-label"?: string | undefined;
|
|
210
211
|
/**
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
* Identifies the element (or elements) that labels the current element.
|
|
213
|
+
* @see aria-describedby.
|
|
214
|
+
*/
|
|
214
215
|
"aria-labelledby"?: string | undefined;
|
|
215
216
|
/** Defines the hierarchical level of an element within a structure. */
|
|
216
217
|
"aria-level"?: Numberish | undefined;
|
|
@@ -225,64 +226,64 @@ export interface AriaAttributes {
|
|
|
225
226
|
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
|
|
226
227
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
227
228
|
/**
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
* Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
|
|
230
|
+
* between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
|
|
231
|
+
* @see aria-controls.
|
|
232
|
+
*/
|
|
232
233
|
"aria-owns"?: string | undefined;
|
|
233
234
|
/**
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
|
|
236
|
+
* A hint could be a sample value or a brief description of the expected format.
|
|
237
|
+
*/
|
|
237
238
|
"aria-placeholder"?: string | undefined;
|
|
238
239
|
/**
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
* Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
|
|
241
|
+
* @see aria-setsize.
|
|
242
|
+
*/
|
|
242
243
|
"aria-posinset"?: Numberish | undefined;
|
|
243
244
|
/**
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
* Indicates the current "pressed" state of toggle buttons.
|
|
246
|
+
* @see aria-checked @see aria-selected.
|
|
247
|
+
*/
|
|
247
248
|
"aria-pressed"?: Booleanish | "mixed" | undefined;
|
|
248
249
|
/**
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
* Indicates that the element is not editable, but is otherwise operable.
|
|
251
|
+
* @see aria-disabled.
|
|
252
|
+
*/
|
|
252
253
|
"aria-readonly"?: Booleanish | undefined;
|
|
253
254
|
/**
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
|
|
256
|
+
* @see aria-atomic.
|
|
257
|
+
*/
|
|
257
258
|
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
258
259
|
/** Indicates that user input is required on the element before a form may be submitted. */
|
|
259
260
|
"aria-required"?: Booleanish | undefined;
|
|
260
261
|
/** Defines a human-readable, author-localized description for the role of an element. */
|
|
261
262
|
"aria-roledescription"?: string | undefined;
|
|
262
263
|
/**
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
* Defines the total number of rows in a table, grid, or treegrid.
|
|
265
|
+
* @see aria-rowindex.
|
|
266
|
+
*/
|
|
266
267
|
"aria-rowcount"?: Numberish | undefined;
|
|
267
268
|
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
* Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
|
|
270
|
+
* @see aria-rowcount @see aria-rowspan.
|
|
271
|
+
*/
|
|
271
272
|
"aria-rowindex"?: Numberish | undefined;
|
|
272
273
|
/**
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
|
|
275
|
+
* @see aria-rowindex @see aria-colspan.
|
|
276
|
+
*/
|
|
276
277
|
"aria-rowspan"?: Numberish | undefined;
|
|
277
278
|
/**
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
* Indicates the current "selected" state of various widgets.
|
|
280
|
+
* @see aria-checked @see aria-pressed.
|
|
281
|
+
*/
|
|
281
282
|
"aria-selected"?: Booleanish | undefined;
|
|
282
283
|
/**
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
* Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
|
|
285
|
+
* @see aria-posinset.
|
|
286
|
+
*/
|
|
286
287
|
"aria-setsize"?: Numberish | undefined;
|
|
287
288
|
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
|
|
288
289
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
@@ -291,9 +292,9 @@ export interface AriaAttributes {
|
|
|
291
292
|
/** Defines the minimum allowed value for a range widget. */
|
|
292
293
|
"aria-valuemin"?: Numberish | undefined;
|
|
293
294
|
/**
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
* Defines the current value for a range widget.
|
|
296
|
+
* @see aria-valuetext.
|
|
297
|
+
*/
|
|
297
298
|
"aria-valuenow"?: Numberish | undefined;
|
|
298
299
|
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
|
299
300
|
"aria-valuetext"?: string | undefined;
|
|
@@ -311,8 +312,8 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
|
311
312
|
draggable?: Booleanish | undefined;
|
|
312
313
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
313
314
|
/**
|
|
314
|
-
|
|
315
|
-
|
|
315
|
+
* @deprecated Use `enterkeyhint` instead.
|
|
316
|
+
*/
|
|
316
317
|
enterKeyHint?: HTMLAttributes["enterkeyhint"];
|
|
317
318
|
hidden?: Booleanish | "" | "hidden" | "until-found" | undefined;
|
|
318
319
|
id?: string | undefined;
|
|
@@ -346,22 +347,22 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
|
346
347
|
security?: string | undefined;
|
|
347
348
|
unselectable?: "on" | "off" | undefined;
|
|
348
349
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
* Hints at the type of data that might be entered by the user while editing the element or its contents
|
|
351
|
+
* @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
|
|
352
|
+
*/
|
|
352
353
|
inputmode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
353
354
|
/**
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
* Specify that a standard HTML element should behave like a defined custom built-in element
|
|
356
|
+
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
|
|
357
|
+
*/
|
|
357
358
|
is?: string | undefined;
|
|
358
359
|
/**
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
|
|
361
|
+
*/
|
|
361
362
|
exportparts?: string;
|
|
362
363
|
/**
|
|
363
|
-
|
|
364
|
-
|
|
364
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
|
|
365
|
+
*/
|
|
365
366
|
part?: string;
|
|
366
367
|
}
|
|
367
368
|
type HTMLAttributeReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
@@ -772,9 +773,9 @@ export interface WebViewHTMLAttributes extends HTMLAttributes {
|
|
|
772
773
|
export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
773
774
|
innerHTML?: string | undefined;
|
|
774
775
|
/**
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
776
|
+
* SVG Styling Attributes
|
|
777
|
+
* @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling
|
|
778
|
+
*/
|
|
778
779
|
class?: ClassValue | undefined;
|
|
779
780
|
style?: StyleValue | undefined;
|
|
780
781
|
color?: string | undefined;
|
|
@@ -1301,14 +1302,14 @@ export interface Events {
|
|
|
1301
1302
|
onTransitionrun: TransitionEvent;
|
|
1302
1303
|
onTransitionstart: TransitionEvent;
|
|
1303
1304
|
}
|
|
1304
|
-
type EventHandlers<E> = { [K in keyof E]?: E[K] extends ((...args: any) => any) ? E[K] : (payload: E[K]) => void };
|
|
1305
|
+
type EventHandlers<E> = { [K in keyof E]?: E[K] extends ((...args: any) => any) ? E[K] : (payload: E[K]) => void; };
|
|
1305
1306
|
export interface ReservedProps {
|
|
1306
1307
|
key?: PropertyKey | undefined;
|
|
1307
1308
|
ref?: VNodeRef | undefined;
|
|
1308
1309
|
ref_for?: boolean | undefined;
|
|
1309
1310
|
ref_key?: string | undefined;
|
|
1310
1311
|
}
|
|
1311
|
-
export type NativeElements = { [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & ReservedProps };
|
|
1312
|
+
export type NativeElements = { [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & ReservedProps; };
|
|
1312
1313
|
//#endregion
|
|
1313
1314
|
//#region temp/packages/runtime-dom/src/apiCustomElement.d.ts
|
|
1314
1315
|
export type VueElementConstructor<P = {}> = {
|
|
@@ -1327,7 +1328,7 @@ export declare function defineCustomElement<Props, RawBindings = object>(setup:
|
|
|
1327
1328
|
export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Props, ctx: SetupContext) => RawBindings | RenderFunction, options?: Pick<ComponentOptions, "name" | "inheritAttrs" | "emits"> & CustomElementOptions & {
|
|
1328
1329
|
props?: ComponentObjectPropsOptions<Props>;
|
|
1329
1330
|
}): VueElementConstructor<Props>;
|
|
1330
|
-
export declare function defineCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, PropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, EmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, InferredProps =
|
|
1331
|
+
export declare function defineCustomElement<RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, PropsKeys extends string = string, RuntimeEmitsOptions extends EmitsOptions = {}, EmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, InferredProps = string extends PropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : { [key in PropsKeys]?: any; }, ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: CustomElementOptions & {
|
|
1331
1332
|
props?: (RuntimePropsOptions & ThisType<void>) | PropsKeys[];
|
|
1332
1333
|
} & ComponentOptionsBase<ResolvedProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<Readonly<ResolvedProps>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>, extraOptions?: CustomElementOptions): VueElementConstructor<ResolvedProps>;
|
|
1333
1334
|
export declare function defineCustomElement<T extends {
|
|
@@ -1353,28 +1354,24 @@ export declare abstract class VueElementBase<E = Element, C = Component, Def ext
|
|
|
1353
1354
|
protected _props: Record<string, any>;
|
|
1354
1355
|
protected _createApp: CreateAppFunction<E, C>;
|
|
1355
1356
|
/**
|
|
1356
|
-
|
|
1357
|
-
|
|
1357
|
+
* dev only
|
|
1358
|
+
*/
|
|
1358
1359
|
protected _styles?: HTMLStyleElement[];
|
|
1359
1360
|
/**
|
|
1360
|
-
|
|
1361
|
-
|
|
1361
|
+
* dev only
|
|
1362
|
+
*/
|
|
1362
1363
|
protected _childStyles?: Map<string, HTMLStyleElement[]>;
|
|
1363
1364
|
protected _ob?: MutationObserver | null;
|
|
1364
1365
|
protected _slots?: Record<string, Node[]>;
|
|
1365
1366
|
/**
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1367
|
+
* Check if this custom element needs hydration.
|
|
1368
|
+
* Returns true if it has a pre-rendered declarative shadow root that
|
|
1369
|
+
* needs to be hydrated.
|
|
1370
|
+
*/
|
|
1370
1371
|
protected abstract _needsHydration(): boolean;
|
|
1371
1372
|
protected abstract _mount(def: Def): void;
|
|
1372
1373
|
protected abstract _update(): void;
|
|
1373
1374
|
protected abstract _unmount(): void;
|
|
1374
|
-
protected abstract _updateSlotNodes(slot: Map<Node, {
|
|
1375
|
-
nodes: Node[];
|
|
1376
|
-
usedFallback: boolean;
|
|
1377
|
-
}>): void;
|
|
1378
1375
|
constructor(def: Def, props: Record<string, any> | undefined, createAppFn: CreateAppFunction<E, C>);
|
|
1379
1376
|
connectedCallback(): void;
|
|
1380
1377
|
disconnectedCallback(): void;
|
|
@@ -1382,8 +1379,8 @@ export declare abstract class VueElementBase<E = Element, C = Component, Def ext
|
|
|
1382
1379
|
protected _inheritParentContext(parent?: VueElementBase | undefined): void;
|
|
1383
1380
|
private _processMutations;
|
|
1384
1381
|
/**
|
|
1385
|
-
|
|
1386
|
-
|
|
1382
|
+
* resolve inner component definition (handle possible async component)
|
|
1383
|
+
*/
|
|
1387
1384
|
private _resolveDef;
|
|
1388
1385
|
private _mountComponent;
|
|
1389
1386
|
protected _processExposed(): void;
|
|
@@ -1394,12 +1391,12 @@ export declare abstract class VueElementBase<E = Element, C = Component, Def ext
|
|
|
1394
1391
|
private _getStyleAnchor;
|
|
1395
1392
|
private _getRootStyleInsertionAnchor;
|
|
1396
1393
|
/**
|
|
1397
|
-
|
|
1398
|
-
|
|
1394
|
+
* Only called when shadowRoot is false
|
|
1395
|
+
*/
|
|
1399
1396
|
private _parseSlots;
|
|
1400
1397
|
/**
|
|
1401
|
-
|
|
1402
|
-
|
|
1398
|
+
* Only called when shadowRoot is false
|
|
1399
|
+
*/
|
|
1403
1400
|
protected _renderSlots(): void;
|
|
1404
1401
|
}
|
|
1405
1402
|
export declare class VueElement extends VueElementBase<Element, Component, InnerComponentDef> {
|
|
@@ -1408,20 +1405,13 @@ export declare class VueElement extends VueElementBase<Element, Component, Inner
|
|
|
1408
1405
|
protected _mount(def: InnerComponentDef): void;
|
|
1409
1406
|
protected _update(): void;
|
|
1410
1407
|
protected _unmount(): void;
|
|
1411
|
-
/**
|
|
1412
|
-
* Only called when shadowRoot is false
|
|
1413
|
-
*/
|
|
1414
|
-
protected _updateSlotNodes(replacements: Map<Node, {
|
|
1415
|
-
nodes: Node[];
|
|
1416
|
-
usedFallback: boolean;
|
|
1417
|
-
}>): void;
|
|
1418
1408
|
private _createVNode;
|
|
1419
1409
|
}
|
|
1420
1410
|
export declare function useHost(caller?: string): VueElementBase | null;
|
|
1421
1411
|
/**
|
|
1422
|
-
* Retrieve the shadowRoot of the current custom element. Only usable in setup()
|
|
1423
|
-
* of a `defineCustomElement` component.
|
|
1424
|
-
*/
|
|
1412
|
+
* Retrieve the shadowRoot of the current custom element. Only usable in setup()
|
|
1413
|
+
* of a `defineCustomElement` component.
|
|
1414
|
+
*/
|
|
1425
1415
|
export declare function useShadowRoot(): ShadowRoot | null;
|
|
1426
1416
|
//#endregion
|
|
1427
1417
|
//#region temp/packages/runtime-dom/src/helpers/useCssModule.d.ts
|
|
@@ -1429,17 +1419,17 @@ export declare function useCssModule(name?: string): Record<string, string>;
|
|
|
1429
1419
|
//#endregion
|
|
1430
1420
|
//#region temp/packages/runtime-dom/src/helpers/useCssVars.d.ts
|
|
1431
1421
|
/**
|
|
1432
|
-
* Runtime helper for SFC's CSS variable injection feature.
|
|
1433
|
-
* @private
|
|
1434
|
-
*/
|
|
1422
|
+
* Runtime helper for SFC's CSS variable injection feature.
|
|
1423
|
+
* @private
|
|
1424
|
+
*/
|
|
1435
1425
|
export declare function useCssVars(getter: (ctx: any) => Record<string, unknown>): void;
|
|
1436
1426
|
//#endregion
|
|
1437
1427
|
//#region temp/packages/runtime-dom/src/index.d.ts
|
|
1438
1428
|
/**
|
|
1439
|
-
* This is a stub implementation to prevent the need to use dom types.
|
|
1440
|
-
*
|
|
1441
|
-
* To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
|
|
1442
|
-
*/
|
|
1429
|
+
* This is a stub implementation to prevent the need to use dom types.
|
|
1430
|
+
*
|
|
1431
|
+
* To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
|
|
1432
|
+
*/
|
|
1443
1433
|
type DomType<T> = typeof globalThis extends {
|
|
1444
1434
|
window: unknown;
|
|
1445
1435
|
} ? T : never;
|