directix 1.8.0 → 1.10.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
@@ -1,7 +1,10 @@
1
+ import { App } from 'vue';
1
2
  import { ComponentPublicInstance } from 'vue';
3
+ import { ComputedRef } from 'vue';
2
4
  import { Directive } from 'vue';
3
5
  import { Plugin as Plugin_2 } from 'vue';
4
6
  import { Ref } from 'vue';
7
+ import { ShallowRef } from 'vue';
5
8
  import { VNode } from 'vue';
6
9
 
7
10
  /**
@@ -14,6 +17,145 @@ export declare function addCleanupVue2(el: Element, fn: () => void): void;
14
17
  */
15
18
  export declare function addCleanupVue3(el: Element, fn: () => void): void;
16
19
 
20
+ /**
21
+ * Add non-passive event listener (for events that need preventDefault)
22
+ */
23
+ export declare function addNonPassiveListener(element: EventTarget, event: string, handler: EventListener, options?: AddEventListenerOptions): () => void;
24
+
25
+ /**
26
+ * Add passive event listener
27
+ */
28
+ export declare function addPassiveListener(element: EventTarget, event: string, handler: EventListener, options?: AddEventListenerOptions): () => void;
29
+
30
+ /**
31
+ * Announce a message to screen readers
32
+ */
33
+ export declare function announce(message: string, options?: AnnounceOptions): void;
34
+
35
+ /**
36
+ * Announce message to screen readers
37
+ */
38
+ export declare interface AnnounceOptions {
39
+ /** Priority level */
40
+ priority?: ARIALivePriority;
41
+ /** Time before clearing message */
42
+ timeout?: number;
43
+ /** Whether to clear queue */
44
+ clear?: boolean;
45
+ }
46
+
47
+ /**
48
+ * Apply ARIA attributes to an element
49
+ */
50
+ export declare function applyAriaAttributes(el: HTMLElement, config: ARIAConfig): void;
51
+
52
+ /**
53
+ * ARIA attribute configuration
54
+ */
55
+ export declare interface ARIAConfig {
56
+ /** Role */
57
+ role?: ARIARole;
58
+ /** State attributes */
59
+ ariaExpanded?: boolean;
60
+ ariaSelected?: boolean;
61
+ ariaChecked?: boolean;
62
+ ariaDisabled?: boolean;
63
+ ariaHidden?: boolean;
64
+ ariaBusy?: boolean;
65
+ ariaPressed?: boolean;
66
+ ariaCurrent?: 'page' | 'step' | 'location' | 'date' | 'time' | boolean;
67
+ /** Property attributes */
68
+ ariaLabel?: string;
69
+ ariaLabelledBy?: string;
70
+ ariaDescribedBy?: string;
71
+ ariaControls?: string;
72
+ ariaOwns?: string;
73
+ ariaHasPopup?: ARIAPopupType | boolean;
74
+ ariaAutoComplete?: 'inline' | 'list' | 'both' | 'none';
75
+ /** Live region attributes */
76
+ ariaLive?: ARIALivePriority;
77
+ ariaAtomic?: boolean;
78
+ ariaRelevant?: 'additions' | 'removals' | 'text' | 'all';
79
+ /** Other attributes */
80
+ ariaValueNow?: number;
81
+ ariaValueMin?: number;
82
+ ariaValueMax?: number;
83
+ ariaValueText?: string;
84
+ ariaPlaceholder?: string;
85
+ ariaRequired?: boolean;
86
+ ariaReadonly?: boolean;
87
+ ariaModal?: boolean;
88
+ /** Tab index */
89
+ tabIndex?: number;
90
+ }
91
+
92
+ /**
93
+ * ARIA live region priority
94
+ */
95
+ export declare type ARIALivePriority = 'off' | 'polite' | 'assertive';
96
+
97
+ /**
98
+ * ARIA popup type
99
+ */
100
+ export declare type ARIAPopupType = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'tooltip';
101
+
102
+ /**
103
+ * A11y (Accessibility) Utilities for Directix
104
+ *
105
+ * Provides comprehensive accessibility support including:
106
+ * - ARIA attribute management
107
+ * - Keyboard navigation
108
+ * - Screen reader announcements
109
+ * - Focus management
110
+ */
111
+ /**
112
+ * ARIA role types
113
+ */
114
+ export declare type ARIARole = 'alert' | 'alertdialog' | 'application' | 'article' | 'banner' | 'button' | 'cell' | 'checkbox' | 'columnheader' | 'combobox' | 'complementary' | 'contentinfo' | 'definition' | 'dialog' | 'directory' | 'document' | 'feed' | 'figure' | 'form' | 'grid' | 'gridcell' | 'group' | 'heading' | 'img' | 'link' | 'list' | 'listbox' | 'listitem' | 'log' | 'main' | 'marquee' | 'math' | 'menu' | 'menubar' | 'menuitem' | 'menuitemcheckbox' | 'menuitemradio' | 'navigation' | 'none' | 'note' | 'option' | 'presentation' | 'progressbar' | 'radio' | 'radiogroup' | 'region' | 'row' | 'rowgroup' | 'rowheader' | 'scrollbar' | 'search' | 'searchbox' | 'separator' | 'slider' | 'spinbutton' | 'status' | 'switch' | 'tab' | 'table' | 'tablist' | 'tabpanel' | 'term' | 'textbox' | 'timer' | 'toolbar' | 'tooltip' | 'tree' | 'treegrid' | 'treeitem';
115
+
116
+ /**
117
+ * Assert a condition and throw an error if false
118
+ */
119
+ declare function assert_2(condition: boolean, message: string, directive?: string): asserts condition;
120
+ export { assert_2 as assert }
121
+
122
+ /**
123
+ * Assert a number is positive
124
+ */
125
+ export declare function assertPositive(value: number, directive: string, param: string): void;
126
+
127
+ /**
128
+ * Assert a number is within range
129
+ */
130
+ export declare function assertRange(value: number, min: number, max: number, directive: string, param: string): void;
131
+
132
+ /**
133
+ * Assert a parameter type
134
+ */
135
+ declare function assertType_2<T>(value: unknown, type: 'string' | 'number' | 'boolean' | 'object' | 'function' | 'symbol' | 'bigint' | 'undefined', directive: string, param: string): asserts value is T;
136
+ export { assertType_2 as assertType }
137
+
138
+ /**
139
+ * Auto-generate ARIA attributes based on directive type
140
+ */
141
+ export declare interface AutoAriaOptions {
142
+ /** Directive type */
143
+ type: 'tooltip' | 'menu' | 'dialog' | 'popover' | 'dropdown' | 'modal' | 'alert' | 'region';
144
+ /** Label for the element */
145
+ label?: string;
146
+ /** Whether element is expanded */
147
+ expanded?: boolean;
148
+ /** Whether element is disabled */
149
+ disabled?: boolean;
150
+ /** Related element ID */
151
+ relatedId?: string;
152
+ }
153
+
154
+ /**
155
+ * Calculate statistics from metrics
156
+ */
157
+ export declare function calculateStats(metrics: PerformanceMetric[]): PerformanceStats;
158
+
17
159
  /**
18
160
  * Calculate remaining time
19
161
  */
