@ctzy-web-client/plugin-component-vue 1.0.26 → 1.0.27
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/es/_virtual/_plugin-vue_export-helper.mjs +11 -0
- package/es/advance-select/advance-operation.mjs +48 -51
- package/es/advance-select/advance-option.mjs +128 -163
- package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +11 -5
- package/es/advance-select/advance-select.mjs +323 -370
- package/es/advance-select/events-helpers.mjs +9 -0
- package/es/advance-select/index.mjs +9 -0
- package/es/advance-select/use-advance-option.mjs +9 -0
- package/es/advance-select/use-advance-select.mjs +9 -0
- package/es/application-slot/application-slot.mjs +9 -0
- package/es/application-slot/breadcrumb-item.mjs +26 -20
- package/es/application-slot/header-tools-item.mjs +26 -20
- package/es/application-slot/index.mjs +9 -0
- package/es/breadcrumb-select/breadcrumb-select.mjs +123 -137
- package/es/breadcrumb-select/index.mjs +9 -0
- package/es/components.mjs +9 -0
- package/es/contextmenu/contextmenu-item.mjs +24 -19
- package/es/contextmenu/contextmenu.mjs +68 -73
- package/es/contextmenu/index.mjs +9 -0
- package/es/contextmenu/use-contextmenu.mjs +10 -1
- package/es/data-form/data-form-item.mjs +41 -49
- package/es/data-form/data-form.mjs +176 -213
- package/es/data-form/dynamic-component.mjs +9 -0
- package/es/data-form/form-components/Blots/AtBlot.mjs +9 -0
- package/es/data-form/form-components/bwa-date-picker.mjs +50 -51
- package/es/data-form/form-components/bwa-date-time-picker.mjs +55 -56
- package/es/data-form/form-components/bwa-input-float.mjs +48 -48
- package/es/data-form/form-components/bwa-input-integer.mjs +61 -68
- package/es/data-form/form-components/bwa-input.mjs +43 -43
- package/es/data-form/form-components/bwa-multi-select.mjs +40 -40
- package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +230 -555
- package/es/data-form/form-components/bwa-rich-text.mjs +326 -404
- package/es/data-form/form-components/bwa-select.mjs +81 -84
- package/es/data-form/form-components/bwa-textarea.mjs +38 -38
- package/es/data-form/form-components/bwa-upload.mjs +160 -173
- package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -35
- package/es/data-form/form-components/bwa-user-select.mjs +72 -86
- package/es/data-form/index.mjs +9 -0
- package/es/data-table/data-column-view.mjs +124 -146
- package/es/data-table/data-table-card.mjs +49 -48
- package/es/data-table/data-table-column.mjs +55 -58
- package/es/data-table/data-table.mjs +328 -404
- package/es/data-table/dynamic-component.mjs +9 -0
- package/es/data-table/index.mjs +9 -0
- package/es/data-table/use-datatable-drag.mjs +9 -0
- package/es/datatable-settings/datatable-settings.mjs +286 -328
- package/es/datatable-settings/index.mjs +9 -0
- package/es/date-range/date-picker.mjs +125 -131
- package/es/date-range/date-range.mjs +173 -216
- package/es/date-range/index.mjs +9 -0
- package/es/drag-list/constants.mjs +10 -0
- package/es/drag-list/drag-item.mjs +51 -56
- package/es/drag-list/drag-list.mjs +58 -60
- package/es/drag-list/index.mjs +9 -0
- package/es/drag-list/use-drag-list.mjs +10 -1
- package/es/dragable/constants.mjs +10 -0
- package/es/dragable/dragable-item.mjs +27 -23
- package/es/dragable/dragable-operation.mjs +33 -32
- package/es/dragable/dragable.mjs +33 -32
- package/es/dragable/index.mjs +9 -0
- package/es/dragable/use-dragable.mjs +9 -0
- package/es/filter-panel/conditions/condition.mjs +9 -0
- package/es/filter-panel/conditions/date-range-condition.mjs +51 -50
- package/es/filter-panel/conditions/department-condition/department-condition.mjs +82 -99
- package/es/filter-panel/conditions/department-condition/department-node.mjs +69 -73
- package/es/filter-panel/conditions/index.mjs +9 -0
- package/es/filter-panel/conditions/input-condition.mjs +88 -91
- package/es/filter-panel/conditions/multi-user-condition.mjs +66 -67
- package/es/filter-panel/conditions/multiple-menu-condition.mjs +44 -54
- package/es/filter-panel/conditions/single-menu-condition.mjs +71 -65
- package/es/filter-panel/conditions/single-user-condition.mjs +66 -67
- package/es/filter-panel/filter-panel-item.mjs +51 -55
- package/es/filter-panel/filter-panel.mjs +147 -156
- package/es/filter-panel/index.mjs +9 -0
- package/es/filter-panel/use-filter-panel-item.mjs +9 -0
- package/es/filter-panel/use-filter-panel.mjs +9 -0
- package/es/hooks/use-data/index.mjs +9 -0
- package/es/index.mjs +9 -0
- package/es/layout/index.mjs +9 -0
- package/es/layout/layout.mjs +87 -85
- package/es/make-installer.mjs +9 -0
- package/es/math/Rectangle.mjs +10 -0
- package/es/menu/index.mjs +9 -0
- package/es/menu/menu-item.mjs +65 -70
- package/es/menu/menu.mjs +64 -70
- package/es/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.mjs +680 -454
- package/es/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.mjs +108 -46
- package/es/panel/index.mjs +9 -0
- package/es/panel/panel.mjs +49 -53
- package/es/panel-tabs/index.mjs +9 -0
- package/es/panel-tabs/panel-tabs.mjs +9 -0
- package/es/pct-filter-panel/index.mjs +9 -0
- package/es/pct-filter-panel/pct-compents/index.mjs +9 -0
- package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +73 -75
- package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +77 -77
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +345 -374
- package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +149 -154
- package/es/pct-filter-panel/pct-filter-panel-item.mjs +52 -56
- package/es/pct-filter-panel/pct-filter-panel.mjs +235 -248
- package/es/pct-filter-panel/use-filter-panel-item.mjs +9 -0
- package/es/pct-filter-panel/use-filter-panel.mjs +9 -0
- package/es/plugins.mjs +9 -0
- package/es/progress/index.mjs +9 -0
- package/es/progress/progress-item.mjs +71 -81
- package/es/progress/progress.mjs +74 -78
- package/es/progress/use-progress.mjs +9 -0
- package/es/utils/db.mjs +9 -0
- package/es/utils.css +1 -0
- package/es/utils.mjs +9 -0
- package/es/where-filter-panel/index.mjs +9 -1
- package/es/where-filter-panel/use-where-filter-panel.mjs +9 -0
- package/es/where-filter-panel/where-filter-panel.mjs +21 -15
- package/lib/_virtual/_plugin-vue_export-helper.js +11 -0
- package/lib/advance-select/advance-operation.js +47 -50
- package/lib/advance-select/advance-option.js +127 -162
- package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +11 -6
- package/lib/advance-select/advance-select.js +322 -369
- package/lib/advance-select/events-helpers.js +9 -0
- package/lib/advance-select/index.js +9 -0
- package/lib/advance-select/use-advance-option.js +9 -0
- package/lib/advance-select/use-advance-select.js +9 -0
- package/lib/application-slot/application-slot.js +9 -0
- package/lib/application-slot/breadcrumb-item.js +25 -19
- package/lib/application-slot/header-tools-item.js +25 -19
- package/lib/application-slot/index.js +9 -0
- package/lib/breadcrumb-select/breadcrumb-select.js +122 -136
- package/lib/breadcrumb-select/index.js +9 -0
- package/lib/components.js +9 -0
- package/lib/contextmenu/contextmenu-item.js +23 -18
- package/lib/contextmenu/contextmenu.js +67 -72
- package/lib/contextmenu/index.js +9 -0
- package/lib/contextmenu/use-contextmenu.js +10 -1
- package/lib/data-form/data-form-item.js +40 -48
- package/lib/data-form/data-form.js +175 -212
- package/lib/data-form/dynamic-component.js +9 -0
- package/lib/data-form/form-components/Blots/AtBlot.js +9 -0
- package/lib/data-form/form-components/bwa-date-picker.js +49 -50
- package/lib/data-form/form-components/bwa-date-time-picker.js +54 -55
- package/lib/data-form/form-components/bwa-input-float.js +47 -47
- package/lib/data-form/form-components/bwa-input-integer.js +60 -67
- package/lib/data-form/form-components/bwa-input.js +42 -42
- package/lib/data-form/form-components/bwa-multi-select.js +39 -39
- package/lib/data-form/form-components/bwa-rich-text-tinymce.js +229 -554
- package/lib/data-form/form-components/bwa-rich-text.js +325 -403
- package/lib/data-form/form-components/bwa-select.js +80 -83
- package/lib/data-form/form-components/bwa-textarea.js +37 -37
- package/lib/data-form/form-components/bwa-upload.js +159 -172
- package/lib/data-form/form-components/bwa-user-multi-select.js +34 -34
- package/lib/data-form/form-components/bwa-user-select.js +71 -85
- package/lib/data-form/index.js +9 -0
- package/lib/data-table/data-column-view.js +124 -146
- package/lib/data-table/data-table-card.js +49 -48
- package/lib/data-table/data-table-column.js +54 -57
- package/lib/data-table/data-table.js +327 -403
- package/lib/data-table/dynamic-component.js +9 -0
- package/lib/data-table/index.js +9 -0
- package/lib/data-table/use-datatable-drag.js +9 -0
- package/lib/datatable-settings/datatable-settings.js +285 -327
- package/lib/datatable-settings/index.js +9 -0
- package/lib/date-range/date-picker.js +124 -130
- package/lib/date-range/date-range.js +172 -215
- package/lib/date-range/index.js +9 -0
- package/lib/drag-list/constants.js +10 -0
- package/lib/drag-list/drag-item.js +50 -55
- package/lib/drag-list/drag-list.js +57 -59
- package/lib/drag-list/index.js +9 -0
- package/lib/drag-list/use-drag-list.js +10 -1
- package/lib/dragable/constants.js +10 -0
- package/lib/dragable/dragable-item.js +26 -22
- package/lib/dragable/dragable-operation.js +32 -31
- package/lib/dragable/dragable.js +32 -31
- package/lib/dragable/index.js +9 -0
- package/lib/dragable/use-dragable.js +9 -0
- package/lib/filter-panel/conditions/condition.js +9 -0
- package/lib/filter-panel/conditions/date-range-condition.js +50 -49
- package/lib/filter-panel/conditions/department-condition/department-condition.js +81 -98
- package/lib/filter-panel/conditions/department-condition/department-node.js +68 -72
- package/lib/filter-panel/conditions/index.js +9 -0
- package/lib/filter-panel/conditions/input-condition.js +87 -90
- package/lib/filter-panel/conditions/multi-user-condition.js +65 -66
- package/lib/filter-panel/conditions/multiple-menu-condition.js +43 -53
- package/lib/filter-panel/conditions/single-menu-condition.js +70 -64
- package/lib/filter-panel/conditions/single-user-condition.js +65 -66
- package/lib/filter-panel/filter-panel-item.js +50 -54
- package/lib/filter-panel/filter-panel.js +146 -155
- package/lib/filter-panel/index.js +9 -0
- package/lib/filter-panel/use-filter-panel-item.js +9 -0
- package/lib/filter-panel/use-filter-panel.js +9 -0
- package/lib/hooks/use-data/index.js +9 -0
- package/lib/index.js +9 -0
- package/lib/layout/index.js +9 -0
- package/lib/layout/layout.js +86 -84
- package/lib/make-installer.js +9 -0
- package/lib/math/Rectangle.js +10 -0
- package/lib/menu/index.js +9 -0
- package/lib/menu/menu-item.js +64 -69
- package/lib/menu/menu.js +63 -69
- package/lib/node_modules/.pnpm/{@vueuse_core@9.6.0_vue@3.2.41 → @vueuse_core@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/core/index.js +685 -451
- package/lib/node_modules/.pnpm/{@vueuse_shared@9.6.0_vue@3.2.41 → @vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_}/node_modules/@vueuse/shared/index.js +109 -44
- package/lib/panel/index.js +9 -0
- package/lib/panel/panel.js +48 -52
- package/lib/panel-tabs/index.js +9 -0
- package/lib/panel-tabs/panel-tabs.js +9 -0
- package/lib/pct-filter-panel/index.js +9 -0
- package/lib/pct-filter-panel/pct-compents/index.js +9 -0
- package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +72 -74
- package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +76 -76
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +344 -373
- package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +148 -153
- package/lib/pct-filter-panel/pct-filter-panel-item.js +51 -55
- package/lib/pct-filter-panel/pct-filter-panel.js +234 -247
- package/lib/pct-filter-panel/use-filter-panel-item.js +9 -0
- package/lib/pct-filter-panel/use-filter-panel.js +9 -0
- package/lib/plugins.js +9 -0
- package/lib/progress/index.js +9 -0
- package/lib/progress/progress-item.js +70 -80
- package/lib/progress/progress.js +73 -77
- package/lib/progress/use-progress.js +9 -0
- package/lib/utils/db.js +9 -0
- package/lib/utils.css +1 -0
- package/lib/utils.js +9 -0
- package/lib/where-filter-panel/index.js +9 -0
- package/lib/where-filter-panel/use-where-filter-panel.js +9 -0
- package/lib/where-filter-panel/where-filter-panel.js +20 -14
- package/package.json +1 -1
- package/style/index.css +1 -1
- package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +0 -28
- package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -32
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch as watchPausable, createEventHook, timestamp, pausableFilter, ignorableWatch as watchIgnorable, debounceFilter, bypassFilter, createFilterWrapper, createSingletonPromise, toRefs, containsProp, until, hasOwn,
|
|
2
|
-
export { __onlyVue3, assert, autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, pausableWatch, promiseTimeout, rand, createReactiveFn as reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, autoResetRef as refAutoReset, debouncedRef as refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useCounter, useDateFormat, debouncedRef as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, debouncedWatch as watchDebounced, ignorableWatch as watchIgnorable, watchOnce, pausableWatch as watchPausable, throttledWatch as watchThrottled, watchTriggerable, watchWithFilter, whenever } from '../../../../@vueuse_shared@9.
|
|
3
|
-
import { isRef, ref, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive,
|
|
1
|
+
import { noop, resolveUnref, isClient, isString, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, promiseTimeout, isFunction, resolveRef, increaseWithUnit, useTimeoutFn, pausableWatch as watchPausable, createEventHook, timestamp, pausableFilter, ignorableWatch as watchIgnorable, debounceFilter, bypassFilter, createFilterWrapper, createSingletonPromise, toRefs, containsProp, until, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, isNumber, isObject, useIntervalFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '../../../../@vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/shared/index.mjs';
|
|
2
|
+
export { __onlyVue27Plus, __onlyVue3, assert, autoResetRef, bypassFilter, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, identity, ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, makeDestructurable, noop, normalizeDate, now, objectPick, pausableFilter, pausableWatch, promiseTimeout, rand, createReactiveFn as reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, autoResetRef as refAutoReset, debouncedRef as refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, debouncedRef as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, debouncedWatch as watchDebounced, ignorableWatch as watchIgnorable, watchOnce, pausableWatch as watchPausable, throttledWatch as watchThrottled, watchTriggerable, watchWithFilter, whenever } from '../../../../@vueuse_shared@9.13.0_vue@3.5.29_typescript@4.9.5_/node_modules/@vueuse/shared/index.mjs';
|
|
3
|
+
import { isRef, ref, shallowRef, watchEffect, computed, inject, unref, watch, getCurrentInstance, customRef, onUpdated, reactive, nextTick, onMounted, markRaw, readonly, getCurrentScope, set, del, isVue2, isReadonly, onBeforeUpdate } from 'vue-demi';
|
|
4
|
+
|
|
5
|
+
// Inject __name helper
|
|
6
|
+
if (typeof __name === 'undefined') {
|
|
7
|
+
function __name(obj, name) {
|
|
8
|
+
Object.defineProperty(obj, "name", {
|
|
9
|
+
value: name,
|
|
10
|
+
configurable: true
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
}
|
|
4
14
|
|
|
5
15
|
function computedAsync(evaluationCallback, initialState, optionsOrRef) {
|
|
6
16
|
let options;
|
|
@@ -14,10 +24,11 @@ function computedAsync(evaluationCallback, initialState, optionsOrRef) {
|
|
|
14
24
|
const {
|
|
15
25
|
lazy = false,
|
|
16
26
|
evaluating = void 0,
|
|
27
|
+
shallow = false,
|
|
17
28
|
onError = noop
|
|
18
29
|
} = options;
|
|
19
30
|
const started = ref(!lazy);
|
|
20
|
-
const current = ref(initialState);
|
|
31
|
+
const current = shallow ? shallowRef(initialState) : ref(initialState);
|
|
21
32
|
let counter = 0;
|
|
22
33
|
watchEffect(async (onInvalidate) => {
|
|
23
34
|
if (!started.value)
|
|
@@ -114,16 +125,16 @@ function useEventListener(...args) {
|
|
|
114
125
|
cleanups.forEach((fn) => fn());
|
|
115
126
|
cleanups.length = 0;
|
|
116
127
|
};
|
|
117
|
-
const register = (el, event, listener) => {
|
|
118
|
-
el.addEventListener(event, listener,
|
|
119
|
-
return () => el.removeEventListener(event, listener,
|
|
128
|
+
const register = (el, event, listener, options2) => {
|
|
129
|
+
el.addEventListener(event, listener, options2);
|
|
130
|
+
return () => el.removeEventListener(event, listener, options2);
|
|
120
131
|
};
|
|
121
|
-
const stopWatch = watch(() => unrefElement(target), (el) => {
|
|
132
|
+
const stopWatch = watch(() => [unrefElement(target), resolveUnref(options)], ([el, options2]) => {
|
|
122
133
|
cleanup();
|
|
123
134
|
if (!el)
|
|
124
135
|
return;
|
|
125
136
|
cleanups.push(...events.flatMap((event) => {
|
|
126
|
-
return listeners.map((listener) => register(el, event, listener));
|
|
137
|
+
return listeners.map((listener) => register(el, event, listener, options2));
|
|
127
138
|
}));
|
|
128
139
|
}, { immediate: true, flush: "post" });
|
|
129
140
|
const stop = () => {
|
|
@@ -134,29 +145,38 @@ function useEventListener(...args) {
|
|
|
134
145
|
return stop;
|
|
135
146
|
}
|
|
136
147
|
|
|
148
|
+
let _iOSWorkaround = false;
|
|
137
149
|
function onClickOutside(target, handler, options = {}) {
|
|
138
|
-
const { window = defaultWindow, ignore, capture = true, detectIframe = false } = options;
|
|
150
|
+
const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;
|
|
139
151
|
if (!window)
|
|
140
152
|
return;
|
|
153
|
+
if (isIOS && !_iOSWorkaround) {
|
|
154
|
+
_iOSWorkaround = true;
|
|
155
|
+
Array.from(window.document.body.children).forEach((el) => el.addEventListener("click", noop));
|
|
156
|
+
}
|
|
141
157
|
let shouldListen = true;
|
|
142
|
-
|
|
158
|
+
const shouldIgnore = (event) => {
|
|
159
|
+
return ignore.some((target2) => {
|
|
160
|
+
if (typeof target2 === "string") {
|
|
161
|
+
return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));
|
|
162
|
+
} else {
|
|
163
|
+
const el = unrefElement(target2);
|
|
164
|
+
return el && (event.target === el || event.composedPath().includes(el));
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
143
168
|
const listener = (event) => {
|
|
144
|
-
window.clearTimeout(fallback);
|
|
145
169
|
const el = unrefElement(target);
|
|
146
170
|
if (!el || el === event.target || event.composedPath().includes(el))
|
|
147
171
|
return;
|
|
172
|
+
if (event.detail === 0)
|
|
173
|
+
shouldListen = !shouldIgnore(event);
|
|
148
174
|
if (!shouldListen) {
|
|
149
175
|
shouldListen = true;
|
|
150
176
|
return;
|
|
151
177
|
}
|
|
152
178
|
handler(event);
|
|
153
179
|
};
|
|
154
|
-
const shouldIgnore = (event) => {
|
|
155
|
-
return ignore && ignore.some((target2) => {
|
|
156
|
-
const el = unrefElement(target2);
|
|
157
|
-
return el && (event.target === el || event.composedPath().includes(el));
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
180
|
const cleanup = [
|
|
161
181
|
useEventListener(window, "click", listener, { passive: true, capture }),
|
|
162
182
|
useEventListener(window, "pointerdown", (e) => {
|
|
@@ -164,13 +184,6 @@ function onClickOutside(target, handler, options = {}) {
|
|
|
164
184
|
if (el)
|
|
165
185
|
shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);
|
|
166
186
|
}, { passive: true }),
|
|
167
|
-
useEventListener(window, "pointerup", (e) => {
|
|
168
|
-
if (e.button === 0) {
|
|
169
|
-
const path = e.composedPath();
|
|
170
|
-
e.composedPath = () => path;
|
|
171
|
-
fallback = window.setTimeout(() => listener(e), 50);
|
|
172
|
-
}
|
|
173
|
-
}, { passive: true }),
|
|
174
187
|
detectIframe && useEventListener(window, "blur", (event) => {
|
|
175
188
|
var _a;
|
|
176
189
|
const el = unrefElement(target);
|
|
@@ -182,21 +195,21 @@ function onClickOutside(target, handler, options = {}) {
|
|
|
182
195
|
return stop;
|
|
183
196
|
}
|
|
184
197
|
|
|
185
|
-
var __defProp$
|
|
198
|
+
var __defProp$n = Object.defineProperty;
|
|
186
199
|
var __defProps$9 = Object.defineProperties;
|
|
187
200
|
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
188
|
-
var __getOwnPropSymbols$
|
|
189
|
-
var __hasOwnProp$
|
|
190
|
-
var __propIsEnum$
|
|
191
|
-
var __defNormalProp$
|
|
192
|
-
var __spreadValues$
|
|
201
|
+
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
|
|
202
|
+
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
|
|
203
|
+
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
|
|
204
|
+
var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
205
|
+
var __spreadValues$n = (a, b) => {
|
|
193
206
|
for (var prop in b || (b = {}))
|
|
194
|
-
if (__hasOwnProp$
|
|
195
|
-
__defNormalProp$
|
|
196
|
-
if (__getOwnPropSymbols$
|
|
197
|
-
for (var prop of __getOwnPropSymbols$
|
|
198
|
-
if (__propIsEnum$
|
|
199
|
-
__defNormalProp$
|
|
207
|
+
if (__hasOwnProp$p.call(b, prop))
|
|
208
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
209
|
+
if (__getOwnPropSymbols$p)
|
|
210
|
+
for (var prop of __getOwnPropSymbols$p(b)) {
|
|
211
|
+
if (__propIsEnum$p.call(b, prop))
|
|
212
|
+
__defNormalProp$n(a, prop, b[prop]);
|
|
200
213
|
}
|
|
201
214
|
return a;
|
|
202
215
|
};
|
|
@@ -240,13 +253,13 @@ function onKeyStroke(...args) {
|
|
|
240
253
|
return useEventListener(target, eventName, listener, passive);
|
|
241
254
|
}
|
|
242
255
|
function onKeyDown(key, handler, options = {}) {
|
|
243
|
-
return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$
|
|
256
|
+
return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: "keydown" }));
|
|
244
257
|
}
|
|
245
258
|
function onKeyPressed(key, handler, options = {}) {
|
|
246
|
-
return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$
|
|
259
|
+
return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: "keypress" }));
|
|
247
260
|
}
|
|
248
261
|
function onKeyUp(key, handler, options = {}) {
|
|
249
|
-
return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$
|
|
262
|
+
return onKeyStroke(key, handler, __spreadProps$9(__spreadValues$n({}, options), { eventName: "keyup" }));
|
|
250
263
|
}
|
|
251
264
|
|
|
252
265
|
const DEFAULT_DELAY = 500;
|
|
@@ -338,10 +351,16 @@ function templateRef(key, initialValue = null) {
|
|
|
338
351
|
}
|
|
339
352
|
|
|
340
353
|
function useActiveElement(options = {}) {
|
|
354
|
+
var _a;
|
|
341
355
|
const { window = defaultWindow } = options;
|
|
342
|
-
const
|
|
356
|
+
const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;
|
|
357
|
+
const activeElement = computedWithControl(() => null, () => document == null ? void 0 : document.activeElement);
|
|
343
358
|
if (window) {
|
|
344
|
-
useEventListener(window, "blur",
|
|
359
|
+
useEventListener(window, "blur", (event) => {
|
|
360
|
+
if (event.relatedTarget !== null)
|
|
361
|
+
return;
|
|
362
|
+
activeElement.trigger();
|
|
363
|
+
}, true);
|
|
345
364
|
useEventListener(window, "focus", activeElement.trigger, true);
|
|
346
365
|
}
|
|
347
366
|
return activeElement;
|
|
@@ -402,6 +421,7 @@ function useAsyncState(promise, initialState, options) {
|
|
|
402
421
|
immediate = true,
|
|
403
422
|
delay = 0,
|
|
404
423
|
onError = noop,
|
|
424
|
+
onSuccess = noop,
|
|
405
425
|
resetOnExecute = true,
|
|
406
426
|
shallow = true,
|
|
407
427
|
throwError
|
|
@@ -423,6 +443,7 @@ function useAsyncState(promise, initialState, options) {
|
|
|
423
443
|
const data = await _promise;
|
|
424
444
|
state.value = data;
|
|
425
445
|
isReady.value = true;
|
|
446
|
+
onSuccess(data);
|
|
426
447
|
} catch (e) {
|
|
427
448
|
error.value = e;
|
|
428
449
|
onError(e);
|
|
@@ -720,20 +741,32 @@ const breakpointsSematic = {
|
|
|
720
741
|
laptopL: 1440,
|
|
721
742
|
desktop4K: 2560
|
|
722
743
|
};
|
|
744
|
+
const breakpointsMasterCss = {
|
|
745
|
+
"3xs": 360,
|
|
746
|
+
"2xs": 480,
|
|
747
|
+
"xs": 600,
|
|
748
|
+
"sm": 768,
|
|
749
|
+
"md": 1024,
|
|
750
|
+
"lg": 1280,
|
|
751
|
+
"xl": 1440,
|
|
752
|
+
"2xl": 1600,
|
|
753
|
+
"3xl": 1920,
|
|
754
|
+
"4xl": 2560
|
|
755
|
+
};
|
|
723
756
|
|
|
724
|
-
var __defProp$
|
|
725
|
-
var __getOwnPropSymbols$
|
|
726
|
-
var __hasOwnProp$
|
|
727
|
-
var __propIsEnum$
|
|
728
|
-
var __defNormalProp$
|
|
729
|
-
var __spreadValues$
|
|
757
|
+
var __defProp$m = Object.defineProperty;
|
|
758
|
+
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
|
|
759
|
+
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
|
|
760
|
+
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
|
|
761
|
+
var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
762
|
+
var __spreadValues$m = (a, b) => {
|
|
730
763
|
for (var prop in b || (b = {}))
|
|
731
|
-
if (__hasOwnProp$
|
|
732
|
-
__defNormalProp$
|
|
733
|
-
if (__getOwnPropSymbols$
|
|
734
|
-
for (var prop of __getOwnPropSymbols$
|
|
735
|
-
if (__propIsEnum$
|
|
736
|
-
__defNormalProp$
|
|
764
|
+
if (__hasOwnProp$o.call(b, prop))
|
|
765
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
766
|
+
if (__getOwnPropSymbols$o)
|
|
767
|
+
for (var prop of __getOwnPropSymbols$o(b)) {
|
|
768
|
+
if (__propIsEnum$o.call(b, prop))
|
|
769
|
+
__defNormalProp$m(a, prop, b[prop]);
|
|
737
770
|
}
|
|
738
771
|
return a;
|
|
739
772
|
};
|
|
@@ -763,7 +796,7 @@ function useBreakpoints(breakpoints, options = {}) {
|
|
|
763
796
|
});
|
|
764
797
|
return shortcuts;
|
|
765
798
|
}, {});
|
|
766
|
-
return __spreadValues$
|
|
799
|
+
return __spreadValues$m({
|
|
767
800
|
greater(k) {
|
|
768
801
|
return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);
|
|
769
802
|
},
|
|
@@ -939,21 +972,21 @@ function useClipboard(options = {}) {
|
|
|
939
972
|
};
|
|
940
973
|
}
|
|
941
974
|
|
|
942
|
-
var __defProp$
|
|
975
|
+
var __defProp$l = Object.defineProperty;
|
|
943
976
|
var __defProps$8 = Object.defineProperties;
|
|
944
977
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
945
|
-
var __getOwnPropSymbols$
|
|
946
|
-
var __hasOwnProp$
|
|
947
|
-
var __propIsEnum$
|
|
948
|
-
var __defNormalProp$
|
|
949
|
-
var __spreadValues$
|
|
978
|
+
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
|
|
979
|
+
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
|
|
980
|
+
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
|
|
981
|
+
var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
982
|
+
var __spreadValues$l = (a, b) => {
|
|
950
983
|
for (var prop in b || (b = {}))
|
|
951
|
-
if (__hasOwnProp$
|
|
952
|
-
__defNormalProp$
|
|
953
|
-
if (__getOwnPropSymbols$
|
|
954
|
-
for (var prop of __getOwnPropSymbols$
|
|
955
|
-
if (__propIsEnum$
|
|
956
|
-
__defNormalProp$
|
|
984
|
+
if (__hasOwnProp$n.call(b, prop))
|
|
985
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
986
|
+
if (__getOwnPropSymbols$n)
|
|
987
|
+
for (var prop of __getOwnPropSymbols$n(b)) {
|
|
988
|
+
if (__propIsEnum$n.call(b, prop))
|
|
989
|
+
__defNormalProp$l(a, prop, b[prop]);
|
|
957
990
|
}
|
|
958
991
|
return a;
|
|
959
992
|
};
|
|
@@ -973,7 +1006,7 @@ function useCloned(source, options = {}) {
|
|
|
973
1006
|
cloned.value = clone(unref(source));
|
|
974
1007
|
}
|
|
975
1008
|
if (!manual && isRef(source)) {
|
|
976
|
-
watch(source, sync, __spreadProps$8(__spreadValues$
|
|
1009
|
+
watch(source, sync, __spreadProps$8(__spreadValues$l({}, options), {
|
|
977
1010
|
deep,
|
|
978
1011
|
immediate
|
|
979
1012
|
}));
|
|
@@ -998,19 +1031,19 @@ function guessSerializerType(rawInit) {
|
|
|
998
1031
|
return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
|
|
999
1032
|
}
|
|
1000
1033
|
|
|
1001
|
-
var __defProp$
|
|
1002
|
-
var __getOwnPropSymbols$
|
|
1003
|
-
var __hasOwnProp$
|
|
1004
|
-
var __propIsEnum$
|
|
1005
|
-
var __defNormalProp$
|
|
1006
|
-
var __spreadValues$
|
|
1034
|
+
var __defProp$k = Object.defineProperty;
|
|
1035
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
1036
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
1037
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
1038
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1039
|
+
var __spreadValues$k = (a, b) => {
|
|
1007
1040
|
for (var prop in b || (b = {}))
|
|
1008
|
-
if (__hasOwnProp$
|
|
1009
|
-
__defNormalProp$
|
|
1010
|
-
if (__getOwnPropSymbols$
|
|
1011
|
-
for (var prop of __getOwnPropSymbols$
|
|
1012
|
-
if (__propIsEnum$
|
|
1013
|
-
__defNormalProp$
|
|
1041
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
1042
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1043
|
+
if (__getOwnPropSymbols$m)
|
|
1044
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
1045
|
+
if (__propIsEnum$m.call(b, prop))
|
|
1046
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1014
1047
|
}
|
|
1015
1048
|
return a;
|
|
1016
1049
|
};
|
|
@@ -1048,6 +1081,7 @@ const StorageSerializers = {
|
|
|
1048
1081
|
write: (v) => v.toISOString()
|
|
1049
1082
|
}
|
|
1050
1083
|
};
|
|
1084
|
+
const customStorageEventName = "vueuse-storage";
|
|
1051
1085
|
function useStorage(key, defaults, storage, options = {}) {
|
|
1052
1086
|
var _a;
|
|
1053
1087
|
const {
|
|
@@ -1080,56 +1114,79 @@ function useStorage(key, defaults, storage, options = {}) {
|
|
|
1080
1114
|
const type = guessSerializerType(rawInit);
|
|
1081
1115
|
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
|
|
1082
1116
|
const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, () => write(data.value), { flush, deep, eventFilter });
|
|
1083
|
-
if (window && listenToStorageChanges)
|
|
1117
|
+
if (window && listenToStorageChanges) {
|
|
1084
1118
|
useEventListener(window, "storage", update);
|
|
1119
|
+
useEventListener(window, customStorageEventName, updateFromCustomEvent);
|
|
1120
|
+
}
|
|
1085
1121
|
update();
|
|
1086
1122
|
return data;
|
|
1087
1123
|
function write(v) {
|
|
1088
1124
|
try {
|
|
1089
|
-
if (v == null)
|
|
1125
|
+
if (v == null) {
|
|
1090
1126
|
storage.removeItem(key);
|
|
1091
|
-
else
|
|
1092
|
-
|
|
1127
|
+
} else {
|
|
1128
|
+
const serialized = serializer.write(v);
|
|
1129
|
+
const oldValue = storage.getItem(key);
|
|
1130
|
+
if (oldValue !== serialized) {
|
|
1131
|
+
storage.setItem(key, serialized);
|
|
1132
|
+
if (window) {
|
|
1133
|
+
window.dispatchEvent(new CustomEvent(customStorageEventName, {
|
|
1134
|
+
detail: {
|
|
1135
|
+
key,
|
|
1136
|
+
oldValue,
|
|
1137
|
+
newValue: serialized,
|
|
1138
|
+
storageArea: storage
|
|
1139
|
+
}
|
|
1140
|
+
}));
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1093
1144
|
} catch (e) {
|
|
1094
1145
|
onError(e);
|
|
1095
1146
|
}
|
|
1096
1147
|
}
|
|
1097
1148
|
function read(event) {
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
} else {
|
|
1115
|
-
return serializer.read(rawValue);
|
|
1116
|
-
}
|
|
1117
|
-
} catch (e) {
|
|
1118
|
-
onError(e);
|
|
1119
|
-
} finally {
|
|
1120
|
-
resumeWatch();
|
|
1149
|
+
const rawValue = event ? event.newValue : storage.getItem(key);
|
|
1150
|
+
if (rawValue == null) {
|
|
1151
|
+
if (writeDefaults && rawInit !== null)
|
|
1152
|
+
storage.setItem(key, serializer.write(rawInit));
|
|
1153
|
+
return rawInit;
|
|
1154
|
+
} else if (!event && mergeDefaults) {
|
|
1155
|
+
const value = serializer.read(rawValue);
|
|
1156
|
+
if (isFunction(mergeDefaults))
|
|
1157
|
+
return mergeDefaults(value, rawInit);
|
|
1158
|
+
else if (type === "object" && !Array.isArray(value))
|
|
1159
|
+
return __spreadValues$k(__spreadValues$k({}, rawInit), value);
|
|
1160
|
+
return value;
|
|
1161
|
+
} else if (typeof rawValue !== "string") {
|
|
1162
|
+
return rawValue;
|
|
1163
|
+
} else {
|
|
1164
|
+
return serializer.read(rawValue);
|
|
1121
1165
|
}
|
|
1122
1166
|
}
|
|
1167
|
+
function updateFromCustomEvent(event) {
|
|
1168
|
+
update(event.detail);
|
|
1169
|
+
}
|
|
1123
1170
|
function update(event) {
|
|
1124
1171
|
if (event && event.storageArea !== storage)
|
|
1125
1172
|
return;
|
|
1126
|
-
if (event && event.key
|
|
1173
|
+
if (event && event.key == null) {
|
|
1127
1174
|
data.value = rawInit;
|
|
1128
1175
|
return;
|
|
1129
1176
|
}
|
|
1130
1177
|
if (event && event.key !== key)
|
|
1131
1178
|
return;
|
|
1132
|
-
|
|
1179
|
+
pauseWatch();
|
|
1180
|
+
try {
|
|
1181
|
+
data.value = read(event);
|
|
1182
|
+
} catch (e) {
|
|
1183
|
+
onError(e);
|
|
1184
|
+
} finally {
|
|
1185
|
+
if (event)
|
|
1186
|
+
nextTick(resumeWatch);
|
|
1187
|
+
else
|
|
1188
|
+
resumeWatch();
|
|
1189
|
+
}
|
|
1133
1190
|
}
|
|
1134
1191
|
}
|
|
1135
1192
|
|
|
@@ -1137,19 +1194,19 @@ function usePreferredDark(options) {
|
|
|
1137
1194
|
return useMediaQuery("(prefers-color-scheme: dark)", options);
|
|
1138
1195
|
}
|
|
1139
1196
|
|
|
1140
|
-
var __defProp$
|
|
1141
|
-
var __getOwnPropSymbols$
|
|
1142
|
-
var __hasOwnProp$
|
|
1143
|
-
var __propIsEnum$
|
|
1144
|
-
var __defNormalProp$
|
|
1145
|
-
var __spreadValues$
|
|
1197
|
+
var __defProp$j = Object.defineProperty;
|
|
1198
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
1199
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
1200
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
1201
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1202
|
+
var __spreadValues$j = (a, b) => {
|
|
1146
1203
|
for (var prop in b || (b = {}))
|
|
1147
|
-
if (__hasOwnProp$
|
|
1148
|
-
__defNormalProp$
|
|
1149
|
-
if (__getOwnPropSymbols$
|
|
1150
|
-
for (var prop of __getOwnPropSymbols$
|
|
1151
|
-
if (__propIsEnum$
|
|
1152
|
-
__defNormalProp$
|
|
1204
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
1205
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1206
|
+
if (__getOwnPropSymbols$l)
|
|
1207
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
1208
|
+
if (__propIsEnum$l.call(b, prop))
|
|
1209
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1153
1210
|
}
|
|
1154
1211
|
return a;
|
|
1155
1212
|
};
|
|
@@ -1165,7 +1222,7 @@ function useColorMode(options = {}) {
|
|
|
1165
1222
|
storageRef,
|
|
1166
1223
|
emitAuto
|
|
1167
1224
|
} = options;
|
|
1168
|
-
const modes = __spreadValues$
|
|
1225
|
+
const modes = __spreadValues$j({
|
|
1169
1226
|
auto: "",
|
|
1170
1227
|
light: "light",
|
|
1171
1228
|
dark: "dark"
|
|
@@ -1316,21 +1373,21 @@ function useCycleList(list, options) {
|
|
|
1316
1373
|
};
|
|
1317
1374
|
}
|
|
1318
1375
|
|
|
1319
|
-
var __defProp$
|
|
1376
|
+
var __defProp$i = Object.defineProperty;
|
|
1320
1377
|
var __defProps$7 = Object.defineProperties;
|
|
1321
1378
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
1322
|
-
var __getOwnPropSymbols$
|
|
1323
|
-
var __hasOwnProp$
|
|
1324
|
-
var __propIsEnum$
|
|
1325
|
-
var __defNormalProp$
|
|
1326
|
-
var __spreadValues$
|
|
1379
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
1380
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
1381
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
1382
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1383
|
+
var __spreadValues$i = (a, b) => {
|
|
1327
1384
|
for (var prop in b || (b = {}))
|
|
1328
|
-
if (__hasOwnProp$
|
|
1329
|
-
__defNormalProp$
|
|
1330
|
-
if (__getOwnPropSymbols$
|
|
1331
|
-
for (var prop of __getOwnPropSymbols$
|
|
1332
|
-
if (__propIsEnum$
|
|
1333
|
-
__defNormalProp$
|
|
1385
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
1386
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1387
|
+
if (__getOwnPropSymbols$k)
|
|
1388
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
1389
|
+
if (__propIsEnum$k.call(b, prop))
|
|
1390
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1334
1391
|
}
|
|
1335
1392
|
return a;
|
|
1336
1393
|
};
|
|
@@ -1341,7 +1398,7 @@ function useDark(options = {}) {
|
|
|
1341
1398
|
valueLight = "",
|
|
1342
1399
|
window = defaultWindow
|
|
1343
1400
|
} = options;
|
|
1344
|
-
const mode = useColorMode(__spreadProps$7(__spreadValues$
|
|
1401
|
+
const mode = useColorMode(__spreadProps$7(__spreadValues$i({}, options), {
|
|
1345
1402
|
onChanged: (mode2, defaultHandler) => {
|
|
1346
1403
|
var _a;
|
|
1347
1404
|
if (options.onChanged)
|
|
@@ -1445,21 +1502,21 @@ function useManualRefHistory(source, options = {}) {
|
|
|
1445
1502
|
};
|
|
1446
1503
|
}
|
|
1447
1504
|
|
|
1448
|
-
var __defProp$
|
|
1505
|
+
var __defProp$h = Object.defineProperty;
|
|
1449
1506
|
var __defProps$6 = Object.defineProperties;
|
|
1450
1507
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
1451
|
-
var __getOwnPropSymbols$
|
|
1452
|
-
var __hasOwnProp$
|
|
1453
|
-
var __propIsEnum$
|
|
1454
|
-
var __defNormalProp$
|
|
1455
|
-
var __spreadValues$
|
|
1508
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
1509
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
1510
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
1511
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1512
|
+
var __spreadValues$h = (a, b) => {
|
|
1456
1513
|
for (var prop in b || (b = {}))
|
|
1457
|
-
if (__hasOwnProp$
|
|
1458
|
-
__defNormalProp$
|
|
1459
|
-
if (__getOwnPropSymbols$
|
|
1460
|
-
for (var prop of __getOwnPropSymbols$
|
|
1461
|
-
if (__propIsEnum$
|
|
1462
|
-
__defNormalProp$
|
|
1514
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
1515
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1516
|
+
if (__getOwnPropSymbols$j)
|
|
1517
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
1518
|
+
if (__propIsEnum$j.call(b, prop))
|
|
1519
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
1463
1520
|
}
|
|
1464
1521
|
return a;
|
|
1465
1522
|
};
|
|
@@ -1487,7 +1544,7 @@ function useRefHistory(source, options = {}) {
|
|
|
1487
1544
|
source2.value = value;
|
|
1488
1545
|
});
|
|
1489
1546
|
}
|
|
1490
|
-
const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$
|
|
1547
|
+
const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$h({}, options), { clone: options.clone || deep, setSource }));
|
|
1491
1548
|
const { clear, commit: manualCommit } = manualHistory;
|
|
1492
1549
|
function commit() {
|
|
1493
1550
|
ignorePrevAsyncUpdates();
|
|
@@ -1511,7 +1568,7 @@ function useRefHistory(source, options = {}) {
|
|
|
1511
1568
|
stop();
|
|
1512
1569
|
clear();
|
|
1513
1570
|
}
|
|
1514
|
-
return __spreadProps$6(__spreadValues$
|
|
1571
|
+
return __spreadProps$6(__spreadValues$h({}, manualHistory), {
|
|
1515
1572
|
isTracking,
|
|
1516
1573
|
pause,
|
|
1517
1574
|
resume,
|
|
@@ -1521,29 +1578,29 @@ function useRefHistory(source, options = {}) {
|
|
|
1521
1578
|
});
|
|
1522
1579
|
}
|
|
1523
1580
|
|
|
1524
|
-
var __defProp$
|
|
1581
|
+
var __defProp$g = Object.defineProperty;
|
|
1525
1582
|
var __defProps$5 = Object.defineProperties;
|
|
1526
1583
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
1527
|
-
var __getOwnPropSymbols$
|
|
1528
|
-
var __hasOwnProp$
|
|
1529
|
-
var __propIsEnum$
|
|
1530
|
-
var __defNormalProp$
|
|
1531
|
-
var __spreadValues$
|
|
1584
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
1585
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
1586
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
1587
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1588
|
+
var __spreadValues$g = (a, b) => {
|
|
1532
1589
|
for (var prop in b || (b = {}))
|
|
1533
|
-
if (__hasOwnProp$
|
|
1534
|
-
__defNormalProp$
|
|
1535
|
-
if (__getOwnPropSymbols$
|
|
1536
|
-
for (var prop of __getOwnPropSymbols$
|
|
1537
|
-
if (__propIsEnum$
|
|
1538
|
-
__defNormalProp$
|
|
1590
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
1591
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1592
|
+
if (__getOwnPropSymbols$i)
|
|
1593
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
1594
|
+
if (__propIsEnum$i.call(b, prop))
|
|
1595
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
1539
1596
|
}
|
|
1540
1597
|
return a;
|
|
1541
1598
|
};
|
|
1542
1599
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
1543
1600
|
function useDebouncedRefHistory(source, options = {}) {
|
|
1544
1601
|
const filter = options.debounce ? debounceFilter(options.debounce) : void 0;
|
|
1545
|
-
const history = useRefHistory(source, __spreadProps$5(__spreadValues$
|
|
1546
|
-
return __spreadValues$
|
|
1602
|
+
const history = useRefHistory(source, __spreadProps$5(__spreadValues$g({}, options), { eventFilter: filter }));
|
|
1603
|
+
return __spreadValues$g({}, history);
|
|
1547
1604
|
}
|
|
1548
1605
|
|
|
1549
1606
|
function useDeviceMotion(options = {}) {
|
|
@@ -1603,28 +1660,20 @@ function useDeviceOrientation(options = {}) {
|
|
|
1603
1660
|
function useDevicePixelRatio({
|
|
1604
1661
|
window = defaultWindow
|
|
1605
1662
|
} = {}) {
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1663
|
+
const pixelRatio = ref(1);
|
|
1664
|
+
if (window) {
|
|
1665
|
+
let observe = function() {
|
|
1666
|
+
pixelRatio.value = window.devicePixelRatio;
|
|
1667
|
+
cleanup();
|
|
1668
|
+
media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);
|
|
1669
|
+
media.addEventListener("change", observe, { once: true });
|
|
1670
|
+
}, cleanup = function() {
|
|
1671
|
+
media == null ? void 0 : media.removeEventListener("change", observe);
|
|
1609
1672
|
};
|
|
1673
|
+
let media;
|
|
1674
|
+
observe();
|
|
1675
|
+
tryOnScopeDispose(cleanup);
|
|
1610
1676
|
}
|
|
1611
|
-
const pixelRatio = ref(1);
|
|
1612
|
-
const cleanups = [];
|
|
1613
|
-
const cleanup = () => {
|
|
1614
|
-
cleanups.map((i) => i());
|
|
1615
|
-
cleanups.length = 0;
|
|
1616
|
-
};
|
|
1617
|
-
const observe = () => {
|
|
1618
|
-
pixelRatio.value = window.devicePixelRatio;
|
|
1619
|
-
cleanup();
|
|
1620
|
-
const media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);
|
|
1621
|
-
media.addEventListener("change", observe, { once: true });
|
|
1622
|
-
cleanups.push(() => {
|
|
1623
|
-
media.removeEventListener("change", observe);
|
|
1624
|
-
});
|
|
1625
|
-
};
|
|
1626
|
-
observe();
|
|
1627
|
-
tryOnScopeDispose(cleanup);
|
|
1628
1677
|
return { pixelRatio };
|
|
1629
1678
|
}
|
|
1630
1679
|
|
|
@@ -1778,21 +1827,21 @@ function useDocumentVisibility({ document = defaultDocument } = {}) {
|
|
|
1778
1827
|
return visibility;
|
|
1779
1828
|
}
|
|
1780
1829
|
|
|
1781
|
-
var __defProp$
|
|
1830
|
+
var __defProp$f = Object.defineProperty;
|
|
1782
1831
|
var __defProps$4 = Object.defineProperties;
|
|
1783
1832
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
1784
|
-
var __getOwnPropSymbols$
|
|
1785
|
-
var __hasOwnProp$
|
|
1786
|
-
var __propIsEnum$
|
|
1787
|
-
var __defNormalProp$
|
|
1788
|
-
var __spreadValues$
|
|
1833
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
1834
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
1835
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
1836
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1837
|
+
var __spreadValues$f = (a, b) => {
|
|
1789
1838
|
for (var prop in b || (b = {}))
|
|
1790
|
-
if (__hasOwnProp$
|
|
1791
|
-
__defNormalProp$
|
|
1792
|
-
if (__getOwnPropSymbols$
|
|
1793
|
-
for (var prop of __getOwnPropSymbols$
|
|
1794
|
-
if (__propIsEnum$
|
|
1795
|
-
__defNormalProp$
|
|
1839
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
1840
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1841
|
+
if (__getOwnPropSymbols$h)
|
|
1842
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
1843
|
+
if (__propIsEnum$h.call(b, prop))
|
|
1844
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
1796
1845
|
}
|
|
1797
1846
|
return a;
|
|
1798
1847
|
};
|
|
@@ -1822,8 +1871,8 @@ function useDraggable(target, options = {}) {
|
|
|
1822
1871
|
return;
|
|
1823
1872
|
const rect = resolveUnref(target).getBoundingClientRect();
|
|
1824
1873
|
const pos = {
|
|
1825
|
-
x: e.
|
|
1826
|
-
y: e.
|
|
1874
|
+
x: e.clientX - rect.left,
|
|
1875
|
+
y: e.clientY - rect.top
|
|
1827
1876
|
};
|
|
1828
1877
|
if (((_a2 = options.onStart) == null ? void 0 : _a2.call(options, pos, e)) === false)
|
|
1829
1878
|
return;
|
|
@@ -1837,8 +1886,8 @@ function useDraggable(target, options = {}) {
|
|
|
1837
1886
|
if (!pressedDelta.value)
|
|
1838
1887
|
return;
|
|
1839
1888
|
position.value = {
|
|
1840
|
-
x: e.
|
|
1841
|
-
y: e.
|
|
1889
|
+
x: e.clientX - pressedDelta.value.x,
|
|
1890
|
+
y: e.clientY - pressedDelta.value.y
|
|
1842
1891
|
};
|
|
1843
1892
|
(_a2 = options.onMove) == null ? void 0 : _a2.call(options, position.value, e);
|
|
1844
1893
|
handleEvent(e);
|
|
@@ -1858,7 +1907,7 @@ function useDraggable(target, options = {}) {
|
|
|
1858
1907
|
useEventListener(draggingElement, "pointermove", move, true);
|
|
1859
1908
|
useEventListener(draggingElement, "pointerup", end, true);
|
|
1860
1909
|
}
|
|
1861
|
-
return __spreadProps$4(__spreadValues$
|
|
1910
|
+
return __spreadProps$4(__spreadValues$f({}, toRefs(position)), {
|
|
1862
1911
|
position,
|
|
1863
1912
|
isDragging: computed(() => !!pressedDelta.value),
|
|
1864
1913
|
style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)
|
|
@@ -1897,17 +1946,17 @@ function useDropZone(target, onDrop) {
|
|
|
1897
1946
|
};
|
|
1898
1947
|
}
|
|
1899
1948
|
|
|
1900
|
-
var __getOwnPropSymbols$
|
|
1901
|
-
var __hasOwnProp$
|
|
1902
|
-
var __propIsEnum$
|
|
1949
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
1950
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
1951
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
1903
1952
|
var __objRest$2 = (source, exclude) => {
|
|
1904
1953
|
var target = {};
|
|
1905
1954
|
for (var prop in source)
|
|
1906
|
-
if (__hasOwnProp$
|
|
1955
|
+
if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1907
1956
|
target[prop] = source[prop];
|
|
1908
|
-
if (source != null && __getOwnPropSymbols$
|
|
1909
|
-
for (var prop of __getOwnPropSymbols$
|
|
1910
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1957
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
1958
|
+
for (var prop of __getOwnPropSymbols$g(source)) {
|
|
1959
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
|
|
1911
1960
|
target[prop] = source[prop];
|
|
1912
1961
|
}
|
|
1913
1962
|
return target;
|
|
@@ -1983,7 +2032,7 @@ function useElementBounding(target, options = {}) {
|
|
|
1983
2032
|
useResizeObserver(target, update);
|
|
1984
2033
|
watch(() => unrefElement(target), (ele) => !ele && update());
|
|
1985
2034
|
if (windowScroll)
|
|
1986
|
-
useEventListener("scroll", update, { passive: true });
|
|
2035
|
+
useEventListener("scroll", update, { capture: true, passive: true });
|
|
1987
2036
|
if (windowResize)
|
|
1988
2037
|
useEventListener("resize", update, { passive: true });
|
|
1989
2038
|
tryOnMounted(() => {
|
|
@@ -2009,17 +2058,20 @@ function useRafFn(fn, options = {}) {
|
|
|
2009
2058
|
window = defaultWindow
|
|
2010
2059
|
} = options;
|
|
2011
2060
|
const isActive = ref(false);
|
|
2061
|
+
let previousFrameTimestamp = 0;
|
|
2012
2062
|
let rafId = null;
|
|
2013
|
-
function loop() {
|
|
2063
|
+
function loop(timestamp) {
|
|
2014
2064
|
if (!isActive.value || !window)
|
|
2015
2065
|
return;
|
|
2016
|
-
|
|
2066
|
+
const delta = timestamp - previousFrameTimestamp;
|
|
2067
|
+
fn({ delta, timestamp });
|
|
2068
|
+
previousFrameTimestamp = timestamp;
|
|
2017
2069
|
rafId = window.requestAnimationFrame(loop);
|
|
2018
2070
|
}
|
|
2019
2071
|
function resume() {
|
|
2020
2072
|
if (!isActive.value && window) {
|
|
2021
2073
|
isActive.value = true;
|
|
2022
|
-
loop
|
|
2074
|
+
rafId = window.requestAnimationFrame(loop);
|
|
2023
2075
|
}
|
|
2024
2076
|
}
|
|
2025
2077
|
function pause() {
|
|
@@ -2033,58 +2085,88 @@ function useRafFn(fn, options = {}) {
|
|
|
2033
2085
|
resume();
|
|
2034
2086
|
tryOnScopeDispose(pause);
|
|
2035
2087
|
return {
|
|
2036
|
-
isActive,
|
|
2088
|
+
isActive: readonly(isActive),
|
|
2037
2089
|
pause,
|
|
2038
2090
|
resume
|
|
2039
2091
|
};
|
|
2040
2092
|
}
|
|
2041
2093
|
|
|
2042
|
-
var __defProp$
|
|
2043
|
-
var __getOwnPropSymbols$
|
|
2044
|
-
var __hasOwnProp$
|
|
2045
|
-
var __propIsEnum$
|
|
2046
|
-
var __defNormalProp$
|
|
2047
|
-
var __spreadValues$
|
|
2094
|
+
var __defProp$e = Object.defineProperty;
|
|
2095
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
2096
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
2097
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
2098
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2099
|
+
var __spreadValues$e = (a, b) => {
|
|
2048
2100
|
for (var prop in b || (b = {}))
|
|
2049
|
-
if (__hasOwnProp$
|
|
2050
|
-
__defNormalProp$
|
|
2051
|
-
if (__getOwnPropSymbols$
|
|
2052
|
-
for (var prop of __getOwnPropSymbols$
|
|
2053
|
-
if (__propIsEnum$
|
|
2054
|
-
__defNormalProp$
|
|
2101
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
2102
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2103
|
+
if (__getOwnPropSymbols$f)
|
|
2104
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
2105
|
+
if (__propIsEnum$f.call(b, prop))
|
|
2106
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2055
2107
|
}
|
|
2056
2108
|
return a;
|
|
2057
2109
|
};
|
|
2058
2110
|
function useElementByPoint(options) {
|
|
2059
2111
|
const element = ref(null);
|
|
2060
|
-
const { x, y } = options;
|
|
2112
|
+
const { x, y, document = defaultDocument } = options;
|
|
2061
2113
|
const controls = useRafFn(() => {
|
|
2062
|
-
element.value = document.elementFromPoint(resolveUnref(x), resolveUnref(y));
|
|
2114
|
+
element.value = (document == null ? void 0 : document.elementFromPoint(resolveUnref(x), resolveUnref(y))) || null;
|
|
2063
2115
|
});
|
|
2064
|
-
return __spreadValues$
|
|
2116
|
+
return __spreadValues$e({
|
|
2065
2117
|
element
|
|
2066
2118
|
}, controls);
|
|
2067
2119
|
}
|
|
2068
2120
|
|
|
2069
|
-
function useElementHover(el) {
|
|
2121
|
+
function useElementHover(el, options = {}) {
|
|
2122
|
+
const delayEnter = options ? options.delayEnter : 0;
|
|
2123
|
+
const delayLeave = options ? options.delayLeave : 0;
|
|
2070
2124
|
const isHovered = ref(false);
|
|
2071
|
-
|
|
2072
|
-
|
|
2125
|
+
let timer;
|
|
2126
|
+
const toggle = (entering) => {
|
|
2127
|
+
const delay = entering ? delayEnter : delayLeave;
|
|
2128
|
+
if (timer) {
|
|
2129
|
+
clearTimeout(timer);
|
|
2130
|
+
timer = void 0;
|
|
2131
|
+
}
|
|
2132
|
+
if (delay)
|
|
2133
|
+
timer = setTimeout(() => isHovered.value = entering, delay);
|
|
2134
|
+
else
|
|
2135
|
+
isHovered.value = entering;
|
|
2136
|
+
};
|
|
2137
|
+
if (!window)
|
|
2138
|
+
return isHovered;
|
|
2139
|
+
useEventListener(el, "mouseenter", () => toggle(true), { passive: true });
|
|
2140
|
+
useEventListener(el, "mouseleave", () => toggle(false), { passive: true });
|
|
2073
2141
|
return isHovered;
|
|
2074
2142
|
}
|
|
2075
2143
|
|
|
2076
2144
|
function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
|
|
2077
|
-
const { box = "content-box" } = options;
|
|
2145
|
+
const { window = defaultWindow, box = "content-box" } = options;
|
|
2146
|
+
const isSVG = computed(() => {
|
|
2147
|
+
var _a, _b;
|
|
2148
|
+
return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
|
|
2149
|
+
});
|
|
2078
2150
|
const width = ref(initialSize.width);
|
|
2079
2151
|
const height = ref(initialSize.height);
|
|
2080
2152
|
useResizeObserver(target, ([entry]) => {
|
|
2081
2153
|
const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;
|
|
2082
|
-
if (
|
|
2083
|
-
|
|
2084
|
-
|
|
2154
|
+
if (window && isSVG.value) {
|
|
2155
|
+
const $elem = unrefElement(target);
|
|
2156
|
+
if ($elem) {
|
|
2157
|
+
const styles = window.getComputedStyle($elem);
|
|
2158
|
+
width.value = parseFloat(styles.width);
|
|
2159
|
+
height.value = parseFloat(styles.height);
|
|
2160
|
+
}
|
|
2085
2161
|
} else {
|
|
2086
|
-
|
|
2087
|
-
|
|
2162
|
+
if (boxSize) {
|
|
2163
|
+
const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];
|
|
2164
|
+
width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);
|
|
2165
|
+
height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);
|
|
2166
|
+
} else {
|
|
2167
|
+
width.value = entry.contentRect.width;
|
|
2168
|
+
height.value = entry.contentRect.height;
|
|
2169
|
+
}
|
|
2088
2170
|
}
|
|
2089
2171
|
}, options);
|
|
2090
2172
|
watch(() => unrefElement(target), (ele) => {
|
|
@@ -2242,32 +2324,31 @@ function useFavicon(newIcon = null, options = {}) {
|
|
|
2242
2324
|
return favicon;
|
|
2243
2325
|
}
|
|
2244
2326
|
|
|
2245
|
-
var __defProp$
|
|
2327
|
+
var __defProp$d = Object.defineProperty;
|
|
2246
2328
|
var __defProps$3 = Object.defineProperties;
|
|
2247
2329
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
2248
|
-
var __getOwnPropSymbols$
|
|
2249
|
-
var __hasOwnProp$
|
|
2250
|
-
var __propIsEnum$
|
|
2251
|
-
var __defNormalProp$
|
|
2252
|
-
var __spreadValues$
|
|
2330
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
2331
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
2332
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
2333
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2334
|
+
var __spreadValues$d = (a, b) => {
|
|
2253
2335
|
for (var prop in b || (b = {}))
|
|
2254
|
-
if (__hasOwnProp$
|
|
2255
|
-
__defNormalProp$
|
|
2256
|
-
if (__getOwnPropSymbols$
|
|
2257
|
-
for (var prop of __getOwnPropSymbols$
|
|
2258
|
-
if (__propIsEnum$
|
|
2259
|
-
__defNormalProp$
|
|
2336
|
+
if (__hasOwnProp$e.call(b, prop))
|
|
2337
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2338
|
+
if (__getOwnPropSymbols$e)
|
|
2339
|
+
for (var prop of __getOwnPropSymbols$e(b)) {
|
|
2340
|
+
if (__propIsEnum$e.call(b, prop))
|
|
2341
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2260
2342
|
}
|
|
2261
2343
|
return a;
|
|
2262
2344
|
};
|
|
2263
2345
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
2264
2346
|
const payloadMapping = {
|
|
2265
2347
|
json: "application/json",
|
|
2266
|
-
text: "text/plain"
|
|
2267
|
-
formData: "multipart/form-data"
|
|
2348
|
+
text: "text/plain"
|
|
2268
2349
|
};
|
|
2269
2350
|
function isFetchOptions(obj) {
|
|
2270
|
-
return containsProp(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch");
|
|
2351
|
+
return obj && containsProp(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch");
|
|
2271
2352
|
}
|
|
2272
2353
|
function isAbsoluteURL(url) {
|
|
2273
2354
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
@@ -2289,7 +2370,7 @@ function combineCallbacks(combination, ...callbacks) {
|
|
|
2289
2370
|
return async (ctx) => {
|
|
2290
2371
|
await callbacks.reduce((prevCallback, callback) => prevCallback.then(async () => {
|
|
2291
2372
|
if (callback)
|
|
2292
|
-
ctx = __spreadValues$
|
|
2373
|
+
ctx = __spreadValues$d(__spreadValues$d({}, ctx), await callback(ctx));
|
|
2293
2374
|
}), Promise.resolve());
|
|
2294
2375
|
return ctx;
|
|
2295
2376
|
};
|
|
@@ -2309,19 +2390,19 @@ function createFetch(config = {}) {
|
|
|
2309
2390
|
let fetchOptions = _fetchOptions;
|
|
2310
2391
|
if (args.length > 0) {
|
|
2311
2392
|
if (isFetchOptions(args[0])) {
|
|
2312
|
-
options = __spreadProps$3(__spreadValues$
|
|
2393
|
+
options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[0]), {
|
|
2313
2394
|
beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),
|
|
2314
2395
|
afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),
|
|
2315
2396
|
onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)
|
|
2316
2397
|
});
|
|
2317
2398
|
} else {
|
|
2318
|
-
fetchOptions = __spreadProps$3(__spreadValues$
|
|
2319
|
-
headers: __spreadValues$
|
|
2399
|
+
fetchOptions = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, fetchOptions), args[0]), {
|
|
2400
|
+
headers: __spreadValues$d(__spreadValues$d({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})
|
|
2320
2401
|
});
|
|
2321
2402
|
}
|
|
2322
2403
|
}
|
|
2323
2404
|
if (args.length > 1 && isFetchOptions(args[1])) {
|
|
2324
|
-
options = __spreadProps$3(__spreadValues$
|
|
2405
|
+
options = __spreadProps$3(__spreadValues$d(__spreadValues$d({}, options), args[1]), {
|
|
2325
2406
|
beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),
|
|
2326
2407
|
afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),
|
|
2327
2408
|
onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)
|
|
@@ -2343,13 +2424,13 @@ function useFetch(url, ...args) {
|
|
|
2343
2424
|
};
|
|
2344
2425
|
if (args.length > 0) {
|
|
2345
2426
|
if (isFetchOptions(args[0]))
|
|
2346
|
-
options = __spreadValues$
|
|
2427
|
+
options = __spreadValues$d(__spreadValues$d({}, options), args[0]);
|
|
2347
2428
|
else
|
|
2348
2429
|
fetchOptions = args[0];
|
|
2349
2430
|
}
|
|
2350
2431
|
if (args.length > 1) {
|
|
2351
2432
|
if (isFetchOptions(args[1]))
|
|
2352
|
-
options = __spreadValues$
|
|
2433
|
+
options = __spreadValues$d(__spreadValues$d({}, options), args[1]);
|
|
2353
2434
|
}
|
|
2354
2435
|
const {
|
|
2355
2436
|
fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,
|
|
@@ -2370,8 +2451,10 @@ function useFetch(url, ...args) {
|
|
|
2370
2451
|
let controller;
|
|
2371
2452
|
let timer;
|
|
2372
2453
|
const abort = () => {
|
|
2373
|
-
if (supportsAbort && controller)
|
|
2454
|
+
if (supportsAbort && controller) {
|
|
2374
2455
|
controller.abort();
|
|
2456
|
+
controller = void 0;
|
|
2457
|
+
}
|
|
2375
2458
|
};
|
|
2376
2459
|
const loading = (isLoading) => {
|
|
2377
2460
|
isFetching.value = isLoading;
|
|
@@ -2385,11 +2468,11 @@ function useFetch(url, ...args) {
|
|
|
2385
2468
|
error.value = null;
|
|
2386
2469
|
statusCode.value = null;
|
|
2387
2470
|
aborted.value = false;
|
|
2388
|
-
controller = void 0;
|
|
2389
2471
|
if (supportsAbort) {
|
|
2472
|
+
abort();
|
|
2390
2473
|
controller = new AbortController();
|
|
2391
2474
|
controller.signal.onabort = () => aborted.value = true;
|
|
2392
|
-
fetchOptions = __spreadProps$3(__spreadValues$
|
|
2475
|
+
fetchOptions = __spreadProps$3(__spreadValues$d({}, fetchOptions), {
|
|
2393
2476
|
signal: controller.signal
|
|
2394
2477
|
});
|
|
2395
2478
|
}
|
|
@@ -2405,9 +2488,13 @@ function useFetch(url, ...args) {
|
|
|
2405
2488
|
defaultFetchOptions.body = config.payloadType === "json" ? JSON.stringify(payload) : payload;
|
|
2406
2489
|
}
|
|
2407
2490
|
let isCanceled = false;
|
|
2408
|
-
const context = {
|
|
2409
|
-
|
|
2410
|
-
|
|
2491
|
+
const context = {
|
|
2492
|
+
url: resolveUnref(url),
|
|
2493
|
+
options: __spreadValues$d(__spreadValues$d({}, defaultFetchOptions), fetchOptions),
|
|
2494
|
+
cancel: () => {
|
|
2495
|
+
isCanceled = true;
|
|
2496
|
+
}
|
|
2497
|
+
};
|
|
2411
2498
|
if (options.beforeFetch)
|
|
2412
2499
|
Object.assign(context, await options.beforeFetch(context));
|
|
2413
2500
|
if (isCanceled || !fetch) {
|
|
@@ -2419,8 +2506,8 @@ function useFetch(url, ...args) {
|
|
|
2419
2506
|
timer.start();
|
|
2420
2507
|
return new Promise((resolve, reject) => {
|
|
2421
2508
|
var _a3;
|
|
2422
|
-
fetch(context.url, __spreadProps$3(__spreadValues$
|
|
2423
|
-
headers: __spreadValues$
|
|
2509
|
+
fetch(context.url, __spreadProps$3(__spreadValues$d(__spreadValues$d({}, defaultFetchOptions), context.options), {
|
|
2510
|
+
headers: __spreadValues$d(__spreadValues$d({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))
|
|
2424
2511
|
})).then(async (fetchResponse) => {
|
|
2425
2512
|
response.value = fetchResponse;
|
|
2426
2513
|
statusCode.value = fetchResponse.status;
|
|
@@ -2495,9 +2582,9 @@ function useFetch(url, ...args) {
|
|
|
2495
2582
|
], ([refetch2]) => refetch2 && execute(), { deep: true });
|
|
2496
2583
|
}
|
|
2497
2584
|
const rawPayload = resolveUnref(config.payload);
|
|
2498
|
-
if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype)
|
|
2585
|
+
if (!payloadType && rawPayload && Object.getPrototypeOf(rawPayload) === Object.prototype && !(rawPayload instanceof FormData))
|
|
2499
2586
|
config.payloadType = "json";
|
|
2500
|
-
return __spreadProps$3(__spreadValues$
|
|
2587
|
+
return __spreadProps$3(__spreadValues$d({}, shell), {
|
|
2501
2588
|
then(onFulfilled, onRejected) {
|
|
2502
2589
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
2503
2590
|
}
|
|
@@ -2515,7 +2602,7 @@ function useFetch(url, ...args) {
|
|
|
2515
2602
|
return () => {
|
|
2516
2603
|
if (!isFetching.value) {
|
|
2517
2604
|
config.type = type;
|
|
2518
|
-
return __spreadProps$3(__spreadValues$
|
|
2605
|
+
return __spreadProps$3(__spreadValues$d({}, shell), {
|
|
2519
2606
|
then(onFulfilled, onRejected) {
|
|
2520
2607
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
2521
2608
|
}
|
|
@@ -2526,7 +2613,7 @@ function useFetch(url, ...args) {
|
|
|
2526
2613
|
}
|
|
2527
2614
|
if (options.immediate)
|
|
2528
2615
|
setTimeout(execute, 0);
|
|
2529
|
-
return __spreadProps$3(__spreadValues$
|
|
2616
|
+
return __spreadProps$3(__spreadValues$d({}, shell), {
|
|
2530
2617
|
then(onFulfilled, onRejected) {
|
|
2531
2618
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
2532
2619
|
}
|
|
@@ -2538,19 +2625,19 @@ function joinPaths(start, end) {
|
|
|
2538
2625
|
return `${start}${end}`;
|
|
2539
2626
|
}
|
|
2540
2627
|
|
|
2541
|
-
var __defProp$
|
|
2542
|
-
var __getOwnPropSymbols$
|
|
2543
|
-
var __hasOwnProp$
|
|
2544
|
-
var __propIsEnum$
|
|
2545
|
-
var __defNormalProp$
|
|
2546
|
-
var __spreadValues$
|
|
2628
|
+
var __defProp$c = Object.defineProperty;
|
|
2629
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
2630
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
2631
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
2632
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2633
|
+
var __spreadValues$c = (a, b) => {
|
|
2547
2634
|
for (var prop in b || (b = {}))
|
|
2548
|
-
if (__hasOwnProp$
|
|
2549
|
-
__defNormalProp$
|
|
2550
|
-
if (__getOwnPropSymbols$
|
|
2551
|
-
for (var prop of __getOwnPropSymbols$
|
|
2552
|
-
if (__propIsEnum$
|
|
2553
|
-
__defNormalProp$
|
|
2635
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
2636
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
2637
|
+
if (__getOwnPropSymbols$d)
|
|
2638
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
2639
|
+
if (__propIsEnum$d.call(b, prop))
|
|
2640
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
2554
2641
|
}
|
|
2555
2642
|
return a;
|
|
2556
2643
|
};
|
|
@@ -2575,7 +2662,7 @@ function useFileDialog(options = {}) {
|
|
|
2575
2662
|
const open = (localOptions) => {
|
|
2576
2663
|
if (!input)
|
|
2577
2664
|
return;
|
|
2578
|
-
const _options = __spreadValues$
|
|
2665
|
+
const _options = __spreadValues$c(__spreadValues$c(__spreadValues$c({}, DEFAULT_OPTIONS), options), localOptions);
|
|
2579
2666
|
input.multiple = _options.multiple;
|
|
2580
2667
|
input.accept = _options.accept;
|
|
2581
2668
|
if (hasOwn(_options, "capture"))
|
|
@@ -2594,19 +2681,19 @@ function useFileDialog(options = {}) {
|
|
|
2594
2681
|
};
|
|
2595
2682
|
}
|
|
2596
2683
|
|
|
2597
|
-
var __defProp$
|
|
2598
|
-
var __getOwnPropSymbols$
|
|
2599
|
-
var __hasOwnProp$
|
|
2600
|
-
var __propIsEnum$
|
|
2601
|
-
var __defNormalProp$
|
|
2602
|
-
var __spreadValues$
|
|
2684
|
+
var __defProp$b = Object.defineProperty;
|
|
2685
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
2686
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
2687
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
2688
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2689
|
+
var __spreadValues$b = (a, b) => {
|
|
2603
2690
|
for (var prop in b || (b = {}))
|
|
2604
|
-
if (__hasOwnProp$
|
|
2605
|
-
__defNormalProp$
|
|
2606
|
-
if (__getOwnPropSymbols$
|
|
2607
|
-
for (var prop of __getOwnPropSymbols$
|
|
2608
|
-
if (__propIsEnum$
|
|
2609
|
-
__defNormalProp$
|
|
2691
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
2692
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2693
|
+
if (__getOwnPropSymbols$c)
|
|
2694
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
2695
|
+
if (__propIsEnum$c.call(b, prop))
|
|
2696
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
2610
2697
|
}
|
|
2611
2698
|
return a;
|
|
2612
2699
|
};
|
|
@@ -2639,7 +2726,7 @@ function useFileSystemAccess(options = {}) {
|
|
|
2639
2726
|
async function open(_options = {}) {
|
|
2640
2727
|
if (!isSupported.value)
|
|
2641
2728
|
return;
|
|
2642
|
-
const [handle] = await window.showOpenFilePicker(__spreadValues$
|
|
2729
|
+
const [handle] = await window.showOpenFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));
|
|
2643
2730
|
fileHandle.value = handle;
|
|
2644
2731
|
await updateFile();
|
|
2645
2732
|
await updateData();
|
|
@@ -2647,7 +2734,7 @@ function useFileSystemAccess(options = {}) {
|
|
|
2647
2734
|
async function create(_options = {}) {
|
|
2648
2735
|
if (!isSupported.value)
|
|
2649
2736
|
return;
|
|
2650
|
-
fileHandle.value = await window.showSaveFilePicker(__spreadValues$
|
|
2737
|
+
fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));
|
|
2651
2738
|
data.value = void 0;
|
|
2652
2739
|
await updateFile();
|
|
2653
2740
|
await updateData();
|
|
@@ -2667,7 +2754,7 @@ function useFileSystemAccess(options = {}) {
|
|
|
2667
2754
|
async function saveAs(_options = {}) {
|
|
2668
2755
|
if (!isSupported.value)
|
|
2669
2756
|
return;
|
|
2670
|
-
fileHandle.value = await window.showSaveFilePicker(__spreadValues$
|
|
2757
|
+
fileHandle.value = await window.showSaveFilePicker(__spreadValues$b(__spreadValues$b({}, unref(options)), _options));
|
|
2671
2758
|
if (data.value) {
|
|
2672
2759
|
const writableStream = await fileHandle.value.createWritable();
|
|
2673
2760
|
await writableStream.write(data.value);
|
|
@@ -2707,17 +2794,17 @@ function useFileSystemAccess(options = {}) {
|
|
|
2707
2794
|
|
|
2708
2795
|
function useFocus(target, options = {}) {
|
|
2709
2796
|
const { initialValue = false } = options;
|
|
2710
|
-
const
|
|
2797
|
+
const innerFocused = ref(false);
|
|
2711
2798
|
const targetElement = computed(() => unrefElement(target));
|
|
2799
|
+
useEventListener(targetElement, "focus", () => innerFocused.value = true);
|
|
2800
|
+
useEventListener(targetElement, "blur", () => innerFocused.value = false);
|
|
2712
2801
|
const focused = computed({
|
|
2713
|
-
get()
|
|
2714
|
-
return isDef(activeElement.value) && isDef(targetElement.value) && activeElement.value === targetElement.value;
|
|
2715
|
-
},
|
|
2802
|
+
get: () => innerFocused.value,
|
|
2716
2803
|
set(value) {
|
|
2717
2804
|
var _a, _b;
|
|
2718
|
-
if (!value &&
|
|
2805
|
+
if (!value && innerFocused.value)
|
|
2719
2806
|
(_a = targetElement.value) == null ? void 0 : _a.blur();
|
|
2720
|
-
if (value && !
|
|
2807
|
+
else if (value && !innerFocused.value)
|
|
2721
2808
|
(_b = targetElement.value) == null ? void 0 : _b.focus();
|
|
2722
2809
|
}
|
|
2723
2810
|
});
|
|
@@ -2976,7 +3063,8 @@ function useGeolocation(options = {}) {
|
|
|
2976
3063
|
enableHighAccuracy = true,
|
|
2977
3064
|
maximumAge = 3e4,
|
|
2978
3065
|
timeout = 27e3,
|
|
2979
|
-
navigator = defaultNavigator
|
|
3066
|
+
navigator = defaultNavigator,
|
|
3067
|
+
immediate = true
|
|
2980
3068
|
} = options;
|
|
2981
3069
|
const isSupported = useSupported(() => navigator && "geolocation" in navigator);
|
|
2982
3070
|
const locatedAt = ref(null);
|
|
@@ -3005,7 +3093,8 @@ function useGeolocation(options = {}) {
|
|
|
3005
3093
|
});
|
|
3006
3094
|
}
|
|
3007
3095
|
}
|
|
3008
|
-
|
|
3096
|
+
if (immediate)
|
|
3097
|
+
resume();
|
|
3009
3098
|
function pause() {
|
|
3010
3099
|
if (watcher && navigator)
|
|
3011
3100
|
navigator.geolocation.clearWatch(watcher);
|
|
@@ -3057,19 +3146,19 @@ function useIdle(timeout = oneMinute, options = {}) {
|
|
|
3057
3146
|
return { idle, lastActive };
|
|
3058
3147
|
}
|
|
3059
3148
|
|
|
3060
|
-
var __defProp$
|
|
3061
|
-
var __getOwnPropSymbols$
|
|
3062
|
-
var __hasOwnProp$
|
|
3063
|
-
var __propIsEnum$
|
|
3064
|
-
var __defNormalProp$
|
|
3065
|
-
var __spreadValues$
|
|
3149
|
+
var __defProp$a = Object.defineProperty;
|
|
3150
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
3151
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
3152
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
3153
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3154
|
+
var __spreadValues$a = (a, b) => {
|
|
3066
3155
|
for (var prop in b || (b = {}))
|
|
3067
|
-
if (__hasOwnProp$
|
|
3068
|
-
__defNormalProp$
|
|
3069
|
-
if (__getOwnPropSymbols$
|
|
3070
|
-
for (var prop of __getOwnPropSymbols$
|
|
3071
|
-
if (__propIsEnum$
|
|
3072
|
-
__defNormalProp$
|
|
3156
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
3157
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3158
|
+
if (__getOwnPropSymbols$b)
|
|
3159
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
3160
|
+
if (__propIsEnum$b.call(b, prop))
|
|
3161
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3073
3162
|
}
|
|
3074
3163
|
return a;
|
|
3075
3164
|
};
|
|
@@ -3087,7 +3176,7 @@ async function loadImage(options) {
|
|
|
3087
3176
|
});
|
|
3088
3177
|
}
|
|
3089
3178
|
const useImage = (options, asyncStateOptions = {}) => {
|
|
3090
|
-
const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$
|
|
3179
|
+
const state = useAsyncState(() => loadImage(resolveUnref(options)), void 0, __spreadValues$a({
|
|
3091
3180
|
resetOnExecute: true
|
|
3092
3181
|
}, asyncStateOptions));
|
|
3093
3182
|
watch(() => resolveUnref(options), () => state.execute(asyncStateOptions.delay), { deep: true });
|
|
@@ -3155,14 +3244,17 @@ function useScroll(element, options = {}) {
|
|
|
3155
3244
|
top: false,
|
|
3156
3245
|
bottom: false
|
|
3157
3246
|
});
|
|
3158
|
-
const onScrollEnd =
|
|
3247
|
+
const onScrollEnd = (e) => {
|
|
3248
|
+
if (!isScrolling.value)
|
|
3249
|
+
return;
|
|
3159
3250
|
isScrolling.value = false;
|
|
3160
3251
|
directions.left = false;
|
|
3161
3252
|
directions.right = false;
|
|
3162
3253
|
directions.top = false;
|
|
3163
3254
|
directions.bottom = false;
|
|
3164
3255
|
onStop(e);
|
|
3165
|
-
}
|
|
3256
|
+
};
|
|
3257
|
+
const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);
|
|
3166
3258
|
const onScrollHandler = (e) => {
|
|
3167
3259
|
const eventTarget = e.target === document ? e.target.documentElement : e.target;
|
|
3168
3260
|
const scrollLeft = eventTarget.scrollLeft;
|
|
@@ -3180,10 +3272,11 @@ function useScroll(element, options = {}) {
|
|
|
3180
3272
|
arrivedState.bottom = scrollTop + eventTarget.clientHeight >= eventTarget.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
|
|
3181
3273
|
internalY.value = scrollTop;
|
|
3182
3274
|
isScrolling.value = true;
|
|
3183
|
-
|
|
3275
|
+
onScrollEndDebounced(e);
|
|
3184
3276
|
onScroll(e);
|
|
3185
3277
|
};
|
|
3186
3278
|
useEventListener(element, "scroll", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);
|
|
3279
|
+
useEventListener(element, "scrollend", onScrollEnd, eventListenerOptions);
|
|
3187
3280
|
return {
|
|
3188
3281
|
x,
|
|
3189
3282
|
y,
|
|
@@ -3193,21 +3286,21 @@ function useScroll(element, options = {}) {
|
|
|
3193
3286
|
};
|
|
3194
3287
|
}
|
|
3195
3288
|
|
|
3196
|
-
var __defProp$
|
|
3289
|
+
var __defProp$9 = Object.defineProperty;
|
|
3197
3290
|
var __defProps$2 = Object.defineProperties;
|
|
3198
3291
|
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
3199
|
-
var __getOwnPropSymbols$
|
|
3200
|
-
var __hasOwnProp$
|
|
3201
|
-
var __propIsEnum$
|
|
3202
|
-
var __defNormalProp$
|
|
3203
|
-
var __spreadValues$
|
|
3292
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3293
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3294
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3295
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3296
|
+
var __spreadValues$9 = (a, b) => {
|
|
3204
3297
|
for (var prop in b || (b = {}))
|
|
3205
|
-
if (__hasOwnProp$
|
|
3206
|
-
__defNormalProp$
|
|
3207
|
-
if (__getOwnPropSymbols$
|
|
3208
|
-
for (var prop of __getOwnPropSymbols$
|
|
3209
|
-
if (__propIsEnum$
|
|
3210
|
-
__defNormalProp$
|
|
3298
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
3299
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3300
|
+
if (__getOwnPropSymbols$a)
|
|
3301
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3302
|
+
if (__propIsEnum$a.call(b, prop))
|
|
3303
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3211
3304
|
}
|
|
3212
3305
|
return a;
|
|
3213
3306
|
};
|
|
@@ -3215,8 +3308,8 @@ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
|
3215
3308
|
function useInfiniteScroll(element, onLoadMore, options = {}) {
|
|
3216
3309
|
var _a, _b;
|
|
3217
3310
|
const direction = (_a = options.direction) != null ? _a : "bottom";
|
|
3218
|
-
const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$
|
|
3219
|
-
offset: __spreadValues$
|
|
3311
|
+
const state = reactive(useScroll(element, __spreadProps$2(__spreadValues$9({}, options), {
|
|
3312
|
+
offset: __spreadValues$9({
|
|
3220
3313
|
[direction]: (_b = options.distance) != null ? _b : 0
|
|
3221
3314
|
}, options.offset)
|
|
3222
3315
|
})));
|
|
@@ -3323,9 +3416,12 @@ function useMagicKeys(options = {}) {
|
|
|
3323
3416
|
onEventFired = noop
|
|
3324
3417
|
} = options;
|
|
3325
3418
|
const current = reactive(new Set());
|
|
3326
|
-
const obj = {
|
|
3327
|
-
|
|
3328
|
-
|
|
3419
|
+
const obj = {
|
|
3420
|
+
toJSON() {
|
|
3421
|
+
return {};
|
|
3422
|
+
},
|
|
3423
|
+
current
|
|
3424
|
+
};
|
|
3329
3425
|
const refs = useReactive ? reactive(obj) : obj;
|
|
3330
3426
|
const metaDeps = new Set();
|
|
3331
3427
|
const usedKeys = new Set();
|
|
@@ -3338,6 +3434,7 @@ function useMagicKeys(options = {}) {
|
|
|
3338
3434
|
}
|
|
3339
3435
|
}
|
|
3340
3436
|
function reset() {
|
|
3437
|
+
current.clear();
|
|
3341
3438
|
for (const key of usedKeys)
|
|
3342
3439
|
setRefs(key, false);
|
|
3343
3440
|
}
|
|
@@ -3398,19 +3495,19 @@ function useMagicKeys(options = {}) {
|
|
|
3398
3495
|
return proxy;
|
|
3399
3496
|
}
|
|
3400
3497
|
|
|
3401
|
-
var __defProp$
|
|
3402
|
-
var __getOwnPropSymbols$
|
|
3403
|
-
var __hasOwnProp$
|
|
3404
|
-
var __propIsEnum$
|
|
3405
|
-
var __defNormalProp$
|
|
3406
|
-
var __spreadValues$
|
|
3498
|
+
var __defProp$8 = Object.defineProperty;
|
|
3499
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
3500
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
3501
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
3502
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3503
|
+
var __spreadValues$8 = (a, b) => {
|
|
3407
3504
|
for (var prop in b || (b = {}))
|
|
3408
|
-
if (__hasOwnProp$
|
|
3409
|
-
__defNormalProp$
|
|
3410
|
-
if (__getOwnPropSymbols$
|
|
3411
|
-
for (var prop of __getOwnPropSymbols$
|
|
3412
|
-
if (__propIsEnum$
|
|
3413
|
-
__defNormalProp$
|
|
3505
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
3506
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3507
|
+
if (__getOwnPropSymbols$9)
|
|
3508
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
3509
|
+
if (__propIsEnum$9.call(b, prop))
|
|
3510
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
3414
3511
|
}
|
|
3415
3512
|
return a;
|
|
3416
3513
|
};
|
|
@@ -3432,7 +3529,7 @@ const defaultOptions = {
|
|
|
3432
3529
|
tracks: []
|
|
3433
3530
|
};
|
|
3434
3531
|
function useMediaControls(target, options = {}) {
|
|
3435
|
-
options = __spreadValues$
|
|
3532
|
+
options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);
|
|
3436
3533
|
const {
|
|
3437
3534
|
document = defaultDocument
|
|
3438
3535
|
} = options;
|
|
@@ -3577,7 +3674,10 @@ function useMediaControls(target, options = {}) {
|
|
|
3577
3674
|
useEventListener(target, "seeking", () => seeking.value = true);
|
|
3578
3675
|
useEventListener(target, "seeked", () => seeking.value = false);
|
|
3579
3676
|
useEventListener(target, "waiting", () => waiting.value = true);
|
|
3580
|
-
useEventListener(target, "playing", () =>
|
|
3677
|
+
useEventListener(target, "playing", () => {
|
|
3678
|
+
waiting.value = false;
|
|
3679
|
+
ended.value = false;
|
|
3680
|
+
});
|
|
3581
3681
|
useEventListener(target, "ratechange", () => rate.value = resolveUnref(target).playbackRate);
|
|
3582
3682
|
useEventListener(target, "stalled", () => stalled.value = true);
|
|
3583
3683
|
useEventListener(target, "ended", () => ended.value = true);
|
|
@@ -3714,6 +3814,9 @@ function useMouse(options = {}) {
|
|
|
3714
3814
|
} else if (type === "client") {
|
|
3715
3815
|
x.value = event.clientX;
|
|
3716
3816
|
y.value = event.clientY;
|
|
3817
|
+
} else if (type === "movement") {
|
|
3818
|
+
x.value = event.movementX;
|
|
3819
|
+
y.value = event.movementY;
|
|
3717
3820
|
}
|
|
3718
3821
|
sourceType.value = "mouse";
|
|
3719
3822
|
};
|
|
@@ -3743,7 +3846,7 @@ function useMouse(options = {}) {
|
|
|
3743
3846
|
if (window) {
|
|
3744
3847
|
useEventListener(window, "mousemove", mouseHandlerWrapper, { passive: true });
|
|
3745
3848
|
useEventListener(window, "dragover", mouseHandlerWrapper, { passive: true });
|
|
3746
|
-
if (touch) {
|
|
3849
|
+
if (touch && type !== "movement") {
|
|
3747
3850
|
useEventListener(window, "touchstart", touchHandlerWrapper, { passive: true });
|
|
3748
3851
|
useEventListener(window, "touchmove", touchHandlerWrapper, { passive: true });
|
|
3749
3852
|
if (resetOnTouchEnds)
|
|
@@ -3796,6 +3899,9 @@ function useMouseInElement(target, options = {}) {
|
|
|
3796
3899
|
elementY.value = elY;
|
|
3797
3900
|
}
|
|
3798
3901
|
}, { immediate: true });
|
|
3902
|
+
useEventListener(document, "mouseleave", () => {
|
|
3903
|
+
isOutside.value = true;
|
|
3904
|
+
});
|
|
3799
3905
|
}
|
|
3800
3906
|
return {
|
|
3801
3907
|
x,
|
|
@@ -3855,17 +3961,17 @@ function useMousePressed(options = {}) {
|
|
|
3855
3961
|
};
|
|
3856
3962
|
}
|
|
3857
3963
|
|
|
3858
|
-
var __getOwnPropSymbols$
|
|
3859
|
-
var __hasOwnProp$
|
|
3860
|
-
var __propIsEnum$
|
|
3964
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
3965
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
3966
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
3861
3967
|
var __objRest$1 = (source, exclude) => {
|
|
3862
3968
|
var target = {};
|
|
3863
3969
|
for (var prop in source)
|
|
3864
|
-
if (__hasOwnProp$
|
|
3970
|
+
if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3865
3971
|
target[prop] = source[prop];
|
|
3866
|
-
if (source != null && __getOwnPropSymbols$
|
|
3867
|
-
for (var prop of __getOwnPropSymbols$
|
|
3868
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3972
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
3973
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
3974
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
|
|
3869
3975
|
target[prop] = source[prop];
|
|
3870
3976
|
}
|
|
3871
3977
|
return target;
|
|
@@ -3969,19 +4075,19 @@ function useNetwork(options = {}) {
|
|
|
3969
4075
|
};
|
|
3970
4076
|
}
|
|
3971
4077
|
|
|
3972
|
-
var __defProp$
|
|
3973
|
-
var __getOwnPropSymbols$
|
|
3974
|
-
var __hasOwnProp$
|
|
3975
|
-
var __propIsEnum$
|
|
3976
|
-
var __defNormalProp$
|
|
3977
|
-
var __spreadValues$
|
|
4078
|
+
var __defProp$7 = Object.defineProperty;
|
|
4079
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
4080
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
4081
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
4082
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4083
|
+
var __spreadValues$7 = (a, b) => {
|
|
3978
4084
|
for (var prop in b || (b = {}))
|
|
3979
|
-
if (__hasOwnProp$
|
|
3980
|
-
__defNormalProp$
|
|
3981
|
-
if (__getOwnPropSymbols$
|
|
3982
|
-
for (var prop of __getOwnPropSymbols$
|
|
3983
|
-
if (__propIsEnum$
|
|
3984
|
-
__defNormalProp$
|
|
4085
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
4086
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
4087
|
+
if (__getOwnPropSymbols$7)
|
|
4088
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
4089
|
+
if (__propIsEnum$7.call(b, prop))
|
|
4090
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
3985
4091
|
}
|
|
3986
4092
|
return a;
|
|
3987
4093
|
};
|
|
@@ -3994,7 +4100,7 @@ function useNow(options = {}) {
|
|
|
3994
4100
|
const update = () => now.value = new Date();
|
|
3995
4101
|
const controls = interval === "requestAnimationFrame" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });
|
|
3996
4102
|
if (exposeControls) {
|
|
3997
|
-
return __spreadValues$
|
|
4103
|
+
return __spreadValues$7({
|
|
3998
4104
|
now
|
|
3999
4105
|
}, controls);
|
|
4000
4106
|
} else {
|
|
@@ -4019,6 +4125,8 @@ function useObjectUrl(object) {
|
|
|
4019
4125
|
}
|
|
4020
4126
|
|
|
4021
4127
|
function useClamp(value, min, max) {
|
|
4128
|
+
if (isFunction(value) || isReadonly(value))
|
|
4129
|
+
return computed(() => clamp(resolveUnref(value), resolveUnref(min), resolveUnref(max)));
|
|
4022
4130
|
const _value = ref(value);
|
|
4023
4131
|
return computed({
|
|
4024
4132
|
get() {
|
|
@@ -4139,21 +4247,21 @@ function useParallax(target, options = {}) {
|
|
|
4139
4247
|
return { roll, tilt, source };
|
|
4140
4248
|
}
|
|
4141
4249
|
|
|
4142
|
-
var __defProp$
|
|
4250
|
+
var __defProp$6 = Object.defineProperty;
|
|
4143
4251
|
var __defProps$1 = Object.defineProperties;
|
|
4144
4252
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
4145
|
-
var __getOwnPropSymbols$
|
|
4146
|
-
var __hasOwnProp$
|
|
4147
|
-
var __propIsEnum$
|
|
4148
|
-
var __defNormalProp$
|
|
4149
|
-
var __spreadValues$
|
|
4253
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
4254
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
4255
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
4256
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4257
|
+
var __spreadValues$6 = (a, b) => {
|
|
4150
4258
|
for (var prop in b || (b = {}))
|
|
4151
|
-
if (__hasOwnProp$
|
|
4152
|
-
__defNormalProp$
|
|
4153
|
-
if (__getOwnPropSymbols$
|
|
4154
|
-
for (var prop of __getOwnPropSymbols$
|
|
4155
|
-
if (__propIsEnum$
|
|
4156
|
-
__defNormalProp$
|
|
4259
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
4260
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4261
|
+
if (__getOwnPropSymbols$6)
|
|
4262
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
4263
|
+
if (__propIsEnum$6.call(b, prop))
|
|
4264
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
4157
4265
|
}
|
|
4158
4266
|
return a;
|
|
4159
4267
|
};
|
|
@@ -4189,11 +4297,63 @@ function usePointer(options = {}) {
|
|
|
4189
4297
|
useEventListener(target, "pointermove", handler, { passive: true });
|
|
4190
4298
|
useEventListener(target, "pointerleave", () => isInside.value = false, { passive: true });
|
|
4191
4299
|
}
|
|
4192
|
-
return __spreadProps$1(__spreadValues$
|
|
4300
|
+
return __spreadProps$1(__spreadValues$6({}, toRefs(state)), {
|
|
4193
4301
|
isInside
|
|
4194
4302
|
});
|
|
4195
4303
|
}
|
|
4196
4304
|
|
|
4305
|
+
function usePointerLock(target, options = {}) {
|
|
4306
|
+
const { document = defaultDocument, pointerLockOptions } = options;
|
|
4307
|
+
const isSupported = useSupported(() => document && "pointerLockElement" in document);
|
|
4308
|
+
const element = ref();
|
|
4309
|
+
const triggerElement = ref();
|
|
4310
|
+
let targetElement;
|
|
4311
|
+
if (isSupported.value) {
|
|
4312
|
+
useEventListener(document, "pointerlockchange", () => {
|
|
4313
|
+
var _a;
|
|
4314
|
+
const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;
|
|
4315
|
+
if (targetElement && currentElement === targetElement) {
|
|
4316
|
+
element.value = document.pointerLockElement;
|
|
4317
|
+
if (!element.value)
|
|
4318
|
+
targetElement = triggerElement.value = null;
|
|
4319
|
+
}
|
|
4320
|
+
});
|
|
4321
|
+
useEventListener(document, "pointerlockerror", () => {
|
|
4322
|
+
var _a;
|
|
4323
|
+
const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;
|
|
4324
|
+
if (targetElement && currentElement === targetElement) {
|
|
4325
|
+
const action = document.pointerLockElement ? "release" : "acquire";
|
|
4326
|
+
throw new Error(`Failed to ${action} pointer lock.`);
|
|
4327
|
+
}
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4330
|
+
async function lock(e, options2) {
|
|
4331
|
+
var _a;
|
|
4332
|
+
if (!isSupported.value)
|
|
4333
|
+
throw new Error("Pointer Lock API is not supported by your browser.");
|
|
4334
|
+
triggerElement.value = e instanceof Event ? e.currentTarget : null;
|
|
4335
|
+
targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);
|
|
4336
|
+
if (!targetElement)
|
|
4337
|
+
throw new Error("Target element undefined.");
|
|
4338
|
+
targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);
|
|
4339
|
+
return await until(element).toBe(targetElement);
|
|
4340
|
+
}
|
|
4341
|
+
async function unlock() {
|
|
4342
|
+
if (!element.value)
|
|
4343
|
+
return false;
|
|
4344
|
+
document.exitPointerLock();
|
|
4345
|
+
await until(element).toBeNull();
|
|
4346
|
+
return true;
|
|
4347
|
+
}
|
|
4348
|
+
return {
|
|
4349
|
+
isSupported,
|
|
4350
|
+
element,
|
|
4351
|
+
triggerElement,
|
|
4352
|
+
lock,
|
|
4353
|
+
unlock
|
|
4354
|
+
};
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4197
4357
|
var SwipeDirection;
|
|
4198
4358
|
(function(SwipeDirection2) {
|
|
4199
4359
|
SwipeDirection2["UP"] = "UP";
|
|
@@ -4430,6 +4590,14 @@ function usePreferredReducedMotion(options) {
|
|
|
4430
4590
|
});
|
|
4431
4591
|
}
|
|
4432
4592
|
|
|
4593
|
+
function usePrevious(value, initialValue) {
|
|
4594
|
+
const previous = shallowRef(initialValue);
|
|
4595
|
+
watch(resolveRef(value), (_, oldValue) => {
|
|
4596
|
+
previous.value = oldValue;
|
|
4597
|
+
}, { flush: "sync" });
|
|
4598
|
+
return readonly(previous);
|
|
4599
|
+
}
|
|
4600
|
+
|
|
4433
4601
|
const useScreenOrientation = (options = {}) => {
|
|
4434
4602
|
const {
|
|
4435
4603
|
window = defaultWindow
|
|
@@ -4580,8 +4748,22 @@ function useScriptTag(src, onLoaded = noop, options = {}) {
|
|
|
4580
4748
|
return { scriptTag, load, unload };
|
|
4581
4749
|
}
|
|
4582
4750
|
|
|
4751
|
+
function checkOverflowScroll(ele) {
|
|
4752
|
+
const style = window.getComputedStyle(ele);
|
|
4753
|
+
if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.clientHeight < ele.scrollHeight || style.overflowY === "auto" && ele.clientWidth < ele.scrollWidth) {
|
|
4754
|
+
return true;
|
|
4755
|
+
} else {
|
|
4756
|
+
const parent = ele.parentNode;
|
|
4757
|
+
if (!parent || parent.tagName === "BODY")
|
|
4758
|
+
return false;
|
|
4759
|
+
return checkOverflowScroll(parent);
|
|
4760
|
+
}
|
|
4761
|
+
}
|
|
4583
4762
|
function preventDefault(rawEvent) {
|
|
4584
4763
|
const e = rawEvent || window.event;
|
|
4764
|
+
const _target = e.target;
|
|
4765
|
+
if (checkOverflowScroll(_target))
|
|
4766
|
+
return false;
|
|
4585
4767
|
if (e.touches.length > 1)
|
|
4586
4768
|
return true;
|
|
4587
4769
|
if (e.preventDefault)
|
|
@@ -4607,7 +4789,9 @@ function useScrollLock(element, initialState = false) {
|
|
|
4607
4789
|
if (!ele || isLocked.value)
|
|
4608
4790
|
return;
|
|
4609
4791
|
if (isIOS) {
|
|
4610
|
-
stopTouchMoveListener = useEventListener(ele, "touchmove",
|
|
4792
|
+
stopTouchMoveListener = useEventListener(ele, "touchmove", (e) => {
|
|
4793
|
+
preventDefault(e);
|
|
4794
|
+
}, { passive: false });
|
|
4611
4795
|
}
|
|
4612
4796
|
ele.style.overflow = "hidden";
|
|
4613
4797
|
isLocked.value = true;
|
|
@@ -4639,19 +4823,19 @@ function useSessionStorage(key, initialValue, options = {}) {
|
|
|
4639
4823
|
return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);
|
|
4640
4824
|
}
|
|
4641
4825
|
|
|
4642
|
-
var __defProp$
|
|
4643
|
-
var __getOwnPropSymbols$
|
|
4644
|
-
var __hasOwnProp$
|
|
4645
|
-
var __propIsEnum$
|
|
4646
|
-
var __defNormalProp$
|
|
4647
|
-
var __spreadValues$
|
|
4826
|
+
var __defProp$5 = Object.defineProperty;
|
|
4827
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
4828
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
4829
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
4830
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4831
|
+
var __spreadValues$5 = (a, b) => {
|
|
4648
4832
|
for (var prop in b || (b = {}))
|
|
4649
|
-
if (__hasOwnProp$
|
|
4650
|
-
__defNormalProp$
|
|
4651
|
-
if (__getOwnPropSymbols$
|
|
4652
|
-
for (var prop of __getOwnPropSymbols$
|
|
4653
|
-
if (__propIsEnum$
|
|
4654
|
-
__defNormalProp$
|
|
4833
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
4834
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4835
|
+
if (__getOwnPropSymbols$5)
|
|
4836
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
4837
|
+
if (__propIsEnum$5.call(b, prop))
|
|
4838
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
4655
4839
|
}
|
|
4656
4840
|
return a;
|
|
4657
4841
|
};
|
|
@@ -4661,7 +4845,7 @@ function useShare(shareOptions = {}, options = {}) {
|
|
|
4661
4845
|
const isSupported = useSupported(() => _navigator && "canShare" in _navigator);
|
|
4662
4846
|
const share = async (overrideOptions = {}) => {
|
|
4663
4847
|
if (isSupported.value) {
|
|
4664
|
-
const data = __spreadValues$
|
|
4848
|
+
const data = __spreadValues$5(__spreadValues$5({}, resolveUnref(shareOptions)), resolveUnref(overrideOptions));
|
|
4665
4849
|
let granted = true;
|
|
4666
4850
|
if (data.files && _navigator.canShare)
|
|
4667
4851
|
granted = _navigator.canShare({ files: data.files });
|
|
@@ -4836,6 +5020,10 @@ function useSpeechSynthesis(text, options = {}) {
|
|
|
4836
5020
|
synth.cancel();
|
|
4837
5021
|
utterance && synth.speak(utterance.value);
|
|
4838
5022
|
};
|
|
5023
|
+
const stop = () => {
|
|
5024
|
+
synth.cancel();
|
|
5025
|
+
isPlaying.value = false;
|
|
5026
|
+
};
|
|
4839
5027
|
if (isSupported.value) {
|
|
4840
5028
|
bindEventsForUtterance(utterance.value);
|
|
4841
5029
|
watch(lang, (lang2) => {
|
|
@@ -4863,6 +5051,7 @@ function useSpeechSynthesis(text, options = {}) {
|
|
|
4863
5051
|
status,
|
|
4864
5052
|
utterance,
|
|
4865
5053
|
error,
|
|
5054
|
+
stop,
|
|
4866
5055
|
toggle,
|
|
4867
5056
|
speak
|
|
4868
5057
|
};
|
|
@@ -4943,6 +5132,22 @@ function useStepper(steps, initialStep) {
|
|
|
4943
5132
|
};
|
|
4944
5133
|
}
|
|
4945
5134
|
|
|
5135
|
+
var __defProp$4 = Object.defineProperty;
|
|
5136
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
5137
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
5138
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
5139
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5140
|
+
var __spreadValues$4 = (a, b) => {
|
|
5141
|
+
for (var prop in b || (b = {}))
|
|
5142
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
5143
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
5144
|
+
if (__getOwnPropSymbols$4)
|
|
5145
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
5146
|
+
if (__propIsEnum$4.call(b, prop))
|
|
5147
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
5148
|
+
}
|
|
5149
|
+
return a;
|
|
5150
|
+
};
|
|
4946
5151
|
function useStorageAsync(key, initialValue, storage, options = {}) {
|
|
4947
5152
|
var _a;
|
|
4948
5153
|
const {
|
|
@@ -4950,6 +5155,7 @@ function useStorageAsync(key, initialValue, storage, options = {}) {
|
|
|
4950
5155
|
deep = true,
|
|
4951
5156
|
listenToStorageChanges = true,
|
|
4952
5157
|
writeDefaults = true,
|
|
5158
|
+
mergeDefaults = false,
|
|
4953
5159
|
shallow,
|
|
4954
5160
|
window = defaultWindow,
|
|
4955
5161
|
eventFilter,
|
|
@@ -4980,6 +5186,14 @@ function useStorageAsync(key, initialValue, storage, options = {}) {
|
|
|
4980
5186
|
data.value = rawInit;
|
|
4981
5187
|
if (writeDefaults && rawInit !== null)
|
|
4982
5188
|
await storage.setItem(key, await serializer.write(rawInit));
|
|
5189
|
+
} else if (mergeDefaults) {
|
|
5190
|
+
const value = await serializer.read(rawValue);
|
|
5191
|
+
if (isFunction(mergeDefaults))
|
|
5192
|
+
data.value = mergeDefaults(value, rawInit);
|
|
5193
|
+
else if (type === "object" && !Array.isArray(value))
|
|
5194
|
+
data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);
|
|
5195
|
+
else
|
|
5196
|
+
data.value = value;
|
|
4983
5197
|
} else {
|
|
4984
5198
|
data.value = await serializer.read(rawValue);
|
|
4985
5199
|
}
|
|
@@ -5035,7 +5249,7 @@ function useStyleTag(css, options = {}) {
|
|
|
5035
5249
|
if (isLoaded.value)
|
|
5036
5250
|
return;
|
|
5037
5251
|
stop = watch(cssRef, (value) => {
|
|
5038
|
-
el.
|
|
5252
|
+
el.textContent = value;
|
|
5039
5253
|
}, { immediate: true });
|
|
5040
5254
|
isLoaded.value = true;
|
|
5041
5255
|
};
|
|
@@ -5152,6 +5366,7 @@ function useTextareaAutosize(options) {
|
|
|
5152
5366
|
(_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);
|
|
5153
5367
|
}
|
|
5154
5368
|
watch([input, textarea], triggerResize, { immediate: true });
|
|
5369
|
+
useResizeObserver(textarea, () => triggerResize());
|
|
5155
5370
|
if (options == null ? void 0 : options.watch)
|
|
5156
5371
|
watch(options.watch, triggerResize, { immediate: true, deep: true });
|
|
5157
5372
|
return {
|
|
@@ -5215,7 +5430,7 @@ var __objRest = (source, exclude) => {
|
|
|
5215
5430
|
}
|
|
5216
5431
|
return target;
|
|
5217
5432
|
};
|
|
5218
|
-
const
|
|
5433
|
+
const DEFAULT_UNITS = [
|
|
5219
5434
|
{ max: 6e4, value: 1e3, name: "second" },
|
|
5220
5435
|
{ max: 276e4, value: 6e4, name: "minute" },
|
|
5221
5436
|
{ max: 72e6, value: 36e5, name: "hour" },
|
|
@@ -5234,37 +5449,46 @@ const DEFAULT_MESSAGES = {
|
|
|
5234
5449
|
week: (n, past) => n === 1 ? past ? "last week" : "next week" : `${n} week${n > 1 ? "s" : ""}`,
|
|
5235
5450
|
hour: (n) => `${n} hour${n > 1 ? "s" : ""}`,
|
|
5236
5451
|
minute: (n) => `${n} minute${n > 1 ? "s" : ""}`,
|
|
5237
|
-
second: (n) => `${n} second${n > 1 ? "s" : ""}
|
|
5452
|
+
second: (n) => `${n} second${n > 1 ? "s" : ""}`,
|
|
5453
|
+
invalid: ""
|
|
5238
5454
|
};
|
|
5239
5455
|
const DEFAULT_FORMATTER = (date) => date.toISOString().slice(0, 10);
|
|
5240
5456
|
function useTimeAgo(time, options = {}) {
|
|
5241
5457
|
const {
|
|
5242
5458
|
controls: exposeControls = false,
|
|
5459
|
+
updateInterval = 3e4
|
|
5460
|
+
} = options;
|
|
5461
|
+
const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, ["now"]);
|
|
5462
|
+
const timeAgo = computed(() => formatTimeAgo(new Date(resolveUnref(time)), options, unref(now.value)));
|
|
5463
|
+
if (exposeControls) {
|
|
5464
|
+
return __spreadValues$2({
|
|
5465
|
+
timeAgo
|
|
5466
|
+
}, controls);
|
|
5467
|
+
} else {
|
|
5468
|
+
return timeAgo;
|
|
5469
|
+
}
|
|
5470
|
+
}
|
|
5471
|
+
function formatTimeAgo(from, options = {}, now = Date.now()) {
|
|
5472
|
+
var _a;
|
|
5473
|
+
const {
|
|
5243
5474
|
max,
|
|
5244
|
-
updateInterval = 3e4,
|
|
5245
5475
|
messages = DEFAULT_MESSAGES,
|
|
5246
5476
|
fullDateFormatter = DEFAULT_FORMATTER,
|
|
5247
|
-
|
|
5477
|
+
units = DEFAULT_UNITS,
|
|
5478
|
+
showSecond = false,
|
|
5479
|
+
rounding = "round"
|
|
5248
5480
|
} = options;
|
|
5249
|
-
const
|
|
5250
|
-
const
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
const unitMax = (_a2 = UNITS.find((i) => i.name === max)) == null ? void 0 : _a2.max;
|
|
5261
|
-
if (unitMax && absDiff > unitMax)
|
|
5262
|
-
return fullDateFormatter(new Date(from));
|
|
5263
|
-
}
|
|
5264
|
-
for (const unit of UNITS) {
|
|
5265
|
-
if (absDiff < unit.max)
|
|
5266
|
-
return format(diff, unit);
|
|
5267
|
-
}
|
|
5481
|
+
const roundFn = typeof rounding === "number" ? (n) => +n.toFixed(rounding) : Math[rounding];
|
|
5482
|
+
const diff = +now - +from;
|
|
5483
|
+
const absDiff = Math.abs(diff);
|
|
5484
|
+
function getValue(diff2, unit) {
|
|
5485
|
+
return roundFn(Math.abs(diff2) / unit.value);
|
|
5486
|
+
}
|
|
5487
|
+
function format(diff2, unit) {
|
|
5488
|
+
const val = getValue(diff2, unit);
|
|
5489
|
+
const past = diff2 > 0;
|
|
5490
|
+
const str = applyFormat(unit.name, val, past);
|
|
5491
|
+
return applyFormat(past ? "past" : "future", str, past);
|
|
5268
5492
|
}
|
|
5269
5493
|
function applyFormat(name, val, isPast) {
|
|
5270
5494
|
const formatter = messages[name];
|
|
@@ -5272,20 +5496,23 @@ function useTimeAgo(time, options = {}) {
|
|
|
5272
5496
|
return formatter(val, isPast);
|
|
5273
5497
|
return formatter.replace("{0}", val.toString());
|
|
5274
5498
|
}
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5499
|
+
if (absDiff < 6e4 && !showSecond)
|
|
5500
|
+
return messages.justNow;
|
|
5501
|
+
if (typeof max === "number" && absDiff > max)
|
|
5502
|
+
return fullDateFormatter(new Date(from));
|
|
5503
|
+
if (typeof max === "string") {
|
|
5504
|
+
const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;
|
|
5505
|
+
if (unitMax && absDiff > unitMax)
|
|
5506
|
+
return fullDateFormatter(new Date(from));
|
|
5280
5507
|
}
|
|
5281
|
-
const
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
return timeAgo;
|
|
5508
|
+
for (const [idx, unit] of units.entries()) {
|
|
5509
|
+
const val = getValue(diff, unit);
|
|
5510
|
+
if (val <= 0 && units[idx - 1])
|
|
5511
|
+
return format(diff, units[idx - 1]);
|
|
5512
|
+
if (absDiff < unit.max)
|
|
5513
|
+
return format(diff, unit);
|
|
5288
5514
|
}
|
|
5515
|
+
return messages.invalid;
|
|
5289
5516
|
}
|
|
5290
5517
|
|
|
5291
5518
|
function useTimeoutPoll(fn, interval, timeoutPollOptions) {
|
|
@@ -5773,7 +6000,7 @@ function useVirtualList(list, options) {
|
|
|
5773
6000
|
wrapperProps
|
|
5774
6001
|
};
|
|
5775
6002
|
}
|
|
5776
|
-
function
|
|
6003
|
+
function useVirtualListResources(list) {
|
|
5777
6004
|
const containerRef = ref(null);
|
|
5778
6005
|
const size = useElementSize(containerRef);
|
|
5779
6006
|
const currentList = ref([]);
|
|
@@ -5782,19 +6009,18 @@ function useVirtualListResourses(list) {
|
|
|
5782
6009
|
return { state, source, currentList, size, containerRef };
|
|
5783
6010
|
}
|
|
5784
6011
|
function createGetViewCapacity(state, source, itemSize) {
|
|
5785
|
-
return (
|
|
6012
|
+
return (containerSize) => {
|
|
5786
6013
|
if (typeof itemSize === "number")
|
|
5787
|
-
return Math.ceil(
|
|
6014
|
+
return Math.ceil(containerSize / itemSize);
|
|
5788
6015
|
const { start = 0 } = state.value;
|
|
5789
6016
|
let sum = 0;
|
|
5790
6017
|
let capacity = 0;
|
|
5791
6018
|
for (let i = start; i < source.value.length; i++) {
|
|
5792
|
-
const
|
|
5793
|
-
sum +=
|
|
5794
|
-
|
|
5795
|
-
|
|
6019
|
+
const size = itemSize(i);
|
|
6020
|
+
sum += size;
|
|
6021
|
+
capacity = i;
|
|
6022
|
+
if (sum > containerSize)
|
|
5796
6023
|
break;
|
|
5797
|
-
}
|
|
5798
6024
|
}
|
|
5799
6025
|
return capacity - start;
|
|
5800
6026
|
};
|
|
@@ -5870,7 +6096,7 @@ function createScrollTo(type, calculateRange, getDistance, containerRef) {
|
|
|
5870
6096
|
};
|
|
5871
6097
|
}
|
|
5872
6098
|
function useHorizontalVirtualList(options, list) {
|
|
5873
|
-
const resources =
|
|
6099
|
+
const resources = useVirtualListResources(list);
|
|
5874
6100
|
const { state, source, currentList, size, containerRef } = resources;
|
|
5875
6101
|
const containerStyle = { overflowX: "auto" };
|
|
5876
6102
|
const { itemWidth, overscan = 5 } = options;
|
|
@@ -5902,7 +6128,7 @@ function useHorizontalVirtualList(options, list) {
|
|
|
5902
6128
|
};
|
|
5903
6129
|
}
|
|
5904
6130
|
function useVerticalVirtualList(options, list) {
|
|
5905
|
-
const resources =
|
|
6131
|
+
const resources = useVirtualListResources(list);
|
|
5906
6132
|
const { state, source, currentList, size, containerRef } = resources;
|
|
5907
6133
|
const containerStyle = { overflowY: "auto" };
|
|
5908
6134
|
const { itemHeight, overscan = 5 } = options;
|
|
@@ -6085,7 +6311,7 @@ function useWebSocket(url, options = {}) {
|
|
|
6085
6311
|
return true;
|
|
6086
6312
|
};
|
|
6087
6313
|
const _init = () => {
|
|
6088
|
-
if (explicitlyClosed)
|
|
6314
|
+
if (explicitlyClosed || typeof urlRef.value === "undefined")
|
|
6089
6315
|
return;
|
|
6090
6316
|
const ws = new WebSocket(urlRef.value, protocols);
|
|
6091
6317
|
wsRef.value = ws;
|
|
@@ -6328,11 +6554,11 @@ function useWindowScroll({ window = defaultWindow } = {}) {
|
|
|
6328
6554
|
y: ref(0)
|
|
6329
6555
|
};
|
|
6330
6556
|
}
|
|
6331
|
-
const x = ref(window.
|
|
6332
|
-
const y = ref(window.
|
|
6333
|
-
useEventListener("scroll", () => {
|
|
6334
|
-
x.value = window.
|
|
6335
|
-
y.value = window.
|
|
6557
|
+
const x = ref(window.scrollX);
|
|
6558
|
+
const y = ref(window.scrollY);
|
|
6559
|
+
useEventListener(window, "scroll", () => {
|
|
6560
|
+
x.value = window.scrollX;
|
|
6561
|
+
y.value = window.scrollY;
|
|
6336
6562
|
}, {
|
|
6337
6563
|
capture: false,
|
|
6338
6564
|
passive: true
|
|
@@ -6369,4 +6595,4 @@ function useWindowSize(options = {}) {
|
|
|
6369
6595
|
return { width, height };
|
|
6370
6596
|
}
|
|
6371
6597
|
|
|
6372
|
-
export { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };
|
|
6598
|
+
export { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };
|