@vue/devtools-kit 7.3.1 → 7.3.3
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 +34 -13
- package/dist/index.js +26 -5
- package/package.json +3 -6
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1822,7 +1822,28 @@ init_cjs_shims();
|
|
|
1822
1822
|
// src/core/component/utils/index.ts
|
|
1823
1823
|
init_cjs_shims();
|
|
1824
1824
|
var import_devtools_shared2 = require("@vue/devtools-shared");
|
|
1825
|
-
|
|
1825
|
+
|
|
1826
|
+
// src/shared/stub-vue.ts
|
|
1827
|
+
init_cjs_shims();
|
|
1828
|
+
function isReadonly(value) {
|
|
1829
|
+
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1830
|
+
}
|
|
1831
|
+
function isReactive(value) {
|
|
1832
|
+
if (isReadonly(value)) {
|
|
1833
|
+
return isReactive(value["__v_raw" /* RAW */]);
|
|
1834
|
+
}
|
|
1835
|
+
return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);
|
|
1836
|
+
}
|
|
1837
|
+
function isRef(r) {
|
|
1838
|
+
return !!(r && r.__v_isRef === true);
|
|
1839
|
+
}
|
|
1840
|
+
function toRaw(observed) {
|
|
1841
|
+
const raw = observed && observed["__v_raw" /* RAW */];
|
|
1842
|
+
return raw ? toRaw(raw) : observed;
|
|
1843
|
+
}
|
|
1844
|
+
var Fragment = Symbol.for("v-fgt");
|
|
1845
|
+
|
|
1846
|
+
// src/core/component/utils/index.ts
|
|
1826
1847
|
function getComponentTypeName(options) {
|
|
1827
1848
|
return options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
|
|
1828
1849
|
}
|
|
@@ -1863,7 +1884,7 @@ async function getComponentId(options) {
|
|
|
1863
1884
|
function isFragment(instance) {
|
|
1864
1885
|
var _a24;
|
|
1865
1886
|
const subTreeType = (_a24 = instance.subTree) == null ? void 0 : _a24.type;
|
|
1866
|
-
return subTreeType ===
|
|
1887
|
+
return subTreeType === Fragment;
|
|
1867
1888
|
}
|
|
1868
1889
|
function isBeingDestroyed(instance) {
|
|
1869
1890
|
return instance._isBeingDestroyed || instance.isUnmounted;
|
|
@@ -2166,6 +2187,7 @@ function selectComponentFn(e, cb) {
|
|
|
2166
2187
|
}
|
|
2167
2188
|
var inspectComponentHighLighterSelectFn = null;
|
|
2168
2189
|
function cancelInspectComponentHighLighter() {
|
|
2190
|
+
unhighlight();
|
|
2169
2191
|
window.removeEventListener("mouseover", inspectFn);
|
|
2170
2192
|
window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
|
|
2171
2193
|
inspectComponentHighLighterSelectFn = null;
|
|
@@ -2621,7 +2643,6 @@ var import_devtools_shared14 = require("@vue/devtools-shared");
|
|
|
2621
2643
|
|
|
2622
2644
|
// src/core/component/state/editor.ts
|
|
2623
2645
|
init_cjs_shims();
|
|
2624
|
-
var import_vue2 = require("vue");
|
|
2625
2646
|
var StateEditor = class {
|
|
2626
2647
|
constructor() {
|
|
2627
2648
|
this.refEditor = new RefStateEditor();
|
|
@@ -2684,9 +2705,9 @@ var StateEditor = class {
|
|
|
2684
2705
|
if (state.remove || state.newKey) {
|
|
2685
2706
|
if (Array.isArray(object))
|
|
2686
2707
|
object.splice(field, 1);
|
|
2687
|
-
else if (
|
|
2708
|
+
else if (toRaw(object) instanceof Map)
|
|
2688
2709
|
object.delete(field);
|
|
2689
|
-
else if (
|
|
2710
|
+
else if (toRaw(object) instanceof Set)
|
|
2690
2711
|
object.delete(Array.from(object.values())[field]);
|
|
2691
2712
|
else Reflect.deleteProperty(object, field);
|
|
2692
2713
|
}
|
|
@@ -2694,9 +2715,9 @@ var StateEditor = class {
|
|
|
2694
2715
|
const target21 = object[state.newKey || field];
|
|
2695
2716
|
if (this.refEditor.isRef(target21))
|
|
2696
2717
|
this.refEditor.set(target21, value);
|
|
2697
|
-
else if (
|
|
2718
|
+
else if (toRaw(object) instanceof Map)
|
|
2698
2719
|
object.set(state.newKey || field, value);
|
|
2699
|
-
else if (
|
|
2720
|
+
else if (toRaw(object) instanceof Set)
|
|
2700
2721
|
object.add(value);
|
|
2701
2722
|
else
|
|
2702
2723
|
object[state.newKey || field] = value;
|
|
@@ -2706,7 +2727,7 @@ var StateEditor = class {
|
|
|
2706
2727
|
};
|
|
2707
2728
|
var RefStateEditor = class {
|
|
2708
2729
|
set(ref, value) {
|
|
2709
|
-
if (
|
|
2730
|
+
if (isRef(ref)) {
|
|
2710
2731
|
ref.value = value;
|
|
2711
2732
|
} else {
|
|
2712
2733
|
if (ref instanceof Set && Array.isArray(value)) {
|
|
@@ -2733,10 +2754,10 @@ var RefStateEditor = class {
|
|
|
2733
2754
|
}
|
|
2734
2755
|
}
|
|
2735
2756
|
get(ref) {
|
|
2736
|
-
return
|
|
2757
|
+
return isRef(ref) ? ref.value : ref;
|
|
2737
2758
|
}
|
|
2738
2759
|
isRef(ref) {
|
|
2739
|
-
return
|
|
2760
|
+
return isRef(ref) || isReactive(ref);
|
|
2740
2761
|
}
|
|
2741
2762
|
};
|
|
2742
2763
|
async function editComponentState(payload, stateEditor2) {
|
|
@@ -3628,7 +3649,7 @@ function processInject(instance, mergedType) {
|
|
|
3628
3649
|
}
|
|
3629
3650
|
function processRefs(instance) {
|
|
3630
3651
|
return Object.keys(instance.refs).map((key) => ({
|
|
3631
|
-
type: "refs",
|
|
3652
|
+
type: "template refs",
|
|
3632
3653
|
key,
|
|
3633
3654
|
value: returnError(() => instance.refs[key])
|
|
3634
3655
|
}));
|
package/dist/index.js
CHANGED
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.1.0_@microsoft+api-extractor@7.43.0_@types+node@20.14.5__@swc+core@1.5.29_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -1733,7 +1733,28 @@ init_esm_shims();
|
|
|
1733
1733
|
// src/core/component/utils/index.ts
|
|
1734
1734
|
init_esm_shims();
|
|
1735
1735
|
import { basename, classify } from "@vue/devtools-shared";
|
|
1736
|
-
|
|
1736
|
+
|
|
1737
|
+
// src/shared/stub-vue.ts
|
|
1738
|
+
init_esm_shims();
|
|
1739
|
+
function isReadonly(value) {
|
|
1740
|
+
return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
|
|
1741
|
+
}
|
|
1742
|
+
function isReactive(value) {
|
|
1743
|
+
if (isReadonly(value)) {
|
|
1744
|
+
return isReactive(value["__v_raw" /* RAW */]);
|
|
1745
|
+
}
|
|
1746
|
+
return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);
|
|
1747
|
+
}
|
|
1748
|
+
function isRef(r) {
|
|
1749
|
+
return !!(r && r.__v_isRef === true);
|
|
1750
|
+
}
|
|
1751
|
+
function toRaw(observed) {
|
|
1752
|
+
const raw = observed && observed["__v_raw" /* RAW */];
|
|
1753
|
+
return raw ? toRaw(raw) : observed;
|
|
1754
|
+
}
|
|
1755
|
+
var Fragment = Symbol.for("v-fgt");
|
|
1756
|
+
|
|
1757
|
+
// src/core/component/utils/index.ts
|
|
1737
1758
|
function getComponentTypeName(options) {
|
|
1738
1759
|
return options.name || options._componentTag || options.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || options.__name;
|
|
1739
1760
|
}
|
|
@@ -2077,6 +2098,7 @@ function selectComponentFn(e, cb) {
|
|
|
2077
2098
|
}
|
|
2078
2099
|
var inspectComponentHighLighterSelectFn = null;
|
|
2079
2100
|
function cancelInspectComponentHighLighter() {
|
|
2101
|
+
unhighlight();
|
|
2080
2102
|
window.removeEventListener("mouseover", inspectFn);
|
|
2081
2103
|
window.removeEventListener("click", inspectComponentHighLighterSelectFn, true);
|
|
2082
2104
|
inspectComponentHighLighterSelectFn = null;
|
|
@@ -2532,7 +2554,6 @@ import { target as target8 } from "@vue/devtools-shared";
|
|
|
2532
2554
|
|
|
2533
2555
|
// src/core/component/state/editor.ts
|
|
2534
2556
|
init_esm_shims();
|
|
2535
|
-
import { isReactive, isRef, toRaw } from "vue";
|
|
2536
2557
|
var StateEditor = class {
|
|
2537
2558
|
constructor() {
|
|
2538
2559
|
this.refEditor = new RefStateEditor();
|
|
@@ -3539,7 +3560,7 @@ function processInject(instance, mergedType) {
|
|
|
3539
3560
|
}
|
|
3540
3561
|
function processRefs(instance) {
|
|
3541
3562
|
return Object.keys(instance.refs).map((key) => ({
|
|
3542
|
-
type: "refs",
|
|
3563
|
+
type: "template refs",
|
|
3543
3564
|
key,
|
|
3544
3565
|
value: returnError(() => instance.refs[key])
|
|
3545
3566
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.3",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -22,9 +22,6 @@
|
|
|
22
22
|
"**.d.ts",
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
|
-
"peerDependencies": {
|
|
26
|
-
"vue": "^3.0.0"
|
|
27
|
-
},
|
|
28
25
|
"dependencies": {
|
|
29
26
|
"birpc": "^0.2.17",
|
|
30
27
|
"hookable": "^5.5.3",
|
|
@@ -32,11 +29,11 @@
|
|
|
32
29
|
"perfect-debounce": "^1.0.0",
|
|
33
30
|
"speakingurl": "^14.0.1",
|
|
34
31
|
"superjson": "^2.2.1",
|
|
35
|
-
"@vue/devtools-shared": "^7.3.
|
|
32
|
+
"@vue/devtools-shared": "^7.3.3"
|
|
36
33
|
},
|
|
37
34
|
"devDependencies": {
|
|
38
35
|
"@types/speakingurl": "^13.0.6",
|
|
39
|
-
"vue": "^3.4.
|
|
36
|
+
"vue": "^3.4.29",
|
|
40
37
|
"vue-router": "^4.3.3"
|
|
41
38
|
},
|
|
42
39
|
"scripts": {
|