directix 1.4.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +852 -8
- package/dist/index.cjs +4998 -618
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1629 -17
- package/dist/index.iife.js +4889 -529
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +2 -2
- package/dist/index.mjs +4890 -530
- package/dist/index.mjs.map +1 -1
- package/package.json +65 -5
package/dist/index.d.ts
CHANGED
|
@@ -83,6 +83,18 @@ export declare interface ComposableThrottledFunction<T extends (...args: any[])
|
|
|
83
83
|
*/
|
|
84
84
|
export declare function configurePermission(config: PermissionConfig): void;
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Context menu item
|
|
88
|
+
*/
|
|
89
|
+
export declare interface ContextMenuItem {
|
|
90
|
+
label: string;
|
|
91
|
+
handler?: () => void;
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
divider?: boolean;
|
|
94
|
+
icon?: string;
|
|
95
|
+
class?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
86
98
|
/**
|
|
87
99
|
* Countdown complete callback
|
|
88
100
|
*/
|
|
@@ -110,6 +122,11 @@ export declare interface CountdownTime {
|
|
|
110
122
|
total: number;
|
|
111
123
|
}
|
|
112
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Easing type
|
|
127
|
+
*/
|
|
128
|
+
export declare type CounterEasing = 'linear' | 'easeOut' | 'easeInOut' | 'easeOutQuart' | 'easeOutExpo';
|
|
129
|
+
|
|
113
130
|
/**
|
|
114
131
|
* Create a capitalizing function with preset options
|
|
115
132
|
*
|
|
@@ -453,6 +470,11 @@ export declare const Directix: Plugin_2;
|
|
|
453
470
|
*/
|
|
454
471
|
export declare type DraggableAxis = 'x' | 'y' | 'both';
|
|
455
472
|
|
|
473
|
+
/**
|
|
474
|
+
* Export format type
|
|
475
|
+
*/
|
|
476
|
+
export declare type ExportFormat = 'csv' | 'json' | 'txt' | 'html';
|
|
477
|
+
|
|
456
478
|
/**
|
|
457
479
|
* Format number to money string
|
|
458
480
|
*/
|
|
@@ -614,6 +636,11 @@ export declare type ItemSizeFunction = (index: number) => number;
|
|
|
614
636
|
*/
|
|
615
637
|
export declare type LazyState = 'pending' | 'loading' | 'loaded' | 'error';
|
|
616
638
|
|
|
639
|
+
/**
|
|
640
|
+
* Lottie animation state
|
|
641
|
+
*/
|
|
642
|
+
export declare type LottieAnimationState = 'playing' | 'paused' | 'stopped';
|
|
643
|
+
|
|
617
644
|
/**
|
|
618
645
|
* Transform text to lowercase
|
|
619
646
|
*/
|
|
@@ -624,6 +651,24 @@ export declare function lowercaseText(text: string, firstOnly?: boolean): string
|
|
|
624
651
|
*/
|
|
625
652
|
export declare type MutationHandler = (mutations: MutationRecord[], observer: MutationObserver) => void;
|
|
626
653
|
|
|
654
|
+
/**
|
|
655
|
+
* Pan gesture event data
|
|
656
|
+
*/
|
|
657
|
+
export declare interface PanEvent {
|
|
658
|
+
direction: 'left' | 'right' | 'up' | 'down';
|
|
659
|
+
deltaX: number;
|
|
660
|
+
deltaY: number;
|
|
661
|
+
distance: number;
|
|
662
|
+
x: number;
|
|
663
|
+
y: number;
|
|
664
|
+
startX: number;
|
|
665
|
+
startY: number;
|
|
666
|
+
isPanning: boolean;
|
|
667
|
+
isFirst: boolean;
|
|
668
|
+
isFinal: boolean;
|
|
669
|
+
velocity: number;
|
|
670
|
+
}
|
|
671
|
+
|
|
627
672
|
/**
|
|
628
673
|
* Parse formatted money string to number
|
|
629
674
|
*/
|
|
@@ -669,6 +714,20 @@ declare interface PermissionConfig {
|
|
|
669
714
|
*/
|
|
670
715
|
export declare type PermissionMode = 'some' | 'every';
|
|
671
716
|
|
|
717
|
+
/**
|
|
718
|
+
* Pinch gesture event data
|
|
719
|
+
*/
|
|
720
|
+
export declare interface PinchEvent {
|
|
721
|
+
scale: number;
|
|
722
|
+
distance: number;
|
|
723
|
+
initialDistance: number;
|
|
724
|
+
centerX: number;
|
|
725
|
+
centerY: number;
|
|
726
|
+
isPinching: boolean;
|
|
727
|
+
isFirst: boolean;
|
|
728
|
+
isFinal: boolean;
|
|
729
|
+
}
|
|
730
|
+
|
|
672
731
|
/**
|
|
673
732
|
* Position type
|
|
674
733
|
*/
|
|
@@ -734,6 +793,20 @@ export declare interface ResizeInfo {
|
|
|
734
793
|
contentRect: DOMRectReadOnly;
|
|
735
794
|
}
|
|
736
795
|
|
|
796
|
+
/**
|
|
797
|
+
* Rotate gesture event data
|
|
798
|
+
*/
|
|
799
|
+
export declare interface RotateGestureEvent {
|
|
800
|
+
angle: number;
|
|
801
|
+
radians: number;
|
|
802
|
+
rotation: number;
|
|
803
|
+
centerX: number;
|
|
804
|
+
centerY: number;
|
|
805
|
+
isRotating: boolean;
|
|
806
|
+
isFirst: boolean;
|
|
807
|
+
isFinal: boolean;
|
|
808
|
+
}
|
|
809
|
+
|
|
737
810
|
/**
|
|
738
811
|
* Scroll direction
|
|
739
812
|
*/
|
|
@@ -771,6 +844,11 @@ export declare function set(obj: Record<string, any>, path: string, value: any):
|
|
|
771
844
|
*/
|
|
772
845
|
export declare function setVueVersion(version: VueVersion): void;
|
|
773
846
|
|
|
847
|
+
/**
|
|
848
|
+
* Skeleton animation type
|
|
849
|
+
*/
|
|
850
|
+
export declare type SkeletonAnimation = 'wave' | 'pulse' | 'none';
|
|
851
|
+
|
|
774
852
|
/**
|
|
775
853
|
* Check if Clipboard API is supported
|
|
776
854
|
*/
|
|
@@ -902,6 +980,68 @@ export declare function truncateText(text: string, maxLength: number, ellipsis?:
|
|
|
902
980
|
*/
|
|
903
981
|
export declare function uppercaseText(text: string, firstOnly?: boolean): string;
|
|
904
982
|
|
|
983
|
+
/**
|
|
984
|
+
* Composable for blur overlay
|
|
985
|
+
*
|
|
986
|
+
* @param options - Configuration options
|
|
987
|
+
* @returns Blur utilities
|
|
988
|
+
*
|
|
989
|
+
* @example
|
|
990
|
+
* ```vue
|
|
991
|
+
* <script setup>
|
|
992
|
+
* import { ref } from 'vue'
|
|
993
|
+
* import { useBlur } from 'directix'
|
|
994
|
+
*
|
|
995
|
+
* const { isVisible, show, hide, toggle } = useBlur({ radius: 15 })
|
|
996
|
+
* </script>
|
|
997
|
+
*
|
|
998
|
+
* <template>
|
|
999
|
+
* <button @click="toggle">Toggle Blur</button>
|
|
1000
|
+
* </template>
|
|
1001
|
+
* ```
|
|
1002
|
+
*/
|
|
1003
|
+
export declare function useBlur(options?: UseBlurOptions): UseBlurReturn;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Options for useBlur composable
|
|
1007
|
+
*/
|
|
1008
|
+
export declare interface UseBlurOptions {
|
|
1009
|
+
/** Blur radius in pixels */
|
|
1010
|
+
radius?: number | Ref<number>;
|
|
1011
|
+
/** Whether blur is visible */
|
|
1012
|
+
visible?: boolean | Ref<boolean>;
|
|
1013
|
+
/** Transition duration */
|
|
1014
|
+
duration?: number;
|
|
1015
|
+
/** Overlay color */
|
|
1016
|
+
overlayColor?: string;
|
|
1017
|
+
/** Z-index */
|
|
1018
|
+
zIndex?: number;
|
|
1019
|
+
/** Lock scroll */
|
|
1020
|
+
lockScroll?: boolean;
|
|
1021
|
+
/** Custom class */
|
|
1022
|
+
class?: string;
|
|
1023
|
+
/** Callback on show */
|
|
1024
|
+
onShow?: () => void;
|
|
1025
|
+
/** Callback on hide */
|
|
1026
|
+
onHide?: () => void;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Return type for useBlur composable
|
|
1031
|
+
*/
|
|
1032
|
+
export declare interface UseBlurReturn {
|
|
1033
|
+
/** Whether blur is visible */
|
|
1034
|
+
isVisible: Ref<boolean>;
|
|
1035
|
+
/** Show blur */
|
|
1036
|
+
show: () => void;
|
|
1037
|
+
/** Hide blur */
|
|
1038
|
+
hide: () => void;
|
|
1039
|
+
/** Toggle blur */
|
|
1040
|
+
toggle: () => void;
|
|
1041
|
+
/** Bind blur to an element */
|
|
1042
|
+
bind: (element: HTMLElement) => () => void;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
905
1045
|
/**
|
|
906
1046
|
* Composable for capitalizing text
|
|
907
1047
|
*
|
|
@@ -1105,6 +1245,128 @@ export declare interface UseClickOutsideReturn {
|
|
|
1105
1245
|
bind: (element: HTMLElement) => () => void;
|
|
1106
1246
|
}
|
|
1107
1247
|
|
|
1248
|
+
/**
|
|
1249
|
+
* Composable for creating click wave effects (simplified ripple)
|
|
1250
|
+
*
|
|
1251
|
+
* @param options - Configuration options
|
|
1252
|
+
* @returns Wave utilities
|
|
1253
|
+
*
|
|
1254
|
+
* @example
|
|
1255
|
+
* ```vue
|
|
1256
|
+
* <script setup>
|
|
1257
|
+
* import { ref } from 'vue'
|
|
1258
|
+
* import { useClickWave } from 'directix'
|
|
1259
|
+
*
|
|
1260
|
+
* const buttonRef = ref(null)
|
|
1261
|
+
* const { bind } = useClickWave({ color: 'rgba(255, 255, 255, 0.3)' })
|
|
1262
|
+
*
|
|
1263
|
+
* onMounted(() => bind(buttonRef.value))
|
|
1264
|
+
* </script>
|
|
1265
|
+
*
|
|
1266
|
+
* <template>
|
|
1267
|
+
* <button ref="buttonRef">Click for wave</button>
|
|
1268
|
+
* </template>
|
|
1269
|
+
* ```
|
|
1270
|
+
*/
|
|
1271
|
+
export declare function useClickWave(options?: UseClickWaveOptions): UseClickWaveReturn;
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
* Options for useClickWave composable
|
|
1275
|
+
*/
|
|
1276
|
+
export declare interface UseClickWaveOptions {
|
|
1277
|
+
/**
|
|
1278
|
+
* Wave color
|
|
1279
|
+
* @default 'currentColor'
|
|
1280
|
+
*/
|
|
1281
|
+
color?: string | Ref<string>;
|
|
1282
|
+
/**
|
|
1283
|
+
* Wave duration in milliseconds
|
|
1284
|
+
* @default 500
|
|
1285
|
+
*/
|
|
1286
|
+
duration?: number | Ref<number>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Whether to disable wave
|
|
1289
|
+
* @default false
|
|
1290
|
+
*/
|
|
1291
|
+
disabled?: boolean | Ref<boolean>;
|
|
1292
|
+
/**
|
|
1293
|
+
* Wave size ratio
|
|
1294
|
+
* @default 1.5
|
|
1295
|
+
*/
|
|
1296
|
+
sizeRatio?: number;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Return type for useClickWave composable
|
|
1301
|
+
*/
|
|
1302
|
+
export declare interface UseClickWaveReturn {
|
|
1303
|
+
/** Bind wave effect to an element */
|
|
1304
|
+
bind: (element: HTMLElement) => () => void;
|
|
1305
|
+
/** Trigger wave effect manually */
|
|
1306
|
+
trigger: (event?: {
|
|
1307
|
+
x?: number;
|
|
1308
|
+
y?: number;
|
|
1309
|
+
}) => void;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Composable for creating context menus
|
|
1314
|
+
*
|
|
1315
|
+
* @param options - Configuration options
|
|
1316
|
+
* @returns Context menu utilities
|
|
1317
|
+
*
|
|
1318
|
+
* @example
|
|
1319
|
+
* ```vue
|
|
1320
|
+
* <script setup>
|
|
1321
|
+
* import { ref } from 'vue'
|
|
1322
|
+
* import { useContextMenu } from 'directix'
|
|
1323
|
+
*
|
|
1324
|
+
* const containerRef = ref(null)
|
|
1325
|
+
* const items = [
|
|
1326
|
+
* { label: 'Copy', handler: () => console.log('Copy') },
|
|
1327
|
+
* { label: 'Paste', handler: () => console.log('Paste') },
|
|
1328
|
+
* { divider: true, label: '' },
|
|
1329
|
+
* { label: 'Delete', handler: () => console.log('Delete') }
|
|
1330
|
+
* ]
|
|
1331
|
+
*
|
|
1332
|
+
* const { bind } = useContextMenu({ items })
|
|
1333
|
+
*
|
|
1334
|
+
* onMounted(() => bind(containerRef.value))
|
|
1335
|
+
* </script>
|
|
1336
|
+
*
|
|
1337
|
+
* <template>
|
|
1338
|
+
* <div ref="containerRef">Right click here</div>
|
|
1339
|
+
* </template>
|
|
1340
|
+
* ```
|
|
1341
|
+
*/
|
|
1342
|
+
export declare function useContextMenu(options: UseContextMenuOptions): UseContextMenuReturn;
|
|
1343
|
+
|
|
1344
|
+
/**
|
|
1345
|
+
* Options for useContextMenu composable
|
|
1346
|
+
*/
|
|
1347
|
+
export declare interface UseContextMenuOptions {
|
|
1348
|
+
/** Menu items */
|
|
1349
|
+
items: ContextMenuItem[] | Ref<ContextMenuItem[]>;
|
|
1350
|
+
/** Custom class for menu container */
|
|
1351
|
+
class?: string;
|
|
1352
|
+
/** Menu width */
|
|
1353
|
+
width?: number | string;
|
|
1354
|
+
/** Whether to disable */
|
|
1355
|
+
disabled?: boolean | Ref<boolean>;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Return type for useContextMenu composable
|
|
1360
|
+
*/
|
|
1361
|
+
export declare interface UseContextMenuReturn {
|
|
1362
|
+
/** Bind context menu to an element */
|
|
1363
|
+
bind: (element: HTMLElement) => () => void;
|
|
1364
|
+
/** Show menu at position */
|
|
1365
|
+
show: (x: number, y: number) => void;
|
|
1366
|
+
/** Hide menu */
|
|
1367
|
+
hide: () => void;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1108
1370
|
/**
|
|
1109
1371
|
* Composable for copying text to clipboard
|
|
1110
1372
|
*
|
|
@@ -1308,6 +1570,85 @@ export declare interface UseCountdownReturn {
|
|
|
1308
1570
|
reset: () => void;
|
|
1309
1571
|
}
|
|
1310
1572
|
|
|
1573
|
+
/**
|
|
1574
|
+
* Composable for animated number counter
|
|
1575
|
+
*
|
|
1576
|
+
* @param options - Configuration options
|
|
1577
|
+
* @returns Counter utilities
|
|
1578
|
+
*
|
|
1579
|
+
* @example
|
|
1580
|
+
* ```vue
|
|
1581
|
+
* <script setup>
|
|
1582
|
+
* import { ref } from 'vue'
|
|
1583
|
+
* import { useCounter } from 'directix'
|
|
1584
|
+
*
|
|
1585
|
+
* const containerRef = ref(null)
|
|
1586
|
+
* const { currentValue, formattedValue, setValue, bind } = useCounter({
|
|
1587
|
+
* value: 1000,
|
|
1588
|
+
* duration: 2000,
|
|
1589
|
+
* useGrouping: true
|
|
1590
|
+
* })
|
|
1591
|
+
*
|
|
1592
|
+
* onMounted(() => bind(containerRef.value))
|
|
1593
|
+
* </script>
|
|
1594
|
+
*
|
|
1595
|
+
* <template>
|
|
1596
|
+
* <span ref="containerRef">0</span>
|
|
1597
|
+
* </template>
|
|
1598
|
+
* ```
|
|
1599
|
+
*/
|
|
1600
|
+
export declare function useCounter(options: UseCounterOptions): UseCounterReturn;
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* Options for useCounter composable
|
|
1604
|
+
*/
|
|
1605
|
+
export declare interface UseCounterOptions {
|
|
1606
|
+
/** Target value */
|
|
1607
|
+
value: number | Ref<number>;
|
|
1608
|
+
/** Starting value */
|
|
1609
|
+
startValue?: number;
|
|
1610
|
+
/** Animation duration */
|
|
1611
|
+
duration?: number;
|
|
1612
|
+
/** Decimal places */
|
|
1613
|
+
decimals?: number;
|
|
1614
|
+
/** Use grouping separator */
|
|
1615
|
+
useGrouping?: boolean;
|
|
1616
|
+
/** Locale */
|
|
1617
|
+
locale?: string;
|
|
1618
|
+
/** Custom formatter */
|
|
1619
|
+
formatter?: (value: number) => string;
|
|
1620
|
+
/** Easing function */
|
|
1621
|
+
easing?: CounterEasing;
|
|
1622
|
+
/** Custom easing function */
|
|
1623
|
+
customEasing?: (t: number) => number;
|
|
1624
|
+
/** Callback on update */
|
|
1625
|
+
onUpdate?: (value: number, formattedValue: string) => void;
|
|
1626
|
+
/** Callback on complete */
|
|
1627
|
+
onComplete?: (value: number) => void;
|
|
1628
|
+
/** Callback on start */
|
|
1629
|
+
onStart?: () => void;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
* Return type for useCounter composable
|
|
1634
|
+
*/
|
|
1635
|
+
export declare interface UseCounterReturn {
|
|
1636
|
+
/** Current value */
|
|
1637
|
+
currentValue: Ref<number>;
|
|
1638
|
+
/** Formatted value */
|
|
1639
|
+
formattedValue: Ref<string>;
|
|
1640
|
+
/** Whether animating */
|
|
1641
|
+
isAnimating: Ref<boolean>;
|
|
1642
|
+
/** Set target value */
|
|
1643
|
+
setValue: (value: number) => void;
|
|
1644
|
+
/** Start animation */
|
|
1645
|
+
start: () => void;
|
|
1646
|
+
/** Stop animation */
|
|
1647
|
+
stop: () => void;
|
|
1648
|
+
/** Bind counter to an element */
|
|
1649
|
+
bind: (element: HTMLElement) => () => void;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1311
1652
|
/**
|
|
1312
1653
|
* Composable for debouncing function calls
|
|
1313
1654
|
*
|
|
@@ -1555,6 +1896,195 @@ export declare interface UseEllipsisReturn {
|
|
|
1555
1896
|
wouldTruncate: (width: number) => boolean;
|
|
1556
1897
|
}
|
|
1557
1898
|
|
|
1899
|
+
/**
|
|
1900
|
+
* Composable for emoji filtering
|
|
1901
|
+
*
|
|
1902
|
+
* @param options - Configuration options
|
|
1903
|
+
* @returns Emoji utilities
|
|
1904
|
+
*
|
|
1905
|
+
* @example
|
|
1906
|
+
* ```vue
|
|
1907
|
+
* <script setup>
|
|
1908
|
+
* import { ref } from 'vue'
|
|
1909
|
+
* import { useEmoji } from 'directix'
|
|
1910
|
+
*
|
|
1911
|
+
* const inputRef = ref(null)
|
|
1912
|
+
* const { bind, stripEmojis } = useEmoji({ strip: true })
|
|
1913
|
+
*
|
|
1914
|
+
* onMounted(() => bind(inputRef.value))
|
|
1915
|
+
* </script>
|
|
1916
|
+
*
|
|
1917
|
+
* <template>
|
|
1918
|
+
* <input ref="inputRef" type="text" />
|
|
1919
|
+
* </template>
|
|
1920
|
+
* ```
|
|
1921
|
+
*/
|
|
1922
|
+
export declare function useEmoji(options?: UseEmojiOptions): UseEmojiReturn;
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* Options for useEmoji composable
|
|
1926
|
+
*/
|
|
1927
|
+
export declare interface UseEmojiOptions {
|
|
1928
|
+
/** Whether to strip emoji */
|
|
1929
|
+
strip?: boolean | Ref<boolean>;
|
|
1930
|
+
/** Allowed emojis */
|
|
1931
|
+
allowList?: string[];
|
|
1932
|
+
/** Blocked emojis */
|
|
1933
|
+
blockList?: string[];
|
|
1934
|
+
/** Replacement character */
|
|
1935
|
+
replacement?: string;
|
|
1936
|
+
/** Callback when emoji is detected */
|
|
1937
|
+
onEmoji?: (emoji: string, position: number) => void;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Return type for useEmoji composable
|
|
1942
|
+
*/
|
|
1943
|
+
export declare interface UseEmojiReturn {
|
|
1944
|
+
/** Current input value */
|
|
1945
|
+
value: Ref<string>;
|
|
1946
|
+
/** Strip emojis from text */
|
|
1947
|
+
stripEmojis: (text: string) => string;
|
|
1948
|
+
/** Check if text contains emoji */
|
|
1949
|
+
hasEmoji: (text: string) => boolean;
|
|
1950
|
+
/** Bind emoji filter to an input element */
|
|
1951
|
+
bind: (element: HTMLInputElement | HTMLTextAreaElement) => () => void;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
/**
|
|
1955
|
+
* Composable for exporting data
|
|
1956
|
+
*
|
|
1957
|
+
* @param options - Configuration options
|
|
1958
|
+
* @returns Export utilities
|
|
1959
|
+
*
|
|
1960
|
+
* @example
|
|
1961
|
+
* ```vue
|
|
1962
|
+
* <script setup>
|
|
1963
|
+
* import { useExport } from 'directix'
|
|
1964
|
+
*
|
|
1965
|
+
* const data = [
|
|
1966
|
+
* { name: 'John', email: 'john@example.com' },
|
|
1967
|
+
* { name: 'Jane', email: 'jane@example.com' }
|
|
1968
|
+
* ]
|
|
1969
|
+
*
|
|
1970
|
+
* const { exportCSV, exportJSON } = useExport({ data, filename: 'users' })
|
|
1971
|
+
* </script>
|
|
1972
|
+
*
|
|
1973
|
+
* <template>
|
|
1974
|
+
* <button @click="exportCSV">Export CSV</button>
|
|
1975
|
+
* <button @click="exportJSON">Export JSON</button>
|
|
1976
|
+
* </template>
|
|
1977
|
+
* ```
|
|
1978
|
+
*/
|
|
1979
|
+
export declare function useExport(options: UseExportOptions): UseExportReturn;
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* Options for useExport composable
|
|
1983
|
+
*/
|
|
1984
|
+
export declare interface UseExportOptions {
|
|
1985
|
+
/** Data to export */
|
|
1986
|
+
data: any[] | object | string | Ref<any[] | object | string>;
|
|
1987
|
+
/** Export format */
|
|
1988
|
+
format?: ExportFormat | Ref<ExportFormat>;
|
|
1989
|
+
/** Filename (without extension) */
|
|
1990
|
+
filename?: string | Ref<string>;
|
|
1991
|
+
/** Whether to include headers (for CSV) */
|
|
1992
|
+
includeHeaders?: boolean;
|
|
1993
|
+
/** Custom delimiter for CSV */
|
|
1994
|
+
delimiter?: string;
|
|
1995
|
+
/** Columns to export */
|
|
1996
|
+
columns?: string[];
|
|
1997
|
+
/** Custom headers mapping */
|
|
1998
|
+
headers?: Record<string, string>;
|
|
1999
|
+
/** Callback before export */
|
|
2000
|
+
onBeforeExport?: () => boolean | void;
|
|
2001
|
+
/** Callback after export */
|
|
2002
|
+
onAfterExport?: () => void;
|
|
2003
|
+
/** Callback on error */
|
|
2004
|
+
onError?: (error: Error) => void;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* Return type for useExport composable
|
|
2009
|
+
*/
|
|
2010
|
+
export declare interface UseExportReturn {
|
|
2011
|
+
/** Export data */
|
|
2012
|
+
exportData: (format?: ExportFormat) => void;
|
|
2013
|
+
/** Export as CSV */
|
|
2014
|
+
exportCSV: () => void;
|
|
2015
|
+
/** Export as JSON */
|
|
2016
|
+
exportJSON: () => void;
|
|
2017
|
+
/** Export as HTML */
|
|
2018
|
+
exportHTML: () => void;
|
|
2019
|
+
/** Export as text */
|
|
2020
|
+
exportText: () => void;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* Composable for fade transitions
|
|
2025
|
+
*
|
|
2026
|
+
* @param options - Configuration options
|
|
2027
|
+
* @returns Fade utilities
|
|
2028
|
+
*
|
|
2029
|
+
* @example
|
|
2030
|
+
* ```vue
|
|
2031
|
+
* <script setup>
|
|
2032
|
+
* import { ref } from 'vue'
|
|
2033
|
+
* import { useFade } from 'directix'
|
|
2034
|
+
*
|
|
2035
|
+
* const containerRef = ref(null)
|
|
2036
|
+
* const { isVisible, fadeIn, fadeOut, bind } = useFade({ duration: 500 })
|
|
2037
|
+
*
|
|
2038
|
+
* onMounted(() => bind(containerRef.value))
|
|
2039
|
+
* </script>
|
|
2040
|
+
*
|
|
2041
|
+
* <template>
|
|
2042
|
+
* <div ref="containerRef">
|
|
2043
|
+
* <button @click="toggle">Toggle</button>
|
|
2044
|
+
* </div>
|
|
2045
|
+
* </template>
|
|
2046
|
+
* ```
|
|
2047
|
+
*/
|
|
2048
|
+
export declare function useFade(options?: UseFadeOptions): UseFadeReturn;
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* Options for useFade composable
|
|
2052
|
+
*/
|
|
2053
|
+
export declare interface UseFadeOptions {
|
|
2054
|
+
/** Whether element is visible */
|
|
2055
|
+
visible?: boolean | Ref<boolean>;
|
|
2056
|
+
/** Animation duration */
|
|
2057
|
+
duration?: number;
|
|
2058
|
+
/** Animation delay */
|
|
2059
|
+
delay?: number;
|
|
2060
|
+
/** Easing function */
|
|
2061
|
+
easing?: string;
|
|
2062
|
+
/** Minimum opacity */
|
|
2063
|
+
minOpacity?: number;
|
|
2064
|
+
/** Maximum opacity */
|
|
2065
|
+
maxOpacity?: number;
|
|
2066
|
+
/** Callback on start */
|
|
2067
|
+
onStart?: (direction: 'in' | 'out') => void;
|
|
2068
|
+
/** Callback on complete */
|
|
2069
|
+
onComplete?: (direction: 'in' | 'out') => void;
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
/**
|
|
2073
|
+
* Return type for useFade composable
|
|
2074
|
+
*/
|
|
2075
|
+
export declare interface UseFadeReturn {
|
|
2076
|
+
/** Whether element is visible */
|
|
2077
|
+
isVisible: Ref<boolean>;
|
|
2078
|
+
/** Fade in */
|
|
2079
|
+
fadeIn: () => void;
|
|
2080
|
+
/** Fade out */
|
|
2081
|
+
fadeOut: () => void;
|
|
2082
|
+
/** Toggle fade */
|
|
2083
|
+
toggle: () => void;
|
|
2084
|
+
/** Bind fade to an element */
|
|
2085
|
+
bind: (element: HTMLElement) => () => void;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
1558
2088
|
/**
|
|
1559
2089
|
* Composable for managing element focus
|
|
1560
2090
|
*
|
|
@@ -1617,17 +2147,137 @@ export declare interface UseFocusReturn {
|
|
|
1617
2147
|
}
|
|
1618
2148
|
|
|
1619
2149
|
/**
|
|
1620
|
-
* Composable for
|
|
2150
|
+
* Composable for fullscreen functionality
|
|
1621
2151
|
*
|
|
1622
2152
|
* @param options - Configuration options
|
|
1623
|
-
* @returns
|
|
2153
|
+
* @returns Fullscreen utilities
|
|
1624
2154
|
*
|
|
1625
2155
|
* @example
|
|
1626
2156
|
* ```vue
|
|
1627
2157
|
* <script setup>
|
|
1628
|
-
* import {
|
|
2158
|
+
* import { ref } from 'vue'
|
|
2159
|
+
* import { useFullscreen } from 'directix'
|
|
1629
2160
|
*
|
|
1630
|
-
* const
|
|
2161
|
+
* const containerRef = ref(null)
|
|
2162
|
+
* const { isFullscreen, toggle, bind } = useFullscreen({
|
|
2163
|
+
* onEnter: () => console.log('Entered fullscreen'),
|
|
2164
|
+
* onExit: () => console.log('Exited fullscreen')
|
|
2165
|
+
* })
|
|
2166
|
+
*
|
|
2167
|
+
* onMounted(() => bind(containerRef.value))
|
|
2168
|
+
* </script>
|
|
2169
|
+
*
|
|
2170
|
+
* <template>
|
|
2171
|
+
* <div ref="containerRef">
|
|
2172
|
+
* <button @click="toggle">
|
|
2173
|
+
* {{ isFullscreen ? 'Exit' : 'Enter' }} Fullscreen
|
|
2174
|
+
* </button>
|
|
2175
|
+
* </div>
|
|
2176
|
+
* </template>
|
|
2177
|
+
* ```
|
|
2178
|
+
*/
|
|
2179
|
+
export declare function useFullscreen(options?: UseFullscreenOptions): UseFullscreenReturn;
|
|
2180
|
+
|
|
2181
|
+
/**
|
|
2182
|
+
* Options for useFullscreen composable
|
|
2183
|
+
*/
|
|
2184
|
+
export declare interface UseFullscreenOptions {
|
|
2185
|
+
/** Custom class when in fullscreen mode */
|
|
2186
|
+
fullscreenClass?: string;
|
|
2187
|
+
/** Callback when entering fullscreen */
|
|
2188
|
+
onEnter?: () => void;
|
|
2189
|
+
/** Callback when exiting fullscreen */
|
|
2190
|
+
onExit?: () => void;
|
|
2191
|
+
/** Callback when fullscreen state changes */
|
|
2192
|
+
onChange?: (isFullscreen: boolean) => void;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
/**
|
|
2196
|
+
* Return type for useFullscreen composable
|
|
2197
|
+
*/
|
|
2198
|
+
export declare interface UseFullscreenReturn {
|
|
2199
|
+
/** Whether currently in fullscreen mode */
|
|
2200
|
+
isFullscreen: Ref<boolean>;
|
|
2201
|
+
/** Enter fullscreen mode */
|
|
2202
|
+
enter: () => Promise<void>;
|
|
2203
|
+
/** Exit fullscreen mode */
|
|
2204
|
+
exit: () => Promise<void>;
|
|
2205
|
+
/** Toggle fullscreen mode */
|
|
2206
|
+
toggle: () => Promise<void>;
|
|
2207
|
+
/** Bind fullscreen to an element */
|
|
2208
|
+
bind: (element: HTMLElement) => () => void;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
/**
|
|
2212
|
+
* Composable for highlighting keywords
|
|
2213
|
+
*
|
|
2214
|
+
* @param options - Configuration options
|
|
2215
|
+
* @returns Highlight utilities
|
|
2216
|
+
*
|
|
2217
|
+
* @example
|
|
2218
|
+
* ```vue
|
|
2219
|
+
* <script setup>
|
|
2220
|
+
* import { ref } from 'vue'
|
|
2221
|
+
* import { useHighlight } from 'directix'
|
|
2222
|
+
*
|
|
2223
|
+
* const containerRef = ref(null)
|
|
2224
|
+
* const { count, bind } = useHighlight({
|
|
2225
|
+
* keywords: ['Vue', 'React'],
|
|
2226
|
+
* className: 'my-highlight'
|
|
2227
|
+
* })
|
|
2228
|
+
*
|
|
2229
|
+
* onMounted(() => bind(containerRef.value))
|
|
2230
|
+
* </script>
|
|
2231
|
+
*
|
|
2232
|
+
* <template>
|
|
2233
|
+
* <p ref="containerRef">Vue and React are popular frameworks.</p>
|
|
2234
|
+
* </template>
|
|
2235
|
+
* ```
|
|
2236
|
+
*/
|
|
2237
|
+
export declare function useHighlight(options: UseHighlightOptions): UseHighlightReturn;
|
|
2238
|
+
|
|
2239
|
+
/**
|
|
2240
|
+
* Options for useHighlight composable
|
|
2241
|
+
*/
|
|
2242
|
+
export declare interface UseHighlightOptions {
|
|
2243
|
+
/** Keywords to highlight */
|
|
2244
|
+
keywords: string | string[] | Ref<string | string[]>;
|
|
2245
|
+
/** Highlight class name */
|
|
2246
|
+
className?: string;
|
|
2247
|
+
/** Inline style */
|
|
2248
|
+
style?: string;
|
|
2249
|
+
/** Case sensitive */
|
|
2250
|
+
caseSensitive?: boolean;
|
|
2251
|
+
/** Whole word only */
|
|
2252
|
+
wholeWord?: boolean;
|
|
2253
|
+
/** Tag name for highlight */
|
|
2254
|
+
tag?: string;
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
/**
|
|
2258
|
+
* Return type for useHighlight composable
|
|
2259
|
+
*/
|
|
2260
|
+
export declare interface UseHighlightReturn {
|
|
2261
|
+
/** Highlight count */
|
|
2262
|
+
count: Ref<number>;
|
|
2263
|
+
/** Update keywords */
|
|
2264
|
+
updateKeywords: (keywords: string | string[]) => void;
|
|
2265
|
+
/** Bind highlight to an element */
|
|
2266
|
+
bind: (element: HTMLElement) => () => void;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
/**
|
|
2270
|
+
* Composable for handling keyboard shortcuts
|
|
2271
|
+
*
|
|
2272
|
+
* @param options - Configuration options
|
|
2273
|
+
* @returns Hotkey utilities
|
|
2274
|
+
*
|
|
2275
|
+
* @example
|
|
2276
|
+
* ```vue
|
|
2277
|
+
* <script setup>
|
|
2278
|
+
* import { useHotkey } from 'directix'
|
|
2279
|
+
*
|
|
2280
|
+
* const { enable, disable, add, remove } = useHotkey({
|
|
1631
2281
|
* hotkeys: [
|
|
1632
2282
|
* { key: 'ctrl+s', handler: (e) => save() },
|
|
1633
2283
|
* { key: 'ctrl+z', handler: (e) => undo() },
|
|
@@ -2309,6 +2959,88 @@ export declare interface UseLongPressReturn {
|
|
|
2309
2959
|
bind: (element: HTMLElement) => () => void;
|
|
2310
2960
|
}
|
|
2311
2961
|
|
|
2962
|
+
/**
|
|
2963
|
+
* Composable for Lottie animations
|
|
2964
|
+
*
|
|
2965
|
+
* @param options - Configuration options
|
|
2966
|
+
* @returns Lottie utilities
|
|
2967
|
+
*
|
|
2968
|
+
* @example
|
|
2969
|
+
* ```vue
|
|
2970
|
+
* <script setup>
|
|
2971
|
+
* import { ref } from 'vue'
|
|
2972
|
+
* import { useLottie } from 'directix'
|
|
2973
|
+
* import animationData from './animation.json'
|
|
2974
|
+
*
|
|
2975
|
+
* const containerRef = ref(null)
|
|
2976
|
+
* const { play, pause, bind } = useLottie({
|
|
2977
|
+
* animationData,
|
|
2978
|
+
* autoplay: true,
|
|
2979
|
+
* loop: true
|
|
2980
|
+
* })
|
|
2981
|
+
*
|
|
2982
|
+
* onMounted(() => bind(containerRef.value))
|
|
2983
|
+
* </script>
|
|
2984
|
+
*
|
|
2985
|
+
* <template>
|
|
2986
|
+
* <div ref="containerRef"></div>
|
|
2987
|
+
* <button @click="play">Play</button>
|
|
2988
|
+
* <button @click="pause">Pause</button>
|
|
2989
|
+
* </template>
|
|
2990
|
+
* ```
|
|
2991
|
+
*/
|
|
2992
|
+
export declare function useLottie(options: UseLottieOptions): UseLottieReturn;
|
|
2993
|
+
|
|
2994
|
+
/**
|
|
2995
|
+
* Options for useLottie composable
|
|
2996
|
+
*/
|
|
2997
|
+
export declare interface UseLottieOptions {
|
|
2998
|
+
/** Animation data or URL */
|
|
2999
|
+
animationData: object | string | Ref<object | string>;
|
|
3000
|
+
/** Autoplay */
|
|
3001
|
+
autoplay?: boolean;
|
|
3002
|
+
/** Loop */
|
|
3003
|
+
loop?: boolean;
|
|
3004
|
+
/** Speed */
|
|
3005
|
+
speed?: number | Ref<number>;
|
|
3006
|
+
/** Direction */
|
|
3007
|
+
direction?: 1 | -1;
|
|
3008
|
+
/** Renderer */
|
|
3009
|
+
renderer?: 'svg' | 'canvas' | 'html';
|
|
3010
|
+
/** Callback on ready */
|
|
3011
|
+
onReady?: (animation: any) => void;
|
|
3012
|
+
/** Callback on complete */
|
|
3013
|
+
onComplete?: () => void;
|
|
3014
|
+
/** Callback on loop */
|
|
3015
|
+
onLoopComplete?: () => void;
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
/**
|
|
3019
|
+
* Return type for useLottie composable
|
|
3020
|
+
*/
|
|
3021
|
+
export declare interface UseLottieReturn {
|
|
3022
|
+
/** Animation state */
|
|
3023
|
+
state: Ref<LottieAnimationState>;
|
|
3024
|
+
/** Animation instance */
|
|
3025
|
+
animation: Ref<any>;
|
|
3026
|
+
/** Play animation */
|
|
3027
|
+
play: () => void;
|
|
3028
|
+
/** Pause animation */
|
|
3029
|
+
pause: () => void;
|
|
3030
|
+
/** Stop animation */
|
|
3031
|
+
stop: () => void;
|
|
3032
|
+
/** Set speed */
|
|
3033
|
+
setSpeed: (speed: number) => void;
|
|
3034
|
+
/** Set direction */
|
|
3035
|
+
setDirection: (direction: 1 | -1) => void;
|
|
3036
|
+
/** Go to frame */
|
|
3037
|
+
goToAndPlay: (frame: number, isFrame?: boolean) => void;
|
|
3038
|
+
/** Go to frame and stop */
|
|
3039
|
+
goToAndStop: (frame: number, isFrame?: boolean) => void;
|
|
3040
|
+
/** Bind lottie to an element */
|
|
3041
|
+
bind: (element: HTMLElement) => () => void;
|
|
3042
|
+
}
|
|
3043
|
+
|
|
2312
3044
|
/**
|
|
2313
3045
|
* Composable for transforming text to lowercase
|
|
2314
3046
|
*
|
|
@@ -2708,6 +3440,122 @@ export declare interface UseNumberReturn {
|
|
|
2708
3440
|
parse: (formatted: string) => number;
|
|
2709
3441
|
}
|
|
2710
3442
|
|
|
3443
|
+
/**
|
|
3444
|
+
* Composable for pan gesture
|
|
3445
|
+
*
|
|
3446
|
+
* @param options - Configuration options
|
|
3447
|
+
* @returns Pan gesture utilities
|
|
3448
|
+
*
|
|
3449
|
+
* @example
|
|
3450
|
+
* ```vue
|
|
3451
|
+
* <script setup>
|
|
3452
|
+
* import { ref } from 'vue'
|
|
3453
|
+
* import { usePan } from 'directix'
|
|
3454
|
+
*
|
|
3455
|
+
* const containerRef = ref(null)
|
|
3456
|
+
* const { isPanning, direction, bind } = usePan({
|
|
3457
|
+
* onPan: (e) => console.log('Pan:', e.direction, e.distance)
|
|
3458
|
+
* })
|
|
3459
|
+
*
|
|
3460
|
+
* onMounted(() => bind(containerRef.value))
|
|
3461
|
+
* </script>
|
|
3462
|
+
*
|
|
3463
|
+
* <template>
|
|
3464
|
+
* <div ref="containerRef">Swipe me</div>
|
|
3465
|
+
* </template>
|
|
3466
|
+
* ```
|
|
3467
|
+
*/
|
|
3468
|
+
export declare function usePan(options?: UsePanOptions): UsePanReturn;
|
|
3469
|
+
|
|
3470
|
+
/**
|
|
3471
|
+
* Options for usePan composable
|
|
3472
|
+
*/
|
|
3473
|
+
export declare interface UsePanOptions {
|
|
3474
|
+
/** Callback when pan starts */
|
|
3475
|
+
onStart?: (e: PanEvent) => void;
|
|
3476
|
+
/** Callback during pan */
|
|
3477
|
+
onPan?: (e: PanEvent) => void;
|
|
3478
|
+
/** Callback when pan ends */
|
|
3479
|
+
onEnd?: (e: PanEvent) => void;
|
|
3480
|
+
/** Minimum distance to trigger */
|
|
3481
|
+
threshold?: number;
|
|
3482
|
+
/** Direction constraint */
|
|
3483
|
+
direction?: 'horizontal' | 'vertical' | 'all';
|
|
3484
|
+
/** Prevent default behavior */
|
|
3485
|
+
preventDefault?: boolean;
|
|
3486
|
+
/** Pointer types */
|
|
3487
|
+
pointers?: ('touch' | 'mouse')[];
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
/**
|
|
3491
|
+
* Return type for usePan composable
|
|
3492
|
+
*/
|
|
3493
|
+
export declare interface UsePanReturn {
|
|
3494
|
+
/** Whether pan is in progress */
|
|
3495
|
+
isPanning: Ref<boolean>;
|
|
3496
|
+
/** Current pan direction */
|
|
3497
|
+
direction: Ref<'left' | 'right' | 'up' | 'down' | null>;
|
|
3498
|
+
/** Pan distance */
|
|
3499
|
+
distance: Ref<number>;
|
|
3500
|
+
/** Bind pan to an element */
|
|
3501
|
+
bind: (element: HTMLElement) => () => void;
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
/**
|
|
3505
|
+
* Composable for parallax scrolling
|
|
3506
|
+
*
|
|
3507
|
+
* @param options - Configuration options
|
|
3508
|
+
* @returns Parallax utilities
|
|
3509
|
+
*
|
|
3510
|
+
* @example
|
|
3511
|
+
* ```vue
|
|
3512
|
+
* <script setup>
|
|
3513
|
+
* import { ref } from 'vue'
|
|
3514
|
+
* import { useParallax } from 'directix'
|
|
3515
|
+
*
|
|
3516
|
+
* const containerRef = ref(null)
|
|
3517
|
+
* const { offset, bind } = useParallax({ speed: 0.5 })
|
|
3518
|
+
*
|
|
3519
|
+
* onMounted(() => bind(containerRef.value))
|
|
3520
|
+
* </script>
|
|
3521
|
+
*
|
|
3522
|
+
* <template>
|
|
3523
|
+
* <div ref="containerRef">Parallax content</div>
|
|
3524
|
+
* </template>
|
|
3525
|
+
* ```
|
|
3526
|
+
*/
|
|
3527
|
+
export declare function useParallax(options?: UseParallaxOptions): UseParallaxReturn;
|
|
3528
|
+
|
|
3529
|
+
/**
|
|
3530
|
+
* Options for useParallax composable
|
|
3531
|
+
*/
|
|
3532
|
+
export declare interface UseParallaxOptions {
|
|
3533
|
+
/** Parallax speed factor */
|
|
3534
|
+
speed?: number | Ref<number>;
|
|
3535
|
+
/** Whether enabled */
|
|
3536
|
+
enabled?: boolean | Ref<boolean>;
|
|
3537
|
+
/** Reverse direction */
|
|
3538
|
+
reverse?: boolean;
|
|
3539
|
+
/** Horizontal parallax */
|
|
3540
|
+
horizontal?: boolean;
|
|
3541
|
+
/** Custom transform function */
|
|
3542
|
+
transform?: (offset: number, el: HTMLElement) => string;
|
|
3543
|
+
/** Mobile breakpoint */
|
|
3544
|
+
mobileBreakpoint?: number;
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
/**
|
|
3548
|
+
* Return type for useParallax composable
|
|
3549
|
+
*/
|
|
3550
|
+
export declare interface UseParallaxReturn {
|
|
3551
|
+
/** Current offset */
|
|
3552
|
+
offset: Ref<number>;
|
|
3553
|
+
/** Whether parallax is active */
|
|
3554
|
+
isActive: Ref<boolean>;
|
|
3555
|
+
/** Bind parallax to an element */
|
|
3556
|
+
bind: (element: HTMLElement) => () => void;
|
|
3557
|
+
}
|
|
3558
|
+
|
|
2711
3559
|
/**
|
|
2712
3560
|
* Composable for checking user permissions
|
|
2713
3561
|
*
|
|
@@ -2775,6 +3623,63 @@ export declare interface UsePermissionReturn {
|
|
|
2775
3623
|
recheck: () => void;
|
|
2776
3624
|
}
|
|
2777
3625
|
|
|
3626
|
+
/**
|
|
3627
|
+
* Composable for pinch gesture
|
|
3628
|
+
*
|
|
3629
|
+
* @param options - Configuration options
|
|
3630
|
+
* @returns Pinch gesture utilities
|
|
3631
|
+
*
|
|
3632
|
+
* @example
|
|
3633
|
+
* ```vue
|
|
3634
|
+
* <script setup>
|
|
3635
|
+
* import { ref } from 'vue'
|
|
3636
|
+
* import { usePinch } from 'directix'
|
|
3637
|
+
*
|
|
3638
|
+
* const containerRef = ref(null)
|
|
3639
|
+
* const { scale, bind } = usePinch({
|
|
3640
|
+
* onPinch: (e) => console.log('Scale:', e.scale)
|
|
3641
|
+
* })
|
|
3642
|
+
*
|
|
3643
|
+
* onMounted(() => bind(containerRef.value))
|
|
3644
|
+
* </script>
|
|
3645
|
+
*
|
|
3646
|
+
* <template>
|
|
3647
|
+
* <div ref="containerRef">Pinch to zoom</div>
|
|
3648
|
+
* </template>
|
|
3649
|
+
* ```
|
|
3650
|
+
*/
|
|
3651
|
+
export declare function usePinch(options?: UsePinchOptions): UsePinchReturn;
|
|
3652
|
+
|
|
3653
|
+
/**
|
|
3654
|
+
* Options for usePinch composable
|
|
3655
|
+
*/
|
|
3656
|
+
export declare interface UsePinchOptions {
|
|
3657
|
+
/** Callback when pinch starts */
|
|
3658
|
+
onStart?: (e: PinchEvent) => void;
|
|
3659
|
+
/** Callback during pinch */
|
|
3660
|
+
onPinch?: (e: PinchEvent) => void;
|
|
3661
|
+
/** Callback when pinch ends */
|
|
3662
|
+
onEnd?: (e: PinchEvent) => void;
|
|
3663
|
+
/** Minimum scale */
|
|
3664
|
+
minScale?: number;
|
|
3665
|
+
/** Maximum scale */
|
|
3666
|
+
maxScale?: number;
|
|
3667
|
+
/** Enable transform */
|
|
3668
|
+
enableTransform?: boolean;
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
/**
|
|
3672
|
+
* Return type for usePinch composable
|
|
3673
|
+
*/
|
|
3674
|
+
export declare interface UsePinchReturn {
|
|
3675
|
+
/** Whether pinch is in progress */
|
|
3676
|
+
isPinching: Ref<boolean>;
|
|
3677
|
+
/** Current scale */
|
|
3678
|
+
scale: Ref<number>;
|
|
3679
|
+
/** Bind pinch to an element */
|
|
3680
|
+
bind: (element: HTMLElement) => () => void;
|
|
3681
|
+
}
|
|
3682
|
+
|
|
2778
3683
|
/**
|
|
2779
3684
|
* Composable for printing functionality
|
|
2780
3685
|
*
|
|
@@ -2868,6 +3773,85 @@ export declare interface UsePrintReturn {
|
|
|
2868
3773
|
printPage: () => Promise<void>;
|
|
2869
3774
|
}
|
|
2870
3775
|
|
|
3776
|
+
/**
|
|
3777
|
+
* Composable for progress bar
|
|
3778
|
+
*
|
|
3779
|
+
* @param options - Configuration options
|
|
3780
|
+
* @returns Progress utilities
|
|
3781
|
+
*
|
|
3782
|
+
* @example
|
|
3783
|
+
* ```vue
|
|
3784
|
+
* <script setup>
|
|
3785
|
+
* import { ref } from 'vue'
|
|
3786
|
+
* import { useProgress } from 'directix'
|
|
3787
|
+
*
|
|
3788
|
+
* const containerRef = ref(null)
|
|
3789
|
+
* const { value, percent, setValue, bind } = useProgress({ value: 50 })
|
|
3790
|
+
*
|
|
3791
|
+
* onMounted(() => bind(containerRef.value))
|
|
3792
|
+
* </script>
|
|
3793
|
+
*
|
|
3794
|
+
* <template>
|
|
3795
|
+
* <div ref="containerRef">
|
|
3796
|
+
* <button @click="increment(10)">+10%</button>
|
|
3797
|
+
* </div>
|
|
3798
|
+
* </template>
|
|
3799
|
+
* ```
|
|
3800
|
+
*/
|
|
3801
|
+
export declare function useProgress(options?: UseProgressOptions): UseProgressReturn;
|
|
3802
|
+
|
|
3803
|
+
/**
|
|
3804
|
+
* Options for useProgress composable
|
|
3805
|
+
*/
|
|
3806
|
+
export declare interface UseProgressOptions {
|
|
3807
|
+
/** Current progress value */
|
|
3808
|
+
value?: number | Ref<number>;
|
|
3809
|
+
/** Maximum value */
|
|
3810
|
+
max?: number;
|
|
3811
|
+
/** Minimum value */
|
|
3812
|
+
min?: number;
|
|
3813
|
+
/** Progress bar height */
|
|
3814
|
+
height?: number;
|
|
3815
|
+
/** Progress bar color */
|
|
3816
|
+
color?: string;
|
|
3817
|
+
/** Background color */
|
|
3818
|
+
backgroundColor?: string;
|
|
3819
|
+
/** Transition duration */
|
|
3820
|
+
duration?: number;
|
|
3821
|
+
/** Show percentage text */
|
|
3822
|
+
showText?: boolean;
|
|
3823
|
+
/** Indeterminate mode */
|
|
3824
|
+
indeterminate?: boolean | Ref<boolean>;
|
|
3825
|
+
/** Striped pattern */
|
|
3826
|
+
striped?: boolean;
|
|
3827
|
+
/** Animate stripes */
|
|
3828
|
+
animated?: boolean;
|
|
3829
|
+
/** Callback on change */
|
|
3830
|
+
onChange?: (value: number, percent: number) => void;
|
|
3831
|
+
/** Callback on complete */
|
|
3832
|
+
onComplete?: () => void;
|
|
3833
|
+
}
|
|
3834
|
+
|
|
3835
|
+
/**
|
|
3836
|
+
* Return type for useProgress composable
|
|
3837
|
+
*/
|
|
3838
|
+
export declare interface UseProgressReturn {
|
|
3839
|
+
/** Current value */
|
|
3840
|
+
value: Ref<number>;
|
|
3841
|
+
/** Current percentage */
|
|
3842
|
+
percent: Ref<number>;
|
|
3843
|
+
/** Set progress value */
|
|
3844
|
+
setValue: (value: number) => void;
|
|
3845
|
+
/** Increment progress */
|
|
3846
|
+
increment: (amount?: number) => void;
|
|
3847
|
+
/** Decrement progress */
|
|
3848
|
+
decrement: (amount?: number) => void;
|
|
3849
|
+
/** Reset to minimum */
|
|
3850
|
+
reset: () => void;
|
|
3851
|
+
/** Bind progress to an element */
|
|
3852
|
+
bind: (element: HTMLElement) => () => void;
|
|
3853
|
+
}
|
|
3854
|
+
|
|
2871
3855
|
/**
|
|
2872
3856
|
* Composable for pull to refresh functionality
|
|
2873
3857
|
*
|
|
@@ -3110,6 +4094,59 @@ export declare interface UseRippleReturn {
|
|
|
3110
4094
|
}) => void;
|
|
3111
4095
|
}
|
|
3112
4096
|
|
|
4097
|
+
/**
|
|
4098
|
+
* Composable for rotate gesture
|
|
4099
|
+
*
|
|
4100
|
+
* @param options - Configuration options
|
|
4101
|
+
* @returns Rotate gesture utilities
|
|
4102
|
+
*
|
|
4103
|
+
* @example
|
|
4104
|
+
* ```vue
|
|
4105
|
+
* <script setup>
|
|
4106
|
+
* import { ref } from 'vue'
|
|
4107
|
+
* import { useRotateGesture } from 'directix'
|
|
4108
|
+
*
|
|
4109
|
+
* const containerRef = ref(null)
|
|
4110
|
+
* const { angle, bind } = useRotateGesture({
|
|
4111
|
+
* onRotate: (e) => console.log('Rotation:', e.rotation)
|
|
4112
|
+
* })
|
|
4113
|
+
*
|
|
4114
|
+
* onMounted(() => bind(containerRef.value))
|
|
4115
|
+
* </script>
|
|
4116
|
+
*
|
|
4117
|
+
* <template>
|
|
4118
|
+
* <div ref="containerRef">Rotate with two fingers</div>
|
|
4119
|
+
* </template>
|
|
4120
|
+
* ```
|
|
4121
|
+
*/
|
|
4122
|
+
export declare function useRotateGesture(options?: UseRotateGestureOptions): UseRotateGestureReturn;
|
|
4123
|
+
|
|
4124
|
+
/**
|
|
4125
|
+
* Options for useRotateGesture composable
|
|
4126
|
+
*/
|
|
4127
|
+
export declare interface UseRotateGestureOptions {
|
|
4128
|
+
/** Callback when rotation starts */
|
|
4129
|
+
onStart?: (e: RotateGestureEvent) => void;
|
|
4130
|
+
/** Callback during rotation */
|
|
4131
|
+
onRotate?: (e: RotateGestureEvent) => void;
|
|
4132
|
+
/** Callback when rotation ends */
|
|
4133
|
+
onEnd?: (e: RotateGestureEvent) => void;
|
|
4134
|
+
/** Enable transform */
|
|
4135
|
+
enableTransform?: boolean;
|
|
4136
|
+
}
|
|
4137
|
+
|
|
4138
|
+
/**
|
|
4139
|
+
* Return type for useRotateGesture composable
|
|
4140
|
+
*/
|
|
4141
|
+
export declare interface UseRotateGestureReturn {
|
|
4142
|
+
/** Whether rotation is in progress */
|
|
4143
|
+
isRotating: Ref<boolean>;
|
|
4144
|
+
/** Current rotation angle */
|
|
4145
|
+
angle: Ref<number>;
|
|
4146
|
+
/** Bind rotation to an element */
|
|
4147
|
+
bind: (element: HTMLElement) => () => void;
|
|
4148
|
+
}
|
|
4149
|
+
|
|
3113
4150
|
/**
|
|
3114
4151
|
* Composable for HTML sanitization
|
|
3115
4152
|
*
|
|
@@ -3259,31 +4296,99 @@ export declare interface UseScrollReturn {
|
|
|
3259
4296
|
}
|
|
3260
4297
|
|
|
3261
4298
|
/**
|
|
3262
|
-
* Composable for
|
|
4299
|
+
* Composable for skeleton loading states
|
|
3263
4300
|
*
|
|
3264
4301
|
* @param options - Configuration options
|
|
3265
|
-
* @returns
|
|
4302
|
+
* @returns Skeleton utilities
|
|
3266
4303
|
*
|
|
3267
4304
|
* @example
|
|
3268
4305
|
* ```vue
|
|
3269
4306
|
* <script setup>
|
|
3270
4307
|
* import { ref } from 'vue'
|
|
3271
|
-
* import {
|
|
4308
|
+
* import { useSkeleton } from 'directix'
|
|
3272
4309
|
*
|
|
3273
|
-
* const
|
|
3274
|
-
* const
|
|
3275
|
-
*
|
|
3276
|
-
* onStick: (sticky) => console.log('Sticky:', sticky)
|
|
3277
|
-
* })
|
|
4310
|
+
* const containerRef = ref(null)
|
|
4311
|
+
* const loading = ref(true)
|
|
4312
|
+
* const { isLoading, bind } = useSkeleton({ loading, animation: 'wave' })
|
|
3278
4313
|
*
|
|
3279
|
-
* onMounted(() => bind(
|
|
4314
|
+
* onMounted(() => bind(containerRef.value))
|
|
4315
|
+
*
|
|
4316
|
+
* // Later: loading.value = false
|
|
3280
4317
|
* </script>
|
|
3281
4318
|
*
|
|
3282
4319
|
* <template>
|
|
3283
|
-
* <
|
|
3284
|
-
*
|
|
3285
|
-
* </
|
|
3286
|
-
* </template>
|
|
4320
|
+
* <div ref="containerRef">
|
|
4321
|
+
* <p>Content here</p>
|
|
4322
|
+
* </div>
|
|
4323
|
+
* </template>
|
|
4324
|
+
* ```
|
|
4325
|
+
*/
|
|
4326
|
+
export declare function useSkeleton(options?: UseSkeletonOptions): UseSkeletonReturn;
|
|
4327
|
+
|
|
4328
|
+
/**
|
|
4329
|
+
* Options for useSkeleton composable
|
|
4330
|
+
*/
|
|
4331
|
+
export declare interface UseSkeletonOptions {
|
|
4332
|
+
/** Whether to show skeleton loading state */
|
|
4333
|
+
loading?: boolean | Ref<boolean>;
|
|
4334
|
+
/** Animation type */
|
|
4335
|
+
animation?: SkeletonAnimation;
|
|
4336
|
+
/** Skeleton width */
|
|
4337
|
+
width?: string | number;
|
|
4338
|
+
/** Skeleton height */
|
|
4339
|
+
height?: string | number;
|
|
4340
|
+
/** Border radius */
|
|
4341
|
+
radius?: string | number;
|
|
4342
|
+
/** Skeleton color */
|
|
4343
|
+
color?: string;
|
|
4344
|
+
/** Animation color */
|
|
4345
|
+
animationColor?: string;
|
|
4346
|
+
/** Custom class */
|
|
4347
|
+
class?: string;
|
|
4348
|
+
}
|
|
4349
|
+
|
|
4350
|
+
/**
|
|
4351
|
+
* Return type for useSkeleton composable
|
|
4352
|
+
*/
|
|
4353
|
+
export declare interface UseSkeletonReturn {
|
|
4354
|
+
/** Whether skeleton is currently showing */
|
|
4355
|
+
isLoading: Ref<boolean>;
|
|
4356
|
+
/** Show skeleton */
|
|
4357
|
+
show: () => void;
|
|
4358
|
+
/** Hide skeleton */
|
|
4359
|
+
hide: () => void;
|
|
4360
|
+
/** Toggle skeleton */
|
|
4361
|
+
toggle: () => void;
|
|
4362
|
+
/** Bind skeleton to an element */
|
|
4363
|
+
bind: (element: HTMLElement) => () => void;
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4366
|
+
/**
|
|
4367
|
+
* Composable for sticky positioning
|
|
4368
|
+
*
|
|
4369
|
+
* @param options - Configuration options
|
|
4370
|
+
* @returns Sticky utilities
|
|
4371
|
+
*
|
|
4372
|
+
* @example
|
|
4373
|
+
* ```vue
|
|
4374
|
+
* <script setup>
|
|
4375
|
+
* import { ref } from 'vue'
|
|
4376
|
+
* import { useSticky } from 'directix'
|
|
4377
|
+
*
|
|
4378
|
+
* const headerRef = ref(null)
|
|
4379
|
+
* const { isSticky, bind } = useSticky({
|
|
4380
|
+
* offsetTop: 60,
|
|
4381
|
+
* onStick: (sticky) => console.log('Sticky:', sticky)
|
|
4382
|
+
* })
|
|
4383
|
+
*
|
|
4384
|
+
* onMounted(() => bind(headerRef.value))
|
|
4385
|
+
* </script>
|
|
4386
|
+
*
|
|
4387
|
+
* <template>
|
|
4388
|
+
* <header ref="headerRef" :class="{ sticky: isSticky }">
|
|
4389
|
+
* Navigation
|
|
4390
|
+
* </header>
|
|
4391
|
+
* </template>
|
|
3287
4392
|
* ```
|
|
3288
4393
|
*/
|
|
3289
4394
|
export declare function useSticky(options?: UseStickyOptions): UseStickyReturn;
|
|
@@ -3810,6 +4915,82 @@ export declare interface UseTruncateReturn {
|
|
|
3810
4915
|
truncate: (text: string, length?: number, position?: TruncatePosition) => string;
|
|
3811
4916
|
}
|
|
3812
4917
|
|
|
4918
|
+
/**
|
|
4919
|
+
* Composable for typewriter effect
|
|
4920
|
+
*
|
|
4921
|
+
* @param options - Configuration options
|
|
4922
|
+
* @returns Typewriter utilities
|
|
4923
|
+
*
|
|
4924
|
+
* @example
|
|
4925
|
+
* ```vue
|
|
4926
|
+
* <script setup>
|
|
4927
|
+
* import { ref } from 'vue'
|
|
4928
|
+
* import { useTypewriter } from 'directix'
|
|
4929
|
+
*
|
|
4930
|
+
* const containerRef = ref(null)
|
|
4931
|
+
* const { displayedText, isTyping, bind } = useTypewriter({
|
|
4932
|
+
* text: 'Hello, World!',
|
|
4933
|
+
* speed: 100
|
|
4934
|
+
* })
|
|
4935
|
+
*
|
|
4936
|
+
* onMounted(() => bind(containerRef.value))
|
|
4937
|
+
* </script>
|
|
4938
|
+
*
|
|
4939
|
+
* <template>
|
|
4940
|
+
* <span ref="containerRef"></span>
|
|
4941
|
+
* </template>
|
|
4942
|
+
* ```
|
|
4943
|
+
*/
|
|
4944
|
+
export declare function useTypewriter(options: UseTypewriterOptions): UseTypewriterReturn;
|
|
4945
|
+
|
|
4946
|
+
/**
|
|
4947
|
+
* Options for useTypewriter composable
|
|
4948
|
+
*/
|
|
4949
|
+
export declare interface UseTypewriterOptions {
|
|
4950
|
+
/** Text to type */
|
|
4951
|
+
text: string | Ref<string>;
|
|
4952
|
+
/** Typing speed */
|
|
4953
|
+
speed?: number;
|
|
4954
|
+
/** Delay before start */
|
|
4955
|
+
delay?: number;
|
|
4956
|
+
/** Loop animation */
|
|
4957
|
+
loop?: boolean;
|
|
4958
|
+
/** Delay before deleting */
|
|
4959
|
+
deleteDelay?: number;
|
|
4960
|
+
/** Delete speed */
|
|
4961
|
+
deleteSpeed?: number;
|
|
4962
|
+
/** Cursor character */
|
|
4963
|
+
cursor?: string | false;
|
|
4964
|
+
/** Cursor blink */
|
|
4965
|
+
cursorBlink?: boolean;
|
|
4966
|
+
/** Callback on start */
|
|
4967
|
+
onStart?: () => void;
|
|
4968
|
+
/** Callback on complete */
|
|
4969
|
+
onComplete?: () => void;
|
|
4970
|
+
/** Callback on each character */
|
|
4971
|
+
onType?: (char: string, index: number) => void;
|
|
4972
|
+
}
|
|
4973
|
+
|
|
4974
|
+
/**
|
|
4975
|
+
* Return type for useTypewriter composable
|
|
4976
|
+
*/
|
|
4977
|
+
export declare interface UseTypewriterReturn {
|
|
4978
|
+
/** Current displayed text */
|
|
4979
|
+
displayedText: Ref<string>;
|
|
4980
|
+
/** Whether typing is in progress */
|
|
4981
|
+
isTyping: Ref<boolean>;
|
|
4982
|
+
/** Whether deleting is in progress */
|
|
4983
|
+
isDeleting: Ref<boolean>;
|
|
4984
|
+
/** Start typing */
|
|
4985
|
+
start: () => void;
|
|
4986
|
+
/** Stop typing */
|
|
4987
|
+
stop: () => void;
|
|
4988
|
+
/** Reset to empty */
|
|
4989
|
+
reset: () => void;
|
|
4990
|
+
/** Bind typewriter to an element */
|
|
4991
|
+
bind: (element: HTMLElement) => () => void;
|
|
4992
|
+
}
|
|
4993
|
+
|
|
3813
4994
|
/**
|
|
3814
4995
|
* Composable for transforming text to uppercase
|
|
3815
4996
|
*
|
|
@@ -4192,6 +5373,33 @@ export declare interface UseWatermarkReturn {
|
|
|
4192
5373
|
disable: () => void;
|
|
4193
5374
|
}
|
|
4194
5375
|
|
|
5376
|
+
/**
|
|
5377
|
+
* v-blur directive
|
|
5378
|
+
* Background blur overlay effect
|
|
5379
|
+
*
|
|
5380
|
+
* @example
|
|
5381
|
+
* ```vue
|
|
5382
|
+
* <template>
|
|
5383
|
+
* <!-- Simple blur -->
|
|
5384
|
+
* <div v-blur="isBlurred">Content behind blur</div>
|
|
5385
|
+
*
|
|
5386
|
+
* <!-- With radius -->
|
|
5387
|
+
* <div v-blur="15">Blur with 15px radius</div>
|
|
5388
|
+
*
|
|
5389
|
+
* <!-- With options -->
|
|
5390
|
+
* <div v-blur="{
|
|
5391
|
+
* visible: isBlurred,
|
|
5392
|
+
* radius: 20,
|
|
5393
|
+
* overlayColor: 'rgba(255, 255, 255, 0.3)',
|
|
5394
|
+
* lockScroll: true
|
|
5395
|
+
* }">
|
|
5396
|
+
* Content
|
|
5397
|
+
* </div>
|
|
5398
|
+
* </template>
|
|
5399
|
+
* ```
|
|
5400
|
+
*/
|
|
5401
|
+
export declare const vBlur: Directive;
|
|
5402
|
+
|
|
4195
5403
|
/**
|
|
4196
5404
|
* v-capitalcase directive
|
|
4197
5405
|
*
|
|
@@ -4248,6 +5456,43 @@ export declare const vClickDelay: Directive;
|
|
|
4248
5456
|
*/
|
|
4249
5457
|
export declare const vClickOutside: Directive;
|
|
4250
5458
|
|
|
5459
|
+
/**
|
|
5460
|
+
* v-click-wave directive
|
|
5461
|
+
* A simplified click wave effect directive
|
|
5462
|
+
*
|
|
5463
|
+
* @example
|
|
5464
|
+
* ```vue
|
|
5465
|
+
* <template>
|
|
5466
|
+
* <button v-click-wave>Click me</button>
|
|
5467
|
+
* <button v-click-wave="'rgba(255, 255, 255, 0.3)'">Custom color</button>
|
|
5468
|
+
* <button v-click-wave="{ color: 'red', duration: 400 }">Custom options</button>
|
|
5469
|
+
* </template>
|
|
5470
|
+
* ```
|
|
5471
|
+
*/
|
|
5472
|
+
export declare const vClickWave: Directive;
|
|
5473
|
+
|
|
5474
|
+
/**
|
|
5475
|
+
* v-context-menu directive
|
|
5476
|
+
*
|
|
5477
|
+
* @example
|
|
5478
|
+
* ```vue
|
|
5479
|
+
* <template>
|
|
5480
|
+
* <div v-context-menu="menuItems">Right click here</div>
|
|
5481
|
+
* <div v-context-menu="{ items: menuItems, width: 200 }">Custom width</div>
|
|
5482
|
+
* </template>
|
|
5483
|
+
*
|
|
5484
|
+
* <script setup>
|
|
5485
|
+
* const menuItems = [
|
|
5486
|
+
* { label: 'Copy', handler: () => console.log('Copy') },
|
|
5487
|
+
* { label: 'Paste', handler: () => console.log('Paste') },
|
|
5488
|
+
* { divider: true, label: '' },
|
|
5489
|
+
* { label: 'Delete', handler: () => console.log('Delete') }
|
|
5490
|
+
* ]
|
|
5491
|
+
* </script>
|
|
5492
|
+
* ```
|
|
5493
|
+
*/
|
|
5494
|
+
export declare const vContextMenu: Directive;
|
|
5495
|
+
|
|
4251
5496
|
/**
|
|
4252
5497
|
* v-copy directive
|
|
4253
5498
|
*
|
|
@@ -4291,6 +5536,31 @@ export declare const vCopy: Directive;
|
|
|
4291
5536
|
*/
|
|
4292
5537
|
export declare const vCountdown: Directive;
|
|
4293
5538
|
|
|
5539
|
+
/**
|
|
5540
|
+
* v-counter directive
|
|
5541
|
+
* Animated number counter
|
|
5542
|
+
*
|
|
5543
|
+
* @example
|
|
5544
|
+
* ```vue
|
|
5545
|
+
* <template>
|
|
5546
|
+
* <span v-counter="1000">0</span>
|
|
5547
|
+
*
|
|
5548
|
+
* <span v-counter="{
|
|
5549
|
+
* value: 10000,
|
|
5550
|
+
* duration: 3000,
|
|
5551
|
+
* decimals: 2,
|
|
5552
|
+
* useGrouping: true
|
|
5553
|
+
* }">0</span>
|
|
5554
|
+
*
|
|
5555
|
+
* <span v-counter="{
|
|
5556
|
+
* value: targetValue,
|
|
5557
|
+
* formatter: (v) => '$' + v.toFixed(2)
|
|
5558
|
+
* }">0</span>
|
|
5559
|
+
* </template>
|
|
5560
|
+
* ```
|
|
5561
|
+
*/
|
|
5562
|
+
export declare const vCounter: Directive;
|
|
5563
|
+
|
|
4294
5564
|
/**
|
|
4295
5565
|
* v-debounce directive
|
|
4296
5566
|
*
|
|
@@ -4355,6 +5625,91 @@ export declare const vDraggable: Directive;
|
|
|
4355
5625
|
*/
|
|
4356
5626
|
export declare const vEllipsis: Directive;
|
|
4357
5627
|
|
|
5628
|
+
/**
|
|
5629
|
+
* v-emoji directive
|
|
5630
|
+
* Restrict or filter emoji input
|
|
5631
|
+
*
|
|
5632
|
+
* @example
|
|
5633
|
+
* ```vue
|
|
5634
|
+
* <template>
|
|
5635
|
+
* <!-- Strip all emojis -->
|
|
5636
|
+
* <input v-emoji type="text" />
|
|
5637
|
+
*
|
|
5638
|
+
* <!-- Strip emojis with replacement -->
|
|
5639
|
+
* <input v-emoji="{ strip: true, replacement: '*' }" type="text" />
|
|
5640
|
+
*
|
|
5641
|
+
* <!-- Allow specific emojis -->
|
|
5642
|
+
* <input v-emoji="{ allowList: ['😊', '👍'] }" type="text" />
|
|
5643
|
+
*
|
|
5644
|
+
* <!-- Block specific emojis -->
|
|
5645
|
+
* <input v-emoji="{ blockList: ['🚫', '❌'] }" type="text" />
|
|
5646
|
+
* </template>
|
|
5647
|
+
* ```
|
|
5648
|
+
*/
|
|
5649
|
+
export declare const vEmoji: Directive;
|
|
5650
|
+
|
|
5651
|
+
/**
|
|
5652
|
+
* v-export directive
|
|
5653
|
+
*
|
|
5654
|
+
* @example
|
|
5655
|
+
* ```vue
|
|
5656
|
+
* <template>
|
|
5657
|
+
* <button v-export="exportData">Export CSV</button>
|
|
5658
|
+
*
|
|
5659
|
+
* <button v-export="{ data: tableData, format: 'json', filename: 'my-data' }">
|
|
5660
|
+
* Export JSON
|
|
5661
|
+
* </button>
|
|
5662
|
+
*
|
|
5663
|
+
* <button v-export="{
|
|
5664
|
+
* data: tableData,
|
|
5665
|
+
* format: 'csv',
|
|
5666
|
+
* columns: ['name', 'email'],
|
|
5667
|
+
* headers: { name: 'Name', email: 'Email Address' }
|
|
5668
|
+
* }">
|
|
5669
|
+
* Export with custom columns
|
|
5670
|
+
* </button>
|
|
5671
|
+
* </template>
|
|
5672
|
+
*
|
|
5673
|
+
* <script setup>
|
|
5674
|
+
* const tableData = [
|
|
5675
|
+
* { name: 'John', email: 'john@example.com', age: 30 },
|
|
5676
|
+
* { name: 'Jane', email: 'jane@example.com', age: 25 }
|
|
5677
|
+
* ]
|
|
5678
|
+
* </script>
|
|
5679
|
+
* ```
|
|
5680
|
+
*/
|
|
5681
|
+
export declare const vExport: Directive;
|
|
5682
|
+
|
|
5683
|
+
/**
|
|
5684
|
+
* v-fade directive
|
|
5685
|
+
* Fade in/out transition effect
|
|
5686
|
+
*
|
|
5687
|
+
* @example
|
|
5688
|
+
* ```vue
|
|
5689
|
+
* <template>
|
|
5690
|
+
* <!-- Toggle visibility with fade -->
|
|
5691
|
+
* <div v-fade="isVisible">Fade content</div>
|
|
5692
|
+
*
|
|
5693
|
+
* <!-- Fade in only -->
|
|
5694
|
+
* <div v-fade="'in'">Fade in</div>
|
|
5695
|
+
*
|
|
5696
|
+
* <!-- Fade out only -->
|
|
5697
|
+
* <div v-fade="'out'">Fade out</div>
|
|
5698
|
+
*
|
|
5699
|
+
* <!-- With options -->
|
|
5700
|
+
* <div v-fade="{
|
|
5701
|
+
* visible: isVisible,
|
|
5702
|
+
* duration: 500,
|
|
5703
|
+
* easing: 'ease-in-out',
|
|
5704
|
+
* onComplete: () => console.log('Fade complete')
|
|
5705
|
+
* }">
|
|
5706
|
+
* Content
|
|
5707
|
+
* </div>
|
|
5708
|
+
* </template>
|
|
5709
|
+
* ```
|
|
5710
|
+
*/
|
|
5711
|
+
export declare const vFade: Directive;
|
|
5712
|
+
|
|
4358
5713
|
/**
|
|
4359
5714
|
* v-focus directive
|
|
4360
5715
|
*
|
|
@@ -4368,6 +5723,48 @@ export declare const vEllipsis: Directive;
|
|
|
4368
5723
|
*/
|
|
4369
5724
|
export declare const vFocus: Directive;
|
|
4370
5725
|
|
|
5726
|
+
/**
|
|
5727
|
+
* v-fullscreen directive
|
|
5728
|
+
*
|
|
5729
|
+
* @example
|
|
5730
|
+
* ```vue
|
|
5731
|
+
* <template>
|
|
5732
|
+
* <div v-fullscreen>
|
|
5733
|
+
* Content to show in fullscreen
|
|
5734
|
+
* <button @click="toggleFullscreen">Toggle</button>
|
|
5735
|
+
* </div>
|
|
5736
|
+
*
|
|
5737
|
+
* <div v-fullscreen="{ fullscreenClass: 'my-fullscreen' }">
|
|
5738
|
+
* Custom fullscreen class
|
|
5739
|
+
* </div>
|
|
5740
|
+
* </template>
|
|
5741
|
+
* ```
|
|
5742
|
+
*/
|
|
5743
|
+
export declare const vFullscreen: Directive;
|
|
5744
|
+
|
|
5745
|
+
/**
|
|
5746
|
+
* v-highlight directive
|
|
5747
|
+
*
|
|
5748
|
+
* @example
|
|
5749
|
+
* ```vue
|
|
5750
|
+
* <template>
|
|
5751
|
+
* <p v-highlight="'important'">This is an important message.</p>
|
|
5752
|
+
*
|
|
5753
|
+
* <p v-highlight="['Vue', 'React']">Vue and React are popular frameworks.</p>
|
|
5754
|
+
*
|
|
5755
|
+
* <p v-highlight="{
|
|
5756
|
+
* keywords: 'highlight',
|
|
5757
|
+
* className: 'my-highlight',
|
|
5758
|
+
* style: 'background: yellow; color: black;',
|
|
5759
|
+
* caseSensitive: true
|
|
5760
|
+
* }">
|
|
5761
|
+
* This will highlight the word.
|
|
5762
|
+
* </p>
|
|
5763
|
+
* </template>
|
|
5764
|
+
* ```
|
|
5765
|
+
*/
|
|
5766
|
+
export declare const vHighlight: Directive;
|
|
5767
|
+
|
|
4371
5768
|
export declare const vHotkey: Directive;
|
|
4372
5769
|
|
|
4373
5770
|
/**
|
|
@@ -4496,6 +5893,36 @@ export declare const vLoading: Directive;
|
|
|
4496
5893
|
*/
|
|
4497
5894
|
export declare const vLongPress: Directive;
|
|
4498
5895
|
|
|
5896
|
+
/**
|
|
5897
|
+
* v-lottie directive
|
|
5898
|
+
* Lottie animation player
|
|
5899
|
+
*
|
|
5900
|
+
* @example
|
|
5901
|
+
* ```vue
|
|
5902
|
+
* <template>
|
|
5903
|
+
* <!-- With URL -->
|
|
5904
|
+
* <div v-lottie="'https://assets.example.com/animation.json'"></div>
|
|
5905
|
+
*
|
|
5906
|
+
* <!-- With animation data -->
|
|
5907
|
+
* <div v-lottie="animationData"></div>
|
|
5908
|
+
*
|
|
5909
|
+
* <!-- With options -->
|
|
5910
|
+
* <div v-lottie="{
|
|
5911
|
+
* animationData: animationData,
|
|
5912
|
+
* autoplay: true,
|
|
5913
|
+
* loop: true,
|
|
5914
|
+
* speed: 1.5,
|
|
5915
|
+
* onComplete: () => console.log('Done')
|
|
5916
|
+
* }"></div>
|
|
5917
|
+
* </template>
|
|
5918
|
+
*
|
|
5919
|
+
* <script setup>
|
|
5920
|
+
* import animationData from './animation.json'
|
|
5921
|
+
* </script>
|
|
5922
|
+
* ```
|
|
5923
|
+
*/
|
|
5924
|
+
export declare const vLottie: Directive;
|
|
5925
|
+
|
|
4499
5926
|
/**
|
|
4500
5927
|
* v-lowercase directive
|
|
4501
5928
|
*
|
|
@@ -4552,6 +5979,59 @@ export declare const vMutation: Directive;
|
|
|
4552
5979
|
|
|
4553
5980
|
export declare const vNumber: Directive;
|
|
4554
5981
|
|
|
5982
|
+
/**
|
|
5983
|
+
* v-pan directive
|
|
5984
|
+
*
|
|
5985
|
+
* @example
|
|
5986
|
+
* ```vue
|
|
5987
|
+
* <template>
|
|
5988
|
+
* <div v-pan="handlePan">Swipe me</div>
|
|
5989
|
+
*
|
|
5990
|
+
* <div v-pan="{
|
|
5991
|
+
* onPan: handlePan,
|
|
5992
|
+
* direction: 'horizontal',
|
|
5993
|
+
* threshold: 20
|
|
5994
|
+
* }">
|
|
5995
|
+
* Horizontal only
|
|
5996
|
+
* </div>
|
|
5997
|
+
* </template>
|
|
5998
|
+
*
|
|
5999
|
+
* <script setup>
|
|
6000
|
+
* function handlePan(e) {
|
|
6001
|
+
* console.log('Direction:', e.direction)
|
|
6002
|
+
* console.log('Distance:', e.distance)
|
|
6003
|
+
* }
|
|
6004
|
+
* </script>
|
|
6005
|
+
* ```
|
|
6006
|
+
*/
|
|
6007
|
+
export declare const vPan: Directive;
|
|
6008
|
+
|
|
6009
|
+
/**
|
|
6010
|
+
* v-parallax directive
|
|
6011
|
+
* Parallax scrolling effect
|
|
6012
|
+
*
|
|
6013
|
+
* @example
|
|
6014
|
+
* ```vue
|
|
6015
|
+
* <template>
|
|
6016
|
+
* <!-- Simple parallax -->
|
|
6017
|
+
* <div v-parallax>Parallax content</div>
|
|
6018
|
+
*
|
|
6019
|
+
* <!-- With speed factor -->
|
|
6020
|
+
* <div v-parallax="0.3">Slower parallax</div>
|
|
6021
|
+
*
|
|
6022
|
+
* <!-- With options -->
|
|
6023
|
+
* <div v-parallax="{
|
|
6024
|
+
* speed: 0.5,
|
|
6025
|
+
* reverse: true,
|
|
6026
|
+
* mobileBreakpoint: 768
|
|
6027
|
+
* }">
|
|
6028
|
+
* Reverse parallax, disabled on mobile
|
|
6029
|
+
* </div>
|
|
6030
|
+
* </template>
|
|
6031
|
+
* ```
|
|
6032
|
+
*/
|
|
6033
|
+
export declare const vParallax: Directive;
|
|
6034
|
+
|
|
4555
6035
|
/**
|
|
4556
6036
|
* v-permission directive
|
|
4557
6037
|
*
|
|
@@ -4580,6 +6060,34 @@ export declare const vNumber: Directive;
|
|
|
4580
6060
|
*/
|
|
4581
6061
|
export declare const vPermission: Directive;
|
|
4582
6062
|
|
|
6063
|
+
/**
|
|
6064
|
+
* v-pinch directive
|
|
6065
|
+
*
|
|
6066
|
+
* @example
|
|
6067
|
+
* ```vue
|
|
6068
|
+
* <template>
|
|
6069
|
+
* <div v-pinch="handlePinch">Pinch to zoom</div>
|
|
6070
|
+
*
|
|
6071
|
+
* <div v-pinch="{
|
|
6072
|
+
* onPinch: handlePinch,
|
|
6073
|
+
* enableTransform: true,
|
|
6074
|
+
* minScale: 0.5,
|
|
6075
|
+
* maxScale: 3
|
|
6076
|
+
* }">
|
|
6077
|
+
* Pinch to scale
|
|
6078
|
+
* </div>
|
|
6079
|
+
* </template>
|
|
6080
|
+
*
|
|
6081
|
+
* <script setup>
|
|
6082
|
+
* function handlePinch(e) {
|
|
6083
|
+
* console.log('Scale:', e.scale)
|
|
6084
|
+
* console.log('Center:', e.centerX, e.centerY)
|
|
6085
|
+
* }
|
|
6086
|
+
* </script>
|
|
6087
|
+
* ```
|
|
6088
|
+
*/
|
|
6089
|
+
export declare const vPinch: Directive;
|
|
6090
|
+
|
|
4583
6091
|
/**
|
|
4584
6092
|
* v-print directive
|
|
4585
6093
|
*
|
|
@@ -4606,6 +6114,32 @@ export declare const vPermission: Directive;
|
|
|
4606
6114
|
*/
|
|
4607
6115
|
export declare const vPrint: Directive;
|
|
4608
6116
|
|
|
6117
|
+
/**
|
|
6118
|
+
* v-progress directive
|
|
6119
|
+
* Progress bar animation
|
|
6120
|
+
*
|
|
6121
|
+
* @example
|
|
6122
|
+
* ```vue
|
|
6123
|
+
* <template>
|
|
6124
|
+
* <div v-progress="50">Progress at 50%</div>
|
|
6125
|
+
*
|
|
6126
|
+
* <div v-progress="{
|
|
6127
|
+
* value: progressValue,
|
|
6128
|
+
* color: '#42b883',
|
|
6129
|
+
* height: 8,
|
|
6130
|
+
* showText: true
|
|
6131
|
+
* }">
|
|
6132
|
+
* Content
|
|
6133
|
+
* </div>
|
|
6134
|
+
*
|
|
6135
|
+
* <div v-progress="{ indeterminate: true }">
|
|
6136
|
+
* Loading...
|
|
6137
|
+
* </div>
|
|
6138
|
+
* </template>
|
|
6139
|
+
* ```
|
|
6140
|
+
*/
|
|
6141
|
+
export declare const vProgress: Directive;
|
|
6142
|
+
|
|
4609
6143
|
export declare const vPullRefresh: Directive;
|
|
4610
6144
|
|
|
4611
6145
|
/**
|
|
@@ -4635,6 +6169,33 @@ export declare const vResize: Directive;
|
|
|
4635
6169
|
*/
|
|
4636
6170
|
export declare const vRipple: Directive;
|
|
4637
6171
|
|
|
6172
|
+
/**
|
|
6173
|
+
* v-rotate directive
|
|
6174
|
+
* Two-finger rotation gesture
|
|
6175
|
+
*
|
|
6176
|
+
* @example
|
|
6177
|
+
* ```vue
|
|
6178
|
+
* <template>
|
|
6179
|
+
* <div v-rotate="handleRotate">Rotate with two fingers</div>
|
|
6180
|
+
*
|
|
6181
|
+
* <div v-rotate="{
|
|
6182
|
+
* onRotate: handleRotate,
|
|
6183
|
+
* enableTransform: true
|
|
6184
|
+
* }">
|
|
6185
|
+
* Rotate with transform
|
|
6186
|
+
* </div>
|
|
6187
|
+
* </template>
|
|
6188
|
+
*
|
|
6189
|
+
* <script setup>
|
|
6190
|
+
* function handleRotate(e) {
|
|
6191
|
+
* console.log('Rotation:', e.rotation)
|
|
6192
|
+
* console.log('Angle:', e.angle)
|
|
6193
|
+
* }
|
|
6194
|
+
* </script>
|
|
6195
|
+
* ```
|
|
6196
|
+
*/
|
|
6197
|
+
export declare const vRotateGesture: Directive;
|
|
6198
|
+
|
|
4638
6199
|
/**
|
|
4639
6200
|
* v-sanitize directive
|
|
4640
6201
|
*
|
|
@@ -4662,6 +6223,28 @@ export declare const vSanitize: Directive;
|
|
|
4662
6223
|
*/
|
|
4663
6224
|
export declare const vScroll: Directive;
|
|
4664
6225
|
|
|
6226
|
+
/**
|
|
6227
|
+
* v-skeleton directive
|
|
6228
|
+
*
|
|
6229
|
+
* @example
|
|
6230
|
+
* ```vue
|
|
6231
|
+
* <template>
|
|
6232
|
+
* <!-- Basic usage -->
|
|
6233
|
+
* <div v-skeleton="isLoading">Content here</div>
|
|
6234
|
+
*
|
|
6235
|
+
* <!-- With options -->
|
|
6236
|
+
* <div v-skeleton="{ loading: isLoading, animation: 'pulse', width: 200, height: 20 }">
|
|
6237
|
+
* Content here
|
|
6238
|
+
* </div>
|
|
6239
|
+
*
|
|
6240
|
+
* <!-- Multiple skeleton lines -->
|
|
6241
|
+
* <div v-skeleton="{ loading: isLoading, height: '1em' }">Line 1</div>
|
|
6242
|
+
* <div v-skeleton="{ loading: isLoading, height: '1em' }">Line 2</div>
|
|
6243
|
+
* </template>
|
|
6244
|
+
* ```
|
|
6245
|
+
*/
|
|
6246
|
+
export declare const vSkeleton: Directive;
|
|
6247
|
+
|
|
4665
6248
|
/**
|
|
4666
6249
|
* v-sticky directive
|
|
4667
6250
|
*
|
|
@@ -4739,6 +6322,35 @@ export declare const vTrim: Directive;
|
|
|
4739
6322
|
*/
|
|
4740
6323
|
export declare const vTruncate: Directive;
|
|
4741
6324
|
|
|
6325
|
+
/**
|
|
6326
|
+
* v-typewriter directive
|
|
6327
|
+
* Typewriter animation effect
|
|
6328
|
+
*
|
|
6329
|
+
* @example
|
|
6330
|
+
* ```vue
|
|
6331
|
+
* <template>
|
|
6332
|
+
* <!-- Simple usage -->
|
|
6333
|
+
* <span v-typewriter="'Hello, World!'"></span>
|
|
6334
|
+
*
|
|
6335
|
+
* <!-- With options -->
|
|
6336
|
+
* <span v-typewriter="{
|
|
6337
|
+
* text: 'Typing animation',
|
|
6338
|
+
* speed: 100,
|
|
6339
|
+
* cursor: '_',
|
|
6340
|
+
* onComplete: () => console.log('Done!')
|
|
6341
|
+
* }"></span>
|
|
6342
|
+
*
|
|
6343
|
+
* <!-- Loop mode -->
|
|
6344
|
+
* <span v-typewriter="{
|
|
6345
|
+
* text: 'Loop animation',
|
|
6346
|
+
* loop: true,
|
|
6347
|
+
* deleteDelay: 1000
|
|
6348
|
+
* }"></span>
|
|
6349
|
+
* </template>
|
|
6350
|
+
* ```
|
|
6351
|
+
*/
|
|
6352
|
+
export declare const vTypewriter: Directive;
|
|
6353
|
+
|
|
4742
6354
|
/**
|
|
4743
6355
|
* Vue 2 directive hooks
|
|
4744
6356
|
*/
|