uilint-react 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DevTool.d.ts +11 -0
- package/dist/DevTool.d.ts.map +1 -0
- package/dist/ElementBadges-BNRIjtRW.js +672 -0
- package/dist/ElementBadges-BNRIjtRW.js.map +1 -0
- package/dist/VisionIssueBadge-C6vfwtec.js +154 -0
- package/dist/VisionIssueBadge-C6vfwtec.js.map +1 -0
- package/dist/components/Highlighter.d.ts +6 -0
- package/dist/components/Highlighter.d.ts.map +1 -0
- package/dist/components/ui-lint/ElementBadges.d.ts +6 -0
- package/dist/components/ui-lint/ElementBadges.d.ts.map +1 -0
- package/dist/components/ui-lint/InspectionPanel.d.ts +6 -0
- package/dist/components/ui-lint/InspectionPanel.d.ts.map +1 -0
- package/dist/components/ui-lint/LocatorOverlay.d.ts +14 -0
- package/dist/components/ui-lint/LocatorOverlay.d.ts.map +1 -0
- package/dist/components/ui-lint/RegionSelector.d.ts +18 -0
- package/dist/components/ui-lint/RegionSelector.d.ts.map +1 -0
- package/dist/components/ui-lint/ScanResultsPopover.d.ts +6 -0
- package/dist/components/ui-lint/ScanResultsPopover.d.ts.map +1 -0
- package/dist/components/ui-lint/ScreenshotViewer.d.ts +11 -0
- package/dist/components/ui-lint/ScreenshotViewer.d.ts.map +1 -0
- package/dist/components/ui-lint/UILintProvider.d.ts +11 -0
- package/dist/components/ui-lint/UILintProvider.d.ts.map +1 -0
- package/dist/components/ui-lint/VisionIssueBadge.d.ts +6 -0
- package/dist/components/ui-lint/VisionIssueBadge.d.ts.map +1 -0
- package/dist/components/ui-lint/VisionIssuesPanel.d.ts +12 -0
- package/dist/components/ui-lint/VisionIssuesPanel.d.ts.map +1 -0
- package/dist/components/ui-lint/badge-layout.d.ts +91 -0
- package/dist/components/ui-lint/badge-layout.d.ts.map +1 -0
- package/dist/components/ui-lint/code-formatting.d.ts +14 -0
- package/dist/components/ui-lint/code-formatting.d.ts.map +1 -0
- package/dist/components/ui-lint/dom-utils.d.ts +43 -0
- package/dist/components/ui-lint/dom-utils.d.ts.map +1 -0
- package/dist/components/ui-lint/index.d.ts +22 -0
- package/dist/components/ui-lint/index.d.ts.map +1 -0
- package/dist/components/ui-lint/inspection-panel-positioning.d.ts +41 -0
- package/dist/components/ui-lint/inspection-panel-positioning.d.ts.map +1 -0
- package/dist/components/ui-lint/portal-host.d.ts +3 -0
- package/dist/components/ui-lint/portal-host.d.ts.map +1 -0
- package/dist/components/ui-lint/scan-results/FileTree.d.ts +25 -0
- package/dist/components/ui-lint/scan-results/FileTree.d.ts.map +1 -0
- package/dist/components/ui-lint/scan-results/IssueRow.d.ts +16 -0
- package/dist/components/ui-lint/scan-results/IssueRow.d.ts.map +1 -0
- package/dist/components/ui-lint/scan-results/SearchFilter.d.ts +8 -0
- package/dist/components/ui-lint/scan-results/SearchFilter.d.ts.map +1 -0
- package/dist/components/ui-lint/source-fetcher.d.ts +40 -0
- package/dist/components/ui-lint/source-fetcher.d.ts.map +1 -0
- package/dist/components/ui-lint/store.d.ts +194 -0
- package/dist/components/ui-lint/store.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/TabbedToolbar.d.ts +2 -0
- package/dist/components/ui-lint/toolbar/TabbedToolbar.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/icons.d.ts +29 -0
- package/dist/components/ui-lint/toolbar/icons.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/index.d.ts +3 -0
- package/dist/components/ui-lint/toolbar/index.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/tabs/ConfigureTab.d.ts +2 -0
- package/dist/components/ui-lint/toolbar/tabs/ConfigureTab.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/tabs/ESLintTab.d.ts +2 -0
- package/dist/components/ui-lint/toolbar/tabs/ESLintTab.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/tabs/VisionTab.d.ts +2 -0
- package/dist/components/ui-lint/toolbar/tabs/VisionTab.d.ts.map +1 -0
- package/dist/components/ui-lint/toolbar/tokens.d.ts +45 -0
- package/dist/components/ui-lint/toolbar/tokens.d.ts.map +1 -0
- package/dist/components/ui-lint/types.d.ts +170 -0
- package/dist/components/ui-lint/types.d.ts.map +1 -0
- package/dist/components/ui-lint/useDOMObserver.d.ts +11 -0
- package/dist/components/ui-lint/useDOMObserver.d.ts.map +1 -0
- package/dist/components/ui-lint/visibility-utils.d.ts +41 -0
- package/dist/components/ui-lint/visibility-utils.d.ts.map +1 -0
- package/dist/consistency/highlights.d.ts +14 -0
- package/dist/consistency/highlights.d.ts.map +1 -0
- package/dist/consistency/index.d.ts +7 -0
- package/dist/consistency/index.d.ts.map +1 -0
- package/dist/consistency/snapshot.d.ts +14 -0
- package/dist/consistency/snapshot.d.ts.map +1 -0
- package/dist/consistency/types.d.ts +5 -0
- package/dist/consistency/types.d.ts.map +1 -0
- package/dist/devtools.d.ts +8 -0
- package/dist/devtools.d.ts.map +1 -0
- package/dist/devtools.js +259 -0
- package/dist/devtools.js.map +1 -0
- package/dist/environment-DVxa60C6.js +26 -0
- package/dist/environment-DVxa60C6.js.map +1 -0
- package/dist/index-BGzkrD0y.js +12304 -0
- package/dist/index-BGzkrD0y.js.map +1 -0
- package/dist/index-L3Zm-CoX.js +513 -0
- package/dist/index-L3Zm-CoX.js.map +1 -0
- package/dist/index.d.ts +13 -339
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -482
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +11 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/node.d.ts +7 -38
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +32 -79
- package/dist/node.js.map +1 -0
- package/dist/scanner/dom-scanner.d.ts +7 -0
- package/dist/scanner/dom-scanner.d.ts.map +1 -0
- package/dist/scanner/environment.d.ts +16 -0
- package/dist/scanner/environment.d.ts.map +1 -0
- package/dist/scanner/jsdom-adapter.d.ts +30 -0
- package/dist/scanner/jsdom-adapter.d.ts.map +1 -0
- package/dist/scanner/vision-capture.d.ts +131 -0
- package/dist/scanner/vision-capture.d.ts.map +1 -0
- package/dist/styles/inject-styles.d.ts +2 -0
- package/dist/styles/inject-styles.d.ts.map +1 -0
- package/dist/vision-capture-EIrYA_XF.js +216 -0
- package/dist/vision-capture-EIrYA_XF.js.map +1 -0
- package/dist/web-component.d.ts +2 -0
- package/dist/web-component.d.ts.map +1 -0
- package/package.json +36 -7
- package/dist/ElementBadges-2CTPMJ6L.js +0 -825
- package/dist/InspectionPanel-NXSE7CMH.js +0 -10
- package/dist/LocatorOverlay-3TKK74BD.js +0 -11
- package/dist/UILintToolbar-CLVXQHCZ.js +0 -10
- package/dist/chunk-552GIJIQ.js +0 -1109
- package/dist/chunk-K46BWHFU.js +0 -271
- package/dist/chunk-KKNPFLL2.js +0 -1853
- package/dist/chunk-S4IWHBOQ.js +0 -178
- package/dist/chunk-Z4AAGFIN.js +0 -933
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for UILint Source Visualization
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Source location from data-loc attribute
|
|
6
|
+
*/
|
|
7
|
+
export interface SourceLocation {
|
|
8
|
+
fileName: string;
|
|
9
|
+
lineNumber: number;
|
|
10
|
+
columnNumber?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A scanned DOM element with its source information
|
|
14
|
+
* Source is always present from data-loc attribute
|
|
15
|
+
*/
|
|
16
|
+
export interface ScannedElement {
|
|
17
|
+
/**
|
|
18
|
+
* Unique per-instance ID derived from data-loc.
|
|
19
|
+
* Format: "loc:path:line:column#occurrence"
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
element: Element;
|
|
23
|
+
tagName: string;
|
|
24
|
+
className: string;
|
|
25
|
+
/** Source location (always present from data-loc) */
|
|
26
|
+
source: SourceLocation;
|
|
27
|
+
rect: DOMRect;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A source file with all its associated elements
|
|
31
|
+
*/
|
|
32
|
+
export interface SourceFile {
|
|
33
|
+
path: string;
|
|
34
|
+
displayName: string;
|
|
35
|
+
color: string;
|
|
36
|
+
elements: ScannedElement[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* User-configurable settings for the overlay
|
|
40
|
+
*/
|
|
41
|
+
export interface UILintSettings {
|
|
42
|
+
hideNodeModules: boolean;
|
|
43
|
+
autoScanEnabled: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* State for the auto-scan feature
|
|
47
|
+
*/
|
|
48
|
+
export interface AutoScanState {
|
|
49
|
+
status: "idle" | "scanning" | "paused" | "complete";
|
|
50
|
+
currentIndex: number;
|
|
51
|
+
totalElements: number;
|
|
52
|
+
elements: ScannedElement[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* ESLint issue from WebSocket server (uilint serve)
|
|
56
|
+
*/
|
|
57
|
+
export interface ESLintIssue {
|
|
58
|
+
/** Line number in source file */
|
|
59
|
+
line: number;
|
|
60
|
+
/** Column number */
|
|
61
|
+
column?: number;
|
|
62
|
+
/** Issue description */
|
|
63
|
+
message: string;
|
|
64
|
+
/** ESLint rule ID (e.g., "uilint/semantic", "uilint/no-arbitrary-tailwind") */
|
|
65
|
+
ruleId?: string;
|
|
66
|
+
/** data-loc value to match to DOM element */
|
|
67
|
+
dataLoc?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Cached issue data for a scanned element
|
|
71
|
+
*/
|
|
72
|
+
export interface ElementIssue {
|
|
73
|
+
elementId: string;
|
|
74
|
+
/** ESLint rule violations from uilint-eslint (including semantic rule) */
|
|
75
|
+
issues: ESLintIssue[];
|
|
76
|
+
status: "pending" | "scanning" | "complete" | "error";
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Element detected under the cursor during Alt-key locator mode
|
|
80
|
+
*/
|
|
81
|
+
export interface LocatorTarget {
|
|
82
|
+
element: Element;
|
|
83
|
+
source: SourceLocation;
|
|
84
|
+
rect: DOMRect;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Element being inspected in the sidebar
|
|
88
|
+
*/
|
|
89
|
+
export interface InspectedElement {
|
|
90
|
+
element: Element;
|
|
91
|
+
source: SourceLocation;
|
|
92
|
+
rect: DOMRect;
|
|
93
|
+
/** Optional ID from auto-scan to link to cached results */
|
|
94
|
+
scannedElementId?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* File-level issue (not mapped to a specific DOM element)
|
|
98
|
+
*/
|
|
99
|
+
export interface FileIssue {
|
|
100
|
+
filePath: string;
|
|
101
|
+
issues: ESLintIssue[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Context value provided by UILintProvider
|
|
105
|
+
*/
|
|
106
|
+
export interface UILintContextValue {
|
|
107
|
+
settings: UILintSettings;
|
|
108
|
+
updateSettings: (settings: Partial<UILintSettings>) => void;
|
|
109
|
+
/** True when Alt/Option key is held down */
|
|
110
|
+
altKeyHeld: boolean;
|
|
111
|
+
/** Current element under cursor when Alt is held */
|
|
112
|
+
locatorTarget: LocatorTarget | null;
|
|
113
|
+
/** Element currently being inspected in sidebar */
|
|
114
|
+
inspectedElement: InspectedElement | null;
|
|
115
|
+
/** Set the element to inspect (opens sidebar) */
|
|
116
|
+
setInspectedElement: (element: InspectedElement | null) => void;
|
|
117
|
+
/** Whether live scanning is enabled */
|
|
118
|
+
liveScanEnabled: boolean;
|
|
119
|
+
/** Auto-scan state (for progress tracking) */
|
|
120
|
+
autoScanState: AutoScanState;
|
|
121
|
+
/** Cache of element issues from scanning */
|
|
122
|
+
elementIssuesCache: Map<string, ElementIssue>;
|
|
123
|
+
/** Enable live scanning */
|
|
124
|
+
enableLiveScan: () => void;
|
|
125
|
+
/** Disable live scanning */
|
|
126
|
+
disableLiveScan: () => void;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Props for the UILintProvider component
|
|
130
|
+
*/
|
|
131
|
+
export interface UILintProviderProps {
|
|
132
|
+
children: React.ReactNode;
|
|
133
|
+
enabled?: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Response from the source API
|
|
137
|
+
*/
|
|
138
|
+
export interface SourceApiResponse {
|
|
139
|
+
content: string;
|
|
140
|
+
relativePath: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Cached source file content
|
|
144
|
+
*/
|
|
145
|
+
export interface CachedSource {
|
|
146
|
+
content: string;
|
|
147
|
+
relativePath: string;
|
|
148
|
+
fetchedAt: number;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Color palette for source file differentiation
|
|
152
|
+
*/
|
|
153
|
+
export declare const FILE_COLORS: readonly ["#3B82F6", "#8B5CF6", "#EC4899", "#10B981", "#F59E0B", "#06B6D4", "#EF4444", "#84CC16", "#6366F1", "#F97316", "#14B8A6", "#A855F7"];
|
|
154
|
+
/**
|
|
155
|
+
* Default settings
|
|
156
|
+
*/
|
|
157
|
+
export declare const DEFAULT_SETTINGS: UILintSettings;
|
|
158
|
+
/**
|
|
159
|
+
* Default auto-scan state
|
|
160
|
+
*/
|
|
161
|
+
export declare const DEFAULT_AUTO_SCAN_STATE: AutoScanState;
|
|
162
|
+
/**
|
|
163
|
+
* Data attribute used to mark scanned elements
|
|
164
|
+
*/
|
|
165
|
+
export declare const DATA_UILINT_ID = "data-ui-lint-id";
|
|
166
|
+
/**
|
|
167
|
+
* Re-export vision types for convenience
|
|
168
|
+
*/
|
|
169
|
+
export type { VisionIssue, VisionAnalysisResult, ElementManifest, } from '../../scanner/vision-capture';
|
|
170
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;G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ACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,+IAad,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,aAKrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAEhD;;GAEG;AACH,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,eAAe,GAChB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to observe DOM changes and auto-scan new data-loc elements
|
|
3
|
+
*
|
|
4
|
+
* @param enabled - Whether observation is active
|
|
5
|
+
*/
|
|
6
|
+
export declare function useDOMObserver(enabled?: boolean): void;
|
|
7
|
+
/**
|
|
8
|
+
* Get the current count of data-loc elements in the DOM
|
|
9
|
+
*/
|
|
10
|
+
export declare function getDataLocElementCount(): number;
|
|
11
|
+
//# sourceMappingURL=useDOMObserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDOMObserver.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/useDOMObserver.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,OAAc,GAAG,IAAI,CA4J5D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAG/C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visibility utilities for detecting when elements are covered by overlays
|
|
3
|
+
*
|
|
4
|
+
* Used to hide UILint badges when app modals/overlays cover the underlying elements.
|
|
5
|
+
*/
|
|
6
|
+
type Rect = {
|
|
7
|
+
top: number;
|
|
8
|
+
left: number;
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Compute the visible portion of an element in viewport coordinates.
|
|
16
|
+
*
|
|
17
|
+
* This accounts for:
|
|
18
|
+
* - viewport bounds
|
|
19
|
+
* - ancestor overflow clipping (scroll/hidden/auto/clip)
|
|
20
|
+
*
|
|
21
|
+
* Returns null when no visible area remains.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getElementVisibleRect(element: Element): Rect | null;
|
|
24
|
+
/**
|
|
25
|
+
* Check if an element is covered by an overlay (modal, popover, etc.)
|
|
26
|
+
* at a specific point (typically the badge position).
|
|
27
|
+
*
|
|
28
|
+
* Uses elementsFromPoint() to detect all elements at the given coordinates
|
|
29
|
+
* and checks if any non-UILint overlay element is covering the target.
|
|
30
|
+
*
|
|
31
|
+
* IMPORTANT: Elements that are children/descendants of an overlay are NOT considered
|
|
32
|
+
* "covered" - they should show badges since the overlay is their container, not a cover.
|
|
33
|
+
*
|
|
34
|
+
* @param element - The target element that should be checked for coverage
|
|
35
|
+
* @param badgeX - X coordinate of the badge position (in viewport coordinates)
|
|
36
|
+
* @param badgeY - Y coordinate of the badge position (in viewport coordinates)
|
|
37
|
+
* @returns true if the element is covered by an overlay, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
export declare function isElementCoveredByOverlay(element: Element, badgeX: number, badgeY: number): boolean;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=visibility-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibility-utils.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/visibility-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,IAAI,GAAG;IACV,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4BF;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI,CA6BnE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAqCT"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Violation } from './types';
|
|
3
|
+
interface ConsistencyHighlighterProps {
|
|
4
|
+
violations: Violation[];
|
|
5
|
+
selectedViolation: Violation | null;
|
|
6
|
+
lockedViolation: Violation | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Main consistency highlighter component
|
|
10
|
+
* Renders highlights via Portal to document.body
|
|
11
|
+
*/
|
|
12
|
+
export declare function ConsistencyHighlighter({ violations, selectedViolation, lockedViolation, }: ConsistencyHighlighterProps): React.ReactPortal | null;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=highlights.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlights.d.ts","sourceRoot":"","sources":["../../src/consistency/highlights.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAEhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAiBzC,UAAU,2BAA2B;IACnC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,iBAAiB,EAAE,SAAS,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,SAAS,GAAG,IAAI,CAAC;CACnC;AA+HD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,iBAAiB,EACjB,eAAe,GAChB,EAAE,2BAA2B,4BAkG7B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consistency analysis module exports for uilint-react
|
|
3
|
+
*/
|
|
4
|
+
export type { StyleSnapshot, ElementRole, ElementSnapshot, GroupedSnapshot, ViolationCategory, ViolationSeverity, Violation, ConsistencyResult, } from './types';
|
|
5
|
+
export { createSnapshot, cleanupDataElements, getElementBySnapshotId, } from './snapshot';
|
|
6
|
+
export { ConsistencyHighlighter } from './highlights';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consistency/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,iBAAiB,GAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GroupedSnapshot } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Cleans up data-elements attributes from previous scans
|
|
4
|
+
*/
|
|
5
|
+
export declare function cleanupDataElements(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Creates a grouped snapshot of DOM elements for consistency analysis
|
|
8
|
+
*/
|
|
9
|
+
export declare function createSnapshot(root?: Element): GroupedSnapshot;
|
|
10
|
+
/**
|
|
11
|
+
* Gets an element by its data-elements ID
|
|
12
|
+
*/
|
|
13
|
+
export declare function getElementBySnapshotId(id: string): Element | null;
|
|
14
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/consistency/snapshot.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAIV,eAAe,EAChB,MAAM,SAAS,CAAC;AA6BjB;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAyND;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,eAAe,CA2D9D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAEjE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-export consistency types from uilint-core for convenience
|
|
3
|
+
*/
|
|
4
|
+
export type { StyleSnapshot, ElementRole, ElementSnapshot, GroupedSnapshot, ViolationCategory, ViolationSeverity, Violation, ConsistencyResult, } from 'uilint-core';
|
|
5
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/consistency/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools.d.ts","sourceRoot":"","sources":["../src/devtools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|