@@ -32,6 +174,26 @@ export declare function capitalizeText(text: string, options?: {
32
174
  */
33
175
  export declare function capitalizeWord(word: string): string;
34
176
 
177
+ /**
178
+ * Clear the announcer
179
+ */
180
+ export declare function clearAnnouncer(): void;
181
+
182
+ /**
183
+ * Clear all ARIA attributes from an element
184
+ */
185
+ export declare function clearAriaAttributes(el: HTMLElement): void;
186
+
187
+ /**
188
+ * Clear DevTools state
189
+ */
190
+ export declare function clearDevtoolsState(): void;
191
+
192
+ /**
193
+ * Clear all performance metrics
194
+ */
195
+ export declare function clearPerformanceMetrics(): void;
196
+
35
197
  /**
36
198
  * Click delay handler
37
199
  */
@@ -78,6 +240,26 @@ export declare interface ComposableThrottledFunction<T extends (...args: any[])
78
240
  cancel: () => void;
79
241
  }
80
242
 
243
+ /**
244
+ * Computed ref with automatic cleanup
245
+ */
246
+ export declare function computedWithCleanup<T>(options: ComputedWithCleanupOptions<T>): ComputedRef<T>;
247
+
248
+ /**
249
+ * Options for computed with cleanup
250
+ */
251
+ export declare interface ComputedWithCleanupOptions<T> {
252
+ /** Getter function */
253
+ get: () => T;
254
+ /** Cleanup function called when dependencies change or on unmount */
255
+ cleanup?: (value: T) => void;
256
+ }
257
+
258
+ /**
259
+ * Configure performance monitoring
260
+ */
261
+ export declare function configurePerformance(config: Partial<PerformanceConfig>): void;
262
+
81
263
  /**
82
264
  * Configure permission directive
83
265
  */
@@ -168,6 +350,55 @@ export declare function createCapitalizer(options?: {
168
350
  */
169
351
  export declare function createDelayedClick(handler: ClickDelayHandler, delay?: number): (event: MouseEvent | TouchEvent) => void;
170
352
 
353
+ /**
354
+ * Create a directive from a template
355
+ *
356
+ * @example
357
+ * ```ts
358
+ * const vMyDirective = createDirectiveTemplate({
359
+ * name: 'my-directive',
360
+ * onMount(el, options) {
361
+ * el.style.color = options.color
362
+ * },
363
+ * onUpdate(el, options) {
364
+ * el.style.color = options.color
365
+ * },
366
+ * onUnmount(el) {
367
+ * el.style.color = ''
368
+ * },
369
+ * })
370
+ * ```
371
+ */
372
+ export declare function createDirectiveTemplate<T = any, B extends Element = Element>(template: DirectiveTemplateOptions<T, B>): Directive;
373
+
374
+ /**
375
+ * Create a simple event-based directive template
376
+ *
377
+ * @example
378
+ * ```ts
379
+ * const vTrack = createEventDirective({
380
+ * name: 'track',
381
+ * eventName: 'click',
382
+ * handler(el, binding, event) {
383
+ * analytics.track(binding.value, { element: el.tagName })
384
+ * },
385
+ * })
386
+ * ```
387
+ */
388
+ export declare function createEventDirective(options: {
389
+ name: string;
390
+ eventName: string;
391
+ handler: (el: HTMLElement, binding: any, event: Event) => void;
392
+ /** Options for addEventListener */
393
+ listenerOptions?: boolean | AddEventListenerOptions;
394
+ ssr?: boolean;
395
+ }): Directive;
396
+
397
+ /**
398
+ * Create i18n instance
399
+ */
400
+ export declare function createI18n(options: I18nOptions): I18nInstance;
401
+
171
402
  /**
172
403
  * Create a lowercase transformation function
173
404
  *
@@ -258,6 +489,34 @@ export declare function createPermissionChecker(config: {
258
489
  roleMap?: Record<string, string[]>;
259
490
  }): (value: string | string[], mode?: PermissionMode) => boolean;
260
491
 
492
+ /**
493
+ * Create safe content handler
494
+ */
495
+ export declare function createSafeContentHandler(config?: XSSProtectionConfig): SafeContentHandler;
496
+
497
+ /**
498
+ * Create a style-based directive template
499
+ *
500
+ * @example
501
+ * ```ts
502
+ * const vOpacity = createStyleDirective({
503
+ * name: 'opacity',
504
+ * cssProperty: 'opacity',
505
+ * defaultUnit: '',
506
+ * })
507
+ * ```
508
+ */
509
+ export declare function createStyleDirective(options: {
510
+ name: string;
511
+ /** CSS property name */
512
+ cssProperty: string;
513
+ /** Default unit (e.g., 'px', '%') */
514
+ defaultUnit?: string;
515
+ /** Validate value */
516
+ validate?: (value: any) => boolean;
517
+ ssr?: boolean;
518
+ }): Directive;
519
+
261
520
  /**
262
521
  * Create a trim function with preset options
263
522
  *
@@ -337,6 +596,38 @@ export declare function createWatermarkUrl(content: string | string[], options?:
337
596
  */
338
597
  export declare type CrossVersionDirective = Directive | Vue2DirectiveHooks | Vue3DirectiveHooks;
339
598
 
599
+ /**
600
+ * CSP Configuration
601
+ */
602
+ export declare interface CSPConfig {
603
+ /** Disable inline scripts */
604
+ noInlineScripts?: boolean;
605
+ /** Disable inline styles */
606
+ noInlineStyles?: boolean;
607
+ /** Disable eval */
608
+ noEval?: boolean;
609
+ /** Nonce for inline scripts/styles */
610
+ nonce?: string;
611
+ }
612
+
613
+ /**
614
+ * Date format options per region
615
+ */
616
+ export declare interface DateFormatOptions {
617
+ /** Date format pattern */
618
+ datePattern: string;
619
+ /** Time format pattern */
620
+ timePattern: string;
621
+ /** 12/24 hour format */
622
+ hourCycle: 'h12' | 'h23' | 'h24';
623
+ /** First day of week (0=Sunday, 1=Monday) */
624
+ firstDayOfWeek: number;
625
+ /** Date separator */
626
+ dateSeparator: string;
627
+ /** Time separator */
628
+ timeSeparator: string;
629
+ }
630
+
340
631
  /**
341
632
  * Simple debounce function wrapper
342
633
  *
@@ -363,6 +654,11 @@ export declare function debounceFn<T extends (...args: any[]) => any>(fn: T, wai
363
654
  trailing?: boolean;
364
655
  }): ComposableDebouncedFunction<T>;
365
656
 
657
+ /**
658
+ * Show a debug message (only in development)
659
+ */
660
+ export declare function debug(message: string, params?: Record<string, any>): void;
661
+
366
662
  /**
367
663
  * Deep clone an object
368
664
  */
@@ -389,6 +685,46 @@ export declare function defineDirectiveGroup(name: string, directives: Record<st
389
685
  install: (app: any) => void;
390
686
  };
391
687
 
688
+ /**
689
+ * Define a Directix plugin
690
+ */
691
+ export declare function definePlugin(plugin: DirectixPlugin): DirectixPlugin;
692
+
693
+ /**
694
+ * Dependency vulnerability info
695
+ */
696
+ export declare interface DependencyVulnerability {
697
+ /** Package name */
698
+ name: string;
699
+ /** Installed version */
700
+ version: string;
701
+ /** Vulnerability ID (e.g., CVE, GHSA) */
702
+ id?: string;
703
+ /** Severity level */
704
+ severity: 'critical' | 'high' | 'medium' | 'low';
705
+ /** Vulnerability title */
706
+ title: string;
707
+ /** URL for more info */
708
+ url?: string;
709
+ /** Patched versions */
710
+ patchedVersions?: string;
711
+ }
712
+
713
+ /**
714
+ * Detect user locale info
715
+ */
716
+ export declare function detectLocaleInfo(): LocaleInfo;
717
+
718
+ /**
719
+ * DevTools event
720
+ */
721
+ export declare interface DevtoolsEvent {
722
+ type: 'directive:mounted' | 'directive:updated' | 'directive:unmounted' | 'plugin:install' | 'plugin:uninstall';
723
+ name: string;
724
+ timestamp: number;
725
+ data?: any;
726
+ }
727
+
392
728
  /**
393
729
  * Unified directive binding object
394
730
  */
@@ -419,6 +755,23 @@ export declare interface DirectiveDefinition<T = any, B extends Element = Elemen
419
755
  defaults?: Partial<T>;
420
756
  }
421
757
 
758
+ /**
759
+ * Directive-specific error helper
760
+ */
761
+ export declare function directiveError(directive: string, message: string, params?: Record<string, any>): void;
762
+
763
+ /**
764
+ * Directive extension hook
765
+ */
766
+ export declare interface DirectiveExtension {
767
+ /** Target directive name */
768
+ target: string;
769
+ /** Hook to extend */
770
+ hook: 'mounted' | 'updated' | 'unmounted' | 'beforeMount' | 'afterMount';
771
+ /** Extension handler */
772
+ handler: (el: any, binding: any, vnode: any, prevVnode?: any) => void | Promise<void>;
773
+ }
774
+
422
775
  /**
423
776
  * Unified directive hooks
424
777
  */
@@ -448,6 +801,23 @@ export declare interface DirectiveHooks<T = any, B extends Element = Element> {
448
801
  unmounted?: (el: B, binding: DirectiveBinding<T>, vnode: VNode) => void;
449
802
  }
450
803
 
804
+ /**
805
+ * Vue DevTools Integration
806
+ *
807
+ * Provides debugging capabilities for Directix through Vue DevTools.
808
+ * Shows registered directives, plugins, and performance metrics.
809
+ */
810
+ /**
811
+ * Directive info for DevTools
812
+ */
813
+ export declare interface DirectiveInfo {
814
+ name: string;
815
+ element?: string;
816
+ bindings: number;
817
+ lastUpdated: number;
818
+ options?: Record<string, any>;
819
+ }
820
+
451
821
  /**
452
822
  * Directive installation options
453
823
  */
@@ -460,21 +830,225 @@ export declare interface DirectiveInstallOptions {
460
830
  config?: Record<string, any>;
461
831
  }
462
832
 
833
+ /**
834
+ * Options for directive instance with Vue 3 reactivity
835
+ */
836
+ export declare interface DirectiveInstanceOptions<T = any> {
837
+ /** Initial state */
838
+ initialState?: T;
839
+ /** Whether to use shallow reactive (better for large objects) */
840
+ shallow?: boolean;
841
+ }
842
+
843
+ /**
844
+ * Per-directive messages
845
+ */
846
+ declare interface DirectiveMessages {
847
+ description: string;
848
+ params?: Record<string, string>;
849
+ errors?: Record<string, string>;
850
+ warnings?: Record<string, string>;
851
+ }
852
+
853
+ /**
854
+ * Directive performance metrics
855
+ */
856
+ export declare interface DirectivePerformance {
857
+ /** Directive name */
858
+ name: string;
859
+ /** Mount stats */
860
+ mount: PerformanceStats;
861
+ /** Update stats */
862
+ update: PerformanceStats;
863
+ /** Unmount stats */
864
+ unmount: PerformanceStats;
865
+ /** Total time spent */
866
+ totalTime: number;
867
+ /** Call count */
868
+ callCount: number;
869
+ }
870
+
871
+ /**
872
+ * Directive template options
873
+ */
874
+ export declare interface DirectiveTemplateOptions<T = any, B extends Element = Element> {
875
+ /** Directive name */
876
+ name: string;
877
+ /** SSR safe */
878
+ ssr?: boolean;
879
+ /** Default options */
880
+ defaults?: Partial<T>;
881
+ /** Called when directive is mounted */
882
+ onMount: (el: B, options: T, binding: any) => void;
883
+ /** Called when directive is updated */
884
+ onUpdate?: (el: B, options: T, binding: any) => void;
885
+ /** Called when directive is unmounted */
886
+ onUnmount: (el: B, state: Record<string, any>) => void;
887
+ /** Validate options */
888
+ validate?: (options: T) => string | null;
889
+ /** Normalize binding value to options */
890
+ normalize?: (binding: any) => T;
891
+ }
892
+
893
+ /**
894
+ * Directive-specific warning helper
895
+ */
896
+ export declare function directiveWarn(directive: string, message: string, params?: Record<string, any>): void;
897
+
463
898
  /**
464
899
  * Directix plugin
465
900
  */
466
901
  export declare const Directix: Plugin_2;
467
902
 
903
+ /**
904
+ * Plugin definition
905
+ */
906
+ export declare interface DirectixPlugin {
907
+ /** Plugin metadata */
908
+ meta: PluginMeta;
909
+ /** Install function - called when plugin is registered */
910
+ install: (ctx: PluginContext) => void | Promise<void>;
911
+ /** Uninstall function - called when plugin is removed */
912
+ uninstall?: (ctx: PluginContext) => void | Promise<void>;
913
+ /** Plugin dependencies */
914
+ dependencies?: string[];
915
+ }
916
+
917
+ /**
918
+ * Disable DevTools integration
919
+ */
920
+ export declare function disableDevtools(): void;
921
+
922
+ /**
923
+ * Disable performance monitoring
924
+ */
925
+ export declare function disablePerformance(): void;
926
+
468
927
  /**
469
928
  * Draggable axis
470
929
  */
471
930
  export declare type DraggableAxis = 'x' | 'y' | 'both';
472
931
 
932
+ /**
933
+ * Enable DevTools integration
934
+ */
935
+ export declare function enableDevtools(): void;
936
+
937
+ /**
938
+ * Enable performance monitoring
939
+ */
940
+ export declare function enablePerformance(): void;
941
+
942
+ /**
943
+ * End a performance measurement
944
+ */
945
+ export declare function endMeasure(markId: string, directive: string, phase: 'mount' | 'update' | 'unmount', metadata?: Record<string, any>): void;
946
+
947
+ /**
948
+ * Create teleport target if not exists
949
+ */
950
+ export declare function ensureTeleportTarget(target: string): HTMLElement | null;
951
+
952
+ export declare const enUS: I18nMessages;
953
+
954
+ /**
955
+ * Show an error message
956
+ */
957
+ export declare function error(options: WarningOptions): void;
958
+
959
+ export declare function error(message: string, params?: Record<string, any>): void;
960
+
961
+ /**
962
+ * Global error messages
963
+ */
964
+ declare interface ErrorMessages {
965
+ invalid_param: string;
966
+ missing_required: string;
967
+ type_error: string;
968
+ value_out_of_range: string;
969
+ not_supported: string;
970
+ ssr_not_supported: string;
971
+ }
972
+
973
+ /**
974
+ * Escape HTML entities
975
+ */
976
+ export declare function escapeHtml(str: string): string;
977
+
473
978
  /**
474
979
  * Export format type
475
980
  */
476
981
  export declare type ExportFormat = 'csv' | 'json' | 'txt' | 'html';
477
982
 
983
+ /**
984
+ * Export performance metrics as JSON
985
+ */
986
+ export declare function exportPerformanceData(): {
987
+ config: PerformanceConfig;
988
+ metrics: PerformanceMetric[];
989
+ report: DirectivePerformance[];
990
+ };
991
+
992
+ /**
993
+ * Extended touch gesture types
994
+ */
995
+ export declare type ExtendedGestureType = 'tap' | 'doubleTap' | 'longPress' | 'swipe' | 'pan' | 'pinch' | 'pinchIn' | 'pinchOut' | 'rotate' | 'twoFingerTap' | 'threeFingerTap' | 'edgeSwipe';
996
+
997
+ /**
998
+ * Extended touch gesture event
999
+ */
1000
+ export declare interface ExtendedTouchEvent {
1001
+ /** Gesture type */
1002
+ type: ExtendedGestureType;
1003
+ /** Swipe direction (for swipe gesture) */
1004
+ direction?: 'left' | 'right' | 'up' | 'down';
1005
+ /** Distance in pixels */
1006
+ distance?: number;
1007
+ /** Velocity in px/s */
1008
+ velocity?: number;
1009
+ /** Angle in degrees */
1010
+ angle?: number;
1011
+ /** Scale factor (for pinch) */
1012
+ scale?: number;
1013
+ /** Rotation in degrees */
1014
+ rotation?: number;
1015
+ /** Center point */
1016
+ center?: {
1017
+ x: number;
1018
+ y: number;
1019
+ };
1020
+ /** Original touch event */
1021
+ event: TouchEvent;
1022
+ /** Duration in ms */
1023
+ duration?: number;
1024
+ }
1025
+
1026
+ /**
1027
+ * Focus trap options
1028
+ */
1029
+ export declare interface FocusTrapOptions {
1030
+ /** Initial focus element */
1031
+ initialFocus?: HTMLElement | string | (() => HTMLElement | null);
1032
+ /** Elements to allow focus escape */
1033
+ allowOutsideClick?: boolean | ((event: MouseEvent | TouchEvent) => boolean);
1034
+ /** Enable escape key */
1035
+ escapeDeactivates?: boolean;
1036
+ /** Callback on activate */
1037
+ onActivate?: () => void;
1038
+ /** Callback on deactivate */
1039
+ onDeactivate?: () => void;
1040
+ }
1041
+
1042
+ /**
1043
+ * Format currency with locale-specific format
1044
+ */
1045
+ export declare function formatCurrencyLocale(value: number, options?: Partial<NumberFormatOptions>): string;
1046
+
1047
+ /**
1048
+ * Format date with locale-specific pattern
1049
+ */
1050
+ export declare function formatDateLocale(date: Date | string | number, options?: Partial<DateFormatOptions>): string;
1051
+
478
1052
  /**
479
1053
  * Format number to money string
480
1054
  */
@@ -497,11 +1071,21 @@ export declare function formatNumber(value: number, options?: {
497
1071
  suffix?: string;
498
1072
  }): string;
499
1073
 
1074
+ /**
1075
+ * Format number with locale-specific separators
1076
+ */
1077
+ export declare function formatNumberLocale(value: number, decimals?: number, options?: Partial<NumberFormatOptions>): string;
1078
+
500
1079
  /**
501
1080
  * Format time to string
502
1081
  */
503
1082
  export declare function formatTime(time: CountdownTime, format: string | CountdownFormatFunction): string;
504
1083
 
1084
+ /**
1085
+ * Generate unique ID for ARIA references
1086
+ */
1087
+ export declare function generateAriaId(prefix?: string): string;
1088
+
505
1089
  /**
506
1090
  * Generate unique ID
507
1091
  */
@@ -512,11 +1096,101 @@ export declare function generateId(prefix?: string): string;
512
1096
  */
513
1097
  export declare function get<T = any>(obj: Record<string, any>, path: string, defaultValue?: T): T;
514
1098
 
1099
+ /**
1100
+ * Get default ARIA config for directive type
1101
+ */
1102
+ export declare function getAutoAriaConfig(options: AutoAriaOptions): ARIAConfig;
1103
+
1104
+ /**
1105
+ * Get CSP nonce from meta tag
1106
+ */
1107
+ export declare function getCSPNonce(): string | null;
1108
+
1109
+ /**
1110
+ * Get region-specific date format
1111
+ */
1112
+ export declare function getDateFormat(region?: string): DateFormatOptions;
1113
+
1114
+ /**
1115
+ * Get device pixel ratio
1116
+ */
1117
+ export declare function getDevicePixelRatio(): number;
1118
+
1119
+ /**
1120
+ * Get DevTools state (for external access)
1121
+ */
1122
+ export declare function getDevtoolsState(): {
1123
+ enabled: boolean;
1124
+ directiveCount: number;
1125
+ pluginCount: number;
1126
+ eventCount: number;
1127
+ };
1128
+
1129
+ /**
1130
+ * Get performance metrics for a specific directive
1131
+ */
1132
+ export declare function getDirectiveMetrics(directive: string): PerformanceMetric[];
1133
+
1134
+ /**
1135
+ * Get current locale
1136
+ */
1137
+ export declare function getLocale(): string;
1138
+
1139
+ /**
1140
+ * Get locale display name
1141
+ */
1142
+ export declare function getLocaleDisplayName(locale: string, displayLocale?: string): string;
1143
+
1144
+ /**
1145
+ * Get most frequently called directives
1146
+ */
1147
+ export declare function getMostFrequentDirectives(limit?: number): DirectivePerformance[];
1148
+
1149
+ /**
1150
+ * Get region-specific number format
1151
+ */
1152
+ export declare function getNumberFormat(region?: string): NumberFormatOptions;
1153
+
1154
+ /**
1155
+ * Get all performance metrics
1156
+ */
1157
+ export declare function getPerformanceMetrics(): PerformanceMetric[];
1158
+
1159
+ /**
1160
+ * Get performance report for all directives
1161
+ */
1162
+ export declare function getPerformanceReport(): DirectivePerformance[];
1163
+
515
1164
  /**
516
1165
  * Get current configuration
517
1166
  */
518
1167
  export declare function getPermissionConfig(): PermissionConfig | null;
519
1168
 
1169
+ /**
1170
+ * Get or create the global plugin manager
1171
+ */
1172
+ export declare function getPluginManager(config?: PluginConfig): PluginManager;
1173
+
1174
+ /**
1175
+ * Get or create the global plugin registry
1176
+ */
1177
+ export declare function getPluginRegistry(registryUrl?: string): PluginRegistry;
1178
+
1179
+ /**
1180
+ * Get slowest directives
1181
+ */
1182
+ export declare function getSlowestDirectives(limit?: number): DirectivePerformance[];
1183
+
1184
+ /**
1185
+ * Get all supported regions
1186
+ */
1187
+ export declare function getSupportedRegions(): string[];
1188
+
1189
+ /**
1190
+ * Get timezone info
1191
+ */
1192
+ export declare function getTimezoneInfo(): TimezoneInfo;
1193
+
520
1194
  /**
521
1195
  * Get current Vue version
522
1196
  */
@@ -556,6 +1230,54 @@ export declare interface HotkeyDefinition {
556
1230
  disabled?: boolean | Ref<boolean>;
557
1231
  }
558
1232
 
1233
+ /**
1234
+ * i18n instance type
1235
+ */
1236
+ export declare interface I18nInstance {
1237
+ locale: string;
1238
+ fallbackLocale: string;
1239
+ messages: I18nMessages;
1240
+ setLocale: (locale: string) => void;
1241
+ t: (key: string, params?: Record<string, any>) => string;
1242
+ }
1243
+
1244
+ /**
1245
+ * i18n type definitions
1246
+ */
1247
+ /**
1248
+ * Locale messages structure
1249
+ */
1250
+ export declare interface I18nMessages {
1251
+ directives: Record<string, DirectiveMessages>;
1252
+ errors: ErrorMessages;
1253
+ warnings: WarningMessages;
1254
+ help: Record<string, string>;
1255
+ }
1256
+
1257
+ /**
1258
+ * i18n options
1259
+ */
1260
+ export declare interface I18nOptions {
1261
+ locale?: string;
1262
+ fallbackLocale?: string;
1263
+ messages: Record<string, I18nMessages>;
1264
+ }
1265
+
1266
+ /**
1267
+ * Show an info message
1268
+ */
1269
+ export declare function info(message: string, params?: Record<string, any>): void;
1270
+
1271
+ /**
1272
+ * CSP-safe script injection
1273
+ */
1274
+ export declare function injectScriptCSP(src: string, options?: CSPConfig): HTMLScriptElement | null;
1275
+
1276
+ /**
1277
+ * CSP-safe style injection
1278
+ */
1279
+ export declare function injectStylesCSP(css: string, options?: CSPConfig): HTMLStyleElement | HTMLLinkElement | null;
1280
+
559
1281
  /**
560
1282
  * Intersect event handler
561
1283
  */
@@ -576,6 +1298,11 @@ export declare function isBoolean(value: unknown): value is boolean;
576
1298
  */
577
1299
  export declare const isBrowser: () => boolean;
578
1300
 
1301
+ /**
1302
+ * Check if DevTools is available
1303
+ */
1304
+ export declare function isDevtoolsAvailable(): boolean;
1305
+
579
1306
  /**
580
1307
  * Check if value is empty
581
1308
  */
@@ -586,6 +1313,11 @@ export declare function isEmpty(value: unknown): boolean;
586
1313
  */
587
1314
  export declare function isFunction(value: unknown): value is (...args: any[]) => any;
588
1315
 
1316
+ /**
1317
+ * Check if device is mobile
1318
+ */
1319
+ export declare function isMobileDevice(): boolean;
1320
+
589
1321
  /**
590
1322
  * Check if value is a number
591
1323
  */
@@ -596,6 +1328,11 @@ export declare function isNumber(value: unknown): value is number;
596
1328
  */
597
1329
  export declare function isObject(value: unknown): value is Record<string, any>;
598
1330
 
1331
+ /**
1332
+ * Check if performance monitoring is enabled
1333
+ */
1334
+ export declare function isPerformanceEnabled(): boolean;
1335
+
599
1336
  /**
600
1337
  * Check if value is a Promise
601
1338
  */
@@ -611,6 +1348,16 @@ export declare const isSSR: () => boolean;
611
1348
  */
612
1349
  export declare function isString(value: unknown): value is string;
613
1350
 
1351
+ /**
1352
+ * Check if device supports touch
1353
+ */
1354
+ export declare function isTouchDevice(): boolean;
1355
+
1356
+ /**
1357
+ * Check if URL is safe
1358
+ */
1359
+ export declare function isUrlSafe(url: string, allowedProtocols?: string[]): boolean;
1360
+
614
1361
  /**
615
1362
  * Check if Vue 2 (includes 2.7)
616
1363
  */
@@ -631,11 +1378,72 @@ export declare function isVue3(): boolean;
631
1378
  */
632
1379
  export declare type ItemSizeFunction = (index: number) => number;
633
1380
 
1381
+ export declare const jaJP: I18nMessages;
1382
+
1383
+ /**
1384
+ * Keyboard navigation configuration
1385
+ */
1386
+ export declare interface KeyboardNavigationConfig {
1387
+ /** Keys for next item */
1388
+ nextKeys?: string[];
1389
+ /** Keys for previous item */
1390
+ prevKeys?: string[];
1391
+ /** Keys for selection */
1392
+ selectKeys?: string[];
1393
+ /** Keys for closing */
1394
+ closeKeys?: string[];
1395
+ /** Keys for home */
1396
+ homeKeys?: string[];
1397
+ /** Keys for end */
1398
+ endKeys?: string[];
1399
+ /** Focus trap enabled */
1400
+ focusTrap?: boolean;
1401
+ /** Whether element should receive initial focus */
1402
+ initialFocus?: string | HTMLElement | (() => HTMLElement | null);
1403
+ /** Return focus on close */
1404
+ returnFocus?: boolean;
1405
+ /** Navigation mode */
1406
+ mode?: 'linear' | 'grid' | 'tree';
1407
+ /** Loop navigation */
1408
+ loop?: boolean;
1409
+ /** Roving tabindex enabled */
1410
+ rovingTabindex?: boolean;
1411
+ }
1412
+
634
1413
  /**
635
1414
  * Lazy loading state
636
1415
  */
637
1416
  export declare type LazyState = 'pending' | 'loading' | 'loaded' | 'error';
638
1417
 
1418
+ /**
1419
+ * Locale info
1420
+ */
1421
+ export declare interface LocaleInfo {
1422
+ /** Locale code (e.g., 'zh-CN') */
1423
+ locale: string;
1424
+ /** Language code (e.g., 'zh') */
1425
+ language: string;
1426
+ /** Region/country code (e.g., 'CN') */
1427
+ region: string | null;
1428
+ /** Script code (e.g., 'Hant') */
1429
+ script: string | null;
1430
+ /** Browser detected locale */
1431
+ browserLocale: string;
1432
+ /** System timezone */
1433
+ timezone: string;
1434
+ }
1435
+
1436
+ /**
1437
+ * Unified warning/error system for Directix directives
1438
+ *
1439
+ * Provides structured, localized error messages with:
1440
+ * - Directive name context
1441
+ * - Parameter validation messages
1442
+ * - Stack trace in development mode
1443
+ * - Warning levels (debug, info, warn, error)
1444
+ */
1445
+ declare type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1446
+
639
1447
  /**
640
1448
  * Lottie animation state
641
1449
  */
@@ -646,11 +1454,87 @@ export declare type LottieAnimationState = 'playing' | 'paused' | 'stopped';
646
1454
  */
647
1455
  export declare function lowercaseText(text: string, firstOnly?: boolean): string;
648
1456
 
1457
+ /**
1458
+ * Performance measurement helper
1459
+ * Use this to wrap directive lifecycle methods
1460
+ */
1461
+ export declare function measurePerformance<T>(directive: string, phase: 'mount' | 'update' | 'unmount', fn: () => T, metadata?: Record<string, any>): T;
1462
+
1463
+ /**
1464
+ * Async performance measurement helper
1465
+ */
1466
+ export declare function measurePerformanceAsync<T>(directive: string, phase: 'mount' | 'update' | 'unmount', fn: () => Promise<T>, metadata?: Record<string, any>): Promise<T>;
1467
+
649
1468
  /**
650
1469
  * Mutation change handler
651
1470
  */
652
1471
  export declare type MutationHandler = (mutations: MutationRecord[], observer: MutationObserver) => void;
653
1472
 
1473
+ /**
1474
+ * Number format options per region
1475
+ */
1476
+ export declare interface NumberFormatOptions {
1477
+ /** Decimal separator */
1478
+ decimalSeparator: string;
1479
+ /** Thousands separator */
1480
+ thousandsSeparator: string;
1481
+ /** Currency symbol */
1482
+ currencySymbol: string;
1483
+ /** Currency position ('before' or 'after') */
1484
+ currencyPosition: 'before' | 'after';
1485
+ /** Decimal places for currency */
1486
+ currencyDecimals: number;
1487
+ }
1488
+
1489
+ /**
1490
+ * Object pool for reusing objects (memory optimization)
1491
+ */
1492
+ export declare class ObjectPool<T> {
1493
+ private pool;
1494
+ private factory;
1495
+ private reset;
1496
+ private maxSize;
1497
+ constructor(factory: () => T, reset: (item: T) => void, maxSize?: number);
1498
+ acquire(): T;
1499
+ release(item: T): void;
1500
+ get size(): number;
1501
+ clear(): void;
1502
+ }
1503
+
1504
+ /**
1505
+ * Vue 3 Optimization Utilities for Directix
1506
+ *
1507
+ * These utilities leverage Vue 3 specific APIs for better performance
1508
+ * when running in Vue 3 environments.
1509
+ */
1510
+ /**
1511
+ * Options for optimized lazy loading
1512
+ */
1513
+ export declare interface OptimizedLazyOptions {
1514
+ /** Threshold for intersection observer */
1515
+ threshold?: number | number[];
1516
+ /** Root margin for intersection observer */
1517
+ rootMargin?: string;
1518
+ /** Whether to disconnect after first load */
1519
+ once?: boolean;
1520
+ /** Callback when element becomes visible */
1521
+ onLoad?: (entry: IntersectionObserverEntry) => void;
1522
+ }
1523
+
1524
+ /**
1525
+ * State for optimized lazy loading
1526
+ */
1527
+ export declare interface OptimizedLazyState {
1528
+ /** Whether loading is in progress */
1529
+ loading: boolean;
1530
+ /** Whether resource is loaded */
1531
+ loaded: boolean;
1532
+ /** Error if loading failed */
1533
+ error: Error | null;
1534
+ /** Whether element is visible */
1535
+ isVisible: boolean;
1536
+ }
1537
+
654
1538
  /**
655
1539
  * Pan gesture event data
656
1540
  */
@@ -669,6 +1553,15 @@ export declare interface PanEvent {
669
1553
  velocity: number;
670
1554
  }
671
1555
 
1556
+ /**
1557
+ * Parse locale string into components
1558
+ */
1559
+ export declare function parseLocale(locale: string): {
1560
+ language: string;
1561
+ region: string | null;
1562
+ script: string | null;
1563
+ };
1564
+
672
1565
  /**
673
1566
  * Parse formatted money string to number
674
1567
  */
@@ -697,6 +1590,61 @@ export declare function parseTargetTime(target: Date | number | string): number;
697
1590
  */
698
1591
  export declare function parseTime(arg?: string): number | null;
699
1592
 
1593
+ /**
1594
+ * Performance configuration
1595
+ */
1596
+ export declare interface PerformanceConfig {
1597
+ /** Enable performance monitoring */
1598
+ enabled: boolean;
1599
+ /** Maximum metrics to store */
1600
+ maxMetrics: number;
1601
+ /** Sample rate (0-1) */
1602
+ sampleRate: number;
1603
+ /** Warn threshold in ms */
1604
+ warnThreshold: number;
1605
+ }
1606
+
1607
+ /**
1608
+ * Performance Monitoring
1609
+ *
1610
+ * Provides performance metrics and monitoring for Directix directives.
1611
+ */
1612
+ /**
1613
+ * Performance metric types
1614
+ */
1615
+ export declare interface PerformanceMetric {
1616
+ /** Metric name */
1617
+ name: string;
1618
+ /** Directive name */
1619
+ directive: string;
1620
+ /** Duration in milliseconds */
1621
+ duration: number;
1622
+ /** Timestamp */
1623
+ timestamp: number;
1624
+ /** Additional metadata */
1625
+ metadata?: Record<string, any>;
1626
+ }
1627
+
1628
+ /**
1629
+ * Performance statistics
1630
+ */
1631
+ export declare interface PerformanceStats {
1632
+ /** Total calls */
1633
+ totalCalls: number;
1634
+ /** Average duration */
1635
+ averageDuration: number;
1636
+ /** Min duration */
1637
+ minDuration: number;
1638
+ /** Max duration */
1639
+ maxDuration: number;
1640
+ /** P50 (median) */
1641
+ p50: number;
1642
+ /** P95 */
1643
+ p95: number;
1644
+ /** P99 */
1645
+ p99: number;
1646
+ }
1647
+
700
1648
  /**
701
1649
  * Permission configuration
702
1650
  */
@@ -710,22 +1658,266 @@ declare interface PermissionConfig {
710
1658
  }
711
1659
 
712
1660
  /**
713
- * Permission check mode
1661
+ * Permission check mode
1662
+ */
1663
+ export declare type PermissionMode = 'some' | 'every';
1664
+
1665
+ /**
1666
+ * Pinch gesture event data
1667
+ */
1668
+ export declare interface PinchEvent {
1669
+ scale: number;
1670
+ distance: number;
1671
+ initialDistance: number;
1672
+ centerX: number;
1673
+ centerY: number;
1674
+ isPinching: boolean;
1675
+ isFirst: boolean;
1676
+ isFinal: boolean;
1677
+ }
1678
+
1679
+ /**
1680
+ * Plugin category
1681
+ */
1682
+ export declare type PluginCategory = 'event' | 'visibility' | 'scroll' | 'form' | 'ui' | 'security' | 'observer' | 'gesture' | 'other';
1683
+
1684
+ /**
1685
+ * Plugin configuration
1686
+ */
1687
+ export declare interface PluginConfig {
1688
+ /** Enable debug mode */
1689
+ debug?: boolean;
1690
+ /** Plugin registry URL */
1691
+ registryUrl?: string;
1692
+ /** Auto-load official plugins */
1693
+ autoLoadOfficial?: boolean;
1694
+ }
1695
+
1696
+ /**
1697
+ * Plugin context - provides utilities for plugins
1698
+ */
1699
+ export declare interface PluginContext {
1700
+ /** Vue app instance */
1701
+ app: App;
1702
+ /** Register a directive */
1703
+ registerDirective: (name: string, directive: Directive) => void;
1704
+ /** Register a composable */
1705
+ registerComposable: (name: string, composable: any) => void;
1706
+ /** Get an existing directive */
1707
+ getDirective: (name: string) => Directive | undefined;
1708
+ /** Show a warning */
1709
+ warn: (message: string) => void;
1710
+ /** Show an error */
1711
+ error: (message: string) => void;
1712
+ /** Plugin metadata */
1713
+ meta: PluginMeta;
1714
+ }
1715
+
1716
+ /**
1717
+ * Plugin hook types
1718
+ */
1719
+ export declare type PluginHook = 'beforeInstall' | 'afterInstall' | 'beforeUninstall' | 'afterUninstall';
1720
+
1721
+ /**
1722
+ * Plugin hook callback
1723
+ */
1724
+ export declare type PluginHookCallback = (plugin: DirectixPlugin, ctx: PluginContext) => void | Promise<void>;
1725
+
1726
+ /**
1727
+ * Plugin info for DevTools
1728
+ */
1729
+ export declare interface PluginInfo {
1730
+ name: string;
1731
+ version: string;
1732
+ description?: string;
1733
+ enabled: boolean;
1734
+ registeredAt: number;
1735
+ }
1736
+
1737
+ /**
1738
+ * Plugin manager class
1739
+ */
1740
+ export declare class PluginManager {
1741
+ private plugins;
1742
+ private hooks;
1743
+ private directives;
1744
+ private composables;
1745
+ private extensions;
1746
+ private app;
1747
+ private config;
1748
+ constructor(config?: PluginConfig);
1749
+ /**
1750
+ * Get the plugin registry instance
1751
+ */
1752
+ getRegistry(): PluginRegistry;
1753
+ /**
1754
+ * Set the Vue app instance
1755
+ */
1756
+ setApp(app: App): void;
1757
+ /**
1758
+ * Register a plugin
1759
+ */
1760
+ register(plugin: DirectixPlugin): Promise<void>;
1761
+ /**
1762
+ * Unregister a plugin
1763
+ */
1764
+ unregister(name: string): Promise<void>;
1765
+ /**
1766
+ * Check if a plugin is registered
1767
+ */
1768
+ has(name: string): boolean;
1769
+ /**
1770
+ * Get a registered plugin
1771
+ */
1772
+ get(name: string): DirectixPlugin | undefined;
1773
+ /**
1774
+ * Get all registered plugins
1775
+ */
1776
+ getAll(): DirectixPlugin[];
1777
+ /**
1778
+ * Register a hook
1779
+ */
1780
+ onHook(hook: PluginHook, callback: PluginHookCallback): void;
1781
+ /**
1782
+ * Remove a hook
1783
+ */
1784
+ offHook(hook: PluginHook, callback: PluginHookCallback): void;
1785
+ /**
1786
+ * Register a directive extension
1787
+ */
1788
+ extendDirective(extension: DirectiveExtension): void;
1789
+ /**
1790
+ * Get extensions for a directive
1791
+ */
1792
+ getExtensions(directiveName: string): DirectiveExtension[];
1793
+ /**
1794
+ * Get a registered directive
1795
+ */
1796
+ getDirective(name: string): Directive | undefined;
1797
+ /**
1798
+ * Get a registered composable
1799
+ */
1800
+ getComposable(name: string): any;
1801
+ /**
1802
+ * Create plugin context
1803
+ */
1804
+ private createContext;
1805
+ /**
1806
+ * Fire hooks
1807
+ */
1808
+ private fireHooks;
1809
+ }
1810
+
1811
+ /**
1812
+ * Plugin metadata
1813
+ */
1814
+ export declare interface PluginMeta {
1815
+ /** Plugin name */
1816
+ name: string;
1817
+ /** Plugin version */
1818
+ version: string;
1819
+ /** Plugin description */
1820
+ description?: string;
1821
+ /** Author name */
1822
+ author?: string;
1823
+ /** License */
1824
+ license?: string;
1825
+ /** Repository URL */
1826
+ repository?: string;
1827
+ /** Keywords for discovery */
1828
+ keywords?: string[];
1829
+ }
1830
+
1831
+ /**
1832
+ * Plugin registry class
1833
+ */
1834
+ export declare class PluginRegistry {
1835
+ private registryUrl;
1836
+ private cache;
1837
+ private cacheTime;
1838
+ private cacheTTL;
1839
+ constructor(registryUrl?: string);
1840
+ /**
1841
+ * Fetch plugin registry data
1842
+ */
1843
+ private fetchData;
1844
+ /**
1845
+ * Set registry data directly (useful for testing or local development)
1846
+ */
1847
+ setData(data: PluginRegistryData): void;
1848
+ /**
1849
+ * Get all plugins from the registry
1850
+ */
1851
+ getAll(): Promise<PluginRegistryEntry[]>;
1852
+ /**
1853
+ * Get a plugin by name
1854
+ */
1855
+ getByName(name: string): Promise<PluginRegistryEntry | undefined>;
1856
+ /**
1857
+ * Search plugins by query
1858
+ */
1859
+ search(query: string): Promise<PluginRegistryEntry[]>;
1860
+ /**
1861
+ * Get plugins by category
1862
+ */
1863
+ getByCategory(category: PluginCategory): Promise<PluginRegistryEntry[]>;
1864
+ /**
1865
+ * Get registry metadata
1866
+ */
1867
+ getMeta(): Promise<{
1868
+ version: number;
1869
+ updated: string;
1870
+ count: number;
1871
+ }>;
1872
+ /**
1873
+ * Install a plugin from the registry
1874
+ *
1875
+ * Note: This is a helper for programmatic installation.
1876
+ * For production use, install the package with your package manager first.
1877
+ */
1878
+ install(name: string, manager: PluginManager): Promise<void>;
1879
+ }
1880
+
1881
+ /**
1882
+ * Plugin registry data structure
714
1883
  */
715
- export declare type PermissionMode = 'some' | 'every';
1884
+ export declare interface PluginRegistryData {
1885
+ /** Registry version */
1886
+ version: number;
1887
+ /** Last updated date */
1888
+ updated: string;
1889
+ /** Plugin list */
1890
+ plugins: PluginRegistryEntry[];
1891
+ }
716
1892
 
717
1893
  /**
718
- * Pinch gesture event data
1894
+ * Plugin registry entry
719
1895
  */
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;
1896
+ export declare interface PluginRegistryEntry {
1897
+ /** Plugin name */
1898
+ name: string;
1899
+ /** Plugin version */
1900
+ version: string;
1901
+ /** Plugin description */
1902
+ description: string;
1903
+ /** NPM package name */
1904
+ package: string;
1905
+ /** Author */
1906
+ author: string;
1907
+ /** Keywords */
1908
+ keywords: string[];
1909
+ /** Category */
1910
+ category?: PluginCategory;
1911
+ /** Download count */
1912
+ downloads?: number;
1913
+ /** GitHub stars */
1914
+ stars?: number;
1915
+ /** Repository URL */
1916
+ repository?: string;
1917
+ /** Homepage URL */
1918
+ homepage?: string;
1919
+ /** License */
1920
+ license?: string;
729
1921
  }
730
1922
 
731
1923
  /**
@@ -756,6 +1948,43 @@ export declare type PullRefreshHandler = () => Promise<void> | void;
756
1948
  */
757
1949
  export declare type PullRefreshState = 'idle' | 'pulling' | 'ready' | 'loading' | 'success' | 'error';
758
1950
 
1951
+ /**
1952
+ * PWA configuration
1953
+ */
1954
+ export declare interface PWAConfig {
1955
+ /** Service worker configuration */
1956
+ serviceWorker?: {
1957
+ /** Enable service worker */
1958
+ enabled?: boolean;
1959
+ /** Service worker scope */
1960
+ scope?: string;
1961
+ /** Update strategy */
1962
+ updateStrategy?: 'auto' | 'manual';
1963
+ /** Registration path */
1964
+ path?: string;
1965
+ };
1966
+ /** Cache configuration */
1967
+ cache?: {
1968
+ /** Static resource strategy */
1969
+ static?: 'cache-first' | 'network-first' | 'stale-while-revalidate';
1970
+ /** Dynamic resource strategy */
1971
+ dynamic?: 'network-first' | 'cache-first';
1972
+ /** Maximum age in seconds */
1973
+ maxAge?: number;
1974
+ /** Maximum cache entries */
1975
+ maxSize?: number;
1976
+ };
1977
+ /** Offline support */
1978
+ offline?: {
1979
+ /** Enable offline support */
1980
+ enabled?: boolean;
1981
+ /** Fallback page */
1982
+ fallbackPage?: string;
1983
+ /** Show offline indicator */
1984
+ offlineIndicator?: boolean;
1985
+ };
1986
+ }
1987
+
759
1988
  /**
760
1989
  * Quick print function
761
1990
  *
@@ -776,6 +2005,16 @@ export declare type PullRefreshState = 'idle' | 'pulling' | 'ready' | 'loading'
776
2005
  */
777
2006
  export declare function quickPrint(target: string | HTMLElement, options?: UsePrintOptions): Promise<void>;
778
2007
 
2008
+ /**
2009
+ * Reset the global plugin manager
2010
+ */
2011
+ export declare function resetPluginManager(): void;
2012
+
2013
+ /**
2014
+ * Reset the global plugin registry
2015
+ */
2016
+ export declare function resetPluginRegistry(): void;
2017
+
779
2018
  /**
780
2019
  * Reset Vue version (useful for testing)
781
2020
  */
@@ -807,6 +2046,40 @@ export declare interface RotateGestureEvent {
807
2046
  isFinal: boolean;
808
2047
  }
809
2048
 
2049
+ /**
2050
+ * Safe content handler for directives
2051
+ */
2052
+ export declare class SafeContentHandler {
2053
+ private config;
2054
+ constructor(config?: XSSProtectionConfig);
2055
+ /**
2056
+ * Sanitize and set HTML content
2057
+ */
2058
+ setHtml(element: HTMLElement, content: string): void;
2059
+ /**
2060
+ * Sanitize and set text content
2061
+ */
2062
+ setText(element: HTMLElement, content: string): void;
2063
+ /**
2064
+ * Set attribute with URL validation
2065
+ */
2066
+ setAttribute(element: HTMLElement, name: string, value: string): void;
2067
+ /**
2068
+ * Get sanitized HTML
2069
+ */
2070
+ getSanitizedHtml(content: string): string;
2071
+ }
2072
+
2073
+ /**
2074
+ * Advanced HTML sanitizer
2075
+ */
2076
+ export declare function sanitizeHtml(html: string, config?: XSSProtectionConfig): string;
2077
+
2078
+ /**
2079
+ * Sanitize URL
2080
+ */
2081
+ export declare function sanitizeUrl(url: string, allowedProtocols?: string[]): string;
2082
+
810
2083
  /**
811
2084
  * Scroll direction
812
2085
  */
@@ -834,21 +2107,113 @@ export declare interface ScrollInfo {
834
2107
  directionY: ScrollDirection;
835
2108
  }
836
2109
 
2110
+ /**
2111
+ * Security audit utilities
2112
+ */
2113
+ export declare const SecurityAudit: {
2114
+ /**
2115
+ * Scan for potential security issues in HTML
2116
+ */
2117
+ scanHtml(html: string): SecurityVulnerability[];
2118
+ /**
2119
+ * Check CSP configuration
2120
+ */
2121
+ checkCSP(): {
2122
+ policies: Record<string, string[]>;
2123
+ warnings: string[];
2124
+ recommendations: string[];
2125
+ };
2126
+ /**
2127
+ * Check for known dependency vulnerabilities (Node.js environment only)
2128
+ * Note: This is a client-side check that uses npm audit API when available.
2129
+ * For production use, run `npm audit` or `pnpm audit` in CI/CD.
2130
+ */
2131
+ checkDependencies(): Promise<DependencyVulnerability[]>;
2132
+ /**
2133
+ * Generate security report
2134
+ */
2135
+ generateReport(html?: string): SecurityReport;
2136
+ /**
2137
+ * Format security report
2138
+ */
2139
+ formatReport(report: SecurityReport, format?: "text" | "json" | "html"): string;
2140
+ };
2141
+
2142
+ /**
2143
+ * Security scan result
2144
+ */
2145
+ export declare interface SecurityReport {
2146
+ /** Found vulnerabilities */
2147
+ vulnerabilities: SecurityVulnerability[];
2148
+ /** Warnings */
2149
+ warnings: SecurityVulnerability[];
2150
+ /** Recommendations */
2151
+ recommendations: string[];
2152
+ /** Scan timestamp */
2153
+ timestamp: Date;
2154
+ }
2155
+
2156
+ /**
2157
+ * Security vulnerability
2158
+ */
2159
+ export declare interface SecurityVulnerability {
2160
+ /** Severity level */
2161
+ severity: 'critical' | 'high' | 'medium' | 'low';
2162
+ /** Issue type */
2163
+ type: string;
2164
+ /** Description */
2165
+ description: string;
2166
+ /** Location */
2167
+ location?: string;
2168
+ /** Remediation suggestion */
2169
+ remediation?: string;
2170
+ }
2171
+
837
2172
  /**
838
2173
  * Set nested property value by path
839
2174
  */
840
2175
  export declare function set(obj: Record<string, any>, path: string, value: any): void;
841
2176
 
2177
+ /**
2178
+ * Set current locale
2179
+ */
2180
+ export declare function setLocale(locale: string): void;
2181
+
842
2182
  /**
843
2183
  * Set Vue version explicitly (for cases where auto-detection fails)
844
2184
  */
845
2185
  export declare function setVueVersion(version: VueVersion): void;
846
2186
 
2187
+ /**
2188
+ * Set development mode
2189
+ */
2190
+ export declare function setWarningDevMode(dev: boolean): void;
2191
+
2192
+ /**
2193
+ * Set i18n translation function
2194
+ */
2195
+ export declare function setWarningI18n(t: (key: string, params?: Record<string, any>) => string): void;
2196
+
2197
+ /**
2198
+ * Set global log level
2199
+ */
2200
+ export declare function setWarningLevel(level: LogLevel): void;
2201
+
847
2202
  /**
848
2203
  * Skeleton animation type
849
2204
  */
850
2205
  export declare type SkeletonAnimation = 'wave' | 'pulse' | 'none';
851
2206
 
2207
+ /**
2208
+ * Start a performance measurement
2209
+ */
2210
+ export declare function startMeasure(directive: string, phase: 'mount' | 'update' | 'unmount'): string;
2211
+
2212
+ /**
2213
+ * Strip all HTML tags
2214
+ */
2215
+ export declare function stripHtml(html: string): string;
2216
+
852
2217
  /**
853
2218
  * Check if Clipboard API is supported
854
2219
  */
@@ -874,6 +2239,18 @@ export declare const supportsPassive: () => boolean;
874
2239
  */
875
2240
  export declare const supportsResizeObserver: () => boolean;
876
2241
 
2242
+ /**
2243
+ * Suspense-ready async directive state
2244
+ */
2245
+ export declare interface SuspenseDirectiveState<T = any> {
2246
+ /** Loading state */
2247
+ loading: boolean;
2248
+ /** Error state */
2249
+ error: Error | null;
2250
+ /** Data */
2251
+ data: T | null;
2252
+ }
2253
+
877
2254
  /**
878
2255
  * Swipe direction
879
2256
  */
@@ -884,6 +2261,28 @@ export declare type SwipeDirection = 'left' | 'right' | 'up' | 'down';
884
2261
  */
885
2262
  export declare type SwipeHandler = (direction: SwipeDirection, event: Event) => void;
886
2263
 
2264
+ /**
2265
+ * Translate a message key
2266
+ * @param key - Dot-notation key like 'directives.debounce.invalid_wait'
2267
+ * @param params - Interpolation parameters
2268
+ */
2269
+ export declare function t(key: string, params?: Record<string, any>): string;
2270
+
2271
+ /**
2272
+ * Teleport content to target
2273
+ */
2274
+ export declare function teleportContent(content: HTMLElement, options: TeleportEnhanceOptions): () => void;
2275
+
2276
+ /**
2277
+ * Teleport enhancement options
2278
+ */
2279
+ export declare interface TeleportEnhanceOptions {
2280
+ /** Target selector or element */
2281
+ to: string | HTMLElement;
2282
+ /** Whether to teleport content */
2283
+ disabled?: boolean;
2284
+ }
2285
+
887
2286
  /**
888
2287
  * Simple throttle function wrapper
889
2288
  *
@@ -910,6 +2309,27 @@ export declare function throttleFn<T extends (...args: any[]) => any>(fn: T, wai
910
2309
  trailing?: boolean;
911
2310
  }): ComposableThrottledFunction<T>;
912
2311
 
2312
+ /**
2313
+ * Timezone and locale utilities
2314
+ *
2315
+ * Provides timezone-aware formatting and locale detection for Directix.
2316
+ */
2317
+ /**
2318
+ * Timezone info
2319
+ */
2320
+ export declare interface TimezoneInfo {
2321
+ /** Timezone identifier (e.g., 'Asia/Shanghai') */
2322
+ id: string;
2323
+ /** UTC offset in hours */
2324
+ offset: number;
2325
+ /** Offset string (e.g., '+08:00') */
2326
+ offsetString: string;
2327
+ /** Whether DST is active */
2328
+ isDST: boolean;
2329
+ /** Locale timezone name */
2330
+ name: string;
2331
+ }
2332
+
913
2333
  /**
914
2334
  * Tooltip placement
915
2335
  */
@@ -920,6 +2340,20 @@ export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
920
2340
  */
921
2341
  export declare type TooltipTrigger = 'hover' | 'click' | 'focus' | 'manual';
922
2342
 
2343
+ /**
2344
+ * Touch feedback configuration
2345
+ */
2346
+ export declare interface TouchFeedbackConfig {
2347
+ /** Enable haptic feedback */
2348
+ haptic?: boolean;
2349
+ /** Enable visual feedback */
2350
+ visual?: boolean;
2351
+ /** Visual feedback class name */
2352
+ visualClass?: string;
2353
+ /** Visual feedback duration in ms */
2354
+ visualDuration?: number;
2355
+ }
2356
+
923
2357
  /**
924
2358
  * Touch gesture type
925
2359
  */
@@ -942,6 +2376,51 @@ export declare interface TouchGestureEvent {
942
2376
  event: TouchEvent;
943
2377
  }
944
2378
 
2379
+ /**
2380
+ * Mobile Optimization Utilities for Directix
2381
+ *
2382
+ * Provides mobile-specific enhancements including:
2383
+ * - Touch gesture optimizations
2384
+ * - Passive event listeners
2385
+ * - Haptic feedback
2386
+ * - Performance optimizations
2387
+ * - PWA support utilities
2388
+ */
2389
+ /**
2390
+ * Touch gesture thresholds
2391
+ */
2392
+ export declare interface TouchGestureThresholds {
2393
+ /** Tap recognition threshold in pixels */
2394
+ tap?: number;
2395
+ /** Long press time threshold in ms */
2396
+ longPress?: number;
2397
+ /** Swipe distance threshold in pixels */
2398
+ swipe?: number;
2399
+ /** Pinch scale threshold */
2400
+ pinch?: number;
2401
+ /** Rotate angle threshold in degrees */
2402
+ rotate?: number;
2403
+ /** Double tap interval in ms */
2404
+ doubleTap?: number;
2405
+ /** Velocity threshold for swipe in px/s */
2406
+ swipeVelocity?: number;
2407
+ }
2408
+
2409
+ /**
2410
+ * Register a directive for DevTools tracking
2411
+ */
2412
+ export declare function trackDirective(name: string, info?: Partial<DirectiveInfo>): void;
2413
+
2414
+ /**
2415
+ * Register a plugin for DevTools tracking
2416
+ */
2417
+ export declare function trackPlugin(info: PluginInfo): void;
2418
+
2419
+ /**
2420
+ * Trigger haptic feedback
2421
+ */
2422
+ export declare function triggerHaptic(type?: 'light' | 'medium' | 'heavy' | 'selection'): void;
2423
+
945
2424
  /**
946
2425
  * Trim position
947
2426
  */
@@ -975,6 +2454,21 @@ export declare type TruncatePosition = 'start' | 'middle' | 'end';
975
2454
  */
976
2455
  export declare function truncateText(text: string, maxLength: number, ellipsis?: string): string;
977
2456
 
2457
+ /**
2458
+ * Unescape HTML entities
2459
+ */
2460
+ export declare function unescapeHtml(str: string): string;
2461
+
2462
+ /**
2463
+ * Unregister a directive from DevTools tracking
2464
+ */
2465
+ export declare function untrackDirective(name: string): void;
2466
+
2467
+ /**
2468
+ * Unregister a plugin from DevTools tracking
2469
+ */
2470
+ export declare function untrackPlugin(name: string): void;
2471
+
978
2472
  /**
979
2473
  * Transform text to uppercase
980
2474
  */
@@ -1726,6 +3220,28 @@ export declare interface UseDebounceReturn<T extends (...args: any[]) => any> {
1726
3220
  pending: () => boolean;
1727
3221
  }
1728
3222
 
3223
+ /**
3224
+ * Create a directive instance with Vue 3 optimizations
3225
+ * Uses markRaw for DOM elements and reactive/shallowReactive for state
3226
+ */
3227
+ export declare function useDirectiveInstance<T extends Record<string, any>>(options?: DirectiveInstanceOptions<T>): UseDirectiveInstanceReturn<T>;
3228
+
3229
+ /**
3230
+ * Return type for useDirectiveInstance
3231
+ */
3232
+ export declare interface UseDirectiveInstanceReturn<T> {
3233
+ /** The element (marked raw for performance) */
3234
+ element: HTMLElement | null;
3235
+ /** Reactive state */
3236
+ state: Readonly<T>;
3237
+ /** Set element and initialize */
3238
+ setElement: (el: HTMLElement) => void;
3239
+ /** Update state */
3240
+ setState: (updater: (prev: T) => T) => void;
3241
+ /** Reset state */
3242
+ reset: () => void;
3243
+ }
3244
+
1729
3245
  /**
1730
3246
  * Composable for making elements draggable
1731
3247
  *
@@ -1951,6 +3467,59 @@ export declare interface UseEmojiReturn {
1951
3467
  bind: (element: HTMLInputElement | HTMLTextAreaElement) => () => void;
1952
3468
  }
1953
3469
 
3470
+ /**
3471
+ * Enhanced touch composable with full gesture support
3472
+ */
3473
+ export declare function useEnhancedTouch(options?: UseEnhancedTouchOptions): UseEnhancedTouchReturn;
3474
+
3475
+ /**
3476
+ * Options for enhanced touch handling
3477
+ */
3478
+ export declare interface UseEnhancedTouchOptions {
3479
+ /** Gesture recognition thresholds */
3480
+ thresholds?: TouchGestureThresholds;
3481
+ /** Touch feedback configuration */
3482
+ feedback?: TouchFeedbackConfig;
3483
+ /** Gesture priority order */
3484
+ priority?: ExtendedGestureType[];
3485
+ /** Debounce time between gestures in ms */
3486
+ debounce?: number;
3487
+ /** Throttle time for continuous gestures in ms */
3488
+ throttle?: number;
3489
+ /** Enable passive listeners */
3490
+ passive?: boolean;
3491
+ /** Disable gesture */
3492
+ disabled?: boolean | Ref<boolean>;
3493
+ /** Gesture callbacks */
3494
+ onTap?: (e: ExtendedTouchEvent) => void;
3495
+ onDoubleTap?: (e: ExtendedTouchEvent) => void;
3496
+ onLongPress?: (e: ExtendedTouchEvent) => void;
3497
+ onSwipe?: (e: ExtendedTouchEvent) => void;
3498
+ onSwipeLeft?: (e: ExtendedTouchEvent) => void;
3499
+ onSwipeRight?: (e: ExtendedTouchEvent) => void;
3500
+ onSwipeUp?: (e: ExtendedTouchEvent) => void;
3501
+ onSwipeDown?: (e: ExtendedTouchEvent) => void;
3502
+ onPan?: (e: ExtendedTouchEvent) => void;
3503
+ onPinch?: (e: ExtendedTouchEvent) => void;
3504
+ onPinchIn?: (e: ExtendedTouchEvent) => void;
3505
+ onPinchOut?: (e: ExtendedTouchEvent) => void;
3506
+ onRotate?: (e: ExtendedTouchEvent) => void;
3507
+ onTwoFingerTap?: (e: ExtendedTouchEvent) => void;
3508
+ onEdgeSwipe?: (e: ExtendedTouchEvent) => void;
3509
+ }
3510
+
3511
+ /**
3512
+ * Return type for useEnhancedTouch
3513
+ */
3514
+ export declare interface UseEnhancedTouchReturn {
3515
+ /** Current active gesture */
3516
+ activeGesture: Readonly<Ref<ExtendedGestureType | null>>;
3517
+ /** Bind touch events to element */
3518
+ bind: (element: HTMLElement) => () => void;
3519
+ /** Whether currently touching */
3520
+ isTouching: Readonly<Ref<boolean>>;
3521
+ }
3522
+
1954
3523
  /**
1955
3524
  * Composable for exporting data
1956
3525
  *
@@ -2146,6 +3715,23 @@ export declare interface UseFocusReturn {
2146
3715
  bind: (element: HTMLElement) => () => void;
2147
3716
  }
2148
3717
 
3718
+ /**
3719
+ * Composable for focus trap
3720
+ */
3721
+ export declare function useFocusTrap(container: Ref<HTMLElement | null>, options?: FocusTrapOptions): UseFocusTrapReturn;
3722
+
3723
+ /**
3724
+ * Return type for useFocusTrap
3725
+ */
3726
+ export declare interface UseFocusTrapReturn {
3727
+ /** Activate focus trap */
3728
+ activate: () => void;
3729
+ /** Deactivate focus trap */
3730
+ deactivate: () => void;
3731
+ /** Whether active */
3732
+ isActive: Readonly<Ref<boolean>>;
3733
+ }
3734
+
2149
3735
  /**
2150
3736
  * Composable for fullscreen functionality
2151
3737
  *
@@ -2682,6 +4268,31 @@ export declare interface UseIntersectReturn {
2682
4268
  stop: () => void;
2683
4269
  }
2684
4270
 
4271
+ /**
4272
+ * Composable for keyboard navigation
4273
+ */
4274
+ export declare function useKeyboardNavigation(options?: KeyboardNavigationConfig): UseKeyboardNavigationReturn;
4275
+
4276
+ /**
4277
+ * Return type for useKeyboardNavigation
4278
+ */
4279
+ export declare interface UseKeyboardNavigationReturn {
4280
+ /** Current focused index */
4281
+ focusedIndex: Readonly<Ref<number>>;
4282
+ /** Bind keyboard navigation to container */
4283
+ bind: (container: HTMLElement, items: HTMLElement[]) => () => void;
4284
+ /** Focus item at index */
4285
+ focusIndex: (index: number) => void;
4286
+ /** Focus next item */
4287
+ focusNext: () => void;
4288
+ /** Focus previous item */
4289
+ focusPrev: () => void;
4290
+ /** Focus first item */
4291
+ focusFirst: () => void;
4292
+ /** Focus last item */
4293
+ focusLast: () => void;
4294
+ }
4295
+
2685
4296
  /**
2686
4297
  * Composable for lazy loading images
2687
4298
  *
@@ -2710,6 +4321,26 @@ export declare interface UseIntersectReturn {
2710
4321
  */
2711
4322
  export declare function useLazy(options?: UseLazyOptions): UseLazyReturn;
2712
4323
 
4324
+ /**
4325
+ * Optimized lazy loading using Vue 3's shallowRef for performance
4326
+ * with large state objects
4327
+ */
4328
+ export declare function useLazyOptimized(options?: OptimizedLazyOptions): UseLazyOptimizedReturn;
4329
+
4330
+ /**
4331
+ * Return type for useLazyOptimized
4332
+ */
4333
+ export declare interface UseLazyOptimizedReturn {
4334
+ /** Reactive state */
4335
+ state: Readonly<ShallowRef<OptimizedLazyState>>;
4336
+ /** Start observing element */
4337
+ observe: (el: HTMLElement) => void;
4338
+ /** Stop observing and cleanup */
4339
+ disconnect: () => void;
4340
+ /** Manually trigger load */
4341
+ load: () => void;
4342
+ }
4343
+
2713
4344
  /**
2714
4345
  * Options for useLazy composable
2715
4346
  */
@@ -3958,6 +5589,28 @@ export declare interface UsePullRefreshReturn {
3958
5589
  refresh: () => Promise<void>;
3959
5590
  }
3960
5591
 
5592
+ export declare function usePWA(config?: PWAConfig): UsePWAReturn;
5593
+
5594
+ /**
5595
+ * PWA utilities
5596
+ */
5597
+ export declare interface UsePWAReturn {
5598
+ /** Whether online */
5599
+ isOnline: Readonly<Ref<boolean>>;
5600
+ /** Whether registered */
5601
+ isRegistered: Readonly<Ref<boolean>>;
5602
+ /** Whether update available */
5603
+ needsUpdate: Readonly<Ref<boolean>>;
5604
+ /** Register service worker */
5605
+ register: () => Promise<void>;
5606
+ /** Update service worker */
5607
+ update: () => Promise<void>;
5608
+ /** Unregister service worker */
5609
+ unregister: () => Promise<void>;
5610
+ /** Initialize PWA */
5611
+ init: () => () => void;
5612
+ }
5613
+
3961
5614
  /**
3962
5615
  * Composable for tracking element resize
3963
5616
  *
@@ -4425,6 +6078,35 @@ export declare interface UseStickyReturn {
4425
6078
  stop: () => void;
4426
6079
  }
4427
6080
 
6081
+ /**
6082
+ * Suspense-ready composable for async directives
6083
+ */
6084
+ export declare function useSuspenseDirective<T>(options: UseSuspenseDirectiveOptions<T>): UseSuspenseDirectiveReturn<T>;
6085
+
6086
+ /**
6087
+ * Options for suspense directive
6088
+ */
6089
+ declare interface UseSuspenseDirectiveOptions<T> {
6090
+ /** Async loader function */
6091
+ loader: () => Promise<T>;
6092
+ /** On success callback */
6093
+ onSuccess?: (data: T) => void;
6094
+ /** On error callback */
6095
+ onError?: (error: Error) => void;
6096
+ }
6097
+
6098
+ /**
6099
+ * Return type for suspense directive
6100
+ */
6101
+ export declare interface UseSuspenseDirectiveReturn<T> {
6102
+ /** Reactive state */
6103
+ state: Readonly<ShallowRef<SuspenseDirectiveState<T>>>;
6104
+ /** Trigger load */
6105
+ load: () => Promise<void>;
6106
+ /** Retry on error */
6107
+ retry: () => Promise<void>;
6108
+ }
6109
+
4428
6110
  /**
4429
6111
  * Composable for detecting swipe gestures
4430
6112
  *
@@ -6466,6 +8148,83 @@ export declare const vVisible: Directive;
6466
8148
  */
6467
8149
  export declare const vWatermark: Directive;
6468
8150
 
8151
+ /**
8152
+ * Show a warning message
8153
+ */
8154
+ export declare function warn(options: WarningOptions): void;
8155
+
8156
+ export declare function warn(message: string, params?: Record<string, any>): void;
8157
+
8158
+ /**
8159
+ * Deprecation warning
8160
+ */
8161
+ export declare function warnDeprecated(feature: string, alternative: string): void;
8162
+
8163
+ /**
8164
+ * Global warning messages
8165
+ */
8166
+ declare interface WarningMessages {
8167
+ deprecated: string;
8168
+ experimental: string;
8169
+ performance: string;
8170
+ fallback: string;
8171
+ }
8172
+
8173
+ declare interface WarningOptions {
8174
+ /** Directive name */
8175
+ directive?: string;
8176
+ /** Message key or raw message */
8177
+ message: string;
8178
+ /** Additional context parameters */
8179
+ params?: Record<string, any>;
8180
+ /** Log level */
8181
+ level?: LogLevel;
8182
+ /** Stack trace (only in development) */
8183
+ stack?: boolean;
8184
+ }
8185
+
8186
+ /**
8187
+ * Parameter validation warning
8188
+ */
8189
+ export declare function warnInvalidParam(directive: string, param: string, value: any, expected: string): void;
8190
+
8191
+ /**
8192
+ * Missing parameter warning
8193
+ */
8194
+ export declare function warnMissingParam(directive: string, param: string): void;
8195
+
8196
+ /**
8197
+ * Feature not supported warning
8198
+ */
8199
+ export declare function warnNotSupported(feature: string): void;
8200
+
8201
+ /**
8202
+ * SSR not supported warning
8203
+ */
8204
+ export declare function warnSSRNotSupported(directive: string): void;
8205
+
8206
+ /**
8207
+ * watchEffect that tracks directive bindings
8208
+ */
8209
+ export declare function watchEffectBinding(options: WatchEffectBindingOptions): () => void;
8210
+
8211
+ /**
8212
+ * Options for watchEffect with element binding
8213
+ */
8214
+ export declare interface WatchEffectBindingOptions {
8215
+ /** Binding value to watch */
8216
+ binding: Ref<any>;
8217
+ /** Effect callback */
8218
+ effect: (value: any, oldValue: any, onCleanup: (fn: () => void) => void) => void;
8219
+ /** Whether to run immediately */
8220
+ immediate?: boolean;
8221
+ }
8222
+
8223
+ /**
8224
+ * Create a performance monitor decorator for directives
8225
+ */
8226
+ export declare function withPerformanceMonitoring<T extends Record<string, any>>(directiveName: string, directive: T): T;
8227
+
6469
8228
  /**
6470
8229
  * Utility function to check if text would be truncated in a container
6471
8230
  *
@@ -6476,4 +8235,39 @@ export declare const vWatermark: Directive;
6476
8235
  */
6477
8236
  export declare function wouldTextTruncate(text: string, containerWidth: number, fontSize?: number): boolean;
6478
8237
 
8238
+ /**
8239
+ * Security Utilities for Directix
8240
+ *
8241
+ * Provides comprehensive security features including:
8242
+ * - XSS protection and sanitization
8243
+ * - CSP (Content Security Policy) compatibility
8244
+ * - Security audit tools
8245
+ * - Safe HTML handling
8246
+ */
8247
+ /**
8248
+ * XSS Protection Configuration
8249
+ */
8250
+ export declare interface XSSProtectionConfig {
8251
+ /** Allowed HTML tags */
8252
+ allowedTags?: string[];
8253
+ /** Allowed attributes per tag or globally */
8254
+ allowedAttributes?: Record<string, string[]> | string[];
8255
+ /** Allowed URL protocols */
8256
+ allowedProtocols?: string[];
8257
+ /** Allow data URLs */
8258
+ allowDataUrls?: boolean;
8259
+ /** Allow inline styles */
8260
+ allowInlineStyles?: boolean;
8261
+ /** Allow class attribute */
8262
+ allowClass?: boolean;
8263
+ /** Allow id attribute */
8264
+ allowId?: boolean;
8265
+ /** Detect and remove dangerous patterns */
8266
+ detectDangerousPatterns?: boolean;
8267
+ /** Custom filter functions */
8268
+ customFilters?: ((html: string) => string)[];
8269
+ }
8270
+
8271
+ export declare const zhCN: I18nMessages;
8272
+
6479
8273
  export { }