@mekari/pixel3-utils 0.0.1-alpha.0 → 0.0.2
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-P3Q2WHZW.mjs +13 -0
- 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 +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +41 -0
- package/dist/index.mjs +21 -8
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/types.d.mts +12 -1
- package/dist/types.d.ts +12 -1
- package/dist/types.js +16 -0
- package/dist/types.mjs +7 -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 +6 -5
- package/dist/chunk-WBQAMGXK.mjs +0 -0
|
@@ -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,10 +1,11 @@
|
|
|
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';
|
|
7
|
-
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes } from './types.mjs';
|
|
6
|
+
export { getElement, getNode, isElementVisible, scrollToTargetElement } from './dom.mjs';
|
|
7
|
+
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes, PropsTable, definePropsTable } from './types.mjs';
|
|
8
8
|
export { groupBy } from './array.mjs';
|
|
9
|
-
export { onClickOutside, onKeyStroke, unrefElement, useInfiniteScroll, useIntersectionObserver, useStorage, useVirtualList } from '@vueuse/core';
|
|
9
|
+
export { onClickOutside, onKeyStroke, unrefElement, useInfiniteScroll, useIntersectionObserver, useScrollLock, useStorage, useStyleTag, useVirtualList } from '@vueuse/core';
|
|
10
|
+
export { useFocusTrap } from '@vueuse/integrations/useFocusTrap';
|
|
10
11
|
import 'vue';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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';
|
|
7
|
-
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes } from './types.js';
|
|
6
|
+
export { getElement, getNode, isElementVisible, scrollToTargetElement } from './dom.js';
|
|
7
|
+
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes, PropsTable, definePropsTable } from './types.js';
|
|
8
8
|
export { groupBy } from './array.js';
|
|
9
|
-
export { onClickOutside, onKeyStroke, unrefElement, useInfiniteScroll, useIntersectionObserver, useStorage, useVirtualList } from '@vueuse/core';
|
|
9
|
+
export { onClickOutside, onKeyStroke, unrefElement, useInfiniteScroll, useIntersectionObserver, useScrollLock, useStorage, useStyleTag, useVirtualList } from '@vueuse/core';
|
|
10
|
+
export { useFocusTrap } from '@vueuse/integrations/useFocusTrap';
|
|
10
11
|
import 'vue';
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var src_exports = {};
|
|
23
23
|
__export(src_exports, {
|
|
24
24
|
declareEmit: () => declareEmit,
|
|
25
|
+
definePropsTable: () => definePropsTable,
|
|
25
26
|
getChildren: () => getChildren,
|
|
27
|
+
getElement: () => getElement,
|
|
28
|
+
getNode: () => getNode,
|
|
26
29
|
getUniqueId: () => getUniqueId,
|
|
27
30
|
groupBy: () => groupBy,
|
|
28
31
|
isDef: () => isDef,
|
|
@@ -30,18 +33,22 @@ __export(src_exports, {
|
|
|
30
33
|
isEqual: () => isEqual,
|
|
31
34
|
isObject: () => isObject,
|
|
32
35
|
isUndef: () => isUndef,
|
|
36
|
+
isVueComponent: () => isVueComponent,
|
|
33
37
|
objectFilter: () => objectFilter,
|
|
34
38
|
objectFilterUndefined: () => objectFilterUndefined,
|
|
35
39
|
onClickOutside: () => import_core.onClickOutside,
|
|
36
40
|
onKeyStroke: () => import_core.onKeyStroke,
|
|
37
41
|
scrollToTargetElement: () => scrollToTargetElement,
|
|
38
42
|
unrefElement: () => import_core.unrefElement,
|
|
43
|
+
useFocusTrap: () => import_useFocusTrap.useFocusTrap,
|
|
39
44
|
useId: () => useId,
|
|
40
45
|
useInfiniteScroll: () => import_core.useInfiniteScroll,
|
|
41
46
|
useIntersectionObserver: () => import_core.useIntersectionObserver,
|
|
42
47
|
usePerformanceObserver: () => usePerformanceObserver,
|
|
43
48
|
usePixelCreateContext: () => usePixelCreateContext,
|
|
49
|
+
useScrollLock: () => import_core.useScrollLock,
|
|
44
50
|
useStorage: () => import_core.useStorage,
|
|
51
|
+
useStyleTag: () => import_core.useStyleTag,
|
|
45
52
|
useVirtualList: () => import_core.useVirtualList
|
|
46
53
|
});
|
|
47
54
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -111,6 +118,10 @@ var usePerformanceObserver = /* @__PURE__ */ __name((label) => {
|
|
|
111
118
|
}, "usePerformanceObserver");
|
|
112
119
|
|
|
113
120
|
// src/validators.ts
|
|
121
|
+
function isVueComponent(value) {
|
|
122
|
+
return !!value && !!value.$el;
|
|
123
|
+
}
|
|
124
|
+
__name(isVueComponent, "isVueComponent");
|
|
114
125
|
function isUndef(v) {
|
|
115
126
|
return v === void 0 || v === null;
|
|
116
127
|
}
|
|
@@ -222,6 +233,28 @@ function scrollToTargetElement(target, containerEl, position) {
|
|
|
222
233
|
}
|
|
223
234
|
}
|
|
224
235
|
__name(scrollToTargetElement, "scrollToTargetElement");
|
|
236
|
+
function getElement(selector, domain) {
|
|
237
|
+
if (domain) {
|
|
238
|
+
return domain.querySelector(selector);
|
|
239
|
+
} else {
|
|
240
|
+
return document.querySelector(selector);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
__name(getElement, "getElement");
|
|
244
|
+
function getNode(selector) {
|
|
245
|
+
if (typeof selector === "string") {
|
|
246
|
+
return getElement(selector);
|
|
247
|
+
} else {
|
|
248
|
+
return isVueComponent(selector) ? selector.$el : selector;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
__name(getNode, "getNode");
|
|
252
|
+
|
|
253
|
+
// src/types.ts
|
|
254
|
+
function definePropsTable(value) {
|
|
255
|
+
return value;
|
|
256
|
+
}
|
|
257
|
+
__name(definePropsTable, "definePropsTable");
|
|
225
258
|
|
|
226
259
|
// src/array.ts
|
|
227
260
|
function groupBy(arr, key) {
|
|
@@ -236,10 +269,14 @@ __name(groupBy, "groupBy");
|
|
|
236
269
|
|
|
237
270
|
// src/index.ts
|
|
238
271
|
var import_core = require("@vueuse/core");
|
|
272
|
+
var import_useFocusTrap = require("@vueuse/integrations/useFocusTrap");
|
|
239
273
|
// Annotate the CommonJS export names for ESM import in node:
|
|
240
274
|
0 && (module.exports = {
|
|
241
275
|
declareEmit,
|
|
276
|
+
definePropsTable,
|
|
242
277
|
getChildren,
|
|
278
|
+
getElement,
|
|
279
|
+
getNode,
|
|
243
280
|
getUniqueId,
|
|
244
281
|
groupBy,
|
|
245
282
|
isDef,
|
|
@@ -247,17 +284,21 @@ var import_core = require("@vueuse/core");
|
|
|
247
284
|
isEqual,
|
|
248
285
|
isObject,
|
|
249
286
|
isUndef,
|
|
287
|
+
isVueComponent,
|
|
250
288
|
objectFilter,
|
|
251
289
|
objectFilterUndefined,
|
|
252
290
|
onClickOutside,
|
|
253
291
|
onKeyStroke,
|
|
254
292
|
scrollToTargetElement,
|
|
255
293
|
unrefElement,
|
|
294
|
+
useFocusTrap,
|
|
256
295
|
useId,
|
|
257
296
|
useInfiniteScroll,
|
|
258
297
|
useIntersectionObserver,
|
|
259
298
|
usePerformanceObserver,
|
|
260
299
|
usePixelCreateContext,
|
|
300
|
+
useScrollLock,
|
|
261
301
|
useStorage,
|
|
302
|
+
useStyleTag,
|
|
262
303
|
useVirtualList
|
|
263
304
|
});
|
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,
|
|
@@ -27,14 +30,20 @@ import {
|
|
|
27
30
|
import {
|
|
28
31
|
usePerformanceObserver
|
|
29
32
|
} from "./chunk-65WDFMBW.mjs";
|
|
33
|
+
import {
|
|
34
|
+
definePropsTable
|
|
35
|
+
} from "./chunk-P3Q2WHZW.mjs";
|
|
30
36
|
import "./chunk-QZ7VFGWC.mjs";
|
|
31
|
-
import "./chunk-WBQAMGXK.mjs";
|
|
32
37
|
|
|
33
38
|
// src/index.ts
|
|
34
|
-
import { onClickOutside, onKeyStroke, useInfiniteScroll, useVirtualList, useIntersectionObserver, unrefElement, useStorage } from "@vueuse/core";
|
|
39
|
+
import { onClickOutside, onKeyStroke, useInfiniteScroll, useVirtualList, useIntersectionObserver, unrefElement, useStorage, useStyleTag, useScrollLock } from "@vueuse/core";
|
|
40
|
+
import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
|
|
35
41
|
export {
|
|
36
42
|
declareEmit,
|
|
43
|
+
definePropsTable,
|
|
37
44
|
getChildren,
|
|
45
|
+
getElement,
|
|
46
|
+
getNode,
|
|
38
47
|
getUniqueId,
|
|
39
48
|
groupBy,
|
|
40
49
|
isDef,
|
|
@@ -42,17 +51,21 @@ export {
|
|
|
42
51
|
isEqual,
|
|
43
52
|
isObject,
|
|
44
53
|
isUndef,
|
|
54
|
+
isVueComponent,
|
|
45
55
|
objectFilter,
|
|
46
56
|
objectFilterUndefined,
|
|
47
57
|
onClickOutside,
|
|
48
58
|
onKeyStroke,
|
|
49
59
|
scrollToTargetElement,
|
|
50
60
|
unrefElement,
|
|
61
|
+
useFocusTrap,
|
|
51
62
|
useId,
|
|
52
63
|
useInfiniteScroll,
|
|
53
64
|
useIntersectionObserver,
|
|
54
65
|
usePerformanceObserver,
|
|
55
66
|
usePixelCreateContext,
|
|
67
|
+
useScrollLock,
|
|
56
68
|
useStorage,
|
|
69
|
+
useStyleTag,
|
|
57
70
|
useVirtualList
|
|
58
71
|
};
|
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":1084,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":566,"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},{"path":"@vueuse/integrations/useFocusTrap","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},{"path":"@vueuse/integrations/useFocusTrap","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":1422},"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/types.ts":{"bytesInOutput":99},"src/array.ts":{"bytesInOutput":252}},"bytes":9507},"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":242}},"bytes":1258},"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":1084,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":566,"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},{"path":"@vueuse/integrations/useFocusTrap","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-P3Q2WHZW.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"@vueuse/core","kind":"import-statement","external":true},{"path":"@vueuse/integrations/useFocusTrap","kind":"import-statement","external":true}],"exports":["declareEmit","definePropsTable","getChildren","getElement","getNode","getUniqueId","groupBy","isDef","isElementVisible","isEqual","isObject","isUndef","isVueComponent","objectFilter","objectFilterUndefined","onClickOutside","onKeyStroke","scrollToTargetElement","unrefElement","useFocusTrap","useId","useInfiniteScroll","useIntersectionObserver","usePerformanceObserver","usePixelCreateContext","useScrollLock","useStorage","useStyleTag","useVirtualList"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":240}},"bytes":1404},"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/types.mjs":{"imports":[{"path":"dist/chunk-P3Q2WHZW.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["definePropsTable"],"entryPoint":"src/types.ts","inputs":{},"bytes":121},"dist/chunk-P3Q2WHZW.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["definePropsTable"],"inputs":{"src/types.ts":{"bytesInOutput":99}},"bytes":197},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
|
package/dist/types.d.mts
CHANGED
|
@@ -13,5 +13,16 @@ type ComponentWithProps<P> = {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
interface PropsTable {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
types: string;
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
playground?: {
|
|
22
|
+
category: 'text' | 'dropdown' | 'boolean';
|
|
23
|
+
dropdownOptions?: string[] | number[] | boolean[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
declare function definePropsTable(value: PropsTable[]): PropsTable[];
|
|
16
27
|
|
|
17
|
-
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes };
|
|
28
|
+
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes, PropsTable, definePropsTable };
|
package/dist/types.d.ts
CHANGED
|
@@ -13,5 +13,16 @@ type ComponentWithProps<P> = {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
interface PropsTable {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
types: string;
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
playground?: {
|
|
22
|
+
category: 'text' | 'dropdown' | 'boolean';
|
|
23
|
+
dropdownOptions?: string[] | number[] | boolean[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
declare function definePropsTable(value: PropsTable[]): PropsTable[];
|
|
16
27
|
|
|
17
|
-
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes };
|
|
28
|
+
export { ComponentWithProps, Dict, FilterFn, Optional, PropTypes, PropsTable, definePropsTable };
|
package/dist/types.js
CHANGED
|
@@ -3,6 +3,11 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
6
11
|
var __copyProps = (to, from, except, desc) => {
|
|
7
12
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
13
|
for (let key of __getOwnPropNames(from))
|
|
@@ -15,4 +20,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
15
20
|
|
|
16
21
|
// src/types.ts
|
|
17
22
|
var types_exports = {};
|
|
23
|
+
__export(types_exports, {
|
|
24
|
+
definePropsTable: () => definePropsTable
|
|
25
|
+
});
|
|
18
26
|
module.exports = __toCommonJS(types_exports);
|
|
27
|
+
function definePropsTable(value) {
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
__name(definePropsTable, "definePropsTable");
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
definePropsTable
|
|
34
|
+
});
|
package/dist/types.mjs
CHANGED
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
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mekari/pixel3-utils",
|
|
3
3
|
"description": "Utils for mekari pixel 3",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@pandacss/dev": "0.
|
|
10
|
+
"@pandacss/dev": "0.24.1",
|
|
11
11
|
"@vueuse/core": "10.6.1",
|
|
12
|
+
"@vueuse/integrations": "^10.7.1",
|
|
12
13
|
"focus-trap": "^7.5.4"
|
|
13
14
|
},
|
|
14
15
|
"peerDependencies": {
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"access": "public"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"vue": "^3.3
|
|
22
|
+
"vue": "^3.4.3"
|
|
22
23
|
},
|
|
23
24
|
"module": "dist/index.mjs",
|
|
24
25
|
"types": "dist/index.d.ts",
|
|
@@ -34,9 +35,9 @@
|
|
|
34
35
|
"build": "tsup && pnpm build:types",
|
|
35
36
|
"build:fast": "tsup",
|
|
36
37
|
"types:check": "tsc --noEmit",
|
|
37
|
-
"replace-config": "clean-package",
|
|
38
|
-
"backup-config": "clean-package restore",
|
|
39
38
|
"build:types": "tsup src --dts-only",
|
|
39
|
+
"backup-config": "clean-package restore",
|
|
40
|
+
"replace-config": "clean-package",
|
|
40
41
|
"restore-config": "clean-package restore"
|
|
41
42
|
}
|
|
42
43
|
}
|
package/dist/chunk-WBQAMGXK.mjs
DELETED
|
File without changes
|