@vue/devtools-kit 7.0.15 → 7.0.16
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 +45 -22
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +45 -22
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1846,23 +1846,26 @@ function collectDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
|
1846
1846
|
function setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
1847
1847
|
return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
|
|
1848
1848
|
}
|
|
1849
|
-
function
|
|
1850
|
-
const
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
}
|
|
1849
|
+
function setupExternalPlugin(plugin, app, api) {
|
|
1850
|
+
const [pluginDescriptor, setupFn] = plugin;
|
|
1851
|
+
if (pluginDescriptor.app !== app)
|
|
1852
|
+
return;
|
|
1853
|
+
if (pluginDescriptor.packageName === "vue-query") {
|
|
1854
|
+
return;
|
|
1855
|
+
}
|
|
1856
|
+
if (pluginDescriptor.packageName === "vue-router") {
|
|
1857
|
+
const id = getRouterDevToolsId(`${pluginDescriptor.id}`);
|
|
1858
|
+
if (pluginDescriptor.app === app) {
|
|
1859
|
+
devtoolsAppRecords.value = devtoolsAppRecords.value.map((item) => ({
|
|
1860
|
+
...item,
|
|
1861
|
+
routerId: id
|
|
1862
|
+
}));
|
|
1863
1863
|
}
|
|
1864
|
-
|
|
1865
|
-
|
|
1864
|
+
}
|
|
1865
|
+
setupFn(api);
|
|
1866
|
+
}
|
|
1867
|
+
function registerPlugin(app, api) {
|
|
1868
|
+
devtoolsState.pluginBuffer.forEach((plugin) => setupExternalPlugin(plugin, app, api));
|
|
1866
1869
|
devtoolsAppRecords.value = devtoolsAppRecords.value.map((record) => {
|
|
1867
1870
|
var _a10, _b10;
|
|
1868
1871
|
const globalProperties = (_b10 = (_a10 = record.app) == null ? void 0 : _a10.config) == null ? void 0 : _b10.globalProperties;
|
|
@@ -2396,8 +2399,22 @@ var RefStateEditor = class {
|
|
|
2396
2399
|
if ((0, import_vue2.isRef)(ref)) {
|
|
2397
2400
|
ref.value = value;
|
|
2398
2401
|
} else {
|
|
2399
|
-
|
|
2402
|
+
if (ref instanceof Set && Array.isArray(value)) {
|
|
2403
|
+
ref.clear();
|
|
2404
|
+
value.forEach((v) => ref.add(v));
|
|
2405
|
+
return;
|
|
2406
|
+
}
|
|
2400
2407
|
const currentKeys = Object.keys(value);
|
|
2408
|
+
if (ref instanceof Map) {
|
|
2409
|
+
const previousKeysSet2 = new Set(ref.keys());
|
|
2410
|
+
currentKeys.forEach((key) => {
|
|
2411
|
+
ref.set(key, Reflect.get(value, key));
|
|
2412
|
+
previousKeysSet2.delete(key);
|
|
2413
|
+
});
|
|
2414
|
+
previousKeysSet2.forEach((key) => ref.delete(key));
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
const previousKeysSet = new Set(Object.keys(ref));
|
|
2401
2418
|
currentKeys.forEach((key) => {
|
|
2402
2419
|
Reflect.set(ref, key, Reflect.get(value, key));
|
|
2403
2420
|
previousKeysSet.delete(key);
|
|
@@ -3053,10 +3070,6 @@ async function toggleActiveAppRecord(id) {
|
|
|
3053
3070
|
const api = new DevToolsPluginApi();
|
|
3054
3071
|
appRecord.api = api;
|
|
3055
3072
|
setActiveAppRecord(appRecord);
|
|
3056
|
-
window.postMessage({
|
|
3057
|
-
event: "toggle-app-record",
|
|
3058
|
-
target: "vue-devtools"
|
|
3059
|
-
});
|
|
3060
3073
|
}
|
|
3061
3074
|
}
|
|
3062
3075
|
|
|
@@ -3945,6 +3958,9 @@ var on2 = {
|
|
|
3945
3958
|
},
|
|
3946
3959
|
editComponentState() {
|
|
3947
3960
|
},
|
|
3961
|
+
componentUpdated(fn) {
|
|
3962
|
+
apiHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
|
|
3963
|
+
},
|
|
3948
3964
|
// #endregion compatible with old devtools
|
|
3949
3965
|
// router
|
|
3950
3966
|
routerInfoUpdated(fn) {
|
|
@@ -4086,6 +4102,7 @@ var DevToolsPluginApi = class {
|
|
|
4086
4102
|
apiHooks.callHook("component-tree:visit" /* VISIT_COMPONENT_TREE */, ...params);
|
|
4087
4103
|
}
|
|
4088
4104
|
notifyComponentUpdate() {
|
|
4105
|
+
apiHooks.callHook("component:updated" /* COMPONENT_UPDATED */);
|
|
4089
4106
|
}
|
|
4090
4107
|
now() {
|
|
4091
4108
|
return now();
|
|
@@ -4332,7 +4349,13 @@ function initDevTools() {
|
|
|
4332
4349
|
Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
|
|
4333
4350
|
else
|
|
4334
4351
|
import_devtools_shared15.target.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
|
|
4335
|
-
hook.on.setupDevtoolsPlugin(
|
|
4352
|
+
hook.on.setupDevtoolsPlugin((pluginDescriptor, setupFn) => {
|
|
4353
|
+
collectDevToolsPlugin(pluginDescriptor, setupFn);
|
|
4354
|
+
const { app, api } = devtoolsAppRecords.active || {};
|
|
4355
|
+
if (!app || !api)
|
|
4356
|
+
return;
|
|
4357
|
+
setupExternalPlugin([pluginDescriptor, setupFn], app, api);
|
|
4358
|
+
});
|
|
4336
4359
|
hook.on.vueAppInit(async (app, version) => {
|
|
4337
4360
|
const record = createAppRecord(app);
|
|
4338
4361
|
const api = new DevToolsPluginApi();
|
package/dist/index.d.cts
CHANGED
|
@@ -474,6 +474,7 @@ declare enum DevToolsEvents {
|
|
|
474
474
|
DEVTOOLS_CONNECTED_UPDATED = "devtools:connected-updated",
|
|
475
475
|
ROUTER_INFO_UPDATED = "router-info:updated",
|
|
476
476
|
COMPONENT_STATE_INSPECT = "component-state:inspect",
|
|
477
|
+
COMPONENT_UPDATED = "component:updated",
|
|
477
478
|
TOGGLE_COMPONENT_HIGHLIGHTER = "component-highlighter:toggle",
|
|
478
479
|
GET_COMPONENT_BOUNDING_RECT = "component-bounding-rect:get",
|
|
479
480
|
SCROLL_TO_COMPONENT = "scroll-to-component",
|
|
@@ -513,6 +514,7 @@ interface DevToolsEvent {
|
|
|
513
514
|
}) => void;
|
|
514
515
|
[DevToolsEvents.CUSTOM_TABS_UPDATED]: (payload: CustomTab[]) => void;
|
|
515
516
|
[DevToolsEvents.CUSTOM_COMMANDS_UPDATED]: (payload: CustomCommand[]) => void;
|
|
517
|
+
[DevToolsEvents.COMPONENT_UPDATED]: () => void;
|
|
516
518
|
}
|
|
517
519
|
type DevToolsEventParams<T extends keyof DevToolsEvent> = Parameters<DevToolsEvent[T]>;
|
|
518
520
|
|
|
@@ -526,6 +528,7 @@ declare const on: {
|
|
|
526
528
|
readonly sendInspectorState: (fn: DevToolsEvent[DevToolsEvents.SEND_INSPECTOR_STATE]) => void;
|
|
527
529
|
readonly editInspectorState: (fn: DevToolsEvent[DevToolsEvents.EDIT_INSPECTOR_STATE]) => void;
|
|
528
530
|
readonly editComponentState: () => void;
|
|
531
|
+
readonly componentUpdated: (fn: DevToolsEvent[DevToolsEvents.COMPONENT_UPDATED]) => void;
|
|
529
532
|
readonly routerInfoUpdated: (fn: DevToolsEvent[DevToolsEvents.ROUTER_INFO_UPDATED]) => void;
|
|
530
533
|
readonly getComponentBoundingRect: (fn: DevToolsEvent[DevToolsEvents.GET_COMPONENT_BOUNDING_RECT]) => void;
|
|
531
534
|
readonly customTabsUpdated: (fn: DevToolsEvent[DevToolsEvents.CUSTOM_TABS_UPDATED]) => void;
|
|
@@ -573,6 +576,12 @@ declare class DevToolsPluginApi {
|
|
|
573
576
|
getVueInspector(): Promise<ComponentInspector>;
|
|
574
577
|
}
|
|
575
578
|
|
|
579
|
+
declare const hook: VueHooks;
|
|
580
|
+
|
|
581
|
+
declare const devtoolsState: DevToolsState;
|
|
582
|
+
|
|
583
|
+
declare const devtoolsContext: DevToolsContext;
|
|
584
|
+
|
|
576
585
|
declare function setDevToolsEnv(env: Partial<DevToolsEnv>): void;
|
|
577
586
|
|
|
578
587
|
declare function initDevTools(): void;
|
|
@@ -596,6 +605,14 @@ declare function parse(data: string, revive?: boolean): any;
|
|
|
596
605
|
|
|
597
606
|
declare const UNDEFINED = "__vue_devtool_undefined__";
|
|
598
607
|
|
|
608
|
+
interface DevToolsType {
|
|
609
|
+
state: typeof devtoolsState;
|
|
610
|
+
context: typeof devtoolsContext;
|
|
611
|
+
hook: typeof hook;
|
|
612
|
+
init: typeof initDevTools;
|
|
613
|
+
get api(): typeof devtoolsContext.api;
|
|
614
|
+
}
|
|
615
|
+
|
|
599
616
|
declare const devtools: {
|
|
600
617
|
state: DevToolsState;
|
|
601
618
|
context: DevToolsContext;
|
|
@@ -604,4 +621,4 @@ declare const devtools: {
|
|
|
604
621
|
readonly api: DevToolsPluginApi;
|
|
605
622
|
};
|
|
606
623
|
|
|
607
|
-
export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent$1 as DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, unhighlight, updateInspector };
|
|
624
|
+
export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent$1 as DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type DevToolsType, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, unhighlight, updateInspector };
|
package/dist/index.d.ts
CHANGED
|
@@ -474,6 +474,7 @@ declare enum DevToolsEvents {
|
|
|
474
474
|
DEVTOOLS_CONNECTED_UPDATED = "devtools:connected-updated",
|
|
475
475
|
ROUTER_INFO_UPDATED = "router-info:updated",
|
|
476
476
|
COMPONENT_STATE_INSPECT = "component-state:inspect",
|
|
477
|
+
COMPONENT_UPDATED = "component:updated",
|
|
477
478
|
TOGGLE_COMPONENT_HIGHLIGHTER = "component-highlighter:toggle",
|
|
478
479
|
GET_COMPONENT_BOUNDING_RECT = "component-bounding-rect:get",
|
|
479
480
|
SCROLL_TO_COMPONENT = "scroll-to-component",
|
|
@@ -513,6 +514,7 @@ interface DevToolsEvent {
|
|
|
513
514
|
}) => void;
|
|
514
515
|
[DevToolsEvents.CUSTOM_TABS_UPDATED]: (payload: CustomTab[]) => void;
|
|
515
516
|
[DevToolsEvents.CUSTOM_COMMANDS_UPDATED]: (payload: CustomCommand[]) => void;
|
|
517
|
+
[DevToolsEvents.COMPONENT_UPDATED]: () => void;
|
|
516
518
|
}
|
|
517
519
|
type DevToolsEventParams<T extends keyof DevToolsEvent> = Parameters<DevToolsEvent[T]>;
|
|
518
520
|
|
|
@@ -526,6 +528,7 @@ declare const on: {
|
|
|
526
528
|
readonly sendInspectorState: (fn: DevToolsEvent[DevToolsEvents.SEND_INSPECTOR_STATE]) => void;
|
|
527
529
|
readonly editInspectorState: (fn: DevToolsEvent[DevToolsEvents.EDIT_INSPECTOR_STATE]) => void;
|
|
528
530
|
readonly editComponentState: () => void;
|
|
531
|
+
readonly componentUpdated: (fn: DevToolsEvent[DevToolsEvents.COMPONENT_UPDATED]) => void;
|
|
529
532
|
readonly routerInfoUpdated: (fn: DevToolsEvent[DevToolsEvents.ROUTER_INFO_UPDATED]) => void;
|
|
530
533
|
readonly getComponentBoundingRect: (fn: DevToolsEvent[DevToolsEvents.GET_COMPONENT_BOUNDING_RECT]) => void;
|
|
531
534
|
readonly customTabsUpdated: (fn: DevToolsEvent[DevToolsEvents.CUSTOM_TABS_UPDATED]) => void;
|
|
@@ -573,6 +576,12 @@ declare class DevToolsPluginApi {
|
|
|
573
576
|
getVueInspector(): Promise<ComponentInspector>;
|
|
574
577
|
}
|
|
575
578
|
|
|
579
|
+
declare const hook: VueHooks;
|
|
580
|
+
|
|
581
|
+
declare const devtoolsState: DevToolsState;
|
|
582
|
+
|
|
583
|
+
declare const devtoolsContext: DevToolsContext;
|
|
584
|
+
|
|
576
585
|
declare function setDevToolsEnv(env: Partial<DevToolsEnv>): void;
|
|
577
586
|
|
|
578
587
|
declare function initDevTools(): void;
|
|
@@ -596,6 +605,14 @@ declare function parse(data: string, revive?: boolean): any;
|
|
|
596
605
|
|
|
597
606
|
declare const UNDEFINED = "__vue_devtool_undefined__";
|
|
598
607
|
|
|
608
|
+
interface DevToolsType {
|
|
609
|
+
state: typeof devtoolsState;
|
|
610
|
+
context: typeof devtoolsContext;
|
|
611
|
+
hook: typeof hook;
|
|
612
|
+
init: typeof initDevTools;
|
|
613
|
+
get api(): typeof devtoolsContext.api;
|
|
614
|
+
}
|
|
615
|
+
|
|
599
616
|
declare const devtools: {
|
|
600
617
|
state: DevToolsState;
|
|
601
618
|
context: DevToolsContext;
|
|
@@ -604,4 +621,4 @@ declare const devtools: {
|
|
|
604
621
|
readonly api: DevToolsPluginApi;
|
|
605
622
|
};
|
|
606
623
|
|
|
607
|
-
export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent$1 as DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, unhighlight, updateInspector };
|
|
624
|
+
export { type AddInspectorApiPayload, type AppRecord, type ComponentBoundingRect, type ComponentBoundingRectApiPayload, type ComponentHighLighterOptions, type ComponentInspector, type ComponentTreeNode, type CustomCommand, type CustomCommandAction, type CustomTab, type DevToolsContext, type DevToolsEnv, type DevToolsEvent$1 as DevToolsEvent, type DevToolsHook, DevToolsHooks, type DevToolsState, type DevToolsType, type Inspector, type InspectorApiPayload, type InspectorCustomState, type InspectorNodeTag, type InspectorState, type InspectorStateApiPayload, type InspectorStateEditorPayload, type InspectorTreeApiPayload, type OpenInEditorOptions, type PluginApi, type PluginDescriptor, type PluginSettingsItem, type PluginSetupFunction, type PropPath, type RouterInfo, type ScrollToComponentOptions, type TimelineEvent, type TimelineLayerItem, UNDEFINED, type VueAppInstance, type VueHooks, addCustomCommand, addCustomTab, addInspector, addTimelineLayer, type customTypeEnums, devtools, formatInspectorStateValue, getComponentInspector, getInspector, getInspectorStateValueType, getRaw, getTimelineLayer, highlight, inspectComponentHighLighter, onDevToolsClientConnected, onDevToolsConnected, openInEditor, parse, removeCustomCommand, scrollToComponent, setDevToolsEnv, setupDevToolsPlugin, stringify, toEdit, toSubmit, toggleComponentHighLighter, toggleComponentInspectorEnabled, unhighlight, updateInspector };
|
package/dist/index.js
CHANGED
|
@@ -1819,23 +1819,26 @@ function collectDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
|
1819
1819
|
function setupDevToolsPlugin(pluginDescriptor, setupFn) {
|
|
1820
1820
|
return hook.setupDevToolsPlugin(pluginDescriptor, setupFn);
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1823
|
-
const
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
}
|
|
1822
|
+
function setupExternalPlugin(plugin, app, api) {
|
|
1823
|
+
const [pluginDescriptor, setupFn] = plugin;
|
|
1824
|
+
if (pluginDescriptor.app !== app)
|
|
1825
|
+
return;
|
|
1826
|
+
if (pluginDescriptor.packageName === "vue-query") {
|
|
1827
|
+
return;
|
|
1828
|
+
}
|
|
1829
|
+
if (pluginDescriptor.packageName === "vue-router") {
|
|
1830
|
+
const id = getRouterDevToolsId(`${pluginDescriptor.id}`);
|
|
1831
|
+
if (pluginDescriptor.app === app) {
|
|
1832
|
+
devtoolsAppRecords.value = devtoolsAppRecords.value.map((item) => ({
|
|
1833
|
+
...item,
|
|
1834
|
+
routerId: id
|
|
1835
|
+
}));
|
|
1836
1836
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1837
|
+
}
|
|
1838
|
+
setupFn(api);
|
|
1839
|
+
}
|
|
1840
|
+
function registerPlugin(app, api) {
|
|
1841
|
+
devtoolsState.pluginBuffer.forEach((plugin) => setupExternalPlugin(plugin, app, api));
|
|
1839
1842
|
devtoolsAppRecords.value = devtoolsAppRecords.value.map((record) => {
|
|
1840
1843
|
var _a10, _b10;
|
|
1841
1844
|
const globalProperties = (_b10 = (_a10 = record.app) == null ? void 0 : _a10.config) == null ? void 0 : _b10.globalProperties;
|
|
@@ -2369,8 +2372,22 @@ var RefStateEditor = class {
|
|
|
2369
2372
|
if (isRef(ref)) {
|
|
2370
2373
|
ref.value = value;
|
|
2371
2374
|
} else {
|
|
2372
|
-
|
|
2375
|
+
if (ref instanceof Set && Array.isArray(value)) {
|
|
2376
|
+
ref.clear();
|
|
2377
|
+
value.forEach((v) => ref.add(v));
|
|
2378
|
+
return;
|
|
2379
|
+
}
|
|
2373
2380
|
const currentKeys = Object.keys(value);
|
|
2381
|
+
if (ref instanceof Map) {
|
|
2382
|
+
const previousKeysSet2 = new Set(ref.keys());
|
|
2383
|
+
currentKeys.forEach((key) => {
|
|
2384
|
+
ref.set(key, Reflect.get(value, key));
|
|
2385
|
+
previousKeysSet2.delete(key);
|
|
2386
|
+
});
|
|
2387
|
+
previousKeysSet2.forEach((key) => ref.delete(key));
|
|
2388
|
+
return;
|
|
2389
|
+
}
|
|
2390
|
+
const previousKeysSet = new Set(Object.keys(ref));
|
|
2374
2391
|
currentKeys.forEach((key) => {
|
|
2375
2392
|
Reflect.set(ref, key, Reflect.get(value, key));
|
|
2376
2393
|
previousKeysSet.delete(key);
|
|
@@ -3026,10 +3043,6 @@ async function toggleActiveAppRecord(id) {
|
|
|
3026
3043
|
const api = new DevToolsPluginApi();
|
|
3027
3044
|
appRecord.api = api;
|
|
3028
3045
|
setActiveAppRecord(appRecord);
|
|
3029
|
-
window.postMessage({
|
|
3030
|
-
event: "toggle-app-record",
|
|
3031
|
-
target: "vue-devtools"
|
|
3032
|
-
});
|
|
3033
3046
|
}
|
|
3034
3047
|
}
|
|
3035
3048
|
|
|
@@ -3918,6 +3931,9 @@ var on2 = {
|
|
|
3918
3931
|
},
|
|
3919
3932
|
editComponentState() {
|
|
3920
3933
|
},
|
|
3934
|
+
componentUpdated(fn) {
|
|
3935
|
+
apiHooks.hook("component:updated" /* COMPONENT_UPDATED */, fn);
|
|
3936
|
+
},
|
|
3921
3937
|
// #endregion compatible with old devtools
|
|
3922
3938
|
// router
|
|
3923
3939
|
routerInfoUpdated(fn) {
|
|
@@ -4059,6 +4075,7 @@ var DevToolsPluginApi = class {
|
|
|
4059
4075
|
apiHooks.callHook("component-tree:visit" /* VISIT_COMPONENT_TREE */, ...params);
|
|
4060
4076
|
}
|
|
4061
4077
|
notifyComponentUpdate() {
|
|
4078
|
+
apiHooks.callHook("component:updated" /* COMPONENT_UPDATED */);
|
|
4062
4079
|
}
|
|
4063
4080
|
now() {
|
|
4064
4081
|
return now();
|
|
@@ -4305,7 +4322,13 @@ function initDevTools() {
|
|
|
4305
4322
|
Object.assign(__VUE_DEVTOOLS_GLOBAL_HOOK__, createDevToolsHook());
|
|
4306
4323
|
else
|
|
4307
4324
|
target8.__VUE_DEVTOOLS_GLOBAL_HOOK__ = createDevToolsHook();
|
|
4308
|
-
hook.on.setupDevtoolsPlugin(
|
|
4325
|
+
hook.on.setupDevtoolsPlugin((pluginDescriptor, setupFn) => {
|
|
4326
|
+
collectDevToolsPlugin(pluginDescriptor, setupFn);
|
|
4327
|
+
const { app, api } = devtoolsAppRecords.active || {};
|
|
4328
|
+
if (!app || !api)
|
|
4329
|
+
return;
|
|
4330
|
+
setupExternalPlugin([pluginDescriptor, setupFn], app, api);
|
|
4331
|
+
});
|
|
4309
4332
|
hook.on.vueAppInit(async (app, version) => {
|
|
4310
4333
|
const record = createAppRecord(app);
|
|
4311
4334
|
const api = new DevToolsPluginApi();
|
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
|
+
"version": "7.0.16",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -25,12 +25,12 @@
|
|
|
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.
|
|
28
|
+
"@vue/devtools-shared": "^7.0.16"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/speakingurl": "^13.0.6",
|
|
32
|
-
"vue": "^3.4.
|
|
33
|
-
"vue-router": "^4.
|
|
32
|
+
"vue": "^3.4.21",
|
|
33
|
+
"vue-router": "^4.3.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup --clean",
|