@vue/devtools-kit 7.0.16 → 7.0.17
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/index.cjs +29 -10
- package/dist/index.d.cts +320 -317
- package/dist/index.d.ts +320 -317
- package/dist/index.js +29 -10
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target9) => (target9 = mod != null ? __create(__
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.4.2/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.4.2/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -2325,6 +2325,8 @@ var StateEditor = class {
|
|
|
2325
2325
|
const section = sections.shift();
|
|
2326
2326
|
if (object instanceof Map)
|
|
2327
2327
|
object = object.get(section);
|
|
2328
|
+
if (object instanceof Set)
|
|
2329
|
+
object = Array.from(object.values())[section];
|
|
2328
2330
|
else
|
|
2329
2331
|
object = object[section];
|
|
2330
2332
|
if (this.refEditor.isRef(object))
|
|
@@ -2378,7 +2380,7 @@ var StateEditor = class {
|
|
|
2378
2380
|
else if ((0, import_vue2.toRaw)(object) instanceof Map)
|
|
2379
2381
|
object.delete(field);
|
|
2380
2382
|
else if ((0, import_vue2.toRaw)(object) instanceof Set)
|
|
2381
|
-
object.delete(
|
|
2383
|
+
object.delete(Array.from(object.values())[field]);
|
|
2382
2384
|
else
|
|
2383
2385
|
Reflect.deleteProperty(object, field);
|
|
2384
2386
|
}
|
|
@@ -2388,6 +2390,8 @@ var StateEditor = class {
|
|
|
2388
2390
|
this.refEditor.set(target9, value);
|
|
2389
2391
|
else if ((0, import_vue2.toRaw)(object) instanceof Map)
|
|
2390
2392
|
object.set(state.newKey || field, value);
|
|
2393
|
+
else if ((0, import_vue2.toRaw)(object) instanceof Set)
|
|
2394
|
+
object.add(value);
|
|
2391
2395
|
else
|
|
2392
2396
|
object[state.newKey || field] = value;
|
|
2393
2397
|
}
|
|
@@ -3329,6 +3333,17 @@ function getBigIntDetails(val) {
|
|
|
3329
3333
|
}
|
|
3330
3334
|
};
|
|
3331
3335
|
}
|
|
3336
|
+
function getDateDetails(val) {
|
|
3337
|
+
const date = new Date(val.getTime());
|
|
3338
|
+
date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
|
|
3339
|
+
return {
|
|
3340
|
+
_custom: {
|
|
3341
|
+
type: "date",
|
|
3342
|
+
displayText: Date.prototype.toString.call(val),
|
|
3343
|
+
value: date.toISOString().slice(0, -1)
|
|
3344
|
+
}
|
|
3345
|
+
};
|
|
3346
|
+
}
|
|
3332
3347
|
function getMapDetails(val) {
|
|
3333
3348
|
const list = Object.fromEntries(val);
|
|
3334
3349
|
return {
|
|
@@ -3546,7 +3561,7 @@ function stringifyReplacer(key) {
|
|
|
3546
3561
|
} else if (proto === "[object RegExp]") {
|
|
3547
3562
|
return `[native RegExp ${RegExp.prototype.toString.call(val)}]`;
|
|
3548
3563
|
} else if (proto === "[object Date]") {
|
|
3549
|
-
return
|
|
3564
|
+
return getDateDetails(val);
|
|
3550
3565
|
} else if (proto === "[object Error]") {
|
|
3551
3566
|
return `[native Error ${val.message}<>${val.stack}]`;
|
|
3552
3567
|
} else if (val.state && val._vm) {
|
|
@@ -3820,11 +3835,15 @@ function getRaw(value) {
|
|
|
3820
3835
|
function toEdit(value, customType) {
|
|
3821
3836
|
if (customType === "bigint")
|
|
3822
3837
|
return value;
|
|
3838
|
+
if (customType === "date")
|
|
3839
|
+
return value;
|
|
3823
3840
|
return replaceTokenToString(JSON.stringify(value));
|
|
3824
3841
|
}
|
|
3825
3842
|
function toSubmit(value, customType) {
|
|
3826
3843
|
if (customType === "bigint")
|
|
3827
3844
|
return BigInt(value);
|
|
3845
|
+
if (customType === "date")
|
|
3846
|
+
return new Date(value);
|
|
3828
3847
|
return JSON.parse(replaceStringToToken(value), reviver);
|
|
3829
3848
|
}
|
|
3830
3849
|
|
|
@@ -4039,7 +4058,7 @@ var DevToolsPluginApi = class {
|
|
|
4039
4058
|
resolve();
|
|
4040
4059
|
}, "inspector-tree:get" /* GET_INSPECTOR_TREE */);
|
|
4041
4060
|
});
|
|
4042
|
-
return
|
|
4061
|
+
return _payload.rootNodes;
|
|
4043
4062
|
}
|
|
4044
4063
|
getInspectorState(payload = {}) {
|
|
4045
4064
|
var _a10;
|
|
@@ -4057,7 +4076,7 @@ var DevToolsPluginApi = class {
|
|
|
4057
4076
|
}, "inspector-state:get" /* GET_INSPECTOR_STATE */);
|
|
4058
4077
|
const state = _payload.state;
|
|
4059
4078
|
delete state.instance;
|
|
4060
|
-
return
|
|
4079
|
+
return state;
|
|
4061
4080
|
}
|
|
4062
4081
|
async editInspectorState(payload) {
|
|
4063
4082
|
var _a10;
|
|
@@ -4076,10 +4095,10 @@ var DevToolsPluginApi = class {
|
|
|
4076
4095
|
const res = await this.getInspectorTree({
|
|
4077
4096
|
inspectorId
|
|
4078
4097
|
});
|
|
4079
|
-
apiHooks.callHook("inspector-tree:send" /* SEND_INSPECTOR_TREE */,
|
|
4098
|
+
apiHooks.callHook("inspector-tree:send" /* SEND_INSPECTOR_TREE */, {
|
|
4080
4099
|
inspectorId,
|
|
4081
|
-
data:
|
|
4082
|
-
})
|
|
4100
|
+
data: res
|
|
4101
|
+
});
|
|
4083
4102
|
}
|
|
4084
4103
|
}
|
|
4085
4104
|
async sendInspectorState(inspectorId) {
|
|
@@ -4089,7 +4108,7 @@ var DevToolsPluginApi = class {
|
|
|
4089
4108
|
inspectorId,
|
|
4090
4109
|
nodeId: inspector.nodeId
|
|
4091
4110
|
});
|
|
4092
|
-
apiHooks.callHook("inspector-state:send" /* SEND_INSPECTOR_STATE */,
|
|
4111
|
+
apiHooks.callHook("inspector-state:send" /* SEND_INSPECTOR_STATE */, { ...res, inspectorId });
|
|
4093
4112
|
}
|
|
4094
4113
|
}
|
|
4095
4114
|
async getComponentInstances(app) {
|