@vue/runtime-dom 3.4.25 → 3.5.0-alpha.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/runtime-dom.cjs.js +4 -2
- package/dist/runtime-dom.cjs.prod.js +4 -2
- package/dist/runtime-dom.d.ts +114 -76
- package/dist/runtime-dom.esm-browser.js +798 -415
- package/dist/runtime-dom.esm-browser.prod.js +6 -6
- package/dist/runtime-dom.esm-bundler.js +4 -2
- package/dist/runtime-dom.global.js +798 -415
- package/dist/runtime-dom.global.prod.js +6 -6
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.
|
|
2
|
+
* @vue/runtime-dom v3.5.0-alpha.1
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1435,7 +1435,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
1435
1435
|
return;
|
|
1436
1436
|
}
|
|
1437
1437
|
const eventKey = shared.hyphenate(event.key);
|
|
1438
|
-
if (modifiers.some(
|
|
1438
|
+
if (modifiers.some(
|
|
1439
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
1440
|
+
)) {
|
|
1439
1441
|
return fn(event);
|
|
1440
1442
|
}
|
|
1441
1443
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.
|
|
2
|
+
* @vue/runtime-dom v3.5.0-alpha.1
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1378,7 +1378,9 @@ const withKeys = (fn, modifiers) => {
|
|
|
1378
1378
|
return;
|
|
1379
1379
|
}
|
|
1380
1380
|
const eventKey = shared.hyphenate(event.key);
|
|
1381
|
-
if (modifiers.some(
|
|
1381
|
+
if (modifiers.some(
|
|
1382
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
1383
|
+
)) {
|
|
1382
1384
|
return fn(event);
|
|
1383
1385
|
}
|
|
1384
1386
|
});
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -1,62 +1,7 @@
|
|
|
1
|
-
import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin,
|
|
1
|
+
import { BaseTransitionProps, FunctionalComponent, ObjectDirective, Directive, SetupContext, RenderFunction, ComponentObjectPropsOptions, EmitsOptions, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentInjectOptions, SlotsType, Component, ComponentProvideOptions, ExtractPropTypes, EmitsToProps, ComponentOptionsBase, CreateComponentPublicInstance, DefineComponent, RootHydrateFunction, ConcreteComponent, VNodeRef, RootRenderFunction, CreateAppFunction } from '@vue/runtime-core';
|
|
2
2
|
export * from '@vue/runtime-core';
|
|
3
3
|
import * as CSS from 'csstype';
|
|
4
4
|
|
|
5
|
-
export type VueElementConstructor<P = {}> = {
|
|
6
|
-
new (initialProps?: Record<string, any>): VueElement & P;
|
|
7
|
-
};
|
|
8
|
-
export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): VueElementConstructor<Props>;
|
|
9
|
-
export declare function defineCustomElement<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & {
|
|
10
|
-
styles?: string[];
|
|
11
|
-
}): VueElementConstructor<Props>;
|
|
12
|
-
export declare function defineCustomElement<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & {
|
|
13
|
-
styles?: string[];
|
|
14
|
-
}): VueElementConstructor<{
|
|
15
|
-
[K in PropNames]: any;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function defineCustomElement<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & {
|
|
18
|
-
styles?: string[];
|
|
19
|
-
}): VueElementConstructor<ExtractPropTypes<PropsOptions>>;
|
|
20
|
-
export declare function defineCustomElement<P>(options: DefineComponent<P, any, any, any>): VueElementConstructor<ExtractPropTypes<P>>;
|
|
21
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
22
|
-
export declare const defineSSRCustomElement: typeof defineCustomElement;
|
|
23
|
-
declare const BaseClass: {
|
|
24
|
-
new (): HTMLElement;
|
|
25
|
-
prototype: HTMLElement;
|
|
26
|
-
};
|
|
27
|
-
type InnerComponentDef = ConcreteComponent & {
|
|
28
|
-
styles?: string[];
|
|
29
|
-
};
|
|
30
|
-
export declare class VueElement extends BaseClass {
|
|
31
|
-
private _def;
|
|
32
|
-
private _props;
|
|
33
|
-
private _connected;
|
|
34
|
-
private _resolved;
|
|
35
|
-
private _numberProps;
|
|
36
|
-
private _styles?;
|
|
37
|
-
private _ob?;
|
|
38
|
-
constructor(_def: InnerComponentDef, _props?: Record<string, any>, hydrate?: RootHydrateFunction);
|
|
39
|
-
connectedCallback(): void;
|
|
40
|
-
disconnectedCallback(): void;
|
|
41
|
-
/**
|
|
42
|
-
* resolve inner component definition (handle possible async component)
|
|
43
|
-
*/
|
|
44
|
-
private _resolveDef;
|
|
45
|
-
private _resolveProps;
|
|
46
|
-
protected _setAttr(key: string): void;
|
|
47
|
-
private _update;
|
|
48
|
-
private _createVNode;
|
|
49
|
-
private _applyStyles;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export declare function useCssModule(name?: string): Record<string, string>;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Runtime helper for SFC's CSS variable injection feature.
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void;
|
|
59
|
-
|
|
60
5
|
declare const TRANSITION = "transition";
|
|
61
6
|
declare const ANIMATION = "animation";
|
|
62
7
|
type AnimationTypes = typeof TRANSITION | typeof ANIMATION;
|
|
@@ -88,18 +33,34 @@ export declare const TransitionGroup: new () => {
|
|
|
88
33
|
$props: TransitionGroupProps;
|
|
89
34
|
};
|
|
90
35
|
|
|
91
|
-
|
|
92
|
-
declare const
|
|
93
|
-
|
|
94
|
-
[
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
export declare const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
export declare const vModelSelect: ModelDirective<HTMLSelectElement>;
|
|
101
|
-
export declare const vModelDynamic: ObjectDirective<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
|
|
36
|
+
declare const vShowOriginalDisplay: unique symbol;
|
|
37
|
+
declare const vShowHidden: unique symbol;
|
|
38
|
+
interface VShowElement extends HTMLElement {
|
|
39
|
+
[vShowOriginalDisplay]: string;
|
|
40
|
+
[vShowHidden]: boolean;
|
|
41
|
+
}
|
|
42
|
+
export declare const vShow: ObjectDirective<VShowElement> & {
|
|
43
|
+
name?: 'show';
|
|
44
|
+
};
|
|
102
45
|
|
|
46
|
+
declare const systemModifiers: readonly ["ctrl", "shift", "alt", "meta"];
|
|
47
|
+
type SystemModifiers = (typeof systemModifiers)[number];
|
|
48
|
+
type CompatModifiers = keyof typeof keyNames;
|
|
49
|
+
type VOnModifiers = SystemModifiers | ModifierGuards | CompatModifiers;
|
|
50
|
+
declare const modifierGuards: {
|
|
51
|
+
stop: (e: Event) => void;
|
|
52
|
+
prevent: (e: Event) => void;
|
|
53
|
+
self: (e: Event) => boolean;
|
|
54
|
+
ctrl: (e: Event) => boolean;
|
|
55
|
+
shift: (e: Event) => boolean;
|
|
56
|
+
alt: (e: Event) => boolean;
|
|
57
|
+
meta: (e: Event) => boolean;
|
|
58
|
+
left: (e: Event) => boolean;
|
|
59
|
+
middle: (e: Event) => boolean;
|
|
60
|
+
right: (e: Event) => boolean;
|
|
61
|
+
exact: (e: Event, modifiers: string[]) => boolean;
|
|
62
|
+
};
|
|
63
|
+
type ModifierGuards = keyof typeof modifierGuards;
|
|
103
64
|
/**
|
|
104
65
|
* @private
|
|
105
66
|
*/
|
|
@@ -107,7 +68,16 @@ export declare const withModifiers: <T extends (event: Event, ...args: unknown[]
|
|
|
107
68
|
_withMods?: {
|
|
108
69
|
[key: string]: T;
|
|
109
70
|
};
|
|
110
|
-
}, modifiers:
|
|
71
|
+
}, modifiers: VOnModifiers[]) => T;
|
|
72
|
+
declare const keyNames: {
|
|
73
|
+
esc: string;
|
|
74
|
+
space: string;
|
|
75
|
+
up: string;
|
|
76
|
+
left: string;
|
|
77
|
+
right: string;
|
|
78
|
+
down: string;
|
|
79
|
+
delete: string;
|
|
80
|
+
};
|
|
111
81
|
/**
|
|
112
82
|
* @private
|
|
113
83
|
*/
|
|
@@ -116,16 +86,70 @@ export declare const withKeys: <T extends (event: KeyboardEvent) => any>(fn: T &
|
|
|
116
86
|
[k: string]: T;
|
|
117
87
|
};
|
|
118
88
|
}, modifiers: string[]) => T;
|
|
89
|
+
type VOnDirective = Directive<any, any, VOnModifiers>;
|
|
119
90
|
|
|
120
|
-
|
|
121
|
-
declare const
|
|
122
|
-
|
|
123
|
-
[
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
export declare const
|
|
127
|
-
|
|
91
|
+
type AssignerFn = (value: any) => void;
|
|
92
|
+
declare const assignKey: unique symbol;
|
|
93
|
+
type ModelDirective<T, Modifiers extends string = string> = ObjectDirective<T & {
|
|
94
|
+
[assignKey]: AssignerFn;
|
|
95
|
+
_assigning?: boolean;
|
|
96
|
+
}, any, Modifiers>;
|
|
97
|
+
export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement, 'trim' | 'number' | 'lazy'>;
|
|
98
|
+
export declare const vModelCheckbox: ModelDirective<HTMLInputElement>;
|
|
99
|
+
export declare const vModelRadio: ModelDirective<HTMLInputElement>;
|
|
100
|
+
export declare const vModelSelect: ModelDirective<HTMLSelectElement, 'number'>;
|
|
101
|
+
export declare const vModelDynamic: ObjectDirective<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
|
|
102
|
+
type VModelDirective = typeof vModelText | typeof vModelCheckbox | typeof vModelSelect | typeof vModelRadio | typeof vModelDynamic;
|
|
103
|
+
|
|
104
|
+
export type VueElementConstructor<P = {}> = {
|
|
105
|
+
new (initialProps?: Record<string, any>): VueElement & P;
|
|
106
|
+
};
|
|
107
|
+
export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): VueElementConstructor<Props>;
|
|
108
|
+
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> : {
|
|
109
|
+
[key in PropsKeys]?: any;
|
|
110
|
+
}, ResolvedProps = InferredProps & EmitsToProps<RuntimeEmitsOptions>>(options: {
|
|
111
|
+
props?: (RuntimePropsOptions & ThisType<void>) | PropsKeys[];
|
|
112
|
+
} & ComponentOptionsBase<ResolvedProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, // Defaults
|
|
113
|
+
InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstance<Readonly<ResolvedProps>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, EmitsKeys, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>): VueElementConstructor<ResolvedProps>;
|
|
114
|
+
export declare function defineCustomElement<P>(options: DefineComponent<P, any, any, any>): VueElementConstructor<ExtractPropTypes<P>>;
|
|
115
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
116
|
+
export declare const defineSSRCustomElement: typeof defineCustomElement;
|
|
117
|
+
declare const BaseClass: {
|
|
118
|
+
new (): HTMLElement;
|
|
119
|
+
prototype: HTMLElement;
|
|
128
120
|
};
|
|
121
|
+
type InnerComponentDef = ConcreteComponent & {
|
|
122
|
+
styles?: string[];
|
|
123
|
+
};
|
|
124
|
+
export declare class VueElement extends BaseClass {
|
|
125
|
+
private _def;
|
|
126
|
+
private _props;
|
|
127
|
+
private _connected;
|
|
128
|
+
private _resolved;
|
|
129
|
+
private _numberProps;
|
|
130
|
+
private _styles?;
|
|
131
|
+
private _ob?;
|
|
132
|
+
constructor(_def: InnerComponentDef, _props?: Record<string, any>, hydrate?: RootHydrateFunction);
|
|
133
|
+
connectedCallback(): void;
|
|
134
|
+
disconnectedCallback(): void;
|
|
135
|
+
/**
|
|
136
|
+
* resolve inner component definition (handle possible async component)
|
|
137
|
+
*/
|
|
138
|
+
private _resolveDef;
|
|
139
|
+
private _resolveProps;
|
|
140
|
+
protected _setAttr(key: string): void;
|
|
141
|
+
private _update;
|
|
142
|
+
private _createVNode;
|
|
143
|
+
private _applyStyles;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export declare function useCssModule(name?: string): Record<string, string>;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Runtime helper for SFC's CSS variable injection feature.
|
|
150
|
+
* @private
|
|
151
|
+
*/
|
|
152
|
+
export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void;
|
|
129
153
|
|
|
130
154
|
export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> {
|
|
131
155
|
/**
|
|
@@ -1307,6 +1331,20 @@ declare module '@vue/reactivity' {
|
|
|
1307
1331
|
runtimeDOMBailTypes: Node | Window;
|
|
1308
1332
|
}
|
|
1309
1333
|
}
|
|
1334
|
+
declare module '@vue/runtime-core' {
|
|
1335
|
+
interface GlobalComponents {
|
|
1336
|
+
Transition: DefineComponent<TransitionProps>;
|
|
1337
|
+
TransitionGroup: DefineComponent<TransitionGroupProps>;
|
|
1338
|
+
}
|
|
1339
|
+
interface GlobalDirectives {
|
|
1340
|
+
vShow: typeof vShow;
|
|
1341
|
+
vOn: VOnDirective;
|
|
1342
|
+
vBind: VModelDirective;
|
|
1343
|
+
vIf: Directive<any, boolean>;
|
|
1344
|
+
VOnce: Directive;
|
|
1345
|
+
VSlot: Directive;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1310
1348
|
export declare const render: RootRenderFunction<Element | ShadowRoot>;
|
|
1311
1349
|
export declare const hydrate: RootHydrateFunction;
|
|
1312
1350
|
export declare const createApp: CreateAppFunction<Element>;
|