@vueuse/components 11.2.0 → 12.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.iife.js CHANGED
@@ -1,145 +1,18 @@
1
- var _VueDemiGlobal = typeof globalThis !== 'undefined'
2
- ? globalThis
3
- : typeof global !== 'undefined'
4
- ? global
5
- : typeof self !== 'undefined'
6
- ? self
7
- : this
8
- var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
9
- if (VueDemi.install) {
10
- return VueDemi
11
- }
12
- if (!Vue) {
13
- console.error('[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`.')
14
- return VueDemi
15
- }
16
-
17
- // Vue 2.7
18
- if (Vue.version.slice(0, 4) === '2.7.') {
19
- for (var key in Vue) {
20
- VueDemi[key] = Vue[key]
21
- }
22
- VueDemi.isVue2 = true
23
- VueDemi.isVue3 = false
24
- VueDemi.install = function () {}
25
- VueDemi.Vue = Vue
26
- VueDemi.Vue2 = Vue
27
- VueDemi.version = Vue.version
28
- VueDemi.warn = Vue.util.warn
29
- VueDemi.hasInjectionContext = function() {
30
- return !!VueDemi.getCurrentInstance()
31
- }
32
- function createApp(rootComponent, rootProps) {
33
- var vm
34
- var provide = {}
35
- var app = {
36
- config: Vue.config,
37
- use: Vue.use.bind(Vue),
38
- mixin: Vue.mixin.bind(Vue),
39
- component: Vue.component.bind(Vue),
40
- provide: function (key, value) {
41
- provide[key] = value
42
- return this
43
- },
44
- directive: function (name, dir) {
45
- if (dir) {
46
- Vue.directive(name, dir)
47
- return app
48
- } else {
49
- return Vue.directive(name)
50
- }
51
- },
52
- mount: function (el, hydrating) {
53
- if (!vm) {
54
- vm = new Vue(Object.assign({ propsData: rootProps }, rootComponent, { provide: Object.assign(provide, rootComponent.provide) }))
55
- vm.$mount(el, hydrating)
56
- return vm
57
- } else {
58
- return vm
59
- }
60
- },
61
- unmount: function () {
62
- if (vm) {
63
- vm.$destroy()
64
- vm = undefined
65
- }
66
- },
67
- }
68
- return app
69
- }
70
- VueDemi.createApp = createApp
71
- }
72
- // Vue 2.6.x
73
- else if (Vue.version.slice(0, 2) === '2.') {
74
- if (VueCompositionAPI) {
75
- for (var key in VueCompositionAPI) {
76
- VueDemi[key] = VueCompositionAPI[key]
77
- }
78
- VueDemi.isVue2 = true
79
- VueDemi.isVue3 = false
80
- VueDemi.install = function () {}
81
- VueDemi.Vue = Vue
82
- VueDemi.Vue2 = Vue
83
- VueDemi.version = Vue.version
84
- VueDemi.hasInjectionContext = function() {
85
- return !!VueDemi.getCurrentInstance()
86
- }
87
- } else {
88
- console.error('[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.')
89
- }
90
- }
91
- // Vue 3
92
- else if (Vue.version.slice(0, 2) === '3.') {
93
- for (var key in Vue) {
94
- VueDemi[key] = Vue[key]
95
- }
96
- VueDemi.isVue2 = false
97
- VueDemi.isVue3 = true
98
- VueDemi.install = function () {}
99
- VueDemi.Vue = Vue
100
- VueDemi.Vue2 = undefined
101
- VueDemi.version = Vue.version
102
- VueDemi.set = function (target, key, val) {
103
- if (Array.isArray(target)) {
104
- target.length = Math.max(target.length, key)
105
- target.splice(key, 1, val)
106
- return val
107
- }
108
- target[key] = val
109
- return val
110
- }
111
- VueDemi.del = function (target, key) {
112
- if (Array.isArray(target)) {
113
- target.splice(key, 1)
114
- return
115
- }
116
- delete target[key]
117
- }
118
- } else {
119
- console.error('[vue-demi] Vue version ' + Vue.version + ' is unsupported.')
120
- }
121
- return VueDemi
122
- })(
123
- (_VueDemiGlobal.VueDemi = _VueDemiGlobal.VueDemi || (typeof VueDemi !== 'undefined' ? VueDemi : {})),
124
- _VueDemiGlobal.Vue || (typeof Vue !== 'undefined' ? Vue : undefined),
125
- _VueDemiGlobal.VueCompositionAPI || (typeof VueCompositionAPI !== 'undefined' ? VueCompositionAPI : undefined)
126
- );
127
- ;
128
- ;(function (exports, core, vueDemi, shared) {
1
+ (function (exports, core, vue, shared) {
129
2
  'use strict';
130
3
 
131
- const OnClickOutside = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
4
+ const OnClickOutside = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
132
5
  name: "OnClickOutside",
133
6
  props: ["as", "options"],
134
7
  emits: ["trigger"],
135
8
  setup(props, { slots, emit }) {
136
- const target = vueDemi.ref();
9
+ const target = vue.ref();
137
10
  core.onClickOutside(target, (e) => {
138
11
  emit("trigger", e);
139
12
  }, props.options);
140
13
  return () => {
141
14
  if (slots.default)
142
- return vueDemi.h(props.as || "div", { ref: target }, slots.default());
15
+ return vue.h(props.as || "div", { ref: target }, slots.default());
143
16
  };
144
17
  }
145
18
  });
@@ -178,7 +51,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
178
51
  el.addEventListener(event, listener, options2);
179
52
  return () => el.removeEventListener(event, listener, options2);
180
53
  };
181
- const stopWatch = vueDemi.watch(
54
+ const stopWatch = vue.watch(
182
55
  () => [unrefElement(target), shared.toValue(options)],
183
56
  ([el, options2]) => {
184
57
  cleanup();
@@ -222,8 +95,23 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
222
95
  }
223
96
  });
224
97
  };
98
+ function hasMultipleRoots(target2) {
99
+ const vm = shared.toValue(target2);
100
+ return vm && vm.$.subTree.shapeFlag === 16;
101
+ }
102
+ function checkMultipleRoots(target2, event) {
103
+ const vm = shared.toValue(target2);
104
+ const children = vm.$.subTree && vm.$.subTree.children;
105
+ if (children == null || !Array.isArray(children))
106
+ return false;
107
+ return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
108
+ }
225
109
  const listener = (event) => {
226
110
  const el = unrefElement(target);
111
+ if (event.target == null)
112
+ return;
113
+ if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event))
114
+ return;
227
115
  if (!el || el === event.target || event.composedPath().includes(el))
228
116
  return;
229
117
  if (event.detail === 0)
@@ -264,7 +152,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
264
152
  }
265
153
 
