@vueuse/components 12.1.0 → 12.2.0-beta.3

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.cjs CHANGED
@@ -1309,20 +1309,32 @@ function useAsyncState(promise, initialState, options) {
1309
1309
  async function loadImage(options) {
1310
1310
  return new Promise((resolve, reject) => {
1311
1311
  const img = new Image();
1312
- const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;
1312
+ const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;
1313
1313
  img.src = src;
1314
- if (srcset)
1314
+ if (srcset != null)
1315
1315
  img.srcset = srcset;
1316
- if (sizes)
1316
+ if (sizes != null)
1317
1317
  img.sizes = sizes;
1318
- if (clazz)
1318
+ if (clazz != null)
1319
1319
  img.className = clazz;
1320
- if (loading)
1320
+ if (loading != null)
1321
1321
  img.loading = loading;
1322
- if (crossorigin)
1322
+ if (crossorigin != null)
1323
1323
  img.crossOrigin = crossorigin;
1324
- if (referrerPolicy)
1324
+ if (referrerPolicy != null)
1325
1325
  img.referrerPolicy = referrerPolicy;
1326
+ if (width != null)
1327
+ img.width = width;
1328
+ if (height != null)
1329
+ img.height = height;
1330
+ if (decoding != null)
1331
+ img.decoding = decoding;
1332
+ if (fetchPriority != null)
1333
+ img.fetchPriority = fetchPriority;
1334
+ if (ismap != null)
1335
+ img.isMap = ismap;
1336
+ if (usemap != null)
1337
+ img.useMap = usemap;
1326
1338
  img.onload = () => resolve(img);
1327
1339
  img.onerror = reject;
1328
1340
  });
@@ -1355,7 +1367,13 @@ const UseImage = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1355
1367
  "class",
1356
1368
  "loading",
1357
1369
  "crossorigin",
1358
- "referrerPolicy"
1370
+ "referrerPolicy",
1371
+ "width",
1372
+ "height",
1373
+ "decoding",
1374
+ "fetchPriority",
1375
+ "ismap",
1376
+ "usemap"
1359
1377
  ],
1360
1378
  setup(props, { slots }) {
1361
1379
  const data = vue.reactive(useImage(props));
@@ -1858,6 +1876,19 @@ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ vue.defineComp
1858
1876
  }
1859
1877
  });
1860
1878
 
1879
+ const UsePreferredReducedTransparency = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1880
+ name: "UsePreferredReducedTransparency",
1881
+ setup(props, { slots }) {
1882
+ const data = vue.reactive({
1883
+ transparency: core.usePreferredReducedTransparency()
1884
+ });
1885
+ return () => {
1886
+ if (slots.default)
1887
+ return slots.default(data);
1888
+ };
1889
+ }
1890
+ });
1891
+
1861
1892
  const vResizeObserver = {
1862
1893
  mounted(el, binding) {
1863
1894
  if (typeof binding.value === "function")
@@ -2262,6 +2293,7 @@ exports.UsePreferredContrast = UsePreferredContrast;
2262
2293
  exports.UsePreferredDark = UsePreferredDark;
2263
2294
  exports.UsePreferredLanguages = UsePreferredLanguages;
2264
2295
  exports.UsePreferredReducedMotion = UsePreferredReducedMotion;
2296
+ exports.UsePreferredReducedTransparency = UsePreferredReducedTransparency;
2265
2297
  exports.UseScreenSafeArea = UseScreenSafeArea;
2266
2298
  exports.UseTimeAgo = UseTimeAgo;
2267
2299
  exports.UseTimestamp = UseTimestamp;
package/index.d.cts CHANGED
@@ -413,6 +413,39 @@ declare const UseIdle: vue.DefineComponent<UseIdleOptions & {
413
413
  timeout: number;
414
414
  }> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
415
415
 
416
+ interface UseImageOptions {
417
+ /** Address of the resource */
418
+ src: string;
419
+ /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */
420
+ srcset?: string;
421
+ /** Image sizes for different page layouts */
422
+ sizes?: string;
423
+ /** Image alternative information */
424
+ alt?: string;
425
+ /** Image classes */
426
+ class?: string;
427
+ /** Image loading */
428
+ loading?: HTMLImageElement['loading'];
429
+ /** Image CORS settings */
430
+ crossorigin?: string;
431
+ /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */
432
+ referrerPolicy?: HTMLImageElement['referrerPolicy'];
433
+ /** Image width */
434
+ width?: HTMLImageElement['width'];
435
+ /** Image height */
436
+ height?: HTMLImageElement['height'];
437
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding */
438
+ decoding?: HTMLImageElement['decoding'];
439
+ /** Provides a hint of the relative priority to use when fetching the image */
440
+ fetchPriority?: HTMLImageElement['fetchPriority'];
441
+ /** Provides a hint of the importance of the image */
442
+ ismap?: HTMLImageElement['isMap'];
443
+ /** The partial URL (starting with #) of an image map associated with the element */
444
+ usemap?: HTMLImageElement['useMap'];
445
+ }
446
+
447
+ declare const UseImage: vue.DefineComponent<UseImageOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseImageOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
448
+
416
449
  interface UseScrollOptions extends ConfigurableWindow {
417
450
  /**
418
451
  * Throttle time for scroll event, it’s disabled by default.
@@ -531,6 +564,31 @@ declare function useInfiniteScroll<T extends InfiniteScrollElement>(element: May
531
564
  reset(): void;
532
565
  };
533
566
 
567
+ type BindingValueFunction$3 = Parameters<typeof useInfiniteScroll>[1];
568
+ type BindingValueArray$3 = [BindingValueFunction$3, UseInfiniteScrollOptions];
569
+ declare const vInfiniteScroll: ObjectDirective<HTMLElement, BindingValueFunction$3 | BindingValueArray$3>;
570
+
571
+ type BindingValueFunction$2 = IntersectionObserverCallback;
572
+ type BindingValueArray$2 = [BindingValueFunction$2, UseIntersectionObserverOptions];
573
+ declare const vIntersectionObserver: ObjectDirective<HTMLElement, BindingValueFunction$2 | BindingValueArray$2>;
574
+
575
+ declare const UseMouse: vue.DefineComponent<UseMouseOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseMouseOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
576
+
577
+ declare const UseMouseInElement: vue.DefineComponent<MouseInElementOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MouseInElementOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
578
+
579
+ declare const UseMousePressed: vue.DefineComponent<Omit<MousePressedOptions, "target"> & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<MousePressedOptions, "target"> & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
580
+
581
+ declare const UseNetwork: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
582
+ [key: string]: any;
583
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
584
+
585
+ declare const UseNow: vue.DefineComponent<Omit<UseNowOptions<true>, "controls">, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<UseNowOptions<true>, "controls">> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
586
+
587
+ interface UseObjectUrlProps {
588
+ object: Blob | MediaSource | undefined;
589
+ }
590
+ declare const UseObjectUrl: vue.DefineComponent<UseObjectUrlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseObjectUrlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
591
+
534
592
  interface UseOffsetPaginationOptions {
535
593
  /**
536
594
  * Total number of items.
@@ -569,52 +627,6 @@ interface UseOffsetPaginationReturn {
569
627
  next: () => void;
570
628
  }
571
629
 
572
- interface UseImageOptions {
573
- /** Address of the resource */
574
- src: string;
575
- /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */
576
- srcset?: string;
577
- /** Image sizes for different page layouts */
578
- sizes?: string;
579
- /** Image alternative information */
580
- alt?: string;
581
- /** Image classes */
582
- class?: string;
583
- /** Image loading */
584
- loading?: HTMLImageElement['loading'];
585
- /** Image CORS settings */
586
- crossorigin?: string;
587
- /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */
588
- referrerPolicy?: HTMLImageElement['referrerPolicy'];
589
- }
590
-
591
- declare const UseImage: vue.DefineComponent<UseImageOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseImageOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
592
-
593
- type BindingValueFunction$3 = Parameters<typeof useInfiniteScroll>[1];
594
- type BindingValueArray$3 = [BindingValueFunction$3, UseInfiniteScrollOptions];
595
- declare const vInfiniteScroll: ObjectDirective<HTMLElement, BindingValueFunction$3 | BindingValueArray$3>;
596
-
597
- type BindingValueFunction$2 = IntersectionObserverCallback;
598
- type BindingValueArray$2 = [BindingValueFunction$2, UseIntersectionObserverOptions];
599
- declare const vIntersectionObserver: ObjectDirective<HTMLElement, BindingValueFunction$2 | BindingValueArray$2>;
600
-
601
- declare const UseMouse: vue.DefineComponent<UseMouseOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseMouseOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
602
-
603
- declare const UseMouseInElement: vue.DefineComponent<MouseInElementOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MouseInElementOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
604
-
605
- declare const UseMousePressed: vue.DefineComponent<Omit<MousePressedOptions, "target"> & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<MousePressedOptions, "target"> & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
606
-
607
- declare const UseNetwork: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
608
- [key: string]: any;
609
- }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
610
-
611
- declare const UseNow: vue.DefineComponent<Omit<UseNowOptions<true>, "controls">, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<UseNowOptions<true>, "controls">> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
612
-
613
- interface UseObjectUrlProps {
614
- object: Blob | MediaSource | undefined;
615
- }
616
- declare const UseObjectUrl: vue.DefineComponent<UseObjectUrlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseObjectUrlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
617
-
618
630
  declare const UseOffsetPagination: vue.DefineComponent<UseOffsetPaginationOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseOffsetPaginationOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
619
631
 
620
632
  declare const UseOnline: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -653,6 +665,10 @@ declare const UsePreferredReducedMotion: vue.DefineComponent<{}, () => vue.VNode
653
665
  [key: string]: any;
654
666
  }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
655
667
 
668
+ declare const UsePreferredReducedTransparency: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
669
+ [key: string]: any;
670
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
671
+
656
672
  type BindingValueFunction$1 = ResizeObserverCallback;
657
673
  type BindingValueArray$1 = [BindingValueFunction$1, UseResizeObserverOptions];
658
674
  declare const vResizeObserver: ObjectDirective<HTMLElement, BindingValueFunction$1 | BindingValueArray$1>;
@@ -717,4 +733,4 @@ declare const UseWindowFocus: vue.DefineComponent<{}, () => vue.VNode<vue.Render
717
733
 
718
734
  declare const UseWindowSize: vue.DefineComponent<UseWindowSizeOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseWindowSizeOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
719
735
 
720
- export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
736
+ export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UsePreferredReducedTransparency, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
package/index.d.mts CHANGED
@@ -413,6 +413,39 @@ declare const UseIdle: vue.DefineComponent<UseIdleOptions & {
413
413
  timeout: number;
414
414
  }> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
415
415
 
