@ankhzet/ui 0.2.0 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ankhzet/ui
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Fix builds
8
+
3
9
  ## 0.2.0
4
10
 
5
11
  ### Minor Changes
@@ -0,0 +1,80 @@
1
+ import { Argument } from 'classnames';
2
+ import { CSSProperties } from 'react';
3
+ import { MouseEvent as MouseEvent_2 } from 'react';
4
+ import { RefObject } from 'react';
5
+ import { SyntheticEvent } from 'react';
6
+ import { TouchEvent as TouchEvent_2 } from 'react';
7
+
8
+ /** @public */
9
+ export declare const cls: <T extends {
10
+ className?: string;
11
+ }, C extends Argument>(className: C, props: T) => T & {
12
+ className: string;
13
+ };
14
+
15
+ declare type DragState = {
16
+ isDragging: boolean;
17
+ move: boolean;
18
+ down: boolean;
19
+ up: boolean;
20
+ context: boolean;
21
+ origin: Pos;
22
+ offset: Pos;
23
+ pos: Pos;
24
+ e?: MouseEvent;
25
+ };
26
+
27
+ declare type Getter<V> = () => V;
28
+
29
+ /** @public */
30
+ export declare const handleAsNoop: (e?: Event | SyntheticEvent<unknown>) => boolean;
31
+
32
+ /** @public */
33
+ export declare const minifyCss: (css: string) => string;
34
+
35
+ declare type MutableRef<T> = RefObject<T | null | undefined> | ((instance: T | null | undefined) => void) | ((instance: T) => void);
36
+
37
+ declare type Pos = {
38
+ x: number;
39
+ y: number;
40
+ };
41
+
42
+ export declare const Styles: {
43
+ of<T extends Record<string, CSSProperties>>(styles: T): T;
44
+ };
45
+
46
+ /** @public */
47
+ export declare const useCombinedRefs: <T>(...refs: MutableRef<T>[]) => (current: T | null) => void;
48
+
49
+ /**
50
+ * @param {(function (DragState): void)|null} [onUpdate] Update callback
51
+ * @param {string} [dataElement] Drag element data attribute
52
+ * @returns *
53
+ */
54
+ export declare const useDrag: <E extends HTMLElement>(onUpdate?: ((drag: DragState) => void) | null, dataElement?: string) => {
55
+ bind: {
56
+ 'data-element': string;
57
+ ref: RefObject<E | null>;
58
+ onMouseDown: (e: MouseEvent | TouchEvent | MouseEvent_2 | TouchEvent_2) => void;
59
+ };
60
+ isDragging: boolean;
61
+ move: boolean;
62
+ down: boolean;
63
+ up: boolean;
64
+ context: boolean;
65
+ origin: Pos;
66
+ offset: Pos;
67
+ pos: Pos;
68
+ e?: MouseEvent;
69
+ };
70
+
71
+ /** @public */
72
+ export declare const useLastCallback: <T extends (...args: any[]) => any>(fn: T) => T;
73
+
74
+ /** @public */
75
+ export declare function useSyncStore<Snapshot, Selection>(subscribe: (cb: () => void) => () => void, getSnapshot: Getter<Snapshot>, getServerSnapshot: void | null | undefined | Getter<Snapshot>, selector: (shapshot: Snapshot) => Selection, isEqual: (a: any, b: any) => boolean): Selection;
76
+
77
+
78
+ export * from "@react-hookz/web";
79
+
80
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,144 @@
1
+ import { useCallback as e, useDebugValue as t, useEffect as n, useMemo as r, useRef as i, useState as a, useSyncExternalStore as o } from "react";
2
+ import s from "classnames";
3
+ export * from "@react-hookz/web";
4
+ //#region \0rolldown/runtime.js
5
+ var c = (e) => {
6
+ let t = i(null), n = i(e);
7
+ return n.current = e, t.current ||= ((...e) => n.current(...e)), t.current;
8
+ }, l = (e, t) => {
9
+ let { clientX: n, clientY: r } = "changedTouches" in e && e.changedTouches[0] || e, i = t?.offsetLeft || 0, a = t?.offsetTop || 0;
10
+ return {
11
+ x: n + window.scrollX - i,
12
+ y: r + window.scrollY - a
13
+ };
14
+ }, u = (e = null, t = "drag-area") => {
15
+ let [r, o] = a({
16
+ isDragging: !1,
17
+ move: !1,
18
+ down: !1,
19
+ up: !1,
20
+ context: !1,
21
+ origin: {
22
+ x: 0,
23
+ y: 0
24
+ },
25
+ offset: {
26
+ x: 0,
27
+ y: 0
28
+ },
29
+ pos: {
30
+ x: 0,
31
+ y: 0
32
+ }
33
+ }), s = i(null), u = i(r), d = i(e);
34
+ d.current = e, u.current = r;
35
+ let f = c((e) => {
36
+ let n = s.current, r = e.currentTarget;
37
+ for (; !(r.dataset && r.dataset.element === t);) if (r.parentNode) r = r.parentNode;
38
+ else return;
39
+ let i = l(e, n), a = (e.buttons & 2) == 2;
40
+ a && (e.stopPropagation(), e.preventDefault()), o({
41
+ isDragging: !a,
42
+ move: !1,
43
+ down: !0,
44
+ up: !1,
45
+ context: a,
46
+ origin: i,
47
+ offset: {
48
+ x: 0,
49
+ y: 0
50
+ },
51
+ pos: i,
52
+ e
53
+ });
54
+ }), p = c((e) => {
55
+ o((t) => ({
56
+ ...t,
57
+ isDragging: !1,
58
+ offset: {
59
+ x: 0,
60
+ y: 0
61
+ },
62
+ move: !1,
63
+ down: !1,
64
+ up: !0,
65
+ context: !1,
66
+ e
67
+ }));
68
+ }), m = c((e) => {
69
+ let { isDragging: t, origin: n, offset: r } = u.current, i = l(e, s.current);
70
+ if (t) {
71
+ let e = i.x - n.x, t = i.y - n.y;
72
+ (r.x !== e || r.y !== t) && o((n) => ({
73
+ ...n,
74
+ offset: {
75
+ x: e,
76
+ y: t
77
+ },
78
+ pos: i,
79
+ move: !0,
80
+ down: !1,
81
+ up: !1,
82
+ context: !1
83
+ }));
84
+ } else o((e) => ({
85
+ ...e,
86
+ origin: i,
87
+ pos: i,
88
+ move: !0,
89
+ down: !1,
90
+ up: !1,
91
+ context: !1
92
+ }));
93
+ });
94
+ return n(() => {
95
+ let e = s.current;
96
+ if (e) return e.addEventListener("touchstart", f, { passive: !1 }), e.addEventListener("mousemove", m), e.addEventListener("touchmove", m, { passive: !1 }), e.addEventListener("mouseup", p), e.addEventListener("touchend", p), () => {
97
+ e.removeEventListener("touchstart", f), e.removeEventListener("mousemove", m), e.removeEventListener("touchmove", m), e.removeEventListener("mouseup", p), e.removeEventListener("touchend", p);
98
+ };
99
+ }, [m, p]), n(() => {
100
+ d.current && d.current(r);
101
+ }, [r]), {
102
+ ...r,
103
+ bind: {
104
+ "data-element": t,
105
+ ref: s,
106
+ onMouseDown: f
107
+ }
108
+ };
109
+ }, d = (e, t) => {
110
+ t && (typeof t == "function" ? t(e) : t.current = e);
111
+ }, f = (...t) => e((e) => t.forEach((t) => t && d(e, t)), [t]), p = (e, t) => {
112
+ let n, r = !1;
113
+ return () => {
114
+ let i = t(), a;
115
+ if (e.hasValue) {
116
+ let t = e.value;
117
+ if (r && Object.is(n, i) || (a = e.selector(i), e.isEqual(t, a))) return t;
118
+ } else e.hasValue = !0, a = e.selector(i);
119
+ return n = i, e.value = a, r ||= !0, a;
120
+ };
121
+ };
122
+ function m(e, n, a, s, c) {
123
+ let l = i(null), u;
124
+ l.current ? (u = l.current, u.selector = s, u.isEqual = c) : l.current = u = {
125
+ hasValue: !1,
126
+ value: void 0,
127
+ selector: s,
128
+ isEqual: c
129
+ };
130
+ let [d, f] = r(() => [p(u, n), a ? p(u, a) : void 0], [n, a]), m = o(e, d, f);
131
+ return t(m), m;
132
+ }
133
+ //#endregion
134
+ //#region src/components/utils.ts
135
+ var h = (e) => e.replaceAll("\n", "").replace(/\s+([{;:}])/g, "$1").replace(/([{;:}])\s+/g, "$1").replace(/;}/g, "}"), g = (e, t) => ({
136
+ ...t,
137
+ className: s(e, t.className)
138
+ }), _ = (e) => (e?.stopPropagation?.(), e?.preventDefault?.(), !1), v = { of(e) {
139
+ return e;
140
+ } };
141
+ //#endregion
142
+ export { v as Styles, g as cls, _ as handleAsNoop, h as minifyCss, f as useCombinedRefs, u as useDrag, c as useLastCallback, m as useSyncStore };
143
+
144
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/hooks/useLastCallback.ts","../src/hooks/useDrag.ts","../src/hooks/useCombinedRefs.ts","../src/hooks/useSyncStore.ts","../src/components/utils.ts","../src/index.ts"],"sourcesContent":["import { useRef } from 'react';\n\n/** @public */\nexport const useLastCallback = <T extends (...args: any[]) => any>(fn: T): T => {\n const ref1 = useRef<T>(null);\n const ref2 = useRef<T>(fn);\n\n ref2.current = fn;\n\n if (!ref1.current) {\n ref1.current = ((...args) => ref2.current(...args)) as T;\n }\n\n return ref1.current as T;\n};\n","import type { MouseEvent as RMouseEvent, TouchEvent as RTouchEvent} from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport { useLastCallback } from './useLastCallback';\n\ntype Pos = { x: number; y: number };\ntype DragState = {\n isDragging: boolean;\n move: boolean;\n down: boolean;\n up: boolean;\n context: boolean;\n origin: Pos;\n offset: Pos;\n pos: Pos;\n e?: MouseEvent;\n};\n\nconst clientPos = (e: MouseEvent | TouchEvent | RMouseEvent | RTouchEvent, element?: HTMLElement | null): Pos => {\n const { clientX, clientY } = ('changedTouches' in e && e.changedTouches[0]!) || (e as MouseEvent);\n\n const offsetX = element?.offsetLeft || 0;\n const offsetY = element?.offsetTop || 0;\n\n return {\n x: clientX + window.scrollX - offsetX,\n y: clientY + window.scrollY - offsetY,\n };\n};\n\n/**\n * @param {(function (DragState): void)|null} [onUpdate] Update callback\n * @param {string} [dataElement] Drag element data attribute\n * @returns *\n */\nexport const useDrag = <E extends HTMLElement>(\n onUpdate: ((drag: DragState) => void) | null = null,\n dataElement: string = 'drag-area'\n) => {\n const [state, setState] = useState<DragState>({\n isDragging: false,\n move: false,\n down: false,\n up: false,\n context: false,\n origin: { x: 0, y: 0 },\n offset: { x: 0, y: 0 },\n pos: { x: 0, y: 0 },\n });\n const elementRef = useRef<E>(null);\n const stateRef = useRef(state);\n const updateRef = useRef<((drag: DragState) => void) | null>(onUpdate);\n\n updateRef.current = onUpdate;\n stateRef.current = state;\n\n const handleDown = useLastCallback((e: MouseEvent | TouchEvent | RMouseEvent | RTouchEvent) => {\n const element = elementRef.current!;\n let node = e.currentTarget as HTMLElement;\n\n while (!(node.dataset && node.dataset.element === dataElement)) {\n if (node.parentNode) {\n node = node.parentNode as HTMLElement;\n } else {\n return;\n }\n }\n\n const client = clientPos(e, element);\n const context = ((e as MouseEvent).buttons & 2) === 2;\n\n if (context) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n setState({\n isDragging: !context,\n move: false,\n down: true,\n up: false,\n context,\n origin: client,\n offset: { x: 0, y: 0 },\n pos: client,\n e: e as MouseEvent,\n });\n });\n const handleUp = useLastCallback((e: MouseEvent | TouchEvent | RMouseEvent | RTouchEvent) => {\n setState((state) => ({\n ...state,\n isDragging: false,\n offset: { x: 0, y: 0 },\n move: false,\n down: false,\n up: true,\n context: false,\n e: e as MouseEvent,\n }));\n });\n const handleMove = useLastCallback((e: MouseEvent | TouchEvent | RMouseEvent | RTouchEvent) => {\n const { isDragging, origin, offset } = stateRef.current;\n const client = clientPos(e, elementRef.current);\n\n if (isDragging) {\n const x = client.x - origin.x;\n const y = client.y - origin.y;\n\n if (offset.x !== x || offset.y !== y) {\n setState((state) => ({\n ...state,\n offset: { x, y },\n pos: client,\n move: true,\n down: false,\n up: false,\n context: false,\n }));\n }\n } else {\n setState((state) => ({\n ...state,\n origin: client,\n pos: client,\n move: true,\n down: false,\n up: false,\n context: false,\n }));\n }\n });\n\n useEffect(() => {\n const element = elementRef.current;\n\n if (!element) {\n return;\n }\n\n element.addEventListener('touchstart', handleDown, { passive: false });\n element.addEventListener('mousemove', handleMove);\n element.addEventListener('touchmove', handleMove, { passive: false });\n element.addEventListener('mouseup', handleUp);\n element.addEventListener('touchend', handleUp);\n\n return () => {\n element.removeEventListener('touchstart', handleDown);\n element.removeEventListener('mousemove', handleMove);\n element.removeEventListener('touchmove', handleMove);\n element.removeEventListener('mouseup', handleUp);\n element.removeEventListener('touchend', handleUp);\n };\n }, [handleMove, handleUp]);\n\n useEffect(() => {\n if (updateRef.current) {\n updateRef.current(state);\n }\n }, [state]);\n\n return {\n ...state,\n bind: {\n 'data-element': dataElement,\n ref: elementRef,\n onMouseDown: handleDown,\n },\n };\n};\n","import type { RefObject } from 'react';\nimport { useCallback } from 'react';\n\ntype MutableRef<T> =\n | RefObject<T | null | undefined>\n | ((instance: T | null | undefined) => void)\n | ((instance: T) => void);\nconst assignRef = <T>(current: T | null, target: MutableRef<T>) => {\n if (!target) {\n return;\n }\n\n if (typeof target === 'function') {\n target(current!);\n } else {\n target.current = current;\n }\n};\n\n/** @public */\nexport const useCombinedRefs = <T>(...refs: MutableRef<T>[]) =>\n useCallback((current: T | null) => refs.forEach((ref) => ref && assignRef(current, ref)), [refs]);\n","import { useDebugValue, useMemo, useRef, useSyncExternalStore } from 'react';\n\ntype Getter<V> = () => V;\ntype MemoInstance<Snapshot, Selection> = {\n selector: (shapshot: Snapshot) => Selection;\n isEqual: (a: any, b: any) => boolean;\n hasValue: boolean;\n value?: Selection;\n};\n\nconst memoSnapshot = <Snapshot, Selection>(\n instance: MemoInstance<Snapshot, Selection>,\n getter: Getter<Snapshot>\n): Getter<Selection> => {\n let memoizedSnapshot: Snapshot;\n let hasMemo = false;\n\n return (): Selection => {\n const snapshot = getter();\n let nextValue;\n\n if (instance.hasValue) {\n const prevValue = instance.value!;\n\n if (hasMemo && Object.is(memoizedSnapshot, snapshot)) {\n return prevValue;\n }\n\n nextValue = instance.selector(snapshot);\n\n if (instance.isEqual(prevValue, nextValue)) {\n return prevValue;\n }\n } else {\n instance.hasValue = true;\n nextValue = instance.selector(snapshot);\n }\n\n memoizedSnapshot = snapshot;\n instance.value = nextValue;\n\n if (!hasMemo) {\n hasMemo = true;\n }\n\n return nextValue;\n };\n};\n\n/** @public */\nexport function useSyncStore<Snapshot, Selection>(\n subscribe: (cb: () => void) => () => void,\n getSnapshot: Getter<Snapshot>,\n getServerSnapshot: void | null | undefined | Getter<Snapshot>,\n selector: (shapshot: Snapshot) => Selection,\n isEqual: (a: any, b: any) => boolean\n): Selection {\n const ref = useRef<MemoInstance<Snapshot, Selection>>(null);\n let memo: MemoInstance<Snapshot, Selection>;\n\n if (ref.current) {\n memo = ref.current;\n memo.selector = selector;\n memo.isEqual = isEqual;\n } else {\n ref.current = memo = {\n hasValue: false,\n value: undefined,\n selector,\n isEqual,\n };\n }\n\n const [getSelection, getServerSelection] = useMemo(\n () => [memoSnapshot(memo, getSnapshot), getServerSnapshot ? memoSnapshot(memo, getServerSnapshot) : undefined],\n [getSnapshot, getServerSnapshot]\n );\n\n const value = useSyncExternalStore<Selection>(subscribe, getSelection, getServerSelection);\n\n useDebugValue(value);\n\n return value;\n}\n","import cn from 'classnames';\nimport type { Argument } from 'classnames';\nimport type { SyntheticEvent } from 'react';\n\n/** @public */\nexport const minifyCss = (css: string) =>\n css\n .replaceAll('\\n', '')\n .replace(/\\s+([{;:}])/g, '$1')\n .replace(/([{;:}])\\s+/g, '$1')\n .replace(/;}/g, '}');\n\n/** @public */\nexport const cls = <T extends { className?: string }, C extends Argument>(\n className: C,\n props: T\n): T & { className: string } => {\n return {\n ...props,\n className: cn(className, props.className),\n };\n};\n\n/** @public */\nexport const handleAsNoop = (e?: Event | SyntheticEvent<unknown>) => {\n e?.stopPropagation?.();\n e?.preventDefault?.();\n\n return false;\n};\n","import type { CSSProperties } from 'react';\n\nexport * from './hooks';\nexport * from './components';\n\nexport const Styles = {\n of<T extends Record<string, CSSProperties>>(styles: T): T {\n return styles;\n },\n};\n"],"mappings":";;;;IAGa,KAAsD,MAAa;CAC5E,IAAM,IAAO,EAAU,IAAI,GACrB,IAAO,EAAU,CAAE;CAQzB,OANA,EAAK,UAAU,GAEf,AACI,EAAK,cAAY,GAAG,MAAS,EAAK,QAAQ,GAAG,CAAI,IAG9C,EAAK;AAChB,GCGM,KAAa,GAAwD,MAAsC;CAC7G,IAAM,EAAE,YAAS,eAAa,oBAAoB,KAAK,EAAE,eAAe,MAAS,GAE3E,IAAU,GAAS,cAAc,GACjC,IAAU,GAAS,aAAa;CAEtC,OAAO;EACH,GAAG,IAAU,OAAO,UAAU;EAC9B,GAAG,IAAU,OAAO,UAAU;CAClC;AACJ,GAOa,KACT,IAA+C,MAC/C,IAAsB,gBACrB;CACD,IAAM,CAAC,GAAO,KAAY,EAAoB;E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IANI,KAAW,OAAO,GAAG,GAAkB,CAAQ,MAInD,IAAY,EAAS,SAAS,CAAQ,GAElC,EAAS,QAAQ,GAAW,CAAS,IACrC,OAAO;EAEf,OAEI,AADA,EAAS,WAAW,IACpB,IAAY,EAAS,SAAS,CAAQ;EAU1C,OAPA,IAAmB,GACnB,EAAS,QAAQ,GAEjB,AACI,MAAU,IAGP;CACX;AACJ;AAGA,SAAgB,EACZ,GACA,GACA,GACA,GACA,GACS;CACT,IAAM,IAAM,EAA0C,IAAI,GACtD;CAEJ,AAAI,EAAI,WACJ,IAAO,EAAI,SACX,EAAK,WAAW,GAChB,EAAK,UAAU,KAEf,EAAI,UAAU,IAAO;EACjB,UAAU;EACV,OAAO,KAAA;EACP;EACA;CACJ;CAGJ,IAAM,CAAC,GAAc,KAAsB,QACjC,CAAC,EAAa,GAAM,CAAW,GAAG,IAAoB,EAAa,GAAM,CAAiB,IAAI,KAAA,CAAS,GAC7G,CAAC,GAAa,CAAiB,CACnC,GAEM,IAAQ,EAAgC,GAAW,GAAc,CAAkB;CAIzF,OAFA,EAAc,CAAK,GAEZ;AACX;;;AC9EA,IAAa,KAAa,MACtB,EACK,WAAW,MAAM,EAAE,EACnB,QAAQ,gBAAgB,IAAI,EAC5B,QAAQ,gBAAgB,IAAI,EAC5B,QAAQ,OAAO,GAAG,GAGd,KACT,GACA,OAEO;CACH,GAAG;CACH,WAAW,EAAG,GAAW,EAAM,SAAS;AAC5C,IAIS,KAAgB,OACzB,GAAG,kBAAkB,GACrB,GAAG,iBAAiB,GAEb,KCvBE,IAAS,EAClB,GAA4C,GAAc;CACtD,OAAO;AACX,EACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhzet/ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "author": "AnkhZet ankhzet@gmail.com",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -34,6 +34,7 @@
34
34
  "@types/react": "^19.2.15"
35
35
  },
36
36
  "scripts": {
37
- "build": ""
37
+ "clean": "rm -rf ./{build,dist,api} && rm -rf ./*.log",
38
+ "build": "vite build"
38
39
  }
39
40
  }