@mekari/pixel3-utils 0.0.0 → 0.0.1
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/{chunk-VSOR555U.mjs → chunk-MUK2XIES.mjs} +22 -1
- package/dist/{chunk-2UGMOMBN.mjs → chunk-RVQZSOON.mjs} +5 -0
- package/dist/dom.d.mts +20 -4
- package/dist/dom.d.ts +20 -4
- package/dist/dom.js +28 -0
- package/dist/dom.mjs +6 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -0
- package/dist/index.mjs +12 -6
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/validators.d.mts +9 -1
- package/dist/validators.d.ts +9 -1
- package/dist/validators.js +8 -2
- package/dist/validators.mjs +5 -3
- package/package.json +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isVueComponent
|
|
3
|
+
} from "./chunk-RVQZSOON.mjs";
|
|
1
4
|
import {
|
|
2
5
|
__name
|
|
3
6
|
} from "./chunk-QZ7VFGWC.mjs";
|
|
@@ -24,8 +27,26 @@ function scrollToTargetElement(target, containerEl, position) {
|
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
__name(scrollToTargetElement, "scrollToTargetElement");
|
|
30
|
+
function getElement(selector, domain) {
|
|
31
|
+
if (domain) {
|
|
32
|
+
return domain.querySelector(selector);
|
|
33
|
+
} else {
|
|
34
|
+
return document.querySelector(selector);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
__name(getElement, "getElement");
|
|
38
|
+
function getNode(selector) {
|
|
39
|
+
if (typeof selector === "string") {
|
|
40
|
+
return getElement(selector);
|
|
41
|
+
} else {
|
|
42
|
+
return isVueComponent(selector) ? selector.$el : selector;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
__name(getNode, "getNode");
|
|
27
46
|
|
|
28
47
|
export {
|
|
29
48
|
isElementVisible,
|
|
30
|
-
scrollToTargetElement
|
|
49
|
+
scrollToTargetElement,
|
|
50
|
+
getElement,
|
|
51
|
+
getNode
|
|
31
52
|
};
|
|
@@ -3,6 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-QZ7VFGWC.mjs";
|
|
4
4
|
|
|
5
5
|
// src/validators.ts
|
|
6
|
+
function isVueComponent(value) {
|
|
7
|
+
return !!value && !!value.$el;
|
|
8
|
+
}
|
|
9
|
+
__name(isVueComponent, "isVueComponent");
|
|
6
10
|
function isUndef(v) {
|
|
7
11
|
return v === void 0 || v === null;
|
|
8
12
|
}
|
|
@@ -37,6 +41,7 @@ var isEqual = /* @__PURE__ */ __name((x, y) => {
|
|
|
37
41
|
}, "isEqual");
|
|
38
42
|
|
|
39
43
|
export {
|
|
44
|
+
isVueComponent,
|
|
40
45
|
isUndef,
|
|
41
46
|
isDef,
|
|
42
47
|
isEqual
|
package/dist/dom.d.mts
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* isElementVisible
|
|
3
|
-
* @param {
|
|
5
|
+
* @param {Element} domElement
|
|
4
6
|
* @returns {Boolean}
|
|
5
7
|
*/
|
|
6
8
|
declare function isElementVisible(domElement: Element): Promise<unknown>;
|
|
7
9
|
/**
|
|
8
10
|
* scrollToTarget
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
11
|
+
* @param {Element} target
|
|
12
|
+
* @param {Element} containerEl
|
|
13
|
+
* @param {string} position
|
|
11
14
|
*/
|
|
12
15
|
declare function scrollToTargetElement(target: Element, containerEl: Element, position?: 'top' | 'bottom'): void;
|
|
16
|
+
/**
|
|
17
|
+
* getElement
|
|
18
|
+
* @param {String} selector
|
|
19
|
+
* @param {Element} domain
|
|
20
|
+
* @returns {Element | null}
|
|
21
|
+
*/
|
|
22
|
+
declare function getElement(selector: string, domain?: Element): Element | null;
|
|
23
|
+
/**
|
|
24
|
+
* getNode
|
|
25
|
+
* @param {String} selector
|
|
26
|
+
* @returns {Element | null}
|
|
27
|
+
*/
|
|
28
|
+
declare function getNode(selector: string | ComponentPublicInstance): Element | null;
|
|
13
29
|
|
|
14
|
-
export { isElementVisible, scrollToTargetElement };
|
|
30
|
+
export { getElement, getNode, isElementVisible, scrollToTargetElement };
|
package/dist/dom.d.ts
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* isElementVisible
|
|
3
|
-
* @param {
|
|
5
|
+
* @param {Element} domElement
|
|
4
6
|
* @returns {Boolean}
|
|
5
7
|
*/
|
|
6
8
|
declare function isElementVisible(domElement: Element): Promise<unknown>;
|
|
7
9
|
/**
|
|
8
10
|
* scrollToTarget
|
|
9
|
-
* @param {
|
|
10
|
-
* @param {
|
|
11
|
+
* @param {Element} target
|
|
12
|
+
* @param {Element} containerEl
|
|
13
|
+
* @param {string} position
|
|
11
14
|
*/
|
|
12
15
|
declare function scrollToTargetElement(target: Element, containerEl: Element, position?: 'top' | 'bottom'): void;
|
|
16
|
+
/**
|
|
17
|
+
* getElement
|
|
18
|
+
* @param {String} selector
|
|
19
|
+
* @param {Element} domain
|
|
20
|
+
* @returns {Element | null}
|
|
21
|
+
*/
|
|
22
|
+
declare function getElement(selector: string, domain?: Element): Element | null;
|
|
23
|
+
/**
|
|
24
|
+
* getNode
|
|
25
|
+
* @param {String} selector
|
|
26
|
+
* @returns {Element | null}
|
|
27
|
+
*/
|
|
28
|
+
declare function getNode(selector: string | ComponentPublicInstance): Element | null;
|
|
13
29
|
|
|
14
|
-
export { isElementVisible, scrollToTargetElement };
|
|
30
|
+
export { getElement, getNode, isElementVisible, scrollToTargetElement };
|
package/dist/dom.js
CHANGED
|
@@ -21,10 +21,20 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/dom.ts
|
|
22
22
|
var dom_exports = {};
|
|
23
23
|
__export(dom_exports, {
|
|
24
|
+
getElement: () => getElement,
|
|
25
|
+
getNode: () => getNode,
|
|
24
26
|
isElementVisible: () => isElementVisible,
|
|
25
27
|
scrollToTargetElement: () => scrollToTargetElement
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(dom_exports);
|
|
30
|
+
|
|
31
|
+
// src/validators.ts
|
|
32
|
+
function isVueComponent(value) {
|
|
33
|
+
return !!value && !!value.$el;
|
|
34
|
+
}
|
|
35
|
+
__name(isVueComponent, "isVueComponent");
|
|
36
|
+
|
|
37
|
+
// src/dom.ts
|
|
28
38
|
function isElementVisible(domElement) {
|
|
29
39
|
return new Promise((resolve) => {
|
|
30
40
|
const o = new IntersectionObserver(([entry]) => {
|
|
@@ -46,8 +56,26 @@ function scrollToTargetElement(target, containerEl, position) {
|
|
|
46
56
|
}
|
|
47
57
|
}
|
|
48
58
|
__name(scrollToTargetElement, "scrollToTargetElement");
|
|
59
|
+
function getElement(selector, domain) {
|
|
60
|
+
if (domain) {
|
|
61
|
+
return domain.querySelector(selector);
|
|
62
|
+
} else {
|
|
63
|
+
return document.querySelector(selector);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
__name(getElement, "getElement");
|
|
67
|
+
function getNode(selector) {
|
|
68
|
+
if (typeof selector === "string") {
|
|
69
|
+
return getElement(selector);
|
|
70
|
+
} else {
|
|
71
|
+
return isVueComponent(selector) ? selector.$el : selector;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
__name(getNode, "getNode");
|
|
49
75
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
76
|
0 && (module.exports = {
|
|
77
|
+
getElement,
|
|
78
|
+
getNode,
|
|
51
79
|
isElementVisible,
|
|
52
80
|
scrollToTargetElement
|
|
53
81
|
});
|
package/dist/dom.mjs
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getElement,
|
|
3
|
+
getNode,
|
|
2
4
|
isElementVisible,
|
|
3
5
|
scrollToTargetElement
|
|
4
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MUK2XIES.mjs";
|
|
7
|
+
import "./chunk-RVQZSOON.mjs";
|
|
5
8
|
import "./chunk-QZ7VFGWC.mjs";
|
|
6
9
|
export {
|
|
10
|
+
getElement,
|
|
11
|
+
getNode,
|
|
7
12
|
isElementVisible,
|
|
8
13
|
scrollToTargetElement
|
|
9
14
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { usePerformanceObserver } from './performance.mjs';
|
|
2
|
-
export { isDef, isEqual, isUndef } from './validators.mjs';
|
|
2
|
+
export { isDef, isEqual, isUndef, isVueComponent } from './validators.mjs';
|
|
3
3
|
export { declareEmit, getUniqueId, useId } from './generators.mjs';
|
|
4
4
|
export { getChildren, isObject, objectFilter, objectFilterUndefined } from './object.mjs';
|
|
5
5
|
export { usePixelCreateContext } from './context.mjs';
|
|
6
|
-
export { isElementVisible, scrollToTargetElement } from './dom.mjs';
|
|
6
|
+
export { getElement, getNode, isElementVisible, scrollToTargetElement } from './dom.mjs';
|
|
7
7
|
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes } from './types.mjs';
|
|
8
8
|
export { groupBy } from './array.mjs';
|
|
9
9
|
export { onClickOutside, onKeyStroke, unrefElement, useInfiniteScroll, useIntersectionObserver, useStorage, useVirtualList } from '@vueuse/core';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { usePerformanceObserver } from './performance.js';
|
|
2
|
-
export { isDef, isEqual, isUndef } from './validators.js';
|
|
2
|
+
export { isDef, isEqual, isUndef, isVueComponent } from './validators.js';
|
|
3
3
|
export { declareEmit, getUniqueId, useId } from './generators.js';
|
|
4
4
|
export { getChildren, isObject, objectFilter, objectFilterUndefined } from './object.js';
|
|
5
5
|
export { usePixelCreateContext } from './context.js';
|
|
6
|
-
export { isElementVisible, scrollToTargetElement } from './dom.js';
|
|
6
|
+
export { getElement, getNode, isElementVisible, scrollToTargetElement } from './dom.js';
|
|
7
7
|
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes } from './types.js';
|
|
8
8
|
export { groupBy } from './array.js';
|
|
9
9
|
export { onClickOutside, onKeyStroke, unrefElement, useInfiniteScroll, useIntersectionObserver, useStorage, useVirtualList } from '@vueuse/core';
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,8 @@ var src_exports = {};
|
|
|
23
23
|
__export(src_exports, {
|
|
24
24
|
declareEmit: () => declareEmit,
|
|
25
25
|
getChildren: () => getChildren,
|
|
26
|
+
getElement: () => getElement,
|
|
27
|
+
getNode: () => getNode,
|
|
26
28
|
getUniqueId: () => getUniqueId,
|
|
27
29
|
groupBy: () => groupBy,
|
|
28
30
|
isDef: () => isDef,
|
|
@@ -30,6 +32,7 @@ __export(src_exports, {
|
|
|
30
32
|
isEqual: () => isEqual,
|
|
31
33
|
isObject: () => isObject,
|
|
32
34
|
isUndef: () => isUndef,
|
|
35
|
+
isVueComponent: () => isVueComponent,
|
|
33
36
|
objectFilter: () => objectFilter,
|
|
34
37
|
objectFilterUndefined: () => objectFilterUndefined,
|
|
35
38
|
onClickOutside: () => import_core.onClickOutside,
|
|
@@ -111,6 +114,10 @@ var usePerformanceObserver = /* @__PURE__ */ __name((label) => {
|
|
|
111
114
|
}, "usePerformanceObserver");
|
|
112
115
|
|
|
113
116
|
// src/validators.ts
|
|
117
|
+
function isVueComponent(value) {
|
|
118
|
+
return !!value && !!value.$el;
|
|
119
|
+
}
|
|
120
|
+
__name(isVueComponent, "isVueComponent");
|
|
114
121
|
function isUndef(v) {
|
|
115
122
|
return v === void 0 || v === null;
|
|
116
123
|
}
|
|
@@ -222,6 +229,22 @@ function scrollToTargetElement(target, containerEl, position) {
|
|
|
222
229
|
}
|
|
223
230
|
}
|
|
224
231
|
__name(scrollToTargetElement, "scrollToTargetElement");
|
|
232
|
+
function getElement(selector, domain) {
|
|
233
|
+
if (domain) {
|
|
234
|
+
return domain.querySelector(selector);
|
|
235
|
+
} else {
|
|
236
|
+
return document.querySelector(selector);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
__name(getElement, "getElement");
|
|
240
|
+
function getNode(selector) {
|
|
241
|
+
if (typeof selector === "string") {
|
|
242
|
+
return getElement(selector);
|
|
243
|
+
} else {
|
|
244
|
+
return isVueComponent(selector) ? selector.$el : selector;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
__name(getNode, "getNode");
|
|
225
248
|
|
|
226
249
|
// src/array.ts
|
|
227
250
|
function groupBy(arr, key) {
|
|
@@ -240,6 +263,8 @@ var import_core = require("@vueuse/core");
|
|
|
240
263
|
0 && (module.exports = {
|
|
241
264
|
declareEmit,
|
|
242
265
|
getChildren,
|
|
266
|
+
getElement,
|
|
267
|
+
getNode,
|
|
243
268
|
getUniqueId,
|
|
244
269
|
groupBy,
|
|
245
270
|
isDef,
|
|
@@ -247,6 +272,7 @@ var import_core = require("@vueuse/core");
|
|
|
247
272
|
isEqual,
|
|
248
273
|
isObject,
|
|
249
274
|
isUndef,
|
|
275
|
+
isVueComponent,
|
|
250
276
|
objectFilter,
|
|
251
277
|
objectFilterUndefined,
|
|
252
278
|
onClickOutside,
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isDef,
|
|
3
|
-
isEqual,
|
|
4
|
-
isUndef
|
|
5
|
-
} from "./chunk-2UGMOMBN.mjs";
|
|
6
1
|
import {
|
|
7
2
|
groupBy
|
|
8
3
|
} from "./chunk-555RL46T.mjs";
|
|
@@ -10,9 +5,17 @@ import {
|
|
|
10
5
|
usePixelCreateContext
|
|
11
6
|
} from "./chunk-HXLTBFWE.mjs";
|
|
12
7
|
import {
|
|
8
|
+
getElement,
|
|
9
|
+
getNode,
|
|
13
10
|
isElementVisible,
|
|
14
11
|
scrollToTargetElement
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MUK2XIES.mjs";
|
|
13
|
+
import {
|
|
14
|
+
isDef,
|
|
15
|
+
isEqual,
|
|
16
|
+
isUndef,
|
|
17
|
+
isVueComponent
|
|
18
|
+
} from "./chunk-RVQZSOON.mjs";
|
|
16
19
|
import {
|
|
17
20
|
declareEmit,
|
|
18
21
|
getUniqueId,
|
|
@@ -35,6 +38,8 @@ import { onClickOutside, onKeyStroke, useInfiniteScroll, useVirtualList, useInte
|
|
|
35
38
|
export {
|
|
36
39
|
declareEmit,
|
|
37
40
|
getChildren,
|
|
41
|
+
getElement,
|
|
42
|
+
getNode,
|
|
38
43
|
getUniqueId,
|
|
39
44
|
groupBy,
|
|
40
45
|
isDef,
|
|
@@ -42,6 +47,7 @@ export {
|
|
|
42
47
|
isEqual,
|
|
43
48
|
isObject,
|
|
44
49
|
isUndef,
|
|
50
|
+
isVueComponent,
|
|
45
51
|
objectFilter,
|
|
46
52
|
objectFilterUndefined,
|
|
47
53
|
onClickOutside,
|
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/array.ts":{"bytes":479,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/context.ts":{"bytes":493,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/
|
|
1
|
+
{"inputs":{"src/array.ts":{"bytes":479,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/context.ts":{"bytes":493,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/validators.ts":{"bytes":1465,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/dom.ts":{"bytes":1738,"imports":[{"path":"src/validators.ts","kind":"import-statement","original":"./validators"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/generators.ts":{"bytes":778,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/performance.ts":{"bytes":2171,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/object.ts":{"bytes":918,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"./types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":773,"imports":[{"path":"vue","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":472,"imports":[{"path":"src/performance.ts","kind":"import-statement","original":"./performance"},{"path":"src/validators.ts","kind":"import-statement","original":"./validators"},{"path":"src/generators.ts","kind":"import-statement","original":"./generators"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/context.ts","kind":"import-statement","original":"./context"},{"path":"src/dom.ts","kind":"import-statement","original":"./dom"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"@vueuse/core","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/array.js":{"imports":[],"exports":[],"entryPoint":"src/array.ts","inputs":{"src/array.ts":{"bytesInOutput":377}},"bytes":1384},"dist/context.js":{"imports":[{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/context.ts","inputs":{"src/context.ts":{"bytesInOutput":579}},"bytes":1602},"dist/dom.js":{"imports":[],"exports":[],"entryPoint":"src/dom.ts","inputs":{"src/dom.ts":{"bytesInOutput":1381},"src/validators.ts":{"bytesInOutput":110}},"bytes":2592},"dist/generators.js":{"imports":[{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/generators.ts","inputs":{"src/generators.ts":{"bytesInOutput":953}},"bytes":1993},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@vueuse/core","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":1154},"src/performance.ts":{"bytesInOutput":1935},"src/validators.ts":{"bytesInOutput":990},"src/generators.ts":{"bytesInOutput":752},"src/object.ts":{"bytesInOutput":851},"src/context.ts":{"bytesInOutput":423},"src/dom.ts":{"bytesInOutput":1132},"src/array.ts":{"bytesInOutput":252}},"bytes":9055},"dist/object.js":{"imports":[{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/object.ts","inputs":{"src/object.ts":{"bytesInOutput":1103}},"bytes":2168},"dist/performance.js":{"imports":[{"path":"vue","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/performance.ts","inputs":{"src/performance.ts":{"bytesInOutput":2108}},"bytes":3136},"dist/types.js":{"imports":[],"exports":[],"entryPoint":"src/types.ts","inputs":{"src/types.ts":{"bytesInOutput":70}},"bytes":758},"dist/validators.js":{"imports":[],"exports":[],"entryPoint":"src/validators.ts","inputs":{"src/validators.ts":{"bytesInOutput":1218}},"bytes":2268}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/array.ts":{"bytes":479,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/context.ts":{"bytes":493,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/
|
|
1
|
+
{"inputs":{"src/array.ts":{"bytes":479,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/context.ts":{"bytes":493,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/validators.ts":{"bytes":1465,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/dom.ts":{"bytes":1738,"imports":[{"path":"src/validators.ts","kind":"import-statement","original":"./validators"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/generators.ts":{"bytes":778,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/performance.ts":{"bytes":2171,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/object.ts":{"bytes":918,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"./types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":773,"imports":[{"path":"vue","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":472,"imports":[{"path":"src/performance.ts","kind":"import-statement","original":"./performance"},{"path":"src/validators.ts","kind":"import-statement","original":"./validators"},{"path":"src/generators.ts","kind":"import-statement","original":"./generators"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/context.ts","kind":"import-statement","original":"./context"},{"path":"src/dom.ts","kind":"import-statement","original":"./dom"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"@vueuse/core","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/validators.mjs":{"imports":[{"path":"dist/chunk-RVQZSOON.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["isDef","isEqual","isUndef","isVueComponent"],"entryPoint":"src/validators.ts","inputs":{},"bytes":179},"dist/array.mjs":{"imports":[{"path":"dist/chunk-555RL46T.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["groupBy"],"entryPoint":"src/array.ts","inputs":{},"bytes":103},"dist/context.mjs":{"imports":[{"path":"dist/chunk-HXLTBFWE.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["usePixelCreateContext"],"entryPoint":"src/context.ts","inputs":{},"bytes":131},"dist/dom.mjs":{"imports":[{"path":"dist/chunk-MUK2XIES.mjs","kind":"import-statement"},{"path":"dist/chunk-RVQZSOON.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["getElement","getNode","isElementVisible","scrollToTargetElement"],"entryPoint":"src/dom.ts","inputs":{},"bytes":252},"dist/generators.mjs":{"imports":[{"path":"dist/chunk-TJIIVYQV.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["declareEmit","getUniqueId","useId"],"entryPoint":"src/generators.ts","inputs":{},"bytes":159},"dist/index.mjs":{"imports":[{"path":"dist/chunk-555RL46T.mjs","kind":"import-statement"},{"path":"dist/chunk-HXLTBFWE.mjs","kind":"import-statement"},{"path":"dist/chunk-MUK2XIES.mjs","kind":"import-statement"},{"path":"dist/chunk-RVQZSOON.mjs","kind":"import-statement"},{"path":"dist/chunk-TJIIVYQV.mjs","kind":"import-statement"},{"path":"dist/chunk-PLTSXP5P.mjs","kind":"import-statement"},{"path":"dist/chunk-65WDFMBW.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"dist/chunk-WBQAMGXK.mjs","kind":"import-statement"},{"path":"@vueuse/core","kind":"import-statement","external":true}],"exports":["declareEmit","getChildren","getElement","getNode","getUniqueId","groupBy","isDef","isElementVisible","isEqual","isObject","isUndef","isVueComponent","objectFilter","objectFilterUndefined","onClickOutside","onKeyStroke","scrollToTargetElement","unrefElement","useId","useInfiniteScroll","useIntersectionObserver","usePerformanceObserver","usePixelCreateContext","useStorage","useVirtualList"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":146}},"bytes":1214},"dist/chunk-555RL46T.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["groupBy"],"inputs":{"src/array.ts":{"bytesInOutput":252}},"bytes":341},"dist/chunk-HXLTBFWE.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true}],"exports":["usePixelCreateContext"],"inputs":{"src/context.ts":{"bytesInOutput":394}},"bytes":499},"dist/chunk-MUK2XIES.mjs":{"imports":[{"path":"dist/chunk-RVQZSOON.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["getElement","getNode","isElementVisible","scrollToTargetElement"],"inputs":{"src/dom.ts":{"bytesInOutput":1132}},"bytes":1335},"dist/chunk-RVQZSOON.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["isDef","isEqual","isUndef","isVueComponent"],"inputs":{"src/validators.ts":{"bytesInOutput":990}},"bytes":1122},"dist/chunk-TJIIVYQV.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true}],"exports":["declareEmit","getUniqueId","useId"],"inputs":{"src/generators.ts":{"bytesInOutput":721}},"bytes":843},"dist/object.mjs":{"imports":[{"path":"dist/chunk-PLTSXP5P.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["getChildren","isObject","objectFilter","objectFilterUndefined"],"entryPoint":"src/object.ts","inputs":{},"bytes":217},"dist/chunk-PLTSXP5P.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true}],"exports":["getChildren","isObject","objectFilter","objectFilterUndefined"],"inputs":{"src/object.ts":{"bytesInOutput":831}},"bytes":978},"dist/performance.mjs":{"imports":[{"path":"dist/chunk-65WDFMBW.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["usePerformanceObserver"],"entryPoint":"src/performance.ts","inputs":{},"bytes":133},"dist/chunk-65WDFMBW.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true}],"exports":["usePerformanceObserver"],"inputs":{"src/performance.ts":{"bytesInOutput":1880}},"bytes":1990},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151},"dist/types.mjs":{"imports":[{"path":"dist/chunk-WBQAMGXK.mjs","kind":"import-statement"}],"exports":[],"entryPoint":"src/types.ts","inputs":{},"bytes":31},"dist/chunk-WBQAMGXK.mjs":{"imports":[],"exports":[],"inputs":{"src/types.ts":{"bytesInOutput":0}},"bytes":0}}}
|
package/dist/validators.d.mts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Check if element is Vue Component
|
|
5
|
+
* @param {ComponentPublicInstance} value
|
|
6
|
+
* @returns {Boolean}
|
|
7
|
+
*/
|
|
8
|
+
declare function isVueComponent(value: ComponentPublicInstance): boolean;
|
|
1
9
|
/**
|
|
2
10
|
* Checks if a value is undefined
|
|
3
11
|
* @param {*} v
|
|
@@ -12,4 +20,4 @@ declare function isUndef(v: unknown): boolean;
|
|
|
12
20
|
declare function isDef(v: unknown): boolean;
|
|
13
21
|
declare const isEqual: <TType>(x: TType, y: TType) => boolean;
|
|
14
22
|
|
|
15
|
-
export { isDef, isEqual, isUndef };
|
|
23
|
+
export { isDef, isEqual, isUndef, isVueComponent };
|
package/dist/validators.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Check if element is Vue Component
|
|
5
|
+
* @param {ComponentPublicInstance} value
|
|
6
|
+
* @returns {Boolean}
|
|
7
|
+
*/
|
|
8
|
+
declare function isVueComponent(value: ComponentPublicInstance): boolean;
|
|
1
9
|
/**
|
|
2
10
|
* Checks if a value is undefined
|
|
3
11
|
* @param {*} v
|
|
@@ -12,4 +20,4 @@ declare function isUndef(v: unknown): boolean;
|
|
|
12
20
|
declare function isDef(v: unknown): boolean;
|
|
13
21
|
declare const isEqual: <TType>(x: TType, y: TType) => boolean;
|
|
14
22
|
|
|
15
|
-
export { isDef, isEqual, isUndef };
|
|
23
|
+
export { isDef, isEqual, isUndef, isVueComponent };
|
package/dist/validators.js
CHANGED
|
@@ -23,9 +23,14 @@ var validators_exports = {};
|
|
|
23
23
|
__export(validators_exports, {
|
|
24
24
|
isDef: () => isDef,
|
|
25
25
|
isEqual: () => isEqual,
|
|
26
|
-
isUndef: () => isUndef
|
|
26
|
+
isUndef: () => isUndef,
|
|
27
|
+
isVueComponent: () => isVueComponent
|
|
27
28
|
});
|
|
28
29
|
module.exports = __toCommonJS(validators_exports);
|
|
30
|
+
function isVueComponent(value) {
|
|
31
|
+
return !!value && !!value.$el;
|
|
32
|
+
}
|
|
33
|
+
__name(isVueComponent, "isVueComponent");
|
|
29
34
|
function isUndef(v) {
|
|
30
35
|
return v === void 0 || v === null;
|
|
31
36
|
}
|
|
@@ -62,5 +67,6 @@ var isEqual = /* @__PURE__ */ __name((x, y) => {
|
|
|
62
67
|
0 && (module.exports = {
|
|
63
68
|
isDef,
|
|
64
69
|
isEqual,
|
|
65
|
-
isUndef
|
|
70
|
+
isUndef,
|
|
71
|
+
isVueComponent
|
|
66
72
|
});
|
package/dist/validators.mjs
CHANGED