416
+ interface UseImageOptions {
417
+ /** Address of the resource */
418
+ src: string;
419
+ /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */
420
+ srcset?: string;
421
+ /** Image sizes for different page layouts */
422
+ sizes?: string;
423
+ /** Image alternative information */
424
+ alt?: string;
425
+ /** Image classes */
426
+ class?: string;
427
+ /** Image loading */
428
+ loading?: HTMLImageElement['loading'];
429
+ /** Image CORS settings */
430
+ crossorigin?: string;
431
+ /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */
432
+ referrerPolicy?: HTMLImageElement['referrerPolicy'];
433
+ /** Image width */
434
+ width?: HTMLImageElement['width'];
435
+ /** Image height */
436
+ height?: HTMLImageElement['height'];
437
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding */
438
+ decoding?: HTMLImageElement['decoding'];
439
+ /** Provides a hint of the relative priority to use when fetching the image */
440
+ fetchPriority?: HTMLImageElement['fetchPriority'];
441
+ /** Provides a hint of the importance of the image */
442
+ ismap?: HTMLImageElement['isMap'];
443
+ /** The partial URL (starting with #) of an image map associated with the element */
444
+ usemap?: HTMLImageElement['useMap'];
445
+ }
446
+
447
+ declare const UseImage: vue.DefineComponent<UseImageOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseImageOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
448
+
416
449
  interface UseScrollOptions extends ConfigurableWindow {
417
450
  /**
418
451
  * Throttle time for scroll event, it’s disabled by default.
@@ -531,6 +564,31 @@ declare function useInfiniteScroll<T extends InfiniteScrollElement>(element: May
531
564
  reset(): void;
532
565
  };
533
566
 
567
+ type BindingValueFunction$3 = Parameters<typeof useInfiniteScroll>[1];
568
+ type BindingValueArray$3 = [BindingValueFunction$3, UseInfiniteScrollOptions];
569
+ declare const vInfiniteScroll: ObjectDirective<HTMLElement, BindingValueFunction$3 | BindingValueArray$3>;
570
+
571
+ type BindingValueFunction$2 = IntersectionObserverCallback;
572
+ type BindingValueArray$2 = [BindingValueFunction$2, UseIntersectionObserverOptions];
573
+ declare const vIntersectionObserver: ObjectDirective<HTMLElement, BindingValueFunction$2 | BindingValueArray$2>;
574
+
575
+ declare const UseMouse: vue.DefineComponent<UseMouseOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseMouseOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
576
+
577
+ declare const UseMouseInElement: vue.DefineComponent<MouseInElementOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MouseInElementOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
578
+
579
+ declare const UseMousePressed: vue.DefineComponent<Omit<MousePressedOptions, "target"> & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<MousePressedOptions, "target"> & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
580
+
581
+ declare const UseNetwork: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
582
+ [key: string]: any;
583
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
584
+
585
+ declare const UseNow: vue.DefineComponent<Omit<UseNowOptions<true>, "controls">, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<UseNowOptions<true>, "controls">> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
586
+
587
+ interface UseObjectUrlProps {
588
+ object: Blob | MediaSource | undefined;
589
+ }
590
+ declare const UseObjectUrl: vue.DefineComponent<UseObjectUrlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseObjectUrlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
591
+
534
592
  interface UseOffsetPaginationOptions {
535
593
  /**
536
594
  * Total number of items.
@@ -569,52 +627,6 @@ interface UseOffsetPaginationReturn {
569
627
  next: () => void;
570
628
  }
571
629
 
572
- interface UseImageOptions {
573
- /** Address of the resource */
574
- src: string;
575
- /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */
576
- srcset?: string;
577
- /** Image sizes for different page layouts */
578
- sizes?: string;
579
- /** Image alternative information */
580
- alt?: string;
581
- /** Image classes */
582
- class?: string;
583
- /** Image loading */
584
- loading?: HTMLImageElement['loading'];
585
- /** Image CORS settings */
586
- crossorigin?: string;
587
- /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */
588
- referrerPolicy?: HTMLImageElement['referrerPolicy'];
589
- }
590
-
591
- declare const UseImage: vue.DefineComponent<UseImageOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseImageOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
592
-
593
- type BindingValueFunction$3 = Parameters<typeof useInfiniteScroll>[1];
594
- type BindingValueArray$3 = [BindingValueFunction$3, UseInfiniteScrollOptions];
595
- declare const vInfiniteScroll: ObjectDirective<HTMLElement, BindingValueFunction$3 | BindingValueArray$3>;
596
-
597
- type BindingValueFunction$2 = IntersectionObserverCallback;
598
- type BindingValueArray$2 = [BindingValueFunction$2, UseIntersectionObserverOptions];
599
- declare const vIntersectionObserver: ObjectDirective<HTMLElement, BindingValueFunction$2 | BindingValueArray$2>;
600
-
601
- declare const UseMouse: vue.DefineComponent<UseMouseOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseMouseOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
602
-
603
- declare const UseMouseInElement: vue.DefineComponent<MouseInElementOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MouseInElementOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
604
-
605
- declare const UseMousePressed: vue.DefineComponent<Omit<MousePressedOptions, "target"> & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<MousePressedOptions, "target"> & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
606
-
607
- declare const UseNetwork: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
608
- [key: string]: any;
609
- }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
610
-
611
- declare const UseNow: vue.DefineComponent<Omit<UseNowOptions<true>, "controls">, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<UseNowOptions<true>, "controls">> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
612
-
613
- interface UseObjectUrlProps {
614
- object: Blob | MediaSource | undefined;
615
- }
616
- declare const UseObjectUrl: vue.DefineComponent<UseObjectUrlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseObjectUrlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
617
-
618
630
  declare const UseOffsetPagination: vue.DefineComponent<UseOffsetPaginationOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseOffsetPaginationOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
619
631
 
620
632
  declare const UseOnline: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -653,6 +665,10 @@ declare const UsePreferredReducedMotion: vue.DefineComponent<{}, () => vue.VNode
653
665
  [key: string]: any;
654
666
  }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
655
667
 
668
+ declare const UsePreferredReducedTransparency: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
669
+ [key: string]: any;
670
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
671
+
656
672
  type BindingValueFunction$1 = ResizeObserverCallback;
657
673
  type BindingValueArray$1 = [BindingValueFunction$1, UseResizeObserverOptions];
658
674
  declare const vResizeObserver: ObjectDirective<HTMLElement, BindingValueFunction$1 | BindingValueArray$1>;
@@ -717,4 +733,4 @@ declare const UseWindowFocus: vue.DefineComponent<{}, () => vue.VNode<vue.Render
717
733
 
718
734
  declare const UseWindowSize: vue.DefineComponent<UseWindowSizeOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseWindowSizeOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
719
735
 
720
- export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
736
+ export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UsePreferredReducedTransparency, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
package/index.d.ts CHANGED
@@ -413,6 +413,39 @@ declare const UseIdle: vue.DefineComponent<UseIdleOptions & {
413
413
  timeout: number;
414
414
  }> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
415
415
 
416
+ interface UseImageOptions {
417
+ /** Address of the resource */
418
+ src: string;
419
+ /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */
420
+ srcset?: string;
421
+ /** Image sizes for different page layouts */
422
+ sizes?: string;
423
+ /** Image alternative information */
424
+ alt?: string;
425
+ /** Image classes */
426
+ class?: string;
427
+ /** Image loading */
428
+ loading?: HTMLImageElement['loading'];
429
+ /** Image CORS settings */
430
+ crossorigin?: string;
431
+ /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */
432
+ referrerPolicy?: HTMLImageElement['referrerPolicy'];
433
+ /** Image width */
434
+ width?: HTMLImageElement['width'];
435
+ /** Image height */
436
+ height?: HTMLImageElement['height'];
437
+ /** https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#decoding */
438
+ decoding?: HTMLImageElement['decoding'];
439
+ /** Provides a hint of the relative priority to use when fetching the image */
440
+ fetchPriority?: HTMLImageElement['fetchPriority'];
441
+ /** Provides a hint of the importance of the image */
442
+ ismap?: HTMLImageElement['isMap'];
443
+ /** The partial URL (starting with #) of an image map associated with the element */
444
+ usemap?: HTMLImageElement['useMap'];
445
+ }
446
+
447
+ declare const UseImage: vue.DefineComponent<UseImageOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseImageOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
448
+
416
449
  interface UseScrollOptions extends ConfigurableWindow {
417
450
  /**
418
451
  * Throttle time for scroll event, it’s disabled by default.
@@ -531,6 +564,31 @@ declare function useInfiniteScroll<T extends InfiniteScrollElement>(element: May
531
564
  reset(): void;
532
565
  };
533
566
 
567
+ type BindingValueFunction$3 = Parameters<typeof useInfiniteScroll>[1];
568
+ type BindingValueArray$3 = [BindingValueFunction$3, UseInfiniteScrollOptions];
569
+ declare const vInfiniteScroll: ObjectDirective<HTMLElement, BindingValueFunction$3 | BindingValueArray$3>;
570
+
571
+ type BindingValueFunction$2 = IntersectionObserverCallback;
572
+ type BindingValueArray$2 = [BindingValueFunction$2, UseIntersectionObserverOptions];
573
+ declare const vIntersectionObserver: ObjectDirective<HTMLElement, BindingValueFunction$2 | BindingValueArray$2>;
574
+
575
+ declare const UseMouse: vue.DefineComponent<UseMouseOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseMouseOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
576
+
577
+ declare const UseMouseInElement: vue.DefineComponent<MouseInElementOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MouseInElementOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
578
+
579
+ declare const UseMousePressed: vue.DefineComponent<Omit<MousePressedOptions, "target"> & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<MousePressedOptions, "target"> & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
580
+
581
+ declare const UseNetwork: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
582
+ [key: string]: any;
583
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
584
+
585
+ declare const UseNow: vue.DefineComponent<Omit<UseNowOptions<true>, "controls">, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<UseNowOptions<true>, "controls">> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
586
+
587
+ interface UseObjectUrlProps {
588
+ object: Blob | MediaSource | undefined;
589
+ }
590
+ declare const UseObjectUrl: vue.DefineComponent<UseObjectUrlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseObjectUrlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
591
+
534
592
  interface UseOffsetPaginationOptions {
535
593
  /**
536
594
  * Total number of items.
@@ -569,52 +627,6 @@ interface UseOffsetPaginationReturn {
569
627
  next: () => void;
570
628
  }
571
629
 
572
- interface UseImageOptions {
573
- /** Address of the resource */
574
- src: string;
575
- /** Images to use in different situations, e.g., high-resolution displays, small monitors, etc. */
576
- srcset?: string;
577
- /** Image sizes for different page layouts */
578
- sizes?: string;
579
- /** Image alternative information */
580
- alt?: string;
581
- /** Image classes */
582
- class?: string;
583
- /** Image loading */
584
- loading?: HTMLImageElement['loading'];
585
- /** Image CORS settings */
586
- crossorigin?: string;
587
- /** Referrer policy for fetch https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy */
588
- referrerPolicy?: HTMLImageElement['referrerPolicy'];
589
- }
590
-
591
- declare const UseImage: vue.DefineComponent<UseImageOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseImageOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
592
-
593
- type BindingValueFunction$3 = Parameters<typeof useInfiniteScroll>[1];
594
- type BindingValueArray$3 = [BindingValueFunction$3, UseInfiniteScrollOptions];
595
- declare const vInfiniteScroll: ObjectDirective<HTMLElement, BindingValueFunction$3 | BindingValueArray$3>;
596
-
597
- type BindingValueFunction$2 = IntersectionObserverCallback;
598
- type BindingValueArray$2 = [BindingValueFunction$2, UseIntersectionObserverOptions];
599
- declare const vIntersectionObserver: ObjectDirective<HTMLElement, BindingValueFunction$2 | BindingValueArray$2>;
600
-
601
- declare const UseMouse: vue.DefineComponent<UseMouseOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseMouseOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
602
-
603
- declare const UseMouseInElement: vue.DefineComponent<MouseInElementOptions & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MouseInElementOptions & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
604
-
605
- declare const UseMousePressed: vue.DefineComponent<Omit<MousePressedOptions, "target"> & RenderableComponent, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<MousePressedOptions, "target"> & RenderableComponent> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
606
-
607
- declare const UseNetwork: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
608
- [key: string]: any;
609
- }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
610
-
611
- declare const UseNow: vue.DefineComponent<Omit<UseNowOptions<true>, "controls">, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<Omit<UseNowOptions<true>, "controls">> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
612
-
613
- interface UseObjectUrlProps {
614
- object: Blob | MediaSource | undefined;
615
- }
616
- declare const UseObjectUrl: vue.DefineComponent<UseObjectUrlProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseObjectUrlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
617
-
618
630
  declare const UseOffsetPagination: vue.DefineComponent<UseOffsetPaginationOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseOffsetPaginationOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
619
631
 
620
632
  declare const UseOnline: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -653,6 +665,10 @@ declare const UsePreferredReducedMotion: vue.DefineComponent<{}, () => vue.VNode
653
665
  [key: string]: any;
654
666
  }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
655
667
 
668
+ declare const UsePreferredReducedTransparency: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
669
+ [key: string]: any;
670
+ }>[] | undefined, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
671
+
656
672
  type BindingValueFunction$1 = ResizeObserverCallback;
657
673
  type BindingValueArray$1 = [BindingValueFunction$1, UseResizeObserverOptions];
658
674
  declare const vResizeObserver: ObjectDirective<HTMLElement, BindingValueFunction$1 | BindingValueArray$1>;
@@ -717,4 +733,4 @@ declare const UseWindowFocus: vue.DefineComponent<{}, () => vue.VNode<vue.Render
717
733
 
718
734
  declare const UseWindowSize: vue.DefineComponent<UseWindowSizeOptions, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<UseWindowSizeOptions> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
719
735
 
720
- export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
736
+ export { OnClickOutside, type OnClickOutsideProps, OnLongPress, type OnLongPressProps, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, type UseDraggableProps, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, type UseObjectUrlProps, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UsePreferredReducedTransparency, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, type UseVirtualListProps, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
package/index.iife.js CHANGED
@@ -1306,20 +1306,32 @@
1306
1306
  async function loadImage(options) {
1307
1307
  return new Promise((resolve, reject) => {
1308
1308
  const img = new Image();
1309
- const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;
1309
+ const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;
1310
1310
  img.src = src;
1311
- if (srcset)
1311
+ if (srcset != null)
1312
1312
  img.srcset = srcset;
1313
- if (sizes)
1313
+ if (sizes != null)
1314
1314
  img.sizes = sizes;
1315
- if (clazz)
1315
+ if (clazz != null)
1316
1316
  img.className = clazz;
1317
- if (loading)
1317
+ if (loading != null)
1318
1318
  img.loading = loading;
1319
- if (crossorigin)
1319
+ if (crossorigin != null)
1320
1320
  img.crossOrigin = crossorigin;
1321
- if (referrerPolicy)
1321
+ if (referrerPolicy != null)
1322
1322
  img.referrerPolicy = referrerPolicy;
1323
+ if (width != null)
1324
+ img.width = width;
1325
+ if (height != null)
1326
+ img.height = height;
1327
+ if (decoding != null)
1328
+ img.decoding = decoding;
1329
+ if (fetchPriority != null)
1330
+ img.fetchPriority = fetchPriority;
1331
+ if (ismap != null)
1332
+ img.isMap = ismap;
1333
+ if (usemap != null)
1334
+ img.useMap = usemap;
1323
1335
  img.onload = () => resolve(img);
1324
1336
  img.onerror = reject;
1325
1337
  });
@@ -1352,7 +1364,13 @@
1352
1364
  "class",
1353
1365
  "loading",
1354
1366
  "crossorigin",
1355
- "referrerPolicy"
1367
+ "referrerPolicy",
1368
+ "width",
1369
+ "height",
1370
+ "decoding",
1371
+ "fetchPriority",
1372
+ "ismap",
1373
+ "usemap"
1356
1374
  ],
1357
1375
  setup(props, { slots }) {
1358
1376
  const data = vue.reactive(useImage(props));
@@ -1855,6 +1873,19 @@
1855
1873
  }
1856
1874
  });
