directix 1.0.0 → 1.1.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/dist/index.d.ts CHANGED
@@ -63,6 +63,11 @@ export declare interface ClickOutsideOptions {
63
63
  prevent?: boolean;
64
64
  }
65
65
 
66
+ /**
67
+ * Configure permission directive
68
+ */
69
+ export declare function configurePermission(config: PermissionConfig): void;
70
+
66
71
  /**
67
72
  * Directive binding value type
68
73
  */
@@ -315,10 +320,159 @@ export declare function generateId(prefix?: string): string;
315
320
  */
316
321
  export declare function get<T = any>(obj: Record<string, any>, path: string, defaultValue?: T): T;
317
322
 
323
+ /**
324
+ * Get current configuration
325
+ */
326
+ export declare function getPermissionConfig(): PermissionConfig | null;
327
+
318
328
  /**
319
329
  * Get current Vue version
320
330
  */
321
- export declare function getVueVersion(): 2 | 3;
331
+ export declare function getVueVersion(): VueVersion;
332
+
333
+ /**
334
+ * Directive binding value type
335
+ */
336
+ export declare type HoverBinding = HoverHandler | HoverOptions;
337
+
338
+ /**
339
+ * Hover state change handler
340
+ */
341
+ export declare type HoverHandler = (isHovering: boolean, event: MouseEvent) => void;
342
+
343
+ /**
344
+ * Hover directive options
345
+ */
346
+ export declare interface HoverOptions {
347
+ /**
348
+ * Callback when hover state changes
349
+ */
350
+ handler?: HoverHandler;
351
+ /**
352
+ * Callback when mouse enters
353
+ */
354
+ onEnter?: (event: MouseEvent) => void;
355
+ /**
356
+ * Callback when mouse leaves
357
+ */
358
+ onLeave?: (event: MouseEvent) => void;
359
+ /**
360
+ * CSS class to add when hovering
361
+ * @default 'v-hover'
362
+ */
363
+ class?: string;
364
+ /**
365
+ * Whether to disable
366
+ * @default false
367
+ */
368
+ disabled?: boolean;
369
+ /**
370
+ * Delay in milliseconds before triggering enter
371
+ * @default 0
372
+ */
373
+ enterDelay?: number;
374
+ /**
375
+ * Delay in milliseconds before triggering leave
376
+ * @default 0
377
+ */
378
+ leaveDelay?: number;
379
+ }
380
+
381
+ /**
382
+ * Directive binding value type
383
+ */
384
+ export declare type InfiniteScrollBinding = InfiniteScrollHandler | InfiniteScrollOptions;
385
+
386
+ /**
387
+ * Infinite scroll handler
388
+ */
389
+ export declare type InfiniteScrollHandler = () => void | Promise<void>;
390
+
391
+ /**
392
+ * Infinite scroll directive options
393
+ */
394
+ export declare interface InfiniteScrollOptions {
395
+ /**
396
+ * Handler to call when scrolling to bottom
397
+ * @required
398
+ */
399
+ handler: InfiniteScrollHandler;
400
+ /**
401
+ * Distance from bottom to trigger load (in pixels)
402
+ * @default 0
403
+ */
404
+ distance?: number;
405
+ /**
406
+ * Whether to disable
407
+ * @default false
408
+ */
409
+ disabled?: boolean;
410
+ /**
411
+ * Whether currently loading
412
+ * @default false
413
+ */
414
+ loading?: boolean;
415
+ /**
416
+ * Whether to use IntersectionObserver (more efficient)
417
+ * @default true
418
+ */
419
+ useIntersection?: boolean;
420
+ /**
421
+ * Throttle time in milliseconds
422
+ * @default 200
423
+ */
424
+ throttle?: number;
425
+ /**
426
+ * Custom scroll container
427
+ */
428
+ container?: string | Element | null;
429
+ /**
430
+ * Callback when load starts
431
+ */
432
+ onLoadStart?: () => void;
433
+ /**
434
+ * Callback when load completes
435
+ */
436
+ onLoadEnd?: () => void;
437
+ /**
438
+ * Callback on error
439
+ */
440
+ onError?: (error: Error) => void;
441
+ }
442
+
443
+ /**
444
+ * Directive binding value type
445
+ */
446
+ export declare type IntersectBinding = IntersectHandler | IntersectOptions;
447
+
448
+ /**
449
+ * Intersect event handler
450
+ */
451
+ export declare type IntersectHandler = (entry: IntersectionObserverEntry, observer: IntersectionObserver) => void;
452
+
453
+ /**
454
+ * Intersect directive options
455
+ */
456
+ export declare interface IntersectOptions {
457
+ /** Callback when element intersects */
458
+ handler?: IntersectHandler;
459
+ /** Callback when element enters viewport */
460
+ onEnter?: (entry: IntersectionObserverEntry, observer: IntersectionObserver) => void;
461
+ /** Callback when element leaves viewport */
462
+ onLeave?: (entry: IntersectionObserverEntry, observer: IntersectionObserver) => void;
463
+ /** Callback when element changes intersection */
464
+ onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
465
+ /** Root element for intersection @default null (viewport) */
466
+ root?: Element | null;
467
+ /** Margin around the root @default '0px' */
468
+ rootMargin?: string;
469
+ /** Threshold(s) at which to trigger callback @default 0 */
470
+ threshold?: number | number[];
471
+ /** Whether to disable @default false */
472
+ disabled?: boolean;
473
+ /** Whether to trigger only once @default false */
474
+ once?: boolean;
475
+ }
322
476
 