266
154
  const vOnClickOutside = {
267
- [shared.directiveHooks.mounted](el, binding) {
155
+ mounted(el, binding) {
268
156
  const capture = !binding.modifiers.bubble;
269
157
  if (typeof binding.value === "function") {
270
158
  el.__onClickOutside_stop = onClickOutside(el, binding.value, { capture });
@@ -273,7 +161,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
273
161
  el.__onClickOutside_stop = onClickOutside(el, handler, Object.assign({ capture }, options));
274
162
  }
275
163
  },
276
- [shared.directiveHooks.unmounted](el) {
164
+ unmounted(el) {
277
165
  el.__onClickOutside_stop();
278
166
  }
279
167
  };
@@ -325,7 +213,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
325
213
  }
326
214
 
327
215
  const vOnKeyStroke = {
328
- [shared.directiveHooks.mounted](el, binding) {
216
+ mounted(el, binding) {
329
217
  var _a, _b;
330
218
  const keys = (_b = (_a = binding.arg) == null ? void 0 : _a.split(",")) != null ? _b : true;
331
219
  if (typeof binding.value === "function") {
@@ -346,7 +234,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
346
234
  const DEFAULT_THRESHOLD = 10;
347
235
  function onLongPress(target, handler, options) {
348
236
  var _a, _b;
349
- const elementRef = vueDemi.computed(() => unrefElement(target));
237
+ const elementRef = vue.computed(() => unrefElement(target));
350
238
  let timeout;
351
239
  let posStart;
352
240
  let startTimestamp;
@@ -428,12 +316,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
428
316
  return stop;
429
317
  }
430
318
 
431
- const OnLongPress = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
319
+ const OnLongPress = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
432
320
  name: "OnLongPress",
433
321
  props: ["as", "options"],
434
322
  emits: ["trigger"],
435
323
  setup(props, { slots, emit }) {
436
- const target = vueDemi.ref();
324
+ const target = vue.ref();
437
325
  onLongPress(
438
326
  target,
439
327
  (e) => {
@@ -443,13 +331,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
443
331
  );
444
332
  return () => {
445
333
  if (slots.default)
446
- return vueDemi.h(props.as || "div", { ref: target }, slots.default());
334
+ return vue.h(props.as || "div", { ref: target }, slots.default());
447
335
  };
448
336
  }
449
337
  });
450
338
 
451
339
  const vOnLongPress = {
452
- [shared.directiveHooks.mounted](el, binding) {
340
+ mounted(el, binding) {
453
341
  if (typeof binding.value === "function")
454
342
  onLongPress(el, binding.value, { modifiers: binding.modifiers });
455
343
  else
@@ -457,10 +345,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
457
345
  }
458
346
  };
459
347
 
460
- const UseActiveElement = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
348
+ const UseActiveElement = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
461
349
  name: "UseActiveElement",
462
350
  setup(props, { slots }) {
463
- const data = vueDemi.reactive({
351
+ const data = vue.reactive({
464
352
  element: core.useActiveElement()
465
353
  });
466
354
  return () => {
@@ -470,10 +358,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
470
358
  }
471
359
  });
472
360
 
473
- const UseBattery = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
361
+ const UseBattery = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
474
362
  name: "UseBattery",
475
363
  setup(props, { slots }) {
476
- const data = vueDemi.reactive(core.useBattery(props));
364
+ const data = vue.reactive(core.useBattery(props));
477
365
  return () => {
478
366
  if (slots.default)
479
367
  return slots.default(data);
@@ -481,10 +369,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
481
369
  }
482
370
  });
483
371
 
484
- const UseBrowserLocation = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
372
+ const UseBrowserLocation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
485
373
  name: "UseBrowserLocation",
486
374
  setup(props, { slots }) {
487
- const data = vueDemi.reactive(core.useBrowserLocation());
375
+ const data = vue.reactive(core.useBrowserLocation());
488
376
  return () => {
489
377
  if (slots.default)
490
378
  return slots.default(data);
@@ -492,7 +380,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
492
380
  }
493
381
  });
494
382
 
495
- const UseClipboard = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
383
+ const UseClipboard = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
496
384
  name: "UseClipboard",
497
385
  props: [
498
386
  "source",
@@ -502,7 +390,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
502
390
  "legacy"
503
391
  ],
504
392
  setup(props, { slots }) {
505
- const data = vueDemi.reactive(core.useClipboard(props));
393
+ const data = vue.reactive(core.useClipboard(props));
506
394
  return () => {
507
395
  var _a;
508
396
  return (_a = slots.default) == null ? void 0 : _a.call(slots, data);
@@ -523,19 +411,19 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
523
411
  }
524
412
 
525
413
  function useMounted() {
526
- const isMounted = vueDemi.ref(false);
527
- const instance = vueDemi.getCurrentInstance();
414
+ const isMounted = vue.ref(false);
415
+ const instance = vue.getCurrentInstance();
528
416
  if (instance) {
529
- vueDemi.onMounted(() => {
417
+ vue.onMounted(() => {
530
418
  isMounted.value = true;
531
- }, vueDemi.isVue2 ? void 0 : instance);
419
+ }, instance);
532
420
  }
533
421
  return isMounted;
534
422
  }
535
423
 
536
424
  function useSupported(callback) {
537
425
  const isMounted = useMounted();
538
- return vueDemi.computed(() => {
426
+ return vue.computed(() => {
539
427
  isMounted.value;
540
428
  return Boolean(callback());
541
429
  });
@@ -545,7 +433,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
545
433
  const { window = defaultWindow } = options;
546
434
  const isSupported = useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
547
435
  let mediaQuery;
548
- const matches = vueDemi.ref(false);
436
+ const matches = vue.ref(false);
549
437
  const handler = (event) => {
550
438
  matches.value = event.matches;
551
439
  };
@@ -557,7 +445,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
557
445
  else
558
446
  mediaQuery.removeListener(handler);
559
447
  };
560
- const stopWatch = vueDemi.watchEffect(() => {
448
+ const stopWatch = vue.watchEffect(() => {
561
449
  if (!isSupported.value)
562
450
  return;
563
451
  cleanup();
@@ -635,7 +523,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
635
523
  },
636
524
  initOnMounted
637
525
  } = options;
638
- const data = (shallow ? vueDemi.shallowRef : vueDemi.ref)(typeof defaults === "function" ? defaults() : defaults);
526
+ const data = (shallow ? vue.shallowRef : vue.ref)(typeof defaults === "function" ? defaults() : defaults);
639
527
  if (!storage) {
640
528
  try {
641
529
  storage = getSSRHandler("getDefaultStorage", () => {
@@ -734,7 +622,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
734
622
  onError(e);
735
623
  } finally {
736
624
  if (event)
737
- vueDemi.nextTick(resumeWatch);
625
+ vue.nextTick(resumeWatch);
738
626
  else
739
627
  resumeWatch();
740
628
  }
@@ -766,9 +654,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
766
654
  ...options.modes || {}
767
655
  };
768
656
  const preferredDark = usePreferredDark({ window });
769
- const system = vueDemi.computed(() => preferredDark.value ? "dark" : "light");
657
+ const system = vue.computed(() => preferredDark.value ? "dark" : "light");
770
658
  const store = storageRef || (storageKey == null ? shared.toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));
771
- const state = vueDemi.computed(() => store.value === "auto" ? system.value : store.value);
659
+ const state = vue.computed(() => store.value === "auto" ? system.value : store.value);
772
660
  const updateHTMLAttrs = getSSRHandler(
773
661
  "updateHTMLAttrs",
774
662
  (selector2, attribute2, value) => {
@@ -822,9 +710,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
822
710
  else
823
711
  defaultOnChanged(mode);
824
712
  }
825
- vueDemi.watch(state, onChanged, { flush: "post", immediate: true });
713
+ vue.watch(state, onChanged, { flush: "post", immediate: true });
826
714
  shared.tryOnMounted(() => onChanged(state.value));
827
- const auto = vueDemi.computed({
715
+ const auto = vue.computed({
828
716
  get() {
829
717
  return emitAuto ? store.value : state.value;
830
718
  },
@@ -832,19 +720,15 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
832
720
  store.value = v;
833
721
  }
834
722
  });
835
- try {
836
- return Object.assign(auto, { store, system, state });
837
- } catch (e) {
838
- return auto;
839
- }
723
+ return Object.assign(auto, { store, system, state });
840
724
  }
841
725
 
842
- const UseColorMode = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
726
+ const UseColorMode = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
843
727
  name: "UseColorMode",
844
728
  props: ["selector", "attribute", "modes", "onChanged", "storageKey", "storage", "emitAuto"],
845
729
  setup(props, { slots }) {
846
730
  const mode = useColorMode(props);
847
- const data = vueDemi.reactive({
731
+ const data = vue.reactive({
848
732
  mode,
849
733
  system: mode.system,
850
734
  store: mode.store
@@ -856,12 +740,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
856
740
  }
857
741
  });
858
742
 
859
- const UseDark = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
743
+ const UseDark = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
860
744
  name: "UseDark",
861
745
  props: ["selector", "attribute", "valueDark", "valueLight", "onChanged", "storageKey", "storage"],
862
746
  setup(props, { slots }) {
863
747
  const isDark = core.useDark(props);
864
- const data = vueDemi.reactive({
748
+ const data = vue.reactive({
865
749
  isDark,
866
750
  toggleDark: shared.useToggle(isDark)
867
751
  });
@@ -872,10 +756,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
872
756
  }
873
757
  });
874
758
 
875
- const UseDeviceMotion = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
759
+ const UseDeviceMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
876
760
  name: "UseDeviceMotion",
877
761
  setup(props, { slots }) {
878
- const data = vueDemi.reactive(core.useDeviceMotion());
762
+ const data = vue.reactive(core.useDeviceMotion());
879
763
  return () => {
880
764
  if (slots.default)
881
765
  return slots.default(data);
@@ -883,10 +767,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
883
767
  }
884
768
  });
885
769
 
886
- const UseDeviceOrientation = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
770
+ const UseDeviceOrientation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
887
771
  name: "UseDeviceOrientation",
888
772
  setup(props, { slots }) {
889
- const data = vueDemi.reactive(core.useDeviceOrientation());
773
+ const data = vue.reactive(core.useDeviceOrientation());
890
774
  return () => {
891
775
  if (slots.default)
892
776
  return slots.default(data);
@@ -894,10 +778,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
894
778
  }
895
779
  });
896
780
 
897
- const UseDevicePixelRatio = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
781
+ const UseDevicePixelRatio = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
898
782
  name: "UseDevicePixelRatio",
899
783
  setup(props, { slots }) {
900
- const data = vueDemi.reactive({
784
+ const data = vue.reactive({
901
785
  pixelRatio: core.useDevicePixelRatio()
902
786
  });
903
787
  return () => {
@@ -907,11 +791,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
907
791
  }
908
792
  });
909
793
 
910
- const UseDevicesList = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
794
+ const UseDevicesList = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
911
795
  name: "UseDevicesList",
912
796
  props: ["onUpdated", "requestPermissions", "constraints"],
913
797
  setup(props, { slots }) {
914
- const data = vueDemi.reactive(core.useDevicesList(props));
798
+ const data = vue.reactive(core.useDevicesList(props));
915
799
  return () => {
916
800
  if (slots.default)
917
801
  return slots.default(data);
@@ -919,10 +803,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
919
803
  }
920
804
  });
921
805
 
922
- const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
806
+ const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
923
807
  name: "UseDocumentVisibility",
924
808
  setup(props, { slots }) {
925
- const data = vueDemi.reactive({
809
+ const data = vue.reactive({
926
810
  visibility: core.useDocumentVisibility()
927
811
  });
928
812
  return () => {
@@ -932,7 +816,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
932
816
  }
933
817
  });
934
818
 
935
- const UseDraggable = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
819
+ const UseDraggable = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
936
820
  name: "UseDraggable",
937
821
  props: [
938
822
  "storageKey",
@@ -953,16 +837,16 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
953
837
  "containerElement"
954
838
  ],
955
839
  setup(props, { slots }) {
956
- const target = vueDemi.ref();
957
- const handle = vueDemi.computed(() => {
840
+ const target = vue.ref();
841
+ const handle = vue.computed(() => {
958
842
  var _a;
959
843
  return (_a = props.handle) != null ? _a : target.value;
960
844
  });
961
- const containerElement = vueDemi.computed(() => {
845
+ const containerElement = vue.computed(() => {
962
846
  var _a;
963
847
  return (_a = props.containerElement) != null ? _a : void 0;
964
848
  });
965
- const disabled = vueDemi.computed(() => !!props.disabled);
849
+ const disabled = vue.computed(() => !!props.disabled);
966
850
  const storageValue = props.storageKey && core.useStorage(
967
851
  props.storageKey,
968
852
  shared.toValue(props.initialValue) || { x: 0, y: 0 },
@@ -977,7 +861,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
977
861
  storageValue.value.x = position.x;
978
862
  storageValue.value.y = position.y;
979
863
  };
980
- const data = vueDemi.reactive(core.useDraggable(target, {
864
+ const data = vue.reactive(core.useDraggable(target, {
981
865
  ...props,
982
866
  handle,
983
867
  initialValue,
@@ -987,20 +871,20 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
987
871
  }));
988
872
  return () => {
989
873
  if (slots.default)
990
- return vueDemi.h(props.as || "div", { ref: target, style: `touch-action:none;${data.style}` }, slots.default(data));
874
+ return vue.h(props.as || "div", { ref: target, style: `touch-action:none;${data.style}` }, slots.default(data));
991
875
  };
992
876
  }
993
877
  });
994
878
 
995
- const UseElementBounding = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
879
+ const UseElementBounding = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
996
880
  name: "UseElementBounding",
997
881
  props: ["box", "as"],
998
882
  setup(props, { slots }) {
999
- const target = vueDemi.ref();
1000
- const data = vueDemi.reactive(core.useElementBounding(target));
883
+ const target = vue.ref();
884
+ const data = vue.reactive(core.useElementBounding(target));
1001
885
  return () => {
1002
886
  if (slots.default)
1003
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
887
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1004
888
  };
1005
889
  }
1006
890
  });
@@ -1011,7 +895,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1011
895
  delayLeave = 0,
1012
896
  window = defaultWindow
1013
897
  } = options;
1014
- const isHovered = vueDemi.ref(false);
898
+ const isHovered = vue.ref(false);
1015
899
  let timer;
1016
900
  const toggle = (entering) => {
1017
901
  const delay = entering ? delayEnter : delayLeave;
@@ -1032,28 +916,28 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1032
916
  }
1033
917
 
1034
918
  const vElementHover = {
1035
- [shared.directiveHooks.mounted](el, binding) {
919
+ mounted(el, binding) {
1036
920
  const value = binding.value;
1037
921
  if (typeof value === "function") {
1038
922
  const isHovered = useElementHover(el);
1039
- vueDemi.watch(isHovered, (v) => value(v));
923
+ vue.watch(isHovered, (v) => value(v));
1040
924
  } else {
1041
925
  const [handler, options] = value;
1042
926
  const isHovered = useElementHover(el, options);
1043
- vueDemi.watch(isHovered, (v) => handler(v));
927
+ vue.watch(isHovered, (v) => handler(v));
1044
928
  }
1045
929
  }
1046
930
  };
1047
931
 
1048
- const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
932
+ const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1049
933
  name: "UseElementSize",
1050
934
  props: ["width", "height", "box", "as"],
1051
935
  setup(props, { slots }) {
1052
- const target = vueDemi.ref();
1053
- const data = vueDemi.reactive(core.useElementSize(target, { width: props.width, height: props.height }, { box: props.box }));
936
+ const target = vue.ref();
937
+ const data = vue.reactive(core.useElementSize(target, { width: props.width, height: props.height }, { box: props.box }));
1054
938
  return () => {
1055
939
  if (slots.default)
1056
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
940
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1057
941
  };
1058
942
  }
1059
943
  });
@@ -1068,11 +952,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1068
952
  observer = void 0;
1069
953
  }
1070
954
  };
1071
- const targets = vueDemi.computed(() => {
955
+ const targets = vue.computed(() => {
1072
956
  const _targets = shared.toValue(target);
1073
957
  return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
1074
958
  });
1075
- const stopWatch = vueDemi.watch(
959
+ const stopWatch = vue.watch(
1076
960
  targets,
1077
961
  (els) => {
1078
962
  cleanup();
@@ -1099,12 +983,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1099
983
 
1100
984
  function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
1101
985
  const { window = defaultWindow, box = "content-box" } = options;
1102
- const isSVG = vueDemi.computed(() => {
986
+ const isSVG = vue.computed(() => {
1103
987
  var _a, _b;
1104
988
  return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
1105
989
  });
1106
- const width = vueDemi.ref(initialSize.width);
1107
- const height = vueDemi.ref(initialSize.height);
990
+ const width = vue.ref(initialSize.width);
991
+ const height = vue.ref(initialSize.height);
1108
992
  const { stop: stop1 } = useResizeObserver(
1109
993
  target,
1110
994
  ([entry]) => {
@@ -1136,7 +1020,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1136
1020
  height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
1137
1021
  }
1138
1022
  });
1139
- const stop2 = vueDemi.watch(
1023
+ const stop2 = vue.watch(
1140
1024
  () => unrefElement(target),
1141
1025
  (ele) => {
1142
1026
  width.value = ele ? initialSize.width : 0;
@@ -1155,26 +1039,26 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1155
1039
  }
1156
1040
 
1157
1041
  const vElementSize = {
1158
- [shared.directiveHooks.mounted](el, binding) {
1042
+ mounted(el, binding) {
1159
1043
  var _a;
1160
1044
  const handler = typeof binding.value === "function" ? binding.value : (_a = binding.value) == null ? void 0 : _a[0];
1161
1045
  const options = typeof binding.value === "function" ? [] : binding.value.slice(1);
1162
1046
  const { width, height } = useElementSize(el, ...options);
1163
- vueDemi.watch([width, height], ([width2, height2]) => handler({ width: width2, height: height2 }));
1047
+ vue.watch([width, height], ([width2, height2]) => handler({ width: width2, height: height2 }));
1164
1048
  }
1165
1049
  };
1166
1050
 
1167
- const UseElementVisibility = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1051
+ const UseElementVisibility = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1168
1052
  name: "UseElementVisibility",
1169
1053
  props: ["as"],
1170
1054
  setup(props, { slots }) {
1171
- const target = vueDemi.ref();
1172
- const data = vueDemi.reactive({
1055
+ const target = vue.ref();
1056
+ const data = vue.reactive({
1173
1057
  isVisible: core.useElementVisibility(target)
1174
1058
  });
1175
1059
  return () => {
1176
1060
  if (slots.default)
1177
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1061
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1178
1062
  };
1179
1063
  }
1180
1064
  });
@@ -1188,13 +1072,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1188
1072
  immediate = true
1189
1073
  } = options;
1190
1074
  const isSupported = useSupported(() => window && "IntersectionObserver" in window);
1191
- const targets = vueDemi.computed(() => {
1075
+ const targets = vue.computed(() => {
1192
1076
  const _target = shared.toValue(target);
1193
1077
  return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(shared.notNullish);
1194
1078
  });
1195
1079
  let cleanup = shared.noop;
1196
- const isActive = vueDemi.ref(immediate);
1197
- const stopWatch = isSupported.value ? vueDemi.watch(
1080
+ const isActive = vue.ref(immediate);
1081
+ const stopWatch = isSupported.value ? vue.watch(
1198
1082
  () => [targets.value, unrefElement(root), isActive.value],
1199
1083
  ([targets2, root2]) => {
1200
1084
  cleanup();
@@ -1240,7 +1124,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1240
1124
 
1241
1125
  function useElementVisibility(element, options = {}) {
1242
1126
  const { window = defaultWindow, scrollTarget, threshold = 0 } = options;
1243
- const elementIsVisible = vueDemi.ref(false);
1127
+ const elementIsVisible = vue.ref(false);
1244
1128
  useIntersectionObserver(
1245
1129
  element,
1246
1130
  (intersectionObserverEntries) => {
@@ -1264,26 +1148,26 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1264
1148
  }
1265
1149
 
1266
1150
  const vElementVisibility = {
1267
- [shared.directiveHooks.mounted](el, binding) {
1151
+ mounted(el, binding) {
1268
1152
  if (typeof binding.value === "function") {
1269
1153
  const handler = binding.value;
1270
1154
  const isVisible = useElementVisibility(el);
1271
- vueDemi.watch(isVisible, (v) => handler(v), { immediate: true });
1155
+ vue.watch(isVisible, (v) => handler(v), { immediate: true });
1272
1156
  } else {
1273
1157
  const [handler, options] = binding.value;
1274
1158
  const isVisible = useElementVisibility(el, options);
1275
- vueDemi.watch(isVisible, (v) => handler(v), { immediate: true });
1159
+ vue.watch(isVisible, (v) => handler(v), { immediate: true });
1276
1160
  }
1277
1161
  }
1278
1162
  };
1279
1163
 
1280
- const UseEyeDropper = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1164
+ const UseEyeDropper = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1281
1165
  name: "UseEyeDropper",
1282
1166
  props: {
1283
1167
  sRGBHex: String
1284
1168
  },
1285
1169
  setup(props, { slots }) {
1286
- const data = vueDemi.reactive(core.useEyeDropper());
1170
+ const data = vue.reactive(core.useEyeDropper());
1287
1171
  return () => {
1288
1172
  if (slots.default)
1289
1173
  return slots.default(data);
@@ -1291,24 +1175,24 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1291
1175
  }
1292
1176
  });
1293
1177
 
1294
- const UseFullscreen = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1178
+ const UseFullscreen = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1295
1179
  name: "UseFullscreen",
1296
1180
  props: ["as"],
1297
1181
  setup(props, { slots }) {
1298
- const target = vueDemi.ref();
1299
- const data = vueDemi.reactive(core.useFullscreen(target));
1182
+ const target = vue.ref();
1183
+ const data = vue.reactive(core.useFullscreen(target));
1300
1184
  return () => {
1301
1185
  if (slots.default)
1302
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1186
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1303
1187
  };
1304
1188
  }
1305
1189
  });
1306
1190
 
1307
- const UseGeolocation = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1191
+ const UseGeolocation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1308
1192
  name: "UseGeolocation",
1309
1193
  props: ["enableHighAccuracy", "maximumAge", "timeout", "navigator"],
1310
1194
  setup(props, { slots }) {
1311
- const data = vueDemi.reactive(core.useGeolocation(props));
1195
+ const data = vue.reactive(core.useGeolocation(props));
1312
1196
  return () => {
1313
1197
  if (slots.default)
1314
1198
  return slots.default(data);
@@ -1316,11 +1200,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1316
1200
  }
1317
1201
  });
1318
1202
 
1319
- const UseIdle = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1203
+ const UseIdle = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1320
1204
  name: "UseIdle",
1321
1205
  props: ["timeout", "events", "listenForVisibilityChange", "initialState"],
1322
1206
  setup(props, { slots }) {
1323
- const data = vueDemi.reactive(core.useIdle(props.timeout, props));
1207
+ const data = vue.reactive(core.useIdle(props.timeout, props));
1324
1208
  return () => {
1325
1209
  if (slots.default)
1326
1210
  return slots.default(data);
@@ -1338,10 +1222,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1338
1222
  shallow = true,
1339
1223
  throwError
1340
1224
  } = options != null ? options : {};
1341
- const state = shallow ? vueDemi.shallowRef(initialState) : vueDemi.ref(initialState);
1342
- const isReady = vueDemi.ref(false);
1343
- const isLoading = vueDemi.ref(false);
1344
- const error = vueDemi.shallowRef(void 0);
1225
+ const state = shallow ? vue.shallowRef(initialState) : vue.ref(initialState);
1226
+ const isReady = vue.ref(false);
1227
+ const isLoading = vue.ref(false);
1228
+ const error = vue.shallowRef(void 0);
1345
1229
  async function execute(delay2 = 0, ...args) {
1346
1230
  if (resetOnExecute)
1347
1231
  state.value = initialState;
@@ -1418,7 +1302,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1418
1302
  ...asyncStateOptions
1419
1303
  }
1420
1304
  );
1421
- vueDemi.watch(
1305
+ vue.watch(
1422
1306
  () => shared.toValue(options),
1423
1307
  () => state.execute(asyncStateOptions.delay),
1424
1308
  { deep: true }
@@ -1426,7 +1310,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1426
1310
  return state;
1427
1311
  }
1428
1312
 
1429
- const UseImage = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1313
+ const UseImage = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1430
1314
  name: "UseImage",
1431
1315
  props: [
1432
1316
  "src",
@@ -1440,7 +1324,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1440
1324
  "referrerPolicy"
1441
1325
  ],
1442
1326
  setup(props, { slots }) {
1443
- const data = vueDemi.reactive(useImage(props));
1327
+ const data = vue.reactive(useImage(props));
1444
1328
  return () => {
1445
1329
  if (data.isLoading && slots.loading)
1446
1330
  return slots.loading(data);
@@ -1448,7 +1332,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1448
1332
  return slots.error(data.error);
1449
1333
  if (slots.default)
1450
1334
  return slots.default(data);
1451
- return vueDemi.h(props.as || "img", props);
1335
+ return vue.h(props.as || "img", props);
1452
1336
  };
1453
1337
  }
1454
1338
  });
@@ -1484,9 +1368,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1484
1368
  console.error(e);
1485
1369
  }
1486
1370
  } = options;
1487
- const internalX = vueDemi.ref(0);
1488
- const internalY = vueDemi.ref(0);
1489
- const x = vueDemi.computed({
1371
+ const internalX = vue.ref(0);
1372
+ const internalY = vue.ref(0);
1373
+ const x = vue.computed({
1490
1374
  get() {
1491
1375
  return internalX.value;
1492
1376
  },
@@ -1494,7 +1378,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1494
1378
  scrollTo(x2, void 0);
1495
1379
  }
1496
1380
  });
1497
- const y = vueDemi.computed({
1381
+ const y = vue.computed({
1498
1382
  get() {
1499
1383
  return internalY.value;
1500
1384
  },
@@ -1520,14 +1404,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1520
1404
  if (y != null)
1521
1405
  internalY.value = scrollContainer.scrollTop;
1522
1406
  }
1523
- const isScrolling = vueDemi.ref(false);
1524
- const arrivedState = vueDemi.reactive({
1407
+ const isScrolling = vue.ref(false);
1408
+ const arrivedState = vue.reactive({
1525
1409
  left: true,
1526
1410
  right: false,
1527
1411
  top: true,
1528
1412
  bottom: false
1529
1413
  });
1530
- const directions = vueDemi.reactive({
1414
+ const directions = vue.reactive({
1531
1415
  left: false,
1532
1416
  right: false,
1533
1417
  top: false,
@@ -1632,7 +1516,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1632
1516
  interval = 100,
1633
1517
  canLoadMore = () => true
1634
1518
  } = options;
1635
- const state = vueDemi.reactive(useScroll(
1519
+ const state = vue.reactive(useScroll(
1636
1520
  element,
1637
1521
  {
1638
1522
  ...options,
@@ -1642,9 +1526,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1642
1526
  }
1643
1527
  }
1644
1528
  ));
1645
- const promise = vueDemi.ref();
1646
- const isLoading = vueDemi.computed(() => !!promise.value);
1647
- const observedElement = vueDemi.computed(() => {
1529
+ const promise = vue.ref();
1530
+ const isLoading = vue.computed(() => !!promise.value);
1531
+ const observedElement = vue.computed(() => {
1648
1532
  return resolveElement(shared.toValue(element));
1649
1533
  });
1650
1534
  const isElementVisible = useElementVisibility(observedElement);
@@ -1661,12 +1545,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1661
1545
  new Promise((resolve) => setTimeout(resolve, interval))
1662
1546
  ]).finally(() => {
1663
1547
  promise.value = null;
1664
- vueDemi.nextTick(() => checkAndLoad());
1548
+ vue.nextTick(() => checkAndLoad());
1665
1549
  });
1666
1550
  }
1667
1551
  }
1668
1552
  }
1669
- const stop = vueDemi.watch(
1553
+ const stop = vue.watch(
1670
1554
  () => [state.arrivedState[direction], isElementVisible.value],
1671
1555
  checkAndLoad,
1672
1556
  { immediate: true }
@@ -1675,13 +1559,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1675
1559
  return {
1676
1560
  isLoading,
1677
1561
  reset() {
1678
- vueDemi.nextTick(() => checkAndLoad());
1562
+ vue.nextTick(() => checkAndLoad());
1679
1563
  }
1680
1564
  };
1681
1565
  }
1682
1566
 
1683
1567
  const vInfiniteScroll = {
1684
- [shared.directiveHooks.mounted](el, binding) {
1568
+ mounted(el, binding) {
1685
1569
  if (typeof binding.value === "function")
1686
1570
  useInfiniteScroll(el, binding.value);
1687
1571
  else
@@ -1690,7 +1574,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1690
1574
  };
1691
1575
 
1692
1576
  const vIntersectionObserver = {
1693
- [shared.directiveHooks.mounted](el, binding) {
1577
+ mounted(el, binding) {
1694
1578
  if (typeof binding.value === "function")
1695
1579
  useIntersectionObserver(el, binding.value);
1696
1580
  else
@@ -1698,11 +1582,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1698
1582
  }
1699
1583
  };
1700
1584
 
1701
- const UseMouse = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1585
+ const UseMouse = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1702
1586
  name: "UseMouse",
1703
1587
  props: ["touch", "resetOnTouchEnds", "initialValue"],
1704
1588
  setup(props, { slots }) {
1705
- const data = vueDemi.reactive(core.useMouse(props));
1589
+ const data = vue.reactive(core.useMouse(props));
1706
1590
  return () => {
1707
1591
  if (slots.default)
1708
1592
  return slots.default(data);
@@ -1710,36 +1594,36 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1710
1594
  }
1711
1595
  });
1712
1596
 
1713
- const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1597
+ const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1714
1598
  name: "UseMouseElement",
1715
1599
  props: ["handleOutside", "as"],
1716
1600
  setup(props, { slots }) {
1717
- const target = vueDemi.ref();
1718
- const data = vueDemi.reactive(core.useMouseInElement(target, props));
1601
+ const target = vue.ref();
1602
+ const data = vue.reactive(core.useMouseInElement(target, props));
1719
1603
  return () => {
1720
1604
  if (slots.default)
1721
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1605
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1722
1606
  };
1723
1607
  }
1724
1608
  });
1725
1609
 
1726
- const UseMousePressed = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1610
+ const UseMousePressed = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1727
1611
  name: "UseMousePressed",
1728
1612
  props: ["touch", "initialValue", "as"],
1729
1613
  setup(props, { slots }) {
1730
- const target = vueDemi.ref();
1731
- const data = vueDemi.reactive(core.useMousePressed({ ...props, target }));
1614
+ const target = vue.ref();
1615
+ const data = vue.reactive(core.useMousePressed({ ...props, target }));
1732
1616
  return () => {
1733
1617
  if (slots.default)
1734
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1618
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1735
1619
  };
1736
1620
  }
1737
1621
  });
1738
1622
 
1739
- const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1623
+ const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1740
1624
  name: "UseNetwork",
1741
1625
  setup(props, { slots }) {
1742
- const data = vueDemi.reactive(core.useNetwork());
1626
+ const data = vue.reactive(core.useNetwork());
1743
1627
  return () => {
1744
1628
  if (slots.default)
1745
1629
  return slots.default(data);
@@ -1747,11 +1631,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1747
1631
  }
1748
1632
  });
1749
1633
 
1750
- const UseNow = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1634
+ const UseNow = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1751
1635
  name: "UseNow",
1752
1636
  props: ["interval"],
1753
1637
  setup(props, { slots }) {
1754
- const data = vueDemi.reactive(core.useNow({ ...props, controls: true }));
1638
+ const data = vue.reactive(core.useNow({ ...props, controls: true }));
1755
1639
  return () => {
1756
1640
  if (slots.default)
1757
1641
  return slots.default(data);
@@ -1759,7 +1643,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1759
1643
  }
1760
1644
  });
1761
1645
 
1762
- const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1646
+ const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1763
1647
  name: "UseObjectUrl",
1764
1648
  props: [
1765
1649
  "object"
@@ -1774,7 +1658,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1774
1658
  }
1775
1659
  });
1776
1660
 
1777
- const UseOffsetPagination = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1661
+ const UseOffsetPagination = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1778
1662
  name: "UseOffsetPagination",
1779
1663
  props: [
1780
1664
  "total",
@@ -1790,7 +1674,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1790
1674
  "page-count-change"
1791
1675
  ],
1792
1676
  setup(props, { slots, emit }) {
1793
- const data = vueDemi.reactive(core.useOffsetPagination({
1677
+ const data = vue.reactive(core.useOffsetPagination({
1794
1678
  ...props,
1795
1679
  onPageChange(...args) {
1796
1680
  var _a;
@@ -1815,10 +1699,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1815
1699
  }
1816
1700
  });
1817
1701
 
1818
- const UseOnline = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1702
+ const UseOnline = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1819
1703
  name: "UseOnline",
1820
1704
  setup(props, { slots }) {
1821
- const data = vueDemi.reactive({
1705
+ const data = vue.reactive({
1822
1706
  isOnline: core.useOnline()
1823
1707
  });
1824
1708
  return () => {
@@ -1828,10 +1712,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1828
1712
  }
1829
1713
  });
1830
1714
 
1831
- const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1715
+ const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1832
1716
  name: "UsePageLeave",
1833
1717
  setup(props, { slots }) {
1834
- const data = vueDemi.reactive({
1718
+ const data = vue.reactive({
1835
1719
  isLeft: core.usePageLeave()
1836
1720
  });
1837
1721
  return () => {
@@ -1841,7 +1725,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1841
1725
  }
1842
1726
  });
1843
1727
 
1844
- const UsePointer = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1728
+ const UsePointer = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1845
1729
  name: "UsePointer",
1846
1730
  props: [
1847
1731
  "pointerTypes",
@@ -1849,8 +1733,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1849
1733
  "target"
1850
1734
  ],
1851
1735
  setup(props, { slots }) {
1852
- const el = vueDemi.ref(null);
1853
- const data = vueDemi.reactive(core.usePointer({
1736
+ const el = vue.ref(null);
1737
+ const data = vue.reactive(core.usePointer({
1854
1738
  ...props,
1855
1739
  target: props.target === "self" ? el : defaultWindow
1856
1740
  }));
@@ -1861,23 +1745,23 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1861
1745
  }
1862
1746
  });
1863
1747
 
1864
- const UsePointerLock = /* #__PURE__ */ vueDemi.defineComponent({
1748
+ const UsePointerLock = /* #__PURE__ */ vue.defineComponent({
1865
1749
  name: "UsePointerLock",
1866
1750
  props: ["as"],
1867
1751
  setup(props, { slots }) {
1868
- const target = vueDemi.ref();
1869
- const data = vueDemi.reactive(core.usePointerLock(target));
1752
+ const target = vue.ref();
1753
+ const data = vue.reactive(core.usePointerLock(target));
1870
1754
  return () => {
1871
1755
  if (slots.default)
1872
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1756
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1873
1757
  };
1874
1758
  }
1875
1759
  });
1876
1760
 
1877
- const UsePreferredColorScheme = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1761
+ const UsePreferredColorScheme = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1878
1762
  name: "UsePreferredColorScheme",
1879
1763
  setup(props, { slots }) {
1880
- const data = vueDemi.reactive({
1764
+ const data = vue.reactive({
1881
1765
  colorScheme: core.usePreferredColorScheme()
1882
1766
  });
1883
1767
  return () => {
@@ -1887,10 +1771,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1887
1771
  }
1888
1772
  });
1889
1773
 
1890
- const UsePreferredContrast = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1774
+ const UsePreferredContrast = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1891
1775
  name: "UsePreferredContrast",
1892
1776
  setup(props, { slots }) {
1893
- const data = vueDemi.reactive({
1777
+ const data = vue.reactive({
1894
1778
  contrast: core.usePreferredContrast()
1895
1779
  });
1896
1780
  return () => {
@@ -1900,10 +1784,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1900
1784
  }
1901
1785
  });
1902
1786
 
1903
- const UsePreferredDark = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1787
+ const UsePreferredDark = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1904
1788
  name: "UsePreferredDark",
1905
1789
  setup(props, { slots }) {
1906
- const data = vueDemi.reactive({
1790
+ const data = vue.reactive({
1907
1791
  prefersDark: core.usePreferredDark()
1908
1792
  });
1909
1793
  return () => {
@@ -1913,10 +1797,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1913
1797
  }
1914
1798
  });
1915
1799
 
1916
- const UsePreferredLanguages = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1800
+ const UsePreferredLanguages = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1917
1801
  name: "UsePreferredLanguages",
1918
1802
  setup(props, { slots }) {
1919
- const data = vueDemi.reactive({
1803
+ const data = vue.reactive({
1920
1804
  languages: core.usePreferredLanguages()
1921
1805
  });
1922
1806
  return () => {
@@ -1926,10 +1810,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1926
1810
  }
1927
1811
  });
1928
1812
 
1929
- const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1813
+ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1930
1814
  name: "UsePreferredReducedMotion",
1931
1815
  setup(props, { slots }) {
1932
- const data = vueDemi.reactive({
1816
+ const data = vue.reactive({
1933
1817
  motion: core.usePreferredReducedMotion()
1934
1818
  });
1935
1819
  return () => {
@@ -1940,7 +1824,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1940
1824
  });
1941
1825
 
1942
1826
  const vResizeObserver = {
1943
- [shared.directiveHooks.mounted](el, binding) {
1827
+ mounted(el, binding) {
1944
1828
  if (typeof binding.value === "function")
1945
1829
  useResizeObserver(el, binding.value);
1946
1830
  else
@@ -1958,12 +1842,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1958
1842
  observer = void 0;
1959
1843
  }
1960
1844
  };
1961
- const targets = vueDemi.computed(() => {
1845
+ const targets = vue.computed(() => {
1962
1846
  const value = shared.toValue(target);
1963
1847
  const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(shared.notNullish);
1964
1848
  return new Set(items);
1965
1849
  });
1966
- const stopWatch = vueDemi.watch(
1850
+ const stopWatch = vue.watch(
1967
1851
  () => targets.value,
1968
1852
  (targets2) => {
1969
1853
  cleanup();
@@ -1991,8 +1875,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1991
1875
 
1992
1876
  function useCssVar(prop, target, options = {}) {
1993
1877
  const { window = defaultWindow, initialValue, observe = false } = options;
1994
- const variable = vueDemi.ref(initialValue);
1995
- const elRef = vueDemi.computed(() => {
1878
+ const variable = vue.ref(initialValue);
1879
+ const elRef = vue.computed(() => {
1996
1880
  var _a;
1997
1881
  return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
1998
1882
  });
@@ -2011,7 +1895,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2011
1895
  window
2012
1896
  });
2013
1897
  }
2014
- vueDemi.watch(
1898
+ vue.watch(
2015
1899
  [elRef, () => shared.toValue(prop)],
2016
1900
  (_, old) => {
2017
1901
  if (old[0] && old[1])
@@ -2020,7 +1904,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2020
1904
  },
2021
1905
  { immediate: true }
2022
1906
  );
2023
- vueDemi.watch(
1907
+ vue.watch(
2024
1908
  variable,
2025
1909
  (val) => {
2026
1910
  var _a;
@@ -2041,10 +1925,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2041
1925
  const bottomVarName = "--vueuse-safe-area-bottom";
2042
1926
  const leftVarName = "--vueuse-safe-area-left";
2043
1927
  function useScreenSafeArea() {
2044
- const top = vueDemi.ref("");
2045
- const right = vueDemi.ref("");
2046
- const bottom = vueDemi.ref("");
2047
- const left = vueDemi.ref("");
1928
+ const top = vue.ref("");
1929
+ const right = vue.ref("");
1930
+ const bottom = vue.ref("");
1931
+ const left = vue.ref("");
2048
1932
  if (shared.isClient) {
2049
1933
  const topCssVar = useCssVar(topVarName);
2050
1934
  const rightCssVar = useCssVar(rightVarName);
@@ -2075,7 +1959,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2075
1959
  return getComputedStyle(document.documentElement).getPropertyValue(position);
2076
1960
  }
2077
1961
 
2078
- const UseScreenSafeArea = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1962
+ const UseScreenSafeArea = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2079
1963
  name: "UseScreenSafeArea",
2080
1964
  props: {
2081
1965
  top: Boolean,
@@ -2092,7 +1976,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2092
1976
  } = useScreenSafeArea();
2093
1977
  return () => {
2094
1978
  if (slots.default) {
2095
- return vueDemi.h("div", {
1979
+ return vue.h("div", {
2096
1980
  style: {
2097
1981
  paddingTop: props.top ? top.value : "",
2098
1982
  paddingRight: props.right ? right.value : "",
@@ -2110,7 +1994,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2110
1994
  });
2111
1995
 
2112
1996
  const vScroll = {
2113
- [shared.directiveHooks.mounted](el, binding) {
1997
+ mounted(el, binding) {
2114
1998
  if (typeof binding.value === "function") {
2115
1999
  const handler = binding.value;
2116
2000
  const state = useScroll(el, {
@@ -2164,10 +2048,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2164
2048
  }
2165
2049
  const elInitialOverflow = /* @__PURE__ */ new WeakMap();
2166
2050
  function useScrollLock(element, initialState = false) {
2167
- const isLocked = vueDemi.ref(initialState);
2051
+ const isLocked = vue.ref(initialState);
2168
2052
  let stopTouchMoveListener = null;
2169
2053
  let initialOverflow = "";
2170
- vueDemi.watch(shared.toRef(element), (el) => {
2054
+ vue.watch(shared.toRef(element), (el) => {
2171
2055
  const target = resolveElement(shared.toValue(el));
2172
2056
  if (target) {
2173
2057
  const ele = target;
@@ -2211,7 +2095,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2211
2095
  isLocked.value = false;
2212
2096
  };
2213
2097
  shared.tryOnScopeDispose(unlock);
2214
- return vueDemi.computed({
2098
+ return vue.computed({
2215
2099
  get() {
2216
2100
  return isLocked.value;
2217
2101
  },
@@ -2225,23 +2109,23 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2225
2109
 
2226
2110
  function onScrollLock() {
2227
2111
  let isMounted = false;
2228
- const state = vueDemi.ref(false);
2112
+ const state = vue.ref(false);
2229
2113
  return (el, binding) => {
2230
2114
  state.value = binding.value;
2231
2115
  if (isMounted)
2232
2116
  return;
2233
2117
  isMounted = true;
2234
2118
  const isLocked = useScrollLock(el, binding.value);
2235
- vueDemi.watch(state, (v) => isLocked.value = v);
2119
+ vue.watch(state, (v) => isLocked.value = v);
2236
2120
  };
2237
2121
  }
2238
2122
  const vScrollLock = onScrollLock();
2239
2123
 
2240
- const UseTimeAgo = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2124
+ const UseTimeAgo = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2241
2125
  name: "UseTimeAgo",
2242
2126
  props: ["time", "updateInterval", "max", "fullDateFormatter", "messages", "showSecond"],
2243
2127
  setup(props, { slots }) {
2244
- const data = vueDemi.reactive(core.useTimeAgo(() => props.time, { ...props, controls: true }));
2128
+ const data = vue.reactive(core.useTimeAgo(() => props.time, { ...props, controls: true }));
2245
2129
  return () => {
2246
2130
  if (slots.default)
2247
2131
  return slots.default(data);
@@ -2249,11 +2133,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2249
2133
  }
2250
2134
  });
2251
2135
 
2252
- const UseTimestamp = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2136
+ const UseTimestamp = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2253
2137
  name: "UseTimestamp",
2254
2138
  props: ["immediate", "interval", "offset"],
2255
2139
  setup(props, { slots }) {
2256
- const data = vueDemi.reactive(core.useTimestamp({ ...props, controls: true }));
2140
+ const data = vue.reactive(core.useTimestamp({ ...props, controls: true }));
2257
2141
  return () => {
2258
2142
  if (slots.default)
2259
2143
  return slots.default(data);
@@ -2261,7 +2145,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2261
2145
  }
2262
2146
  });
2263
2147
 
2264
- const UseVirtualList = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2148
+ const UseVirtualList = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2265
2149
  name: "UseVirtualList",
2266
2150
  props: [
2267
2151
  "list",
@@ -2269,21 +2153,21 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2269
2153
  "height"
2270
2154
  ],
2271
2155
  setup(props, { slots, expose }) {
2272
- const { list: listRef } = vueDemi.toRefs(props);
2156
+ const { list: listRef } = vue.toRefs(props);
2273
2157
  const { list, containerProps, wrapperProps, scrollTo } = core.useVirtualList(listRef, props.options);
2274
2158
  expose({ scrollTo });
2275
2159
  if (containerProps.style && typeof containerProps.style === "object" && !Array.isArray(containerProps.style))
2276
2160
  containerProps.style.height = props.height || "300px";
2277
- return () => vueDemi.h("div", { ...containerProps }, [
2278
- vueDemi.h("div", { ...wrapperProps.value }, list.value.map((item) => vueDemi.h("div", { style: { overflow: "hidden", height: item.height } }, slots.default ? slots.default(item) : "Please set content!")))
2161
+ return () => vue.h("div", { ...containerProps }, [
2162
+ vue.h("div", { ...wrapperProps.value }, list.value.map((item) => vue.h("div", { style: { overflow: "hidden", height: item.height } }, slots.default ? slots.default(item) : "Please set content!")))
2279
2163
  ]);
2280
2164
  }
2281
2165
  });
2282
2166
 
2283
- const UseWindowFocus = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2167
+ const UseWindowFocus = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2284
2168
  name: "UseWindowFocus",
2285
2169
  setup(props, { slots }) {
2286
- const data = vueDemi.reactive({
2170
+ const data = vue.reactive({
2287
2171
  focused: core.useWindowFocus()
2288
2172
  });
2289
2173
  return () => {
@@ -2293,11 +2177,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2293
2177
  }
2294
2178
  });
2295
2179
 
2296
- const UseWindowSize = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2180
+ const UseWindowSize = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2297
2181
  name: "UseWindowSize",
2298
2182
  props: ["initialWidth", "initialHeight"],
2299
2183
  setup(props, { slots }) {
2300
- const data = vueDemi.reactive(core.useWindowSize(props));
2184
+ const data = vue.reactive(core.useWindowSize(props));
2301
2185
  return () => {
2302
2186
  if (slots.default)
2303
2187
  return slots.default(data);
@@ -2363,4 +2247,4 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2363
2247
  exports.vScroll = vScroll;
2364
2248
  exports.vScrollLock = vScrollLock;
2365
2249
 
2366
- })(this.VueUse = this.VueUse || {}, VueUse, VueDemi, VueUse);
2250
+ })(this.VueUse = this.VueUse || {}, VueUse, Vue, VueUse);