@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.js CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target9) => (target9 = mod != null ? __create(__
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.4.2/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.0.2_postcss@8.4.35_typescript@5.4.2/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -2298,6 +2298,8 @@ var StateEditor = class {
2298
2298
  const section = sections.shift();
2299
2299
  if (object instanceof Map)
2300
2300
  object = object.get(section);
2301
+ if (object instanceof Set)
2302
+ object = Array.from(object.values())[section];
2301
2303
  else
2302
2304
  object = object[section];
2303
2305
  if (this.refEditor.isRef(object))
@@ -2351,7 +2353,7 @@ var StateEditor = class {
2351
2353
  else if (toRaw(object) instanceof Map)
2352
2354
  object.delete(field);
2353
2355
  else if (toRaw(object) instanceof Set)
2354
- object.delete(value);
2356
+ object.delete(Array.from(object.values())[field]);
2355
2357
  else
2356
2358
  Reflect.deleteProperty(object, field);
2357
2359
  }
@@ -2361,6 +2363,8 @@ var StateEditor = class {
2361
2363
  this.refEditor.set(target9, value);
2362
2364
  else if (toRaw(object) instanceof Map)
2363
2365
  object.set(state.newKey || field, value);
2366
+ else if (toRaw(object) instanceof Set)
2367
+ object.add(value);
2364
2368
  else
2365
2369
  object[state.newKey || field] = value;
2366
2370
  }
@@ -3302,6 +3306,17 @@ function getBigIntDetails(val) {
3302
3306
  }
3303
3307
  };
3304
3308
  }
3309
+ function getDateDetails(val) {
3310
+ const date = new Date(val.getTime());
3311
+ date.setMinutes(date.getMinutes() - date.getTimezoneOffset());
3312
+ return {
3313
+ _custom: {
3314
+ type: "date",
3315
+ displayText: Date.prototype.toString.call(val),
3316
+ value: date.toISOString().slice(0, -1)
3317
+ }
3318
+ };
3319
+ }
3305
3320
  function getMapDetails(val) {
3306
3321
  const list = Object.fromEntries(val);
3307
3322
  return {
@@ -3519,7 +3534,7 @@ function stringifyReplacer(key) {
3519
3534
  } else if (proto === "[object RegExp]") {
3520
3535
  return `[native RegExp ${RegExp.prototype.toString.call(val)}]`;
3521
3536
  } else if (proto === "[object Date]") {
3522
- return `[native Date ${Date.prototype.toString.call(val)}]`;
3537
+ return getDateDetails(val);
3523
3538
  } else if (proto === "[object Error]") {
3524
3539
  return `[native Error ${val.message}<>${val.stack}]`;
3525
3540
  } else if (val.state && val._vm) {
@@ -3793,11 +3808,15 @@ function getRaw(value) {
3793
3808
  function toEdit(value, customType) {
3794
3809
  if (customType === "bigint")
3795
3810
  return value;
3811
+ if (customType === "date")
3812
+ return value;
3796
3813
  return replaceTokenToString(JSON.stringify(value));
3797
3814
  }
3798
3815
  function toSubmit(value, customType) {
3799
3816
  if (customType === "bigint")
3800
3817
  return BigInt(value);
3818
+ if (customType === "date")
3819
+ return new Date(value);
3801
3820
  return JSON.parse(replaceStringToToken(value), reviver);
3802
3821
  }
3803
3822
 
@@ -4012,7 +4031,7 @@ var DevToolsPluginApi = class {
4012
4031
  resolve();
4013
4032
  }, "inspector-tree:get" /* GET_INSPECTOR_TREE */);
4014
4033
  });
4015
- return stringify(_payload.rootNodes);
4034
+ return _payload.rootNodes;
4016
4035
  }
4017
4036
  getInspectorState(payload = {}) {
4018
4037
  var _a10;
@@ -4030,7 +4049,7 @@ var DevToolsPluginApi = class {
4030
4049
  }, "inspector-state:get" /* GET_INSPECTOR_STATE */);
4031
4050
  const state = _payload.state;
4032
4051
  delete state.instance;
4033
- return stringify(state);
4052
+ return state;
4034
4053
  }
4035
4054
  async editInspectorState(payload) {
4036
4055
  var _a10;
@@ -4049,10 +4068,10 @@ var DevToolsPluginApi = class {
4049
4068
  const res = await this.getInspectorTree({
4050
4069
  inspectorId
4051
4070
  });
4052
- apiHooks.callHook("inspector-tree:send" /* SEND_INSPECTOR_TREE */, stringify({
4071
+ apiHooks.callHook("inspector-tree:send" /* SEND_INSPECTOR_TREE */, {
4053
4072
  inspectorId,
4054
- data: parse(res)
4055
- }));
4073
+ data: res
4074
+ });
4056
4075
  }
4057
4076
  }
4058
4077
  async sendInspectorState(inspectorId) {
@@ -4062,7 +4081,7 @@ var DevToolsPluginApi = class {
4062
4081
  inspectorId,
4063
4082
  nodeId: inspector.nodeId
4064
4083
  });
4065
- apiHooks.callHook("inspector-state:send" /* SEND_INSPECTOR_STATE */, stringify({ ...parse(res), inspectorId }));
4084
+ apiHooks.callHook("inspector-state:send" /* SEND_INSPECTOR_STATE */, { ...res, inspectorId });
4066
4085
  }
4067
4086
  }
4068
4087
  async getComponentInstances(app) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.0.16",
4
+ "version": "7.0.17",
5
5
  "author": "webfansplz",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -25,7 +25,7 @@
25
25
  "mitt": "^3.0.1",
26
26
  "perfect-debounce": "^1.0.0",
27
27
  "speakingurl": "^14.0.1",
28
- "@vue/devtools-shared": "^7.0.16"
28
+ "@vue/devtools-shared": "^7.0.17"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/speakingurl": "^13.0.6",