323
477
  /**
324
478
  * Check if value is an array
@@ -371,127 +525,689 @@ export declare const isSSR: () => boolean;
371
525
  export declare function isString(value: unknown): value is string;
372
526
 
373
527
  /**
374
- * Check if Vue 2
528
+ * Check if Vue 2 (includes 2.7)
529
+ */
530
+ export declare function isVue2(): boolean;
531
+
532
+ /**
533
+ * Check if Vue 2.7 (has built-in Composition API support)
375
534
  */
376
- export declare const isVue2: () => boolean;
535
+ export declare function isVue27(): boolean;
377
536
 
378
537
  /**
379
538
  * Check if Vue 3
380
539
  */
381
- export declare const isVue3: () => boolean;
540
+ export declare function isVue3(): boolean;
382
541
 
383
542
  /**
384
- * Parse time argument
385
- * Supports formats: "300" | "300ms" | "1s"
543
+ * Directive binding value type
386
544
  */
387
- export declare function parseTime(arg?: string): number | null;
545
+ export declare type LazyBinding = string | LazyOptions;
388
546
 
389
547
  /**
390
- * Set nested property value by path
548
+ * Lazy directive options
391
549
  */
392
- export declare function set(obj: Record<string, any>, path: string, value: any): void;
550
+ export declare interface LazyOptions {
551
+ /**
552
+ * Image source URL
553
+ */
554
+ src?: string;
555
+ /**
556
+ * Placeholder image URL
557
+ */
558
+ placeholder?: string;
559
+ /**
560
+ * Error image URL (shown when loading fails)
561
+ */
562
+ error?: string;
563
+ /**
564
+ * Preload distance in pixels
565
+ * @default 0
566
+ */
567
+ preload?: number;
568
+ /**
569
+ * Callback when image loads successfully
570
+ */
571
+ onLoad?: (el: HTMLElement) => void;
572
+ /**
573
+ * Callback when image fails to load
574
+ */
575
+ onError?: (el: HTMLElement, error: Error) => void;
576
+ /**
577
+ * Number of retry attempts
578
+ * @default 1
579
+ */
580
+ attempt?: number;
581
+ /**
582
+ * Filter function, return false to skip loading
583
+ */
584
+ filter?: (src: string) => boolean;
585
+ /**
586
+ * Custom IntersectionObserver
587
+ */
588
+ observer?: IntersectionObserver;
589
+ /**
590
+ * Whether to disable lazy loading
591
+ * @default false
592
+ */
593
+ disabled?: boolean;
594
+ }
393
595
 
394
596
  /**
395
- * Check if Clipboard API is supported
597
+ * Lazy loading state
396
598
  */
397
- export declare const supportsClipboard: () => boolean;
599
+ export declare type LazyState = 'pending' | 'loading' | 'loaded' | 'error';
398
600
 
399
601
  /**
400
- * Check if IntersectionObserver is supported
602
+ * Directive binding value type
401
603
  */
402
- export declare const supportsIntersectionObserver: () => boolean;
604
+ export declare type LoadingBinding = boolean | LoadingOptions;
403
605
 
404
606
  /**
405
- * Check if MutationObserver is supported
607
+ * Loading directive options
406
608
  */
407
- export declare const supportsMutationObserver: () => boolean;
609
+ export declare interface LoadingOptions {
610
+ /**
611
+ * Loading state
612
+ * @default true
613
+ */
614
+ value?: boolean;
615
+ /**
616
+ * Loading text to display
617
+ */
618
+ text?: string;
619
+ /**
620
+ * CSS class for loading overlay
621
+ * @default 'v-loading'
622
+ */
623
+ loadingClass?: string;
624
+ /**
625
+ * CSS class for loading spinner
626
+ * @default 'v-loading__spinner'
627
+ */
628
+ spinnerClass?: string;
629
+ /**
630
+ * CSS class for loading text
631
+ * @default 'v-loading__text'
632
+ */
633
+ textClass?: string;
634
+ /**
635
+ * Custom spinner HTML
636
+ */
637
+ spinner?: string;
638
+ /**
639
+ * Background color
640
+ * @default 'rgba(255, 255, 255, 0.9)'
641
+ */
642
+ background?: string;
643
+ /**
644
+ * Whether to lock scroll while loading
645
+ * @default false
646
+ */
647
+ lock?: boolean;
648
+ /**
649
+ * Whether to disable
650
+ * @default false
651
+ */
652
+ disabled?: boolean;
653
+ }
408
654
 
409
655
  /**
410
- * Check if passive event listening is supported
656
+ * Directive binding value type
411
657
  */
412
- export declare const supportsPassive: () => boolean;
658
+ export declare type LongPressBinding = LongPressHandler | LongPressOptions;
413
659
 
414
660
  /**
415
- * Check if ResizeObserver is supported
661
+ * Long press handler
416
662
  */
