@vueuse/components 11.3.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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();
@@ -279,7 +152,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
279
152
  }
280
153
 
281
154
  const vOnClickOutside = {
282
- [shared.directiveHooks.mounted](el, binding) {
155
+ mounted(el, binding) {
283
156
  const capture = !binding.modifiers.bubble;
284
157
  if (typeof binding.value === "function") {
285
158
  el.__onClickOutside_stop = onClickOutside(el, binding.value, { capture });
@@ -288,7 +161,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
288
161
  el.__onClickOutside_stop = onClickOutside(el, handler, Object.assign({ capture }, options));
289
162
  }
290
163
  },
291
- [shared.directiveHooks.unmounted](el) {
164
+ unmounted(el) {
292
165
  el.__onClickOutside_stop();
293
166
  }
294
167
  };
@@ -340,7 +213,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
340
213
  }
341
214
 
342
215
  const vOnKeyStroke = {
343
- [shared.directiveHooks.mounted](el, binding) {
216
+ mounted(el, binding) {
344
217
  var _a, _b;
345
218
  const keys = (_b = (_a = binding.arg) == null ? void 0 : _a.split(",")) != null ? _b : true;
346
219
  if (typeof binding.value === "function") {
@@ -361,7 +234,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
361
234
  const DEFAULT_THRESHOLD = 10;
362
235
  function onLongPress(target, handler, options) {
363
236
  var _a, _b;
364
- const elementRef = vueDemi.computed(() => unrefElement(target));
237
+ const elementRef = vue.computed(() => unrefElement(target));
365
238
  let timeout;
366
239
  let posStart;
367
240
  let startTimestamp;
@@ -443,12 +316,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
443
316
  return stop;
444
317
  }
445
318
 
446
- const OnLongPress = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
319
+ const OnLongPress = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
447
320
  name: "OnLongPress",
448
321
  props: ["as", "options"],
449
322
  emits: ["trigger"],
450
323
  setup(props, { slots, emit }) {
451
- const target = vueDemi.ref();
324
+ const target = vue.ref();
452
325
  onLongPress(
453
326
  target,
454
327
  (e) => {
@@ -458,13 +331,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
458
331
  );
459
332
  return () => {
460
333
  if (slots.default)
461
- return vueDemi.h(props.as || "div", { ref: target }, slots.default());
334
+ return vue.h(props.as || "div", { ref: target }, slots.default());
462
335
  };
463
336
  }
464
337
  });
465
338
 
466
339
  const vOnLongPress = {
467
- [shared.directiveHooks.mounted](el, binding) {
340
+ mounted(el, binding) {
468
341
  if (typeof binding.value === "function")
469
342
  onLongPress(el, binding.value, { modifiers: binding.modifiers });
470
343
  else
@@ -472,10 +345,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
472
345
  }
473
346
  };
474
347
 
475
- const UseActiveElement = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
348
+ const UseActiveElement = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
476
349
  name: "UseActiveElement",
477
350
  setup(props, { slots }) {
478
- const data = vueDemi.reactive({
351
+ const data = vue.reactive({
479
352
  element: core.useActiveElement()
480
353
  });
481
354
  return () => {
@@ -485,10 +358,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
485
358
  }
486
359
  });
487
360
 
488
- const UseBattery = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
361
+ const UseBattery = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
489
362
  name: "UseBattery",
490
363
  setup(props, { slots }) {
491
- const data = vueDemi.reactive(core.useBattery(props));
364
+ const data = vue.reactive(core.useBattery(props));
492
365
  return () => {
493
366
  if (slots.default)
494
367
  return slots.default(data);
@@ -496,10 +369,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
496
369
  }
497
370
  });
498
371
 
499
- const UseBrowserLocation = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
372
+ const UseBrowserLocation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
500
373
  name: "UseBrowserLocation",
501
374
  setup(props, { slots }) {
502
- const data = vueDemi.reactive(core.useBrowserLocation());
375
+ const data = vue.reactive(core.useBrowserLocation());
503
376
  return () => {
504
377
  if (slots.default)
505
378
  return slots.default(data);
@@ -507,7 +380,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
507
380
  }
508
381
  });
509
382
 
510
- const UseClipboard = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
383
+ const UseClipboard = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
511
384
  name: "UseClipboard",
512
385
  props: [
513
386
  "source",
@@ -517,7 +390,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
517
390
  "legacy"
518
391
  ],
519
392
  setup(props, { slots }) {
520
- const data = vueDemi.reactive(core.useClipboard(props));
393
+ const data = vue.reactive(core.useClipboard(props));
521
394
  return () => {
522
395
  var _a;
523
396
  return (_a = slots.default) == null ? void 0 : _a.call(slots, data);
@@ -538,19 +411,19 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
538
411
  }
539
412
 
540
413
  function useMounted() {
541
- const isMounted = vueDemi.ref(false);
542
- const instance = vueDemi.getCurrentInstance();
414
+ const isMounted = vue.ref(false);
415
+ const instance = vue.getCurrentInstance();
543
416
  if (instance) {
544
- vueDemi.onMounted(() => {
417
+ vue.onMounted(() => {
545
418
  isMounted.value = true;
546
- }, vueDemi.isVue2 ? void 0 : instance);
419
+ }, instance);
547
420
  }
548
421
  return isMounted;
549
422
  }
550
423
 
551
424
  function useSupported(callback) {
552
425
  const isMounted = useMounted();
553
- return vueDemi.computed(() => {
426
+ return vue.computed(() => {
554
427
  isMounted.value;
555
428
  return Boolean(callback());
556
429
  });
@@ -560,7 +433,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
560
433
  const { window = defaultWindow } = options;
561
434
  const isSupported = useSupported(() => window && "matchMedia" in window && typeof window.matchMedia === "function");
562
435
  let mediaQuery;
563
- const matches = vueDemi.ref(false);
436
+ const matches = vue.ref(false);
564
437
  const handler = (event) => {
565
438
  matches.value = event.matches;
566
439
  };
@@ -572,7 +445,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
572
445
  else
573
446
  mediaQuery.removeListener(handler);
574
447
  };
575
- const stopWatch = vueDemi.watchEffect(() => {
448
+ const stopWatch = vue.watchEffect(() => {
576
449
  if (!isSupported.value)
577
450
  return;
578
451
  cleanup();
@@ -650,7 +523,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
650
523
  },
651
524
  initOnMounted
652
525
  } = options;
653
- 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);
654
527
  if (!storage) {
655
528
  try {
656
529
  storage = getSSRHandler("getDefaultStorage", () => {
@@ -749,7 +622,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
749
622
  onError(e);
750
623
  } finally {
751
624
  if (event)
752
- vueDemi.nextTick(resumeWatch);
625
+ vue.nextTick(resumeWatch);
753
626
  else
754
627
  resumeWatch();
755
628
  }
@@ -781,9 +654,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
781
654
  ...options.modes || {}
782
655
  };
783
656
  const preferredDark = usePreferredDark({ window });
784
- const system = vueDemi.computed(() => preferredDark.value ? "dark" : "light");
657
+ const system = vue.computed(() => preferredDark.value ? "dark" : "light");
785
658
  const store = storageRef || (storageKey == null ? shared.toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));
786
- const state = vueDemi.computed(() => store.value === "auto" ? system.value : store.value);
659
+ const state = vue.computed(() => store.value === "auto" ? system.value : store.value);
787
660
  const updateHTMLAttrs = getSSRHandler(
788
661
  "updateHTMLAttrs",
789
662
  (selector2, attribute2, value) => {
@@ -837,9 +710,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
837
710
  else
838
711
  defaultOnChanged(mode);
839
712
  }
840
- vueDemi.watch(state, onChanged, { flush: "post", immediate: true });
713
+ vue.watch(state, onChanged, { flush: "post", immediate: true });
841
714
  shared.tryOnMounted(() => onChanged(state.value));
842
- const auto = vueDemi.computed({
715
+ const auto = vue.computed({
843
716
  get() {
844
717
  return emitAuto ? store.value : state.value;
845
718
  },
@@ -847,19 +720,15 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
847
720
  store.value = v;
848
721
  }
849
722
  });
850
- try {
851
- return Object.assign(auto, { store, system, state });
852
- } catch (e) {
853
- return auto;
854
- }
723
+ return Object.assign(auto, { store, system, state });
855
724
  }
856
725
 
857
- const UseColorMode = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
726
+ const UseColorMode = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
858
727
  name: "UseColorMode",
859
728
  props: ["selector", "attribute", "modes", "onChanged", "storageKey", "storage", "emitAuto"],
860
729
  setup(props, { slots }) {
861
730
  const mode = useColorMode(props);
862
- const data = vueDemi.reactive({
731
+ const data = vue.reactive({
863
732
  mode,
864
733
  system: mode.system,
865
734
  store: mode.store
@@ -871,12 +740,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
871
740
  }
872
741
  });
873
742
 
874
- const UseDark = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
743
+ const UseDark = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
875
744
  name: "UseDark",
876
745
  props: ["selector", "attribute", "valueDark", "valueLight", "onChanged", "storageKey", "storage"],
877
746
  setup(props, { slots }) {
878
747
  const isDark = core.useDark(props);
879
- const data = vueDemi.reactive({
748
+ const data = vue.reactive({
880
749
  isDark,
881
750
  toggleDark: shared.useToggle(isDark)
882
751
  });
@@ -887,10 +756,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
887
756
  }
888
757
  });
889
758
 
890
- const UseDeviceMotion = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
759
+ const UseDeviceMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
891
760
  name: "UseDeviceMotion",
892
761
  setup(props, { slots }) {
893
- const data = vueDemi.reactive(core.useDeviceMotion());
762
+ const data = vue.reactive(core.useDeviceMotion());
894
763
  return () => {
895
764
  if (slots.default)
896
765
  return slots.default(data);
@@ -898,10 +767,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
898
767
  }
899
768
  });
900
769
 
901
- const UseDeviceOrientation = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
770
+ const UseDeviceOrientation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
902
771
  name: "UseDeviceOrientation",
903
772
  setup(props, { slots }) {
904
- const data = vueDemi.reactive(core.useDeviceOrientation());
773
+ const data = vue.reactive(core.useDeviceOrientation());
905
774
  return () => {
906
775
  if (slots.default)
907
776
  return slots.default(data);
@@ -909,10 +778,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
909
778
  }
910
779
  });
911
780
 
912
- const UseDevicePixelRatio = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
781
+ const UseDevicePixelRatio = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
913
782
  name: "UseDevicePixelRatio",
914
783
  setup(props, { slots }) {
915
- const data = vueDemi.reactive({
784
+ const data = vue.reactive({
916
785
  pixelRatio: core.useDevicePixelRatio()
917
786
  });
918
787
  return () => {
@@ -922,11 +791,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
922
791
  }
923
792
  });
924
793
 
925
- const UseDevicesList = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
794
+ const UseDevicesList = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
926
795
  name: "UseDevicesList",
927
796
  props: ["onUpdated", "requestPermissions", "constraints"],
928
797
  setup(props, { slots }) {
929
- const data = vueDemi.reactive(core.useDevicesList(props));
798
+ const data = vue.reactive(core.useDevicesList(props));
930
799
  return () => {
931
800
  if (slots.default)
932
801
  return slots.default(data);
@@ -934,10 +803,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
934
803
  }
935
804
  });
936
805
 
937
- const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
806
+ const UseDocumentVisibility = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
938
807
  name: "UseDocumentVisibility",
939
808
  setup(props, { slots }) {
940
- const data = vueDemi.reactive({
809
+ const data = vue.reactive({
941
810
  visibility: core.useDocumentVisibility()
942
811
  });
943
812
  return () => {
@@ -947,7 +816,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
947
816
  }
948
817
  });
949
818
 
950
- const UseDraggable = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
819
+ const UseDraggable = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
951
820
  name: "UseDraggable",
952
821
  props: [
953
822
  "storageKey",
@@ -968,16 +837,16 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
968
837
  "containerElement"
969
838
  ],
970
839
  setup(props, { slots }) {
971
- const target = vueDemi.ref();
972
- const handle = vueDemi.computed(() => {
840
+ const target = vue.ref();
841
+ const handle = vue.computed(() => {
973
842
  var _a;
974
843
  return (_a = props.handle) != null ? _a : target.value;
975
844
  });
976
- const containerElement = vueDemi.computed(() => {
845
+ const containerElement = vue.computed(() => {
977
846
  var _a;
978
847
  return (_a = props.containerElement) != null ? _a : void 0;
979
848
  });
980
- const disabled = vueDemi.computed(() => !!props.disabled);
849
+ const disabled = vue.computed(() => !!props.disabled);
981
850
  const storageValue = props.storageKey && core.useStorage(
982
851
  props.storageKey,
983
852
  shared.toValue(props.initialValue) || { x: 0, y: 0 },
@@ -992,7 +861,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
992
861
  storageValue.value.x = position.x;
993
862
  storageValue.value.y = position.y;
994
863
  };
995
- const data = vueDemi.reactive(core.useDraggable(target, {
864
+ const data = vue.reactive(core.useDraggable(target, {
996
865
  ...props,
997
866
  handle,
998
867
  initialValue,
@@ -1002,20 +871,20 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1002
871
  }));
1003
872
  return () => {
1004
873
  if (slots.default)
1005
- 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));
1006
875
  };
1007
876
  }
1008
877
  });
1009
878
 
1010
- const UseElementBounding = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
879
+ const UseElementBounding = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1011
880
  name: "UseElementBounding",
1012
881
  props: ["box", "as"],
1013
882
  setup(props, { slots }) {
1014
- const target = vueDemi.ref();
1015
- const data = vueDemi.reactive(core.useElementBounding(target));
883
+ const target = vue.ref();
884
+ const data = vue.reactive(core.useElementBounding(target));
1016
885
  return () => {
1017
886
  if (slots.default)
1018
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
887
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1019
888
  };
1020
889
  }
1021
890
  });
@@ -1026,7 +895,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1026
895
  delayLeave = 0,
1027
896
  window = defaultWindow
1028
897
  } = options;
1029
- const isHovered = vueDemi.ref(false);
898
+ const isHovered = vue.ref(false);
1030
899
  let timer;
1031
900
  const toggle = (entering) => {
1032
901
  const delay = entering ? delayEnter : delayLeave;
@@ -1047,28 +916,28 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1047
916
  }
1048
917
 
1049
918
  const vElementHover = {
1050
- [shared.directiveHooks.mounted](el, binding) {
919
+ mounted(el, binding) {
1051
920
  const value = binding.value;
1052
921
  if (typeof value === "function") {
1053
922
  const isHovered = useElementHover(el);
1054
- vueDemi.watch(isHovered, (v) => value(v));
923
+ vue.watch(isHovered, (v) => value(v));
1055
924
  } else {
1056
925
  const [handler, options] = value;
1057
926
  const isHovered = useElementHover(el, options);
1058
- vueDemi.watch(isHovered, (v) => handler(v));
927
+ vue.watch(isHovered, (v) => handler(v));
1059
928
  }
1060
929
  }
1061
930
  };
1062
931
 
1063
- const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
932
+ const UseElementSize = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1064
933
  name: "UseElementSize",
1065
934
  props: ["width", "height", "box", "as"],
1066
935
  setup(props, { slots }) {
1067
- const target = vueDemi.ref();
1068
- 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 }));
1069
938
  return () => {
1070
939
  if (slots.default)
1071
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
940
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1072
941
  };
1073
942
  }
1074
943
  });
@@ -1083,11 +952,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1083
952
  observer = void 0;
1084
953
  }
1085
954
  };
1086
- const targets = vueDemi.computed(() => {
955
+ const targets = vue.computed(() => {
1087
956
  const _targets = shared.toValue(target);
1088
957
  return Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];
1089
958
  });
1090
- const stopWatch = vueDemi.watch(
959
+ const stopWatch = vue.watch(
1091
960
  targets,
1092
961
  (els) => {
1093
962
  cleanup();
@@ -1114,12 +983,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1114
983
 
1115
984
  function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {
1116
985
  const { window = defaultWindow, box = "content-box" } = options;
1117
- const isSVG = vueDemi.computed(() => {
986
+ const isSVG = vue.computed(() => {
1118
987
  var _a, _b;
1119
988
  return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg");
1120
989
  });
1121
- const width = vueDemi.ref(initialSize.width);
1122
- const height = vueDemi.ref(initialSize.height);
990
+ const width = vue.ref(initialSize.width);
991
+ const height = vue.ref(initialSize.height);
1123
992
  const { stop: stop1 } = useResizeObserver(
1124
993
  target,
1125
994
  ([entry]) => {
@@ -1151,7 +1020,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1151
1020
  height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height;
1152
1021
  }
1153
1022
  });
1154
- const stop2 = vueDemi.watch(
1023
+ const stop2 = vue.watch(
1155
1024
  () => unrefElement(target),
1156
1025
  (ele) => {
1157
1026
  width.value = ele ? initialSize.width : 0;
@@ -1170,26 +1039,26 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1170
1039
  }
1171
1040
 
1172
1041
  const vElementSize = {
1173
- [shared.directiveHooks.mounted](el, binding) {
1042
+ mounted(el, binding) {
1174
1043
  var _a;
1175
1044
  const handler = typeof binding.value === "function" ? binding.value : (_a = binding.value) == null ? void 0 : _a[0];
1176
1045
  const options = typeof binding.value === "function" ? [] : binding.value.slice(1);
1177
1046
  const { width, height } = useElementSize(el, ...options);
1178
- vueDemi.watch([width, height], ([width2, height2]) => handler({ width: width2, height: height2 }));
1047
+ vue.watch([width, height], ([width2, height2]) => handler({ width: width2, height: height2 }));
1179
1048
  }
1180
1049
  };
1181
1050
 
1182
- const UseElementVisibility = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1051
+ const UseElementVisibility = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1183
1052
  name: "UseElementVisibility",
1184
1053
  props: ["as"],
1185
1054
  setup(props, { slots }) {
1186
- const target = vueDemi.ref();
1187
- const data = vueDemi.reactive({
1055
+ const target = vue.ref();
1056
+ const data = vue.reactive({
1188
1057
  isVisible: core.useElementVisibility(target)
1189
1058
  });
1190
1059
  return () => {
1191
1060
  if (slots.default)
1192
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1061
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1193
1062
  };
1194
1063
  }
1195
1064
  });
@@ -1203,13 +1072,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1203
1072
  immediate = true
1204
1073
  } = options;
1205
1074
  const isSupported = useSupported(() => window && "IntersectionObserver" in window);
1206
- const targets = vueDemi.computed(() => {
1075
+ const targets = vue.computed(() => {
1207
1076
  const _target = shared.toValue(target);
1208
1077
  return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(shared.notNullish);
1209
1078
  });
1210
1079
  let cleanup = shared.noop;
1211
- const isActive = vueDemi.ref(immediate);
1212
- const stopWatch = isSupported.value ? vueDemi.watch(
1080
+ const isActive = vue.ref(immediate);
1081
+ const stopWatch = isSupported.value ? vue.watch(
1213
1082
  () => [targets.value, unrefElement(root), isActive.value],
1214
1083
  ([targets2, root2]) => {
1215
1084
  cleanup();
@@ -1255,7 +1124,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1255
1124
 
1256
1125
  function useElementVisibility(element, options = {}) {
1257
1126
  const { window = defaultWindow, scrollTarget, threshold = 0 } = options;
1258
- const elementIsVisible = vueDemi.ref(false);
1127
+ const elementIsVisible = vue.ref(false);
1259
1128
  useIntersectionObserver(
1260
1129
  element,
1261
1130
  (intersectionObserverEntries) => {
@@ -1279,26 +1148,26 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1279
1148
  }
1280
1149
 
1281
1150
  const vElementVisibility = {
1282
- [shared.directiveHooks.mounted](el, binding) {
1151
+ mounted(el, binding) {
1283
1152
  if (typeof binding.value === "function") {
1284
1153
  const handler = binding.value;
1285
1154
  const isVisible = useElementVisibility(el);
1286
- vueDemi.watch(isVisible, (v) => handler(v), { immediate: true });
1155
+ vue.watch(isVisible, (v) => handler(v), { immediate: true });
1287
1156
  } else {
1288
1157
  const [handler, options] = binding.value;
1289
1158
  const isVisible = useElementVisibility(el, options);
1290
- vueDemi.watch(isVisible, (v) => handler(v), { immediate: true });
1159
+ vue.watch(isVisible, (v) => handler(v), { immediate: true });
1291
1160
  }
1292
1161
  }
1293
1162
  };
1294
1163
 
1295
- const UseEyeDropper = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1164
+ const UseEyeDropper = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1296
1165
  name: "UseEyeDropper",
1297
1166
  props: {
1298
1167
  sRGBHex: String
1299
1168
  },
1300
1169
  setup(props, { slots }) {
1301
- const data = vueDemi.reactive(core.useEyeDropper());
1170
+ const data = vue.reactive(core.useEyeDropper());
1302
1171
  return () => {
1303
1172
  if (slots.default)
1304
1173
  return slots.default(data);
@@ -1306,24 +1175,24 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1306
1175
  }
1307
1176
  });
1308
1177
 
1309
- const UseFullscreen = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1178
+ const UseFullscreen = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1310
1179
  name: "UseFullscreen",
1311
1180
  props: ["as"],
1312
1181
  setup(props, { slots }) {
1313
- const target = vueDemi.ref();
1314
- const data = vueDemi.reactive(core.useFullscreen(target));
1182
+ const target = vue.ref();
1183
+ const data = vue.reactive(core.useFullscreen(target));
1315
1184
  return () => {
1316
1185
  if (slots.default)
1317
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1186
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1318
1187
  };
1319
1188
  }
1320
1189
  });
1321
1190
 
1322
- const UseGeolocation = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1191
+ const UseGeolocation = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1323
1192
  name: "UseGeolocation",
1324
1193
  props: ["enableHighAccuracy", "maximumAge", "timeout", "navigator"],
1325
1194
  setup(props, { slots }) {
1326
- const data = vueDemi.reactive(core.useGeolocation(props));
1195
+ const data = vue.reactive(core.useGeolocation(props));
1327
1196
  return () => {
1328
1197
  if (slots.default)
1329
1198
  return slots.default(data);
@@ -1331,11 +1200,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1331
1200
  }
1332
1201
  });
1333
1202
 
1334
- const UseIdle = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1203
+ const UseIdle = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1335
1204
  name: "UseIdle",
1336
1205
  props: ["timeout", "events", "listenForVisibilityChange", "initialState"],
1337
1206
  setup(props, { slots }) {
1338
- const data = vueDemi.reactive(core.useIdle(props.timeout, props));
1207
+ const data = vue.reactive(core.useIdle(props.timeout, props));
1339
1208
  return () => {
1340
1209
  if (slots.default)
1341
1210
  return slots.default(data);
@@ -1353,10 +1222,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1353
1222
  shallow = true,
1354
1223
  throwError
1355
1224
  } = options != null ? options : {};
1356
- const state = shallow ? vueDemi.shallowRef(initialState) : vueDemi.ref(initialState);
1357
- const isReady = vueDemi.ref(false);
1358
- const isLoading = vueDemi.ref(false);
1359
- 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);
1360
1229
  async function execute(delay2 = 0, ...args) {
1361
1230
  if (resetOnExecute)
1362
1231
  state.value = initialState;
@@ -1433,7 +1302,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1433
1302
  ...asyncStateOptions
1434
1303
  }
1435
1304
  );
1436
- vueDemi.watch(
1305
+ vue.watch(
1437
1306
  () => shared.toValue(options),
1438
1307
  () => state.execute(asyncStateOptions.delay),
1439
1308
  { deep: true }
@@ -1441,7 +1310,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1441
1310
  return state;
1442
1311
  }
1443
1312
 
1444
- const UseImage = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1313
+ const UseImage = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1445
1314
  name: "UseImage",
1446
1315
  props: [
1447
1316
  "src",
@@ -1455,7 +1324,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1455
1324
  "referrerPolicy"
1456
1325
  ],
1457
1326
  setup(props, { slots }) {
1458
- const data = vueDemi.reactive(useImage(props));
1327
+ const data = vue.reactive(useImage(props));
1459
1328
  return () => {
1460
1329
  if (data.isLoading && slots.loading)
1461
1330
  return slots.loading(data);
@@ -1463,7 +1332,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1463
1332
  return slots.error(data.error);
1464
1333
  if (slots.default)
1465
1334
  return slots.default(data);
1466
- return vueDemi.h(props.as || "img", props);
1335
+ return vue.h(props.as || "img", props);
1467
1336
  };
1468
1337
  }
1469
1338
  });
@@ -1499,9 +1368,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1499
1368
  console.error(e);
1500
1369
  }
1501
1370
  } = options;
1502
- const internalX = vueDemi.ref(0);
1503
- const internalY = vueDemi.ref(0);
1504
- const x = vueDemi.computed({
1371
+ const internalX = vue.ref(0);
1372
+ const internalY = vue.ref(0);
1373
+ const x = vue.computed({
1505
1374
  get() {
1506
1375
  return internalX.value;
1507
1376
  },
@@ -1509,7 +1378,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1509
1378
  scrollTo(x2, void 0);
1510
1379
  }
1511
1380
  });
1512
- const y = vueDemi.computed({
1381
+ const y = vue.computed({
1513
1382
  get() {
1514
1383
  return internalY.value;
1515
1384
  },
@@ -1535,14 +1404,14 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1535
1404
  if (y != null)
1536
1405
  internalY.value = scrollContainer.scrollTop;
1537
1406
  }
1538
- const isScrolling = vueDemi.ref(false);
1539
- const arrivedState = vueDemi.reactive({
1407
+ const isScrolling = vue.ref(false);
1408
+ const arrivedState = vue.reactive({
1540
1409
  left: true,
1541
1410
  right: false,
1542
1411
  top: true,
1543
1412
  bottom: false
1544
1413
  });
1545
- const directions = vueDemi.reactive({
1414
+ const directions = vue.reactive({
1546
1415
  left: false,
1547
1416
  right: false,
1548
1417
  top: false,
@@ -1647,7 +1516,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1647
1516
  interval = 100,
1648
1517
  canLoadMore = () => true
1649
1518
  } = options;
1650
- const state = vueDemi.reactive(useScroll(
1519
+ const state = vue.reactive(useScroll(
1651
1520
  element,
1652
1521
  {
1653
1522
  ...options,
@@ -1657,9 +1526,9 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1657
1526
  }
1658
1527
  }
1659
1528
  ));
1660
- const promise = vueDemi.ref();
1661
- const isLoading = vueDemi.computed(() => !!promise.value);
1662
- const observedElement = vueDemi.computed(() => {
1529
+ const promise = vue.ref();
1530
+ const isLoading = vue.computed(() => !!promise.value);
1531
+ const observedElement = vue.computed(() => {
1663
1532
  return resolveElement(shared.toValue(element));
1664
1533
  });
1665
1534
  const isElementVisible = useElementVisibility(observedElement);
@@ -1676,12 +1545,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1676
1545
  new Promise((resolve) => setTimeout(resolve, interval))
1677
1546
  ]).finally(() => {
1678
1547
  promise.value = null;
1679
- vueDemi.nextTick(() => checkAndLoad());
1548
+ vue.nextTick(() => checkAndLoad());
1680
1549
  });
1681
1550
  }
1682
1551
  }
1683
1552
  }
1684
- const stop = vueDemi.watch(
1553
+ const stop = vue.watch(
1685
1554
  () => [state.arrivedState[direction], isElementVisible.value],
1686
1555
  checkAndLoad,
1687
1556
  { immediate: true }
@@ -1690,13 +1559,13 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1690
1559
  return {
1691
1560
  isLoading,
1692
1561
  reset() {
1693
- vueDemi.nextTick(() => checkAndLoad());
1562
+ vue.nextTick(() => checkAndLoad());
1694
1563
  }
1695
1564
  };
1696
1565
  }
1697
1566
 
1698
1567
  const vInfiniteScroll = {
1699
- [shared.directiveHooks.mounted](el, binding) {
1568
+ mounted(el, binding) {
1700
1569
  if (typeof binding.value === "function")
1701
1570
  useInfiniteScroll(el, binding.value);
1702
1571
  else
@@ -1705,7 +1574,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1705
1574
  };
1706
1575
 
1707
1576
  const vIntersectionObserver = {
1708
- [shared.directiveHooks.mounted](el, binding) {
1577
+ mounted(el, binding) {
1709
1578
  if (typeof binding.value === "function")
1710
1579
  useIntersectionObserver(el, binding.value);
1711
1580
  else
@@ -1713,11 +1582,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1713
1582
  }
1714
1583
  };
1715
1584
 
1716
- const UseMouse = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1585
+ const UseMouse = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1717
1586
  name: "UseMouse",
1718
1587
  props: ["touch", "resetOnTouchEnds", "initialValue"],
1719
1588
  setup(props, { slots }) {
1720
- const data = vueDemi.reactive(core.useMouse(props));
1589
+ const data = vue.reactive(core.useMouse(props));
1721
1590
  return () => {
1722
1591
  if (slots.default)
1723
1592
  return slots.default(data);
@@ -1725,36 +1594,36 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1725
1594
  }
1726
1595
  });
1727
1596
 
1728
- const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1597
+ const UseMouseInElement = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1729
1598
  name: "UseMouseElement",
1730
1599
  props: ["handleOutside", "as"],
1731
1600
  setup(props, { slots }) {
1732
- const target = vueDemi.ref();
1733
- const data = vueDemi.reactive(core.useMouseInElement(target, props));
1601
+ const target = vue.ref();
1602
+ const data = vue.reactive(core.useMouseInElement(target, props));
1734
1603
  return () => {
1735
1604
  if (slots.default)
1736
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1605
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1737
1606
  };
1738
1607
  }
1739
1608
  });
1740
1609
 
1741
- const UseMousePressed = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1610
+ const UseMousePressed = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1742
1611
  name: "UseMousePressed",
1743
1612
  props: ["touch", "initialValue", "as"],
1744
1613
  setup(props, { slots }) {
1745
- const target = vueDemi.ref();
1746
- const data = vueDemi.reactive(core.useMousePressed({ ...props, target }));
1614
+ const target = vue.ref();
1615
+ const data = vue.reactive(core.useMousePressed({ ...props, target }));
1747
1616
  return () => {
1748
1617
  if (slots.default)
1749
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1618
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1750
1619
  };
1751
1620
  }
1752
1621
  });
1753
1622
 
1754
- const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1623
+ const UseNetwork = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1755
1624
  name: "UseNetwork",
1756
1625
  setup(props, { slots }) {
1757
- const data = vueDemi.reactive(core.useNetwork());
1626
+ const data = vue.reactive(core.useNetwork());
1758
1627
  return () => {
1759
1628
  if (slots.default)
1760
1629
  return slots.default(data);
@@ -1762,11 +1631,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1762
1631
  }
1763
1632
  });
1764
1633
 
1765
- const UseNow = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1634
+ const UseNow = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1766
1635
  name: "UseNow",
1767
1636
  props: ["interval"],
1768
1637
  setup(props, { slots }) {
1769
- const data = vueDemi.reactive(core.useNow({ ...props, controls: true }));
1638
+ const data = vue.reactive(core.useNow({ ...props, controls: true }));
1770
1639
  return () => {
1771
1640
  if (slots.default)
1772
1641
  return slots.default(data);
@@ -1774,7 +1643,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1774
1643
  }
1775
1644
  });
1776
1645
 
1777
- const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1646
+ const UseObjectUrl = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1778
1647
  name: "UseObjectUrl",
1779
1648
  props: [
1780
1649
  "object"
@@ -1789,7 +1658,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1789
1658
  }
1790
1659
  });
1791
1660
 
1792
- const UseOffsetPagination = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1661
+ const UseOffsetPagination = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1793
1662
  name: "UseOffsetPagination",
1794
1663
  props: [
1795
1664
  "total",
@@ -1805,7 +1674,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1805
1674
  "page-count-change"
1806
1675
  ],
1807
1676
  setup(props, { slots, emit }) {
1808
- const data = vueDemi.reactive(core.useOffsetPagination({
1677
+ const data = vue.reactive(core.useOffsetPagination({
1809
1678
  ...props,
1810
1679
  onPageChange(...args) {
1811
1680
  var _a;
@@ -1830,10 +1699,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1830
1699
  }
1831
1700
  });
1832
1701
 
1833
- const UseOnline = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1702
+ const UseOnline = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1834
1703
  name: "UseOnline",
1835
1704
  setup(props, { slots }) {
1836
- const data = vueDemi.reactive({
1705
+ const data = vue.reactive({
1837
1706
  isOnline: core.useOnline()
1838
1707
  });
1839
1708
  return () => {
@@ -1843,10 +1712,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1843
1712
  }
1844
1713
  });
1845
1714
 
1846
- const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1715
+ const UsePageLeave = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1847
1716
  name: "UsePageLeave",
1848
1717
  setup(props, { slots }) {
1849
- const data = vueDemi.reactive({
1718
+ const data = vue.reactive({
1850
1719
  isLeft: core.usePageLeave()
1851
1720
  });
1852
1721
  return () => {
@@ -1856,7 +1725,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1856
1725
  }
1857
1726
  });
1858
1727
 
1859
- const UsePointer = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1728
+ const UsePointer = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1860
1729
  name: "UsePointer",
1861
1730
  props: [
1862
1731
  "pointerTypes",
@@ -1864,8 +1733,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1864
1733
  "target"
1865
1734
  ],
1866
1735
  setup(props, { slots }) {
1867
- const el = vueDemi.ref(null);
1868
- const data = vueDemi.reactive(core.usePointer({
1736
+ const el = vue.ref(null);
1737
+ const data = vue.reactive(core.usePointer({
1869
1738
  ...props,
1870
1739
  target: props.target === "self" ? el : defaultWindow
1871
1740
  }));
@@ -1876,23 +1745,23 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1876
1745
  }
1877
1746
  });
1878
1747
 
1879
- const UsePointerLock = /* #__PURE__ */ vueDemi.defineComponent({
1748
+ const UsePointerLock = /* #__PURE__ */ vue.defineComponent({
1880
1749
  name: "UsePointerLock",
1881
1750
  props: ["as"],
1882
1751
  setup(props, { slots }) {
1883
- const target = vueDemi.ref();
1884
- const data = vueDemi.reactive(core.usePointerLock(target));
1752
+ const target = vue.ref();
1753
+ const data = vue.reactive(core.usePointerLock(target));
1885
1754
  return () => {
1886
1755
  if (slots.default)
1887
- return vueDemi.h(props.as || "div", { ref: target }, slots.default(data));
1756
+ return vue.h(props.as || "div", { ref: target }, slots.default(data));
1888
1757
  };
1889
1758
  }
1890
1759
  });
1891
1760
 
1892
- const UsePreferredColorScheme = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1761
+ const UsePreferredColorScheme = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1893
1762
  name: "UsePreferredColorScheme",
1894
1763
  setup(props, { slots }) {
1895
- const data = vueDemi.reactive({
1764
+ const data = vue.reactive({
1896
1765
  colorScheme: core.usePreferredColorScheme()
1897
1766
  });
1898
1767
  return () => {
@@ -1902,10 +1771,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1902
1771
  }
1903
1772
  });
1904
1773
 
1905
- const UsePreferredContrast = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1774
+ const UsePreferredContrast = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1906
1775
  name: "UsePreferredContrast",
1907
1776
  setup(props, { slots }) {
1908
- const data = vueDemi.reactive({
1777
+ const data = vue.reactive({
1909
1778
  contrast: core.usePreferredContrast()
1910
1779
  });
1911
1780
  return () => {
@@ -1915,10 +1784,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1915
1784
  }
1916
1785
  });
1917
1786
 
1918
- const UsePreferredDark = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1787
+ const UsePreferredDark = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1919
1788
  name: "UsePreferredDark",
1920
1789
  setup(props, { slots }) {
1921
- const data = vueDemi.reactive({
1790
+ const data = vue.reactive({
1922
1791
  prefersDark: core.usePreferredDark()
1923
1792
  });
1924
1793
  return () => {
@@ -1928,10 +1797,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1928
1797
  }
1929
1798
  });
1930
1799
 
1931
- const UsePreferredLanguages = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1800
+ const UsePreferredLanguages = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1932
1801
  name: "UsePreferredLanguages",
1933
1802
  setup(props, { slots }) {
1934
- const data = vueDemi.reactive({
1803
+ const data = vue.reactive({
1935
1804
  languages: core.usePreferredLanguages()
1936
1805
  });
1937
1806
  return () => {
@@ -1941,10 +1810,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1941
1810
  }
1942
1811
  });
1943
1812
 
1944
- const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1813
+ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1945
1814
  name: "UsePreferredReducedMotion",
1946
1815
  setup(props, { slots }) {
1947
- const data = vueDemi.reactive({
1816
+ const data = vue.reactive({
1948
1817
  motion: core.usePreferredReducedMotion()
1949
1818
  });
1950
1819
  return () => {
@@ -1955,7 +1824,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1955
1824
  });
1956
1825
 
1957
1826
  const vResizeObserver = {
1958
- [shared.directiveHooks.mounted](el, binding) {
1827
+ mounted(el, binding) {
1959
1828
  if (typeof binding.value === "function")
1960
1829
  useResizeObserver(el, binding.value);
1961
1830
  else
@@ -1973,12 +1842,12 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
1973
1842
  observer = void 0;
1974
1843
  }
1975
1844
  };
1976
- const targets = vueDemi.computed(() => {
1845
+ const targets = vue.computed(() => {
1977
1846
  const value = shared.toValue(target);
1978
1847
  const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(shared.notNullish);
1979
1848
  return new Set(items);
1980
1849
  });
1981
- const stopWatch = vueDemi.watch(
1850
+ const stopWatch = vue.watch(
1982
1851
  () => targets.value,
1983
1852
  (targets2) => {
1984
1853
  cleanup();
@@ -2006,8 +1875,8 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2006
1875
 
2007
1876
  function useCssVar(prop, target, options = {}) {
2008
1877
  const { window = defaultWindow, initialValue, observe = false } = options;
2009
- const variable = vueDemi.ref(initialValue);
2010
- const elRef = vueDemi.computed(() => {
1878
+ const variable = vue.ref(initialValue);
1879
+ const elRef = vue.computed(() => {
2011
1880
  var _a;
2012
1881
  return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);
2013
1882
  });
@@ -2026,7 +1895,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2026
1895
  window
2027
1896
  });
2028
1897
  }
2029
- vueDemi.watch(
1898
+ vue.watch(
2030
1899
  [elRef, () => shared.toValue(prop)],
2031
1900
  (_, old) => {
2032
1901
  if (old[0] && old[1])
@@ -2035,7 +1904,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2035
1904
  },
2036
1905
  { immediate: true }
2037
1906
  );
2038
- vueDemi.watch(
1907
+ vue.watch(
2039
1908
  variable,
2040
1909
  (val) => {
2041
1910
  var _a;
@@ -2056,10 +1925,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2056
1925
  const bottomVarName = "--vueuse-safe-area-bottom";
2057
1926
  const leftVarName = "--vueuse-safe-area-left";
2058
1927
  function useScreenSafeArea() {
2059
- const top = vueDemi.ref("");
2060
- const right = vueDemi.ref("");
2061
- const bottom = vueDemi.ref("");
2062
- const left = vueDemi.ref("");
1928
+ const top = vue.ref("");
1929
+ const right = vue.ref("");
1930
+ const bottom = vue.ref("");
1931
+ const left = vue.ref("");
2063
1932
  if (shared.isClient) {
2064
1933
  const topCssVar = useCssVar(topVarName);
2065
1934
  const rightCssVar = useCssVar(rightVarName);
@@ -2090,7 +1959,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2090
1959
  return getComputedStyle(document.documentElement).getPropertyValue(position);
2091
1960
  }
2092
1961
 
2093
- const UseScreenSafeArea = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
1962
+ const UseScreenSafeArea = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2094
1963
  name: "UseScreenSafeArea",
2095
1964
  props: {
2096
1965
  top: Boolean,
@@ -2107,7 +1976,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2107
1976
  } = useScreenSafeArea();
2108
1977
  return () => {
2109
1978
  if (slots.default) {
2110
- return vueDemi.h("div", {
1979
+ return vue.h("div", {
2111
1980
  style: {
2112
1981
  paddingTop: props.top ? top.value : "",
2113
1982
  paddingRight: props.right ? right.value : "",
@@ -2125,7 +1994,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2125
1994
  });
2126
1995
 
2127
1996
  const vScroll = {
2128
- [shared.directiveHooks.mounted](el, binding) {
1997
+ mounted(el, binding) {
2129
1998
  if (typeof binding.value === "function") {
2130
1999
  const handler = binding.value;
2131
2000
  const state = useScroll(el, {
@@ -2179,10 +2048,10 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2179
2048
  }
2180
2049
  const elInitialOverflow = /* @__PURE__ */ new WeakMap();
2181
2050
  function useScrollLock(element, initialState = false) {
2182
- const isLocked = vueDemi.ref(initialState);
2051
+ const isLocked = vue.ref(initialState);
2183
2052
  let stopTouchMoveListener = null;
2184
2053
  let initialOverflow = "";
2185
- vueDemi.watch(shared.toRef(element), (el) => {
2054
+ vue.watch(shared.toRef(element), (el) => {
2186
2055
  const target = resolveElement(shared.toValue(el));
2187
2056
  if (target) {
2188
2057
  const ele = target;
@@ -2226,7 +2095,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2226
2095
  isLocked.value = false;
2227
2096
  };
2228
2097
  shared.tryOnScopeDispose(unlock);
2229
- return vueDemi.computed({
2098
+ return vue.computed({
2230
2099
  get() {
2231
2100
  return isLocked.value;
2232
2101
  },
@@ -2240,23 +2109,23 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2240
2109
 
2241
2110
  function onScrollLock() {
2242
2111
  let isMounted = false;
2243
- const state = vueDemi.ref(false);
2112
+ const state = vue.ref(false);
2244
2113
  return (el, binding) => {
2245
2114
  state.value = binding.value;
2246
2115
  if (isMounted)
2247
2116
  return;
2248
2117
  isMounted = true;
2249
2118
  const isLocked = useScrollLock(el, binding.value);
2250
- vueDemi.watch(state, (v) => isLocked.value = v);
2119
+ vue.watch(state, (v) => isLocked.value = v);
2251
2120
  };
2252
2121
  }
2253
2122
  const vScrollLock = onScrollLock();
2254
2123
 
2255
- const UseTimeAgo = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2124
+ const UseTimeAgo = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2256
2125
  name: "UseTimeAgo",
2257
2126
  props: ["time", "updateInterval", "max", "fullDateFormatter", "messages", "showSecond"],
2258
2127
  setup(props, { slots }) {
2259
- const data = vueDemi.reactive(core.useTimeAgo(() => props.time, { ...props, controls: true }));
2128
+ const data = vue.reactive(core.useTimeAgo(() => props.time, { ...props, controls: true }));
2260
2129
  return () => {
2261
2130
  if (slots.default)
2262
2131
  return slots.default(data);
@@ -2264,11 +2133,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2264
2133
  }
2265
2134
  });
2266
2135
 
2267
- const UseTimestamp = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2136
+ const UseTimestamp = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2268
2137
  name: "UseTimestamp",
2269
2138
  props: ["immediate", "interval", "offset"],
2270
2139
  setup(props, { slots }) {
2271
- const data = vueDemi.reactive(core.useTimestamp({ ...props, controls: true }));
2140
+ const data = vue.reactive(core.useTimestamp({ ...props, controls: true }));
2272
2141
  return () => {
2273
2142
  if (slots.default)
2274
2143
  return slots.default(data);
@@ -2276,7 +2145,7 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2276
2145
  }
2277
2146
  });
2278
2147
 
2279
- const UseVirtualList = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2148
+ const UseVirtualList = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2280
2149
  name: "UseVirtualList",
2281
2150
  props: [
2282
2151
  "list",
@@ -2284,21 +2153,21 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2284
2153
  "height"
2285
2154
  ],
2286
2155
  setup(props, { slots, expose }) {
2287
- const { list: listRef } = vueDemi.toRefs(props);
2156
+ const { list: listRef } = vue.toRefs(props);
2288
2157
  const { list, containerProps, wrapperProps, scrollTo } = core.useVirtualList(listRef, props.options);
2289
2158
  expose({ scrollTo });
2290
2159
  if (containerProps.style && typeof containerProps.style === "object" && !Array.isArray(containerProps.style))
2291
2160
  containerProps.style.height = props.height || "300px";
2292
- return () => vueDemi.h("div", { ...containerProps }, [
2293
- 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!")))
2294
2163
  ]);
2295
2164
  }
2296
2165
  });
2297
2166
 
2298
- const UseWindowFocus = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2167
+ const UseWindowFocus = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2299
2168
  name: "UseWindowFocus",
2300
2169
  setup(props, { slots }) {
2301
- const data = vueDemi.reactive({
2170
+ const data = vue.reactive({
2302
2171
  focused: core.useWindowFocus()
2303
2172
  });
2304
2173
  return () => {
@@ -2308,11 +2177,11 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2308
2177
  }
2309
2178
  });
2310
2179
 
2311
- const UseWindowSize = /* @__PURE__ */ /* #__PURE__ */ vueDemi.defineComponent({
2180
+ const UseWindowSize = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
2312
2181
  name: "UseWindowSize",
2313
2182
  props: ["initialWidth", "initialHeight"],
2314
2183
  setup(props, { slots }) {
2315
- const data = vueDemi.reactive(core.useWindowSize(props));
2184
+ const data = vue.reactive(core.useWindowSize(props));
2316
2185
  return () => {
2317
2186
  if (slots.default)
2318
2187
  return slots.default(data);
@@ -2378,4 +2247,4 @@ var VueDemi = (function (VueDemi, Vue, VueCompositionAPI) {
2378
2247
  exports.vScroll = vScroll;
2379
2248
  exports.vScrollLock = vScrollLock;
2380
2249
 
2381
- })(this.VueUse = this.VueUse || {}, VueUse, VueDemi, VueUse);
2250
+ })(this.VueUse = this.VueUse || {}, VueUse, Vue, VueUse);