@zc-ui/utils 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 ZC UI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=typeof window<`u`&&typeof document<`u`;function t(e,t){return e.classList.contains(t)}function n(e,t){e.classList.add(...t.trim().split(/\s+/))}function r(e,t){e.classList.remove(...t.trim().split(/\s+/))}function i(e,t){e.classList.toggle(t)}function a(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function o(e,t,n,r){e.removeEventListener(t,n,r)}function s(e,t,n,r){let i=a=>{n(a),e.removeEventListener(t,i,r)};return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i,r)}function c(e,t=document){return t.querySelector(e)}function l(e,t=document){return Array.from(t.querySelectorAll(e))}function u(e,t){return e.matches(t)}function d(e,t){return e.closest(t)}function f(e,t){return e.contains(t)}function p(e,t){let n=e;return n.install=r=>{let i=t||e.name;i&&r.component(i,n)},n}function m(e){return{install(t){for(let[n,r]of Object.entries(e))t.component(n,r)}}}function h(e,t=2){return e.toFixed(t)}function g(e,t=2){return String(e).padStart(t,`0`)}function _(e){return e!=null}function v(e){return typeof e==`string`}function y(e){return typeof e==`number`&&!isNaN(e)}function b(e){return typeof e==`boolean`}function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function S(e){return typeof e==`function`}function C(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function w(){var t;return e&&(t=crypto)!=null&&t.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function T(e=`zc`){return`${e}-${Math.random().toString(36).slice(2,9)}`}function E(e,t,n){return Math.min(Math.max(e,t),n)}function D(e){return e==null?!0:v(e)||Array.isArray(e)?e.length===0:x(e)?Object.keys(e).length===0:!1}function O(...e){let t={};for(let n of e)if(n)for(let e of Object.keys(n)){let r=n[e],i=t[e];Array.isArray(r)?t[e]=[...r]:x(r)?t[e]=x(i)?O(i,r):{...r}:t[e]=r}return t}exports.addClass=n,exports.clamp=E,exports.closest=d,exports.contains=f,exports.deepMerge=O,exports.getType=C,exports.guid=w,exports.hasClass=t,exports.isBoolean=b,exports.isClient=e,exports.isDefined=_,exports.isEmpty=D,exports.isFunction=S,exports.isNumber=y,exports.isObject=x,exports.isString=v,exports.matches=u,exports.off=o,exports.on=a,exports.once=s,exports.padZero=g,exports.querySelector=c,exports.querySelectorAll=l,exports.removeClass=r,exports.toFixed=h,exports.toggleClass=i,exports.uniqueId=T,exports.withInstall=p,exports.withInstallAll=m;
package/dist/index.mjs ADDED
@@ -0,0 +1,112 @@
1
+ //#region src/dom.ts
2
+ var e = typeof window < "u" && typeof document < "u";
3
+ function t(e, t) {
4
+ return e.classList.contains(t);
5
+ }
6
+ function n(e, t) {
7
+ e.classList.add(...t.trim().split(/\s+/));
8
+ }
9
+ function r(e, t) {
10
+ e.classList.remove(...t.trim().split(/\s+/));
11
+ }
12
+ function i(e, t) {
13
+ e.classList.toggle(t);
14
+ }
15
+ function a(e, t, n, r) {
16
+ return e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r);
17
+ }
18
+ function o(e, t, n, r) {
19
+ e.removeEventListener(t, n, r);
20
+ }
21
+ function s(e, t, n, r) {
22
+ let i = (a) => {
23
+ n(a), e.removeEventListener(t, i, r);
24
+ };
25
+ return e.addEventListener(t, i, r), () => e.removeEventListener(t, i, r);
26
+ }
27
+ function c(e, t = document) {
28
+ return t.querySelector(e);
29
+ }
30
+ function l(e, t = document) {
31
+ return Array.from(t.querySelectorAll(e));
32
+ }
33
+ function u(e, t) {
34
+ return e.matches(t);
35
+ }
36
+ function d(e, t) {
37
+ return e.closest(t);
38
+ }
39
+ function f(e, t) {
40
+ return e.contains(t);
41
+ }
42
+ //#endregion
43
+ //#region src/install.ts
44
+ function p(e, t) {
45
+ let n = e;
46
+ return n.install = (r) => {
47
+ let i = t || e.name;
48
+ i && r.component(i, n);
49
+ }, n;
50
+ }
51
+ function m(e) {
52
+ return { install(t) {
53
+ for (let [n, r] of Object.entries(e)) t.component(n, r);
54
+ } };
55
+ }
56
+ //#endregion
57
+ //#region src/format.ts
58
+ function h(e, t = 2) {
59
+ return e.toFixed(t);
60
+ }
61
+ function g(e, t = 2) {
62
+ return String(e).padStart(t, "0");
63
+ }
64
+ //#endregion
65
+ //#region src/index.ts
66
+ function _(e) {
67
+ return e != null;
68
+ }
69
+ function v(e) {
70
+ return typeof e == "string";
71
+ }
72
+ function y(e) {
73
+ return typeof e == "number" && !isNaN(e);
74
+ }
75
+ function b(e) {
76
+ return typeof e == "boolean";
77
+ }
78
+ function x(e) {
79
+ return typeof e == "object" && !!e && !Array.isArray(e);
80
+ }
81
+ function S(e) {
82
+ return typeof e == "function";
83
+ }
84
+ function C(e) {
85
+ return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
86
+ }
87
+ function w() {
88
+ var t;
89
+ return e && (t = crypto) != null && t.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
90
+ let t = Math.random() * 16 | 0;
91
+ return (e === "x" ? t : t & 3 | 8).toString(16);
92
+ });
93
+ }
94
+ function T(e = "zc") {
95
+ return `${e}-${Math.random().toString(36).slice(2, 9)}`;
96
+ }
97
+ function E(e, t, n) {
98
+ return Math.min(Math.max(e, t), n);
99
+ }
100
+ function D(e) {
101
+ return e == null ? !0 : v(e) || Array.isArray(e) ? e.length === 0 : x(e) ? Object.keys(e).length === 0 : !1;
102
+ }
103
+ function O(...e) {
104
+ let t = {};
105
+ for (let n of e) if (n) for (let e of Object.keys(n)) {
106
+ let r = n[e], i = t[e];
107
+ Array.isArray(r) ? t[e] = [...r] : x(r) ? t[e] = x(i) ? O(i, r) : { ...r } : t[e] = r;
108
+ }
109
+ return t;
110
+ }
111
+ //#endregion
112
+ export { n as addClass, E as clamp, d as closest, f as contains, O as deepMerge, C as getType, w as guid, t as hasClass, b as isBoolean, e as isClient, _ as isDefined, D as isEmpty, S as isFunction, y as isNumber, x as isObject, v as isString, u as matches, o as off, a as on, s as once, g as padZero, c as querySelector, l as querySelectorAll, r as removeClass, h as toFixed, i as toggleClass, T as uniqueId, p as withInstall, m as withInstallAll };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * DOM utility functions
3
+ */
4
+ /**
5
+ * Check if running in a browser environment.
6
+ * Both `window` and `document` must be available to avoid false positives
7
+ * in environments like Electron renderer without DOM access.
8
+ */
9
+ export declare const isClient: boolean;
10
+ /**
11
+ * Check if element has a CSS class.
12
+ */
13
+ export declare function hasClass(el: HTMLElement, cls: string): boolean;
14
+ /**
15
+ * Add a CSS class (or multiple space-separated classes) to element.
16
+ */
17
+ export declare function addClass(el: HTMLElement, cls: string): void;
18
+ /**
19
+ * Remove a CSS class (or multiple space-separated classes) from element.
20
+ */
21
+ export declare function removeClass(el: HTMLElement, cls: string): void;
22
+ /**
23
+ * Toggle a CSS class on element.
24
+ */
25
+ export declare function toggleClass(el: HTMLElement, cls: string): void;
26
+ /**
27
+ * Type alias for an event target that supports addEventListener.
28
+ */
29
+ export type EventTargetLike = HTMLElement | Window | Document;
30
+ /**
31
+ * Listener options that can be boolean or AddEventListenerOptions.
32
+ */
33
+ export type ListenerOptions = boolean | AddEventListenerOptions;
34
+ /**
35
+ * Add an event listener with optional options.
36
+ * Returns a cleanup function that removes the listener.
37
+ *
38
+ * @example
39
+ * const off = on(document, 'click', handler)
40
+ * off() // remove listener
41
+ */
42
+ export declare function on(target: EventTargetLike, event: string, handler: EventListenerOrEventListenerObject, options?: ListenerOptions): () => void;
43
+ /**
44
+ * Remove an event listener.
45
+ */
46
+ export declare function off(target: EventTargetLike, event: string, handler: EventListenerOrEventListenerObject, options?: ListenerOptions): void;
47
+ /**
48
+ * Add a one-time event listener that auto-removes after first trigger.
49
+ *
50
+ * @example
51
+ * once(element, 'transitionend', handler)
52
+ */
53
+ export declare function once(target: EventTargetLike, event: string, handler: EventListener, options?: ListenerOptions): () => void;
54
+ /**
55
+ * Query a single element by selector (shorthand for querySelector).
56
+ */
57
+ export declare function querySelector<T extends HTMLElement = HTMLElement>(selector: string, parent?: ParentNode): T | null;
58
+ /**
59
+ * Query all matching elements by selector.
60
+ */
61
+ export declare function querySelectorAll<T extends HTMLElement = HTMLElement>(selector: string, parent?: ParentNode): T[];
62
+ /**
63
+ * Check if an element matches a CSS selector.
64
+ */
65
+ export declare function matches(el: HTMLElement, selector: string): boolean;
66
+ /**
67
+ * Get the closest ancestor matching a selector, or null.
68
+ */
69
+ export declare function closest(el: HTMLElement, selector: string): HTMLElement | null;
70
+ /**
71
+ * Check if an element contains another element (or is the same).
72
+ */
73
+ export declare function contains(parent: Node, child: Node): boolean;
74
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/dom.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,eAAO,MAAM,QAAQ,SAAmE,CAAA;AAExF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9D;AAMD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAA;AAE7D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,uBAAuB,CAAA;AAE/D;;;;;;;GAOG;AACH,wBAAgB,EAAE,CAChB,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,IAAI,CAGZ;AAED;;GAEG;AACH,wBAAgB,GAAG,CACjB,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,eAAe,GACxB,IAAI,CAEN;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAClB,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,IAAI,CAOZ;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC/D,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,UAAqB,GAC5B,CAAC,GAAG,IAAI,CAEV;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAClE,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,UAAqB,GAC5B,CAAC,EAAE,CAEL;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAE7E;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,OAAO,CAE3D"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Formatting utility functions
3
+ */
4
+ /**
5
+ * Format a number to a fixed number of decimal places
6
+ */
7
+ export declare function toFixed(val: number, decimals?: number): string;
8
+ /**
9
+ * Pad a number with leading zeros
10
+ */
11
+ export declare function padZero(val: number | string, length?: number): string;
12
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,SAAI,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,SAAI,GAAG,MAAM,CAEhE"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Check if value is defined (not null and not undefined).
3
+ */
4
+ export declare function isDefined<T>(val: T | undefined | null): val is T;
5
+ /**
6
+ * Check if value is a string.
7
+ */
8
+ export declare function isString(val: unknown): val is string;
9
+ /**
10
+ * Check if value is a number.
11
+ */
12
+ export declare function isNumber(val: unknown): val is number;
13
+ /**
14
+ * Check if value is a boolean.
15
+ */
16
+ export declare function isBoolean(val: unknown): val is boolean;
17
+ /**
18
+ * Check if value is an object (not null, not array).
19
+ */
20
+ export declare function isObject(val: unknown): val is Record<string, unknown>;
21
+ /**
22
+ * Check if value is a function.
23
+ */
24
+ export declare function isFunction(val: unknown): val is (...args: unknown[]) => unknown;
25
+ /**
26
+ * Get the runtime type of a value as a lowercase string.
27
+ * Returns precise type names: 'null', 'array', 'date', 'regexp', 'promise', etc.
28
+ *
29
+ * @example
30
+ * getType(null) // 'null'
31
+ * getType([]) // 'array'
32
+ * getType(new Date()) // 'date'
33
+ * getType(123) // 'number'
34
+ */
35
+ export declare function getType(val: unknown): string;
36
+ /**
37
+ * Generate a RFC-4122 v4 compliant unique ID (GUID).
38
+ * Falls back to a Math.random-based ID in non-crypto environments.
39
+ *
40
+ * @example
41
+ * guid() // 'f47ac10b-58cc-4372-a567-0e02b2c3d479'
42
+ */
43
+ export declare function guid(): string;
44
+ /**
45
+ * Generate a short unique ID with optional prefix.
46
+ * Suitable for DOM element IDs and internal references.
47
+ *
48
+ * @example
49
+ * uniqueId() // 'zc-j3kf9x2'
50
+ * uniqueId('el') // 'el-j3kf9x2'
51
+ */
52
+ export declare function uniqueId(prefix?: string): string;
53
+ /**
54
+ * Clamp a number between min and max.
55
+ */
56
+ export declare function clamp(val: number, min: number, max: number): number;
57
+ /**
58
+ * Check if value is an empty string, null, undefined, empty array, or empty object.
59
+ */
60
+ export declare function isEmpty(val: unknown): boolean;
61
+ /**
62
+ * Deep-merge two or more objects. Later sources take precedence.
63
+ */
64
+ export declare function deepMerge(...sources: Array<Record<string, unknown> | undefined | null>): Record<string, unknown>;
65
+ export * from './dom';
66
+ export * from './install';
67
+ export * from './format';
68
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,GAAG,IAAI,GAAG,GAAG,IAAI,CAAC,CAEhE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO,CAEtD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAErE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAE/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAI5C;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,IAAI,MAAM,CAU7B;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,SAAO,GAAG,MAAM,CAE9C;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAK7C;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,GAAG,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GAC5D,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBzB;AAGD,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { Plugin, Component } from 'vue';
2
+ /**
3
+ * Augment a Vue component with an `install` method so it can be registered
4
+ * via `app.use(Component)` or used individually with tree-shaking.
5
+ *
6
+ * The returned component is typed as the original component intersected with
7
+ * `Plugin`, ensuring both the component itself and the `install` method are
8
+ * accessible.
9
+ *
10
+ * @example
11
+ * import Button from './button.vue'
12
+ * export const ZcButton = withInstall(Button, 'ZcButton')
13
+ *
14
+ * // In app entry:
15
+ * app.use(ZcButton) // registers <ZcButton> globally
16
+ *
17
+ * // Or import individually:
18
+ * import { ZcButton } from '@zc-ui/components'
19
+ */
20
+ export declare function withInstall<T extends Component>(component: T, name?: string): T & Plugin;
21
+ /**
22
+ * Create a single plugin that installs multiple components at once.
23
+ *
24
+ * @example
25
+ * export default withInstallAll({ ZcButton, ZcInput })
26
+ */
27
+ export declare function withInstallAll(components: Record<string, Component & Plugin>): Plugin;
28
+ //# sourceMappingURL=install.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAO,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,MAAM,CAWxF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,GAAG,MAAM,CAQrF"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@zc-ui/utils",
3
+ "version": "0.0.1",
4
+ "description": "ZC UI common utilities",
5
+ "license": "MIT",
6
+ "author": "ZC UI Team",
7
+ "homepage": "https://zc-ui.github.io/zc-ui",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/zc-ui/zc-ui.git",
11
+ "directory": "packages/utils"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/zc-ui/zc-ui/issues"
15
+ },
16
+ "keywords": [
17
+ "vue",
18
+ "ui",
19
+ "utils",
20
+ "utilities",
21
+ "zc-ui"
22
+ ],
23
+ "type": "module",
24
+ "main": "./dist/index.cjs",
25
+ "module": "./dist/index.mjs",
26
+ "types": "./dist/types/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/types/index.d.ts",
30
+ "import": "./dist/index.mjs",
31
+ "require": "./dist/index.cjs"
32
+ }
33
+ },
34
+ "publishConfig": {
35
+ "access": "public",
36
+ "registry": "https://registry.npmjs.org"
37
+ },
38
+ "files": [
39
+ "dist"
40
+ ],
41
+ "sideEffects": false,
42
+ "devDependencies": {
43
+ "vue": "^3.4.0"
44
+ },
45
+ "scripts": {
46
+ "build": "vite build",
47
+ "typecheck": "vue-tsc --noEmit -p tsconfig.json"
48
+ }
49
+ }