417
- export declare const supportsResizeObserver: () => boolean;
663
+ export declare type LongPressHandler = (event: MouseEvent | TouchEvent) => void;
418
664
 
419
665
  /**
420
- * Directive binding value type
666
+ * Long press directive options
421
667
  */
422
- export declare type ThrottleBinding<T extends (...args: any[]) => any = any> = T | ThrottleOptions<T>;
668
+ export declare interface LongPressOptions {
669
+ /**
670
+ * Callback when long press is triggered
671
+ * @required
672
+ */
673
+ handler: LongPressHandler;
674
+ /**
675
+ * Duration in milliseconds to trigger long press
676
+ * @default 500
677
+ */
678
+ duration?: number;
679
+ /**
680
+ * Whether to disable
681
+ * @default false
682
+ */
683
+ disabled?: boolean;
684
+ /**
685
+ * Maximum movement distance before canceling
686
+ * @default 10
687
+ */
688
+ distance?: number;
689
+ /**
690
+ * Callback when long press starts (on mousedown/touchstart)
691
+ */
692
+ onStart?: (event: MouseEvent | TouchEvent) => void;
693
+ /**
694
+ * Callback when long press is canceled
695
+ */
696
+ onCancel?: (event: MouseEvent | TouchEvent) => void;
697
+ /**
698
+ * Callback on each tick during long press
699
+ */
700
+ onTick?: (remaining: number) => void;
701
+ /**
702
+ * Interval for onTick callback in milliseconds
703
+ * @default 100
704
+ */
705
+ tickInterval?: number;
706
+ /**
707
+ * Whether to prevent default behavior
708
+ * @default true
709
+ */
710
+ prevent?: boolean;
711
+ /**
712
+ * Whether to stop propagation
713
+ * @default false
714
+ */
715
+ stop?: boolean;
716
+ }
717
+
718
+ export declare type MaskBinding = string | MaskOptions;
423
719
 
424
720
  /**
425
- * Throttled function type
721
+ * Mask directive options
426
722
  */
