unplugin-vue-components 29.2.0 → 31.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -36
- package/dist/esbuild.d.mts +7 -0
- package/dist/esbuild.mjs +9 -0
- package/dist/{index.d.cts → index.d.mts} +4 -2
- package/dist/index.mjs +4 -0
- package/dist/nuxt.d.mts +7 -0
- package/dist/{nuxt.js → nuxt.mjs} +4 -4
- package/dist/{resolvers.d.ts → resolvers.d.mts} +189 -218
- package/dist/{resolvers.js → resolvers.mjs} +28 -83
- package/dist/rolldown.d.mts +7 -0
- package/dist/rolldown.mjs +9 -0
- package/dist/rollup.d.mts +7 -0
- package/dist/rollup.mjs +9 -0
- package/dist/rspack.d.mts +6 -0
- package/dist/rspack.mjs +9 -0
- package/dist/{src-bfjkatac.js → src-pYuu2TZ_.mjs} +53 -141
- package/dist/types-CWfK8m_y.d.mts +217 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -0
- package/dist/utils-DuuqqWXg.mjs +234 -0
- package/dist/vite.d.mts +9 -0
- package/dist/vite.mjs +9 -0
- package/dist/webpack.d.mts +7 -0
- package/dist/webpack.mjs +9 -0
- package/package.json +40 -78
- package/dist/esbuild.cjs +0 -9
- package/dist/esbuild.d.cts +0 -6
- package/dist/esbuild.d.ts +0 -7
- package/dist/esbuild.js +0 -9
- package/dist/index.cjs +0 -9
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -5
- package/dist/nuxt.cjs +0 -14
- package/dist/nuxt.d.cts +0 -6
- package/dist/nuxt.d.ts +0 -7
- package/dist/resolvers.cjs +0 -2074
- package/dist/resolvers.d.cts +0 -574
- package/dist/rolldown.cjs +0 -9
- package/dist/rolldown.d.cts +0 -6
- package/dist/rolldown.d.ts +0 -7
- package/dist/rolldown.js +0 -9
- package/dist/rollup.cjs +0 -9
- package/dist/rollup.d.cts +0 -6
- package/dist/rollup.d.ts +0 -7
- package/dist/rollup.js +0 -9
- package/dist/rspack.cjs +0 -9
- package/dist/rspack.d.cts +0 -5
- package/dist/rspack.d.ts +0 -6
- package/dist/rspack.js +0 -9
- package/dist/src-BTwFq3T3.cjs +0 -188
- package/dist/src-D2-JfLYq.js +0 -187
- package/dist/src-DAvVDVLg.cjs +0 -769
- package/dist/types-CBTc19th.cjs +0 -0
- package/dist/types-DSJ5r-ta.d.cts +0 -225
- package/dist/types-rC3290ja.d.ts +0 -225
- package/dist/types.cjs +0 -1
- package/dist/types.d.cts +0 -2
- package/dist/types.d.ts +0 -2
- package/dist/types.js +0 -3
- package/dist/utils-8UQ22cuO.cjs +0 -1689
- package/dist/utils-BoXu-4gQ.js +0 -1523
- package/dist/vite.cjs +0 -9
- package/dist/vite.d.cts +0 -8
- package/dist/vite.d.ts +0 -9
- package/dist/vite.js +0 -9
- package/dist/webpack.cjs +0 -9
- package/dist/webpack.d.cts +0 -6
- package/dist/webpack.d.ts +0 -7
- package/dist/webpack.js +0 -9
- /package/dist/{types-DQoXDiso.js → types--fVOUYBq.mjs} +0 -0
package/dist/src-BTwFq3T3.cjs
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/walker.js
|
|
3
|
-
/**
|
|
4
|
-
* @typedef { import('estree').Node} Node
|
|
5
|
-
* @typedef {{
|
|
6
|
-
* skip: () => void;
|
|
7
|
-
* remove: () => void;
|
|
8
|
-
* replace: (node: Node) => void;
|
|
9
|
-
* }} WalkerContext
|
|
10
|
-
*/
|
|
11
|
-
var WalkerBase = class {
|
|
12
|
-
constructor() {
|
|
13
|
-
/** @type {boolean} */
|
|
14
|
-
this.should_skip = false;
|
|
15
|
-
/** @type {boolean} */
|
|
16
|
-
this.should_remove = false;
|
|
17
|
-
/** @type {Node | null} */
|
|
18
|
-
this.replacement = null;
|
|
19
|
-
/** @type {WalkerContext} */
|
|
20
|
-
this.context = {
|
|
21
|
-
skip: () => this.should_skip = true,
|
|
22
|
-
remove: () => this.should_remove = true,
|
|
23
|
-
replace: (node) => this.replacement = node
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* @template {Node} Parent
|
|
28
|
-
* @param {Parent | null | undefined} parent
|
|
29
|
-
* @param {keyof Parent | null | undefined} prop
|
|
30
|
-
* @param {number | null | undefined} index
|
|
31
|
-
* @param {Node} node
|
|
32
|
-
*/
|
|
33
|
-
replace(parent, prop, index, node) {
|
|
34
|
-
if (parent && prop) if (index != null)
|
|
35
|
-
/** @type {Array<Node>} */ parent[prop][index] = node;
|
|
36
|
-
else
|
|
37
|
-
/** @type {Node} */ parent[prop] = node;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @template {Node} Parent
|
|
41
|
-
* @param {Parent | null | undefined} parent
|
|
42
|
-
* @param {keyof Parent | null | undefined} prop
|
|
43
|
-
* @param {number | null | undefined} index
|
|
44
|
-
*/
|
|
45
|
-
remove(parent, prop, index) {
|
|
46
|
-
if (parent && prop) if (index !== null && index !== void 0)
|
|
47
|
-
/** @type {Array<Node>} */ parent[prop].splice(index, 1);
|
|
48
|
-
else delete parent[prop];
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/sync.js
|
|
54
|
-
/**
|
|
55
|
-
* @typedef { import('estree').Node} Node
|
|
56
|
-
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
57
|
-
* @typedef {(
|
|
58
|
-
* this: WalkerContext,
|
|
59
|
-
* node: Node,
|
|
60
|
-
* parent: Node | null,
|
|
61
|
-
* key: string | number | symbol | null | undefined,
|
|
62
|
-
* index: number | null | undefined
|
|
63
|
-
* ) => void} SyncHandler
|
|
64
|
-
*/
|
|
65
|
-
var SyncWalker = class extends WalkerBase {
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @param {SyncHandler} [enter]
|
|
69
|
-
* @param {SyncHandler} [leave]
|
|
70
|
-
*/
|
|
71
|
-
constructor(enter, leave) {
|
|
72
|
-
super();
|
|
73
|
-
/** @type {boolean} */
|
|
74
|
-
this.should_skip = false;
|
|
75
|
-
/** @type {boolean} */
|
|
76
|
-
this.should_remove = false;
|
|
77
|
-
/** @type {Node | null} */
|
|
78
|
-
this.replacement = null;
|
|
79
|
-
/** @type {WalkerContext} */
|
|
80
|
-
this.context = {
|
|
81
|
-
skip: () => this.should_skip = true,
|
|
82
|
-
remove: () => this.should_remove = true,
|
|
83
|
-
replace: (node) => this.replacement = node
|
|
84
|
-
};
|
|
85
|
-
/** @type {SyncHandler | undefined} */
|
|
86
|
-
this.enter = enter;
|
|
87
|
-
/** @type {SyncHandler | undefined} */
|
|
88
|
-
this.leave = leave;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* @template {Node} Parent
|
|
92
|
-
* @param {Node} node
|
|
93
|
-
* @param {Parent | null} parent
|
|
94
|
-
* @param {keyof Parent} [prop]
|
|
95
|
-
* @param {number | null} [index]
|
|
96
|
-
* @returns {Node | null}
|
|
97
|
-
*/
|
|
98
|
-
visit(node, parent, prop, index) {
|
|
99
|
-
if (node) {
|
|
100
|
-
if (this.enter) {
|
|
101
|
-
const _should_skip = this.should_skip;
|
|
102
|
-
const _should_remove = this.should_remove;
|
|
103
|
-
const _replacement = this.replacement;
|
|
104
|
-
this.should_skip = false;
|
|
105
|
-
this.should_remove = false;
|
|
106
|
-
this.replacement = null;
|
|
107
|
-
this.enter.call(this.context, node, parent, prop, index);
|
|
108
|
-
if (this.replacement) {
|
|
109
|
-
node = this.replacement;
|
|
110
|
-
this.replace(parent, prop, index, node);
|
|
111
|
-
}
|
|
112
|
-
if (this.should_remove) this.remove(parent, prop, index);
|
|
113
|
-
const skipped = this.should_skip;
|
|
114
|
-
const removed = this.should_remove;
|
|
115
|
-
this.should_skip = _should_skip;
|
|
116
|
-
this.should_remove = _should_remove;
|
|
117
|
-
this.replacement = _replacement;
|
|
118
|
-
if (skipped) return node;
|
|
119
|
-
if (removed) return null;
|
|
120
|
-
}
|
|
121
|
-
/** @type {keyof Node} */
|
|
122
|
-
let key;
|
|
123
|
-
for (key in node) {
|
|
124
|
-
/** @type {unknown} */
|
|
125
|
-
const value = node[key];
|
|
126
|
-
if (value && typeof value === "object") {
|
|
127
|
-
if (Array.isArray(value)) {
|
|
128
|
-
const nodes = value;
|
|
129
|
-
for (let i = 0; i < nodes.length; i += 1) {
|
|
130
|
-
const item = nodes[i];
|
|
131
|
-
if (isNode(item)) {
|
|
132
|
-
if (!this.visit(item, node, key, i)) i--;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
} else if (isNode(value)) this.visit(value, node, key, null);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (this.leave) {
|
|
139
|
-
const _replacement = this.replacement;
|
|
140
|
-
const _should_remove = this.should_remove;
|
|
141
|
-
this.replacement = null;
|
|
142
|
-
this.should_remove = false;
|
|
143
|
-
this.leave.call(this.context, node, parent, prop, index);
|
|
144
|
-
if (this.replacement) {
|
|
145
|
-
node = this.replacement;
|
|
146
|
-
this.replace(parent, prop, index, node);
|
|
147
|
-
}
|
|
148
|
-
if (this.should_remove) this.remove(parent, prop, index);
|
|
149
|
-
const removed = this.should_remove;
|
|
150
|
-
this.replacement = _replacement;
|
|
151
|
-
this.should_remove = _should_remove;
|
|
152
|
-
if (removed) return null;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return node;
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* Ducktype a node.
|
|
160
|
-
*
|
|
161
|
-
* @param {unknown} value
|
|
162
|
-
* @returns {value is Node}
|
|
163
|
-
*/
|
|
164
|
-
function isNode(value) {
|
|
165
|
-
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
//#endregion
|
|
169
|
-
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/index.js
|
|
170
|
-
/**
|
|
171
|
-
* @typedef {import('estree').Node} Node
|
|
172
|
-
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
173
|
-
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
174
|
-
*/
|
|
175
|
-
/**
|
|
176
|
-
* @param {Node} ast
|
|
177
|
-
* @param {{
|
|
178
|
-
* enter?: SyncHandler
|
|
179
|
-
* leave?: SyncHandler
|
|
180
|
-
* }} walker
|
|
181
|
-
* @returns {Node | null}
|
|
182
|
-
*/
|
|
183
|
-
function walk(ast, { enter, leave }) {
|
|
184
|
-
return new SyncWalker(enter, leave).visit(ast, null);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
//#endregion
|
|
188
|
-
exports.walk = walk;
|
package/dist/src-D2-JfLYq.js
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/walker.js
|
|
2
|
-
/**
|
|
3
|
-
* @typedef { import('estree').Node} Node
|
|
4
|
-
* @typedef {{
|
|
5
|
-
* skip: () => void;
|
|
6
|
-
* remove: () => void;
|
|
7
|
-
* replace: (node: Node) => void;
|
|
8
|
-
* }} WalkerContext
|
|
9
|
-
*/
|
|
10
|
-
var WalkerBase = class {
|
|
11
|
-
constructor() {
|
|
12
|
-
/** @type {boolean} */
|
|
13
|
-
this.should_skip = false;
|
|
14
|
-
/** @type {boolean} */
|
|
15
|
-
this.should_remove = false;
|
|
16
|
-
/** @type {Node | null} */
|
|
17
|
-
this.replacement = null;
|
|
18
|
-
/** @type {WalkerContext} */
|
|
19
|
-
this.context = {
|
|
20
|
-
skip: () => this.should_skip = true,
|
|
21
|
-
remove: () => this.should_remove = true,
|
|
22
|
-
replace: (node) => this.replacement = node
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @template {Node} Parent
|
|
27
|
-
* @param {Parent | null | undefined} parent
|
|
28
|
-
* @param {keyof Parent | null | undefined} prop
|
|
29
|
-
* @param {number | null | undefined} index
|
|
30
|
-
* @param {Node} node
|
|
31
|
-
*/
|
|
32
|
-
replace(parent, prop, index, node) {
|
|
33
|
-
if (parent && prop) if (index != null)
|
|
34
|
-
/** @type {Array<Node>} */ parent[prop][index] = node;
|
|
35
|
-
else
|
|
36
|
-
/** @type {Node} */ parent[prop] = node;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @template {Node} Parent
|
|
40
|
-
* @param {Parent | null | undefined} parent
|
|
41
|
-
* @param {keyof Parent | null | undefined} prop
|
|
42
|
-
* @param {number | null | undefined} index
|
|
43
|
-
*/
|
|
44
|
-
remove(parent, prop, index) {
|
|
45
|
-
if (parent && prop) if (index !== null && index !== void 0)
|
|
46
|
-
/** @type {Array<Node>} */ parent[prop].splice(index, 1);
|
|
47
|
-
else delete parent[prop];
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/sync.js
|
|
53
|
-
/**
|
|
54
|
-
* @typedef { import('estree').Node} Node
|
|
55
|
-
* @typedef { import('./walker.js').WalkerContext} WalkerContext
|
|
56
|
-
* @typedef {(
|
|
57
|
-
* this: WalkerContext,
|
|
58
|
-
* node: Node,
|
|
59
|
-
* parent: Node | null,
|
|
60
|
-
* key: string | number | symbol | null | undefined,
|
|
61
|
-
* index: number | null | undefined
|
|
62
|
-
* ) => void} SyncHandler
|
|
63
|
-
*/
|
|
64
|
-
var SyncWalker = class extends WalkerBase {
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @param {SyncHandler} [enter]
|
|
68
|
-
* @param {SyncHandler} [leave]
|
|
69
|
-
*/
|
|
70
|
-
constructor(enter, leave) {
|
|
71
|
-
super();
|
|
72
|
-
/** @type {boolean} */
|
|
73
|
-
this.should_skip = false;
|
|
74
|
-
/** @type {boolean} */
|
|
75
|
-
this.should_remove = false;
|
|
76
|
-
/** @type {Node | null} */
|
|
77
|
-
this.replacement = null;
|
|
78
|
-
/** @type {WalkerContext} */
|
|
79
|
-
this.context = {
|
|
80
|
-
skip: () => this.should_skip = true,
|
|
81
|
-
remove: () => this.should_remove = true,
|
|
82
|
-
replace: (node) => this.replacement = node
|
|
83
|
-
};
|
|
84
|
-
/** @type {SyncHandler | undefined} */
|
|
85
|
-
this.enter = enter;
|
|
86
|
-
/** @type {SyncHandler | undefined} */
|
|
87
|
-
this.leave = leave;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* @template {Node} Parent
|
|
91
|
-
* @param {Node} node
|
|
92
|
-
* @param {Parent | null} parent
|
|
93
|
-
* @param {keyof Parent} [prop]
|
|
94
|
-
* @param {number | null} [index]
|
|
95
|
-
* @returns {Node | null}
|
|
96
|
-
*/
|
|
97
|
-
visit(node, parent, prop, index) {
|
|
98
|
-
if (node) {
|
|
99
|
-
if (this.enter) {
|
|
100
|
-
const _should_skip = this.should_skip;
|
|
101
|
-
const _should_remove = this.should_remove;
|
|
102
|
-
const _replacement = this.replacement;
|
|
103
|
-
this.should_skip = false;
|
|
104
|
-
this.should_remove = false;
|
|
105
|
-
this.replacement = null;
|
|
106
|
-
this.enter.call(this.context, node, parent, prop, index);
|
|
107
|
-
if (this.replacement) {
|
|
108
|
-
node = this.replacement;
|
|
109
|
-
this.replace(parent, prop, index, node);
|
|
110
|
-
}
|
|
111
|
-
if (this.should_remove) this.remove(parent, prop, index);
|
|
112
|
-
const skipped = this.should_skip;
|
|
113
|
-
const removed = this.should_remove;
|
|
114
|
-
this.should_skip = _should_skip;
|
|
115
|
-
this.should_remove = _should_remove;
|
|
116
|
-
this.replacement = _replacement;
|
|
117
|
-
if (skipped) return node;
|
|
118
|
-
if (removed) return null;
|
|
119
|
-
}
|
|
120
|
-
/** @type {keyof Node} */
|
|
121
|
-
let key;
|
|
122
|
-
for (key in node) {
|
|
123
|
-
/** @type {unknown} */
|
|
124
|
-
const value = node[key];
|
|
125
|
-
if (value && typeof value === "object") {
|
|
126
|
-
if (Array.isArray(value)) {
|
|
127
|
-
const nodes = value;
|
|
128
|
-
for (let i = 0; i < nodes.length; i += 1) {
|
|
129
|
-
const item = nodes[i];
|
|
130
|
-
if (isNode(item)) {
|
|
131
|
-
if (!this.visit(item, node, key, i)) i--;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
} else if (isNode(value)) this.visit(value, node, key, null);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (this.leave) {
|
|
138
|
-
const _replacement = this.replacement;
|
|
139
|
-
const _should_remove = this.should_remove;
|
|
140
|
-
this.replacement = null;
|
|
141
|
-
this.should_remove = false;
|
|
142
|
-
this.leave.call(this.context, node, parent, prop, index);
|
|
143
|
-
if (this.replacement) {
|
|
144
|
-
node = this.replacement;
|
|
145
|
-
this.replace(parent, prop, index, node);
|
|
146
|
-
}
|
|
147
|
-
if (this.should_remove) this.remove(parent, prop, index);
|
|
148
|
-
const removed = this.should_remove;
|
|
149
|
-
this.replacement = _replacement;
|
|
150
|
-
this.should_remove = _should_remove;
|
|
151
|
-
if (removed) return null;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return node;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
/**
|
|
158
|
-
* Ducktype a node.
|
|
159
|
-
*
|
|
160
|
-
* @param {unknown} value
|
|
161
|
-
* @returns {value is Node}
|
|
162
|
-
*/
|
|
163
|
-
function isNode(value) {
|
|
164
|
-
return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string";
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
//#endregion
|
|
168
|
-
//#region node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/index.js
|
|
169
|
-
/**
|
|
170
|
-
* @typedef {import('estree').Node} Node
|
|
171
|
-
* @typedef {import('./sync.js').SyncHandler} SyncHandler
|
|
172
|
-
* @typedef {import('./async.js').AsyncHandler} AsyncHandler
|
|
173
|
-
*/
|
|
174
|
-
/**
|
|
175
|
-
* @param {Node} ast
|
|
176
|
-
* @param {{
|
|
177
|
-
* enter?: SyncHandler
|
|
178
|
-
* leave?: SyncHandler
|
|
179
|
-
* }} walker
|
|
180
|
-
* @returns {Node | null}
|
|
181
|
-
*/
|
|
182
|
-
function walk(ast, { enter, leave }) {
|
|
183
|
-
return new SyncWalker(enter, leave).visit(ast, null);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
//#endregion
|
|
187
|
-
export { walk };
|