@vue/devtools-api 6.1.2 → 6.2.0
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/lib/cjs/api/index.js +11 -7
- package/lib/cjs/index.js +16 -12
- package/lib/cjs/proxy.js +4 -4
- package/lib/esm/api/api.d.ts +10 -5
- package/lib/esm/api/component.d.ts +2 -2
- package/lib/esm/api/context.d.ts +1 -1
- package/lib/esm/api/hooks.d.ts +3 -3
- package/lib/esm/api/index.d.ts +6 -6
- package/lib/esm/api/index.js +6 -6
- package/lib/esm/env.d.ts +2 -2
- package/lib/esm/index.d.ts +6 -6
- package/lib/esm/index.js +6 -6
- package/lib/esm/plugin.d.ts +1 -1
- package/lib/esm/proxy.d.ts +2 -2
- package/lib/esm/proxy.js +2 -2
- package/package.json +1 -1
package/lib/cjs/api/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./api"), exports);
|
|
14
|
-
__exportStar(require("./app"), exports);
|
|
15
|
-
__exportStar(require("./component"), exports);
|
|
16
|
-
__exportStar(require("./context"), exports);
|
|
17
|
-
__exportStar(require("./hooks"), exports);
|
|
18
|
-
__exportStar(require("./util"), exports);
|
|
17
|
+
__exportStar(require("./api.js"), exports);
|
|
18
|
+
__exportStar(require("./app.js"), exports);
|
|
19
|
+
__exportStar(require("./component.js"), exports);
|
|
20
|
+
__exportStar(require("./context.js"), exports);
|
|
21
|
+
__exportStar(require("./hooks.js"), exports);
|
|
22
|
+
__exportStar(require("./util.js"), exports);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -11,22 +15,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
exports.setupDevtoolsPlugin = void 0;
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
__exportStar(require("./api"), exports);
|
|
18
|
-
__exportStar(require("./plugin"), exports);
|
|
19
|
-
__exportStar(require("./time"), exports);
|
|
18
|
+
const env_js_1 = require("./env.js");
|
|
19
|
+
const const_js_1 = require("./const.js");
|
|
20
|
+
const proxy_js_1 = require("./proxy.js");
|
|
21
|
+
__exportStar(require("./api/index.js"), exports);
|
|
22
|
+
__exportStar(require("./plugin.js"), exports);
|
|
23
|
+
__exportStar(require("./time.js"), exports);
|
|
20
24
|
function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
|
|
21
25
|
const descriptor = pluginDescriptor;
|
|
22
|
-
const target = (0,
|
|
23
|
-
const hook = (0,
|
|
24
|
-
const enableProxy =
|
|
26
|
+
const target = (0, env_js_1.getTarget)();
|
|
27
|
+
const hook = (0, env_js_1.getDevtoolsGlobalHook)();
|
|
28
|
+
const enableProxy = env_js_1.isProxyAvailable && descriptor.enableEarlyProxy;
|
|
25
29
|
if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
|
|
26
|
-
hook.emit(
|
|
30
|
+
hook.emit(const_js_1.HOOK_SETUP, pluginDescriptor, setupFn);
|
|
27
31
|
}
|
|
28
32
|
else {
|
|
29
|
-
const proxy = enableProxy ? new
|
|
33
|
+
const proxy = enableProxy ? new proxy_js_1.ApiProxy(descriptor, hook) : null;
|
|
30
34
|
const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
|
|
31
35
|
list.push({
|
|
32
36
|
pluginDescriptor: descriptor,
|
package/lib/cjs/proxy.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ApiProxy = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const const_js_1 = require("./const.js");
|
|
5
|
+
const time_js_1 = require("./time.js");
|
|
6
6
|
class ApiProxy {
|
|
7
7
|
constructor(plugin, hook) {
|
|
8
8
|
this.target = null;
|
|
@@ -41,11 +41,11 @@ class ApiProxy {
|
|
|
41
41
|
currentSettings = value;
|
|
42
42
|
},
|
|
43
43
|
now() {
|
|
44
|
-
return (0,
|
|
44
|
+
return (0, time_js_1.now)();
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
if (hook) {
|
|
48
|
-
hook.on(
|
|
48
|
+
hook.on(const_js_1.HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
|
|
49
49
|
if (pluginId === this.plugin.id) {
|
|
50
50
|
this.fallbacks.setSettings(value);
|
|
51
51
|
}
|
package/lib/esm/api/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentBounds, Hookable } from './hooks';
|
|
2
|
-
import { Context } from './context';
|
|
3
|
-
import { ComponentInstance, ComponentState, StateBase } from './component';
|
|
4
|
-
import { App } from './app';
|
|
5
|
-
import { ID } from './util';
|
|
1
|
+
import type { ComponentBounds, Hookable } from './hooks.js';
|
|
2
|
+
import type { Context } from './context.js';
|
|
3
|
+
import type { ComponentInstance, ComponentState, StateBase } from './component.js';
|
|
4
|
+
import type { App } from './app.js';
|
|
5
|
+
import type { ID } from './util.js';
|
|
6
6
|
export interface DevtoolsPluginApi<TSettings> {
|
|
7
7
|
on: Hookable<Context>;
|
|
8
8
|
notifyComponentUpdate(instance?: ComponentInstance): void;
|
|
@@ -85,6 +85,11 @@ export interface CustomInspectorOptions {
|
|
|
85
85
|
tooltip?: string;
|
|
86
86
|
action: () => void | Promise<void>;
|
|
87
87
|
}[];
|
|
88
|
+
nodeActions?: {
|
|
89
|
+
icon: string;
|
|
90
|
+
tooltip?: string;
|
|
91
|
+
action: (nodeId: string) => void | Promise<void>;
|
|
92
|
+
}[];
|
|
88
93
|
}
|
|
89
94
|
export interface CustomInspectorNode {
|
|
90
95
|
id: string;
|
package/lib/esm/api/context.d.ts
CHANGED
package/lib/esm/api/hooks.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentTreeNode, InspectedComponentData, ComponentInstance, ComponentDevtoolsOptions } from './component';
|
|
2
|
-
import { App } from './app';
|
|
3
|
-
import { CustomInspectorNode, CustomInspectorState, TimelineEvent } from './api';
|
|
1
|
+
import type { ComponentTreeNode, InspectedComponentData, ComponentInstance, ComponentDevtoolsOptions } from './component.js';
|
|
2
|
+
import type { App } from './app.js';
|
|
3
|
+
import type { CustomInspectorNode, CustomInspectorState, TimelineEvent } from './api.js';
|
|
4
4
|
export declare const enum Hooks {
|
|
5
5
|
TRANSFORM_CALL = "transformCall",
|
|
6
6
|
GET_APP_RECORD_NAME = "getAppRecordName",
|
package/lib/esm/api/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './app';
|
|
3
|
-
export * from './component';
|
|
4
|
-
export * from './context';
|
|
5
|
-
export * from './hooks';
|
|
6
|
-
export * from './util';
|
|
1
|
+
export * from './api.js';
|
|
2
|
+
export * from './app.js';
|
|
3
|
+
export * from './component.js';
|
|
4
|
+
export * from './context.js';
|
|
5
|
+
export * from './hooks.js';
|
|
6
|
+
export * from './util.js';
|
package/lib/esm/api/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './app';
|
|
3
|
-
export * from './component';
|
|
4
|
-
export * from './context';
|
|
5
|
-
export * from './hooks';
|
|
6
|
-
export * from './util';
|
|
1
|
+
export * from './api.js';
|
|
2
|
+
export * from './app.js';
|
|
3
|
+
export * from './component.js';
|
|
4
|
+
export * from './context.js';
|
|
5
|
+
export * from './hooks.js';
|
|
6
|
+
export * from './util.js';
|
package/lib/esm/env.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginDescriptor, SetupFunction } from '.';
|
|
2
|
-
import { ApiProxy } from './proxy';
|
|
1
|
+
import type { PluginDescriptor, SetupFunction } from './index.js';
|
|
2
|
+
import type { ApiProxy } from './proxy.js';
|
|
3
3
|
export interface PluginQueueItem {
|
|
4
4
|
pluginDescriptor: PluginDescriptor;
|
|
5
5
|
setupFn: SetupFunction;
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DevtoolsPluginApi } from './api';
|
|
2
|
-
import { PluginDescriptor, ExtractSettingsTypes, PluginSettingsItem } from './plugin';
|
|
3
|
-
export * from './api';
|
|
4
|
-
export * from './plugin';
|
|
5
|
-
export * from './time';
|
|
6
|
-
export { PluginQueueItem } from './env';
|
|
1
|
+
import type { DevtoolsPluginApi } from './api/index.js';
|
|
2
|
+
import type { PluginDescriptor, ExtractSettingsTypes, PluginSettingsItem } from './plugin.js';
|
|
3
|
+
export * from './api/index.js';
|
|
4
|
+
export * from './plugin.js';
|
|
5
|
+
export * from './time.js';
|
|
6
|
+
export { PluginQueueItem } from './env.js';
|
|
7
7
|
declare type Cast<A, B> = A extends B ? A : B;
|
|
8
8
|
declare type Narrowable = string | number | bigint | boolean;
|
|
9
9
|
declare type Narrow<A> = Cast<A, [] | (A extends Narrowable ? A : never) | ({
|
package/lib/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { getTarget, getDevtoolsGlobalHook, isProxyAvailable } from './env';
|
|
2
|
-
import { HOOK_SETUP } from './const';
|
|
3
|
-
import { ApiProxy } from './proxy';
|
|
4
|
-
export * from './api';
|
|
5
|
-
export * from './plugin';
|
|
6
|
-
export * from './time';
|
|
1
|
+
import { getTarget, getDevtoolsGlobalHook, isProxyAvailable } from './env.js';
|
|
2
|
+
import { HOOK_SETUP } from './const.js';
|
|
3
|
+
import { ApiProxy } from './proxy.js';
|
|
4
|
+
export * from './api/index.js';
|
|
5
|
+
export * from './plugin.js';
|
|
6
|
+
export * from './time.js';
|
|
7
7
|
export function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
|
|
8
8
|
const descriptor = pluginDescriptor;
|
|
9
9
|
const target = getTarget();
|
package/lib/esm/plugin.d.ts
CHANGED
package/lib/esm/proxy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context, DevtoolsPluginApi, Hookable } from './api';
|
|
2
|
-
import { PluginDescriptor } from './plugin';
|
|
1
|
+
import type { Context, DevtoolsPluginApi, Hookable } from './api/index.js';
|
|
2
|
+
import type { PluginDescriptor } from './plugin.js';
|
|
3
3
|
interface QueueItem {
|
|
4
4
|
method: string;
|
|
5
5
|
args: any[];
|
package/lib/esm/proxy.js
CHANGED