427
- export declare interface ThrottledFunction<T extends (...args: any[]) => any> {
428
- (...args: Parameters<T>): void;
429
- cancel: () => void;
723
+ export declare interface MaskOptions {
724
+ /** Mask pattern: # digit, A letter, N alphanumeric, X any, others as literals */
725
+ mask: string;
726
+ /** Placeholder character @default '_' */
727
+ placeholder?: string;
728
+ /** Show mask placeholder on focus @default true */
729
+ showPlaceholder?: boolean;
730
+ /** Show mask on blur @default false */
731
+ showMaskOnBlur?: boolean;
732
+ /** Clear incomplete on blur @default false */
733
+ clearIncomplete?: boolean;
734
+ /** Disable @default false */
735
+ disabled?: boolean;
736
+ /** Callback when value changes */
737
+ onChange?: (value: string, rawValue: string) => void;
738
+ /** Callback when mask is complete */
739
+ onComplete?: (value: string) => void;
430
740
  }
431
741
 
432
742
  /**
433
- * Throttle function
743
+ * Directive binding value type
434
744
  */
435
- export declare function throttleFn<T extends (...args: any[]) => any>(func: T, wait?: number, options?: {
436
- leading?: boolean;
437
- trailing?: boolean;
438
- }): ((...args: Parameters<T>) => void) & {
439
- cancel: () => void;
440
- };
745
+ export declare type MutationBinding = MutationHandler | MutationOptions;
441
746
 
442
747
  /**
443
- * Throttle directive options
748
+ * Mutation change handler
444
749
  */
445
- export declare interface ThrottleOptions<T extends (...args: any[]) => any = any> {
750
+ export declare type MutationHandler = (mutations: MutationRecord[], observer: MutationObserver) => void;
751
+
752
+ /**
753
+ * Mutation directive options
754
+ */
755
+ export declare interface MutationOptions {
446
756
  /**
447
- * Function to throttle
757
+ * Callback when mutations occur
758
+ * @required
448
759
  */
449
- handler: T;
760
+ handler: MutationHandler;
450
761
  /**
451
- * Delay time in milliseconds
452
- * @default 300
762
+ * Whether to observe attribute changes
763
+ * @default false
453
764
  */
454
- wait?: number;
765
+ attributes?: boolean;
455
766
  /**
456
- * Whether to invoke immediately before delay starts
457
- * @default true
767
+ * Specific attributes to observe
458
768
  */
459
- leading?: boolean;
769
+ attributeFilter?: string[];
460
770
  /**
461
- * Whether to invoke after delay ends
771
+ * Whether to observe child node additions/removals
462
772
  * @default true
463
773
  */
464
- trailing?: boolean;
774
+ childList?: boolean;
775
+ /**
776
+ * Whether to observe all descendants, not just direct children
777
+ * @default false
778
+ */
779
+ subtree?: boolean;
780
+ /**
781
+ * Whether to observe character data changes
782
+ * @default false
783
+ */
784
+ characterData?: boolean;
785
+ /**
786
+ * Whether to record old attribute values
787
+ * @default false
788
+ */
789
+ attributeOldValue?: boolean;
790
+ /**
791
+ * Whether to record old character data
792
+ * @default false
793
+ */
794
+ characterDataOldValue?: boolean;
795
+ /**
796
+ * Whether to disable
797
+ * @default false
798
+ */
799
+ disabled?: boolean;
465
800
  }
466
801
 
467
802
  /**
468
- * v-click-outside directive
469
- *
470
- * @example
471
- * ```vue
472
- * <template>
473
- * <div v-click-outside="handleClickOutside">
474
- * Dropdown menu
475
- * </div>
476
- * </template>
477
- * ```
803
+ * Parse time argument
804
+ * Supports formats: "300" | "300ms" | "1s"
478
805
  */
479
- declare const vClickOutside: Directive;
480
- export { vClickOutside as clickOutside }
481
- export { vClickOutside }
806
+ export declare function parseTime(arg?: string): number | null;
482
807
 
483
808
  /**
484
- * v-copy directive
485
- *
486
- * @example
487
- * ```vue
488
- * <template>
489
- * <button v-copy="textToCopy">Copy Text</button>
490
- * </template>
491
- * ```
809
+ * Permission action mode
492
810
  */
493
- declare const vCopy: Directive;
494
- export { vCopy as copy }
811
+ export declare type PermissionAction = 'remove' | 'disable' | 'hide';
812
+
813
+ /**
814
+ * Directive binding value type
815
+ */
816
+ export declare type PermissionBinding = string | string[] | PermissionOptions;
817
+
818
+ /**
819
+ * Permission configuration
820
+ */
821
+ export declare interface PermissionConfig {
822
+ /** Get current user's permissions */
823
+ getPermissions: () => string[];
824
+ /** Get current user's roles */
825
+ getRoles?: () => string[];
826
+ /** Role to permission mapping */
827
+ roleMap?: Record<string, string[]>;
828
+ }
829
+
830
+ /**
831
+ * Permission check mode
832
+ */
833
+ declare type PermissionMode = 'some' | 'every';
834
+
835
+ /**
836
+ * Permission directive options
837
+ */
838
+ export declare interface PermissionOptions {
839
+ /** Permission value(s) to check */
840
+ value: string | string[];
841
+ /** Logic for multiple permissions: 'some' (OR) or 'every' (AND). Default: 'some' */
842
+ mode?: PermissionMode;
843
+ /** Action when permission denied. Default: 'remove' */
844
+ action?: PermissionAction;
845
+ /** Custom permission check function */
846
+ check?: (permission: string | string[], mode: PermissionMode) => boolean;
847
+ /** Callback when permission state changes */
848
+ onChange?: (hasPermission: boolean) => void;
849
+ }
850
+
851
+ /**
852
+ * Reset Vue version (useful for testing)
853
+ */
854
+ export declare function resetVueVersion(): void;
855
+
856
+ /**
857
+ * Directive binding value type
858
+ */
859
+ export declare type ResizeBinding = ResizeHandler | ResizeOptions;
860
+
861
+ /**
862
+ * Resize event handler
863
+ */
864
+ export declare type ResizeHandler = (entry: ResizeObserverEntry) => void;
865
+
866
+ /**
867
+ * Resize information
868
+ */
869
+ export declare interface ResizeInfo {
870
+ /** New width */
871
+ width: number;
872
+ /** New height */
873
+ height: number;
874
+ /** Content rect */
875
+ contentRect: DOMRectReadOnly;
876
+ /** Border box size */
877
+ borderBoxSize: ReadonlyArray<ResizeObserverSize>;
878
+ /** Content box size */
879
+ contentBoxSize: ReadonlyArray<ResizeObserverSize>;
880
+ /** Device pixel content box size */
881
+ devicePixelContentBoxSize: ReadonlyArray<ResizeObserverSize>;
882
+ }
883
+
884
+ /**
885
+ * Resize directive options
886
+ */
887
+ export declare interface ResizeOptions {
888
+ /**
889
+ * Resize event handler
890
+ * @required
891
+ */
892
+ handler: ResizeHandler;
893
+ /**
894
+ * Whether to disable
895
+ * @default false
896
+ */
897
+ disabled?: boolean;
898
+ /**
899
+ * Whether to use box model
900
+ * - 'content-box': size of content area
901
+ * - 'border-box': size of border box
902
+ * - 'device-pixel-content-box': size in device pixels
903
+ * @default 'content-box'
904
+ */
905
+ box?: 'content-box' | 'border-box' | 'device-pixel-content-box';
906
+ /**
907
+ * Debounce time in milliseconds
908
+ * @default 0 (no debounce)
909
+ */
910
+ debounce?: number;
911
+ /**
912
+ * Callback for browsers without ResizeObserver (uses object fallback)
913
+ */
914
+ onFallback?: (info: ResizeInfo) => void;
915
+ }
916
+
917
+ /**
918
+ * Directive binding value type
919
+ */
920
+ export declare type RippleBinding = boolean | string | RippleOptions;
921
+
922
+ /**
923
+ * Ripple directive options
924
+ */
925
+ export declare interface RippleOptions {
926
+ /**
927
+ * Ripple color
928
+ * @default 'currentColor'
929
+ */
930
+ color?: string;
931
+ /**
932
+ * Ripple duration in milliseconds
933
+ * @default 600
934
+ */
935
+ duration?: number;
936
+ /**
937
+ * Whether to disable ripple
938
+ * @default false
939
+ */
940
+ disabled?: boolean;
941
+ /**
942
+ * Initial scale of ripple
943
+ * @default 0
944
+ */
945
+ initialScale?: number;
946
+ /**
947
+ * Final scale of ripple
948
+ * @default 2
949
+ */
950
+ finalScale?: number;
951
+ }
952
+
953
+ /**
954
+ * Directive binding value type
955
+ */
956
+ export declare type SanitizeBinding = boolean | SanitizeOptions;
957
+
958
+ /**
959
+ * Sanitize handler
960
+ */
961
+ export declare type SanitizeHandler = (value: string) => string;
962
+
963
+ /**
964
+ * Sanitize directive options
965
+ */
966
+ export declare interface SanitizeOptions {
967
+ /**
968
+ * Tags to allow (whitelist)
969
+ * @default []
970
+ */
971
+ allowedTags?: string[];
972
+ /**
973
+ * Attributes to allow (whitelist)
974
+ * @default []
975
+ */
976
+ allowedAttributes?: string[];
977
+ /**
978
+ * Whether to allow data URLs
979
+ * @default false
980
+ */
981
+ allowDataUrls?: boolean;
982
+ /**
983
+ * Whether to allow inline styles
984
+ * @default false
985
+ */
986
+ allowStyles?: boolean;
987
+ /**
988
+ * Whether to allow class attribute
989
+ * @default false
990
+ */
991
+ allowClass?: boolean;
992
+ /**
993
+ * Whether to allow id attribute
994
+ * @default false
995
+ */
996
+ allowId?: boolean;
997
+ /**
998
+ * Custom sanitize function
999
+ */
1000
+ handler?: SanitizeHandler;
1001
+ /**
1002
+ * Whether to disable
1003
+ * @default false
1004
+ */
1005
+ disabled?: boolean;
1006
+ /**
1007
+ * Whether to sanitize on update
1008
+ * @default true
1009
+ */
1010
+ sanitizeOnUpdate?: boolean;
1011
+ }
1012
+
1013
+ /**
1014
+ * Directive binding value type
1015
+ */
1016
+ export declare type ScrollBinding = ScrollHandler | ScrollOptions_2;
1017
+
1018
+ /**
1019
+ * Scroll event handler
1020
+ */
1021
+ export declare type ScrollHandler = (event: Event, info: ScrollInfo) => void;
1022
+
1023
+ /**
1024
+ * Scroll information
1025
+ */
1026
+ export declare interface ScrollInfo {
1027
+ /** Current scroll left position */
1028
+ scrollLeft: number;
1029
+ /** Current scroll top position */
1030
+ scrollTop: number;
1031
+ /** Maximum scroll left */
1032
+ scrollLeftMax: number;
1033
+ /** Maximum scroll top */
1034
+ scrollTopMax: number;
1035
+ /** Horizontal scroll progress (0-1) */
1036
+ progressX: number;
1037
+ /** Vertical scroll progress (0-1) */
1038
+ progressY: number;
1039
+ /** Direction of horizontal scroll (-1: left, 1: right, 0: none) */
1040
+ directionX: -1 | 0 | 1;
1041
+ /** Direction of vertical scroll (-1: up, 1: down, 0: none) */
1042
+ directionY: -1 | 0 | 1;
1043
+ /** Scroll container element or window */
1044
+ container: Element | Window;
1045
+ }
1046
+
1047
+ /**
1048
+ * Scroll directive options
1049
+ */
1050
+ declare interface ScrollOptions_2 {
1051
+ /**
1052
+ * Scroll event handler
1053
+ * @required
1054
+ */
1055
+ handler: ScrollHandler;
1056
+ /**
1057
+ * Whether to disable
1058
+ * @default false
1059
+ */
1060
+ disabled?: boolean;
1061
+ /**
1062
+ * Whether to use passive event listener
1063
+ * @default true
1064
+ */
1065
+ passive?: boolean;
1066
+ /**
1067
+ * Throttle time in milliseconds
1068
+ * @default 0 (no throttle)
1069
+ */
1070
+ throttle?: number;
1071
+ /**
1072
+ * Custom scroll container selector or element
1073
+ */
1074
+ container?: string | Element | Window | null;
1075
+ }
1076
+ export { ScrollOptions_2 as ScrollOptions }
1077
+
1078
+ /**
1079
+ * Set nested property value by path
1080
+ */
1081
+ export declare function set(obj: Record<string, any>, path: string, value: any): void;
1082
+
1083
+ /**
1084
+ * Set Vue version explicitly (for cases where auto-detection fails)
1085
+ */
1086
+ export declare function setVueVersion(version: VueVersion): void;
1087
+
1088
+ export declare type StickyBinding = boolean | number | StickyOptions;
1089
+
1090
+ /**
1091
+ * Sticky directive options
1092
+ */
1093
+ export declare interface StickyOptions {
1094
+ /** Top offset when sticky @default 0 */
1095
+ top?: number | string;
1096
+ /** Bottom offset when sticky */
1097
+ bottom?: number | string;
1098
+ /** Z-index when sticky @default 100 */
1099
+ zIndex?: number;
1100
+ /** CSS class to add when sticky @default 'v-sticky--fixed' */
1101
+ stickyClass?: string;
1102
+ /** Whether to disable @default false */
1103
+ disabled?: boolean;
1104
+ /** Callback when sticky state changes */
1105
+ onChange?: (isSticky: boolean) => void;
1106
+ /** Custom scroll container */
1107
+ container?: string | Element | null;
1108
+ }
1109
+
1110
+ /**
1111
+ * Check if Clipboard API is supported
1112
+ */
1113
+ export declare const supportsClipboard: () => boolean;
1114
+
1115
+ /**
1116
+ * Check if IntersectionObserver is supported
1117
+ */
1118
+ export declare const supportsIntersectionObserver: () => boolean;
1119
+
1120
+ /**
1121
+ * Check if MutationObserver is supported
1122
+ */
1123
+ export declare const supportsMutationObserver: () => boolean;
1124
+
1125
+ /**
1126
+ * Check if passive event listening is supported
1127
+ */
1128
+ export declare const supportsPassive: () => boolean;
1129
+
1130
+ /**
1131
+ * Check if ResizeObserver is supported
1132
+ */
1133
+ export declare const supportsResizeObserver: () => boolean;
1134
+
1135
+ /**
1136
+ * Directive binding value type
1137
+ */
1138
+ export declare type ThrottleBinding<T extends (...args: any[]) => any = any> = T | ThrottleOptions<T>;
1139
+
1140
+ /**
1141
+ * Throttled function type
1142
+ */
1143
+ export declare interface ThrottledFunction<T extends (...args: any[]) => any> {
1144
+ (...args: Parameters<T>): void;
1145
+ cancel: () => void;
1146
+ }
1147
+
1148
+ /**
1149
+ * Throttle function
1150
+ */
1151
+ export declare function throttleFn<T extends (...args: any[]) => any>(func: T, wait?: number, options?: {
1152
+ leading?: boolean;
1153
+ trailing?: boolean;
1154
+ }): ((...args: Parameters<T>) => void) & {
1155
+ cancel: () => void;
1156
+ };
1157
+
1158
+ /**
1159
+ * Throttle directive options
1160
+ */
1161
+ export declare interface ThrottleOptions<T extends (...args: any[]) => any = any> {
1162
+ /**
1163
+ * Function to throttle
1164
+ */
1165
+ handler: T;
1166
+ /**
1167
+ * Delay time in milliseconds
1168
+ * @default 300
1169
+ */
1170
+ wait?: number;
1171
+ /**
1172
+ * Whether to invoke immediately before delay starts
1173
+ * @default true
1174
+ */
1175
+ leading?: boolean;
1176
+ /**
1177
+ * Whether to invoke after delay ends
1178
+ * @default true
1179
+ */
1180
+ trailing?: boolean;
1181
+ }
1182
+
1183
+ /**
1184
+ * v-click-outside directive
1185
+ *
1186
+ * @example
1187
+ * ```vue
1188
+ * <template>
1189
+ * <div v-click-outside="handleClickOutside">
1190
+ * Dropdown menu
1191
+ * </div>
1192
+ * </template>
1193
+ * ```
1194
+ */
1195
+ declare const vClickOutside: Directive;
1196
+ export { vClickOutside as clickOutside }
1197
+ export { vClickOutside }
1198
+
1199
+ /**
1200
+ * v-copy directive
1201
+ *
1202
+ * @example
1203
+ * ```vue
1204
+ * <template>
1205
+ * <button v-copy="textToCopy">Copy Text</button>
1206
+ * </template>
1207
+ * ```
1208
+ */
1209
+ declare const vCopy: Directive;
1210
+ export { vCopy as copy }
495
1211
  export { vCopy }
496
1212
 
497
1213
  /**
@@ -527,6 +1243,283 @@ declare const vFocus: Directive;
527
1243
  export { vFocus as focus }
528
1244
  export { vFocus }
529
1245
 
1246
+ /**
1247
+ * v-hover directive
1248
+ *
1249
+ * @example
1250
+ * ```vue
1251
+ * <template>
1252
+ * <div v-hover="handleHover">Hover me</div>
1253
+ * <div v-hover="{ onEnter: handleEnter, onLeave: handleLeave, class: 'is-hovering' }">Hover me</div>
1254
+ * </template>
1255
+ * ```
1256
+ */
1257
+ declare const vHover: Directive;
1258
+ export { vHover as hover }
1259
+ export { vHover }
1260
+
1261
+ /**
1262
+ * v-infinite-scroll directive
1263
+ *
1264
+ * @example
1265
+ * ```vue
1266
+ * <template>
1267
+ * <div v-infinite-scroll="loadMore" class="scroll-container">
1268
+ * <div v-for="item in items" :key="item.id">{{ item.name }}</div>
1269
+ * </div>
1270
+ *
1271
+ * <div v-infinite-scroll="{ handler: loadMore, distance: 100, disabled: isLoading }">
1272
+ * <div v-for="item in items" :key="item.id">{{ item.name }}</div>
1273
+ * </div>
1274
+ * </template>
1275
+ * ```
1276
+ */
1277
+ declare const vInfiniteScroll: Directive;
1278
+ export { vInfiniteScroll as infiniteScroll }
1279
+ export { vInfiniteScroll }
1280
+
1281
+ /**
1282
+ * v-intersect directive
1283
+ *
1284
+ * @example
1285
+ * ```vue
1286
+ * <div v-intersect="handleIntersect">Observe me</div>
1287
+ * <div v-intersect="{ onEnter: handleEnter, onLeave: handleLeave }">Track visibility</div>
1288
+ * <div v-intersect="{ threshold: 0.5, once: true }">Trigger once at 50%</div>
1289
+ * ```
1290
+ */
1291
+ declare const vIntersect: Directive;
1292
+ export { vIntersect as intersect }
1293
+ export { vIntersect }
1294
+
1295
+ /**
1296
+ * Directive binding value type
1297
+ */
1298
+ export declare type VisibleBinding = boolean | VisibleOptions;
1299
+
1300
+ /**
1301
+ * Visible change handler
1302
+ */
1303
+ export declare type VisibleHandler = (isVisible: boolean) => void;
1304
+
1305
+ /**
1306
+ * Visible directive options
1307
+ */
1308
+ export declare interface VisibleOptions {
1309
+ /**
1310
+ * Callback when visibility changes
1311
+ */
1312
+ handler?: VisibleHandler;
1313
+ /**
1314
+ * Whether to disable
1315
+ * @default false
1316
+ */
1317
+ disabled?: boolean;
1318
+ /**
1319
+ * Whether to set visibility: hidden instead of display: none
1320
+ * @default false
1321
+ */
1322
+ useHidden?: boolean;
1323
+ /**
1324
+ * Initial visibility
1325
+ * @default true
1326
+ */
1327
+ initial?: boolean;
1328
+ }
1329
+
1330
+ /**
1331
+ * v-lazy directive
1332
+ *
1333
+ * @example
1334
+ * ```vue
1335
+ * <template>
1336
+ * <img v-lazy="imageUrl" />
1337
+ * <img v-lazy="{ src: imageUrl, placeholder: 'placeholder.jpg' }" />
1338
+ * <div v-lazy="backgroundImageUrl"></div>
1339
+ * </template>
1340
+ * ```
1341
+ */
1342
+ declare const vLazy: Directive;
1343
+ export { vLazy as lazy }
1344
+ export { vLazy }
1345
+
1346
+ /**
1347
+ * v-loading directive
1348
+ *
1349
+ * @example
1350
+ * ```vue
1351
+ * <template>
1352
+ * <div v-loading="isLoading">Content</div>
1353
+ * <div v-loading="{ value: isLoading, text: 'Loading...' }">Content</div>
1354
+ * <div v-loading="{ value: isLoading, lock: true }">Locked scroll while loading</div>
1355
+ * </template>
1356
+ * ```
1357
+ */
1358
+ declare const vLoading: Directive;
1359
+ export { vLoading as loading }
1360
+ export { vLoading }
1361
+
1362
+ /**
1363
+ * v-long-press directive
1364
+ *
1365
+ * @example
1366
+ * ```vue
1367
+ * <template>
1368
+ * <button v-long-press="handleLongPress">Long Press Me</button>
1369
+ * <button v-long-press="{ handler: handleLongPress, duration: 1000 }">1 Second Press</button>
1370
+ * </template>
1371
+ * ```
1372
+ */
1373
+ declare const vLongPress: Directive;
1374
+ export { vLongPress as longPress }
1375
+ export { vLongPress }
1376
+
1377
+ /**
1378
+ * v-mask directive
1379
+ *
1380
+ * @example
1381
+ * ```vue
1382
+ * <input v-mask="'###-##-####'" placeholder="SSN" />
1383
+ * <input v-mask="'(###) ###-####'" placeholder="Phone" />
1384
+ * <input v-mask="{ mask: '##/##/####' }" placeholder="Date" />
1385
+ * ```
1386
+ */
1387
+ declare const vMask: Directive;
1388
+ export { vMask as mask }
1389
+ export { vMask }
1390
+
1391
+ /**
1392
+ * v-mutation directive
1393
+ *
1394
+ * @example
1395
+ * ```vue
1396
+ * <template>
1397
+ * <div v-mutation="handleMutation">Observe my changes</div>
1398
+ * <div v-mutation="{ handler: handleMutation, attributes: true, subtree: true }">
1399
+ * Observe attributes and subtree
1400
+ * </div>
1401
+ * </template>
1402
+ *
1403
+ * <script setup>
1404
+ * function handleMutation(mutations: MutationRecord[], observer: MutationObserver) {
1405
+ * mutations.forEach(mutation => {
1406
+ * console.log('Type:', mutation.type)
1407
+ * console.log('Target:', mutation.target)
1408
+ * })
1409
+ * }
1410
+ * </script>
1411
+ * ```
1412
+ */
1413
+ declare const vMutation: Directive;
1414
+ export { vMutation as mutation }
1415
+ export { vMutation }
1416
+
1417
+ /**
1418
+ * v-permission directive
1419
+ *
1420
+ * Controls element visibility and state based on user permissions.
1421
+ * Supports role-based and permission-based access control with wildcard support.
1422
+ *
1423
+ * @example
1424
+ * ```vue
1425
+ * <template>
1426
+ * <button v-permission="'admin'">Admin Only</button>
1427
+ * <button v-permission="['admin', 'editor']">Admin or Editor</button>
1428
+ * <button v-permission="{ value: ['read', 'write'], mode: 'every' }">Read & Write</button>
1429
+ * <button v-permission="{ value: 'admin', action: 'disable' }">Disabled for non-admin</button>
1430
+ * </template>
1431
+ *
1432
+ * <script setup>
1433
+ * import { configurePermission } from 'directix'
1434
+ *
1435
+ * configurePermission({
1436
+ * getPermissions: () => store.getters.permissions,
1437
+ * getRoles: () => store.getters.roles,
1438
+ * roleMap: { admin: ['*'], editor: ['read', 'write'] }
1439
+ * })
1440
+ * </script>
1441
+ * ```
1442
+ */
1443
+ declare const vPermission: Directive;
1444
+ export { vPermission as permission }
1445
+ export { vPermission }
1446
+
1447
+ /**
1448
+ * v-resize directive
1449
+ *
1450
+ * @example
1451
+ * ```vue
1452
+ * <template>
1453
+ * <div v-resize="handleResize">Resize me</div>
1454
+ * <div v-resize="{ handler: handleResize, debounce: 200 }">Debounced resize</div>
1455
+ * </template>
1456
+ * ```
1457
+ */
1458
+ declare const vResize: Directive;
1459
+ export { vResize as resize }
1460
+ export { vResize }
1461
+
1462
+ /**
1463
+ * v-ripple directive
1464
+ *
1465
+ * @example
1466
+ * ```vue
1467
+ * <template>
1468
+ * <button v-ripple>Click me</button>
1469
+ * <button v-ripple="'rgba(255, 255, 255, 0.3)'">Custom color</button>
1470
+ * <button v-ripple="{ color: 'red', duration: 800 }">Custom options</button>
1471
+ * </template>
1472
+ * ```
1473
+ */
1474
+ declare const vRipple: Directive;
1475
+ export { vRipple as ripple }
1476
+ export { vRipple }
1477
+
1478
+ /**
1479
+ * v-sanitize directive
1480
+ *
1481
+ * @example
1482
+ * ```vue
1483
+ * <template>
1484
+ * <div v-sanitize v-html="userContent"></div>
1485
+ * <div v-sanitize="{ allowedTags: ['b', 'i', 'p'] }" v-html="userContent"></div>
1486
+ * <div v-sanitize="{ handler: customSanitizer }" v-html="userContent"></div>
1487
+ * </template>
1488
+ * ```
1489
+ */
1490
+ declare const vSanitize: Directive;
1491
+ export { vSanitize as sanitize }
1492
+ export { vSanitize }
1493
+
1494
+ /**
1495
+ * v-scroll directive
1496
+ *
1497
+ * @example
1498
+ * ```vue
1499
+ * <template>
1500
+ * <div v-scroll="handleScroll">Scroll container</div>
1501
+ * <div v-scroll="{ handler: handleScroll, throttle: 100 }">Throttled scroll</div>
1502
+ * </template>
1503
+ * ```
1504
+ */
1505
+ declare const vScroll: Directive;
1506
+ export { vScroll as scroll }
1507
+ export { vScroll }
1508
+
1509
+ /**
1510
+ * v-sticky directive
1511
+ *
1512
+ * @example
1513
+ * ```vue
1514
+ * <div v-sticky>Sticky header</div>
1515
+ * <div v-sticky="50">Sticky with 50px top offset</div>
1516
+ * <div v-sticky="{ top: 60, zIndex: 1000 }">Custom sticky</div>
1517
+ * ```
1518
+ */
1519
+ declare const vSticky: Directive;
1520
+ export { vSticky as sticky }
1521
+ export { vSticky }
1522
+
530
1523
  /**
531
1524
  * v-throttle directive
532
1525
  *
@@ -568,4 +1561,28 @@ export declare interface Vue3DirectiveHooks {
568
1561
  unmounted?: (el: any, binding: any, vnode: any, prevVnode: any) => void;
569
1562
  }
570
1563
 
1564
+ /**
1565
+ * Vue version type
1566
+ * - 2: Vue 2.6.x (requires @vue/composition-api for Composition API)
1567
+ * - 2.7: Vue 2.7.x (has built-in Composition API support)
1568
+ * - 3: Vue 3.x
1569
+ */
1570
+ export declare type VueVersion = 2 | 2.7 | 3;
1571
+
1572
+ /**
1573
+ * v-visible directive
1574
+ *
1575
+ * @example
1576
+ * ```vue
1577
+ * <template>
1578
+ * <div v-visible="showElement">Show/Hide</div>
1579
+ * <div v-visible="{ handler: onVisibleChange }">Track visibility</div>
1580
+ * <div v-visible="{ useHidden: true, initial: false }">Uses visibility: hidden</div>
1581
+ * </template>
1582
+ * ```
1583
+ */
1584
+ declare const vVisible: Directive;
1585
+ export { vVisible }
1586
+ export { vVisible as visible }
1587
+
571
1588
  export { }