@vue/devtools-kit 7.0.4 → 7.0.6

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 CHANGED
@@ -1594,6 +1594,7 @@ __export(src_exports, {
1594
1594
  fnTypeRE: () => fnTypeRE,
1595
1595
  formatInspectorStateValue: () => formatInspectorStateValue,
1596
1596
  getInspectorStateValueType: () => getInspectorStateValueType,
1597
+ getRawValue: () => getRawValue,
1597
1598
  now: () => now,
1598
1599
  onDevToolsClientConnected: () => onDevToolsClientConnected,
1599
1600
  onDevToolsConnected: () => onDevToolsConnected,
@@ -1886,7 +1887,7 @@ init_cjs_shims();
1886
1887
 
1887
1888
  // src/core/component/state/constants.ts
1888
1889
  init_cjs_shims();
1889
- var vueBuiltins = [
1890
+ var vueBuiltins = /* @__PURE__ */ new Set([
1890
1891
  "nextTick",
1891
1892
  "defineComponent",
1892
1893
  "defineAsyncComponent",
@@ -1938,7 +1939,7 @@ var vueBuiltins = [
1938
1939
  "resolveDirective",
1939
1940
  "withDirectives",
1940
1941
  "withModifiers"
1941
- ];
1942
+ ]);
1942
1943
  var symbolRE = /^\[native Symbol Symbol\((.*)\)\]$/;
1943
1944
  var rawTypeRE = /^\[object (\w+)]$/;
1944
1945
  var specialTypeRE = /^\[native (\w+) (.*?)(<>((.|\s)*))?\]$/;
@@ -2088,6 +2089,19 @@ function formatInspectorStateValue(value, quotes = false) {
2088
2089
  }
2089
2090
  return value;
2090
2091
  }
2092
+ function getRawValue(value) {
2093
+ var _a8, _b8;
2094
+ const isCustom = getInspectorStateValueType(value) === "custom";
2095
+ let inherit = {};
2096
+ if (isCustom) {
2097
+ const data = value;
2098
+ inherit = ((_a8 = data._custom) == null ? void 0 : _a8.fields) || {};
2099
+ value = (_b8 = data._custom) == null ? void 0 : _b8.value;
2100
+ }
2101
+ if (value && value._isArray)
2102
+ value = value.items;
2103
+ return { value, inherit };
2104
+ }
2091
2105
 
2092
2106
  // src/core/component/state/replacer.ts
2093
2107
  init_cjs_shims();
@@ -2276,7 +2290,7 @@ function getStateTypeAndName(info) {
2276
2290
  }
2277
2291
  function processSetupState(instance) {
2278
2292
  const raw = instance.devtoolsRawSetupState || {};
2279
- return Object.keys(instance.setupState).filter((key) => !vueBuiltins.includes(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
2293
+ return Object.keys(instance.setupState).filter((key) => !vueBuiltins.has(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
2280
2294
  var _a8, _b8, _c, _d;
2281
2295
  const value = returnError(() => toRaw(instance.setupState[key]));
2282
2296
  const rawData = raw[key];
@@ -3060,6 +3074,9 @@ async function registerPlugin(options) {
3060
3074
  const { app, api } = options;
3061
3075
  const plugins = devtoolsState.pluginBuffer.filter(([plugin]) => plugin.app === app);
3062
3076
  plugins.forEach(async ([plugin, setupFn]) => {
3077
+ if (plugin.packageName === "vue-query") {
3078
+ return;
3079
+ }
3063
3080
  const appRecord = await getAppRecord(plugin.app);
3064
3081
  if (plugin.packageName === "vue-router") {
3065
3082
  const id = getRouterDevToolsId(`${plugin.id}`);
@@ -4225,6 +4242,7 @@ var devtools = {
4225
4242
  fnTypeRE,
4226
4243
  formatInspectorStateValue,
4227
4244
  getInspectorStateValueType,
4245
+ getRawValue,
4228
4246
  now,
4229
4247
  onDevToolsClientConnected,
4230
4248
  onDevToolsConnected,
package/dist/index.d.cts CHANGED
@@ -377,13 +377,17 @@ declare function addCustomTab(tab: CustomTab): void;
377
377
 
378
378
  declare function getInspectorStateValueType(value: any, raw?: boolean): string;
379
379
  declare function formatInspectorStateValue(value: any, quotes?: boolean): any;
380
+ declare function getRawValue(value: InspectorState['value']): {
381
+ value: string | number | Record<string, unknown> | unknown[] | InspectorCustomState;
382
+ inherit: {};
383
+ };
380
384
 
381
385
  declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
382
386
  declare function parse(data: string, revive?: boolean): any;
383
387
 
384
388
  declare function now(): number;
385
389
 
386
- declare const vueBuiltins: string[];
390
+ declare const vueBuiltins: Set<string>;
387
391
  declare const symbolRE: RegExp;
388
392
  declare const rawTypeRE: RegExp;
389
393
  declare const specialTypeRE: RegExp;
@@ -616,4 +620,4 @@ declare const devtools: {
616
620
  readonly api: DevToolsPluginApi;
617
621
  };
618
622
 
619
- export { type AddInspectorApiPayload, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, ESC, INFINITY, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, MAX_ARRAY_SIZE, MAX_STRING_SIZE, type ModuleIframeView, type ModuleVNodeView, type ModuleView, NAN, NEGATIVE_INFINITY, type OpenInEditorOptions, type PropPath, type RouterInfo, RouterKey, type ScrollToComponentOptions, type TimelineEvent, type TimelineEventData, type ToggleComponentInspectorOptions, UNDEFINED, type VueInspector, addCustomCommand, addCustomTab, devtools, devtoolsRouterInfo, fnTypeRE, formatInspectorStateValue, getInspectorStateValueType, getRouterDevToolsId, getVueInspector, normalizeRouterInfo, now, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, rawTypeRE, removeCustomCommand, setupDevToolsPlugin, specialTypeRE, stringify, symbolRE, vueBuiltins };
623
+ export { type AddInspectorApiPayload, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, ESC, INFINITY, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, MAX_ARRAY_SIZE, MAX_STRING_SIZE, type ModuleIframeView, type ModuleVNodeView, type ModuleView, NAN, NEGATIVE_INFINITY, type OpenInEditorOptions, type PropPath, type RouterInfo, RouterKey, type ScrollToComponentOptions, type TimelineEvent, type TimelineEventData, type ToggleComponentInspectorOptions, UNDEFINED, type VueInspector, addCustomCommand, addCustomTab, devtools, devtoolsRouterInfo, fnTypeRE, formatInspectorStateValue, getInspectorStateValueType, getRawValue, getRouterDevToolsId, getVueInspector, normalizeRouterInfo, now, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, rawTypeRE, removeCustomCommand, setupDevToolsPlugin, specialTypeRE, stringify, symbolRE, vueBuiltins };
package/dist/index.d.ts CHANGED
@@ -377,13 +377,17 @@ declare function addCustomTab(tab: CustomTab): void;
377
377
 
378
378
  declare function getInspectorStateValueType(value: any, raw?: boolean): string;
379
379
  declare function formatInspectorStateValue(value: any, quotes?: boolean): any;
380
+ declare function getRawValue(value: InspectorState['value']): {
381
+ value: string | number | Record<string, unknown> | unknown[] | InspectorCustomState;
382
+ inherit: {};
383
+ };
380
384
 
381
385
  declare function stringify<T extends object = Record<string, unknown>>(data: T): string | string[];
382
386
  declare function parse(data: string, revive?: boolean): any;
383
387
 
384
388
  declare function now(): number;
385
389
 
386
- declare const vueBuiltins: string[];
390
+ declare const vueBuiltins: Set<string>;
387
391
  declare const symbolRE: RegExp;
388
392
  declare const rawTypeRE: RegExp;
389
393
  declare const specialTypeRE: RegExp;
@@ -616,4 +620,4 @@ declare const devtools: {
616
620
  readonly api: DevToolsPluginApi;
617
621
  };
618
622
 
619
- export { type AddInspectorApiPayload, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, ESC, INFINITY, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, MAX_ARRAY_SIZE, MAX_STRING_SIZE, type ModuleIframeView, type ModuleVNodeView, type ModuleView, NAN, NEGATIVE_INFINITY, type OpenInEditorOptions, type PropPath, type RouterInfo, RouterKey, type ScrollToComponentOptions, type TimelineEvent, type TimelineEventData, type ToggleComponentInspectorOptions, UNDEFINED, type VueInspector, addCustomCommand, addCustomTab, devtools, devtoolsRouterInfo, fnTypeRE, formatInspectorStateValue, getInspectorStateValueType, getRouterDevToolsId, getVueInspector, normalizeRouterInfo, now, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, rawTypeRE, removeCustomCommand, setupDevToolsPlugin, specialTypeRE, stringify, symbolRE, vueBuiltins };
623
+ export { type AddInspectorApiPayload, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, ESC, INFINITY, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, MAX_ARRAY_SIZE, MAX_STRING_SIZE, type ModuleIframeView, type ModuleVNodeView, type ModuleView, NAN, NEGATIVE_INFINITY, type OpenInEditorOptions, type PropPath, type RouterInfo, RouterKey, type ScrollToComponentOptions, type TimelineEvent, type TimelineEventData, type ToggleComponentInspectorOptions, UNDEFINED, type VueInspector, addCustomCommand, addCustomTab, devtools, devtoolsRouterInfo, fnTypeRE, formatInspectorStateValue, getInspectorStateValueType, getRawValue, getRouterDevToolsId, getVueInspector, normalizeRouterInfo, now, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, rawTypeRE, removeCustomCommand, setupDevToolsPlugin, specialTypeRE, stringify, symbolRE, vueBuiltins };
package/dist/index.mjs CHANGED
@@ -1852,7 +1852,7 @@ init_esm_shims();
1852
1852
 
1853
1853
  // src/core/component/state/constants.ts
1854
1854
  init_esm_shims();
1855
- var vueBuiltins = [
1855
+ var vueBuiltins = /* @__PURE__ */ new Set([
1856
1856
  "nextTick",
1857
1857
  "defineComponent",
1858
1858
  "defineAsyncComponent",
@@ -1904,7 +1904,7 @@ var vueBuiltins = [
1904
1904
  "resolveDirective",
1905
1905
  "withDirectives",
1906
1906
  "withModifiers"
1907
- ];
1907
+ ]);
1908
1908
  var symbolRE = /^\[native Symbol Symbol\((.*)\)\]$/;
1909
1909
  var rawTypeRE = /^\[object (\w+)]$/;
1910
1910
  var specialTypeRE = /^\[native (\w+) (.*?)(<>((.|\s)*))?\]$/;
@@ -2054,6 +2054,19 @@ function formatInspectorStateValue(value, quotes = false) {
2054
2054
  }
2055
2055
  return value;
2056
2056
  }
2057
+ function getRawValue(value) {
2058
+ var _a8, _b8;
2059
+ const isCustom = getInspectorStateValueType(value) === "custom";
2060
+ let inherit = {};
2061
+ if (isCustom) {
2062
+ const data = value;
2063
+ inherit = ((_a8 = data._custom) == null ? void 0 : _a8.fields) || {};
2064
+ value = (_b8 = data._custom) == null ? void 0 : _b8.value;
2065
+ }
2066
+ if (value && value._isArray)
2067
+ value = value.items;
2068
+ return { value, inherit };
2069
+ }
2057
2070
 
2058
2071
  // src/core/component/state/replacer.ts
2059
2072
  init_esm_shims();
@@ -2242,7 +2255,7 @@ function getStateTypeAndName(info) {
2242
2255
  }
2243
2256
  function processSetupState(instance) {
2244
2257
  const raw = instance.devtoolsRawSetupState || {};
2245
- return Object.keys(instance.setupState).filter((key) => !vueBuiltins.includes(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
2258
+ return Object.keys(instance.setupState).filter((key) => !vueBuiltins.has(key) && key.split(/(?=[A-Z])/)[0] !== "use").map((key) => {
2246
2259
  var _a8, _b8, _c, _d;
2247
2260
  const value = returnError(() => toRaw(instance.setupState[key]));
2248
2261
  const rawData = raw[key];
@@ -3026,6 +3039,9 @@ async function registerPlugin(options) {
3026
3039
  const { app, api } = options;
3027
3040
  const plugins = devtoolsState.pluginBuffer.filter(([plugin]) => plugin.app === app);
3028
3041
  plugins.forEach(async ([plugin, setupFn]) => {
3042
+ if (plugin.packageName === "vue-query") {
3043
+ return;
3044
+ }
3029
3045
  const appRecord = await getAppRecord(plugin.app);
3030
3046
  if (plugin.packageName === "vue-router") {
3031
3047
  const id = getRouterDevToolsId(`${plugin.id}`);
@@ -4190,6 +4206,7 @@ export {
4190
4206
  fnTypeRE,
4191
4207
  formatInspectorStateValue,
4192
4208
  getInspectorStateValueType,
4209
+ getRawValue,
4193
4210
  now,
4194
4211
  onDevToolsClientConnected,
4195
4212
  onDevToolsConnected,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.0.4",
4
+ "version": "7.0.6",
5
5
  "author": "webfansplz",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -21,11 +21,11 @@
21
21
  "mitt": "^3.0.1",
22
22
  "perfect-debounce": "^1.0.0",
23
23
  "speakingurl": "^14.0.1",
24
- "@vue/devtools-schema": "^7.0.4",
25
- "@vue/devtools-shared": "^7.0.4"
24
+ "@vue/devtools-schema": "^7.0.6",
25
+ "@vue/devtools-shared": "^7.0.6"
26
26
  },
27
27
  "devDependencies": {
28
- "vue": "^3.4.0",
28
+ "vue": "^3.4.4",
29
29
  "vue-router": "^4.2.5"
30
30
  },
31
31
  "scripts": {