directix 1.9.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/README.md +88 -0
- package/dist/index.cjs +1790 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +829 -0
- package/dist/index.iife.js +1962 -198
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +2 -2
- package/dist/index.mjs +1791 -27
- package/dist/index.mjs.map +1 -1
- package/dist/nuxt/index.cjs +1 -1
- package/dist/nuxt/index.d.ts +1 -1
- package/dist/nuxt/index.mjs +1 -1
- package/dist/nuxt/runtime/plugin.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import { ComponentPublicInstance } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
3
4
|
import { Directive } from 'vue';
|
|
4
5
|
import { Plugin as Plugin_2 } from 'vue';
|
|
5
6
|
import { Ref } from 'vue';
|
|
7
|
+
import { ShallowRef } from 'vue';
|
|
6
8
|
import { VNode } from 'vue';
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -15,6 +17,102 @@ export declare function addCleanupVue2(el: Element, fn: () => void): void;
|
|
|
15
17
|
*/
|
|
16
18
|
export declare function addCleanupVue3(el: Element, fn: () => void): void;
|
|
17
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
|
+
|
|
18
116
|
/**
|
|
19
117
|
* Assert a condition and throw an error if false
|
|
20
118
|
*/
|
|
@@ -37,6 +135,22 @@ export declare function assertRange(value: number, min: number, max: number, dir
|
|
|
37
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;
|
|
38
136
|
export { assertType_2 as assertType }
|
|
39
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
|
+
|
|
40
154
|
/**
|
|
41
155
|
* Calculate statistics from metrics
|
|
42
156
|
*/
|
|
@@ -60,6 +174,16 @@ export declare function capitalizeText(text: string, options?: {
|
|
|
60
174
|
*/
|
|
61
175
|
export declare function capitalizeWord(word: string): string;
|
|
62
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
|
+
|
|
63
187
|
/**
|
|
64
188
|
* Clear DevTools state
|
|
65
189
|
*/
|
|
@@ -116,6 +240,21 @@ export declare interface ComposableThrottledFunction<T extends (...args: any[])
|
|
|
116
240
|
cancel: () => void;
|
|
117
241
|
}
|
|
118
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
|
+
|
|
119
258
|
/**
|
|
120
259
|
* Configure performance monitoring
|
|
121
260
|
*/
|
|
@@ -350,6 +489,11 @@ export declare function createPermissionChecker(config: {
|
|
|
350
489
|
roleMap?: Record<string, string[]>;
|
|
351
490
|
}): (value: string | string[], mode?: PermissionMode) => boolean;
|
|
352
491
|
|
|
492
|
+
/**
|
|
493
|
+
* Create safe content handler
|
|
494
|
+
*/
|
|
495
|
+
export declare function createSafeContentHandler(config?: XSSProtectionConfig): SafeContentHandler;
|
|
496
|
+
|
|
353
497
|
/**
|
|
354
498
|
* Create a style-based directive template
|
|
355
499
|
*
|
|
@@ -452,6 +596,20 @@ export declare function createWatermarkUrl(content: string | string[], options?:
|
|
|
452
596
|
*/
|
|
453
597
|
export declare type CrossVersionDirective = Directive | Vue2DirectiveHooks | Vue3DirectiveHooks;
|
|
454
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
|
+
|
|
455
613
|
/**
|
|
456
614
|
* Date format options per region
|
|
457
615
|
*/
|
|
@@ -532,6 +690,26 @@ export declare function defineDirectiveGroup(name: string, directives: Record<st
|
|
|
532
690
|
*/
|
|
533
691
|
export declare function definePlugin(plugin: DirectixPlugin): DirectixPlugin;
|
|
534
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
|
+
|
|
535
713
|
/**
|
|
536
714
|
* Detect user locale info
|
|
537
715
|
*/
|
|
@@ -652,6 +830,16 @@ export declare interface DirectiveInstallOptions {
|
|
|
652
830
|
config?: Record<string, any>;
|
|
653
831
|
}
|
|
654
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
|
+
|
|
655
843
|
/**
|
|
656
844
|
* Per-directive messages
|
|
657
845
|
*/
|
|
@@ -756,6 +944,11 @@ export declare function enablePerformance(): void;
|
|
|
756
944
|
*/
|
|
757
945
|
export declare function endMeasure(markId: string, directive: string, phase: 'mount' | 'update' | 'unmount', metadata?: Record<string, any>): void;
|
|
758
946
|
|
|
947
|
+
/**
|
|
948
|
+
* Create teleport target if not exists
|
|
949
|
+
*/
|
|
950
|
+
export declare function ensureTeleportTarget(target: string): HTMLElement | null;
|
|
951
|
+
|
|
759
952
|
export declare const enUS: I18nMessages;
|
|
760
953
|
|
|
761
954
|
/**
|
|
@@ -777,6 +970,11 @@ declare interface ErrorMessages {
|
|
|
777
970
|
ssr_not_supported: string;
|
|
778
971
|
}
|
|
779
972
|
|
|
973
|
+
/**
|
|
974
|
+
* Escape HTML entities
|
|
975
|
+
*/
|
|
976
|
+
export declare function escapeHtml(str: string): string;
|
|
977
|
+
|
|
780
978
|
/**
|
|
781
979
|
* Export format type
|
|
782
980
|
*/
|
|
@@ -791,6 +989,56 @@ export declare function exportPerformanceData(): {
|
|
|
791
989
|
report: DirectivePerformance[];
|
|
792
990
|
};
|
|
793
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
|
+
|
|
794
1042
|
/**
|
|
795
1043
|
* Format currency with locale-specific format
|
|
796
1044
|
*/
|
|
@@ -833,6 +1081,11 @@ export declare function formatNumberLocale(value: number, decimals?: number, opt
|
|
|
833
1081
|
*/
|
|
834
1082
|
export declare function formatTime(time: CountdownTime, format: string | CountdownFormatFunction): string;
|
|
835
1083
|
|
|
1084
|
+
/**
|
|
1085
|
+
* Generate unique ID for ARIA references
|
|
1086
|
+
*/
|
|
1087
|
+
export declare function generateAriaId(prefix?: string): string;
|
|
1088
|
+
|
|
836
1089
|
/**
|
|
837
1090
|
* Generate unique ID
|
|
838
1091
|
*/
|
|
@@ -843,11 +1096,26 @@ export declare function generateId(prefix?: string): string;
|
|
|
843
1096
|
*/
|
|
844
1097
|
export declare function get<T = any>(obj: Record<string, any>, path: string, defaultValue?: T): T;
|
|
845
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
|
+
|
|
846
1109
|
/**
|
|
847
1110
|
* Get region-specific date format
|
|
848
1111
|
*/
|
|
849
1112
|
export declare function getDateFormat(region?: string): DateFormatOptions;
|
|
850
1113
|
|
|
1114
|
+
/**
|
|
1115
|
+
* Get device pixel ratio
|
|
1116
|
+
*/
|
|
1117
|
+
export declare function getDevicePixelRatio(): number;
|
|
1118
|
+
|
|
851
1119
|
/**
|
|
852
1120
|
* Get DevTools state (for external access)
|
|
853
1121
|
*/
|
|
@@ -1000,6 +1268,16 @@ export declare interface I18nOptions {
|
|
|
1000
1268
|
*/
|
|
1001
1269
|
export declare function info(message: string, params?: Record<string, any>): void;
|
|
1002
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
|
+
|
|
1003
1281
|
/**
|
|
1004
1282
|
* Intersect event handler
|
|
1005
1283
|
*/
|
|
@@ -1035,6 +1313,11 @@ export declare function isEmpty(value: unknown): boolean;
|
|
|
1035
1313
|
*/
|
|
1036
1314
|
export declare function isFunction(value: unknown): value is (...args: any[]) => any;
|
|
1037
1315
|
|
|
1316
|
+
/**
|
|
1317
|
+
* Check if device is mobile
|
|
1318
|
+
*/
|
|
1319
|
+
export declare function isMobileDevice(): boolean;
|
|
1320
|
+
|
|
1038
1321
|
/**
|
|
1039
1322
|
* Check if value is a number
|
|
1040
1323
|
*/
|
|
@@ -1065,6 +1348,16 @@ export declare const isSSR: () => boolean;
|
|
|
1065
1348
|
*/
|
|
1066
1349
|
export declare function isString(value: unknown): value is string;
|
|
1067
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
|
+
|
|
1068
1361
|
/**
|
|
1069
1362
|
* Check if Vue 2 (includes 2.7)
|
|
1070
1363
|
*/
|
|
@@ -1087,6 +1380,36 @@ export declare type ItemSizeFunction = (index: number) => number;
|
|
|
1087
1380
|
|
|
1088
1381
|
export declare const jaJP: I18nMessages;
|
|
1089
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
|
+
|
|
1090
1413
|
/**
|
|
1091
1414
|
* Lazy loading state
|
|
1092
1415
|
*/
|
|
@@ -1163,6 +1486,55 @@ export declare interface NumberFormatOptions {
|
|
|
1163
1486
|
currencyDecimals: number;
|
|
1164
1487
|
}
|
|
1165
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
|
+
|
|
1166
1538
|
/**
|
|
1167
1539
|
* Pan gesture event data
|
|
1168
1540
|
*/
|
|
@@ -1576,6 +1948,43 @@ export declare type PullRefreshHandler = () => Promise<void> | void;
|
|
|
1576
1948
|
*/
|
|
1577
1949
|
export declare type PullRefreshState = 'idle' | 'pulling' | 'ready' | 'loading' | 'success' | 'error';
|
|
1578
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
|
+
|
|
1579
1988
|
/**
|
|
1580
1989
|
* Quick print function
|
|
1581
1990
|
*
|
|
@@ -1637,6 +2046,40 @@ export declare interface RotateGestureEvent {
|
|
|
1637
2046
|
isFinal: boolean;
|
|
1638
2047
|
}
|
|
1639
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
|
+
|
|
1640
2083
|
/**
|
|
1641
2084
|
* Scroll direction
|
|
1642
2085
|
*/
|
|
@@ -1664,6 +2107,68 @@ export declare interface ScrollInfo {
|
|
|
1664
2107
|
directionY: ScrollDirection;
|
|
1665
2108
|
}
|
|
1666
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
|
+
|
|
1667
2172
|
/**
|
|
1668
2173
|
* Set nested property value by path
|
|
1669
2174
|
*/
|
|
@@ -1704,6 +2209,11 @@ export declare type SkeletonAnimation = 'wave' | 'pulse' | 'none';
|
|
|
1704
2209
|
*/
|
|
1705
2210
|
export declare function startMeasure(directive: string, phase: 'mount' | 'update' | 'unmount'): string;
|
|
1706
2211
|
|
|
2212
|
+
/**
|
|
2213
|
+
* Strip all HTML tags
|
|
2214
|
+
*/
|
|
2215
|
+
export declare function stripHtml(html: string): string;
|
|
2216
|
+
|
|
1707
2217
|
/**
|
|
1708
2218
|
* Check if Clipboard API is supported
|
|
1709
2219
|
*/
|
|
@@ -1729,6 +2239,18 @@ export declare const supportsPassive: () => boolean;
|
|
|
1729
2239
|
*/
|
|
1730
2240
|
export declare const supportsResizeObserver: () => boolean;
|
|
1731
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
|
+
|
|
1732
2254
|
/**
|
|
1733
2255
|
* Swipe direction
|
|
1734
2256
|
*/
|
|
@@ -1746,6 +2268,21 @@ export declare type SwipeHandler = (direction: SwipeDirection, event: Event) =>
|
|
|
1746
2268
|
*/
|
|
1747
2269
|
export declare function t(key: string, params?: Record<string, any>): string;
|
|
1748
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
|
+
|
|
1749
2286
|
/**
|
|
1750
2287
|
* Simple throttle function wrapper
|
|
1751
2288
|
*
|
|
@@ -1803,6 +2340,20 @@ export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
|
1803
2340
|
*/
|
|
1804
2341
|
export declare type TooltipTrigger = 'hover' | 'click' | 'focus' | 'manual';
|
|
1805
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
|
+
|
|
1806
2357
|
/**
|
|
1807
2358
|
* Touch gesture type
|
|
1808
2359
|
*/
|
|
@@ -1825,6 +2376,36 @@ export declare interface TouchGestureEvent {
|
|
|
1825
2376
|
event: TouchEvent;
|
|
1826
2377
|
}
|
|
1827
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
|
+
|
|
1828
2409
|
/**
|
|
1829
2410
|
* Register a directive for DevTools tracking
|
|
1830
2411
|
*/
|
|
@@ -1835,6 +2416,11 @@ export declare function trackDirective(name: string, info?: Partial<DirectiveInf
|
|
|
1835
2416
|
*/
|
|
1836
2417
|
export declare function trackPlugin(info: PluginInfo): void;
|
|
1837
2418
|
|
|
2419
|
+
/**
|
|
2420
|
+
* Trigger haptic feedback
|
|
2421
|
+
*/
|
|
2422
|
+
export declare function triggerHaptic(type?: 'light' | 'medium' | 'heavy' | 'selection'): void;
|
|
2423
|
+
|
|
1838
2424
|
/**
|
|
1839
2425
|
* Trim position
|
|
1840
2426
|
*/
|
|
@@ -1868,6 +2454,11 @@ export declare type TruncatePosition = 'start' | 'middle' | 'end';
|
|
|
1868
2454
|
*/
|
|
1869
2455
|
export declare function truncateText(text: string, maxLength: number, ellipsis?: string): string;
|
|
1870
2456
|
|
|
2457
|
+
/**
|
|
2458
|
+
* Unescape HTML entities
|
|
2459
|
+
*/
|
|
2460
|
+
export declare function unescapeHtml(str: string): string;
|
|
2461
|
+
|
|
1871
2462
|
/**
|
|
1872
2463
|
* Unregister a directive from DevTools tracking
|
|
1873
2464
|
*/
|
|
@@ -2629,6 +3220,28 @@ export declare interface UseDebounceReturn<T extends (...args: any[]) => any> {
|
|
|
2629
3220
|
pending: () => boolean;
|
|
2630
3221
|
}
|
|
2631
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
|
+
|
|
2632
3245
|
/**
|
|
2633
3246
|
* Composable for making elements draggable
|
|
2634
3247
|
*
|
|
@@ -2854,6 +3467,59 @@ export declare interface UseEmojiReturn {
|
|
|
2854
3467
|
bind: (element: HTMLInputElement | HTMLTextAreaElement) => () => void;
|
|
2855
3468
|
}
|
|
2856
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
|
+
|
|
2857
3523
|
/**
|
|
2858
3524
|
* Composable for exporting data
|
|
2859
3525
|
*
|
|
@@ -3049,6 +3715,23 @@ export declare interface UseFocusReturn {
|
|
|
3049
3715
|
bind: (element: HTMLElement) => () => void;
|
|
3050
3716
|
}
|
|
3051
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
|
+
|
|
3052
3735
|
/**
|
|
3053
3736
|
* Composable for fullscreen functionality
|
|
3054
3737
|
*
|
|
@@ -3585,6 +4268,31 @@ export declare interface UseIntersectReturn {
|
|
|
3585
4268
|
stop: () => void;
|
|
3586
4269
|
}
|
|
3587
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
|
+
|
|
3588
4296
|
/**
|
|
3589
4297
|
* Composable for lazy loading images
|
|
3590
4298
|
*
|
|
@@ -3613,6 +4321,26 @@ export declare interface UseIntersectReturn {
|
|
|
3613
4321
|
*/
|
|
3614
4322
|
export declare function useLazy(options?: UseLazyOptions): UseLazyReturn;
|
|
3615
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
|
+
|
|
3616
4344
|
/**
|
|
3617
4345
|
* Options for useLazy composable
|
|
3618
4346
|
*/
|
|
@@ -4861,6 +5589,28 @@ export declare interface UsePullRefreshReturn {
|
|
|
4861
5589
|
refresh: () => Promise<void>;
|
|
4862
5590
|
}
|
|
4863
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
|
+
|
|
4864
5614
|
/**
|
|
4865
5615
|
* Composable for tracking element resize
|
|
4866
5616
|
*
|
|
@@ -5328,6 +6078,35 @@ export declare interface UseStickyReturn {
|
|
|
5328
6078
|
stop: () => void;
|
|
5329
6079
|
}
|
|
5330
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
|
+
|
|
5331
6110
|
/**
|
|
5332
6111
|
* Composable for detecting swipe gestures
|
|
5333
6112
|
*
|
|
@@ -7424,6 +8203,23 @@ export declare function warnNotSupported(feature: string): void;
|
|
|
7424
8203
|
*/
|
|
7425
8204
|
export declare function warnSSRNotSupported(directive: string): void;
|
|
7426
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
|
+
|
|
7427
8223
|
/**
|
|
7428
8224
|
* Create a performance monitor decorator for directives
|
|
7429
8225
|
*/
|
|
@@ -7439,6 +8235,39 @@ export declare function withPerformanceMonitoring<T extends Record<string, any>>
|
|
|
7439
8235
|
*/
|
|
7440
8236
|
export declare function wouldTextTruncate(text: string, containerWidth: number, fontSize?: number): boolean;
|
|
7441
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
|
+
|
|
7442
8271
|
export declare const zhCN: I18nMessages;
|
|
7443
8272
|
|
|
7444
8273
|
export { }
|