@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.
@@ -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(n, t = 500) {
13
- let e;
12
+ function debounce(e, t = 500) {
13
+ let n;
14
14
  return (...o) => {
15
- clearTimeout(e), e = setTimeout(() => {
16
- n(...o);
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(n, t) {
23
- return n?.[i] ? t ? n.value : {
24
- value: n.value,
22
+ function s(e, t) {
23
+ return e?.[i] ? t ? e.value : {
24
+ value: e.value,
25
25
  [i]: "true",
26
- [u]: !!n.__v_isReadonly
27
- } : n;
26
+ [u]: !!e.__v_isReadonly
27
+ } : e;
28
28
  }
29
- function getInstanceState(n, t) {
30
- if (!n) return {};
31
- const e = {};
32
- return Object.entries(n.props).forEach(([o, r]) => {
33
- e[o] = r;
34
- }), Object.entries(n.devtoolsRawSetupState ?? n.setupState).forEach(([o, r]) => {
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
- e[o] = a;
37
- }), e;
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(n, t = 500) {
5
- let e;
4
+ export function debounce(e, t = 500) {
5
+ let n;
6
6
  return (...o) => {
7
- clearTimeout(e), e = setTimeout(() => {
8
- n(...o);
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(n, t) {
14
- return n?.[i] ? t ? n.value : {
15
- value: n.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]: !!n.__v_isReadonly
19
- } : n;
18
+ [u]: !!e.__v_isReadonly
19
+ } : e;
20
20
  }
21
- export function getInstanceState(n, t) {
22
- if (!n) return {};
23
- const e = {};
24
- return Object.entries(n.props).forEach(([o, r]) => {
25
- e[o] = r;
26
- }), Object.entries(n.devtoolsRawSetupState ?? n.setupState).forEach(([o, r]) => {
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
- e[o] = a;
29
- }), e;
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.3",
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": "1.0.3"
29
+ "@nookuio/inspector-plugin": "latest"
30
30
  },
31
31
  "devDependencies": {
32
32
  "changelogen": "^0.6.2",