@histoire/vendors 0.8.4 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/b-floating-vue.d.ts +3 -0
- package/dist/client/{floating-vue.js → b-floating-vue.js} +13 -18
- package/dist/client/b-iconify.d.ts +1 -0
- package/dist/client/{iconify.js → b-iconify.js} +0 -0
- package/dist/client/b-pinia.d.ts +1 -0
- package/dist/client/{pinia.js → b-pinia.js} +41 -8
- package/dist/client/b-scroll.d.ts +2 -0
- package/dist/client/{scroll.js → b-scroll.js} +1 -1
- package/dist/client/b-vue-router.d.ts +1 -0
- package/dist/client/{vue-router.js → b-vue-router.js} +279 -158
- package/dist/client/b-vue-use.d.ts +1 -0
- package/dist/client/{vue-use.js → b-vue-use.js} +1070 -603
- package/dist/client/b-vue.d.ts +1 -0
- package/dist/client/{vue.js → b-vue.js} +1 -1
- package/dist/client/node_modules/@babel/parser/package.json +46 -0
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +214 -0
- package/dist/client/node_modules/@floating-ui/core/index.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/core/package.json +70 -0
- package/dist/client/node_modules/@floating-ui/core/src/_babel.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/core/src/computeCoordsFromPlacement.d.ts +4 -0
- package/dist/client/node_modules/@floating-ui/core/src/computePosition.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/detectOverflow.d.ts +9 -0
- package/dist/client/node_modules/@floating-ui/core/src/enums.d.ts +4 -0
- package/dist/client/node_modules/@floating-ui/core/src/index.d.ts +11 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/arrow.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts +9 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/flip.d.ts +10 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/hide.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/inline.d.ts +5 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/offset.d.ts +21 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/shift.d.ts +32 -0
- package/dist/client/node_modules/@floating-ui/core/src/middleware/size.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/core/src/types.d.ts +148 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/expandPaddingObject.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignment.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignmentSides.d.ts +5 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getBasePlacement.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getCrossAxis.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getExpandedPlacements.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getLengthFromAxis.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getMainAxisFromPlacement.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositeAlignmentPlacement.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositePlacement.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/getPaddingObject.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/math.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/rectToClientRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/core/src/utils/within.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/index.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/package.json +75 -0
- package/dist/client/node_modules/@floating-ui/dom/src/index.d.ts +7 -0
- package/dist/client/node_modules/@floating-ui/dom/src/platform.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/types.d.ts +27 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/contains.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/convertOffsetParentRelativeRectToViewportRelativeRect.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingClientRect.d.ts +6 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getComputedStyle.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getDimensions.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentElement.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getDocumentRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeName.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getNodeScroll.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getOffsetParent.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getParentNode.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getRectRelativeToOffsetParent.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParent.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParents.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts +2 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts +1 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/is.d.ts +15 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/math.d.ts +3 -0
- package/dist/client/node_modules/@floating-ui/dom/src/utils/window.d.ts +2 -0
- package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +680 -0
- package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +347 -0
- package/dist/client/node_modules/@iconify/vue/offline/package.json +14 -0
- package/dist/client/node_modules/@iconify/vue/package.json +61 -0
- package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +176 -0
- package/dist/client/node_modules/@types/web-bluetooth/package.json +40 -0
- package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1198 -0
- package/dist/client/node_modules/@vue/compiler-core/package.json +43 -0
- package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +66 -0
- package/dist/client/node_modules/@vue/compiler-dom/package.json +43 -0
- package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +321 -0
- package/dist/client/node_modules/@vue/compiler-sfc/package.json +59 -0
- package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +6 -0
- package/dist/client/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +108 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +1 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +77 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +5 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +179 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +6 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +4 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +2 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +15 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +18 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +47 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +20 -0
- package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +2 -0
- package/dist/client/node_modules/@vue/devtools-api/package.json +37 -0
- package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +347 -0
- package/dist/client/node_modules/@vue/reactivity/package.json +41 -0
- package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +33 -0
- package/dist/client/node_modules/@vue/reactivity-transform/package.json +41 -0
- package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +2018 -0
- package/dist/client/node_modules/@vue/runtime-core/package.json +38 -0
- package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1522 -0
- package/dist/client/node_modules/@vue/runtime-dom/package.json +42 -0
- package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +100 -0
- package/dist/client/node_modules/@vue/server-renderer/package.json +41 -0
- package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +356 -0
- package/dist/client/node_modules/@vue/shared/package.json +33 -0
- package/dist/client/node_modules/@vueuse/core/index.d.ts +4305 -0
- package/dist/client/node_modules/@vueuse/core/metadata.d.ts +1 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/@vueuse/shared/index.d.ts +874 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/@vueuse/shared/package.json +50 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v2/index.d.ts +31 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v2.7/index.d.ts +52 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/lib/v3/index.d.ts +22 -0
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +47 -0
- package/dist/client/node_modules/@vueuse/core/package.json +59 -0
- package/dist/client/node_modules/@vueuse/metadata/index.d.ts +75 -0
- package/dist/client/node_modules/@vueuse/metadata/package.json +39 -0
- package/dist/client/node_modules/compute-scroll-into-view/package.json +90 -0
- package/dist/client/node_modules/compute-scroll-into-view/typings/index.d.ts +19 -0
- package/dist/client/node_modules/csstype/index.d.ts +38372 -0
- package/dist/client/node_modules/csstype/package.json +57 -0
- package/dist/client/node_modules/estree-walker/dist/esm/package.json +1 -0
- package/dist/client/node_modules/estree-walker/package.json +37 -0
- package/dist/client/node_modules/estree-walker/src/package.json +1 -0
- package/dist/client/node_modules/estree-walker/types/async.d.ts +53 -0
- package/dist/client/node_modules/estree-walker/types/index.d.ts +56 -0
- package/dist/client/node_modules/estree-walker/types/sync.d.ts +53 -0
- package/dist/client/node_modules/estree-walker/types/walker.d.ts +37 -0
- package/dist/client/node_modules/floating-vue/dist/components/Dropdown.vue.d.ts +25 -0
- package/dist/client/node_modules/floating-vue/dist/components/Menu.vue.d.ts +25 -0
- package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +375 -0
- package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +367 -0
- package/dist/client/node_modules/floating-vue/dist/components/PopperContent.vue.d.ts +48 -0
- package/dist/client/node_modules/floating-vue/dist/components/PopperMethods.d.ts +9 -0
- package/dist/client/node_modules/floating-vue/dist/components/PopperWrapper.vue.d.ts +28 -0
- package/dist/client/node_modules/floating-vue/dist/components/ThemeClass.d.ts +6 -0
- package/dist/client/node_modules/floating-vue/dist/components/Tooltip.vue.d.ts +25 -0
- package/dist/client/node_modules/floating-vue/dist/components/TooltipDirective.vue.d.ts +28 -0
- package/dist/client/node_modules/floating-vue/dist/config.d.ts +11 -0
- package/dist/client/node_modules/floating-vue/dist/directives/v-close-popper.d.ts +13 -0
- package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.d.ts +27 -0
- package/dist/client/node_modules/floating-vue/dist/directives/v-tooltip.spec.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/index.d.ts +415 -0
- package/dist/client/node_modules/floating-vue/dist/util/assign-deep.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/util/env.d.ts +2 -0
- package/dist/client/node_modules/floating-vue/dist/util/events.d.ts +12 -0
- package/dist/client/node_modules/floating-vue/dist/util/frame.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/util/lang.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/dist/util/popper.d.ts +3 -0
- package/dist/client/node_modules/floating-vue/package.json +71 -0
- package/dist/client/node_modules/floating-vue/src/global-shim.d.ts +1 -0
- package/dist/client/node_modules/floating-vue/src/vue-shim.d.ts +5 -0
- package/dist/client/node_modules/magic-string/index.d.ts +221 -0
- package/dist/client/node_modules/magic-string/package.json +52 -0
- package/dist/client/node_modules/nanoid/async/index.d.ts +56 -0
- package/dist/client/node_modules/nanoid/async/package.json +12 -0
- package/dist/client/node_modules/nanoid/index.d.ts +91 -0
- package/dist/client/node_modules/nanoid/non-secure/index.d.ts +33 -0
- package/dist/client/node_modules/nanoid/non-secure/package.json +6 -0
- package/dist/client/node_modules/nanoid/package.json +60 -0
- package/dist/client/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/dist/client/node_modules/picocolors/package.json +25 -0
- package/dist/client/node_modules/picocolors/picocolors.d.ts +5 -0
- package/dist/client/node_modules/pinia/dist/pinia.d.ts +963 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +31 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +52 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +22 -0
- package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +47 -0
- package/dist/client/node_modules/pinia/package.json +101 -0
- package/dist/client/node_modules/postcss/lib/at-rule.d.ts +106 -0
- package/dist/client/node_modules/postcss/lib/comment.d.ts +56 -0
- package/dist/client/node_modules/postcss/lib/container.d.ts +442 -0
- package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +239 -0
- package/dist/client/node_modules/postcss/lib/declaration.d.ts +124 -0
- package/dist/client/node_modules/postcss/lib/document.d.ts +57 -0
- package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +5 -0
- package/dist/client/node_modules/postcss/lib/input.d.ts +150 -0
- package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +176 -0
- package/dist/client/node_modules/postcss/lib/list.d.ts +51 -0
- package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +37 -0
- package/dist/client/node_modules/postcss/lib/node.d.ts +478 -0
- package/dist/client/node_modules/postcss/lib/parse.d.ts +5 -0
- package/dist/client/node_modules/postcss/lib/postcss.d.ts +473 -0
- package/dist/client/node_modules/postcss/lib/previous-map.d.ts +72 -0
- package/dist/client/node_modules/postcss/lib/processor.d.ts +102 -0
- package/dist/client/node_modules/postcss/lib/result.d.ts +196 -0
- package/dist/client/node_modules/postcss/lib/root.d.ts +73 -0
- package/dist/client/node_modules/postcss/lib/rule.d.ts +104 -0
- package/dist/client/node_modules/postcss/lib/stringifier.d.ts +37 -0
- package/dist/client/node_modules/postcss/lib/stringify.d.ts +5 -0
- package/dist/client/node_modules/postcss/lib/warning.d.ts +138 -0
- package/dist/client/node_modules/postcss/package.json +85 -0
- package/dist/client/node_modules/scroll-into-view-if-needed/package.json +144 -0
- package/dist/client/node_modules/scroll-into-view-if-needed/typings/index.d.ts +13 -0
- package/dist/client/node_modules/scroll-into-view-if-needed/typings/types.d.ts +19 -0
- package/dist/client/node_modules/source-map/package.json +73 -0
- package/dist/client/node_modules/source-map/source-map.d.ts +98 -0
- package/dist/client/node_modules/source-map-js/package.json +71 -0
- package/dist/client/node_modules/source-map-js/source-map.d.ts +115 -0
- package/dist/client/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +5 -0
- package/dist/client/node_modules/sourcemap-codec/package.json +53 -0
- package/dist/client/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/dist/client/node_modules/vue/compiler-sfc/package.json +5 -0
- package/dist/client/node_modules/vue/dist/vue.d.ts +9 -0
- package/dist/client/node_modules/vue/macros-global.d.ts +19 -0
- package/dist/client/node_modules/vue/macros.d.ts +110 -0
- package/dist/client/node_modules/vue/package.json +75 -0
- package/dist/client/node_modules/vue/ref-macros.d.ts +2 -0
- package/dist/client/node_modules/vue/server-renderer/index.d.ts +1 -0
- package/dist/client/node_modules/vue/server-renderer/package.json +5 -0
- package/dist/client/node_modules/vue-resize/package.json +77 -0
- package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +1491 -0
- package/dist/client/node_modules/vue-router/package.json +114 -0
- package/dist/client/vue.runtime.esm-bundler.js +24 -19
- package/entries.js +7 -7
- package/floating-vue.d.ts +3 -0
- package/iconify.d.ts +3 -0
- package/package.json +14 -5
- package/pinia.d.ts +3 -0
- package/rollup.config.mjs +117 -0
- package/scroll.d.ts +3 -0
- package/src/client/b-floating-vue.ts +3 -0
- package/src/client/b-iconify.ts +1 -0
- package/src/client/b-pinia.ts +1 -0
- package/src/client/b-scroll.ts +2 -0
- package/src/client/b-vue-router.ts +1 -0
- package/src/client/b-vue-use.ts +1 -0
- package/src/client/b-vue.ts +1 -0
- package/vue-router.d.ts +3 -0
- package/vue-use.d.ts +3 -0
- package/vue.d.ts +3 -0
- package/dist/client/floating-vue.d.ts +0 -2
- package/dist/client/iconify.d.ts +0 -1
- package/dist/client/pinia.d.ts +0 -1
- package/dist/client/scroll.d.ts +0 -1
- package/dist/client/vue-router.d.ts +0 -1
- package/dist/client/vue-use.d.ts +0 -1
- package/dist/client/vue.d.ts +0 -1
- package/rollup.config.js +0 -37
- package/src/client/floating-vue.ts +0 -2
- package/src/client/iconify.ts +0 -1
- package/src/client/pinia.ts +0 -1
- package/src/client/scroll.ts +0 -1
- package/src/client/vue-router.ts +0 -1
- package/src/client/vue-use.ts +0 -1
- package/src/client/vue.ts +0 -1
|
@@ -1,61 +1,249 @@
|
|
|
1
1
|
import { a as isVue3, i as isVue2, s as set$1, d as del } from './index.js';
|
|
2
|
-
import { R as shallowRef, P as watchEffect, S as readonly, u as ref,
|
|
3
|
-
|
|
4
|
-
var __defProp$
|
|
5
|
-
var __defProps$
|
|
6
|
-
var __getOwnPropDescs$
|
|
7
|
-
var __getOwnPropSymbols$
|
|
8
|
-
var __hasOwnProp$
|
|
9
|
-
var __propIsEnum$
|
|
10
|
-
var __defNormalProp$
|
|
11
|
-
var __spreadValues$
|
|
2
|
+
import { R as shallowRef, P as watchEffect, S as readonly, C as unref, u as ref, B as watch, T as customRef, E as effectScope, Q as provide, z as inject, U as getCurrentScope, V as onScopeDispose, G as isRef, K as computed, L as reactive, J as toRefs$1, M as toRef, y as getCurrentInstance, W as onBeforeMount, b as nextTick, X as onBeforeUnmount, Y as onMounted, I as onUnmounted, H as isReactive, Z as onUpdated, D as markRaw, _ as onBeforeUpdate } from './vue.runtime.esm-bundler.js';
|
|
3
|
+
|
|
4
|
+
var __defProp$9$1 = Object.defineProperty;
|
|
5
|
+
var __defProps$6$1 = Object.defineProperties;
|
|
6
|
+
var __getOwnPropDescs$6$1 = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropSymbols$b$1 = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp$b$1 = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum$b$1 = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp$9$1 = (obj, key, value) => key in obj ? __defProp$9$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues$9$1 = (a, b) => {
|
|
12
12
|
for (var prop in b || (b = {}))
|
|
13
|
-
if (__hasOwnProp$
|
|
14
|
-
__defNormalProp$
|
|
15
|
-
if (__getOwnPropSymbols$
|
|
16
|
-
for (var prop of __getOwnPropSymbols$
|
|
17
|
-
if (__propIsEnum$
|
|
18
|
-
__defNormalProp$
|
|
13
|
+
if (__hasOwnProp$b$1.call(b, prop))
|
|
14
|
+
__defNormalProp$9$1(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols$b$1)
|
|
16
|
+
for (var prop of __getOwnPropSymbols$b$1(b)) {
|
|
17
|
+
if (__propIsEnum$b$1.call(b, prop))
|
|
18
|
+
__defNormalProp$9$1(a, prop, b[prop]);
|
|
19
19
|
}
|
|
20
20
|
return a;
|
|
21
21
|
};
|
|
22
|
-
var __spreadProps$
|
|
22
|
+
var __spreadProps$6$1 = (a, b) => __defProps$6$1(a, __getOwnPropDescs$6$1(b));
|
|
23
23
|
function computedEager(fn, options) {
|
|
24
24
|
var _a;
|
|
25
25
|
const result = shallowRef();
|
|
26
26
|
watchEffect(() => {
|
|
27
27
|
result.value = fn();
|
|
28
|
-
}, __spreadProps$
|
|
28
|
+
}, __spreadProps$6$1(__spreadValues$9$1({}, options), {
|
|
29
29
|
flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
|
|
30
30
|
}));
|
|
31
31
|
return readonly(result);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
var _a;
|
|
35
|
+
const isClient = typeof window !== "undefined";
|
|
36
|
+
const isDef = (val) => typeof val !== "undefined";
|
|
37
|
+
const assert = (condition, ...infos) => {
|
|
38
|
+
if (!condition)
|
|
39
|
+
console.warn(...infos);
|
|
40
|
+
};
|
|
41
|
+
const toString = Object.prototype.toString;
|
|
42
|
+
const isBoolean = (val) => typeof val === "boolean";
|
|
43
|
+
const isFunction = (val) => typeof val === "function";
|
|
44
|
+
const isNumber = (val) => typeof val === "number";
|
|
45
|
+
const isString = (val) => typeof val === "string";
|
|
46
|
+
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
47
|
+
const isWindow = (val) => typeof window !== "undefined" && toString.call(val) === "[object Window]";
|
|
48
|
+
const now = () => Date.now();
|
|
49
|
+
const timestamp = () => +Date.now();
|
|
50
|
+
const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
51
|
+
const noop = () => {
|
|
52
|
+
};
|
|
53
|
+
const rand = (min, max) => {
|
|
54
|
+
min = Math.ceil(min);
|
|
55
|
+
max = Math.floor(max);
|
|
56
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
57
|
+
};
|
|
58
|
+
const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
59
|
+
|
|
60
|
+
function createFilterWrapper(filter, fn) {
|
|
61
|
+
function wrapper(...args) {
|
|
62
|
+
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
63
|
+
}
|
|
64
|
+
return wrapper;
|
|
65
|
+
}
|
|
66
|
+
const bypassFilter = (invoke) => {
|
|
67
|
+
return invoke();
|
|
68
|
+
};
|
|
69
|
+
function debounceFilter(ms, options = {}) {
|
|
70
|
+
let timer;
|
|
71
|
+
let maxTimer;
|
|
72
|
+
const filter = (invoke) => {
|
|
73
|
+
const duration = unref(ms);
|
|
74
|
+
const maxDuration = unref(options.maxWait);
|
|
75
|
+
if (timer)
|
|
76
|
+
clearTimeout(timer);
|
|
77
|
+
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
78
|
+
if (maxTimer) {
|
|
79
|
+
clearTimeout(maxTimer);
|
|
80
|
+
maxTimer = null;
|
|
81
|
+
}
|
|
82
|
+
return invoke();
|
|
83
|
+
}
|
|
84
|
+
if (maxDuration && !maxTimer) {
|
|
85
|
+
maxTimer = setTimeout(() => {
|
|
86
|
+
if (timer)
|
|
87
|
+
clearTimeout(timer);
|
|
88
|
+
maxTimer = null;
|
|
89
|
+
invoke();
|
|
90
|
+
}, maxDuration);
|
|
91
|
+
}
|
|
92
|
+
timer = setTimeout(() => {
|
|
93
|
+
if (maxTimer)
|
|
94
|
+
clearTimeout(maxTimer);
|
|
95
|
+
maxTimer = null;
|
|
96
|
+
invoke();
|
|
97
|
+
}, duration);
|
|
98
|
+
};
|
|
99
|
+
return filter;
|
|
100
|
+
}
|
|
101
|
+
function throttleFilter(ms, trailing = true, leading = true) {
|
|
102
|
+
let lastExec = 0;
|
|
103
|
+
let timer;
|
|
104
|
+
let isLeading = true;
|
|
105
|
+
const clear = () => {
|
|
106
|
+
if (timer) {
|
|
107
|
+
clearTimeout(timer);
|
|
108
|
+
timer = void 0;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const filter = (invoke) => {
|
|
112
|
+
const duration = unref(ms);
|
|
113
|
+
const elapsed = Date.now() - lastExec;
|
|
114
|
+
clear();
|
|
115
|
+
if (duration <= 0) {
|
|
116
|
+
lastExec = Date.now();
|
|
117
|
+
return invoke();
|
|
118
|
+
}
|
|
119
|
+
if (elapsed > duration && (leading || !isLeading)) {
|
|
120
|
+
lastExec = Date.now();
|
|
121
|
+
invoke();
|
|
122
|
+
} else if (trailing) {
|
|
123
|
+
timer = setTimeout(() => {
|
|
124
|
+
lastExec = Date.now();
|
|
125
|
+
isLeading = true;
|
|
126
|
+
clear();
|
|
127
|
+
invoke();
|
|
128
|
+
}, duration);
|
|
129
|
+
}
|
|
130
|
+
if (!leading && !timer)
|
|
131
|
+
timer = setTimeout(() => isLeading = true, duration);
|
|
132
|
+
isLeading = false;
|
|
133
|
+
};
|
|
134
|
+
return filter;
|
|
135
|
+
}
|
|
136
|
+
function pausableFilter(extendFilter = bypassFilter) {
|
|
137
|
+
const isActive = ref(true);
|
|
138
|
+
function pause() {
|
|
139
|
+
isActive.value = false;
|
|
140
|
+
}
|
|
141
|
+
function resume() {
|
|
142
|
+
isActive.value = true;
|
|
143
|
+
}
|
|
144
|
+
const eventFilter = (...args) => {
|
|
145
|
+
if (isActive.value)
|
|
146
|
+
extendFilter(...args);
|
|
147
|
+
};
|
|
148
|
+
return { isActive, pause, resume, eventFilter };
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function __onlyVue3(name = "this function") {
|
|
152
|
+
if (isVue3)
|
|
153
|
+
return;
|
|
154
|
+
throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
|
|
155
|
+
}
|
|
156
|
+
const directiveHooks = {
|
|
157
|
+
mounted: isVue3 ? "mounted" : "inserted",
|
|
158
|
+
updated: isVue3 ? "updated" : "componentUpdated",
|
|
159
|
+
unmounted: isVue3 ? "unmounted" : "unbind"
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
163
|
+
return new Promise((resolve, reject) => {
|
|
164
|
+
if (throwOnTimeout)
|
|
165
|
+
setTimeout(() => reject(reason), ms);
|
|
166
|
+
else
|
|
167
|
+
setTimeout(resolve, ms);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function identity(arg) {
|
|
171
|
+
return arg;
|
|
172
|
+
}
|
|
173
|
+
function createSingletonPromise(fn) {
|
|
174
|
+
let _promise;
|
|
175
|
+
function wrapper() {
|
|
176
|
+
if (!_promise)
|
|
177
|
+
_promise = fn();
|
|
178
|
+
return _promise;
|
|
179
|
+
}
|
|
180
|
+
wrapper.reset = async () => {
|
|
181
|
+
const _prev = _promise;
|
|
182
|
+
_promise = void 0;
|
|
183
|
+
if (_prev)
|
|
184
|
+
await _prev;
|
|
185
|
+
};
|
|
186
|
+
return wrapper;
|
|
187
|
+
}
|
|
188
|
+
function invoke(fn) {
|
|
189
|
+
return fn();
|
|
190
|
+
}
|
|
191
|
+
function containsProp(obj, ...props) {
|
|
192
|
+
return props.some((k) => k in obj);
|
|
193
|
+
}
|
|
194
|
+
function increaseWithUnit(target, delta) {
|
|
195
|
+
var _a;
|
|
196
|
+
if (typeof target === "number")
|
|
197
|
+
return target + delta;
|
|
198
|
+
const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
|
|
199
|
+
const unit = target.slice(value.length);
|
|
200
|
+
const result = parseFloat(value) + delta;
|
|
201
|
+
if (Number.isNaN(result))
|
|
202
|
+
return target;
|
|
203
|
+
return result + unit;
|
|
204
|
+
}
|
|
205
|
+
function objectPick(obj, keys, omitUndefined = false) {
|
|
206
|
+
return keys.reduce((n, k) => {
|
|
207
|
+
if (k in obj) {
|
|
208
|
+
if (!omitUndefined || obj[k] !== void 0)
|
|
209
|
+
n[k] = obj[k];
|
|
210
|
+
}
|
|
211
|
+
return n;
|
|
212
|
+
}, {});
|
|
213
|
+
}
|
|
214
|
+
|
|
34
215
|
function computedWithControl(source, fn) {
|
|
35
216
|
let v = void 0;
|
|
36
217
|
let track;
|
|
37
218
|
let trigger;
|
|
38
219
|
const dirty = ref(true);
|
|
39
|
-
|
|
220
|
+
const update = () => {
|
|
40
221
|
dirty.value = true;
|
|
41
222
|
trigger();
|
|
42
|
-
}
|
|
43
|
-
|
|
223
|
+
};
|
|
224
|
+
watch(source, update, { flush: "sync" });
|
|
225
|
+
const get = isFunction(fn) ? fn : fn.get;
|
|
226
|
+
const set = isFunction(fn) ? void 0 : fn.set;
|
|
227
|
+
const result = customRef((_track, _trigger) => {
|
|
44
228
|
track = _track;
|
|
45
229
|
trigger = _trigger;
|
|
46
230
|
return {
|
|
47
231
|
get() {
|
|
48
232
|
if (dirty.value) {
|
|
49
|
-
v =
|
|
233
|
+
v = get();
|
|
50
234
|
dirty.value = false;
|
|
51
235
|
}
|
|
52
236
|
track();
|
|
53
237
|
return v;
|
|
54
238
|
},
|
|
55
|
-
set() {
|
|
239
|
+
set(v2) {
|
|
240
|
+
set == null ? void 0 : set(v2);
|
|
56
241
|
}
|
|
57
242
|
};
|
|
58
243
|
});
|
|
244
|
+
if (Object.isExtensible(result))
|
|
245
|
+
result.trigger = update;
|
|
246
|
+
return result;
|
|
59
247
|
}
|
|
60
248
|
|
|
61
249
|
function createEventHook() {
|
|
@@ -134,17 +322,6 @@ function createSharedComposable(composable) {
|
|
|
134
322
|
};
|
|
135
323
|
}
|
|
136
324
|
|
|
137
|
-
function __onlyVue3(name = "this function") {
|
|
138
|
-
if (isVue3)
|
|
139
|
-
return;
|
|
140
|
-
throw new Error(`[VueUse] ${name} is only works on Vue 3.`);
|
|
141
|
-
}
|
|
142
|
-
const directiveHooks = {
|
|
143
|
-
mounted: isVue3 ? "mounted" : "inserted",
|
|
144
|
-
updated: isVue3 ? "updated" : "componentUpdated",
|
|
145
|
-
unmounted: isVue3 ? "unmounted" : "unbind"
|
|
146
|
-
};
|
|
147
|
-
|
|
148
325
|
function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
|
|
149
326
|
__onlyVue3();
|
|
150
327
|
for (const [key, value] of Object.entries(extend)) {
|
|
@@ -189,25 +366,25 @@ function logicOr(...args) {
|
|
|
189
366
|
return computed(() => args.some((i) => unref(i)));
|
|
190
367
|
}
|
|
191
368
|
|
|
192
|
-
var __defProp$
|
|
193
|
-
var __getOwnPropSymbols$
|
|
194
|
-
var __hasOwnProp$
|
|
195
|
-
var __propIsEnum$
|
|
196
|
-
var __defNormalProp$
|
|
197
|
-
var __spreadValues$
|
|
369
|
+
var __defProp$8$1 = Object.defineProperty;
|
|
370
|
+
var __getOwnPropSymbols$a$1 = Object.getOwnPropertySymbols;
|
|
371
|
+
var __hasOwnProp$a$1 = Object.prototype.hasOwnProperty;
|
|
372
|
+
var __propIsEnum$a$1 = Object.prototype.propertyIsEnumerable;
|
|
373
|
+
var __defNormalProp$8$1 = (obj, key, value) => key in obj ? __defProp$8$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
374
|
+
var __spreadValues$8$1 = (a, b) => {
|
|
198
375
|
for (var prop in b || (b = {}))
|
|
199
|
-
if (__hasOwnProp$
|
|
200
|
-
__defNormalProp$
|
|
201
|
-
if (__getOwnPropSymbols$
|
|
202
|
-
for (var prop of __getOwnPropSymbols$
|
|
203
|
-
if (__propIsEnum$
|
|
204
|
-
__defNormalProp$
|
|
376
|
+
if (__hasOwnProp$a$1.call(b, prop))
|
|
377
|
+
__defNormalProp$8$1(a, prop, b[prop]);
|
|
378
|
+
if (__getOwnPropSymbols$a$1)
|
|
379
|
+
for (var prop of __getOwnPropSymbols$a$1(b)) {
|
|
380
|
+
if (__propIsEnum$a$1.call(b, prop))
|
|
381
|
+
__defNormalProp$8$1(a, prop, b[prop]);
|
|
205
382
|
}
|
|
206
383
|
return a;
|
|
207
384
|
};
|
|
208
385
|
function makeDestructurable(obj, arr) {
|
|
209
386
|
if (typeof Symbol !== "undefined") {
|
|
210
|
-
const clone = __spreadValues$
|
|
387
|
+
const clone = __spreadValues$8$1({}, obj);
|
|
211
388
|
Object.defineProperty(clone, Symbol.iterator, {
|
|
212
389
|
enumerable: false,
|
|
213
390
|
value() {
|
|
@@ -257,239 +434,71 @@ function toReactive(objectRef) {
|
|
|
257
434
|
const proxy = new Proxy({}, {
|
|
258
435
|
get(_, p, receiver) {
|
|
259
436
|
return unref(Reflect.get(objectRef.value, p, receiver));
|
|
260
|
-
},
|
|
261
|
-
set(_, p, value) {
|
|
262
|
-
if (isRef(objectRef.value[p]) && !isRef(value))
|
|
263
|
-
objectRef.value[p].value = value;
|
|
264
|
-
else
|
|
265
|
-
objectRef.value[p] = value;
|
|
266
|
-
return true;
|
|
267
|
-
},
|
|
268
|
-
deleteProperty(_, p) {
|
|
269
|
-
return Reflect.deleteProperty(objectRef.value, p);
|
|
270
|
-
},
|
|
271
|
-
has(_, p) {
|
|
272
|
-
return Reflect.has(objectRef.value, p);
|
|
273
|
-
},
|
|
274
|
-
ownKeys() {
|
|
275
|
-
return Object.keys(objectRef.value);
|
|
276
|
-
},
|
|
277
|
-
getOwnPropertyDescriptor() {
|
|
278
|
-
return {
|
|
279
|
-
enumerable: true,
|
|
280
|
-
configurable: true
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
return reactive(proxy);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function reactiveComputed(fn) {
|
|
288
|
-
return toReactive(computed(fn));
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function reactiveOmit(obj, ...keys) {
|
|
292
|
-
return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !keys.includes(e[0]))));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function reactivePick(obj, ...keys) {
|
|
296
|
-
return reactive(Object.fromEntries(keys.map((k) => [k, toRef(obj, k)])));
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
function refAutoReset(defaultValue, afterMs = 1e4) {
|
|
300
|
-
return customRef((track, trigger) => {
|
|
301
|
-
let value = defaultValue;
|
|
302
|
-
let timer;
|
|
303
|
-
const resetAfter = () => setTimeout(() => {
|
|
304
|
-
value = defaultValue;
|
|
305
|
-
trigger();
|
|
306
|
-
}, unref(afterMs));
|
|
307
|
-
tryOnScopeDispose(() => {
|
|
308
|
-
clearTimeout(timer);
|
|
309
|
-
});
|
|
310
|
-
return {
|
|
311
|
-
get() {
|
|
312
|
-
track();
|
|
313
|
-
return value;
|
|
314
|
-
},
|
|
315
|
-
set(newValue) {
|
|
316
|
-
value = newValue;
|
|
317
|
-
trigger();
|
|
318
|
-
clearTimeout(timer);
|
|
319
|
-
timer = resetAfter();
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
var _a;
|
|
326
|
-
const isClient = typeof window !== "undefined";
|
|
327
|
-
const isDef = (val) => typeof val !== "undefined";
|
|
328
|
-
const assert = (condition, ...infos) => {
|
|
329
|
-
if (!condition)
|
|
330
|
-
console.warn(...infos);
|
|
331
|
-
};
|
|
332
|
-
const toString = Object.prototype.toString;
|
|
333
|
-
const isBoolean = (val) => typeof val === "boolean";
|
|
334
|
-
const isFunction = (val) => typeof val === "function";
|
|
335
|
-
const isNumber = (val) => typeof val === "number";
|
|
336
|
-
const isString = (val) => typeof val === "string";
|
|
337
|
-
const isObject = (val) => toString.call(val) === "[object Object]";
|
|
338
|
-
const isWindow = (val) => typeof window !== "undefined" && toString.call(val) === "[object Window]";
|
|
339
|
-
const now = () => Date.now();
|
|
340
|
-
const timestamp = () => +Date.now();
|
|
341
|
-
const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
342
|
-
const noop = () => {
|
|
343
|
-
};
|
|
344
|
-
const rand = (min, max) => {
|
|
345
|
-
min = Math.ceil(min);
|
|
346
|
-
max = Math.floor(max);
|
|
347
|
-
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
348
|
-
};
|
|
349
|
-
const isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
350
|
-
|
|
351
|
-
function createFilterWrapper(filter, fn) {
|
|
352
|
-
function wrapper(...args) {
|
|
353
|
-
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
354
|
-
}
|
|
355
|
-
return wrapper;
|
|
356
|
-
}
|
|
357
|
-
const bypassFilter = (invoke) => {
|
|
358
|
-
return invoke();
|
|
359
|
-
};
|
|
360
|
-
function debounceFilter(ms, options = {}) {
|
|
361
|
-
let timer;
|
|
362
|
-
let maxTimer;
|
|
363
|
-
const filter = (invoke) => {
|
|
364
|
-
const duration = unref(ms);
|
|
365
|
-
const maxDuration = unref(options.maxWait);
|
|
366
|
-
if (timer)
|
|
367
|
-
clearTimeout(timer);
|
|
368
|
-
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
369
|
-
if (maxTimer) {
|
|
370
|
-
clearTimeout(maxTimer);
|
|
371
|
-
maxTimer = null;
|
|
372
|
-
}
|
|
373
|
-
return invoke();
|
|
374
|
-
}
|
|
375
|
-
if (maxDuration && !maxTimer) {
|
|
376
|
-
maxTimer = setTimeout(() => {
|
|
377
|
-
if (timer)
|
|
378
|
-
clearTimeout(timer);
|
|
379
|
-
maxTimer = null;
|
|
380
|
-
invoke();
|
|
381
|
-
}, maxDuration);
|
|
382
|
-
}
|
|
383
|
-
timer = setTimeout(() => {
|
|
384
|
-
if (maxTimer)
|
|
385
|
-
clearTimeout(maxTimer);
|
|
386
|
-
maxTimer = null;
|
|
387
|
-
invoke();
|
|
388
|
-
}, duration);
|
|
389
|
-
};
|
|
390
|
-
return filter;
|
|
391
|
-
}
|
|
392
|
-
function throttleFilter(ms, trailing = true, leading = true) {
|
|
393
|
-
let lastExec = 0;
|
|
394
|
-
let timer;
|
|
395
|
-
let isLeading = true;
|
|
396
|
-
const clear = () => {
|
|
397
|
-
if (timer) {
|
|
398
|
-
clearTimeout(timer);
|
|
399
|
-
timer = void 0;
|
|
400
|
-
}
|
|
401
|
-
};
|
|
402
|
-
const filter = (invoke) => {
|
|
403
|
-
const duration = unref(ms);
|
|
404
|
-
const elapsed = Date.now() - lastExec;
|
|
405
|
-
clear();
|
|
406
|
-
if (duration <= 0) {
|
|
407
|
-
lastExec = Date.now();
|
|
408
|
-
return invoke();
|
|
409
|
-
}
|
|
410
|
-
if (elapsed > duration && (leading || !isLeading)) {
|
|
411
|
-
lastExec = Date.now();
|
|
412
|
-
invoke();
|
|
413
|
-
} else if (trailing) {
|
|
414
|
-
timer = setTimeout(() => {
|
|
415
|
-
lastExec = Date.now();
|
|
416
|
-
isLeading = true;
|
|
417
|
-
clear();
|
|
418
|
-
invoke();
|
|
419
|
-
}, duration);
|
|
420
|
-
}
|
|
421
|
-
if (!leading && !timer)
|
|
422
|
-
timer = setTimeout(() => isLeading = true, duration);
|
|
423
|
-
isLeading = false;
|
|
424
|
-
};
|
|
425
|
-
return filter;
|
|
426
|
-
}
|
|
427
|
-
function pausableFilter(extendFilter = bypassFilter) {
|
|
428
|
-
const isActive = ref(true);
|
|
429
|
-
function pause() {
|
|
430
|
-
isActive.value = false;
|
|
431
|
-
}
|
|
432
|
-
function resume() {
|
|
433
|
-
isActive.value = true;
|
|
434
|
-
}
|
|
435
|
-
const eventFilter = (...args) => {
|
|
436
|
-
if (isActive.value)
|
|
437
|
-
extendFilter(...args);
|
|
438
|
-
};
|
|
439
|
-
return { isActive, pause, resume, eventFilter };
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
|
|
443
|
-
return new Promise((resolve, reject) => {
|
|
444
|
-
if (throwOnTimeout)
|
|
445
|
-
setTimeout(() => reject(reason), ms);
|
|
446
|
-
else
|
|
447
|
-
setTimeout(resolve, ms);
|
|
437
|
+
},
|
|
438
|
+
set(_, p, value) {
|
|
439
|
+
if (isRef(objectRef.value[p]) && !isRef(value))
|
|
440
|
+
objectRef.value[p].value = value;
|
|
441
|
+
else
|
|
442
|
+
objectRef.value[p] = value;
|
|
443
|
+
return true;
|
|
444
|
+
},
|
|
445
|
+
deleteProperty(_, p) {
|
|
446
|
+
return Reflect.deleteProperty(objectRef.value, p);
|
|
447
|
+
},
|
|
448
|
+
has(_, p) {
|
|
449
|
+
return Reflect.has(objectRef.value, p);
|
|
450
|
+
},
|
|
451
|
+
ownKeys() {
|
|
452
|
+
return Object.keys(objectRef.value);
|
|
453
|
+
},
|
|
454
|
+
getOwnPropertyDescriptor() {
|
|
455
|
+
return {
|
|
456
|
+
enumerable: true,
|
|
457
|
+
configurable: true
|
|
458
|
+
};
|
|
459
|
+
}
|
|
448
460
|
});
|
|
461
|
+
return reactive(proxy);
|
|
449
462
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
function createSingletonPromise(fn) {
|
|
454
|
-
let _promise;
|
|
455
|
-
function wrapper() {
|
|
456
|
-
if (!_promise)
|
|
457
|
-
_promise = fn();
|
|
458
|
-
return _promise;
|
|
459
|
-
}
|
|
460
|
-
wrapper.reset = async () => {
|
|
461
|
-
const _prev = _promise;
|
|
462
|
-
_promise = void 0;
|
|
463
|
-
if (_prev)
|
|
464
|
-
await _prev;
|
|
465
|
-
};
|
|
466
|
-
return wrapper;
|
|
467
|
-
}
|
|
468
|
-
function invoke(fn) {
|
|
469
|
-
return fn();
|
|
463
|
+
|
|
464
|
+
function reactiveComputed(fn) {
|
|
465
|
+
return toReactive(computed(fn));
|
|
470
466
|
}
|
|
471
|
-
|
|
472
|
-
|
|
467
|
+
|
|
468
|
+
function reactiveOmit(obj, ...keys) {
|
|
469
|
+
const flatKeys = keys.flat();
|
|
470
|
+
return reactiveComputed(() => Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));
|
|
473
471
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
|
|
479
|
-
const unit = target.slice(value.length);
|
|
480
|
-
const result = parseFloat(value) + delta;
|
|
481
|
-
if (Number.isNaN(result))
|
|
482
|
-
return target;
|
|
483
|
-
return result + unit;
|
|
472
|
+
|
|
473
|
+
function reactivePick(obj, ...keys) {
|
|
474
|
+
const flatKeys = keys.flat();
|
|
475
|
+
return reactive(Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));
|
|
484
476
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
477
|
+
|
|
478
|
+
function refAutoReset(defaultValue, afterMs = 1e4) {
|
|
479
|
+
return customRef((track, trigger) => {
|
|
480
|
+
let value = defaultValue;
|
|
481
|
+
let timer;
|
|
482
|
+
const resetAfter = () => setTimeout(() => {
|
|
483
|
+
value = defaultValue;
|
|
484
|
+
trigger();
|
|
485
|
+
}, unref(afterMs));
|
|
486
|
+
tryOnScopeDispose(() => {
|
|
487
|
+
clearTimeout(timer);
|
|
488
|
+
});
|
|
489
|
+
return {
|
|
490
|
+
get() {
|
|
491
|
+
track();
|
|
492
|
+
return value;
|
|
493
|
+
},
|
|
494
|
+
set(newValue) {
|
|
495
|
+
value = newValue;
|
|
496
|
+
trigger();
|
|
497
|
+
clearTimeout(timer);
|
|
498
|
+
timer = resetAfter();
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
});
|
|
493
502
|
}
|
|
494
503
|
|
|
495
504
|
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
@@ -582,6 +591,14 @@ function refWithControl(initial, options = {}) {
|
|
|
582
591
|
}
|
|
583
592
|
const controlledRef = refWithControl;
|
|
584
593
|
|
|
594
|
+
function resolveRef(r) {
|
|
595
|
+
return typeof r === "function" ? computed(r) : ref(r);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
function resolveUnref(r) {
|
|
599
|
+
return typeof r === "function" ? r() : unref(r);
|
|
600
|
+
}
|
|
601
|
+
|
|
585
602
|
function set(...args) {
|
|
586
603
|
if (args.length === 2) {
|
|
587
604
|
const [ref, value] = args;
|
|
@@ -628,25 +645,25 @@ function syncRefs(source, targets, options = {}) {
|
|
|
628
645
|
return watch(source, (newValue) => targets.forEach((target) => target.value = newValue), { flush, deep, immediate });
|
|
629
646
|
}
|
|
630
647
|
|
|
631
|
-
var __defProp$
|
|
632
|
-
var __defProps$
|
|
633
|
-
var __getOwnPropDescs$
|
|
634
|
-
var __getOwnPropSymbols$
|
|
635
|
-
var __hasOwnProp$
|
|
636
|
-
var __propIsEnum$
|
|
637
|
-
var __defNormalProp$
|
|
638
|
-
var __spreadValues$
|
|
648
|
+
var __defProp$7$1 = Object.defineProperty;
|
|
649
|
+
var __defProps$5$1 = Object.defineProperties;
|
|
650
|
+
var __getOwnPropDescs$5$1 = Object.getOwnPropertyDescriptors;
|
|
651
|
+
var __getOwnPropSymbols$9$1 = Object.getOwnPropertySymbols;
|
|
652
|
+
var __hasOwnProp$9$1 = Object.prototype.hasOwnProperty;
|
|
653
|
+
var __propIsEnum$9$1 = Object.prototype.propertyIsEnumerable;
|
|
654
|
+
var __defNormalProp$7$1 = (obj, key, value) => key in obj ? __defProp$7$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
655
|
+
var __spreadValues$7$1 = (a, b) => {
|
|
639
656
|
for (var prop in b || (b = {}))
|
|
640
|
-
if (__hasOwnProp$
|
|
641
|
-
__defNormalProp$
|
|
642
|
-
if (__getOwnPropSymbols$
|
|
643
|
-
for (var prop of __getOwnPropSymbols$
|
|
644
|
-
if (__propIsEnum$
|
|
645
|
-
__defNormalProp$
|
|
657
|
+
if (__hasOwnProp$9$1.call(b, prop))
|
|
658
|
+
__defNormalProp$7$1(a, prop, b[prop]);
|
|
659
|
+
if (__getOwnPropSymbols$9$1)
|
|
660
|
+
for (var prop of __getOwnPropSymbols$9$1(b)) {
|
|
661
|
+
if (__propIsEnum$9$1.call(b, prop))
|
|
662
|
+
__defNormalProp$7$1(a, prop, b[prop]);
|
|
646
663
|
}
|
|
647
664
|
return a;
|
|
648
665
|
};
|
|
649
|
-
var __spreadProps$
|
|
666
|
+
var __spreadProps$5$1 = (a, b) => __defProps$5$1(a, __getOwnPropDescs$5$1(b));
|
|
650
667
|
function toRefs(objectRef) {
|
|
651
668
|
if (!isRef(objectRef))
|
|
652
669
|
return toRefs$1(objectRef);
|
|
@@ -662,7 +679,7 @@ function toRefs(objectRef) {
|
|
|
662
679
|
copy[key] = v;
|
|
663
680
|
objectRef.value = copy;
|
|
664
681
|
} else {
|
|
665
|
-
const newObject = __spreadProps$
|
|
682
|
+
const newObject = __spreadProps$5$1(__spreadValues$7$1({}, objectRef.value), { [key]: v });
|
|
666
683
|
Object.setPrototypeOf(newObject, objectRef.value);
|
|
667
684
|
objectRef.value = newObject;
|
|
668
685
|
}
|
|
@@ -706,9 +723,9 @@ function until(r) {
|
|
|
706
723
|
let stop = null;
|
|
707
724
|
const watcher = new Promise((resolve) => {
|
|
708
725
|
stop = watch(r, (v) => {
|
|
709
|
-
if (condition(v)
|
|
726
|
+
if (condition(v) !== isNot) {
|
|
710
727
|
stop == null ? void 0 : stop();
|
|
711
|
-
resolve();
|
|
728
|
+
resolve(v);
|
|
712
729
|
}
|
|
713
730
|
}, {
|
|
714
731
|
flush,
|
|
@@ -717,15 +734,36 @@ function until(r) {
|
|
|
717
734
|
});
|
|
718
735
|
});
|
|
719
736
|
const promises = [watcher];
|
|
720
|
-
if (timeout) {
|
|
721
|
-
promises.push(promiseTimeout(timeout, throwOnTimeout).finally(() =>
|
|
722
|
-
stop == null ? void 0 : stop();
|
|
723
|
-
}));
|
|
737
|
+
if (timeout != null) {
|
|
738
|
+
promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => unref(r)).finally(() => stop == null ? void 0 : stop()));
|
|
724
739
|
}
|
|
725
740
|
return Promise.race(promises);
|
|
726
741
|
}
|
|
727
742
|
function toBe(value, options) {
|
|
728
|
-
|
|
743
|
+
if (!isRef(value))
|
|
744
|
+
return toMatch((v) => v === value, options);
|
|
745
|
+
const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
|
|
746
|
+
let stop = null;
|
|
747
|
+
const watcher = new Promise((resolve) => {
|
|
748
|
+
stop = watch([r, value], ([v1, v2]) => {
|
|
749
|
+
if (isNot !== (v1 === v2)) {
|
|
750
|
+
stop == null ? void 0 : stop();
|
|
751
|
+
resolve(v1);
|
|
752
|
+
}
|
|
753
|
+
}, {
|
|
754
|
+
flush,
|
|
755
|
+
deep,
|
|
756
|
+
immediate: true
|
|
757
|
+
});
|
|
758
|
+
});
|
|
759
|
+
const promises = [watcher];
|
|
760
|
+
if (timeout != null) {
|
|
761
|
+
promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => unref(r)).finally(() => {
|
|
762
|
+
stop == null ? void 0 : stop();
|
|
763
|
+
return unref(r);
|
|
764
|
+
}));
|
|
765
|
+
}
|
|
766
|
+
return Promise.race(promises);
|
|
729
767
|
}
|
|
730
768
|
function toBeTruthy(options) {
|
|
731
769
|
return toMatch((v) => Boolean(v), options);
|
|
@@ -885,7 +923,7 @@ function useIntervalFn(cb, interval = 1e3, options = {}) {
|
|
|
885
923
|
resume();
|
|
886
924
|
if (isRef(interval)) {
|
|
887
925
|
const stopWatch = watch(interval, () => {
|
|
888
|
-
if (
|
|
926
|
+
if (isActive.value && isClient)
|
|
889
927
|
resume();
|
|
890
928
|
});
|
|
891
929
|
tryOnScopeDispose(stopWatch);
|
|
@@ -898,19 +936,19 @@ function useIntervalFn(cb, interval = 1e3, options = {}) {
|
|
|
898
936
|
};
|
|
899
937
|
}
|
|
900
938
|
|
|
901
|
-
var __defProp$
|
|
902
|
-
var __getOwnPropSymbols$
|
|
903
|
-
var __hasOwnProp$
|
|
904
|
-
var __propIsEnum$
|
|
905
|
-
var __defNormalProp$
|
|
906
|
-
var __spreadValues$
|
|
939
|
+
var __defProp$6$1 = Object.defineProperty;
|
|
940
|
+
var __getOwnPropSymbols$8$1 = Object.getOwnPropertySymbols;
|
|
941
|
+
var __hasOwnProp$8$1 = Object.prototype.hasOwnProperty;
|
|
942
|
+
var __propIsEnum$8$1 = Object.prototype.propertyIsEnumerable;
|
|
943
|
+
var __defNormalProp$6$1 = (obj, key, value) => key in obj ? __defProp$6$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
944
|
+
var __spreadValues$6$1 = (a, b) => {
|
|
907
945
|
for (var prop in b || (b = {}))
|
|
908
|
-
if (__hasOwnProp$
|
|
909
|
-
__defNormalProp$
|
|
910
|
-
if (__getOwnPropSymbols$
|
|
911
|
-
for (var prop of __getOwnPropSymbols$
|
|
912
|
-
if (__propIsEnum$
|
|
913
|
-
__defNormalProp$
|
|
946
|
+
if (__hasOwnProp$8$1.call(b, prop))
|
|
947
|
+
__defNormalProp$6$1(a, prop, b[prop]);
|
|
948
|
+
if (__getOwnPropSymbols$8$1)
|
|
949
|
+
for (var prop of __getOwnPropSymbols$8$1(b)) {
|
|
950
|
+
if (__propIsEnum$8$1.call(b, prop))
|
|
951
|
+
__defNormalProp$6$1(a, prop, b[prop]);
|
|
914
952
|
}
|
|
915
953
|
return a;
|
|
916
954
|
};
|
|
@@ -922,7 +960,7 @@ function useInterval(interval = 1e3, options = {}) {
|
|
|
922
960
|
const counter = ref(0);
|
|
923
961
|
const controls = useIntervalFn(() => counter.value += 1, interval, { immediate });
|
|
924
962
|
if (exposeControls) {
|
|
925
|
-
return __spreadValues$
|
|
963
|
+
return __spreadValues$6$1({
|
|
926
964
|
counter
|
|
927
965
|
}, controls);
|
|
928
966
|
} else {
|
|
@@ -975,19 +1013,19 @@ function useTimeoutFn(cb, interval, options = {}) {
|
|
|
975
1013
|
};
|
|
976
1014
|
}
|
|
977
1015
|
|
|
978
|
-
var __defProp$
|
|
979
|
-
var __getOwnPropSymbols$
|
|
980
|
-
var __hasOwnProp$
|
|
981
|
-
var __propIsEnum$
|
|
982
|
-
var __defNormalProp$
|
|
983
|
-
var __spreadValues$
|
|
1016
|
+
var __defProp$5$1 = Object.defineProperty;
|
|
1017
|
+
var __getOwnPropSymbols$7$1 = Object.getOwnPropertySymbols;
|
|
1018
|
+
var __hasOwnProp$7$1 = Object.prototype.hasOwnProperty;
|
|
1019
|
+
var __propIsEnum$7$1 = Object.prototype.propertyIsEnumerable;
|
|
1020
|
+
var __defNormalProp$5$1 = (obj, key, value) => key in obj ? __defProp$5$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1021
|
+
var __spreadValues$5$1 = (a, b) => {
|
|
984
1022
|
for (var prop in b || (b = {}))
|
|
985
|
-
if (__hasOwnProp$
|
|
986
|
-
__defNormalProp$
|
|
987
|
-
if (__getOwnPropSymbols$
|
|
988
|
-
for (var prop of __getOwnPropSymbols$
|
|
989
|
-
if (__propIsEnum$
|
|
990
|
-
__defNormalProp$
|
|
1023
|
+
if (__hasOwnProp$7$1.call(b, prop))
|
|
1024
|
+
__defNormalProp$5$1(a, prop, b[prop]);
|
|
1025
|
+
if (__getOwnPropSymbols$7$1)
|
|
1026
|
+
for (var prop of __getOwnPropSymbols$7$1(b)) {
|
|
1027
|
+
if (__propIsEnum$7$1.call(b, prop))
|
|
1028
|
+
__defNormalProp$5$1(a, prop, b[prop]);
|
|
991
1029
|
}
|
|
992
1030
|
return a;
|
|
993
1031
|
};
|
|
@@ -998,7 +1036,7 @@ function useTimeout(interval = 1e3, options = {}) {
|
|
|
998
1036
|
const controls = useTimeoutFn(noop, interval, options);
|
|
999
1037
|
const ready = computed(() => !controls.isPending.value);
|
|
1000
1038
|
if (exposeControls) {
|
|
1001
|
-
return __spreadValues$
|
|
1039
|
+
return __spreadValues$5$1({
|
|
1002
1040
|
ready
|
|
1003
1041
|
}, controls);
|
|
1004
1042
|
} else {
|
|
@@ -1028,17 +1066,42 @@ function useToggle(initialValue = false, options = {}) {
|
|
|
1028
1066
|
return [innerValue, toggle];
|
|
1029
1067
|
}
|
|
1030
1068
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1069
|
+
function watchArray(source, cb, options) {
|
|
1070
|
+
let oldList = (options == null ? void 0 : options.immediate) ? [] : [
|
|
1071
|
+
...source instanceof Function ? source() : Array.isArray(source) ? source : unref(source)
|
|
1072
|
+
];
|
|
1073
|
+
return watch(source, (newList, _, onCleanup) => {
|
|
1074
|
+
const oldListRemains = new Array(oldList.length);
|
|
1075
|
+
const added = [];
|
|
1076
|
+
for (const obj of newList) {
|
|
1077
|
+
let found = false;
|
|
1078
|
+
for (let i = 0; i < oldList.length; i++) {
|
|
1079
|
+
if (!oldListRemains[i] && obj === oldList[i]) {
|
|
1080
|
+
oldListRemains[i] = true;
|
|
1081
|
+
found = true;
|
|
1082
|
+
break;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
if (!found)
|
|
1086
|
+
added.push(obj);
|
|
1087
|
+
}
|
|
1088
|
+
const removed = oldList.filter((_2, i) => !oldListRemains[i]);
|
|
1089
|
+
cb(newList, oldList, added, removed, onCleanup);
|
|
1090
|
+
oldList = [...newList];
|
|
1091
|
+
}, options);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
var __getOwnPropSymbols$6$1 = Object.getOwnPropertySymbols;
|
|
1095
|
+
var __hasOwnProp$6$1 = Object.prototype.hasOwnProperty;
|
|
1096
|
+
var __propIsEnum$6$1 = Object.prototype.propertyIsEnumerable;
|
|
1034
1097
|
var __objRest$5 = (source, exclude) => {
|
|
1035
1098
|
var target = {};
|
|
1036
1099
|
for (var prop in source)
|
|
1037
|
-
if (__hasOwnProp$
|
|
1100
|
+
if (__hasOwnProp$6$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1038
1101
|
target[prop] = source[prop];
|
|
1039
|
-
if (source != null && __getOwnPropSymbols$
|
|
1040
|
-
for (var prop of __getOwnPropSymbols$
|
|
1041
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1102
|
+
if (source != null && __getOwnPropSymbols$6$1)
|
|
1103
|
+
for (var prop of __getOwnPropSymbols$6$1(source)) {
|
|
1104
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6$1.call(source, prop))
|
|
1042
1105
|
target[prop] = source[prop];
|
|
1043
1106
|
}
|
|
1044
1107
|
return target;
|
|
@@ -1052,17 +1115,17 @@ function watchWithFilter(source, cb, options = {}) {
|
|
|
1052
1115
|
return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
1053
1116
|
}
|
|
1054
1117
|
|
|
1055
|
-
var __getOwnPropSymbols$
|
|
1056
|
-
var __hasOwnProp$
|
|
1057
|
-
var __propIsEnum$
|
|
1118
|
+
var __getOwnPropSymbols$5$1 = Object.getOwnPropertySymbols;
|
|
1119
|
+
var __hasOwnProp$5$1 = Object.prototype.hasOwnProperty;
|
|
1120
|
+
var __propIsEnum$5$1 = Object.prototype.propertyIsEnumerable;
|
|
1058
1121
|
var __objRest$4 = (source, exclude) => {
|
|
1059
1122
|
var target = {};
|
|
1060
1123
|
for (var prop in source)
|
|
1061
|
-
if (__hasOwnProp$
|
|
1124
|
+
if (__hasOwnProp$5$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1062
1125
|
target[prop] = source[prop];
|
|
1063
|
-
if (source != null && __getOwnPropSymbols$
|
|
1064
|
-
for (var prop of __getOwnPropSymbols$
|
|
1065
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1126
|
+
if (source != null && __getOwnPropSymbols$5$1)
|
|
1127
|
+
for (var prop of __getOwnPropSymbols$5$1(source)) {
|
|
1128
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5$1.call(source, prop))
|
|
1066
1129
|
target[prop] = source[prop];
|
|
1067
1130
|
}
|
|
1068
1131
|
return target;
|
|
@@ -1083,33 +1146,33 @@ function watchAtMost(source, cb, options) {
|
|
|
1083
1146
|
return { count: current, stop };
|
|
1084
1147
|
}
|
|
1085
1148
|
|
|
1086
|
-
var __defProp$
|
|
1087
|
-
var __defProps$
|
|
1088
|
-
var __getOwnPropDescs$
|
|
1089
|
-
var __getOwnPropSymbols$
|
|
1090
|
-
var __hasOwnProp$
|
|
1091
|
-
var __propIsEnum$
|
|
1092
|
-
var __defNormalProp$
|
|
1093
|
-
var __spreadValues$
|
|
1149
|
+
var __defProp$4$1 = Object.defineProperty;
|
|
1150
|
+
var __defProps$4$1 = Object.defineProperties;
|
|
1151
|
+
var __getOwnPropDescs$4$1 = Object.getOwnPropertyDescriptors;
|
|
1152
|
+
var __getOwnPropSymbols$4$1 = Object.getOwnPropertySymbols;
|
|
1153
|
+
var __hasOwnProp$4$1 = Object.prototype.hasOwnProperty;
|
|
1154
|
+
var __propIsEnum$4$1 = Object.prototype.propertyIsEnumerable;
|
|
1155
|
+
var __defNormalProp$4$1 = (obj, key, value) => key in obj ? __defProp$4$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1156
|
+
var __spreadValues$4$1 = (a, b) => {
|
|
1094
1157
|
for (var prop in b || (b = {}))
|
|
1095
|
-
if (__hasOwnProp$
|
|
1096
|
-
__defNormalProp$
|
|
1097
|
-
if (__getOwnPropSymbols$
|
|
1098
|
-
for (var prop of __getOwnPropSymbols$
|
|
1099
|
-
if (__propIsEnum$
|
|
1100
|
-
__defNormalProp$
|
|
1158
|
+
if (__hasOwnProp$4$1.call(b, prop))
|
|
1159
|
+
__defNormalProp$4$1(a, prop, b[prop]);
|
|
1160
|
+
if (__getOwnPropSymbols$4$1)
|
|
1161
|
+
for (var prop of __getOwnPropSymbols$4$1(b)) {
|
|
1162
|
+
if (__propIsEnum$4$1.call(b, prop))
|
|
1163
|
+
__defNormalProp$4$1(a, prop, b[prop]);
|
|
1101
1164
|
}
|
|
1102
1165
|
return a;
|
|
1103
1166
|
};
|
|
1104
|
-
var __spreadProps$
|
|
1167
|
+
var __spreadProps$4$1 = (a, b) => __defProps$4$1(a, __getOwnPropDescs$4$1(b));
|
|
1105
1168
|
var __objRest$3 = (source, exclude) => {
|
|
1106
1169
|
var target = {};
|
|
1107
1170
|
for (var prop in source)
|
|
1108
|
-
if (__hasOwnProp$
|
|
1171
|
+
if (__hasOwnProp$4$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1109
1172
|
target[prop] = source[prop];
|
|
1110
|
-
if (source != null && __getOwnPropSymbols$
|
|
1111
|
-
for (var prop of __getOwnPropSymbols$
|
|
1112
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1173
|
+
if (source != null && __getOwnPropSymbols$4$1)
|
|
1174
|
+
for (var prop of __getOwnPropSymbols$4$1(source)) {
|
|
1175
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$4$1.call(source, prop))
|
|
1113
1176
|
target[prop] = source[prop];
|
|
1114
1177
|
}
|
|
1115
1178
|
return target;
|
|
@@ -1122,38 +1185,38 @@ function watchDebounced(source, cb, options = {}) {
|
|
|
1122
1185
|
"debounce",
|
|
1123
1186
|
"maxWait"
|
|
1124
1187
|
]);
|
|
1125
|
-
return watchWithFilter(source, cb, __spreadProps$
|
|
1188
|
+
return watchWithFilter(source, cb, __spreadProps$4$1(__spreadValues$4$1({}, watchOptions), {
|
|
1126
1189
|
eventFilter: debounceFilter(debounce, { maxWait })
|
|
1127
1190
|
}));
|
|
1128
1191
|
}
|
|
1129
1192
|
|
|
1130
|
-
var __defProp$
|
|
1131
|
-
var __defProps$
|
|
1132
|
-
var __getOwnPropDescs$
|
|
1133
|
-
var __getOwnPropSymbols$
|
|
1134
|
-
var __hasOwnProp$
|
|
1135
|
-
var __propIsEnum$
|
|
1136
|
-
var __defNormalProp$
|
|
1137
|
-
var __spreadValues$
|
|
1193
|
+
var __defProp$3$1 = Object.defineProperty;
|
|
1194
|
+
var __defProps$3$1 = Object.defineProperties;
|
|
1195
|
+
var __getOwnPropDescs$3$1 = Object.getOwnPropertyDescriptors;
|
|
1196
|
+
var __getOwnPropSymbols$3$1 = Object.getOwnPropertySymbols;
|
|
1197
|
+
var __hasOwnProp$3$1 = Object.prototype.hasOwnProperty;
|
|
1198
|
+
var __propIsEnum$3$1 = Object.prototype.propertyIsEnumerable;
|
|
1199
|
+
var __defNormalProp$3$1 = (obj, key, value) => key in obj ? __defProp$3$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1200
|
+
var __spreadValues$3$1 = (a, b) => {
|
|
1138
1201
|
for (var prop in b || (b = {}))
|
|
1139
|
-
if (__hasOwnProp$
|
|
1140
|
-
__defNormalProp$
|
|
1141
|
-
if (__getOwnPropSymbols$
|
|
1142
|
-
for (var prop of __getOwnPropSymbols$
|
|
1143
|
-
if (__propIsEnum$
|
|
1144
|
-
__defNormalProp$
|
|
1202
|
+
if (__hasOwnProp$3$1.call(b, prop))
|
|
1203
|
+
__defNormalProp$3$1(a, prop, b[prop]);
|
|
1204
|
+
if (__getOwnPropSymbols$3$1)
|
|
1205
|
+
for (var prop of __getOwnPropSymbols$3$1(b)) {
|
|
1206
|
+
if (__propIsEnum$3$1.call(b, prop))
|
|
1207
|
+
__defNormalProp$3$1(a, prop, b[prop]);
|
|
1145
1208
|
}
|
|
1146
1209
|
return a;
|
|
1147
1210
|
};
|
|
1148
|
-
var __spreadProps$
|
|
1211
|
+
var __spreadProps$3$1 = (a, b) => __defProps$3$1(a, __getOwnPropDescs$3$1(b));
|
|
1149
1212
|
var __objRest$2$1 = (source, exclude) => {
|
|
1150
1213
|
var target = {};
|
|
1151
1214
|
for (var prop in source)
|
|
1152
|
-
if (__hasOwnProp$
|
|
1215
|
+
if (__hasOwnProp$3$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1153
1216
|
target[prop] = source[prop];
|
|
1154
|
-
if (source != null && __getOwnPropSymbols$
|
|
1155
|
-
for (var prop of __getOwnPropSymbols$
|
|
1156
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1217
|
+
if (source != null && __getOwnPropSymbols$3$1)
|
|
1218
|
+
for (var prop of __getOwnPropSymbols$3$1(source)) {
|
|
1219
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3$1.call(source, prop))
|
|
1157
1220
|
target[prop] = source[prop];
|
|
1158
1221
|
}
|
|
1159
1222
|
return target;
|
|
@@ -1190,7 +1253,7 @@ function watchIgnorable(source, cb, options = {}) {
|
|
|
1190
1253
|
};
|
|
1191
1254
|
disposables.push(watch(source, () => {
|
|
1192
1255
|
syncCounter.value++;
|
|
1193
|
-
}, __spreadProps$
|
|
1256
|
+
}, __spreadProps$3$1(__spreadValues$3$1({}, watchOptions), { flush: "sync" })));
|
|
1194
1257
|
ignoreUpdates = (updater) => {
|
|
1195
1258
|
const syncCounterPrev = syncCounter.value;
|
|
1196
1259
|
updater();
|
|
@@ -1218,33 +1281,33 @@ function watchOnce(source, cb, options) {
|
|
|
1218
1281
|
}, options);
|
|
1219
1282
|
}
|
|
1220
1283
|
|
|
1221
|
-
var __defProp$
|
|
1222
|
-
var __defProps$
|
|
1223
|
-
var __getOwnPropDescs$
|
|
1224
|
-
var __getOwnPropSymbols$
|
|
1225
|
-
var __hasOwnProp$
|
|
1226
|
-
var __propIsEnum$
|
|
1227
|
-
var __defNormalProp$
|
|
1228
|
-
var __spreadValues$
|
|
1284
|
+
var __defProp$2$1 = Object.defineProperty;
|
|
1285
|
+
var __defProps$2$1 = Object.defineProperties;
|
|
1286
|
+
var __getOwnPropDescs$2$1 = Object.getOwnPropertyDescriptors;
|
|
1287
|
+
var __getOwnPropSymbols$2$1 = Object.getOwnPropertySymbols;
|
|
1288
|
+
var __hasOwnProp$2$1 = Object.prototype.hasOwnProperty;
|
|
1289
|
+
var __propIsEnum$2$1 = Object.prototype.propertyIsEnumerable;
|
|
1290
|
+
var __defNormalProp$2$1 = (obj, key, value) => key in obj ? __defProp$2$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1291
|
+
var __spreadValues$2$1 = (a, b) => {
|
|
1229
1292
|
for (var prop in b || (b = {}))
|
|
1230
|
-
if (__hasOwnProp$
|
|
1231
|
-
__defNormalProp$
|
|
1232
|
-
if (__getOwnPropSymbols$
|
|
1233
|
-
for (var prop of __getOwnPropSymbols$
|
|
1234
|
-
if (__propIsEnum$
|
|
1235
|
-
__defNormalProp$
|
|
1293
|
+
if (__hasOwnProp$2$1.call(b, prop))
|
|
1294
|
+
__defNormalProp$2$1(a, prop, b[prop]);
|
|
1295
|
+
if (__getOwnPropSymbols$2$1)
|
|
1296
|
+
for (var prop of __getOwnPropSymbols$2$1(b)) {
|
|
1297
|
+
if (__propIsEnum$2$1.call(b, prop))
|
|
1298
|
+
__defNormalProp$2$1(a, prop, b[prop]);
|
|
1236
1299
|
}
|
|
1237
1300
|
return a;
|
|
1238
1301
|
};
|
|
1239
|
-
var __spreadProps$
|
|
1302
|
+
var __spreadProps$2$1 = (a, b) => __defProps$2$1(a, __getOwnPropDescs$2$1(b));
|
|
1240
1303
|
var __objRest$1$1 = (source, exclude) => {
|
|
1241
1304
|
var target = {};
|
|
1242
1305
|
for (var prop in source)
|
|
1243
|
-
if (__hasOwnProp$
|
|
1306
|
+
if (__hasOwnProp$2$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1244
1307
|
target[prop] = source[prop];
|
|
1245
|
-
if (source != null && __getOwnPropSymbols$
|
|
1246
|
-
for (var prop of __getOwnPropSymbols$
|
|
1247
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1308
|
+
if (source != null && __getOwnPropSymbols$2$1)
|
|
1309
|
+
for (var prop of __getOwnPropSymbols$2$1(source)) {
|
|
1310
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2$1.call(source, prop))
|
|
1248
1311
|
target[prop] = source[prop];
|
|
1249
1312
|
}
|
|
1250
1313
|
return target;
|
|
@@ -1256,39 +1319,39 @@ function watchPausable(source, cb, options = {}) {
|
|
|
1256
1319
|
"eventFilter"
|
|
1257
1320
|
]);
|
|
1258
1321
|
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
|
|
1259
|
-
const stop = watchWithFilter(source, cb, __spreadProps$
|
|
1322
|
+
const stop = watchWithFilter(source, cb, __spreadProps$2$1(__spreadValues$2$1({}, watchOptions), {
|
|
1260
1323
|
eventFilter
|
|
1261
1324
|
}));
|
|
1262
1325
|
return { stop, pause, resume, isActive };
|
|
1263
1326
|
}
|
|
1264
1327
|
|
|
1265
|
-
var __defProp$
|
|
1266
|
-
var __defProps$
|
|
1267
|
-
var __getOwnPropDescs$
|
|
1268
|
-
var __getOwnPropSymbols$
|
|
1269
|
-
var __hasOwnProp$
|
|
1270
|
-
var __propIsEnum$
|
|
1271
|
-
var __defNormalProp$
|
|
1272
|
-
var __spreadValues$
|
|
1328
|
+
var __defProp$1$1 = Object.defineProperty;
|
|
1329
|
+
var __defProps$1$1 = Object.defineProperties;
|
|
1330
|
+
var __getOwnPropDescs$1$1 = Object.getOwnPropertyDescriptors;
|
|
1331
|
+
var __getOwnPropSymbols$1$1 = Object.getOwnPropertySymbols;
|
|
1332
|
+
var __hasOwnProp$1$1 = Object.prototype.hasOwnProperty;
|
|
1333
|
+
var __propIsEnum$1$1 = Object.prototype.propertyIsEnumerable;
|
|
1334
|
+
var __defNormalProp$1$1 = (obj, key, value) => key in obj ? __defProp$1$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1335
|
+
var __spreadValues$1$1 = (a, b) => {
|
|
1273
1336
|
for (var prop in b || (b = {}))
|
|
1274
|
-
if (__hasOwnProp$
|
|
1275
|
-
__defNormalProp$
|
|
1276
|
-
if (__getOwnPropSymbols$
|
|
1277
|
-
for (var prop of __getOwnPropSymbols$
|
|
1278
|
-
if (__propIsEnum$
|
|
1279
|
-
__defNormalProp$
|
|
1337
|
+
if (__hasOwnProp$1$1.call(b, prop))
|
|
1338
|
+
__defNormalProp$1$1(a, prop, b[prop]);
|
|
1339
|
+
if (__getOwnPropSymbols$1$1)
|
|
1340
|
+
for (var prop of __getOwnPropSymbols$1$1(b)) {
|
|
1341
|
+
if (__propIsEnum$1$1.call(b, prop))
|
|
1342
|
+
__defNormalProp$1$1(a, prop, b[prop]);
|
|
1280
1343
|
}
|
|
1281
1344
|
return a;
|
|
1282
1345
|
};
|
|
1283
|
-
var __spreadProps$
|
|
1346
|
+
var __spreadProps$1$1 = (a, b) => __defProps$1$1(a, __getOwnPropDescs$1$1(b));
|
|
1284
1347
|
var __objRest$6 = (source, exclude) => {
|
|
1285
1348
|
var target = {};
|
|
1286
1349
|
for (var prop in source)
|
|
1287
|
-
if (__hasOwnProp$
|
|
1350
|
+
if (__hasOwnProp$1$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1288
1351
|
target[prop] = source[prop];
|
|
1289
|
-
if (source != null && __getOwnPropSymbols$
|
|
1290
|
-
for (var prop of __getOwnPropSymbols$
|
|
1291
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1352
|
+
if (source != null && __getOwnPropSymbols$1$1)
|
|
1353
|
+
for (var prop of __getOwnPropSymbols$1$1(source)) {
|
|
1354
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$1$1.call(source, prop))
|
|
1292
1355
|
target[prop] = source[prop];
|
|
1293
1356
|
}
|
|
1294
1357
|
return target;
|
|
@@ -1303,11 +1366,73 @@ function watchThrottled(source, cb, options = {}) {
|
|
|
1303
1366
|
"trailing",
|
|
1304
1367
|
"leading"
|
|
1305
1368
|
]);
|
|
1306
|
-
return watchWithFilter(source, cb, __spreadProps$
|
|
1369
|
+
return watchWithFilter(source, cb, __spreadProps$1$1(__spreadValues$1$1({}, watchOptions), {
|
|
1307
1370
|
eventFilter: throttleFilter(throttle, trailing, leading)
|
|
1308
1371
|
}));
|
|
1309
1372
|
}
|
|
1310
1373
|
|
|
1374
|
+
var __defProp$k = Object.defineProperty;
|
|
1375
|
+
var __defProps$9 = Object.defineProperties;
|
|
1376
|
+
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
|
|
1377
|
+
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
|
|
1378
|
+
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
|
|
1379
|
+
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
|
|
1380
|
+
var __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1381
|
+
var __spreadValues$k = (a, b) => {
|
|
1382
|
+
for (var prop in b || (b = {}))
|
|
1383
|
+
if (__hasOwnProp$m.call(b, prop))
|
|
1384
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1385
|
+
if (__getOwnPropSymbols$m)
|
|
1386
|
+
for (var prop of __getOwnPropSymbols$m(b)) {
|
|
1387
|
+
if (__propIsEnum$m.call(b, prop))
|
|
1388
|
+
__defNormalProp$k(a, prop, b[prop]);
|
|
1389
|
+
}
|
|
1390
|
+
return a;
|
|
1391
|
+
};
|
|
1392
|
+
var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));
|
|
1393
|
+
function watchTriggerable(source, cb, options = {}) {
|
|
1394
|
+
let cleanupFn;
|
|
1395
|
+
function onEffect() {
|
|
1396
|
+
if (!cleanupFn)
|
|
1397
|
+
return;
|
|
1398
|
+
const fn = cleanupFn;
|
|
1399
|
+
cleanupFn = void 0;
|
|
1400
|
+
fn();
|
|
1401
|
+
}
|
|
1402
|
+
function onCleanup(callback) {
|
|
1403
|
+
cleanupFn = callback;
|
|
1404
|
+
}
|
|
1405
|
+
const _cb = (value, oldValue) => {
|
|
1406
|
+
onEffect();
|
|
1407
|
+
return cb(value, oldValue, onCleanup);
|
|
1408
|
+
};
|
|
1409
|
+
const res = watchIgnorable(source, _cb, options);
|
|
1410
|
+
const { ignoreUpdates } = res;
|
|
1411
|
+
const trigger = () => {
|
|
1412
|
+
let res2;
|
|
1413
|
+
ignoreUpdates(() => {
|
|
1414
|
+
res2 = _cb(getWatchSources(source), getOldValue(source));
|
|
1415
|
+
});
|
|
1416
|
+
return res2;
|
|
1417
|
+
};
|
|
1418
|
+
return __spreadProps$9(__spreadValues$k({}, res), {
|
|
1419
|
+
trigger
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
function getWatchSources(sources) {
|
|
1423
|
+
if (isReactive(sources))
|
|
1424
|
+
return sources;
|
|
1425
|
+
if (Array.isArray(sources))
|
|
1426
|
+
return sources.map((item) => getOneWatchSource(item));
|
|
1427
|
+
return getOneWatchSource(sources);
|
|
1428
|
+
}
|
|
1429
|
+
function getOneWatchSource(source) {
|
|
1430
|
+
return typeof source === "function" ? source() : unref(source);
|
|
1431
|
+
}
|
|
1432
|
+
function getOldValue(source) {
|
|
1433
|
+
return Array.isArray(source) ? source.map(() => void 0) : void 0;
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1311
1436
|
function whenever(source, cb, options) {
|
|
1312
1437
|
return watch(source, (v, ov, onInvalidate) => {
|
|
1313
1438
|
if (v)
|
|
@@ -1438,7 +1563,7 @@ function useEventListener(...args) {
|
|
|
1438
1563
|
}
|
|
1439
1564
|
|
|
1440
1565
|
function onClickOutside(target, handler, options = {}) {
|
|
1441
|
-
const { window = defaultWindow, ignore, capture = true } = options;
|
|
1566
|
+
const { window = defaultWindow, ignore, capture = true, detectIframe = false } = options;
|
|
1442
1567
|
if (!window)
|
|
1443
1568
|
return;
|
|
1444
1569
|
const shouldListen = ref(true);
|
|
@@ -1465,28 +1590,38 @@ function onClickOutside(target, handler, options = {}) {
|
|
|
1465
1590
|
shouldListen.value = !!el && !e.composedPath().includes(el);
|
|
1466
1591
|
}, { passive: true }),
|
|
1467
1592
|
useEventListener(window, "pointerup", (e) => {
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1593
|
+
if (e.button === 0) {
|
|
1594
|
+
const path = e.composedPath();
|
|
1595
|
+
e.composedPath = () => path;
|
|
1596
|
+
fallback = window.setTimeout(() => listener(e), 50);
|
|
1597
|
+
}
|
|
1598
|
+
}, { passive: true }),
|
|
1599
|
+
detectIframe && useEventListener(window, "blur", (event) => {
|
|
1600
|
+
var _a;
|
|
1601
|
+
const el = unrefElement(target);
|
|
1602
|
+
if (((_a = document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(document.activeElement)))
|
|
1603
|
+
handler(event);
|
|
1604
|
+
})
|
|
1605
|
+
].filter(Boolean);
|
|
1471
1606
|
const stop = () => cleanup.forEach((fn) => fn());
|
|
1472
1607
|
return stop;
|
|
1473
1608
|
}
|
|
1474
1609
|
|
|
1475
|
-
var __defProp$
|
|
1610
|
+
var __defProp$j = Object.defineProperty;
|
|
1476
1611
|
var __defProps$8 = Object.defineProperties;
|
|
1477
1612
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
1478
|
-
var __getOwnPropSymbols$
|
|
1479
|
-
var __hasOwnProp$
|
|
1480
|
-
var __propIsEnum$
|
|
1481
|
-
var __defNormalProp$
|
|
1482
|
-
var __spreadValues$
|
|
1613
|
+
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
|
|
1614
|
+
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
|
|
1615
|
+
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
|
|
1616
|
+
var __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1617
|
+
var __spreadValues$j = (a, b) => {
|
|
1483
1618
|
for (var prop in b || (b = {}))
|
|
1484
|
-
if (__hasOwnProp$
|
|
1485
|
-
__defNormalProp$
|
|
1486
|
-
if (__getOwnPropSymbols$
|
|
1487
|
-
for (var prop of __getOwnPropSymbols$
|
|
1488
|
-
if (__propIsEnum$
|
|
1489
|
-
__defNormalProp$
|
|
1619
|
+
if (__hasOwnProp$l.call(b, prop))
|
|
1620
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1621
|
+
if (__getOwnPropSymbols$l)
|
|
1622
|
+
for (var prop of __getOwnPropSymbols$l(b)) {
|
|
1623
|
+
if (__propIsEnum$l.call(b, prop))
|
|
1624
|
+
__defNormalProp$j(a, prop, b[prop]);
|
|
1490
1625
|
}
|
|
1491
1626
|
return a;
|
|
1492
1627
|
};
|
|
@@ -1513,17 +1648,18 @@ function onKeyStroke(key, handler, options = {}) {
|
|
|
1513
1648
|
return useEventListener(target, eventName, listener, passive);
|
|
1514
1649
|
}
|
|
1515
1650
|
function onKeyDown(key, handler, options = {}) {
|
|
1516
|
-
return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$
|
|
1651
|
+
return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$j({}, options), { eventName: "keydown" }));
|
|
1517
1652
|
}
|
|
1518
1653
|
function onKeyPressed(key, handler, options = {}) {
|
|
1519
|
-
return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$
|
|
1654
|
+
return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$j({}, options), { eventName: "keypress" }));
|
|
1520
1655
|
}
|
|
1521
1656
|
function onKeyUp(key, handler, options = {}) {
|
|
1522
|
-
return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$
|
|
1657
|
+
return onKeyStroke(key, handler, __spreadProps$8(__spreadValues$j({}, options), { eventName: "keyup" }));
|
|
1523
1658
|
}
|
|
1524
1659
|
|
|
1525
1660
|
const DEFAULT_DELAY = 500;
|
|
1526
1661
|
function onLongPress(target, handler, options) {
|
|
1662
|
+
var _a, _b;
|
|
1527
1663
|
const elementRef = computed(() => unrefElement(target));
|
|
1528
1664
|
let timeout = null;
|
|
1529
1665
|
function clear() {
|
|
@@ -1533,13 +1669,23 @@ function onLongPress(target, handler, options) {
|
|
|
1533
1669
|
}
|
|
1534
1670
|
}
|
|
1535
1671
|
function onDown(ev) {
|
|
1536
|
-
var
|
|
1672
|
+
var _a2, _b2, _c, _d;
|
|
1673
|
+
if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)
|
|
1674
|
+
return;
|
|
1537
1675
|
clear();
|
|
1538
|
-
|
|
1676
|
+
if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)
|
|
1677
|
+
ev.preventDefault();
|
|
1678
|
+
if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)
|
|
1679
|
+
ev.stopPropagation();
|
|
1680
|
+
timeout = setTimeout(() => handler(ev), (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY);
|
|
1539
1681
|
}
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1682
|
+
const listenerOptions = {
|
|
1683
|
+
capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,
|
|
1684
|
+
once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once
|
|
1685
|
+
};
|
|
1686
|
+
useEventListener(elementRef, "pointerdown", onDown, listenerOptions);
|
|
1687
|
+
useEventListener(elementRef, "pointerup", clear, listenerOptions);
|
|
1688
|
+
useEventListener(elementRef, "pointerleave", clear, listenerOptions);
|
|
1543
1689
|
}
|
|
1544
1690
|
|
|
1545
1691
|
const isFocusedElementEditable = () => {
|
|
@@ -1706,6 +1852,26 @@ function useAsyncState(promise, initialState, options) {
|
|
|
1706
1852
|
};
|
|
1707
1853
|
}
|
|
1708
1854
|
|
|
1855
|
+
const defaults = {
|
|
1856
|
+
array: (v) => JSON.stringify(v),
|
|
1857
|
+
object: (v) => JSON.stringify(v),
|
|
1858
|
+
set: (v) => JSON.stringify(Array.from(v)),
|
|
1859
|
+
map: (v) => JSON.stringify(Object.fromEntries(v)),
|
|
1860
|
+
null: () => ""
|
|
1861
|
+
};
|
|
1862
|
+
function getDefaultSerialization(target) {
|
|
1863
|
+
if (!target)
|
|
1864
|
+
return defaults.null;
|
|
1865
|
+
if (target instanceof Map)
|
|
1866
|
+
return defaults.map;
|
|
1867
|
+
else if (target instanceof Set)
|
|
1868
|
+
return defaults.set;
|
|
1869
|
+
else if (Array.isArray(target))
|
|
1870
|
+
return defaults.array;
|
|
1871
|
+
else
|
|
1872
|
+
return defaults.object;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1709
1875
|
function useBase64(target, options) {
|
|
1710
1876
|
const base64 = ref("");
|
|
1711
1877
|
const promise = ref();
|
|
@@ -1715,7 +1881,7 @@ function useBase64(target, options) {
|
|
|
1715
1881
|
promise.value = new Promise((resolve, reject) => {
|
|
1716
1882
|
try {
|
|
1717
1883
|
const _target = unref(target);
|
|
1718
|
-
if (_target
|
|
1884
|
+
if (_target == null) {
|
|
1719
1885
|
resolve("");
|
|
1720
1886
|
} else if (typeof _target === "string") {
|
|
1721
1887
|
resolve(blobToBase64(new Blob([_target], { type: "text/plain" })));
|
|
@@ -1736,6 +1902,10 @@ function useBase64(target, options) {
|
|
|
1736
1902
|
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
|
1737
1903
|
resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));
|
|
1738
1904
|
}).catch(reject);
|
|
1905
|
+
} else if (typeof _target === "object") {
|
|
1906
|
+
const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);
|
|
1907
|
+
const serialized = _serializeFn(_target);
|
|
1908
|
+
return resolve(blobToBase64(new Blob([serialized], { type: "application/json" })));
|
|
1739
1909
|
} else {
|
|
1740
1910
|
reject(new Error("target is unsupported types"));
|
|
1741
1911
|
}
|
|
@@ -1746,7 +1916,10 @@ function useBase64(target, options) {
|
|
|
1746
1916
|
promise.value.then((res) => base64.value = res);
|
|
1747
1917
|
return promise.value;
|
|
1748
1918
|
}
|
|
1749
|
-
|
|
1919
|
+
if (isRef(target))
|
|
1920
|
+
watch(target, execute, { immediate: true });
|
|
1921
|
+
else
|
|
1922
|
+
execute();
|
|
1750
1923
|
return {
|
|
1751
1924
|
base64,
|
|
1752
1925
|
promise,
|
|
@@ -1807,9 +1980,77 @@ function useBattery({ navigator = defaultNavigator } = {}) {
|
|
|
1807
1980
|
};
|
|
1808
1981
|
}
|
|
1809
1982
|
|
|
1983
|
+
function useBluetooth(options) {
|
|
1984
|
+
let {
|
|
1985
|
+
acceptAllDevices = false
|
|
1986
|
+
} = options || {};
|
|
1987
|
+
const {
|
|
1988
|
+
filters = void 0,
|
|
1989
|
+
optionalServices = void 0,
|
|
1990
|
+
navigator = defaultNavigator
|
|
1991
|
+
} = options || {};
|
|
1992
|
+
const isSupported = navigator && "bluetooth" in navigator;
|
|
1993
|
+
const device = ref(void 0);
|
|
1994
|
+
const error = ref(null);
|
|
1995
|
+
watch(device, () => {
|
|
1996
|
+
connectToBluetoothGATTServer();
|
|
1997
|
+
});
|
|
1998
|
+
async function requestDevice() {
|
|
1999
|
+
if (!isSupported)
|
|
2000
|
+
return;
|
|
2001
|
+
error.value = null;
|
|
2002
|
+
if (filters && filters.length > 0)
|
|
2003
|
+
acceptAllDevices = false;
|
|
2004
|
+
try {
|
|
2005
|
+
device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({
|
|
2006
|
+
acceptAllDevices,
|
|
2007
|
+
filters,
|
|
2008
|
+
optionalServices
|
|
2009
|
+
}));
|
|
2010
|
+
} catch (err) {
|
|
2011
|
+
error.value = err;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
const server = ref();
|
|
2015
|
+
const isConnected = computed(() => {
|
|
2016
|
+
var _a;
|
|
2017
|
+
return ((_a = server.value) == null ? void 0 : _a.connected) || false;
|
|
2018
|
+
});
|
|
2019
|
+
async function connectToBluetoothGATTServer() {
|
|
2020
|
+
error.value = null;
|
|
2021
|
+
if (device.value && device.value.gatt) {
|
|
2022
|
+
device.value.addEventListener("gattserverdisconnected", () => {
|
|
2023
|
+
});
|
|
2024
|
+
try {
|
|
2025
|
+
server.value = await device.value.gatt.connect();
|
|
2026
|
+
} catch (err) {
|
|
2027
|
+
error.value = err;
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
tryOnMounted(() => {
|
|
2032
|
+
var _a;
|
|
2033
|
+
if (device.value)
|
|
2034
|
+
(_a = device.value.gatt) == null ? void 0 : _a.connect();
|
|
2035
|
+
});
|
|
2036
|
+
tryOnScopeDispose(() => {
|
|
2037
|
+
var _a;
|
|
2038
|
+
if (device.value)
|
|
2039
|
+
(_a = device.value.gatt) == null ? void 0 : _a.disconnect();
|
|
2040
|
+
});
|
|
2041
|
+
return {
|
|
2042
|
+
isSupported,
|
|
2043
|
+
isConnected,
|
|
2044
|
+
device,
|
|
2045
|
+
requestDevice,
|
|
2046
|
+
server,
|
|
2047
|
+
error
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
2050
|
+
|
|
1810
2051
|
function useMediaQuery(query, options = {}) {
|
|
1811
2052
|
const { window = defaultWindow } = options;
|
|
1812
|
-
const isSupported = Boolean(window && "matchMedia" in window);
|
|
2053
|
+
const isSupported = Boolean(window && "matchMedia" in window && typeof window.matchMedia === "function");
|
|
1813
2054
|
let mediaQuery;
|
|
1814
2055
|
const matches = ref(false);
|
|
1815
2056
|
const update = () => {
|
|
@@ -1881,19 +2122,19 @@ const breakpointsSematic = {
|
|
|
1881
2122
|
desktop4K: 2560
|
|
1882
2123
|
};
|
|
1883
2124
|
|
|
1884
|
-
var __defProp$
|
|
1885
|
-
var __getOwnPropSymbols$
|
|
1886
|
-
var __hasOwnProp$
|
|
1887
|
-
var __propIsEnum$
|
|
1888
|
-
var __defNormalProp$
|
|
1889
|
-
var __spreadValues$
|
|
2125
|
+
var __defProp$i = Object.defineProperty;
|
|
2126
|
+
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
|
|
2127
|
+
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
|
|
2128
|
+
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
|
|
2129
|
+
var __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2130
|
+
var __spreadValues$i = (a, b) => {
|
|
1890
2131
|
for (var prop in b || (b = {}))
|
|
1891
|
-
if (__hasOwnProp$
|
|
1892
|
-
__defNormalProp$
|
|
1893
|
-
if (__getOwnPropSymbols$
|
|
1894
|
-
for (var prop of __getOwnPropSymbols$
|
|
1895
|
-
if (__propIsEnum$
|
|
1896
|
-
__defNormalProp$
|
|
2132
|
+
if (__hasOwnProp$k.call(b, prop))
|
|
2133
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
2134
|
+
if (__getOwnPropSymbols$k)
|
|
2135
|
+
for (var prop of __getOwnPropSymbols$k(b)) {
|
|
2136
|
+
if (__propIsEnum$k.call(b, prop))
|
|
2137
|
+
__defNormalProp$i(a, prop, b[prop]);
|
|
1897
2138
|
}
|
|
1898
2139
|
return a;
|
|
1899
2140
|
};
|
|
@@ -1923,7 +2164,7 @@ function useBreakpoints(breakpoints, options = {}) {
|
|
|
1923
2164
|
});
|
|
1924
2165
|
return shortcuts;
|
|
1925
2166
|
}, {});
|
|
1926
|
-
return __spreadValues$
|
|
2167
|
+
return __spreadValues$i({
|
|
1927
2168
|
greater,
|
|
1928
2169
|
smaller(k) {
|
|
1929
2170
|
return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);
|
|
@@ -2202,19 +2443,19 @@ function usePreferredDark(options) {
|
|
|
2202
2443
|
return useMediaQuery("(prefers-color-scheme: dark)", options);
|
|
2203
2444
|
}
|
|
2204
2445
|
|
|
2205
|
-
var __defProp$
|
|
2206
|
-
var __getOwnPropSymbols$
|
|
2207
|
-
var __hasOwnProp$
|
|
2208
|
-
var __propIsEnum$
|
|
2209
|
-
var __defNormalProp$
|
|
2210
|
-
var __spreadValues$
|
|
2446
|
+
var __defProp$h = Object.defineProperty;
|
|
2447
|
+
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
|
|
2448
|
+
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
|
|
2449
|
+
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
|
|
2450
|
+
var __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2451
|
+
var __spreadValues$h = (a, b) => {
|
|
2211
2452
|
for (var prop in b || (b = {}))
|
|
2212
|
-
if (__hasOwnProp$
|
|
2213
|
-
__defNormalProp$
|
|
2214
|
-
if (__getOwnPropSymbols$
|
|
2215
|
-
for (var prop of __getOwnPropSymbols$
|
|
2216
|
-
if (__propIsEnum$
|
|
2217
|
-
__defNormalProp$
|
|
2453
|
+
if (__hasOwnProp$j.call(b, prop))
|
|
2454
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2455
|
+
if (__getOwnPropSymbols$j)
|
|
2456
|
+
for (var prop of __getOwnPropSymbols$j(b)) {
|
|
2457
|
+
if (__propIsEnum$j.call(b, prop))
|
|
2458
|
+
__defNormalProp$h(a, prop, b[prop]);
|
|
2218
2459
|
}
|
|
2219
2460
|
return a;
|
|
2220
2461
|
};
|
|
@@ -2226,9 +2467,10 @@ function useColorMode(options = {}) {
|
|
|
2226
2467
|
storage,
|
|
2227
2468
|
storageKey = "vueuse-color-scheme",
|
|
2228
2469
|
listenToStorageChanges = true,
|
|
2229
|
-
storageRef
|
|
2470
|
+
storageRef,
|
|
2471
|
+
emitAuto
|
|
2230
2472
|
} = options;
|
|
2231
|
-
const modes = __spreadValues$
|
|
2473
|
+
const modes = __spreadValues$h({
|
|
2232
2474
|
auto: "",
|
|
2233
2475
|
light: "light",
|
|
2234
2476
|
dark: "dark"
|
|
@@ -2238,7 +2480,7 @@ function useColorMode(options = {}) {
|
|
|
2238
2480
|
const store = storageRef || (storageKey == null ? ref("auto") : useStorage(storageKey, "auto", storage, { window, listenToStorageChanges }));
|
|
2239
2481
|
const state = computed({
|
|
2240
2482
|
get() {
|
|
2241
|
-
return store.value === "auto" ? preferredMode.value : store.value;
|
|
2483
|
+
return store.value === "auto" && !emitAuto ? preferredMode.value : store.value;
|
|
2242
2484
|
},
|
|
2243
2485
|
set(v) {
|
|
2244
2486
|
store.value = v;
|
|
@@ -2262,7 +2504,8 @@ function useColorMode(options = {}) {
|
|
|
2262
2504
|
});
|
|
2263
2505
|
function defaultOnChanged(mode) {
|
|
2264
2506
|
var _a;
|
|
2265
|
-
|
|
2507
|
+
const resolvedMode = mode === "auto" ? preferredMode.value : mode;
|
|
2508
|
+
updateHTMLAttrs(selector, attribute, (_a = modes[resolvedMode]) != null ? _a : resolvedMode);
|
|
2266
2509
|
}
|
|
2267
2510
|
function onChanged(mode) {
|
|
2268
2511
|
if (options.onChanged)
|
|
@@ -2315,8 +2558,9 @@ function useCssVar(prop, target, { window = defaultWindow, initialValue = "" } =
|
|
|
2315
2558
|
return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
|
|
2316
2559
|
});
|
|
2317
2560
|
watch([elRef, () => unref(prop)], ([el, prop2]) => {
|
|
2561
|
+
var _a;
|
|
2318
2562
|
if (el && window) {
|
|
2319
|
-
const value = window.getComputedStyle(el).getPropertyValue(prop2);
|
|
2563
|
+
const value = (_a = window.getComputedStyle(el).getPropertyValue(prop2)) == null ? void 0 : _a.trim();
|
|
2320
2564
|
variable.value = value || initialValue;
|
|
2321
2565
|
}
|
|
2322
2566
|
}, { immediate: true });
|
|
@@ -2382,21 +2626,21 @@ function useCycleList(list, options) {
|
|
|
2382
2626
|
};
|
|
2383
2627
|
}
|
|
2384
2628
|
|
|
2385
|
-
var __defProp$
|
|
2386
|
-
var __defProps$7 = Object.defineProperties;
|
|
2387
|
-
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
2388
|
-
var __getOwnPropSymbols$
|
|
2389
|
-
var __hasOwnProp$
|
|
2390
|
-
var __propIsEnum$
|
|
2391
|
-
var __defNormalProp$
|
|
2392
|
-
var __spreadValues$
|
|
2629
|
+
var __defProp$g = Object.defineProperty;
|
|
2630
|
+
var __defProps$7 = Object.defineProperties;
|
|
2631
|
+
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
2632
|
+
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
|
|
2633
|
+
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
|
|
2634
|
+
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
|
|
2635
|
+
var __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2636
|
+
var __spreadValues$g = (a, b) => {
|
|
2393
2637
|
for (var prop in b || (b = {}))
|
|
2394
|
-
if (__hasOwnProp$
|
|
2395
|
-
__defNormalProp$
|
|
2396
|
-
if (__getOwnPropSymbols$
|
|
2397
|
-
for (var prop of __getOwnPropSymbols$
|
|
2398
|
-
if (__propIsEnum$
|
|
2399
|
-
__defNormalProp$
|
|
2638
|
+
if (__hasOwnProp$i.call(b, prop))
|
|
2639
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2640
|
+
if (__getOwnPropSymbols$i)
|
|
2641
|
+
for (var prop of __getOwnPropSymbols$i(b)) {
|
|
2642
|
+
if (__propIsEnum$i.call(b, prop))
|
|
2643
|
+
__defNormalProp$g(a, prop, b[prop]);
|
|
2400
2644
|
}
|
|
2401
2645
|
return a;
|
|
2402
2646
|
};
|
|
@@ -2407,7 +2651,7 @@ function useDark(options = {}) {
|
|
|
2407
2651
|
valueLight = "",
|
|
2408
2652
|
window = defaultWindow
|
|
2409
2653
|
} = options;
|
|
2410
|
-
const mode = useColorMode(__spreadProps$7(__spreadValues$
|
|
2654
|
+
const mode = useColorMode(__spreadProps$7(__spreadValues$g({}, options), {
|
|
2411
2655
|
onChanged: (mode2, defaultHandler) => {
|
|
2412
2656
|
var _a;
|
|
2413
2657
|
if (options.onChanged)
|
|
@@ -2512,21 +2756,21 @@ function useManualRefHistory(source, options = {}) {
|
|
|
2512
2756
|
};
|
|
2513
2757
|
}
|
|
2514
2758
|
|
|
2515
|
-
var __defProp$
|
|
2759
|
+
var __defProp$f = Object.defineProperty;
|
|
2516
2760
|
var __defProps$6 = Object.defineProperties;
|
|
2517
2761
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
2518
|
-
var __getOwnPropSymbols$
|
|
2519
|
-
var __hasOwnProp$
|
|
2520
|
-
var __propIsEnum$
|
|
2521
|
-
var __defNormalProp$
|
|
2522
|
-
var __spreadValues$
|
|
2762
|
+
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
|
|
2763
|
+
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
|
|
2764
|
+
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
|
|
2765
|
+
var __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2766
|
+
var __spreadValues$f = (a, b) => {
|
|
2523
2767
|
for (var prop in b || (b = {}))
|
|
2524
|
-
if (__hasOwnProp$
|
|
2525
|
-
__defNormalProp$
|
|
2526
|
-
if (__getOwnPropSymbols$
|
|
2527
|
-
for (var prop of __getOwnPropSymbols$
|
|
2528
|
-
if (__propIsEnum$
|
|
2529
|
-
__defNormalProp$
|
|
2768
|
+
if (__hasOwnProp$h.call(b, prop))
|
|
2769
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2770
|
+
if (__getOwnPropSymbols$h)
|
|
2771
|
+
for (var prop of __getOwnPropSymbols$h(b)) {
|
|
2772
|
+
if (__propIsEnum$h.call(b, prop))
|
|
2773
|
+
__defNormalProp$f(a, prop, b[prop]);
|
|
2530
2774
|
}
|
|
2531
2775
|
return a;
|
|
2532
2776
|
};
|
|
@@ -2554,7 +2798,7 @@ function useRefHistory(source, options = {}) {
|
|
|
2554
2798
|
source2.value = value;
|
|
2555
2799
|
});
|
|
2556
2800
|
}
|
|
2557
|
-
const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$
|
|
2801
|
+
const manualHistory = useManualRefHistory(source, __spreadProps$6(__spreadValues$f({}, options), { clone: options.clone || deep, setSource }));
|
|
2558
2802
|
const { clear, commit: manualCommit } = manualHistory;
|
|
2559
2803
|
function commit() {
|
|
2560
2804
|
ignorePrevAsyncUpdates();
|
|
@@ -2578,7 +2822,7 @@ function useRefHistory(source, options = {}) {
|
|
|
2578
2822
|
stop();
|
|
2579
2823
|
clear();
|
|
2580
2824
|
}
|
|
2581
|
-
return __spreadProps$6(__spreadValues$
|
|
2825
|
+
return __spreadProps$6(__spreadValues$f({}, manualHistory), {
|
|
2582
2826
|
isTracking,
|
|
2583
2827
|
pause,
|
|
2584
2828
|
resume,
|
|
@@ -2588,29 +2832,29 @@ function useRefHistory(source, options = {}) {
|
|
|
2588
2832
|
});
|
|
2589
2833
|
}
|
|
2590
2834
|
|
|
2591
|
-
var __defProp$
|
|
2835
|
+
var __defProp$e = Object.defineProperty;
|
|
2592
2836
|
var __defProps$5 = Object.defineProperties;
|
|
2593
2837
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
2594
|
-
var __getOwnPropSymbols$
|
|
2595
|
-
var __hasOwnProp$
|
|
2596
|
-
var __propIsEnum$
|
|
2597
|
-
var __defNormalProp$
|
|
2598
|
-
var __spreadValues$
|
|
2838
|
+
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
|
|
2839
|
+
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
|
|
2840
|
+
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
|
|
2841
|
+
var __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2842
|
+
var __spreadValues$e = (a, b) => {
|
|
2599
2843
|
for (var prop in b || (b = {}))
|
|
2600
|
-
if (__hasOwnProp$
|
|
2601
|
-
__defNormalProp$
|
|
2602
|
-
if (__getOwnPropSymbols$
|
|
2603
|
-
for (var prop of __getOwnPropSymbols$
|
|
2604
|
-
if (__propIsEnum$
|
|
2605
|
-
__defNormalProp$
|
|
2844
|
+
if (__hasOwnProp$g.call(b, prop))
|
|
2845
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2846
|
+
if (__getOwnPropSymbols$g)
|
|
2847
|
+
for (var prop of __getOwnPropSymbols$g(b)) {
|
|
2848
|
+
if (__propIsEnum$g.call(b, prop))
|
|
2849
|
+
__defNormalProp$e(a, prop, b[prop]);
|
|
2606
2850
|
}
|
|
2607
2851
|
return a;
|
|
2608
2852
|
};
|
|
2609
2853
|
var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));
|
|
2610
2854
|
function useDebouncedRefHistory(source, options = {}) {
|
|
2611
2855
|
const filter = options.debounce ? debounceFilter(options.debounce) : void 0;
|
|
2612
|
-
const history = useRefHistory(source, __spreadProps$5(__spreadValues$
|
|
2613
|
-
return __spreadValues$
|
|
2856
|
+
const history = useRefHistory(source, __spreadProps$5(__spreadValues$e({}, options), { eventFilter: filter }));
|
|
2857
|
+
return __spreadValues$e({}, history);
|
|
2614
2858
|
}
|
|
2615
2859
|
|
|
2616
2860
|
function useDeviceMotion(options = {}) {
|
|
@@ -2852,21 +3096,21 @@ function useDocumentVisibility({ document = defaultDocument } = {}) {
|
|
|
2852
3096
|
return visibility;
|
|
2853
3097
|
}
|
|
2854
3098
|
|
|
2855
|
-
var __defProp$
|
|
3099
|
+
var __defProp$d = Object.defineProperty;
|
|
2856
3100
|
var __defProps$4 = Object.defineProperties;
|
|
2857
3101
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
2858
|
-
var __getOwnPropSymbols$
|
|
2859
|
-
var __hasOwnProp$
|
|
2860
|
-
var __propIsEnum$
|
|
2861
|
-
var __defNormalProp$
|
|
2862
|
-
var __spreadValues$
|
|
3102
|
+
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
|
|
3103
|
+
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
|
|
3104
|
+
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
|
|
3105
|
+
var __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3106
|
+
var __spreadValues$d = (a, b) => {
|
|
2863
3107
|
for (var prop in b || (b = {}))
|
|
2864
|
-
if (__hasOwnProp$
|
|
2865
|
-
__defNormalProp$
|
|
2866
|
-
if (__getOwnPropSymbols$
|
|
2867
|
-
for (var prop of __getOwnPropSymbols$
|
|
2868
|
-
if (__propIsEnum$
|
|
2869
|
-
__defNormalProp$
|
|
3108
|
+
if (__hasOwnProp$f.call(b, prop))
|
|
3109
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
3110
|
+
if (__getOwnPropSymbols$f)
|
|
3111
|
+
for (var prop of __getOwnPropSymbols$f(b)) {
|
|
3112
|
+
if (__propIsEnum$f.call(b, prop))
|
|
3113
|
+
__defNormalProp$d(a, prop, b[prop]);
|
|
2870
3114
|
}
|
|
2871
3115
|
return a;
|
|
2872
3116
|
};
|
|
@@ -2931,7 +3175,7 @@ function useDraggable(target, options = {}) {
|
|
|
2931
3175
|
useEventListener(draggingElement, "pointermove", move, true);
|
|
2932
3176
|
useEventListener(draggingElement, "pointerup", end, true);
|
|
2933
3177
|
}
|
|
2934
|
-
return __spreadProps$4(__spreadValues$
|
|
3178
|
+
return __spreadProps$4(__spreadValues$d({}, toRefs(position)), {
|
|
2935
3179
|
position,
|
|
2936
3180
|
isDragging: computed(() => !!pressedDelta.value),
|
|
2937
3181
|
style: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)
|
|
@@ -2974,17 +3218,17 @@ function useDropZone(target, onDrop) {
|
|
|
2974
3218
|
};
|
|
2975
3219
|
}
|
|
2976
3220
|
|
|
2977
|
-
var __getOwnPropSymbols$
|
|
2978
|
-
var __hasOwnProp$
|
|
2979
|
-
var __propIsEnum$
|
|
3221
|
+
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
|
|
3222
|
+
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
|
|
3223
|
+
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
|
|
2980
3224
|
var __objRest$2 = (source, exclude) => {
|
|
2981
3225
|
var target = {};
|
|
2982
3226
|
for (var prop in source)
|
|
2983
|
-
if (__hasOwnProp$
|
|
3227
|
+
if (__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2984
3228
|
target[prop] = source[prop];
|
|
2985
|
-
if (source != null && __getOwnPropSymbols$
|
|
2986
|
-
for (var prop of __getOwnPropSymbols$
|
|
2987
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3229
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
3230
|
+
for (var prop of __getOwnPropSymbols$e(source)) {
|
|
3231
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop))
|
|
2988
3232
|
target[prop] = source[prop];
|
|
2989
3233
|
}
|
|
2990
3234
|
return target;
|
|
@@ -3116,19 +3360,19 @@ function useRafFn(fn, options = {}) {
|
|
|
3116
3360
|
};
|
|
3117
3361
|
}
|
|
3118
3362
|
|
|
3119
|
-
var __defProp$
|
|
3120
|
-
var __getOwnPropSymbols$
|
|
3121
|
-
var __hasOwnProp$
|
|
3122
|
-
var __propIsEnum$
|
|
3123
|
-
var __defNormalProp$
|
|
3124
|
-
var __spreadValues$
|
|
3363
|
+
var __defProp$c = Object.defineProperty;
|
|
3364
|
+
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
|
|
3365
|
+
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
|
|
3366
|
+
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
|
|
3367
|
+
var __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3368
|
+
var __spreadValues$c = (a, b) => {
|
|
3125
3369
|
for (var prop in b || (b = {}))
|
|
3126
|
-
if (__hasOwnProp$
|
|
3127
|
-
__defNormalProp$
|
|
3128
|
-
if (__getOwnPropSymbols$
|
|
3129
|
-
for (var prop of __getOwnPropSymbols$
|
|
3130
|
-
if (__propIsEnum$
|
|
3131
|
-
__defNormalProp$
|
|
3370
|
+
if (__hasOwnProp$d.call(b, prop))
|
|
3371
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3372
|
+
if (__getOwnPropSymbols$d)
|
|
3373
|
+
for (var prop of __getOwnPropSymbols$d(b)) {
|
|
3374
|
+
if (__propIsEnum$d.call(b, prop))
|
|
3375
|
+
__defNormalProp$c(a, prop, b[prop]);
|
|
3132
3376
|
}
|
|
3133
3377
|
return a;
|
|
3134
3378
|
};
|
|
@@ -3138,7 +3382,7 @@ function useElementByPoint(options) {
|
|
|
3138
3382
|
const controls = useRafFn(() => {
|
|
3139
3383
|
element.value = document.elementFromPoint(unref(x), unref(y));
|
|
3140
3384
|
});
|
|
3141
|
-
return __spreadValues$
|
|
3385
|
+
return __spreadValues$c({
|
|
3142
3386
|
element
|
|
3143
3387
|
}, controls);
|
|
3144
3388
|
}
|
|
@@ -3307,21 +3551,21 @@ function useFavicon(newIcon = null, options = {}) {
|
|
|
3307
3551
|
return favicon;
|
|
3308
3552
|
}
|
|
3309
3553
|
|
|
3310
|
-
var __defProp$
|
|
3554
|
+
var __defProp$b = Object.defineProperty;
|
|
3311
3555
|
var __defProps$3 = Object.defineProperties;
|
|
3312
3556
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
3313
|
-
var __getOwnPropSymbols$
|
|
3314
|
-
var __hasOwnProp$
|
|
3315
|
-
var __propIsEnum$
|
|
3316
|
-
var __defNormalProp$
|
|
3317
|
-
var __spreadValues$
|
|
3557
|
+
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
|
|
3558
|
+
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
|
|
3559
|
+
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
|
|
3560
|
+
var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3561
|
+
var __spreadValues$b = (a, b) => {
|
|
3318
3562
|
for (var prop in b || (b = {}))
|
|
3319
|
-
if (__hasOwnProp$
|
|
3320
|
-
__defNormalProp$
|
|
3321
|
-
if (__getOwnPropSymbols$
|
|
3322
|
-
for (var prop of __getOwnPropSymbols$
|
|
3323
|
-
if (__propIsEnum$
|
|
3324
|
-
__defNormalProp$
|
|
3563
|
+
if (__hasOwnProp$c.call(b, prop))
|
|
3564
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
3565
|
+
if (__getOwnPropSymbols$c)
|
|
3566
|
+
for (var prop of __getOwnPropSymbols$c(b)) {
|
|
3567
|
+
if (__propIsEnum$c.call(b, prop))
|
|
3568
|
+
__defNormalProp$b(a, prop, b[prop]);
|
|
3325
3569
|
}
|
|
3326
3570
|
return a;
|
|
3327
3571
|
};
|
|
@@ -3335,7 +3579,7 @@ function isFetchOptions(obj) {
|
|
|
3335
3579
|
return containsProp(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch");
|
|
3336
3580
|
}
|
|
3337
3581
|
function headersToObject(headers) {
|
|
3338
|
-
if (headers instanceof Headers)
|
|
3582
|
+
if (typeof Headers !== "undefined" && headers instanceof Headers)
|
|
3339
3583
|
return Object.fromEntries([...headers.entries()]);
|
|
3340
3584
|
return headers;
|
|
3341
3585
|
}
|
|
@@ -3348,15 +3592,15 @@ function createFetch(config = {}) {
|
|
|
3348
3592
|
let fetchOptions = _fetchOptions;
|
|
3349
3593
|
if (args.length > 0) {
|
|
3350
3594
|
if (isFetchOptions(args[0])) {
|
|
3351
|
-
options = __spreadValues$
|
|
3595
|
+
options = __spreadValues$b(__spreadValues$b({}, options), args[0]);
|
|
3352
3596
|
} else {
|
|
3353
|
-
fetchOptions = __spreadProps$3(__spreadValues$
|
|
3354
|
-
headers: __spreadValues$
|
|
3597
|
+
fetchOptions = __spreadProps$3(__spreadValues$b(__spreadValues$b({}, fetchOptions), args[0]), {
|
|
3598
|
+
headers: __spreadValues$b(__spreadValues$b({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})
|
|
3355
3599
|
});
|
|
3356
3600
|
}
|
|
3357
3601
|
}
|
|
3358
3602
|
if (args.length > 1 && isFetchOptions(args[1]))
|
|
3359
|
-
options = __spreadValues$
|
|
3603
|
+
options = __spreadValues$b(__spreadValues$b({}, options), args[1]);
|
|
3360
3604
|
return useFetch(computedUrl, fetchOptions, options);
|
|
3361
3605
|
}
|
|
3362
3606
|
return useFactoryFetch;
|
|
@@ -3373,13 +3617,13 @@ function useFetch(url, ...args) {
|
|
|
3373
3617
|
};
|
|
3374
3618
|
if (args.length > 0) {
|
|
3375
3619
|
if (isFetchOptions(args[0]))
|
|
3376
|
-
options = __spreadValues$
|
|
3620
|
+
options = __spreadValues$b(__spreadValues$b({}, options), args[0]);
|
|
3377
3621
|
else
|
|
3378
3622
|
fetchOptions = args[0];
|
|
3379
3623
|
}
|
|
3380
3624
|
if (args.length > 1) {
|
|
3381
3625
|
if (isFetchOptions(args[1]))
|
|
3382
|
-
options = __spreadValues$
|
|
3626
|
+
options = __spreadValues$b(__spreadValues$b({}, options), args[1]);
|
|
3383
3627
|
}
|
|
3384
3628
|
const {
|
|
3385
3629
|
fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,
|
|
@@ -3419,7 +3663,7 @@ function useFetch(url, ...args) {
|
|
|
3419
3663
|
if (supportsAbort) {
|
|
3420
3664
|
controller = new AbortController();
|
|
3421
3665
|
controller.signal.onabort = () => aborted.value = true;
|
|
3422
|
-
fetchOptions = __spreadProps$3(__spreadValues$
|
|
3666
|
+
fetchOptions = __spreadProps$3(__spreadValues$b({}, fetchOptions), {
|
|
3423
3667
|
signal: controller.signal
|
|
3424
3668
|
});
|
|
3425
3669
|
}
|
|
@@ -3434,7 +3678,7 @@ function useFetch(url, ...args) {
|
|
|
3434
3678
|
defaultFetchOptions.body = config.payloadType === "json" ? JSON.stringify(unref(config.payload)) : unref(config.payload);
|
|
3435
3679
|
}
|
|
3436
3680
|
let isCanceled = false;
|
|
3437
|
-
const context = { url: unref(url), options: __spreadValues$
|
|
3681
|
+
const context = { url: unref(url), options: __spreadValues$b(__spreadValues$b({}, defaultFetchOptions), fetchOptions), cancel: () => {
|
|
3438
3682
|
isCanceled = true;
|
|
3439
3683
|
} };
|
|
3440
3684
|
if (options.beforeFetch)
|
|
@@ -3448,8 +3692,8 @@ function useFetch(url, ...args) {
|
|
|
3448
3692
|
timer.start();
|
|
3449
3693
|
return new Promise((resolve, reject) => {
|
|
3450
3694
|
var _a3;
|
|
3451
|
-
fetch(context.url, __spreadProps$3(__spreadValues$
|
|
3452
|
-
headers: __spreadValues$
|
|
3695
|
+
fetch(context.url, __spreadProps$3(__spreadValues$b(__spreadValues$b({}, defaultFetchOptions), context.options), {
|
|
3696
|
+
headers: __spreadValues$b(__spreadValues$b({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))
|
|
3453
3697
|
})).then(async (fetchResponse) => {
|
|
3454
3698
|
response.value = fetchResponse;
|
|
3455
3699
|
statusCode.value = fetchResponse.status;
|
|
@@ -3524,7 +3768,7 @@ function useFetch(url, ...args) {
|
|
|
3524
3768
|
}
|
|
3525
3769
|
if (!payloadType && unref(payload) && Object.getPrototypeOf(unref(payload)) === Object.prototype)
|
|
3526
3770
|
config.payloadType = "json";
|
|
3527
|
-
return __spreadProps$3(__spreadValues$
|
|
3771
|
+
return __spreadProps$3(__spreadValues$b({}, shell), {
|
|
3528
3772
|
then(onFulfilled, onRejected) {
|
|
3529
3773
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
3530
3774
|
}
|
|
@@ -3542,7 +3786,7 @@ function useFetch(url, ...args) {
|
|
|
3542
3786
|
return () => {
|
|
3543
3787
|
if (!isFetching.value) {
|
|
3544
3788
|
config.type = type;
|
|
3545
|
-
return __spreadProps$3(__spreadValues$
|
|
3789
|
+
return __spreadProps$3(__spreadValues$b({}, shell), {
|
|
3546
3790
|
then(onFulfilled, onRejected) {
|
|
3547
3791
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
3548
3792
|
}
|
|
@@ -3553,7 +3797,7 @@ function useFetch(url, ...args) {
|
|
|
3553
3797
|
}
|
|
3554
3798
|
if (options.immediate)
|
|
3555
3799
|
setTimeout(execute, 0);
|
|
3556
|
-
return __spreadProps$3(__spreadValues$
|
|
3800
|
+
return __spreadProps$3(__spreadValues$b({}, shell), {
|
|
3557
3801
|
then(onFulfilled, onRejected) {
|
|
3558
3802
|
return waitUntilFinished().then(onFulfilled, onRejected);
|
|
3559
3803
|
}
|
|
@@ -3565,19 +3809,74 @@ function joinPaths(start, end) {
|
|
|
3565
3809
|
return `${start}${end}`;
|
|
3566
3810
|
}
|
|
3567
3811
|
|
|
3568
|
-
var __defProp$
|
|
3569
|
-
var __getOwnPropSymbols$
|
|
3570
|
-
var __hasOwnProp$
|
|
3571
|
-
var __propIsEnum$
|
|
3572
|
-
var __defNormalProp$
|
|
3573
|
-
var __spreadValues$
|
|
3812
|
+
var __defProp$a = Object.defineProperty;
|
|
3813
|
+
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
|
|
3814
|
+
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
|
|
3815
|
+
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
|
|
3816
|
+
var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3817
|
+
var __spreadValues$a = (a, b) => {
|
|
3574
3818
|
for (var prop in b || (b = {}))
|
|
3575
|
-
if (__hasOwnProp$
|
|
3576
|
-
__defNormalProp$
|
|
3577
|
-
if (__getOwnPropSymbols$
|
|
3578
|
-
for (var prop of __getOwnPropSymbols$
|
|
3579
|
-
if (__propIsEnum$
|
|
3580
|
-
__defNormalProp$
|
|
3819
|
+
if (__hasOwnProp$b.call(b, prop))
|
|
3820
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3821
|
+
if (__getOwnPropSymbols$b)
|
|
3822
|
+
for (var prop of __getOwnPropSymbols$b(b)) {
|
|
3823
|
+
if (__propIsEnum$b.call(b, prop))
|
|
3824
|
+
__defNormalProp$a(a, prop, b[prop]);
|
|
3825
|
+
}
|
|
3826
|
+
return a;
|
|
3827
|
+
};
|
|
3828
|
+
const DEFAULT_OPTIONS = {
|
|
3829
|
+
multiple: true,
|
|
3830
|
+
accept: "*"
|
|
3831
|
+
};
|
|
3832
|
+
function useFileDialog(options = {}) {
|
|
3833
|
+
const {
|
|
3834
|
+
document = defaultDocument
|
|
3835
|
+
} = options;
|
|
3836
|
+
const files = ref(null);
|
|
3837
|
+
let input;
|
|
3838
|
+
if (document) {
|
|
3839
|
+
input = document.createElement("input");
|
|
3840
|
+
input.type = "file";
|
|
3841
|
+
input.onchange = (event) => {
|
|
3842
|
+
const result = event.target;
|
|
3843
|
+
files.value = result.files;
|
|
3844
|
+
};
|
|
3845
|
+
}
|
|
3846
|
+
const open = (localOptions) => {
|
|
3847
|
+
if (!input)
|
|
3848
|
+
return;
|
|
3849
|
+
const _options = __spreadValues$a(__spreadValues$a(__spreadValues$a({}, DEFAULT_OPTIONS), options), localOptions);
|
|
3850
|
+
input.multiple = _options.multiple;
|
|
3851
|
+
input.accept = _options.accept;
|
|
3852
|
+
input.capture = _options.capture;
|
|
3853
|
+
input.click();
|
|
3854
|
+
};
|
|
3855
|
+
const reset = () => {
|
|
3856
|
+
files.value = null;
|
|
3857
|
+
if (input)
|
|
3858
|
+
input.value = "";
|
|
3859
|
+
};
|
|
3860
|
+
return {
|
|
3861
|
+
files: readonly(files),
|
|
3862
|
+
open,
|
|
3863
|
+
reset
|
|
3864
|
+
};
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
var __defProp$9 = Object.defineProperty;
|
|
3868
|
+
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
|
|
3869
|
+
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
|
|
3870
|
+
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
|
|
3871
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3872
|
+
var __spreadValues$9 = (a, b) => {
|
|
3873
|
+
for (var prop in b || (b = {}))
|
|
3874
|
+
if (__hasOwnProp$a.call(b, prop))
|
|
3875
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3876
|
+
if (__getOwnPropSymbols$a)
|
|
3877
|
+
for (var prop of __getOwnPropSymbols$a(b)) {
|
|
3878
|
+
if (__propIsEnum$a.call(b, prop))
|
|
3879
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
3581
3880
|
}
|
|
3582
3881
|
return a;
|
|
3583
3882
|
};
|
|
@@ -3610,7 +3909,7 @@ function useFileSystemAccess(options = {}) {
|
|
|
3610
3909
|
async function open(_options = {}) {
|
|
3611
3910
|
if (!isSupported)
|
|
3612
3911
|
return;
|
|
3613
|
-
const [handle] = await window.showOpenFilePicker(__spreadValues$
|
|
3912
|
+
const [handle] = await window.showOpenFilePicker(__spreadValues$9(__spreadValues$9({}, unref(options)), _options));
|
|
3614
3913
|
fileHandle.value = handle;
|
|
3615
3914
|
await updateFile();
|
|
3616
3915
|
await updateData();
|
|
@@ -3618,7 +3917,7 @@ function useFileSystemAccess(options = {}) {
|
|
|
3618
3917
|
async function create(_options = {}) {
|
|
3619
3918
|
if (!isSupported)
|
|
3620
3919
|
return;
|
|
3621
|
-
fileHandle.value = await window.showSaveFilePicker(__spreadValues$
|
|
3920
|
+
fileHandle.value = await window.showSaveFilePicker(__spreadValues$9(__spreadValues$9({}, unref(options)), _options));
|
|
3622
3921
|
data.value = void 0;
|
|
3623
3922
|
await updateFile();
|
|
3624
3923
|
await updateData();
|
|
@@ -3638,7 +3937,7 @@ function useFileSystemAccess(options = {}) {
|
|
|
3638
3937
|
async function saveAs(_options = {}) {
|
|
3639
3938
|
if (!isSupported)
|
|
3640
3939
|
return;
|
|
3641
|
-
fileHandle.value = await window.showSaveFilePicker(__spreadValues$
|
|
3940
|
+
fileHandle.value = await window.showSaveFilePicker(__spreadValues$9(__spreadValues$9({}, unref(options)), _options));
|
|
3642
3941
|
if (data.value) {
|
|
3643
3942
|
const writableStream = await fileHandle.value.createWritable();
|
|
3644
3943
|
await writableStream.write(data.value);
|
|
@@ -4019,6 +4318,43 @@ function useIdle(timeout = oneMinute, options = {}) {
|
|
|
4019
4318
|
return { idle, lastActive };
|
|
4020
4319
|
}
|
|
4021
4320
|
|
|
4321
|
+
var __defProp$8 = Object.defineProperty;
|
|
4322
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
4323
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
4324
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
4325
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4326
|
+
var __spreadValues$8 = (a, b) => {
|
|
4327
|
+
for (var prop in b || (b = {}))
|
|
4328
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
4329
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
4330
|
+
if (__getOwnPropSymbols$9)
|
|
4331
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
4332
|
+
if (__propIsEnum$9.call(b, prop))
|
|
4333
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
4334
|
+
}
|
|
4335
|
+
return a;
|
|
4336
|
+
};
|
|
4337
|
+
async function loadImage(options) {
|
|
4338
|
+
return new Promise((resolve, reject) => {
|
|
4339
|
+
const img = new Image();
|
|
4340
|
+
const { src, srcset, sizes } = options;
|
|
4341
|
+
img.src = src;
|
|
4342
|
+
if (srcset)
|
|
4343
|
+
img.srcset = srcset;
|
|
4344
|
+
if (sizes)
|
|
4345
|
+
img.sizes = sizes;
|
|
4346
|
+
img.onload = () => resolve(img);
|
|
4347
|
+
img.onerror = reject;
|
|
4348
|
+
});
|
|
4349
|
+
}
|
|
4350
|
+
const useImage = (options, asyncStateOptions = {}) => {
|
|
4351
|
+
const state = useAsyncState(() => loadImage(unref(options)), void 0, __spreadValues$8({
|
|
4352
|
+
resetOnExecute: true
|
|
4353
|
+
}, asyncStateOptions));
|
|
4354
|
+
watch(() => unref(options), () => state.execute(asyncStateOptions.delay), { deep: true });
|
|
4355
|
+
return state;
|
|
4356
|
+
};
|
|
4357
|
+
|
|
4022
4358
|
function useScroll(element, options = {}) {
|
|
4023
4359
|
const {
|
|
4024
4360
|
throttle = 0,
|
|
@@ -4068,7 +4404,9 @@ function useScroll(element, options = {}) {
|
|
|
4068
4404
|
arrivedState.left = scrollLeft <= 0 + (offset.left || 0);
|
|
4069
4405
|
arrivedState.right = scrollLeft + eventTarget.clientWidth >= eventTarget.scrollWidth - (offset.right || 0);
|
|
4070
4406
|
x.value = scrollLeft;
|
|
4071
|
-
|
|
4407
|
+
let scrollTop = eventTarget.scrollTop;
|
|
4408
|
+
if (e.target === document && !scrollTop)
|
|
4409
|
+
scrollTop = document.body.scrollTop;
|
|
4072
4410
|
directions.top = scrollTop < y.value;
|
|
4073
4411
|
directions.bottom = scrollTop > y.value;
|
|
4074
4412
|
arrivedState.top = scrollTop <= 0 + (offset.top || 0);
|
|
@@ -4224,6 +4562,7 @@ function useMagicKeys(options = {}) {
|
|
|
4224
4562
|
}, current };
|
|
4225
4563
|
const refs = useReactive ? reactive(obj) : obj;
|
|
4226
4564
|
const metaDeps = new Set();
|
|
4565
|
+
const usedKeys = new Set();
|
|
4227
4566
|
function setRefs(key, value) {
|
|
4228
4567
|
if (key in refs) {
|
|
4229
4568
|
if (useReactive)
|
|
@@ -4232,6 +4571,10 @@ function useMagicKeys(options = {}) {
|
|
|
4232
4571
|
refs[key].value = value;
|
|
4233
4572
|
}
|
|
4234
4573
|
}
|
|
4574
|
+
function reset() {
|
|
4575
|
+
for (const key of usedKeys)
|
|
4576
|
+
setRefs(key, false);
|
|
4577
|
+
}
|
|
4235
4578
|
function updateRefs(e, value) {
|
|
4236
4579
|
var _a, _b;
|
|
4237
4580
|
const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();
|
|
@@ -4243,15 +4586,17 @@ function useMagicKeys(options = {}) {
|
|
|
4243
4586
|
else
|
|
4244
4587
|
current.delete(e.code);
|
|
4245
4588
|
}
|
|
4246
|
-
for (const key2 of values)
|
|
4589
|
+
for (const key2 of values) {
|
|
4590
|
+
usedKeys.add(key2);
|
|
4247
4591
|
setRefs(key2, value);
|
|
4592
|
+
}
|
|
4248
4593
|
if (key === "meta" && !value) {
|
|
4249
4594
|
metaDeps.forEach((key2) => {
|
|
4250
4595
|
current.delete(key2);
|
|
4251
4596
|
setRefs(key2, false);
|
|
4252
4597
|
});
|
|
4253
4598
|
metaDeps.clear();
|
|
4254
|
-
} else if (e.getModifierState("Meta") && value) {
|
|
4599
|
+
} else if (typeof e.getModifierState === "function" && e.getModifierState("Meta") && value) {
|
|
4255
4600
|
[...current, ...values].forEach((key2) => metaDeps.add(key2));
|
|
4256
4601
|
}
|
|
4257
4602
|
}
|
|
@@ -4264,6 +4609,8 @@ function useMagicKeys(options = {}) {
|
|
|
4264
4609
|
updateRefs(e, false);
|
|
4265
4610
|
return onEventFired(e);
|
|
4266
4611
|
}, { passive });
|
|
4612
|
+
useEventListener("blur", reset, { passive: true });
|
|
4613
|
+
useEventListener("focus", reset, { passive: true });
|
|
4267
4614
|
}
|
|
4268
4615
|
const proxy = new Proxy(refs, {
|
|
4269
4616
|
get(target2, prop, rec) {
|
|
@@ -4891,6 +5238,22 @@ function useNow(options = {}) {
|
|
|
4891
5238
|
}
|
|
4892
5239
|
}
|
|
4893
5240
|
|
|
5241
|
+
function useObjectUrl(object) {
|
|
5242
|
+
const url = ref();
|
|
5243
|
+
const release = () => {
|
|
5244
|
+
if (url.value)
|
|
5245
|
+
URL.revokeObjectURL(url.value);
|
|
5246
|
+
url.value = void 0;
|
|
5247
|
+
};
|
|
5248
|
+
watch(() => unref(object), (newObject) => {
|
|
5249
|
+
release();
|
|
5250
|
+
if (newObject)
|
|
5251
|
+
url.value = URL.createObjectURL(newObject);
|
|
5252
|
+
}, { immediate: true });
|
|
5253
|
+
tryOnScopeDispose(release);
|
|
5254
|
+
return readonly(url);
|
|
5255
|
+
}
|
|
5256
|
+
|
|
4894
5257
|
function useOffsetPagination(options) {
|
|
4895
5258
|
const {
|
|
4896
5259
|
total = Infinity,
|
|
@@ -5675,6 +6038,81 @@ function useSpeechSynthesis(text, options = {}) {
|
|
|
5675
6038
|
};
|
|
5676
6039
|
}
|
|
5677
6040
|
|
|
6041
|
+
function useStepper(steps, initialStep) {
|
|
6042
|
+
const stepsRef = ref(steps);
|
|
6043
|
+
const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));
|
|
6044
|
+
const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));
|
|
6045
|
+
const current = computed(() => at(index.value));
|
|
6046
|
+
const isFirst = computed(() => index.value === 0);
|
|
6047
|
+
const isLast = computed(() => index.value === stepNames.value.length - 1);
|
|
6048
|
+
const next = computed(() => stepNames.value[index.value + 1]);
|
|
6049
|
+
const previous = computed(() => stepNames.value[index.value - 1]);
|
|
6050
|
+
function at(index2) {
|
|
6051
|
+
if (Array.isArray(stepsRef.value))
|
|
6052
|
+
return stepsRef.value[index2];
|
|
6053
|
+
return stepsRef.value[stepNames.value[index2]];
|
|
6054
|
+
}
|
|
6055
|
+
function get(step) {
|
|
6056
|
+
if (!stepNames.value.includes(step))
|
|
6057
|
+
return;
|
|
6058
|
+
return at(stepNames.value.indexOf(step));
|
|
6059
|
+
}
|
|
6060
|
+
function goTo(step) {
|
|
6061
|
+
if (stepNames.value.includes(step))
|
|
6062
|
+
index.value = stepNames.value.indexOf(step);
|
|
6063
|
+
}
|
|
6064
|
+
function goToNext() {
|
|
6065
|
+
if (isLast.value)
|
|
6066
|
+
return;
|
|
6067
|
+
index.value++;
|
|
6068
|
+
}
|
|
6069
|
+
function goToPrevious() {
|
|
6070
|
+
if (isFirst.value)
|
|
6071
|
+
return;
|
|
6072
|
+
index.value--;
|
|
6073
|
+
}
|
|
6074
|
+
function goBackTo(step) {
|
|
6075
|
+
if (isAfter(step))
|
|
6076
|
+
goTo(step);
|
|
6077
|
+
}
|
|
6078
|
+
function isNext(step) {
|
|
6079
|
+
return stepNames.value.indexOf(step) === index.value + 1;
|
|
6080
|
+
}
|
|
6081
|
+
function isPrevious(step) {
|
|
6082
|
+
return stepNames.value.indexOf(step) === index.value - 1;
|
|
6083
|
+
}
|
|
6084
|
+
function isCurrent(step) {
|
|
6085
|
+
return stepNames.value.indexOf(step) === index.value;
|
|
6086
|
+
}
|
|
6087
|
+
function isBefore(step) {
|
|
6088
|
+
return index.value < stepNames.value.indexOf(step);
|
|
6089
|
+
}
|
|
6090
|
+
function isAfter(step) {
|
|
6091
|
+
return index.value > stepNames.value.indexOf(step);
|
|
6092
|
+
}
|
|
6093
|
+
return {
|
|
6094
|
+
steps: stepsRef,
|
|
6095
|
+
stepNames,
|
|
6096
|
+
index,
|
|
6097
|
+
current,
|
|
6098
|
+
next,
|
|
6099
|
+
previous,
|
|
6100
|
+
isFirst,
|
|
6101
|
+
isLast,
|
|
6102
|
+
at,
|
|
6103
|
+
get,
|
|
6104
|
+
goTo,
|
|
6105
|
+
goToNext,
|
|
6106
|
+
goToPrevious,
|
|
6107
|
+
goBackTo,
|
|
6108
|
+
isNext,
|
|
6109
|
+
isPrevious,
|
|
6110
|
+
isCurrent,
|
|
6111
|
+
isBefore,
|
|
6112
|
+
isAfter
|
|
6113
|
+
};
|
|
6114
|
+
}
|
|
6115
|
+
|
|
5678
6116
|
function useStorageAsync(key, initialValue, storage, options = {}) {
|
|
5679
6117
|
var _a;
|
|
5680
6118
|
const {
|
|
@@ -5777,7 +6215,7 @@ function useStyleTag(css, options = {}) {
|
|
|
5777
6215
|
isLoaded.value = false;
|
|
5778
6216
|
};
|
|
5779
6217
|
if (immediate && !manual)
|
|
5780
|
-
load
|
|
6218
|
+
tryOnMounted(load);
|
|
5781
6219
|
if (!manual)
|
|
5782
6220
|
tryOnScopeDispose(unload);
|
|
5783
6221
|
return {
|
|
@@ -5837,6 +6275,27 @@ function useTextSelection(options = {}) {
|
|
|
5837
6275
|
};
|
|
5838
6276
|
}
|
|
5839
6277
|
|
|
6278
|
+
function useTextareaAutosize(options) {
|
|
6279
|
+
const textarea = ref(options == null ? void 0 : options.element);
|
|
6280
|
+
const input = ref(options == null ? void 0 : options.input);
|
|
6281
|
+
function triggerResize() {
|
|
6282
|
+
var _a, _b;
|
|
6283
|
+
if (!textarea.value)
|
|
6284
|
+
return;
|
|
6285
|
+
textarea.value.style.height = "1px";
|
|
6286
|
+
textarea.value.style.height = `${(_a = textarea.value) == null ? void 0 : _a.scrollHeight}px`;
|
|
6287
|
+
(_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);
|
|
6288
|
+
}
|
|
6289
|
+
watch([input, textarea], triggerResize, { immediate: true });
|
|
6290
|
+
if (options == null ? void 0 : options.watch)
|
|
6291
|
+
watch(options.watch, triggerResize, { immediate: true, deep: true });
|
|
6292
|
+
return {
|
|
6293
|
+
textarea,
|
|
6294
|
+
input,
|
|
6295
|
+
triggerResize
|
|
6296
|
+
};
|
|
6297
|
+
}
|
|
6298
|
+
|
|
5840
6299
|
var __defProp$2 = Object.defineProperty;
|
|
5841
6300
|
var __defProps = Object.defineProperties;
|
|
5842
6301
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -6223,7 +6682,7 @@ function useUrlSearchParams(mode = "history", options = {}) {
|
|
|
6223
6682
|
pause();
|
|
6224
6683
|
if (shouldUpdate)
|
|
6225
6684
|
updateState(params);
|
|
6226
|
-
window.history.replaceState(
|
|
6685
|
+
window.history.replaceState(window.history.state, window.document.title, window.location.pathname + constructQuery(params));
|
|
6227
6686
|
resume();
|
|
6228
6687
|
}
|
|
6229
6688
|
function onChanged() {
|
|
@@ -6310,7 +6769,7 @@ function useUserMedia(options = {}) {
|
|
|
6310
6769
|
}
|
|
6311
6770
|
|
|
6312
6771
|
function useVModel(props, key, emit, options = {}) {
|
|
6313
|
-
var _a, _b, _c;
|
|
6772
|
+
var _a, _b, _c, _d, _e;
|
|
6314
6773
|
const {
|
|
6315
6774
|
passive = false,
|
|
6316
6775
|
eventName,
|
|
@@ -6318,11 +6777,11 @@ function useVModel(props, key, emit, options = {}) {
|
|
|
6318
6777
|
defaultValue
|
|
6319
6778
|
} = options;
|
|
6320
6779
|
const vm = getCurrentInstance();
|
|
6321
|
-
const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm));
|
|
6780
|
+
const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));
|
|
6322
6781
|
let event = eventName;
|
|
6323
6782
|
if (!key) {
|
|
6324
6783
|
if (isVue2) {
|
|
6325
|
-
const modelOptions = (
|
|
6784
|
+
const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;
|
|
6326
6785
|
key = (modelOptions == null ? void 0 : modelOptions.value) || "value";
|
|
6327
6786
|
if (!eventName)
|
|
6328
6787
|
event = (modelOptions == null ? void 0 : modelOptions.event) || "input";
|
|
@@ -6873,7 +7332,13 @@ function useWindowScroll({ window = defaultWindow } = {}) {
|
|
|
6873
7332
|
return { x, y };
|
|
6874
7333
|
}
|
|
6875
7334
|
|
|
6876
|
-
function useWindowSize(
|
|
7335
|
+
function useWindowSize(options = {}) {
|
|
7336
|
+
const {
|
|
7337
|
+
window = defaultWindow,
|
|
7338
|
+
initialWidth = Infinity,
|
|
7339
|
+
initialHeight = Infinity,
|
|
7340
|
+
listenOrientation = true
|
|
7341
|
+
} = options;
|
|
6877
7342
|
const width = ref(initialWidth);
|
|
6878
7343
|
const height = ref(initialHeight);
|
|
6879
7344
|
const update = () => {
|
|
@@ -6885,7 +7350,9 @@ function useWindowSize({ window = defaultWindow, initialWidth = Infinity, initia
|
|
|
6885
7350
|
update();
|
|
6886
7351
|
tryOnMounted(update);
|
|
6887
7352
|
useEventListener("resize", update, { passive: true });
|
|
7353
|
+
if (listenOrientation)
|
|
7354
|
+
useEventListener("orientationchange", update, { passive: true });
|
|
6888
7355
|
return { width, height };
|
|
6889
7356
|
}
|
|
6890
7357
|
|
|
6891
|
-
export { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, __onlyVue3, logicAnd as and, assert, computedAsync as asyncComputed, refAutoReset as autoResetRef, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, bypassFilter, clamp, computedAsync, computedEager, computedInject, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFetch, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, createUnrefFn, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getSSRHandler, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, logicAnd, logicNot, logicOr, makeDestructurable, mapGamepadToXbox360Controller, noop, normalizeDate, logicNot as not, now, objectPick, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, logicOr as or, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, set, setSSRHandler, syncRef, syncRefs, templateRef, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, unrefElement, until, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClamp, useClipboard, useColorMode, useConfirmDialog, useCounter, useCssVar, useCurrentElement, useCycleList, useDark, useDateFormat, refDebounced as useDebounce, useDebounceFn, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useInfiniteScroll, useIntersectionObserver, useInterval, useIntervalFn, useKeyModifier, useLastChanged, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerSwipe, usePreferredColorScheme, usePreferredDark, usePreferredLanguages, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSpeechRecognition, useSpeechSynthesis, useStorage, useStorageAsync, useStyleTag, useSwipe, useTemplateRefsList, useTextSelection, refThrottled as useThrottle, useThrottleFn, useThrottledRefHistory, useTimeAgo, useTimeout, useTimeoutFn, useTimeoutPoll, useTimestamp, useTitle, useToggle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchWithFilter, whenever };
|
|
7358
|
+
export { DefaultMagicKeysAliasMap, StorageSerializers, SwipeDirection, TransitionPresets, __onlyVue3, logicAnd as and, assert, computedAsync as asyncComputed, refAutoReset as autoResetRef, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, bypassFilter, clamp, computedAsync, computedEager, computedInject, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFetch, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, createUnrefFn, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getSSRHandler, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isBoolean, isClient, isDef, isDefined, isFunction, isIOS, isNumber, isObject, isString, isWindow, logicAnd, logicNot, logicOr, makeDestructurable, mapGamepadToXbox360Controller, noop, normalizeDate, logicNot as not, now, objectPick, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, logicOr as or, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, setSSRHandler, syncRef, syncRefs, templateRef, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, unrefElement, until, useActiveElement, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClamp, useClipboard, useColorMode, useConfirmDialog, useCounter, useCssVar, useCurrentElement, useCycleList, useDark, useDateFormat, refDebounced as useDebounce, useDebounceFn, 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, useInterval, useIntervalFn, useKeyModifier, useLastChanged, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, usePermission, usePointer, usePointerSwipe, usePreferredColorScheme, usePreferredDark, usePreferredLanguages, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSwipe, useTemplateRefsList, useTextSelection, useTextareaAutosize, refThrottled as useThrottle, useThrottleFn, useThrottledRefHistory, useTimeAgo, useTimeout, useTimeoutFn, useTimeoutPoll, useTimestamp, useTitle, useToggle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize, watchArray, watchAtMost, watchDebounced, watchIgnorable, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };
|