@vue/compiler-core 3.5.39 → 3.5.40
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.40
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2159,6 +2159,9 @@ function getUnnormalizedProps(props, callPath = []) {
|
|
|
2159
2159
|
return [props, callPath];
|
|
2160
2160
|
}
|
|
2161
2161
|
function injectProp(node, prop, context) {
|
|
2162
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) {
|
|
2163
|
+
return;
|
|
2164
|
+
}
|
|
2162
2165
|
let propsWithInjection;
|
|
2163
2166
|
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
2164
2167
|
let callPath = [];
|
|
@@ -2216,6 +2219,24 @@ function injectProp(node, prop, context) {
|
|
|
2216
2219
|
}
|
|
2217
2220
|
}
|
|
2218
2221
|
}
|
|
2222
|
+
function injectSlotKey(node, prop) {
|
|
2223
|
+
var _a, _b, _c;
|
|
2224
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") {
|
|
2225
|
+
return false;
|
|
2226
|
+
}
|
|
2227
|
+
const props = node.arguments[2];
|
|
2228
|
+
if (props && !shared.isString(props)) {
|
|
2229
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
2230
|
+
if (unnormalizedProps && !shared.isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) {
|
|
2231
|
+
return true;
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
(_a = node.arguments)[2] || (_a[2] = "{}");
|
|
2235
|
+
(_b = node.arguments)[3] || (_b[3] = "undefined");
|
|
2236
|
+
(_c = node.arguments)[4] || (_c[4] = "undefined");
|
|
2237
|
+
node.arguments[5] = prop.value;
|
|
2238
|
+
return true;
|
|
2239
|
+
}
|
|
2219
2240
|
function hasProp(prop, props) {
|
|
2220
2241
|
let result = false;
|
|
2221
2242
|
if (prop.key.type === 4) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.40
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2155,6 +2155,9 @@ function getUnnormalizedProps(props, callPath = []) {
|
|
|
2155
2155
|
return [props, callPath];
|
|
2156
2156
|
}
|
|
2157
2157
|
function injectProp(node, prop, context) {
|
|
2158
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) {
|
|
2159
|
+
return;
|
|
2160
|
+
}
|
|
2158
2161
|
let propsWithInjection;
|
|
2159
2162
|
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
2160
2163
|
let callPath = [];
|
|
@@ -2212,6 +2215,24 @@ function injectProp(node, prop, context) {
|
|
|
2212
2215
|
}
|
|
2213
2216
|
}
|
|
2214
2217
|
}
|
|
2218
|
+
function injectSlotKey(node, prop) {
|
|
2219
|
+
var _a, _b, _c;
|
|
2220
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") {
|
|
2221
|
+
return false;
|
|
2222
|
+
}
|
|
2223
|
+
const props = node.arguments[2];
|
|
2224
|
+
if (props && !shared.isString(props)) {
|
|
2225
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
2226
|
+
if (unnormalizedProps && !shared.isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) {
|
|
2227
|
+
return true;
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
(_a = node.arguments)[2] || (_a[2] = "{}");
|
|
2231
|
+
(_b = node.arguments)[3] || (_b[3] = "undefined");
|
|
2232
|
+
(_c = node.arguments)[4] || (_c[4] = "undefined");
|
|
2233
|
+
node.arguments[5] = prop.value;
|
|
2234
|
+
return true;
|
|
2235
|
+
}
|
|
2215
2236
|
function hasProp(prop, props) {
|
|
2216
2237
|
let result = false;
|
|
2217
2238
|
if (prop.key.type === 4) {
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -474,11 +474,24 @@ export interface DirectiveArgumentNode extends ArrayExpression {
|
|
|
474
474
|
}
|
|
475
475
|
export interface RenderSlotCall extends CallExpression {
|
|
476
476
|
callee: typeof RENDER_SLOT;
|
|
477
|
-
arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression] | [
|
|
477
|
+
arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression | '{}'] | [
|
|
478
478
|
string,
|
|
479
479
|
string | ExpressionNode,
|
|
480
480
|
PropsExpression | '{}',
|
|
481
|
-
|
|
481
|
+
FunctionExpression | string
|
|
482
|
+
] | [
|
|
483
|
+
string,
|
|
484
|
+
string | ExpressionNode,
|
|
485
|
+
PropsExpression | '{}',
|
|
486
|
+
FunctionExpression | string,
|
|
487
|
+
string
|
|
488
|
+
] | [
|
|
489
|
+
string,
|
|
490
|
+
string | ExpressionNode,
|
|
491
|
+
PropsExpression | '{}',
|
|
492
|
+
FunctionExpression | string,
|
|
493
|
+
string,
|
|
494
|
+
JSChildNode
|
|
482
495
|
];
|
|
483
496
|
}
|
|
484
497
|
export type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-core v3.5.
|
|
2
|
+
* @vue/compiler-core v3.5.40
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1819,6 +1819,9 @@ function getUnnormalizedProps(props, callPath = []) {
|
|
|
1819
1819
|
return [props, callPath];
|
|
1820
1820
|
}
|
|
1821
1821
|
function injectProp(node, prop, context) {
|
|
1822
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) {
|
|
1823
|
+
return;
|
|
1824
|
+
}
|
|
1822
1825
|
let propsWithInjection;
|
|
1823
1826
|
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
1824
1827
|
let callPath = [];
|
|
@@ -1876,6 +1879,24 @@ function injectProp(node, prop, context) {
|
|
|
1876
1879
|
}
|
|
1877
1880
|
}
|
|
1878
1881
|
}
|
|
1882
|
+
function injectSlotKey(node, prop) {
|
|
1883
|
+
var _a, _b, _c;
|
|
1884
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") {
|
|
1885
|
+
return false;
|
|
1886
|
+
}
|
|
1887
|
+
const props = node.arguments[2];
|
|
1888
|
+
if (props && !isString(props)) {
|
|
1889
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
1890
|
+
if (unnormalizedProps && !isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) {
|
|
1891
|
+
return true;
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
(_a = node.arguments)[2] || (_a[2] = "{}");
|
|
1895
|
+
(_b = node.arguments)[3] || (_b[3] = "undefined");
|
|
1896
|
+
(_c = node.arguments)[4] || (_c[4] = "undefined");
|
|
1897
|
+
node.arguments[5] = prop.value;
|
|
1898
|
+
return true;
|
|
1899
|
+
}
|
|
1879
1900
|
function hasProp(prop, props) {
|
|
1880
1901
|
let result = false;
|
|
1881
1902
|
if (prop.key.type === 4) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.40",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"entities": "^7.0.1",
|
|
51
51
|
"estree-walker": "^2.0.2",
|
|
52
52
|
"source-map-js": "^1.2.1",
|
|
53
|
-
"@vue/shared": "3.5.
|
|
53
|
+
"@vue/shared": "3.5.40"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.29.7"
|