1857
1875
 
1876
+ const UsePreferredReducedTransparency = /* @__PURE__ */ /* #__PURE__ */ vue.defineComponent({
1877
+ name: "UsePreferredReducedTransparency",
1878
+ setup(props, { slots }) {
1879
+ const data = vue.reactive({
1880
+ transparency: core.usePreferredReducedTransparency()
1881
+ });
1882
+ return () => {
1883
+ if (slots.default)
1884
+ return slots.default(data);
1885
+ };
1886
+ }
1887
+ });
1888
+
1858
1889
  const vResizeObserver = {
1859
1890
  mounted(el, binding) {
1860
1891
  if (typeof binding.value === "function")
@@ -2259,6 +2290,7 @@
2259
2290
  exports.UsePreferredDark = UsePreferredDark;
2260
2291
  exports.UsePreferredLanguages = UsePreferredLanguages;
2261
2292
  exports.UsePreferredReducedMotion = UsePreferredReducedMotion;
2293
+ exports.UsePreferredReducedTransparency = UsePreferredReducedTransparency;
2262
2294
  exports.UseScreenSafeArea = UseScreenSafeArea;
2263
2295
  exports.UseTimeAgo = UseTimeAgo;
2264
2296
  exports.UseTimestamp = UseTimestamp;
package/index.iife.min.js CHANGED
@@ -1 +1 @@
1
- (function(h,w,o,f){"use strict";const ge=o.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const r=o.ref();return w.onClickOutside(r,a=>{n("trigger",a)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:r},t.default())}}}),A=f.isClient?window:void 0;function M(e){var t;const n=f.toValue(e);return(t=n?.$el)!=null?t:n}function R(...e){let t,n,r,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,a]=e,t=A):[t,n,r,a]=e,!t)return f.noop;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(c=>c()),i.length=0},l=(c,u,v,C)=>(c.addEventListener(u,v,C),()=>c.removeEventListener(u,v,C)),m=o.watch(()=>[M(t),f.toValue(a)],([c,u])=>{if(s(),!c)return;const v=f.isObject(u)?{...u}:u;i.push(...n.flatMap(C=>r.map(U=>l(c,C,U,v))))},{immediate:!0,flush:"post"}),d=()=>{m(),s()};return f.tryOnScopeDispose(d),d}let q=!1;function Q(e,t,n={}){const{window:r=A,ignore:a=[],capture:i=!0,detectIframe:s=!1}=n;if(!r)return f.noop;f.isIOS&&!q&&(q=!0,Array.from(r.document.body.children).forEach(g=>g.addEventListener("click",f.noop)),r.document.documentElement.addEventListener("click",f.noop));let l=!0;const m=g=>f.toValue(a).some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(p=>p===g.target||g.composedPath().includes(p));{const p=M(y);return p&&(g.target===p||g.composedPath().includes(p))}});function d(g){const y=f.toValue(g);return y&&y.$.subTree.shapeFlag===16}function c(g,y){const p=f.toValue(g),E=p.$.subTree&&p.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(V=>V.el===y.target||y.composedPath().includes(V.el))}const u=g=>{const y=M(e);if(g.target!=null&&!(!(y instanceof Element)&&d(e)&&c(e,g))&&!(!y||y===g.target||g.composedPath().includes(y))){if(g.detail===0&&(l=!m(g)),!l){l=!0;return}t(g)}};let v=!1;const C=[R(r,"click",g=>{v||(v=!0,setTimeout(()=>{v=!1},0),u(g))},{passive:!0,capture:i}),R(r,"pointerdown",g=>{const y=M(e);l=!m(g)&&!!(y&&!g.composedPath().includes(y))},{passive:!0}),s&&R(r,"blur",g=>{setTimeout(()=>{var y;const p=M(e);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!p?.contains(r.document.activeElement)&&t(g)},0)})].filter(Boolean);return()=>C.forEach(g=>g())}const Z={mounted(e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=Q(e,t.value,{capture:n});else{const[r,a]=t.value;e.__onClickOutside_stop=Q(e,r,Object.assign({capture:n},a))}},unmounted(e){e.__onClickOutside_stop()}};function he(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ee(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:a=A,eventName:i="keydown",passive:s=!1,dedupe:l=!1}=r,m=he(t);return R(a,i,c=>{c.repeat&&f.toValue(l)||m(c)&&n(c)},s)}const ye={mounted(e,t){var n,r;const a=(r=(n=t.arg)==null?void 0:n.split(","))!=null?r:!0;if(typeof t.value=="function")ee(a,t.value,{target:e});else{const[i,s]=t.value;ee(a,i,{target:e,...s})}}},we=500,Ue=10;function x(e,t,n){var r,a;const i=o.computed(()=>M(e));let s,l,m,d=!1;function c(){s&&(clearTimeout(s),s=void 0),l=void 0,m=void 0,d=!1}function u(p){var E,V,O;const[D,z,b]=[m,l,d];if(c(),!n?.onMouseUp||!z||!D||(E=n?.modifiers)!=null&&E.self&&p.target!==i.value)return;(V=n?.modifiers)!=null&&V.prevent&&p.preventDefault(),(O=n?.modifiers)!=null&&O.stop&&p.stopPropagation();const T=p.x-z.x,L=p.y-z.y,S=Math.sqrt(T*T+L*L);n.onMouseUp(p.timeStamp-D,S,b)}function v(p){var E,V,O,D;(E=n?.modifiers)!=null&&E.self&&p.target!==i.value||(c(),(V=n?.modifiers)!=null&&V.prevent&&p.preventDefault(),(O=n?.modifiers)!=null&&O.stop&&p.stopPropagation(),l={x:p.x,y:p.y},m=p.timeStamp,s=setTimeout(()=>{d=!0,t(p)},(D=n?.delay)!=null?D:we))}function C(p){var E,V,O,D;if((E=n?.modifiers)!=null&&E.self&&p.target!==i.value||!l||n?.distanceThreshold===!1)return;(V=n?.modifiers)!=null&&V.prevent&&p.preventDefault(),(O=n?.modifiers)!=null&&O.stop&&p.stopPropagation();const z=p.x-l.x,b=p.y-l.y;Math.sqrt(z*z+b*b)>=((D=n?.distanceThreshold)!=null?D:Ue)&&c()}const U={capture:(r=n?.modifiers)==null?void 0:r.capture,once:(a=n?.modifiers)==null?void 0:a.once},g=[R(i,"pointerdown",v,U),R(i,"pointermove",C,U),R(i,["pointerup","pointerleave"],u,U)];return()=>g.forEach(p=>p())}const Se=o.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const r=o.ref();return x(r,a=>{n("trigger",a)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:r},t.default())}}}),te={mounted(e,t){typeof t.value=="function"?x(e,t.value,{modifiers:t.modifiers}):x(e,...t.value)}},be=o.defineComponent({name:"UseActiveElement",setup(e,{slots:t}){const n=o.reactive({element:w.useActiveElement()});return()=>{if(t.default)return t.default(n)}}}),Ce=o.defineComponent({name:"UseBattery",setup(e,{slots:t}){const n=o.reactive(w.useBattery(e));return()=>{if(t.default)return t.default(n)}}}),Ee=o.defineComponent({name:"UseBrowserLocation",setup(e,{slots:t}){const n=o.reactive(w.useBrowserLocation());return()=>{if(t.default)return t.default(n)}}}),Oe=o.defineComponent({name:"UseClipboard",props:["source","read","navigator","copiedDuring","legacy"],setup(e,{slots:t}){const n=o.reactive(w.useClipboard(e));return()=>{var r;return(r=t.default)==null?void 0:r.call(t,n)}}}),N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},B="__vueuse_ssr_handlers__",Pe=Ve();function Ve(){return B in N||(N[B]=N[B]||{}),N[B]}function ne(e,t){return Pe[e]||t}const _e=Symbol("vueuse-ssr-width");function De(){const e=o.hasInjectionContext()?f.injectLocal(_e,null):null;return typeof e=="number"?e:void 0}function Le(){const e=o.ref(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function H(e){const t=Le();return o.computed(()=>(t.value,!!e()))}function Te(e,t={}){const{window:n=A,ssrWidth:r=De()}=t,a=H(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=o.ref(typeof r=="number");let s;const l=o.ref(!1),m=u=>{l.value=u.matches},d=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",m):s.removeListener(m))},c=o.watchEffect(()=>{if(i.value){i.value=!a.value;const u=f.toValue(e).split(",");l.value=u.some(v=>{const C=v.includes("not all"),U=v.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),g=v.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let y=!!(U||g);return U&&y&&(y=r>=f.pxValue(U[1])),g&&y&&(y=r<=f.pxValue(g[1])),C?!y:y});return}a.value&&(d(),s=n.matchMedia(f.toValue(e)),"addEventListener"in s?s.addEventListener("change",m):s.addListener(m),l.value=s.matches)});return f.tryOnScopeDispose(()=>{c(),d(),s=void 0}),o.computed(()=>l.value)}function Me(e){return Te("(prefers-color-scheme: dark)",e)}function ke(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ae={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},oe="vueuse-storage";function Re(e,t,n,r={}){var a;const{flush:i="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:m=!0,mergeDefaults:d=!1,shallow:c,window:u=A,eventFilter:v,onError:C=S=>{console.error(S)},initOnMounted:U}=r,g=(c?o.shallowRef:o.ref)(typeof t=="function"?t():t);if(!n)try{n=ne("getDefaultStorage",()=>{var S;return(S=A)==null?void 0:S.localStorage})()}catch(S){C(S)}if(!n)return g;const y=f.toValue(t),p=ke(y),E=(a=r.serializer)!=null?a:Ae[p],{pause:V,resume:O}=f.pausableWatch(g,()=>z(g.value),{flush:i,deep:s,eventFilter:v});u&&l&&f.tryOnMounted(()=>{n instanceof Storage?R(u,"storage",T):R(u,oe,L),U&&T()}),U||T();function D(S,P){if(u){const _={key:e,oldValue:S,newValue:P,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent("storage",_):new CustomEvent(oe,{detail:_}))}}function z(S){try{const P=n.getItem(e);if(S==null)D(P,null),n.removeItem(e);else{const _=E.write(S);P!==_&&(n.setItem(e,_),D(P,_))}}catch(P){C(P)}}function b(S){const P=S?S.newValue:n.getItem(e);if(P==null)return m&&y!=null&&n.setItem(e,E.write(y)),y;if(!S&&d){const _=E.read(P);return typeof d=="function"?d(_,y):p==="object"&&!Array.isArray(_)?{...y,..._}:_}else return typeof P!="string"?P:E.read(P)}function T(S){if(!(S&&S.storageArea!==n)){if(S&&S.key==null){g.value=y;return}if(!(S&&S.key!==e)){V();try{S?.newValue!==E.write(g.value)&&(g.value=b(S))}catch(P){C(P)}finally{S?o.nextTick(O):O()}}}}function L(S){T(S.detail)}return g}const ze="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Ie(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:a=A,storage:i,storageKey:s="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:m,emitAuto:d,disableTransition:c=!0}=e,u={auto:"",light:"light",dark:"dark",...e.modes||{}},v=Me({window:a}),C=o.computed(()=>v.value?"dark":"light"),U=m||(s==null?f.toRef(r):Re(s,r,i,{window:a,listenToStorageChanges:l})),g=o.computed(()=>U.value==="auto"?C.value:U.value),y=ne("updateHTMLAttrs",(O,D,z)=>{const b=typeof O=="string"?a?.document.querySelector(O):M(O);if(!b)return;const T=new Set,L=new Set;let S=null;if(D==="class"){const _=z.split(/\s/g);Object.values(u).flatMap(k=>(k||"").split(/\s/g)).filter(Boolean).forEach(k=>{_.includes(k)?T.add(k):L.add(k)})}else S={key:D,value:z};if(T.size===0&&L.size===0&&S===null)return;let P;c&&(P=a.document.createElement("style"),P.appendChild(document.createTextNode(ze)),a.document.head.appendChild(P));for(const _ of T)b.classList.add(_);for(const _ of L)b.classList.remove(_);S&&b.setAttribute(S.key,S.value),c&&(a.getComputedStyle(P).opacity,document.head.removeChild(P))});function p(O){var D;y(t,n,(D=u[O])!=null?D:O)}function E(O){e.onChanged?e.onChanged(O,p):p(O)}o.watch(g,E,{flush:"post",immediate:!0}),f.tryOnMounted(()=>E(g.value));const V=o.computed({get(){return d?U.value:g.value},set(O){U.value=O}});return Object.assign(V,{store:U,system:C,state:g})}const We=o.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(e,{slots:t}){const n=Ie(e),r=o.reactive({mode:n,system:n.system,store:n.store});return()=>{if(t.default)return t.default(r)}}}),Ne=o.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(e,{slots:t}){const n=w.useDark(e),r=o.reactive({isDark:n,toggleDark:f.useToggle(n)});return()=>{if(t.default)return t.default(r)}}}),Be=o.defineComponent({name:"UseDeviceMotion",setup(e,{slots:t}){const n=w.useDeviceMotion();return()=>{if(t.default)return t.default(n)}}}),He=o.defineComponent({name:"UseDeviceOrientation",setup(e,{slots:t}){const n=o.reactive(w.useDeviceOrientation());return()=>{if(t.default)return t.default(n)}}}),je=o.defineComponent({name:"UseDevicePixelRatio",setup(e,{slots:t}){const n=o.reactive({pixelRatio:w.useDevicePixelRatio()});return()=>{if(t.default)return t.default(n)}}}),Fe=o.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(e,{slots:t}){const n=o.reactive(w.useDevicesList(e));return()=>{if(t.default)return t.default(n)}}}),Ke=o.defineComponent({name:"UseDocumentVisibility",setup(e,{slots:t}){const n=o.reactive({visibility:w.useDocumentVisibility()});return()=>{if(t.default)return t.default(n)}}}),xe=o.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis","onStart","onMove","onEnd","disabled","buttons","containerElement"],setup(e,{slots:t}){const n=o.ref(),r=o.computed(()=>{var c;return(c=e.handle)!=null?c:n.value}),a=o.computed(()=>{var c;return(c=e.containerElement)!=null?c:void 0}),i=o.computed(()=>!!e.disabled),s=e.storageKey&&w.useStorage(e.storageKey,f.toValue(e.initialValue)||{x:0,y:0},w.isClient?e.storageType==="session"?sessionStorage:localStorage:void 0),l=s||e.initialValue||{x:0,y:0},m=(c,u)=>{var v;(v=e.onEnd)==null||v.call(e,c,u),s&&(s.value.x=c.x,s.value.y=c.y)},d=o.reactive(w.useDraggable(n,{...e,handle:r,initialValue:l,onEnd:m,disabled:i,containerElement:a}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n,style:`touch-action:none;${d.style}`},t.default(d))}}}),Ge=o.defineComponent({name:"UseElementBounding",props:["box","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(w.useElementBounding(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}});function re(e,t={}){const{delayEnter:n=0,delayLeave:r=0,window:a=A}=t,i=o.ref(!1);let s;const l=m=>{const d=m?n:r;s&&(clearTimeout(s),s=void 0),d?s=setTimeout(()=>i.value=m,d):i.value=m};return a&&(R(e,"mouseenter",()=>l(!0),{passive:!0}),R(e,"mouseleave",()=>l(!1),{passive:!0})),i}const Je={mounted(e,t){const n=t.value;if(typeof n=="function"){const r=re(e);o.watch(r,a=>n(a))}else{const[r,a]=n,i=re(e,a);o.watch(i,s=>r(s))}}},$e=o.defineComponent({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(w.useElementSize(n,{width:e.width,height:e.height},{box:e.box}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}});function G(e,t,n={}){const{window:r=A,...a}=n;let i;const s=H(()=>r&&"ResizeObserver"in r),l=()=>{i&&(i.disconnect(),i=void 0)},m=o.computed(()=>{const u=f.toValue(e);return Array.isArray(u)?u.map(v=>M(v)):[M(u)]}),d=o.watch(m,u=>{if(l(),s.value&&r){i=new ResizeObserver(t);for(const v of u)v&&i.observe(v,a)}},{immediate:!0,flush:"post"}),c=()=>{l(),d()};return f.tryOnScopeDispose(c),{isSupported:s,stop:c}}function Ye(e,t={width:0,height:0},n={}){const{window:r=A,box:a="content-box"}=n,i=o.computed(()=>{var u,v;return(v=(u=M(e))==null?void 0:u.namespaceURI)==null?void 0:v.includes("svg")}),s=o.ref(t.width),l=o.ref(t.height),{stop:m}=G(e,([u])=>{const v=a==="border-box"?u.borderBoxSize:a==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(r&&i.value){const C=M(e);if(C){const U=C.getBoundingClientRect();s.value=U.width,l.value=U.height}}else if(v){const C=Array.isArray(v)?v:[v];s.value=C.reduce((U,{inlineSize:g})=>U+g,0),l.value=C.reduce((U,{blockSize:g})=>U+g,0)}else s.value=u.contentRect.width,l.value=u.contentRect.height},n);f.tryOnMounted(()=>{const u=M(e);u&&(s.value="offsetWidth"in u?u.offsetWidth:t.width,l.value="offsetHeight"in u?u.offsetHeight:t.height)});const d=o.watch(()=>M(e),u=>{s.value=u?t.width:0,l.value=u?t.height:0});function c(){m(),d()}return{width:s,height:l,stop:c}}const Xe={mounted(e,t){var n;const r=typeof t.value=="function"?t.value:(n=t.value)==null?void 0:n[0],a=typeof t.value=="function"?[]:t.value.slice(1),{width:i,height:s}=Ye(e,...a);o.watch([i,s],([l,m])=>r({width:l,height:m}))}},qe=o.defineComponent({name:"UseElementVisibility",props:["as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive({isVisible:w.useElementVisibility(n)});return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}});function J(e,t,n={}){const{root:r,rootMargin:a="0px",threshold:i=0,window:s=A,immediate:l=!0}=n,m=H(()=>s&&"IntersectionObserver"in s),d=o.computed(()=>{const U=f.toValue(e);return(Array.isArray(U)?U:[U]).map(M).filter(f.notNullish)});let c=f.noop;const u=o.ref(l),v=m.value?o.watch(()=>[d.value,M(r),u.value],([U,g])=>{if(c(),!u.value||!U.length)return;const y=new IntersectionObserver(t,{root:M(g),rootMargin:a,threshold:i});U.forEach(p=>p&&y.observe(p)),c=()=>{y.disconnect(),c=f.noop}},{immediate:l,flush:"post"}):f.noop,C=()=>{c(),v(),u.value=!1};return f.tryOnScopeDispose(C),{isSupported:m,isActive:u,pause(){c(),u.value=!1},resume(){u.value=!0},stop:C}}function $(e,t={}){const{window:n=A,scrollTarget:r,threshold:a=0,rootMargin:i}=t,s=o.ref(!1);return J(e,l=>{let m=s.value,d=0;for(const c of l)c.time>=d&&(d=c.time,m=c.isIntersecting);s.value=m},{root:r,window:n,threshold:a,rootMargin:f.toValue(i)}),s}const Qe={mounted(e,t){if(typeof t.value=="function"){const n=t.value,r=$(e);o.watch(r,a=>n(a),{immediate:!0})}else{const[n,r]=t.value,a=$(e,r);o.watch(a,i=>n(i),{immediate:!0})}}},Ze=o.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(e,{slots:t}){const n=o.reactive(w.useEyeDropper());return()=>{if(t.default)return t.default(n)}}}),et=o.defineComponent({name:"UseFullscreen",props:["as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(w.useFullscreen(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),tt=o.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(e,{slots:t}){const n=o.reactive(w.useGeolocation(e));return()=>{if(t.default)return t.default(n)}}}),nt=o.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(e,{slots:t}){const n=o.reactive(w.useIdle(e.timeout,e));return()=>{if(t.default)return t.default(n)}}});function ot(e,t,n){const{immediate:r=!0,delay:a=0,onError:i=f.noop,onSuccess:s=f.noop,resetOnExecute:l=!0,shallow:m=!0,throwError:d}=n??{},c=m?o.shallowRef(t):o.ref(t),u=o.ref(!1),v=o.ref(!1),C=o.shallowRef(void 0);async function U(p=0,...E){l&&(c.value=t),C.value=void 0,u.value=!1,v.value=!0,p>0&&await f.promiseTimeout(p);const V=typeof e=="function"?e(...E):e;try{const O=await V;c.value=O,u.value=!0,s(O)}catch(O){if(C.value=O,i(O),d)throw O}finally{v.value=!1}return c.value}r&&U(a);const g={state:c,isReady:u,isLoading:v,error:C,execute:U};function y(){return new Promise((p,E)=>{f.until(v).toBe(!1).then(()=>p(g)).catch(E)})}return{...g,then(p,E){return y().then(p,E)}}}async function rt(e){return new Promise((t,n)=>{const r=new Image,{src:a,srcset:i,sizes:s,class:l,loading:m,crossorigin:d,referrerPolicy:c}=e;r.src=a,i&&(r.srcset=i),s&&(r.sizes=s),l&&(r.className=l),m&&(r.loading=m),d&&(r.crossOrigin=d),c&&(r.referrerPolicy=c),r.onload=()=>t(r),r.onerror=n})}function at(e,t={}){const n=ot(()=>rt(f.toValue(e)),void 0,{resetOnExecute:!0,...t});return o.watch(()=>f.toValue(e),()=>n.execute(t.delay),{deep:!0}),n}const it=o.defineComponent({name:"UseImage",props:["src","srcset","sizes","as","alt","class","loading","crossorigin","referrerPolicy"],setup(e,{slots:t}){const n=o.reactive(at(e));return()=>n.isLoading&&t.loading?t.loading(n):n.error&&t.error?t.error(n.error):t.default?t.default(n):o.h(e.as||"img",e)}});function j(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const ae=1;function Y(e,t={}){const{throttle:n=0,idle:r=200,onStop:a=f.noop,onScroll:i=f.noop,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:m="auto",window:d=A,onError:c=b=>{console.error(b)}}=t,u=o.ref(0),v=o.ref(0),C=o.computed({get(){return u.value},set(b){g(b,void 0)}}),U=o.computed({get(){return v.value},set(b){g(void 0,b)}});function g(b,T){var L,S,P,_;if(!d)return;const k=f.toValue(e);if(!k)return;(P=k instanceof Document?d.document.body:k)==null||P.scrollTo({top:(L=f.toValue(T))!=null?L:U.value,left:(S=f.toValue(b))!=null?S:C.value,behavior:f.toValue(m)});const I=((_=k?.document)==null?void 0:_.documentElement)||k?.documentElement||k;C!=null&&(u.value=I.scrollLeft),U!=null&&(v.value=I.scrollTop)}const y=o.ref(!1),p=o.reactive({left:!0,right:!1,top:!0,bottom:!1}),E=o.reactive({left:!1,right:!1,top:!1,bottom:!1}),V=b=>{y.value&&(y.value=!1,E.left=!1,E.right=!1,E.top=!1,E.bottom=!1,a(b))},O=f.useDebounceFn(V,n+r),D=b=>{var T;if(!d)return;const L=((T=b?.document)==null?void 0:T.documentElement)||b?.documentElement||M(b),{display:S,flexDirection:P,direction:_}=getComputedStyle(L),k=_==="rtl"?-1:1,I=L.scrollLeft;E.left=I<u.value,E.right=I>u.value;const de=I*k<=(s.left||0),me=I*k+L.clientWidth>=L.scrollWidth-(s.right||0)-ae;S==="flex"&&P==="row-reverse"?(p.left=me,p.right=de):(p.left=de,p.right=me),u.value=I;let W=L.scrollTop;b===d.document&&!W&&(W=d.document.body.scrollTop),E.top=W<v.value,E.bottom=W>v.value;const pe=W<=(s.top||0),ve=W+L.clientHeight>=L.scrollHeight-(s.bottom||0)-ae;S==="flex"&&P==="column-reverse"?(p.top=ve,p.bottom=pe):(p.top=pe,p.bottom=ve),v.value=W},z=b=>{var T;if(!d)return;const L=(T=b.target.documentElement)!=null?T:b.target;D(L),y.value=!0,O(b),i(b)};return R(e,"scroll",n?f.useThrottleFn(z,n,!0,!1):z,l),f.tryOnMounted(()=>{try{const b=f.toValue(e);if(!b)return;D(b)}catch(b){c(b)}}),R(e,"scrollend",V,l),{x:C,y:U,isScrolling:y,arrivedState:p,directions:E,measure(){const b=f.toValue(e);d&&b&&D(b)}}}function ie(e,t,n={}){var r;const{direction:a="bottom",interval:i=100,canLoadMore:s=()=>!0}=n,l=o.reactive(Y(e,{...n,offset:{[a]:(r=n.distance)!=null?r:0,...n.offset}})),m=o.ref(),d=o.computed(()=>!!m.value),c=o.computed(()=>j(f.toValue(e))),u=$(c);function v(){if(l.measure(),!c.value||!u.value||!s(c.value))return;const{scrollHeight:U,clientHeight:g,scrollWidth:y,clientWidth:p}=c.value,E=a==="bottom"||a==="top"?U<=g:y<=p;(l.arrivedState[a]||E)&&(m.value||(m.value=Promise.all([t(l),new Promise(V=>setTimeout(V,i))]).finally(()=>{m.value=null,o.nextTick(()=>v())})))}const C=o.watch(()=>[l.arrivedState[a],u.value],v,{immediate:!0});return f.tryOnUnmounted(C),{isLoading:d,reset(){o.nextTick(()=>v())}}}const st={mounted(e,t){typeof t.value=="function"?ie(e,t.value):ie(e,...t.value)}},lt={mounted(e,t){typeof t.value=="function"?J(e,t.value):J(e,...t.value)}},ut=o.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(e,{slots:t}){const n=o.reactive(w.useMouse(e));return()=>{if(t.default)return t.default(n)}}}),ct=o.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(w.useMouseInElement(n,e));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),ft=o.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(w.useMousePressed({...e,target:n}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),dt=o.defineComponent({name:"UseNetwork",setup(e,{slots:t}){const n=o.reactive(w.useNetwork());return()=>{if(t.default)return t.default(n)}}}),mt=o.defineComponent({name:"UseNow",props:["interval"],setup(e,{slots:t}){const n=o.reactive(w.useNow({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),pt=o.defineComponent({name:"UseObjectUrl",props:["object"],setup(e,{slots:t}){const n=f.toRef(e,"object"),r=w.useObjectUrl(n);return()=>{if(t.default&&r.value)return t.default(r)}}}),vt=o.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(e,{slots:t,emit:n}){const r=o.reactive(w.useOffsetPagination({...e,onPageChange(...a){var i;(i=e.onPageChange)==null||i.call(e,...a),n("page-change",...a)},onPageSizeChange(...a){var i;(i=e.onPageSizeChange)==null||i.call(e,...a),n("page-size-change",...a)},onPageCountChange(...a){var i;(i=e.onPageCountChange)==null||i.call(e,...a),n("page-count-change",...a)}}));return()=>{if(t.default)return t.default(r)}}}),gt=o.defineComponent({name:"UseOnline",setup(e,{slots:t}){const n=o.reactive({isOnline:w.useOnline()});return()=>{if(t.default)return t.default(n)}}}),ht=o.defineComponent({name:"UsePageLeave",setup(e,{slots:t}){const n=o.reactive({isLeft:w.usePageLeave()});return()=>{if(t.default)return t.default(n)}}}),yt=o.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(e,{slots:t}){const n=o.ref(null),r=o.reactive(w.usePointer({...e,target:e.target==="self"?n:A}));return()=>{if(t.default)return t.default(r,{ref:n})}}}),wt=o.defineComponent({name:"UsePointerLock",props:["as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(w.usePointerLock(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),Ut=o.defineComponent({name:"UsePreferredColorScheme",setup(e,{slots:t}){const n=o.reactive({colorScheme:w.usePreferredColorScheme()});return()=>{if(t.default)return t.default(n)}}}),St=o.defineComponent({name:"UsePreferredContrast",setup(e,{slots:t}){const n=o.reactive({contrast:w.usePreferredContrast()});return()=>{if(t.default)return t.default(n)}}}),bt=o.defineComponent({name:"UsePreferredDark",setup(e,{slots:t}){const n=o.reactive({prefersDark:w.usePreferredDark()});return()=>{if(t.default)return t.default(n)}}}),Ct=o.defineComponent({name:"UsePreferredLanguages",setup(e,{slots:t}){const n=o.reactive({languages:w.usePreferredLanguages()});return()=>{if(t.default)return t.default(n)}}}),Et=o.defineComponent({name:"UsePreferredReducedMotion",setup(e,{slots:t}){const n=o.reactive({motion:w.usePreferredReducedMotion()});return()=>{if(t.default)return t.default(n)}}}),Ot={mounted(e,t){typeof t.value=="function"?G(e,t.value):G(e,...t.value)}};function Pt(e,t,n={}){const{window:r=A,...a}=n;let i;const s=H(()=>r&&"MutationObserver"in r),l=()=>{i&&(i.disconnect(),i=void 0)},m=o.computed(()=>{const v=f.toValue(e),C=(Array.isArray(v)?v:[v]).map(M).filter(f.notNullish);return new Set(C)}),d=o.watch(()=>m.value,v=>{l(),s.value&&v.size&&(i=new MutationObserver(t),v.forEach(C=>i.observe(C,a)))},{immediate:!0,flush:"post"}),c=()=>i?.takeRecords(),u=()=>{d(),l()};return f.tryOnScopeDispose(u),{isSupported:s,stop:u,takeRecords:c}}function F(e,t,n={}){const{window:r=A,initialValue:a,observe:i=!1}=n,s=o.ref(a),l=o.computed(()=>{var d;return M(t)||((d=r?.document)==null?void 0:d.documentElement)});function m(){var d;const c=f.toValue(e),u=f.toValue(l);if(u&&r&&c){const v=(d=r.getComputedStyle(u).getPropertyValue(c))==null?void 0:d.trim();s.value=v||a}}return i&&Pt(l,m,{attributeFilter:["style","class"],window:r}),o.watch([l,()=>f.toValue(e)],(d,c)=>{c[0]&&c[1]&&c[0].style.removeProperty(c[1]),m()},{immediate:!0}),o.watch(s,d=>{var c;const u=f.toValue(e);(c=l.value)!=null&&c.style&&u&&(d==null?l.value.style.removeProperty(u):l.value.style.setProperty(u,d))}),s}const se="--vueuse-safe-area-top",le="--vueuse-safe-area-right",ue="--vueuse-safe-area-bottom",ce="--vueuse-safe-area-left";function Vt(){const e=o.ref(""),t=o.ref(""),n=o.ref(""),r=o.ref("");if(f.isClient){const i=F(se),s=F(le),l=F(ue),m=F(ce);i.value="env(safe-area-inset-top, 0px)",s.value="env(safe-area-inset-right, 0px)",l.value="env(safe-area-inset-bottom, 0px)",m.value="env(safe-area-inset-left, 0px)",a(),R("resize",f.useDebounceFn(a))}function a(){e.value=K(se),t.value=K(le),n.value=K(ue),r.value=K(ce)}return{top:e,right:t,bottom:n,left:r,update:a}}function K(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const _t=o.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(e,{slots:t}){const{top:n,right:r,bottom:a,left:i}=Vt();return()=>{if(t.default)return o.h("div",{style:{paddingTop:e.top?n.value:"",paddingRight:e.right?r.value:"",paddingBottom:e.bottom?a.value:"",paddingLeft:e.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},t.default())}}}),Dt={mounted(e,t){if(typeof t.value=="function"){const n=t.value,r=Y(e,{onScroll(){n(r)},onStop(){n(r)}})}else{const[n,r]=t.value,a=Y(e,{...r,onScroll(i){var s;(s=r.onScroll)==null||s.call(r,i),n(a)},onStop(i){var s;(s=r.onStop)==null||s.call(r,i),n(a)}})}}};function fe(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:fe(n)}}function Lt(e){const t=e||window.event,n=t.target;return fe(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const X=new WeakMap;function Tt(e,t=!1){const n=o.ref(t);let r=null,a="";o.watch(f.toRef(e),l=>{const m=j(f.toValue(l));if(m){const d=m;if(X.get(d)||X.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(a=d.style.overflow),d.style.overflow==="hidden")return n.value=!0;if(n.value)return d.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=j(f.toValue(e));!l||n.value||(f.isIOS&&(r=R(l,"touchmove",m=>{Lt(m)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},s=()=>{const l=j(f.toValue(e));!l||!n.value||(f.isIOS&&r?.(),l.style.overflow=a,X.delete(l),n.value=!1)};return f.tryOnScopeDispose(s),o.computed({get(){return n.value},set(l){l?i():s()}})}function Mt(){let e=!1;const t=o.ref(!1);return(n,r)=>{if(t.value=r.value,e)return;e=!0;const a=Tt(n,r.value);o.watch(t,i=>a.value=i)}}const kt=Mt(),At=o.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(e,{slots:t}){const n=o.reactive(w.useTimeAgo(()=>e.time,{...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),Rt=o.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(e,{slots:t}){const n=o.reactive(w.useTimestamp({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),zt=o.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(e,{slots:t,expose:n}){const{list:r}=o.toRefs(e),{list:a,containerProps:i,wrapperProps:s,scrollTo:l}=w.useVirtualList(r,e.options);return n({scrollTo:l}),i.style&&typeof i.style=="object"&&!Array.isArray(i.style)&&(i.style.height=e.height||"300px"),()=>o.h("div",{...i},[o.h("div",{...s.value},a.value.map(m=>o.h("div",{style:{overflow:"hidden",height:m.height}},t.default?t.default(m):"Please set content!")))])}}),It=o.defineComponent({name:"UseWindowFocus",setup(e,{slots:t}){const n=o.reactive({focused:w.useWindowFocus()});return()=>{if(t.default)return t.default(n)}}}),Wt=o.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(e,{slots:t}){const n=o.reactive(w.useWindowSize(e));return()=>{if(t.default)return t.default(n)}}});h.OnClickOutside=ge,h.OnLongPress=Se,h.UseActiveElement=be,h.UseBattery=Ce,h.UseBrowserLocation=Ee,h.UseClipboard=Oe,h.UseColorMode=We,h.UseDark=Ne,h.UseDeviceMotion=Be,h.UseDeviceOrientation=He,h.UseDevicePixelRatio=je,h.UseDevicesList=Fe,h.UseDocumentVisibility=Ke,h.UseDraggable=xe,h.UseElementBounding=Ge,h.UseElementSize=$e,h.UseElementVisibility=qe,h.UseEyeDropper=Ze,h.UseFullscreen=et,h.UseGeolocation=tt,h.UseIdle=nt,h.UseImage=it,h.UseMouse=ut,h.UseMouseInElement=ct,h.UseMousePressed=ft,h.UseNetwork=dt,h.UseNow=mt,h.UseObjectUrl=pt,h.UseOffsetPagination=vt,h.UseOnline=gt,h.UsePageLeave=ht,h.UsePointer=yt,h.UsePointerLock=wt,h.UsePreferredColorScheme=Ut,h.UsePreferredContrast=St,h.UsePreferredDark=bt,h.UsePreferredLanguages=Ct,h.UsePreferredReducedMotion=Et,h.UseScreenSafeArea=_t,h.UseTimeAgo=At,h.UseTimestamp=Rt,h.UseVirtualList=zt,h.UseWindowFocus=It,h.UseWindowSize=Wt,h.VOnClickOutside=Z,h.VOnLongPress=te,h.vElementHover=Je,h.vElementSize=Xe,h.vElementVisibility=Qe,h.vInfiniteScroll=st,h.vIntersectionObserver=lt,h.vOnClickOutside=Z,h.vOnKeyStroke=ye,h.vOnLongPress=te,h.vResizeObserver=Ot,h.vScroll=Dt,h.vScrollLock=kt})(this.VueUse=this.VueUse||{},VueUse,Vue,VueUse);
1
+ (function(h,U,o,f){"use strict";const ge=o.defineComponent({name:"OnClickOutside",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const r=o.ref();return U.onClickOutside(r,a=>{n("trigger",a)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:r},t.default())}}}),A=f.isClient?window:void 0;function M(e){var t;const n=f.toValue(e);return(t=n?.$el)!=null?t:n}function R(...e){let t,n,r,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,a]=e,t=A):[t,n,r,a]=e,!t)return f.noop;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],s=()=>{i.forEach(c=>c()),i.length=0},l=(c,u,p,S)=>(c.addEventListener(u,p,S),()=>c.removeEventListener(u,p,S)),m=o.watch(()=>[M(t),f.toValue(a)],([c,u])=>{if(s(),!c)return;const p=f.isObject(u)?{...u}:u;i.push(...n.flatMap(S=>r.map(w=>l(c,S,w,p))))},{immediate:!0,flush:"post"}),d=()=>{m(),s()};return f.tryOnScopeDispose(d),d}let q=!1;function Q(e,t,n={}){const{window:r=A,ignore:a=[],capture:i=!0,detectIframe:s=!1}=n;if(!r)return f.noop;f.isIOS&&!q&&(q=!0,Array.from(r.document.body.children).forEach(v=>v.addEventListener("click",f.noop)),r.document.documentElement.addEventListener("click",f.noop));let l=!0;const m=v=>f.toValue(a).some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(g=>g===v.target||v.composedPath().includes(g));{const g=M(y);return g&&(v.target===g||v.composedPath().includes(g))}});function d(v){const y=f.toValue(v);return y&&y.$.subTree.shapeFlag===16}function c(v,y){const g=f.toValue(v),E=g.$.subTree&&g.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(V=>V.el===y.target||y.composedPath().includes(V.el))}const u=v=>{const y=M(e);if(v.target!=null&&!(!(y instanceof Element)&&d(e)&&c(e,v))&&!(!y||y===v.target||v.composedPath().includes(y))){if(v.detail===0&&(l=!m(v)),!l){l=!0;return}t(v)}};let p=!1;const S=[R(r,"click",v=>{p||(p=!0,setTimeout(()=>{p=!1},0),u(v))},{passive:!0,capture:i}),R(r,"pointerdown",v=>{const y=M(e);l=!m(v)&&!!(y&&!v.composedPath().includes(y))},{passive:!0}),s&&R(r,"blur",v=>{setTimeout(()=>{var y;const g=M(e);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!g?.contains(r.document.activeElement)&&t(v)},0)})].filter(Boolean);return()=>S.forEach(v=>v())}const Z={mounted(e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=Q(e,t.value,{capture:n});else{const[r,a]=t.value;e.__onClickOutside_stop=Q(e,r,Object.assign({capture:n},a))}},unmounted(e){e.__onClickOutside_stop()}};function he(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ee(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:a=A,eventName:i="keydown",passive:s=!1,dedupe:l=!1}=r,m=he(t);return R(a,i,c=>{c.repeat&&f.toValue(l)||m(c)&&n(c)},s)}const ye={mounted(e,t){var n,r;const a=(r=(n=t.arg)==null?void 0:n.split(","))!=null?r:!0;if(typeof t.value=="function")ee(a,t.value,{target:e});else{const[i,s]=t.value;ee(a,i,{target:e,...s})}}},we=500,Ue=10;function x(e,t,n){var r,a;const i=o.computed(()=>M(e));let s,l,m,d=!1;function c(){s&&(clearTimeout(s),s=void 0),l=void 0,m=void 0,d=!1}function u(g){var E,V,P;const[D,z,C]=[m,l,d];if(c(),!n?.onMouseUp||!z||!D||(E=n?.modifiers)!=null&&E.self&&g.target!==i.value)return;(V=n?.modifiers)!=null&&V.prevent&&g.preventDefault(),(P=n?.modifiers)!=null&&P.stop&&g.stopPropagation();const T=g.x-z.x,L=g.y-z.y,b=Math.sqrt(T*T+L*L);n.onMouseUp(g.timeStamp-D,b,C)}function p(g){var E,V,P,D;(E=n?.modifiers)!=null&&E.self&&g.target!==i.value||(c(),(V=n?.modifiers)!=null&&V.prevent&&g.preventDefault(),(P=n?.modifiers)!=null&&P.stop&&g.stopPropagation(),l={x:g.x,y:g.y},m=g.timeStamp,s=setTimeout(()=>{d=!0,t(g)},(D=n?.delay)!=null?D:we))}function S(g){var E,V,P,D;if((E=n?.modifiers)!=null&&E.self&&g.target!==i.value||!l||n?.distanceThreshold===!1)return;(V=n?.modifiers)!=null&&V.prevent&&g.preventDefault(),(P=n?.modifiers)!=null&&P.stop&&g.stopPropagation();const z=g.x-l.x,C=g.y-l.y;Math.sqrt(z*z+C*C)>=((D=n?.distanceThreshold)!=null?D:Ue)&&c()}const w={capture:(r=n?.modifiers)==null?void 0:r.capture,once:(a=n?.modifiers)==null?void 0:a.once},v=[R(i,"pointerdown",p,w),R(i,"pointermove",S,w),R(i,["pointerup","pointerleave"],u,w)];return()=>v.forEach(g=>g())}const Se=o.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(e,{slots:t,emit:n}){const r=o.ref();return x(r,a=>{n("trigger",a)},e.options),()=>{if(t.default)return o.h(e.as||"div",{ref:r},t.default())}}}),te={mounted(e,t){typeof t.value=="function"?x(e,t.value,{modifiers:t.modifiers}):x(e,...t.value)}},be=o.defineComponent({name:"UseActiveElement",setup(e,{slots:t}){const n=o.reactive({element:U.useActiveElement()});return()=>{if(t.default)return t.default(n)}}}),Ce=o.defineComponent({name:"UseBattery",setup(e,{slots:t}){const n=o.reactive(U.useBattery(e));return()=>{if(t.default)return t.default(n)}}}),Ee=o.defineComponent({name:"UseBrowserLocation",setup(e,{slots:t}){const n=o.reactive(U.useBrowserLocation());return()=>{if(t.default)return t.default(n)}}}),Pe=o.defineComponent({name:"UseClipboard",props:["source","read","navigator","copiedDuring","legacy"],setup(e,{slots:t}){const n=o.reactive(U.useClipboard(e));return()=>{var r;return(r=t.default)==null?void 0:r.call(t,n)}}}),N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},B="__vueuse_ssr_handlers__",Oe=Ve();function Ve(){return B in N||(N[B]=N[B]||{}),N[B]}function ne(e,t){return Oe[e]||t}const _e=Symbol("vueuse-ssr-width");function De(){const e=o.hasInjectionContext()?f.injectLocal(_e,null):null;return typeof e=="number"?e:void 0}function Le(){const e=o.ref(!1),t=o.getCurrentInstance();return t&&o.onMounted(()=>{e.value=!0},t),e}function H(e){const t=Le();return o.computed(()=>(t.value,!!e()))}function Te(e,t={}){const{window:n=A,ssrWidth:r=De()}=t,a=H(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=o.ref(typeof r=="number");let s;const l=o.ref(!1),m=u=>{l.value=u.matches},d=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",m):s.removeListener(m))},c=o.watchEffect(()=>{if(i.value){i.value=!a.value;const u=f.toValue(e).split(",");l.value=u.some(p=>{const S=p.includes("not all"),w=p.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),v=p.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let y=!!(w||v);return w&&y&&(y=r>=f.pxValue(w[1])),v&&y&&(y=r<=f.pxValue(v[1])),S?!y:y});return}a.value&&(d(),s=n.matchMedia(f.toValue(e)),"addEventListener"in s?s.addEventListener("change",m):s.addListener(m),l.value=s.matches)});return f.tryOnScopeDispose(()=>{c(),d(),s=void 0}),o.computed(()=>l.value)}function Me(e){return Te("(prefers-color-scheme: dark)",e)}function ke(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Ae={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},oe="vueuse-storage";function Re(e,t,n,r={}){var a;const{flush:i="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:m=!0,mergeDefaults:d=!1,shallow:c,window:u=A,eventFilter:p,onError:S=b=>{console.error(b)},initOnMounted:w}=r,v=(c?o.shallowRef:o.ref)(typeof t=="function"?t():t);if(!n)try{n=ne("getDefaultStorage",()=>{var b;return(b=A)==null?void 0:b.localStorage})()}catch(b){S(b)}if(!n)return v;const y=f.toValue(t),g=ke(y),E=(a=r.serializer)!=null?a:Ae[g],{pause:V,resume:P}=f.pausableWatch(v,()=>z(v.value),{flush:i,deep:s,eventFilter:p});u&&l&&f.tryOnMounted(()=>{n instanceof Storage?R(u,"storage",T):R(u,oe,L),w&&T()}),w||T();function D(b,O){if(u){const _={key:e,oldValue:b,newValue:O,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent("storage",_):new CustomEvent(oe,{detail:_}))}}function z(b){try{const O=n.getItem(e);if(b==null)D(O,null),n.removeItem(e);else{const _=E.write(b);O!==_&&(n.setItem(e,_),D(O,_))}}catch(O){S(O)}}function C(b){const O=b?b.newValue:n.getItem(e);if(O==null)return m&&y!=null&&n.setItem(e,E.write(y)),y;if(!b&&d){const _=E.read(O);return typeof d=="function"?d(_,y):g==="object"&&!Array.isArray(_)?{...y,..._}:_}else return typeof O!="string"?O:E.read(O)}function T(b){if(!(b&&b.storageArea!==n)){if(b&&b.key==null){v.value=y;return}if(!(b&&b.key!==e)){V();try{b?.newValue!==E.write(v.value)&&(v.value=C(b))}catch(O){S(O)}finally{b?o.nextTick(P):P()}}}}function L(b){T(b.detail)}return v}const ze="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function Ie(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:a=A,storage:i,storageKey:s="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:m,emitAuto:d,disableTransition:c=!0}=e,u={auto:"",light:"light",dark:"dark",...e.modes||{}},p=Me({window:a}),S=o.computed(()=>p.value?"dark":"light"),w=m||(s==null?f.toRef(r):Re(s,r,i,{window:a,listenToStorageChanges:l})),v=o.computed(()=>w.value==="auto"?S.value:w.value),y=ne("updateHTMLAttrs",(P,D,z)=>{const C=typeof P=="string"?a?.document.querySelector(P):M(P);if(!C)return;const T=new Set,L=new Set;let b=null;if(D==="class"){const _=z.split(/\s/g);Object.values(u).flatMap(k=>(k||"").split(/\s/g)).filter(Boolean).forEach(k=>{_.includes(k)?T.add(k):L.add(k)})}else b={key:D,value:z};if(T.size===0&&L.size===0&&b===null)return;let O;c&&(O=a.document.createElement("style"),O.appendChild(document.createTextNode(ze)),a.document.head.appendChild(O));for(const _ of T)C.classList.add(_);for(const _ of L)C.classList.remove(_);b&&C.setAttribute(b.key,b.value),c&&(a.getComputedStyle(O).opacity,document.head.removeChild(O))});function g(P){var D;y(t,n,(D=u[P])!=null?D:P)}function E(P){e.onChanged?e.onChanged(P,g):g(P)}o.watch(v,E,{flush:"post",immediate:!0}),f.tryOnMounted(()=>E(v.value));const V=o.computed({get(){return d?w.value:v.value},set(P){w.value=P}});return Object.assign(V,{store:w,system:S,state:v})}const We=o.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(e,{slots:t}){const n=Ie(e),r=o.reactive({mode:n,system:n.system,store:n.store});return()=>{if(t.default)return t.default(r)}}}),Ne=o.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(e,{slots:t}){const n=U.useDark(e),r=o.reactive({isDark:n,toggleDark:f.useToggle(n)});return()=>{if(t.default)return t.default(r)}}}),Be=o.defineComponent({name:"UseDeviceMotion",setup(e,{slots:t}){const n=U.useDeviceMotion();return()=>{if(t.default)return t.default(n)}}}),He=o.defineComponent({name:"UseDeviceOrientation",setup(e,{slots:t}){const n=o.reactive(U.useDeviceOrientation());return()=>{if(t.default)return t.default(n)}}}),je=o.defineComponent({name:"UseDevicePixelRatio",setup(e,{slots:t}){const n=o.reactive({pixelRatio:U.useDevicePixelRatio()});return()=>{if(t.default)return t.default(n)}}}),Fe=o.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(e,{slots:t}){const n=o.reactive(U.useDevicesList(e));return()=>{if(t.default)return t.default(n)}}}),Ke=o.defineComponent({name:"UseDocumentVisibility",setup(e,{slots:t}){const n=o.reactive({visibility:U.useDocumentVisibility()});return()=>{if(t.default)return t.default(n)}}}),xe=o.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as","handle","axis","onStart","onMove","onEnd","disabled","buttons","containerElement"],setup(e,{slots:t}){const n=o.ref(),r=o.computed(()=>{var c;return(c=e.handle)!=null?c:n.value}),a=o.computed(()=>{var c;return(c=e.containerElement)!=null?c:void 0}),i=o.computed(()=>!!e.disabled),s=e.storageKey&&U.useStorage(e.storageKey,f.toValue(e.initialValue)||{x:0,y:0},U.isClient?e.storageType==="session"?sessionStorage:localStorage:void 0),l=s||e.initialValue||{x:0,y:0},m=(c,u)=>{var p;(p=e.onEnd)==null||p.call(e,c,u),s&&(s.value.x=c.x,s.value.y=c.y)},d=o.reactive(U.useDraggable(n,{...e,handle:r,initialValue:l,onEnd:m,disabled:i,containerElement:a}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n,style:`touch-action:none;${d.style}`},t.default(d))}}}),Ge=o.defineComponent({name:"UseElementBounding",props:["box","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(U.useElementBounding(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}});function re(e,t={}){const{delayEnter:n=0,delayLeave:r=0,window:a=A}=t,i=o.ref(!1);let s;const l=m=>{const d=m?n:r;s&&(clearTimeout(s),s=void 0),d?s=setTimeout(()=>i.value=m,d):i.value=m};return a&&(R(e,"mouseenter",()=>l(!0),{passive:!0}),R(e,"mouseleave",()=>l(!1),{passive:!0})),i}const Je={mounted(e,t){const n=t.value;if(typeof n=="function"){const r=re(e);o.watch(r,a=>n(a))}else{const[r,a]=n,i=re(e,a);o.watch(i,s=>r(s))}}},$e=o.defineComponent({name:"UseElementSize",props:["width","height","box","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(U.useElementSize(n,{width:e.width,height:e.height},{box:e.box}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}});function G(e,t,n={}){const{window:r=A,...a}=n;let i;const s=H(()=>r&&"ResizeObserver"in r),l=()=>{i&&(i.disconnect(),i=void 0)},m=o.computed(()=>{const u=f.toValue(e);return Array.isArray(u)?u.map(p=>M(p)):[M(u)]}),d=o.watch(m,u=>{if(l(),s.value&&r){i=new ResizeObserver(t);for(const p of u)p&&i.observe(p,a)}},{immediate:!0,flush:"post"}),c=()=>{l(),d()};return f.tryOnScopeDispose(c),{isSupported:s,stop:c}}function Ye(e,t={width:0,height:0},n={}){const{window:r=A,box:a="content-box"}=n,i=o.computed(()=>{var u,p;return(p=(u=M(e))==null?void 0:u.namespaceURI)==null?void 0:p.includes("svg")}),s=o.ref(t.width),l=o.ref(t.height),{stop:m}=G(e,([u])=>{const p=a==="border-box"?u.borderBoxSize:a==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(r&&i.value){const S=M(e);if(S){const w=S.getBoundingClientRect();s.value=w.width,l.value=w.height}}else if(p){const S=Array.isArray(p)?p:[p];s.value=S.reduce((w,{inlineSize:v})=>w+v,0),l.value=S.reduce((w,{blockSize:v})=>w+v,0)}else s.value=u.contentRect.width,l.value=u.contentRect.height},n);f.tryOnMounted(()=>{const u=M(e);u&&(s.value="offsetWidth"in u?u.offsetWidth:t.width,l.value="offsetHeight"in u?u.offsetHeight:t.height)});const d=o.watch(()=>M(e),u=>{s.value=u?t.width:0,l.value=u?t.height:0});function c(){m(),d()}return{width:s,height:l,stop:c}}const Xe={mounted(e,t){var n;const r=typeof t.value=="function"?t.value:(n=t.value)==null?void 0:n[0],a=typeof t.value=="function"?[]:t.value.slice(1),{width:i,height:s}=Ye(e,...a);o.watch([i,s],([l,m])=>r({width:l,height:m}))}},qe=o.defineComponent({name:"UseElementVisibility",props:["as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive({isVisible:U.useElementVisibility(n)});return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}});function J(e,t,n={}){const{root:r,rootMargin:a="0px",threshold:i=0,window:s=A,immediate:l=!0}=n,m=H(()=>s&&"IntersectionObserver"in s),d=o.computed(()=>{const w=f.toValue(e);return(Array.isArray(w)?w:[w]).map(M).filter(f.notNullish)});let c=f.noop;const u=o.ref(l),p=m.value?o.watch(()=>[d.value,M(r),u.value],([w,v])=>{if(c(),!u.value||!w.length)return;const y=new IntersectionObserver(t,{root:M(v),rootMargin:a,threshold:i});w.forEach(g=>g&&y.observe(g)),c=()=>{y.disconnect(),c=f.noop}},{immediate:l,flush:"post"}):f.noop,S=()=>{c(),p(),u.value=!1};return f.tryOnScopeDispose(S),{isSupported:m,isActive:u,pause(){c(),u.value=!1},resume(){u.value=!0},stop:S}}function $(e,t={}){const{window:n=A,scrollTarget:r,threshold:a=0,rootMargin:i}=t,s=o.ref(!1);return J(e,l=>{let m=s.value,d=0;for(const c of l)c.time>=d&&(d=c.time,m=c.isIntersecting);s.value=m},{root:r,window:n,threshold:a,rootMargin:f.toValue(i)}),s}const Qe={mounted(e,t){if(typeof t.value=="function"){const n=t.value,r=$(e);o.watch(r,a=>n(a),{immediate:!0})}else{const[n,r]=t.value,a=$(e,r);o.watch(a,i=>n(i),{immediate:!0})}}},Ze=o.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(e,{slots:t}){const n=o.reactive(U.useEyeDropper());return()=>{if(t.default)return t.default(n)}}}),et=o.defineComponent({name:"UseFullscreen",props:["as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(U.useFullscreen(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),tt=o.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(e,{slots:t}){const n=o.reactive(U.useGeolocation(e));return()=>{if(t.default)return t.default(n)}}}),nt=o.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(e,{slots:t}){const n=o.reactive(U.useIdle(e.timeout,e));return()=>{if(t.default)return t.default(n)}}});function ot(e,t,n){const{immediate:r=!0,delay:a=0,onError:i=f.noop,onSuccess:s=f.noop,resetOnExecute:l=!0,shallow:m=!0,throwError:d}=n??{},c=m?o.shallowRef(t):o.ref(t),u=o.ref(!1),p=o.ref(!1),S=o.shallowRef(void 0);async function w(g=0,...E){l&&(c.value=t),S.value=void 0,u.value=!1,p.value=!0,g>0&&await f.promiseTimeout(g);const V=typeof e=="function"?e(...E):e;try{const P=await V;c.value=P,u.value=!0,s(P)}catch(P){if(S.value=P,i(P),d)throw P}finally{p.value=!1}return c.value}r&&w(a);const v={state:c,isReady:u,isLoading:p,error:S,execute:w};function y(){return new Promise((g,E)=>{f.until(p).toBe(!1).then(()=>g(v)).catch(E)})}return{...v,then(g,E){return y().then(g,E)}}}async function rt(e){return new Promise((t,n)=>{const r=new Image,{src:a,srcset:i,sizes:s,class:l,loading:m,crossorigin:d,referrerPolicy:c,width:u,height:p,decoding:S,fetchPriority:w,ismap:v,usemap:y}=e;r.src=a,i!=null&&(r.srcset=i),s!=null&&(r.sizes=s),l!=null&&(r.className=l),m!=null&&(r.loading=m),d!=null&&(r.crossOrigin=d),c!=null&&(r.referrerPolicy=c),u!=null&&(r.width=u),p!=null&&(r.height=p),S!=null&&(r.decoding=S),w!=null&&(r.fetchPriority=w),v!=null&&(r.isMap=v),y!=null&&(r.useMap=y),r.onload=()=>t(r),r.onerror=n})}function at(e,t={}){const n=ot(()=>rt(f.toValue(e)),void 0,{resetOnExecute:!0,...t});return o.watch(()=>f.toValue(e),()=>n.execute(t.delay),{deep:!0}),n}const it=o.defineComponent({name:"UseImage",props:["src","srcset","sizes","as","alt","class","loading","crossorigin","referrerPolicy","width","height","decoding","fetchPriority","ismap","usemap"],setup(e,{slots:t}){const n=o.reactive(at(e));return()=>n.isLoading&&t.loading?t.loading(n):n.error&&t.error?t.error(n.error):t.default?t.default(n):o.h(e.as||"img",e)}});function j(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const ae=1;function Y(e,t={}){const{throttle:n=0,idle:r=200,onStop:a=f.noop,onScroll:i=f.noop,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:m="auto",window:d=A,onError:c=C=>{console.error(C)}}=t,u=o.ref(0),p=o.ref(0),S=o.computed({get(){return u.value},set(C){v(C,void 0)}}),w=o.computed({get(){return p.value},set(C){v(void 0,C)}});function v(C,T){var L,b,O,_;if(!d)return;const k=f.toValue(e);if(!k)return;(O=k instanceof Document?d.document.body:k)==null||O.scrollTo({top:(L=f.toValue(T))!=null?L:w.value,left:(b=f.toValue(C))!=null?b:S.value,behavior:f.toValue(m)});const I=((_=k?.document)==null?void 0:_.documentElement)||k?.documentElement||k;S!=null&&(u.value=I.scrollLeft),w!=null&&(p.value=I.scrollTop)}const y=o.ref(!1),g=o.reactive({left:!0,right:!1,top:!0,bottom:!1}),E=o.reactive({left:!1,right:!1,top:!1,bottom:!1}),V=C=>{y.value&&(y.value=!1,E.left=!1,E.right=!1,E.top=!1,E.bottom=!1,a(C))},P=f.useDebounceFn(V,n+r),D=C=>{var T;if(!d)return;const L=((T=C?.document)==null?void 0:T.documentElement)||C?.documentElement||M(C),{display:b,flexDirection:O,direction:_}=getComputedStyle(L),k=_==="rtl"?-1:1,I=L.scrollLeft;E.left=I<u.value,E.right=I>u.value;const de=I*k<=(s.left||0),me=I*k+L.clientWidth>=L.scrollWidth-(s.right||0)-ae;b==="flex"&&O==="row-reverse"?(g.left=me,g.right=de):(g.left=de,g.right=me),u.value=I;let W=L.scrollTop;C===d.document&&!W&&(W=d.document.body.scrollTop),E.top=W<p.value,E.bottom=W>p.value;const pe=W<=(s.top||0),ve=W+L.clientHeight>=L.scrollHeight-(s.bottom||0)-ae;b==="flex"&&O==="column-reverse"?(g.top=ve,g.bottom=pe):(g.top=pe,g.bottom=ve),p.value=W},z=C=>{var T;if(!d)return;const L=(T=C.target.documentElement)!=null?T:C.target;D(L),y.value=!0,P(C),i(C)};return R(e,"scroll",n?f.useThrottleFn(z,n,!0,!1):z,l),f.tryOnMounted(()=>{try{const C=f.toValue(e);if(!C)return;D(C)}catch(C){c(C)}}),R(e,"scrollend",V,l),{x:S,y:w,isScrolling:y,arrivedState:g,directions:E,measure(){const C=f.toValue(e);d&&C&&D(C)}}}function ie(e,t,n={}){var r;const{direction:a="bottom",interval:i=100,canLoadMore:s=()=>!0}=n,l=o.reactive(Y(e,{...n,offset:{[a]:(r=n.distance)!=null?r:0,...n.offset}})),m=o.ref(),d=o.computed(()=>!!m.value),c=o.computed(()=>j(f.toValue(e))),u=$(c);function p(){if(l.measure(),!c.value||!u.value||!s(c.value))return;const{scrollHeight:w,clientHeight:v,scrollWidth:y,clientWidth:g}=c.value,E=a==="bottom"||a==="top"?w<=v:y<=g;(l.arrivedState[a]||E)&&(m.value||(m.value=Promise.all([t(l),new Promise(V=>setTimeout(V,i))]).finally(()=>{m.value=null,o.nextTick(()=>p())})))}const S=o.watch(()=>[l.arrivedState[a],u.value],p,{immediate:!0});return f.tryOnUnmounted(S),{isLoading:d,reset(){o.nextTick(()=>p())}}}const st={mounted(e,t){typeof t.value=="function"?ie(e,t.value):ie(e,...t.value)}},lt={mounted(e,t){typeof t.value=="function"?J(e,t.value):J(e,...t.value)}},ut=o.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(e,{slots:t}){const n=o.reactive(U.useMouse(e));return()=>{if(t.default)return t.default(n)}}}),ct=o.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(U.useMouseInElement(n,e));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),ft=o.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(U.useMousePressed({...e,target:n}));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),dt=o.defineComponent({name:"UseNetwork",setup(e,{slots:t}){const n=o.reactive(U.useNetwork());return()=>{if(t.default)return t.default(n)}}}),mt=o.defineComponent({name:"UseNow",props:["interval"],setup(e,{slots:t}){const n=o.reactive(U.useNow({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),pt=o.defineComponent({name:"UseObjectUrl",props:["object"],setup(e,{slots:t}){const n=f.toRef(e,"object"),r=U.useObjectUrl(n);return()=>{if(t.default&&r.value)return t.default(r)}}}),vt=o.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(e,{slots:t,emit:n}){const r=o.reactive(U.useOffsetPagination({...e,onPageChange(...a){var i;(i=e.onPageChange)==null||i.call(e,...a),n("page-change",...a)},onPageSizeChange(...a){var i;(i=e.onPageSizeChange)==null||i.call(e,...a),n("page-size-change",...a)},onPageCountChange(...a){var i;(i=e.onPageCountChange)==null||i.call(e,...a),n("page-count-change",...a)}}));return()=>{if(t.default)return t.default(r)}}}),gt=o.defineComponent({name:"UseOnline",setup(e,{slots:t}){const n=o.reactive({isOnline:U.useOnline()});return()=>{if(t.default)return t.default(n)}}}),ht=o.defineComponent({name:"UsePageLeave",setup(e,{slots:t}){const n=o.reactive({isLeft:U.usePageLeave()});return()=>{if(t.default)return t.default(n)}}}),yt=o.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(e,{slots:t}){const n=o.ref(null),r=o.reactive(U.usePointer({...e,target:e.target==="self"?n:A}));return()=>{if(t.default)return t.default(r,{ref:n})}}}),wt=o.defineComponent({name:"UsePointerLock",props:["as"],setup(e,{slots:t}){const n=o.ref(),r=o.reactive(U.usePointerLock(n));return()=>{if(t.default)return o.h(e.as||"div",{ref:n},t.default(r))}}}),Ut=o.defineComponent({name:"UsePreferredColorScheme",setup(e,{slots:t}){const n=o.reactive({colorScheme:U.usePreferredColorScheme()});return()=>{if(t.default)return t.default(n)}}}),St=o.defineComponent({name:"UsePreferredContrast",setup(e,{slots:t}){const n=o.reactive({contrast:U.usePreferredContrast()});return()=>{if(t.default)return t.default(n)}}}),bt=o.defineComponent({name:"UsePreferredDark",setup(e,{slots:t}){const n=o.reactive({prefersDark:U.usePreferredDark()});return()=>{if(t.default)return t.default(n)}}}),Ct=o.defineComponent({name:"UsePreferredLanguages",setup(e,{slots:t}){const n=o.reactive({languages:U.usePreferredLanguages()});return()=>{if(t.default)return t.default(n)}}}),Et=o.defineComponent({name:"UsePreferredReducedMotion",setup(e,{slots:t}){const n=o.reactive({motion:U.usePreferredReducedMotion()});return()=>{if(t.default)return t.default(n)}}}),Pt=o.defineComponent({name:"UsePreferredReducedTransparency",setup(e,{slots:t}){const n=o.reactive({transparency:U.usePreferredReducedTransparency()});return()=>{if(t.default)return t.default(n)}}}),Ot={mounted(e,t){typeof t.value=="function"?G(e,t.value):G(e,...t.value)}};function Vt(e,t,n={}){const{window:r=A,...a}=n;let i;const s=H(()=>r&&"MutationObserver"in r),l=()=>{i&&(i.disconnect(),i=void 0)},m=o.computed(()=>{const p=f.toValue(e),S=(Array.isArray(p)?p:[p]).map(M).filter(f.notNullish);return new Set(S)}),d=o.watch(()=>m.value,p=>{l(),s.value&&p.size&&(i=new MutationObserver(t),p.forEach(S=>i.observe(S,a)))},{immediate:!0,flush:"post"}),c=()=>i?.takeRecords(),u=()=>{d(),l()};return f.tryOnScopeDispose(u),{isSupported:s,stop:u,takeRecords:c}}function F(e,t,n={}){const{window:r=A,initialValue:a,observe:i=!1}=n,s=o.ref(a),l=o.computed(()=>{var d;return M(t)||((d=r?.document)==null?void 0:d.documentElement)});function m(){var d;const c=f.toValue(e),u=f.toValue(l);if(u&&r&&c){const p=(d=r.getComputedStyle(u).getPropertyValue(c))==null?void 0:d.trim();s.value=p||a}}return i&&Vt(l,m,{attributeFilter:["style","class"],window:r}),o.watch([l,()=>f.toValue(e)],(d,c)=>{c[0]&&c[1]&&c[0].style.removeProperty(c[1]),m()},{immediate:!0}),o.watch(s,d=>{var c;const u=f.toValue(e);(c=l.value)!=null&&c.style&&u&&(d==null?l.value.style.removeProperty(u):l.value.style.setProperty(u,d))}),s}const se="--vueuse-safe-area-top",le="--vueuse-safe-area-right",ue="--vueuse-safe-area-bottom",ce="--vueuse-safe-area-left";function _t(){const e=o.ref(""),t=o.ref(""),n=o.ref(""),r=o.ref("");if(f.isClient){const i=F(se),s=F(le),l=F(ue),m=F(ce);i.value="env(safe-area-inset-top, 0px)",s.value="env(safe-area-inset-right, 0px)",l.value="env(safe-area-inset-bottom, 0px)",m.value="env(safe-area-inset-left, 0px)",a(),R("resize",f.useDebounceFn(a))}function a(){e.value=K(se),t.value=K(le),n.value=K(ue),r.value=K(ce)}return{top:e,right:t,bottom:n,left:r,update:a}}function K(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}const Dt=o.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(e,{slots:t}){const{top:n,right:r,bottom:a,left:i}=_t();return()=>{if(t.default)return o.h("div",{style:{paddingTop:e.top?n.value:"",paddingRight:e.right?r.value:"",paddingBottom:e.bottom?a.value:"",paddingLeft:e.left?i.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},t.default())}}}),Lt={mounted(e,t){if(typeof t.value=="function"){const n=t.value,r=Y(e,{onScroll(){n(r)},onStop(){n(r)}})}else{const[n,r]=t.value,a=Y(e,{...r,onScroll(i){var s;(s=r.onScroll)==null||s.call(r,i),n(a)},onStop(i){var s;(s=r.onStop)==null||s.call(r,i),n(a)}})}}};function fe(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:fe(n)}}function Tt(e){const t=e||window.event,n=t.target;return fe(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const X=new WeakMap;function Mt(e,t=!1){const n=o.ref(t);let r=null,a="";o.watch(f.toRef(e),l=>{const m=j(f.toValue(l));if(m){const d=m;if(X.get(d)||X.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(a=d.style.overflow),d.style.overflow==="hidden")return n.value=!0;if(n.value)return d.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=j(f.toValue(e));!l||n.value||(f.isIOS&&(r=R(l,"touchmove",m=>{Tt(m)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},s=()=>{const l=j(f.toValue(e));!l||!n.value||(f.isIOS&&r?.(),l.style.overflow=a,X.delete(l),n.value=!1)};return f.tryOnScopeDispose(s),o.computed({get(){return n.value},set(l){l?i():s()}})}function kt(){let e=!1;const t=o.ref(!1);return(n,r)=>{if(t.value=r.value,e)return;e=!0;const a=Mt(n,r.value);o.watch(t,i=>a.value=i)}}const At=kt(),Rt=o.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages","showSecond"],setup(e,{slots:t}){const n=o.reactive(U.useTimeAgo(()=>e.time,{...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),zt=o.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(e,{slots:t}){const n=o.reactive(U.useTimestamp({...e,controls:!0}));return()=>{if(t.default)return t.default(n)}}}),It=o.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(e,{slots:t,expose:n}){const{list:r}=o.toRefs(e),{list:a,containerProps:i,wrapperProps:s,scrollTo:l}=U.useVirtualList(r,e.options);return n({scrollTo:l}),i.style&&typeof i.style=="object"&&!Array.isArray(i.style)&&(i.style.height=e.height||"300px"),()=>o.h("div",{...i},[o.h("div",{...s.value},a.value.map(m=>o.h("div",{style:{overflow:"hidden",height:m.height}},t.default?t.default(m):"Please set content!")))])}}),Wt=o.defineComponent({name:"UseWindowFocus",setup(e,{slots:t}){const n=o.reactive({focused:U.useWindowFocus()});return()=>{if(t.default)return t.default(n)}}}),Nt=o.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(e,{slots:t}){const n=o.reactive(U.useWindowSize(e));return()=>{if(t.default)return t.default(n)}}});h.OnClickOutside=ge,h.OnLongPress=Se,h.UseActiveElement=be,h.UseBattery=Ce,h.UseBrowserLocation=Ee,h.UseClipboard=Pe,h.UseColorMode=We,h.UseDark=Ne,h.UseDeviceMotion=Be,h.UseDeviceOrientation=He,h.UseDevicePixelRatio=je,h.UseDevicesList=Fe,h.UseDocumentVisibility=Ke,h.UseDraggable=xe,h.UseElementBounding=Ge,h.UseElementSize=$e,h.UseElementVisibility=qe,h.UseEyeDropper=Ze,h.UseFullscreen=et,h.UseGeolocation=tt,h.UseIdle=nt,h.UseImage=it,h.UseMouse=ut,h.UseMouseInElement=ct,h.UseMousePressed=ft,h.UseNetwork=dt,h.UseNow=mt,h.UseObjectUrl=pt,h.UseOffsetPagination=vt,h.UseOnline=gt,h.UsePageLeave=ht,h.UsePointer=yt,h.UsePointerLock=wt,h.UsePreferredColorScheme=Ut,h.UsePreferredContrast=St,h.UsePreferredDark=bt,h.UsePreferredLanguages=Ct,h.UsePreferredReducedMotion=Et,h.UsePreferredReducedTransparency=Pt,h.UseScreenSafeArea=Dt,h.UseTimeAgo=Rt,h.UseTimestamp=zt,h.UseVirtualList=It,h.UseWindowFocus=Wt,h.UseWindowSize=Nt,h.VOnClickOutside=Z,h.VOnLongPress=te,h.vElementHover=Je,h.vElementSize=Xe,h.vElementVisibility=Qe,h.vInfiniteScroll=st,h.vIntersectionObserver=lt,h.vOnClickOutside=Z,h.vOnKeyStroke=ye,h.vOnLongPress=te,h.vResizeObserver=Ot,h.vScroll=Lt,h.vScrollLock=At})(this.VueUse=this.VueUse||{},VueUse,Vue,VueUse);
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { onClickOutside as onClickOutside$1, useActiveElement, useBattery, useBrowserLocation, useClipboard, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useStorage as useStorage$1, isClient as isClient$1, useDraggable, useElementBounding, useElementSize as useElementSize$1, useElementVisibility as useElementVisibility$1, useEyeDropper, useFullscreen, useGeolocation, useIdle, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark as usePreferredDark$1, usePreferredLanguages, usePreferredReducedMotion, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from '@vueuse/core';
1
+ import { onClickOutside as onClickOutside$1, useActiveElement, useBattery, useBrowserLocation, useClipboard, useDark, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDocumentVisibility, useStorage as useStorage$1, isClient as isClient$1, useDraggable, useElementBounding, useElementSize as useElementSize$1, useElementVisibility as useElementVisibility$1, useEyeDropper, useFullscreen, useGeolocation, useIdle, useMouse, useMouseInElement, useMousePressed, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, usePointer, usePointerLock, usePreferredColorScheme, usePreferredContrast, usePreferredDark as usePreferredDark$1, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, useTimeAgo, useTimestamp, useVirtualList, useWindowFocus, useWindowSize } from '@vueuse/core';
2
2
  import { defineComponent, ref, h, watch, computed, reactive, hasInjectionContext, getCurrentInstance, onMounted, watchEffect, shallowRef, nextTick, toRefs } from 'vue';
3
3
  import { isClient, toValue, noop, isObject, tryOnScopeDispose, isIOS, injectLocal, pxValue, pausableWatch, tryOnMounted, toRef, useToggle, notNullish, promiseTimeout, until, useDebounceFn, useThrottleFn, tryOnUnmounted } from '@vueuse/shared';
4
4
 
@@ -1307,20 +1307,32 @@ function useAsyncState(promise, initialState, options) {
1307
1307
  async function loadImage(options) {
1308
1308
  return new Promise((resolve, reject) => {
1309
1309
  const img = new Image();
1310
- const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;
1310
+ const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;
1311
1311
  img.src = src;
1312
- if (srcset)
1312
+ if (srcset != null)
1313
1313
  img.srcset = srcset;
1314
- if (sizes)
1314
+ if (sizes != null)
1315
1315
  img.sizes = sizes;
1316
- if (clazz)
1316
+ if (clazz != null)
1317
1317
  img.className = clazz;
1318
- if (loading)
1318
+ if (loading != null)
1319
1319
  img.loading = loading;
1320
- if (crossorigin)
1320
+ if (crossorigin != null)
1321
1321
  img.crossOrigin = crossorigin;
1322
- if (referrerPolicy)
1322
+ if (referrerPolicy != null)
1323
1323
  img.referrerPolicy = referrerPolicy;
1324
+ if (width != null)
1325
+ img.width = width;
1326
+ if (height != null)
1327
+ img.height = height;
1328
+ if (decoding != null)
1329
+ img.decoding = decoding;
1330
+ if (fetchPriority != null)
1331
+ img.fetchPriority = fetchPriority;
1332
+ if (ismap != null)
1333
+ img.isMap = ismap;
1334
+ if (usemap != null)
1335
+ img.useMap = usemap;
1324
1336
  img.onload = () => resolve(img);
1325
1337
  img.onerror = reject;
1326
1338
  });
@@ -1353,7 +1365,13 @@ const UseImage = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
1353
1365
  "class",
1354
1366
  "loading",
1355
1367
  "crossorigin",
1356
- "referrerPolicy"
1368
+ "referrerPolicy",
1369
+ "width",
1370
+ "height",
1371
+ "decoding",
1372
+ "fetchPriority",
1373
+ "ismap",
1374
+ "usemap"
1357
1375
  ],
1358
1376
  setup(props, { slots }) {
1359
1377
  const data = reactive(useImage(props));
@@ -1856,6 +1874,19 @@ const UsePreferredReducedMotion = /* @__PURE__ */ /* #__PURE__ */ defineComponen
1856
1874
  }
1857
1875
  });
