@stacksjs/composables 0.70.258 → 0.70.259
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/_shared.js +1 -23
- package/dist/cloneFnJSON.js +1 -3
- package/dist/computedAsync.js +1 -20
- package/dist/computedEager.js +1 -10
- package/dist/createEventHook.js +1 -15
- package/dist/createFetch.js +1 -8
- package/dist/createGlobalState.js +1 -10
- package/dist/createSharedComposable.js +1 -9
- package/dist/extendRef.js +1 -6
- package/dist/formatTimeAgo.js +1 -33
- package/dist/index.js +1 -210
- package/dist/isDefined.js +1 -3
- package/dist/makeDestructurable.js +1 -16
- package/dist/onClickOutside.js +1 -25
- package/dist/onKeyStroke.js +1 -31
- package/dist/onLongPress.js +1 -43
- package/dist/onStartTyping.js +1 -23
- package/dist/refAutoReset.js +1 -15
- package/dist/refDefault.js +1 -8
- package/dist/resolveRef.js +1 -7
- package/dist/ssrHandlers.js +1 -8
- package/dist/syncRef.js +1 -35
- package/dist/tryOnMounted.js +1 -22
- package/dist/unrefElement.js +1 -9
- package/dist/until.js +1 -62
- package/dist/useActiveElement.js +1 -19
- package/dist/useAnimate.js +1 -48
- package/dist/useArrayUtils.js +1 -114
- package/dist/useAsyncQueue.js +1 -22
- package/dist/useAsyncState.js +1 -35
- package/dist/useBase64.js +1 -45
- package/dist/useBattery.js +1 -38
- package/dist/useBreakpoints.js +1 -97
- package/dist/useBroadcastChannel.js +1 -31
- package/dist/useBrowserLocation.js +1 -64
- package/dist/useClipboard.js +1 -32
- package/dist/useClipboardItems.js +1 -15
- package/dist/useCloned.js +1 -16
- package/dist/useColorMode.js +1 -60
- package/dist/useConfirmDialog.js +1 -34
- package/dist/useCounter.js +1 -28
- package/dist/useCssVar.js +1 -23
- package/dist/useCycleList.js +1 -27
- package/dist/useDark.js +1 -38
- package/dist/useDateFormat.js +1 -11
- package/dist/useDebounce.js +1 -16
- package/dist/useDebounceFn.js +1 -18
- package/dist/useDebouncedRef.js +1 -22
- package/dist/useDebouncedRefHistory.js +1 -36
- package/dist/useDeviceMotion.js +1 -53
- package/dist/useDeviceOrientation.js +1 -23
- package/dist/useDevicePixelRatio.js +1 -24
- package/dist/useDocumentVisibility.js +1 -16
- package/dist/useDraggable.js +1 -58
- package/dist/useDropZone.js +1 -52
- package/dist/useElementBounding.js +1 -59
- package/dist/useElementByPoint.js +1 -18
- package/dist/useElementHover.js +1 -28
- package/dist/useElementSize.js +1 -34
- package/dist/useElementVisibility.js +1 -10
- package/dist/useEventBus.js +1 -41
- package/dist/useEventListener.js +1 -29
- package/dist/useEventSource.js +1 -72
- package/dist/useEyeDropper.js +1 -17
- package/dist/useFavicon.js +1 -22
- package/dist/useFetch.js +1 -61
- package/dist/useFileDialog.js +1 -24
- package/dist/useFocus.js +1 -42
- package/dist/useFocusWithin.js +1 -29
- package/dist/useForm.js +1 -182
- package/dist/useFps.js +1 -22
- package/dist/useFullscreen.js +1 -67
- package/dist/useGeolocation.js +1 -55
- package/dist/useIdle.js +1 -46
- package/dist/useImage.js +1 -32
- package/dist/useInfiniteScroll.js +1 -50
- package/dist/useIntersectionObserver.js +1 -27
- package/dist/useInterval.js +1 -32
- package/dist/useIntervalFn.js +1 -24
- package/dist/useKeyModifier.js +1 -22
- package/dist/useLastChanged.js +1 -8
- package/dist/useLocalStorage.js +1 -4
- package/dist/useMagicKeys.js +1 -81
- package/dist/useManualRefHistory.js +1 -64
- package/dist/useMath.js +1 -52
- package/dist/useMediaQuery.js +1 -19
- package/dist/useMemoize.js +1 -24
- package/dist/useMounted.js +1 -8
- package/dist/useMouse.js +1 -67
- package/dist/useMouseInElement.js +1 -31
- package/dist/useMousePressed.js +1 -31
- package/dist/useMutationObserver.js +1 -27
- package/dist/useNavigatorLanguage.js +1 -17
- package/dist/useNetwork.js +1 -58
- package/dist/useNow.js +1 -10
- package/dist/useObjectUrl.js +1 -23
- package/dist/useOffsetPagination.js +1 -45
- package/dist/useOnline.js +1 -20
- package/dist/usePageLeave.js +1 -27
- package/dist/useParallax.js +1 -33
- package/dist/useParentElement.js +1 -8
- package/dist/usePermission.js +1 -21
- package/dist/usePointer.js +1 -32
- package/dist/usePointerLock.js +1 -33
- package/dist/usePointerSwipe.js +1 -52
- package/dist/usePreferredColorScheme.js +1 -25
- package/dist/usePreferredContrast.js +1 -29
- package/dist/usePreferredLanguages.js +1 -16
- package/dist/usePreferredReducedMotion.js +1 -18
- package/dist/usePrevious.js +1 -8
- package/dist/useQuery.js +1 -265
- package/dist/useRafFn.js +1 -37
- package/dist/useRefHistory.js +1 -72
- package/dist/useResizeObserver.js +1 -27
- package/dist/useScreenOrientation.js +1 -27
- package/dist/useScreenSafeArea.js +1 -25
- package/dist/useScriptTag.js +1 -52
- package/dist/useScroll.js +1 -116
- package/dist/useScrollLock.js +1 -39
- package/dist/useSessionStorage.js +1 -4
- package/dist/useShare.js +1 -11
- package/dist/useSorted.js +1 -10
- package/dist/useStepper.js +1 -46
- package/dist/useStorage.js +1 -54
- package/dist/useStyleTag.js +1 -39
- package/dist/useSupported.js +1 -10
- package/dist/useSwipe.js +1 -58
- package/dist/useTextDirection.js +1 -16
- package/dist/useTextSelection.js +1 -27
- package/dist/useTextareaAutosize.js +1 -20
- package/dist/useThrottle.js +1 -23
- package/dist/useThrottleFn.js +1 -36
- package/dist/useThrottledRef.js +1 -30
- package/dist/useThrottledRefHistory.js +1 -43
- package/dist/useTimeAgo.js +1 -58
- package/dist/useTimeout.js +1 -32
- package/dist/useTimeoutFn.js +1 -27
- package/dist/useTimeoutPoll.js +1 -33
- package/dist/useTimestamp.js +1 -43
- package/dist/useTitle.js +1 -12
- package/dist/useToNumber.js +1 -25
- package/dist/useToString.js +1 -10
- package/dist/useToggle.js +1 -12
- package/dist/useTransition.js +1 -89
- package/dist/useUrlSearchParams.js +1 -72
- package/dist/useVibrate.js +1 -14
- package/dist/useVirtualList.js +1 -49
- package/dist/useWakeLock.js +1 -32
- package/dist/useWebNotification.js +1 -39
- package/dist/useWebSocket.js +1 -103
- package/dist/useWebWorker.js +1 -56
- package/dist/useWindowFocus.js +1 -20
- package/dist/useWindowScroll.js +1 -17
- package/dist/useWindowSize.js +1 -28
- package/dist/watchArray.js +1 -9
- package/dist/watchAtMost.js +1 -12
- package/dist/watchDebounced.js +1 -20
- package/dist/watchDeep.js +1 -13
- package/dist/watchIgnorable.js +1 -19
- package/dist/watchImmediate.js +1 -7
- package/dist/watchOnce.js +1 -17
- package/dist/watchPausable.js +1 -23
- package/dist/watchThrottled.js +1 -37
- package/dist/watchTriggerable.js +1 -10
- package/dist/watchWithFilter.js +1 -6
- package/dist/whenever.js +1 -7
- package/package.json +2 -2
package/dist/useVirtualList.js
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { unref } from "./_shared";
|
|
3
|
-
export function useVirtualList(source, options) {
|
|
4
|
-
const { itemHeight, overscan = 5 } = options, list = ref([]), containerHeight = ref(0), scrollTop = ref(0), wrapperProps = ref({
|
|
5
|
-
style: { width: "100%", height: "0px", marginTop: "0px" }
|
|
6
|
-
});
|
|
7
|
-
function getItems() {
|
|
8
|
-
return unref(source);
|
|
9
|
-
}
|
|
10
|
-
function update() {
|
|
11
|
-
const items = getItems(), totalHeight = items.length * itemHeight, startIndex = Math.max(0, Math.floor(scrollTop.value / itemHeight) - overscan), endIndex = Math.min(items.length, Math.ceil((scrollTop.value + containerHeight.value) / itemHeight) + overscan), visibleItems = [];
|
|
12
|
-
for (let i = startIndex;i < endIndex; i++) {
|
|
13
|
-
const data = items[i];
|
|
14
|
-
if (data === void 0 && !(i in items))
|
|
15
|
-
continue;
|
|
16
|
-
visibleItems.push({ data, index: i });
|
|
17
|
-
}
|
|
18
|
-
list.value = visibleItems;
|
|
19
|
-
wrapperProps.value = {
|
|
20
|
-
style: {
|
|
21
|
-
width: "100%",
|
|
22
|
-
height: `${totalHeight - startIndex * itemHeight}px`,
|
|
23
|
-
marginTop: `${startIndex * itemHeight}px`
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const onScroll = (e) => {
|
|
28
|
-
const target = e.target;
|
|
29
|
-
scrollTop.value = target.scrollTop;
|
|
30
|
-
containerHeight.value = target.clientHeight;
|
|
31
|
-
update();
|
|
32
|
-
};
|
|
33
|
-
update();
|
|
34
|
-
if (typeof source === "object" && source && "value" in source && "subscribe" in source)
|
|
35
|
-
watch(source, () => update());
|
|
36
|
-
function scrollTo(index) {
|
|
37
|
-
scrollTop.value = index * itemHeight;
|
|
38
|
-
update();
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
list,
|
|
42
|
-
containerProps: {
|
|
43
|
-
onScroll,
|
|
44
|
-
style: { overflow: "auto", position: "relative" }
|
|
45
|
-
},
|
|
46
|
-
wrapperProps,
|
|
47
|
-
scrollTo
|
|
48
|
-
};
|
|
49
|
-
}
|
|
1
|
+
import{ref,watch}from"@stacksjs/stx";import{unref}from"./_shared";export function useVirtualList(source,options){const{itemHeight,overscan=5}=options,list=ref([]),containerHeight=ref(0),scrollTop=ref(0),wrapperProps=ref({style:{width:"100%",height:"0px",marginTop:"0px"}});function getItems(){return unref(source)}function update(){const items=getItems(),totalHeight=items.length*itemHeight,startIndex=Math.max(0,Math.floor(scrollTop.value/itemHeight)-overscan),endIndex=Math.min(items.length,Math.ceil((scrollTop.value+containerHeight.value)/itemHeight)+overscan),visibleItems=[];for(let i=startIndex;i<endIndex;i++){const data=items[i];if(data===void 0&&!(i in items))continue;visibleItems.push({data,index:i})}list.value=visibleItems;wrapperProps.value={style:{width:"100%",height:`${totalHeight-startIndex*itemHeight}px`,marginTop:`${startIndex*itemHeight}px`}}}const onScroll=(e)=>{const target=e.target;scrollTop.value=target.scrollTop;containerHeight.value=target.clientHeight;update()};update();if(typeof source==="object"&&source&&"value"in source&&"subscribe"in source)watch(source,()=>update());function scrollTo(index){scrollTop.value=index*itemHeight;update()}return{list,containerProps:{onScroll,style:{overflow:"auto",position:"relative"}},wrapperProps,scrollTo}}
|
package/dist/useWakeLock.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function useWakeLock() {
|
|
3
|
-
const isSupported = ref(typeof navigator < "u" && "wakeLock" in navigator), isActive = ref(!1);
|
|
4
|
-
let sentinel = null;
|
|
5
|
-
async function request() {
|
|
6
|
-
if (!isSupported.value)
|
|
7
|
-
return;
|
|
8
|
-
try {
|
|
9
|
-
sentinel = await navigator.wakeLock.request("screen");
|
|
10
|
-
isActive.value = !0;
|
|
11
|
-
sentinel.addEventListener("release", () => {
|
|
12
|
-
isActive.value = !1;
|
|
13
|
-
sentinel = null;
|
|
14
|
-
});
|
|
15
|
-
} catch {
|
|
16
|
-
isActive.value = !1;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
async function release() {
|
|
20
|
-
if (sentinel) {
|
|
21
|
-
await sentinel.release();
|
|
22
|
-
sentinel = null;
|
|
23
|
-
isActive.value = !1;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
try {
|
|
27
|
-
onUnmounted(() => {
|
|
28
|
-
release();
|
|
29
|
-
});
|
|
30
|
-
} catch {}
|
|
31
|
-
return { isSupported, isActive, request, release };
|
|
32
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";export function useWakeLock(){const isSupported=ref(typeof navigator<"u"&&"wakeLock"in navigator),isActive=ref(!1);let sentinel=null;async function request(){if(!isSupported.value)return;try{sentinel=await navigator.wakeLock.request("screen");isActive.value=!0;sentinel.addEventListener("release",()=>{isActive.value=!1;sentinel=null})}catch{isActive.value=!1}}async function release(){if(sentinel){await sentinel.release();sentinel=null;isActive.value=!1}}try{onUnmounted(()=>{release()})}catch{}return{isSupported,isActive,request,release}}
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function useWebNotification(options = {}) {
|
|
3
|
-
const isSupported = ref(typeof Notification < "u"), notification = ref(null), permissionGranted = ref(isSupported.value && Notification.permission === "granted"), onClick = ref(null), onShow = ref(null), onError = ref(null), onClose = ref(null);
|
|
4
|
-
async function show(overrideOptions) {
|
|
5
|
-
if (!isSupported.value)
|
|
6
|
-
return;
|
|
7
|
-
if (Notification.permission !== "granted") {
|
|
8
|
-
const result = await Notification.requestPermission();
|
|
9
|
-
permissionGranted.value = result === "granted";
|
|
10
|
-
if (!permissionGranted.value)
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const opts = { ...options, ...overrideOptions }, title = opts.title ?? "", n = new Notification(title, {
|
|
14
|
-
body: opts.body,
|
|
15
|
-
icon: opts.icon,
|
|
16
|
-
dir: opts.dir,
|
|
17
|
-
lang: opts.lang,
|
|
18
|
-
tag: opts.tag,
|
|
19
|
-
requireInteraction: opts.requireInteraction
|
|
20
|
-
});
|
|
21
|
-
notification.value = n;
|
|
22
|
-
n.onclick = (e) => onClick.value?.(e);
|
|
23
|
-
n.onshow = (e) => onShow.value?.(e);
|
|
24
|
-
n.onerror = (e) => onError.value?.(e);
|
|
25
|
-
n.onclose = (e) => {
|
|
26
|
-
onClose.value?.(e);
|
|
27
|
-
notification.value = null;
|
|
28
|
-
};
|
|
29
|
-
return n;
|
|
30
|
-
}
|
|
31
|
-
function close() {
|
|
32
|
-
notification.value?.close();
|
|
33
|
-
notification.value = null;
|
|
34
|
-
}
|
|
35
|
-
try {
|
|
36
|
-
onUnmounted(() => close());
|
|
37
|
-
} catch {}
|
|
38
|
-
return { isSupported, notification, permissionGranted, show, close, onClick, onShow, onError, onClose };
|
|
39
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";export function useWebNotification(options={}){const isSupported=ref(typeof Notification<"u"),notification=ref(null),permissionGranted=ref(isSupported.value&&Notification.permission==="granted"),onClick=ref(null),onShow=ref(null),onError=ref(null),onClose=ref(null);async function show(overrideOptions){if(!isSupported.value)return;if(Notification.permission!=="granted"){const result=await Notification.requestPermission();permissionGranted.value=result==="granted";if(!permissionGranted.value)return}const opts={...options,...overrideOptions},title=opts.title??"",n=new Notification(title,{body:opts.body,icon:opts.icon,dir:opts.dir,lang:opts.lang,tag:opts.tag,requireInteraction:opts.requireInteraction});notification.value=n;n.onclick=(e)=>onClick.value?.(e);n.onshow=(e)=>onShow.value?.(e);n.onerror=(e)=>onError.value?.(e);n.onclose=(e)=>{onClose.value?.(e);notification.value=null};return n}function close(){notification.value?.close();notification.value=null}try{onUnmounted(()=>close())}catch{}return{isSupported,notification,permissionGranted,show,close,onClick,onShow,onError,onClose}}
|
package/dist/useWebSocket.js
CHANGED
|
@@ -1,103 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { toValue } from "./_shared";
|
|
3
|
-
export function useWebSocket(url, options = {}) {
|
|
4
|
-
const {
|
|
5
|
-
onConnected,
|
|
6
|
-
onDisconnected,
|
|
7
|
-
onError,
|
|
8
|
-
onMessage,
|
|
9
|
-
immediate = !0,
|
|
10
|
-
autoReconnect = !1,
|
|
11
|
-
heartbeat = !1,
|
|
12
|
-
protocols
|
|
13
|
-
} = options, data = ref(null), status = ref("CLOSED"), wsRef = ref(null);
|
|
14
|
-
let retryCount = 0, retryTimer = null, heartbeatTimer = null, explicitlyClosed = !1;
|
|
15
|
-
const heartbeatInterval = typeof heartbeat === "object" ? heartbeat.interval ?? 30000 : 30000, heartbeatMessage = typeof heartbeat === "object" ? heartbeat.message ?? "ping" : "ping", maxRetries = typeof autoReconnect === "object" ? autoReconnect.retries ?? 3 : autoReconnect ? 1 / 0 : 0, retryDelay = typeof autoReconnect === "object" ? autoReconnect.delay ?? 1000 : 1000;
|
|
16
|
-
function startHeartbeat(ws) {
|
|
17
|
-
stopHeartbeat();
|
|
18
|
-
if (!heartbeat)
|
|
19
|
-
return;
|
|
20
|
-
heartbeatTimer = setInterval(() => {
|
|
21
|
-
if (ws.readyState === WebSocket.OPEN)
|
|
22
|
-
ws.send(heartbeatMessage);
|
|
23
|
-
}, heartbeatInterval);
|
|
24
|
-
}
|
|
25
|
-
function stopHeartbeat() {
|
|
26
|
-
if (heartbeatTimer !== null) {
|
|
27
|
-
clearInterval(heartbeatTimer);
|
|
28
|
-
heartbeatTimer = null;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function open() {
|
|
32
|
-
if (typeof WebSocket > "u")
|
|
33
|
-
return;
|
|
34
|
-
close();
|
|
35
|
-
explicitlyClosed = !1;
|
|
36
|
-
retryCount = 0;
|
|
37
|
-
const resolvedUrl = toValue(url);
|
|
38
|
-
status.value = "CONNECTING";
|
|
39
|
-
const ws = protocols ? new WebSocket(resolvedUrl, protocols) : new WebSocket(resolvedUrl);
|
|
40
|
-
wsRef.value = ws;
|
|
41
|
-
ws.onopen = () => {
|
|
42
|
-
status.value = "OPEN";
|
|
43
|
-
retryCount = 0;
|
|
44
|
-
startHeartbeat(ws);
|
|
45
|
-
onConnected?.(ws);
|
|
46
|
-
};
|
|
47
|
-
ws.onclose = (event) => {
|
|
48
|
-
status.value = "CLOSED";
|
|
49
|
-
wsRef.value = null;
|
|
50
|
-
stopHeartbeat();
|
|
51
|
-
onDisconnected?.(ws, event);
|
|
52
|
-
if (!explicitlyClosed && autoReconnect && retryCount < maxRetries) {
|
|
53
|
-
retryCount++;
|
|
54
|
-
retryTimer = setTimeout(() => {
|
|
55
|
-
open();
|
|
56
|
-
}, retryDelay);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
ws.onerror = (event) => {
|
|
60
|
-
onError?.(ws, event);
|
|
61
|
-
};
|
|
62
|
-
ws.onmessage = (event) => {
|
|
63
|
-
data.value = typeof event.data === "string" ? event.data : String(event.data);
|
|
64
|
-
onMessage?.(ws, event);
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function close(code, reason) {
|
|
68
|
-
explicitlyClosed = !0;
|
|
69
|
-
stopHeartbeat();
|
|
70
|
-
if (retryTimer !== null) {
|
|
71
|
-
clearTimeout(retryTimer);
|
|
72
|
-
retryTimer = null;
|
|
73
|
-
}
|
|
74
|
-
const ws = wsRef.value;
|
|
75
|
-
if (ws) {
|
|
76
|
-
if (ws.readyState === WebSocket.OPEN || ws.readyState === WebSocket.CONNECTING) {
|
|
77
|
-
status.value = "CLOSING";
|
|
78
|
-
ws.close(code, reason);
|
|
79
|
-
}
|
|
80
|
-
wsRef.value = null;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function send(sendData) {
|
|
84
|
-
const ws = wsRef.value;
|
|
85
|
-
if (ws && ws.readyState === WebSocket.OPEN)
|
|
86
|
-
ws.send(sendData);
|
|
87
|
-
}
|
|
88
|
-
if (immediate)
|
|
89
|
-
open();
|
|
90
|
-
try {
|
|
91
|
-
onUnmounted(() => {
|
|
92
|
-
close();
|
|
93
|
-
});
|
|
94
|
-
} catch {}
|
|
95
|
-
return {
|
|
96
|
-
data,
|
|
97
|
-
status,
|
|
98
|
-
ws: wsRef,
|
|
99
|
-
open,
|
|
100
|
-
close,
|
|
101
|
-
send
|
|
102
|
-
};
|
|
103
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";import{toValue}from"./_shared";export function useWebSocket(url,options={}){const{onConnected,onDisconnected,onError,onMessage,immediate=!0,autoReconnect=!1,heartbeat=!1,protocols}=options,data=ref(null),status=ref("CLOSED"),wsRef=ref(null);let retryCount=0,retryTimer=null,heartbeatTimer=null,explicitlyClosed=!1;const heartbeatInterval=typeof heartbeat==="object"?heartbeat.interval??30000:30000,heartbeatMessage=typeof heartbeat==="object"?heartbeat.message??"ping":"ping",maxRetries=typeof autoReconnect==="object"?autoReconnect.retries??3:autoReconnect?1/0:0,retryDelay=typeof autoReconnect==="object"?autoReconnect.delay??1000:1000;function startHeartbeat(ws){stopHeartbeat();if(!heartbeat)return;heartbeatTimer=setInterval(()=>{if(ws.readyState===WebSocket.OPEN)ws.send(heartbeatMessage)},heartbeatInterval)}function stopHeartbeat(){if(heartbeatTimer!==null){clearInterval(heartbeatTimer);heartbeatTimer=null}}function open(){if(typeof WebSocket>"u")return;close();explicitlyClosed=!1;retryCount=0;const resolvedUrl=toValue(url);status.value="CONNECTING";const ws=protocols?new WebSocket(resolvedUrl,protocols):new WebSocket(resolvedUrl);wsRef.value=ws;ws.onopen=()=>{status.value="OPEN";retryCount=0;startHeartbeat(ws);onConnected?.(ws)};ws.onclose=(event)=>{status.value="CLOSED";wsRef.value=null;stopHeartbeat();onDisconnected?.(ws,event);if(!explicitlyClosed&&autoReconnect&&retryCount<maxRetries){retryCount++;retryTimer=setTimeout(()=>{open()},retryDelay)}};ws.onerror=(event)=>{onError?.(ws,event)};ws.onmessage=(event)=>{data.value=typeof event.data==="string"?event.data:String(event.data);onMessage?.(ws,event)}}function close(code,reason){explicitlyClosed=!0;stopHeartbeat();if(retryTimer!==null){clearTimeout(retryTimer);retryTimer=null}const ws=wsRef.value;if(ws){if(ws.readyState===WebSocket.OPEN||ws.readyState===WebSocket.CONNECTING){status.value="CLOSING";ws.close(code,reason)}wsRef.value=null}}function send(sendData){const ws=wsRef.value;if(ws&&ws.readyState===WebSocket.OPEN)ws.send(sendData)}if(immediate)open();try{onUnmounted(()=>{close()})}catch{}return{data,status,ws:wsRef,open,close,send}}
|
package/dist/useWebWorker.js
CHANGED
|
@@ -1,56 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function useWebWorker(url, workerOptions) {
|
|
3
|
-
const data = ref(null), worker = ref(void 0);
|
|
4
|
-
if (typeof Worker < "u") {
|
|
5
|
-
const w = new Worker(url, workerOptions);
|
|
6
|
-
worker.value = w;
|
|
7
|
-
w.onmessage = (e) => {
|
|
8
|
-
data.value = e.data;
|
|
9
|
-
};
|
|
10
|
-
try {
|
|
11
|
-
onUnmounted(() => w.terminate());
|
|
12
|
-
} catch {}
|
|
13
|
-
}
|
|
14
|
-
function post(message) {
|
|
15
|
-
worker.value?.postMessage(message);
|
|
16
|
-
}
|
|
17
|
-
function terminate() {
|
|
18
|
-
worker.value?.terminate();
|
|
19
|
-
worker.value = void 0;
|
|
20
|
-
}
|
|
21
|
-
return { data, post, terminate, worker };
|
|
22
|
-
}
|
|
23
|
-
export function useWebWorkerFn(fn) {
|
|
24
|
-
let worker;
|
|
25
|
-
function createWorker() {
|
|
26
|
-
const blob = new Blob([`self.onmessage = function(e) { self.postMessage((${fn.toString()})(...e.data)); }`], { type: "text/javascript" }), url = URL.createObjectURL(blob);
|
|
27
|
-
return new Worker(url);
|
|
28
|
-
}
|
|
29
|
-
function workerFn(...args) {
|
|
30
|
-
return new Promise((resolve, reject) => {
|
|
31
|
-
if (typeof Worker > "u") {
|
|
32
|
-
try {
|
|
33
|
-
resolve(fn(...args));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
reject(e);
|
|
36
|
-
}
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
worker = createWorker();
|
|
40
|
-
worker.onmessage = (e) => {
|
|
41
|
-
resolve(e.data);
|
|
42
|
-
worker?.terminate();
|
|
43
|
-
};
|
|
44
|
-
worker.onerror = (e) => {
|
|
45
|
-
reject(e);
|
|
46
|
-
worker?.terminate();
|
|
47
|
-
};
|
|
48
|
-
worker.postMessage(args);
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function terminate() {
|
|
52
|
-
worker?.terminate();
|
|
53
|
-
worker = void 0;
|
|
54
|
-
}
|
|
55
|
-
return { workerFn, terminate };
|
|
56
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";export function useWebWorker(url,workerOptions){const data=ref(null),worker=ref(void 0);if(typeof Worker<"u"){const w=new Worker(url,workerOptions);worker.value=w;w.onmessage=(e)=>{data.value=e.data};try{onUnmounted(()=>w.terminate())}catch{}}function post(message){worker.value?.postMessage(message)}function terminate(){worker.value?.terminate();worker.value=void 0}return{data,post,terminate,worker}}export function useWebWorkerFn(fn){let worker;function createWorker(){const blob=new Blob([`self.onmessage = function(e) { self.postMessage((${fn.toString()})(...e.data)); }`],{type:"text/javascript"}),url=URL.createObjectURL(blob);return new Worker(url)}function workerFn(...args){return new Promise((resolve,reject)=>{if(typeof Worker>"u"){try{resolve(fn(...args))}catch(e){reject(e)}return}worker=createWorker();worker.onmessage=(e)=>{resolve(e.data);worker?.terminate()};worker.onerror=(e)=>{reject(e);worker?.terminate()};worker.postMessage(args)})}function terminate(){worker?.terminate();worker=void 0}return{workerFn,terminate}}
|
package/dist/useWindowFocus.js
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function useWindowFocus() {
|
|
3
|
-
const focused = ref(typeof document < "u" ? document.hasFocus() : !1);
|
|
4
|
-
if (typeof window > "u")
|
|
5
|
-
return focused;
|
|
6
|
-
const onFocus = () => {
|
|
7
|
-
focused.value = !0;
|
|
8
|
-
}, onBlur = () => {
|
|
9
|
-
focused.value = !1;
|
|
10
|
-
};
|
|
11
|
-
window.addEventListener("focus", onFocus, { passive: !0 });
|
|
12
|
-
window.addEventListener("blur", onBlur, { passive: !0 });
|
|
13
|
-
try {
|
|
14
|
-
onUnmounted(() => {
|
|
15
|
-
window.removeEventListener("focus", onFocus);
|
|
16
|
-
window.removeEventListener("blur", onBlur);
|
|
17
|
-
});
|
|
18
|
-
} catch {}
|
|
19
|
-
return focused;
|
|
20
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";export function useWindowFocus(){const focused=ref(typeof document<"u"?document.hasFocus():!1);if(typeof window>"u")return focused;const onFocus=()=>{focused.value=!0},onBlur=()=>{focused.value=!1};window.addEventListener("focus",onFocus,{passive:!0});window.addEventListener("blur",onBlur,{passive:!0});try{onUnmounted(()=>{window.removeEventListener("focus",onFocus);window.removeEventListener("blur",onBlur)})}catch{}return focused}
|
package/dist/useWindowScroll.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function useWindowScroll() {
|
|
3
|
-
const x = ref(typeof window < "u" ? window.scrollX : 0), y = ref(typeof window < "u" ? window.scrollY : 0);
|
|
4
|
-
if (typeof window > "u")
|
|
5
|
-
return { x, y };
|
|
6
|
-
const handler = () => {
|
|
7
|
-
x.value = window.scrollX;
|
|
8
|
-
y.value = window.scrollY;
|
|
9
|
-
};
|
|
10
|
-
window.addEventListener("scroll", handler, { passive: !0 });
|
|
11
|
-
try {
|
|
12
|
-
onUnmounted(() => {
|
|
13
|
-
window.removeEventListener("scroll", handler);
|
|
14
|
-
});
|
|
15
|
-
} catch {}
|
|
16
|
-
return { x, y };
|
|
17
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";export function useWindowScroll(){const x=ref(typeof window<"u"?window.scrollX:0),y=ref(typeof window<"u"?window.scrollY:0);if(typeof window>"u")return{x,y};const handler=()=>{x.value=window.scrollX;y.value=window.scrollY};window.addEventListener("scroll",handler,{passive:!0});try{onUnmounted(()=>{window.removeEventListener("scroll",handler)})}catch{}return{x,y}}
|
package/dist/useWindowSize.js
CHANGED
|
@@ -1,28 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defaultWindow } from "./_shared";
|
|
3
|
-
export function useWindowSize(options) {
|
|
4
|
-
const {
|
|
5
|
-
initialWidth = 0,
|
|
6
|
-
initialHeight = 0,
|
|
7
|
-
listenOrientation = !0
|
|
8
|
-
} = options ?? {}, win = defaultWindow(), width = ref(win ? win.innerWidth : initialWidth), height = ref(win ? win.innerHeight : initialHeight);
|
|
9
|
-
function update() {
|
|
10
|
-
if (win) {
|
|
11
|
-
width.value = win.innerWidth;
|
|
12
|
-
height.value = win.innerHeight;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
if (win) {
|
|
16
|
-
win.addEventListener("resize", update);
|
|
17
|
-
if (listenOrientation)
|
|
18
|
-
win.addEventListener("orientationchange", update);
|
|
19
|
-
try {
|
|
20
|
-
onUnmounted(() => {
|
|
21
|
-
win.removeEventListener("resize", update);
|
|
22
|
-
if (listenOrientation)
|
|
23
|
-
win.removeEventListener("orientationchange", update);
|
|
24
|
-
});
|
|
25
|
-
} catch {}
|
|
26
|
-
}
|
|
27
|
-
return { width, height };
|
|
28
|
-
}
|
|
1
|
+
import{onUnmounted,ref}from"@stacksjs/stx";import{defaultWindow}from"./_shared";export function useWindowSize(options){const{initialWidth=0,initialHeight=0,listenOrientation=!0}=options??{},win=defaultWindow(),width=ref(win?win.innerWidth:initialWidth),height=ref(win?win.innerHeight:initialHeight);function update(){if(win){width.value=win.innerWidth;height.value=win.innerHeight}}if(win){win.addEventListener("resize",update);if(listenOrientation)win.addEventListener("orientationchange",update);try{onUnmounted(()=>{win.removeEventListener("resize",update);if(listenOrientation)win.removeEventListener("orientationchange",update)})}catch{}}return{width,height}}
|
package/dist/watchArray.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchArray(source, callback) {
|
|
3
|
-
let oldList = [...source.value];
|
|
4
|
-
return watch(source, (newValue) => {
|
|
5
|
-
const newList = [...newValue], added = newList.filter((item) => !oldList.includes(item)), removed = oldList.filter((item) => !newList.includes(item));
|
|
6
|
-
callback(newList, oldList, added, removed);
|
|
7
|
-
oldList = newList;
|
|
8
|
-
});
|
|
9
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchArray(source,callback){let oldList=[...source.value];return watch(source,(newValue)=>{const newList=[...newValue],added=newList.filter((item)=>!oldList.includes(item)),removed=oldList.filter((item)=>!newList.includes(item));callback(newList,oldList,added,removed);oldList=newList})}
|
package/dist/watchAtMost.js
CHANGED
|
@@ -1,12 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchAtMost(source, callback, count) {
|
|
3
|
-
const remaining = ref(count), unwatch = watch(source, (newValue) => {
|
|
4
|
-
if (remaining.value > 0) {
|
|
5
|
-
remaining.value--;
|
|
6
|
-
callback(newValue);
|
|
7
|
-
if (remaining.value <= 0)
|
|
8
|
-
unwatch();
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
return { stop: unwatch, remaining };
|
|
12
|
-
}
|
|
1
|
+
import{ref,watch}from"@stacksjs/stx";export function watchAtMost(source,callback,count){const remaining=ref(count),unwatch=watch(source,(newValue)=>{if(remaining.value>0){remaining.value--;callback(newValue);if(remaining.value<=0)unwatch()}});return{stop:unwatch,remaining}}
|
package/dist/watchDebounced.js
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchDebounced(source, callback, options) {
|
|
3
|
-
const delay = options?.debounce ?? 200;
|
|
4
|
-
let timeoutId = null;
|
|
5
|
-
const unwatch = watch(source, (newValue) => {
|
|
6
|
-
if (timeoutId !== null)
|
|
7
|
-
clearTimeout(timeoutId);
|
|
8
|
-
timeoutId = setTimeout(() => {
|
|
9
|
-
timeoutId = null;
|
|
10
|
-
callback(newValue);
|
|
11
|
-
}, delay);
|
|
12
|
-
});
|
|
13
|
-
return () => {
|
|
14
|
-
if (timeoutId !== null) {
|
|
15
|
-
clearTimeout(timeoutId);
|
|
16
|
-
timeoutId = null;
|
|
17
|
-
}
|
|
18
|
-
unwatch();
|
|
19
|
-
};
|
|
20
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchDebounced(source,callback,options){const delay=options?.debounce??200;let timeoutId=null;const unwatch=watch(source,(newValue)=>{if(timeoutId!==null)clearTimeout(timeoutId);timeoutId=setTimeout(()=>{timeoutId=null;callback(newValue)},delay)});return()=>{if(timeoutId!==null){clearTimeout(timeoutId);timeoutId=null}unwatch()}}
|
package/dist/watchDeep.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchDeep(source, callback, options) {
|
|
3
|
-
let prev = JSON.stringify(source.value);
|
|
4
|
-
if (options?.immediate)
|
|
5
|
-
callback(source.value);
|
|
6
|
-
return watch(source, (newValue) => {
|
|
7
|
-
const next = JSON.stringify(newValue);
|
|
8
|
-
if (next !== prev) {
|
|
9
|
-
prev = next;
|
|
10
|
-
callback(newValue);
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchDeep(source,callback,options){let prev=JSON.stringify(source.value);if(options?.immediate)callback(source.value);return watch(source,(newValue)=>{const next=JSON.stringify(newValue);if(next!==prev){prev=next;callback(newValue)}})}
|
package/dist/watchIgnorable.js
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchIgnorable(source, callback) {
|
|
3
|
-
const isIgnoring = ref(!1);
|
|
4
|
-
let lastValue;
|
|
5
|
-
const unwatch = watch(source, (newValue) => {
|
|
6
|
-
if (!isIgnoring.value)
|
|
7
|
-
callback(newValue, lastValue);
|
|
8
|
-
lastValue = newValue;
|
|
9
|
-
});
|
|
10
|
-
function ignoreUpdates(updater) {
|
|
11
|
-
isIgnoring.value = !0;
|
|
12
|
-
updater();
|
|
13
|
-
Promise.resolve().then(() => {
|
|
14
|
-
isIgnoring.value = !1;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return { stop: unwatch, ignoreUpdates, isIgnoring };
|
|
18
|
-
}
|
|
19
|
-
export const ignorableWatch = watchIgnorable;
|
|
1
|
+
import{ref,watch}from"@stacksjs/stx";export function watchIgnorable(source,callback){const isIgnoring=ref(!1);let lastValue;const unwatch=watch(source,(newValue)=>{if(!isIgnoring.value)callback(newValue,lastValue);lastValue=newValue});function ignoreUpdates(updater){isIgnoring.value=!0;updater();Promise.resolve().then(()=>{isIgnoring.value=!1})}return{stop:unwatch,ignoreUpdates,isIgnoring}}export const ignorableWatch=watchIgnorable;
|
package/dist/watchImmediate.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchImmediate(source, callback) {
|
|
3
|
-
callback(source.value);
|
|
4
|
-
return watch(source, (newValue) => {
|
|
5
|
-
callback(newValue);
|
|
6
|
-
});
|
|
7
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchImmediate(source,callback){callback(source.value);return watch(source,(newValue)=>{callback(newValue)})}
|
package/dist/watchOnce.js
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchOnce(source, callback) {
|
|
3
|
-
let stopped = !1;
|
|
4
|
-
const unwatch = watch(source, (newValue) => {
|
|
5
|
-
if (stopped)
|
|
6
|
-
return;
|
|
7
|
-
stopped = !0;
|
|
8
|
-
unwatch();
|
|
9
|
-
callback(newValue);
|
|
10
|
-
});
|
|
11
|
-
return () => {
|
|
12
|
-
if (!stopped) {
|
|
13
|
-
stopped = !0;
|
|
14
|
-
unwatch();
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchOnce(source,callback){let stopped=!1;const unwatch=watch(source,(newValue)=>{if(stopped)return;stopped=!0;unwatch();callback(newValue)});return()=>{if(!stopped){stopped=!0;unwatch()}}}
|
package/dist/watchPausable.js
CHANGED
|
@@ -1,23 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchPausable(source, callback) {
|
|
3
|
-
const isActive = ref(!0);
|
|
4
|
-
let lastValue;
|
|
5
|
-
const unwatch = watch(source, (newValue) => {
|
|
6
|
-
if (isActive.value)
|
|
7
|
-
callback(newValue, lastValue);
|
|
8
|
-
lastValue = newValue;
|
|
9
|
-
});
|
|
10
|
-
function pause() {
|
|
11
|
-
isActive.value = !1;
|
|
12
|
-
}
|
|
13
|
-
function resume() {
|
|
14
|
-
isActive.value = !0;
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
stop: unwatch,
|
|
18
|
-
pause,
|
|
19
|
-
resume,
|
|
20
|
-
isActive
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
export const pausableWatch = watchPausable;
|
|
1
|
+
import{ref,watch}from"@stacksjs/stx";export function watchPausable(source,callback){const isActive=ref(!0);let lastValue;const unwatch=watch(source,(newValue)=>{if(isActive.value)callback(newValue,lastValue);lastValue=newValue});function pause(){isActive.value=!1}function resume(){isActive.value=!0}return{stop:unwatch,pause,resume,isActive}}export const pausableWatch=watchPausable;
|
package/dist/watchThrottled.js
CHANGED
|
@@ -1,37 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchThrottled(source, callback, options) {
|
|
3
|
-
const interval = options?.throttle ?? 200;
|
|
4
|
-
let lastExec = 0, timeoutId = null, latestValue, hasPending = !1;
|
|
5
|
-
const unwatch = watch(source, (newValue) => {
|
|
6
|
-
const now = Date.now(), elapsed = now - lastExec;
|
|
7
|
-
if (elapsed >= interval) {
|
|
8
|
-
lastExec = now;
|
|
9
|
-
if (timeoutId !== null) {
|
|
10
|
-
clearTimeout(timeoutId);
|
|
11
|
-
timeoutId = null;
|
|
12
|
-
}
|
|
13
|
-
hasPending = !1;
|
|
14
|
-
callback(newValue);
|
|
15
|
-
} else {
|
|
16
|
-
latestValue = newValue;
|
|
17
|
-
hasPending = !0;
|
|
18
|
-
if (timeoutId === null)
|
|
19
|
-
timeoutId = setTimeout(() => {
|
|
20
|
-
lastExec = Date.now();
|
|
21
|
-
timeoutId = null;
|
|
22
|
-
if (hasPending) {
|
|
23
|
-
hasPending = !1;
|
|
24
|
-
callback(latestValue);
|
|
25
|
-
}
|
|
26
|
-
}, interval - elapsed);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return () => {
|
|
30
|
-
if (timeoutId !== null) {
|
|
31
|
-
clearTimeout(timeoutId);
|
|
32
|
-
timeoutId = null;
|
|
33
|
-
}
|
|
34
|
-
hasPending = !1;
|
|
35
|
-
unwatch();
|
|
36
|
-
};
|
|
37
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchThrottled(source,callback,options){const interval=options?.throttle??200;let lastExec=0,timeoutId=null,latestValue,hasPending=!1;const unwatch=watch(source,(newValue)=>{const now=Date.now(),elapsed=now-lastExec;if(elapsed>=interval){lastExec=now;if(timeoutId!==null){clearTimeout(timeoutId);timeoutId=null}hasPending=!1;callback(newValue)}else{latestValue=newValue;hasPending=!0;if(timeoutId===null)timeoutId=setTimeout(()=>{lastExec=Date.now();timeoutId=null;if(hasPending){hasPending=!1;callback(latestValue)}},interval-elapsed)}});return()=>{if(timeoutId!==null){clearTimeout(timeoutId);timeoutId=null}hasPending=!1;unwatch()}}
|
package/dist/watchTriggerable.js
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchTriggerable(source, callback) {
|
|
3
|
-
const unwatch = watch(source, (newValue) => {
|
|
4
|
-
callback(newValue);
|
|
5
|
-
});
|
|
6
|
-
function trigger() {
|
|
7
|
-
callback(source.value);
|
|
8
|
-
}
|
|
9
|
-
return { stop: unwatch, trigger };
|
|
10
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchTriggerable(source,callback){const unwatch=watch(source,(newValue)=>{callback(newValue)});function trigger(){callback(source.value)}return{stop:unwatch,trigger}}
|
package/dist/watchWithFilter.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function watchWithFilter(source, callback, eventFilter) {
|
|
3
|
-
return watch(source, (newValue) => {
|
|
4
|
-
eventFilter(() => callback(newValue));
|
|
5
|
-
});
|
|
6
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function watchWithFilter(source,callback,eventFilter){return watch(source,(newValue)=>{eventFilter(()=>callback(newValue))})}
|
package/dist/whenever.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export function whenever(source, callback) {
|
|
3
|
-
return watch(source, (newValue) => {
|
|
4
|
-
if (newValue)
|
|
5
|
-
callback(newValue);
|
|
6
|
-
});
|
|
7
|
-
}
|
|
1
|
+
import{watch}from"@stacksjs/stx";export function whenever(source,callback){return watch(source,(newValue)=>{if(newValue)callback(newValue)})}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/composables",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.259",
|
|
6
6
|
"description": "Stacks composables powered by stx reactivity.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@stacksjs/stx": "^0.2.148",
|
|
55
|
-
"@stacksjs/datetime": "0.70.
|
|
55
|
+
"@stacksjs/datetime": "0.70.259"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"better-dx": "^0.2.17"
|