@nookuio/vue 1.0.3 → 1.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/runtime/utils/helpers.js +18 -18
- package/dist/runtime/utils/helpers.mjs +18 -18
- package/package.json +2 -2
|
@@ -7,32 +7,32 @@ exports.debounce = debounce;
|
|
|
7
7
|
exports.getInstanceState = getInstanceState;
|
|
8
8
|
exports.isInsideEditor = isInsideEditor;
|
|
9
9
|
function isInsideEditor() {
|
|
10
|
-
return window === void 0 ? !1 : !!(window.parent && window.location !== window.parent.location || window.top !== window.self);
|
|
10
|
+
return import.meta.server || window === void 0 ? !1 : !!(window.parent && window.location !== window.parent.location || window.top !== window.self);
|
|
11
11
|
}
|
|
12
|
-
function debounce(
|
|
13
|
-
let
|
|
12
|
+
function debounce(e, t = 500) {
|
|
13
|
+
let n;
|
|
14
14
|
return (...o) => {
|
|
15
|
-
clearTimeout(
|
|
16
|
-
|
|
15
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
16
|
+
e(...o);
|
|
17
17
|
}, t);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
const i = "__v_isRef",
|
|
21
21
|
u = "__v_isReadonly";
|
|
22
|
-
function s(
|
|
23
|
-
return
|
|
24
|
-
value:
|
|
22
|
+
function s(e, t) {
|
|
23
|
+
return e?.[i] ? t ? e.value : {
|
|
24
|
+
value: e.value,
|
|
25
25
|
[i]: "true",
|
|
26
|
-
[u]: !!
|
|
27
|
-
} :
|
|
26
|
+
[u]: !!e.__v_isReadonly
|
|
27
|
+
} : e;
|
|
28
28
|
}
|
|
29
|
-
function getInstanceState(
|
|
30
|
-
if (!
|
|
31
|
-
const
|
|
32
|
-
return Object.entries(
|
|
33
|
-
|
|
34
|
-
}), Object.entries(
|
|
29
|
+
function getInstanceState(e, t) {
|
|
30
|
+
if (!e) return {};
|
|
31
|
+
const n = {};
|
|
32
|
+
return Object.entries(e.props).forEach(([o, r]) => {
|
|
33
|
+
n[o] = r;
|
|
34
|
+
}), Object.entries(e.devtoolsRawSetupState ?? e.setupState).forEach(([o, r]) => {
|
|
35
35
|
const a = s(r, t);
|
|
36
|
-
|
|
37
|
-
}),
|
|
36
|
+
n[o] = a;
|
|
37
|
+
}), n;
|
|
38
38
|
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export function isInsideEditor() {
|
|
2
|
-
return window === void 0 ? !1 : !!(window.parent && window.location !== window.parent.location || window.top !== window.self);
|
|
2
|
+
return import.meta.server || window === void 0 ? !1 : !!(window.parent && window.location !== window.parent.location || window.top !== window.self);
|
|
3
3
|
}
|
|
4
|
-
export function debounce(
|
|
5
|
-
let
|
|
4
|
+
export function debounce(e, t = 500) {
|
|
5
|
+
let n;
|
|
6
6
|
return (...o) => {
|
|
7
|
-
clearTimeout(
|
|
8
|
-
|
|
7
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
8
|
+
e(...o);
|
|
9
9
|
}, t);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
const i = "__v_isRef", u = "__v_isReadonly";
|
|
13
|
-
function s(
|
|
14
|
-
return
|
|
15
|
-
value:
|
|
13
|
+
function s(e, t) {
|
|
14
|
+
return e?.[i] ? t ? e.value : {
|
|
15
|
+
value: e.value,
|
|
16
16
|
[i]: "true",
|
|
17
17
|
// as string
|
|
18
|
-
[u]: !!
|
|
19
|
-
} :
|
|
18
|
+
[u]: !!e.__v_isReadonly
|
|
19
|
+
} : e;
|
|
20
20
|
}
|
|
21
|
-
export function getInstanceState(
|
|
22
|
-
if (!
|
|
23
|
-
const
|
|
24
|
-
return Object.entries(
|
|
25
|
-
|
|
26
|
-
}), Object.entries(
|
|
21
|
+
export function getInstanceState(e, t) {
|
|
22
|
+
if (!e) return {};
|
|
23
|
+
const n = {};
|
|
24
|
+
return Object.entries(e.props).forEach(([o, r]) => {
|
|
25
|
+
n[o] = r;
|
|
26
|
+
}), Object.entries(e.devtoolsRawSetupState ?? e.setupState).forEach(([o, r]) => {
|
|
27
27
|
const a = s(r, t);
|
|
28
|
-
|
|
29
|
-
}),
|
|
28
|
+
n[o] = a;
|
|
29
|
+
}), n;
|
|
30
30
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nookuio/vue",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@nookuio/iframe": "latest",
|
|
29
|
-
"@nookuio/inspector-plugin": "
|
|
29
|
+
"@nookuio/inspector-plugin": "latest"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"changelogen": "^0.6.2",
|