1858
1876
 
1877
+ const UsePreferredReducedTransparency = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
1878
+ name: "UsePreferredReducedTransparency",
1879
+ setup(props, { slots }) {
1880
+ const data = reactive({
1881
+ transparency: usePreferredReducedTransparency()
1882
+ });
1883
+ return () => {
1884
+ if (slots.default)
1885
+ return slots.default(data);
1886
+ };
1887
+ }
1888
+ });
1889
+
1859
1890
  const vResizeObserver = {
1860
1891
  mounted(el, binding) {
1861
1892
  if (typeof binding.value === "function")
@@ -2222,4 +2253,4 @@ const UseWindowSize = /* @__PURE__ */ /* #__PURE__ */ defineComponent({
2222
2253
  }
2223
2254
  });
2224
2255
 
2225
- export { OnClickOutside, OnLongPress, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
2256
+ export { OnClickOutside, OnLongPress, UseActiveElement, UseBattery, UseBrowserLocation, UseClipboard, UseColorMode, UseDark, UseDeviceMotion, UseDeviceOrientation, UseDevicePixelRatio, UseDevicesList, UseDocumentVisibility, UseDraggable, UseElementBounding, UseElementSize, UseElementVisibility, UseEyeDropper, UseFullscreen, UseGeolocation, UseIdle, UseImage, UseMouse, UseMouseInElement, UseMousePressed, UseNetwork, UseNow, UseObjectUrl, UseOffsetPagination, UseOnline, UsePageLeave, UsePointer, UsePointerLock, UsePreferredColorScheme, UsePreferredContrast, UsePreferredDark, UsePreferredLanguages, UsePreferredReducedMotion, UsePreferredReducedTransparency, UseScreenSafeArea, UseTimeAgo, UseTimestamp, UseVirtualList, UseWindowFocus, UseWindowSize, vOnClickOutside as VOnClickOutside, vOnLongPress as VOnLongPress, vElementHover, vElementSize, vElementVisibility, vInfiniteScroll, vIntersectionObserver, vOnClickOutside, vOnKeyStroke, vOnLongPress, vResizeObserver, vScroll, vScrollLock };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@vueuse/components",
3
- "version": "12.1.0",
3
+ "type": "module",
4
+ "version": "12.2.0-beta.3",
4
5
  "description": "Renderless components for VueUse",
5
6
  "author": "Jacob Clevenger<https://github.com/wheatjs>",
6
7
  "license": "MIT",
@@ -30,10 +31,22 @@
30
31
  "module": "./index.mjs",
31
32
  "unpkg": "./index.iife.min.js",
32
33
  "jsdelivr": "./index.iife.min.js",
33
- "types": "./index.d.cts",
34
+ "types": "./index.d.ts",
35
+ "files": [
36
+ "*.cjs",
37
+ "*.d.cts",
38
+ "*.d.mts",
39
+ "*.d.ts",
40
+ "*.js",
41
+ "*.mjs",
42
+ "index.json"
43
+ ],
34
44
  "dependencies": {
35
- "@vueuse/core": "12.1.0",
36
- "@vueuse/shared": "12.1.0",
37
- "vue": "^3.5.13"
45
+ "vue": "^3.5.13",
46
+ "@vueuse/core": "12.2.0-beta.3",
47
+ "@vueuse/shared": "12.2.0-beta.3"
48
+ },
49
+ "scripts": {
50
+ "build": "rollup --config=rollup.config.ts --configPlugin=rollup-plugin-esbuild"
38
51
  }
39
52
  }