uilint-react 0.2.0 → 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
package/dist/index.d.ts
CHANGED
|
@@ -1,339 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
lineNumber: number;
|
|
15
|
-
columnNumber?: number;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A scanned DOM element with its source information
|
|
19
|
-
* Source is always present from data-loc attribute
|
|
20
|
-
*/
|
|
21
|
-
interface ScannedElement {
|
|
22
|
-
/**
|
|
23
|
-
* Unique per-instance ID derived from data-loc.
|
|
24
|
-
* Format: "loc:path:line:column#occurrence"
|
|
25
|
-
*/
|
|
26
|
-
id: string;
|
|
27
|
-
element: Element;
|
|
28
|
-
tagName: string;
|
|
29
|
-
className: string;
|
|
30
|
-
/** Source location (always present from data-loc) */
|
|
31
|
-
source: SourceLocation;
|
|
32
|
-
rect: DOMRect;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A source file with all its associated elements
|
|
36
|
-
*/
|
|
37
|
-
interface SourceFile {
|
|
38
|
-
path: string;
|
|
39
|
-
displayName: string;
|
|
40
|
-
color: string;
|
|
41
|
-
elements: ScannedElement[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* User-configurable settings for the overlay
|
|
45
|
-
*/
|
|
46
|
-
interface UILintSettings {
|
|
47
|
-
hideNodeModules: boolean;
|
|
48
|
-
autoScanEnabled: boolean;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* State for the auto-scan feature
|
|
52
|
-
*/
|
|
53
|
-
interface AutoScanState {
|
|
54
|
-
status: "idle" | "scanning" | "paused" | "complete";
|
|
55
|
-
currentIndex: number;
|
|
56
|
-
totalElements: number;
|
|
57
|
-
elements: ScannedElement[];
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* ESLint issue from WebSocket server (uilint serve)
|
|
61
|
-
*/
|
|
62
|
-
interface ESLintIssue {
|
|
63
|
-
/** Line number in source file */
|
|
64
|
-
line: number;
|
|
65
|
-
/** Column number */
|
|
66
|
-
column?: number;
|
|
67
|
-
/** Issue description */
|
|
68
|
-
message: string;
|
|
69
|
-
/** ESLint rule ID (e.g., "uilint/semantic", "uilint/no-arbitrary-tailwind") */
|
|
70
|
-
ruleId?: string;
|
|
71
|
-
/** data-loc value to match to DOM element */
|
|
72
|
-
dataLoc?: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Cached issue data for a scanned element
|
|
76
|
-
*/
|
|
77
|
-
interface ElementIssue {
|
|
78
|
-
elementId: string;
|
|
79
|
-
/** ESLint rule violations from uilint-eslint (including semantic rule) */
|
|
80
|
-
issues: ESLintIssue[];
|
|
81
|
-
status: "pending" | "scanning" | "complete" | "error";
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Element detected under the cursor during Alt-key locator mode
|
|
85
|
-
*/
|
|
86
|
-
interface LocatorTarget {
|
|
87
|
-
element: Element;
|
|
88
|
-
source: SourceLocation;
|
|
89
|
-
rect: DOMRect;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Element being inspected in the sidebar
|
|
93
|
-
*/
|
|
94
|
-
interface InspectedElement {
|
|
95
|
-
element: Element;
|
|
96
|
-
source: SourceLocation;
|
|
97
|
-
rect: DOMRect;
|
|
98
|
-
/** Optional ID from auto-scan to link to cached results */
|
|
99
|
-
scannedElementId?: string;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Context value provided by UILintProvider
|
|
103
|
-
*/
|
|
104
|
-
interface UILintContextValue {
|
|
105
|
-
settings: UILintSettings;
|
|
106
|
-
updateSettings: (settings: Partial<UILintSettings>) => void;
|
|
107
|
-
/** True when Alt/Option key is held down */
|
|
108
|
-
altKeyHeld: boolean;
|
|
109
|
-
/** Current element under cursor when Alt is held */
|
|
110
|
-
locatorTarget: LocatorTarget | null;
|
|
111
|
-
/** Element currently being inspected in sidebar */
|
|
112
|
-
inspectedElement: InspectedElement | null;
|
|
113
|
-
/** Set the element to inspect (opens sidebar) */
|
|
114
|
-
setInspectedElement: (element: InspectedElement | null) => void;
|
|
115
|
-
/** Whether live scanning is enabled */
|
|
116
|
-
liveScanEnabled: boolean;
|
|
117
|
-
/** Auto-scan state (for progress tracking) */
|
|
118
|
-
autoScanState: AutoScanState;
|
|
119
|
-
/** Cache of element issues from scanning */
|
|
120
|
-
elementIssuesCache: Map<string, ElementIssue>;
|
|
121
|
-
/** Enable live scanning */
|
|
122
|
-
enableLiveScan: () => void;
|
|
123
|
-
/** Disable live scanning */
|
|
124
|
-
disableLiveScan: () => void;
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Props for the UILintProvider component
|
|
128
|
-
*/
|
|
129
|
-
interface UILintProviderProps {
|
|
130
|
-
children: React.ReactNode;
|
|
131
|
-
enabled?: boolean;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Response from the source API
|
|
135
|
-
*/
|
|
136
|
-
interface SourceApiResponse {
|
|
137
|
-
content: string;
|
|
138
|
-
relativePath: string;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Cached source file content
|
|
142
|
-
*/
|
|
143
|
-
interface CachedSource {
|
|
144
|
-
content: string;
|
|
145
|
-
relativePath: string;
|
|
146
|
-
fetchedAt: number;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Color palette for source file differentiation
|
|
150
|
-
*/
|
|
151
|
-
declare const FILE_COLORS: readonly ["#3B82F6", "#8B5CF6", "#EC4899", "#10B981", "#F59E0B", "#06B6D4", "#EF4444", "#84CC16", "#6366F1", "#F97316", "#14B8A6", "#A855F7"];
|
|
152
|
-
/**
|
|
153
|
-
* Default settings
|
|
154
|
-
*/
|
|
155
|
-
declare const DEFAULT_SETTINGS: UILintSettings;
|
|
156
|
-
/**
|
|
157
|
-
* Data attribute used to mark scanned elements
|
|
158
|
-
*/
|
|
159
|
-
declare const DATA_UILINT_ID = "data-ui-lint-id";
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Hook to access UILint context
|
|
163
|
-
* For backwards compatibility - delegates to Zustand store
|
|
164
|
-
*/
|
|
165
|
-
declare function useUILintContext(): UILintContextValue;
|
|
166
|
-
/**
|
|
167
|
-
* UILint Provider Component
|
|
168
|
-
*/
|
|
169
|
-
declare function UILintProvider({ children, enabled, }: UILintProviderProps): react_jsx_runtime.JSX.Element;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* UILint Toolbar - Simplified Mode-Based Design
|
|
173
|
-
*
|
|
174
|
-
* Three distinct modes:
|
|
175
|
-
* 1. Disconnected: Minimal pill with settings only
|
|
176
|
-
* 2. Connected/Idle: Two-segment pill (Start Scanning + Settings)
|
|
177
|
-
* 3. Scanning: Compact floating UI with hint, status dropdown, and stop button
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
declare function UILintToolbar(): React$1.ReactPortal | null;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Inspection Panel - Lightweight floating popover showing element issues
|
|
184
|
-
* with inline code previews and "Open in Cursor" actions
|
|
185
|
-
*
|
|
186
|
-
* Positions near the clicked badge, avoiding overlap with the element itself.
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Main Inspection Panel Component - Floating Popover
|
|
191
|
-
*/
|
|
192
|
-
declare function InspectionPanel(): React$1.ReactPortal | null;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Locator Overlay - Shows element info when Alt/Option key is held
|
|
196
|
-
* Inspired by LocatorJS for a quick "hover to find source" experience
|
|
197
|
-
*
|
|
198
|
-
* Uses data-loc attributes only (no React Fiber).
|
|
199
|
-
*/
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Main Locator Overlay Component
|
|
203
|
-
*/
|
|
204
|
-
declare function LocatorOverlay(): React$1.ReactPortal | null;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* DOM utilities for UILint source file visualization
|
|
208
|
-
*
|
|
209
|
-
* Uses data-loc attributes injected by the jsx-loc-plugin build transform.
|
|
210
|
-
* This works uniformly for both server and client components in Next.js 15+.
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Parse source location from data-loc attribute
|
|
215
|
-
* Format: "path/to/file.tsx:line:column" (injected by jsx-loc-plugin)
|
|
216
|
-
* Also supports legacy format: "path/to/file.tsx:line"
|
|
217
|
-
*/
|
|
218
|
-
declare function getSourceFromDataLoc(element: Element): SourceLocation | null;
|
|
219
|
-
/**
|
|
220
|
-
* Check if a file path is from node_modules
|
|
221
|
-
*/
|
|
222
|
-
declare function isNodeModulesPath(path: string): boolean;
|
|
223
|
-
/**
|
|
224
|
-
* Get display name from a file path (just the filename)
|
|
225
|
-
*/
|
|
226
|
-
declare function getDisplayName(path: string): string;
|
|
227
|
-
/**
|
|
228
|
-
* Scan the DOM tree and extract elements with data-loc attributes
|
|
229
|
-
*/
|
|
230
|
-
declare function scanDOMForSources(root?: Element, hideNodeModules?: boolean): ScannedElement[];
|
|
231
|
-
/**
|
|
232
|
-
* Group scanned elements by their source file
|
|
233
|
-
*/
|
|
234
|
-
declare function groupBySourceFile(elements: ScannedElement[]): SourceFile[];
|
|
235
|
-
/**
|
|
236
|
-
* Clean up data attributes from previous scans
|
|
237
|
-
*/
|
|
238
|
-
declare function cleanupDataAttributes(): void;
|
|
239
|
-
/**
|
|
240
|
-
* Get an element by its UILint ID
|
|
241
|
-
*/
|
|
242
|
-
declare function getElementById(id: string): Element | null;
|
|
243
|
-
/**
|
|
244
|
-
* Update element rects (for scroll/resize handling)
|
|
245
|
-
*/
|
|
246
|
-
declare function updateElementRects(elements: ScannedElement[]): ScannedElement[];
|
|
247
|
-
/**
|
|
248
|
-
* Build an "Open in Editor" URL
|
|
249
|
-
* @param source - The source location (fileName may be relative or absolute)
|
|
250
|
-
* @param editor - The editor to open in (cursor or vscode)
|
|
251
|
-
* @param workspaceRoot - Optional workspace root to prepend for relative paths
|
|
252
|
-
*/
|
|
253
|
-
declare function buildEditorUrl(source: SourceLocation, editor?: "cursor" | "vscode", workspaceRoot?: string | null): string;
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Client for fetching source code from the dev API
|
|
257
|
-
*/
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Fetch source code for a file
|
|
261
|
-
*/
|
|
262
|
-
declare function fetchSource(filePath: string): Promise<SourceApiResponse | null>;
|
|
263
|
-
/**
|
|
264
|
-
* Fetch source and extract lines around a specific location
|
|
265
|
-
*/
|
|
266
|
-
declare function fetchSourceWithContext(source: SourceLocation, contextLines?: number): Promise<{
|
|
267
|
-
lines: string[];
|
|
268
|
-
startLine: number;
|
|
269
|
-
highlightLine: number;
|
|
270
|
-
relativePath: string;
|
|
271
|
-
} | null>;
|
|
272
|
-
/**
|
|
273
|
-
* Clear the source cache
|
|
274
|
-
*/
|
|
275
|
-
declare function clearSourceCache(): void;
|
|
276
|
-
/**
|
|
277
|
-
* Get cached source without fetching
|
|
278
|
-
*/
|
|
279
|
-
declare function getCachedSource(filePath: string): SourceApiResponse | null;
|
|
280
|
-
/**
|
|
281
|
-
* Prefetch source files for a list of paths
|
|
282
|
-
*/
|
|
283
|
-
declare function prefetchSources(filePaths: string[]): Promise<void>;
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* DOM snapshotting for consistency analysis
|
|
287
|
-
*/
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Cleans up data-elements attributes from previous scans
|
|
291
|
-
*/
|
|
292
|
-
declare function cleanupDataElements(): void;
|
|
293
|
-
/**
|
|
294
|
-
* Creates a grouped snapshot of DOM elements for consistency analysis
|
|
295
|
-
*/
|
|
296
|
-
declare function createSnapshot(root?: Element): GroupedSnapshot;
|
|
297
|
-
/**
|
|
298
|
-
* Gets an element by its data-elements ID
|
|
299
|
-
*/
|
|
300
|
-
declare function getElementBySnapshotId(id: string): Element | null;
|
|
301
|
-
|
|
302
|
-
interface ConsistencyHighlighterProps {
|
|
303
|
-
violations: Violation[];
|
|
304
|
-
selectedViolation: Violation | null;
|
|
305
|
-
lockedViolation: Violation | null;
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Main consistency highlighter component
|
|
309
|
-
* Renders highlights via Portal to document.body
|
|
310
|
-
*/
|
|
311
|
-
declare function ConsistencyHighlighter({ violations, selectedViolation, lockedViolation, }: ConsistencyHighlighterProps): React$1.ReactPortal | null;
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* DOM scanner for browser environment
|
|
315
|
-
* Re-exports and wraps uilint-core functions for browser use
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Scans the DOM and extracts a snapshot of all styles
|
|
320
|
-
*/
|
|
321
|
-
declare function scanDOM(root?: Element | Document): DOMSnapshot;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Environment detection utilities
|
|
325
|
-
*/
|
|
326
|
-
/**
|
|
327
|
-
* Checks if we're running in a browser environment
|
|
328
|
-
*/
|
|
329
|
-
declare function isBrowser(): boolean;
|
|
330
|
-
/**
|
|
331
|
-
* Checks if we're running in a JSDOM environment (tests)
|
|
332
|
-
*/
|
|
333
|
-
declare function isJSDOM(): boolean;
|
|
334
|
-
/**
|
|
335
|
-
* Checks if we're running in Node.js
|
|
336
|
-
*/
|
|
337
|
-
declare function isNode(): boolean;
|
|
338
|
-
|
|
339
|
-
export { type CachedSource, ConsistencyHighlighter, DATA_UILINT_ID, DEFAULT_SETTINGS, FILE_COLORS, type InspectedElement, InspectionPanel, LocatorOverlay, type LocatorTarget, type ScannedElement, type SourceApiResponse, type SourceFile, type SourceLocation, type UILintContextValue, UILintProvider, type UILintProviderProps, type UILintSettings, UILintToolbar, buildEditorUrl, cleanupDataAttributes, cleanupDataElements, clearSourceCache, createSnapshot, fetchSource, fetchSourceWithContext, getCachedSource, getDisplayName, getElementById, getElementBySnapshotId, getSourceFromDataLoc, groupBySourceFile, isBrowser, isJSDOM, isNode, isNodeModulesPath, prefetchSources, scanDOM, scanDOMForSources, updateElementRects, useUILintContext };
|
|
1
|
+
import { UILintIssue, StyleGuide, ExtractedStyles, SerializedStyles, DOMSnapshot, AnalysisResult } from 'uilint-core';
|
|
2
|
+
export { UILintProvider, useUILintContext, UILintToolbar, InspectionPanel, LocatorOverlay, scanDOMForSources, groupBySourceFile, cleanupDataAttributes, getElementById, updateElementRects, buildEditorUrl, isNodeModulesPath, getDisplayName, getSourceFromDataLoc, fetchSource, fetchSourceWithContext, clearSourceCache, getCachedSource, prefetchSources, FILE_COLORS, DEFAULT_SETTINGS, DATA_UILINT_ID, } from './components/ui-lint';
|
|
3
|
+
export type { SourceLocation, ScannedElement, SourceFile, UILintSettings, UILintContextValue, UILintProviderProps, SourceApiResponse, CachedSource, LocatorTarget, InspectedElement, } from './components/ui-lint';
|
|
4
|
+
export { createSnapshot, cleanupDataElements, getElementBySnapshotId, ConsistencyHighlighter, } from './consistency/index';
|
|
5
|
+
export type { StyleSnapshot, ElementRole, ElementSnapshot, GroupedSnapshot, Violation, ViolationCategory, ViolationSeverity, ConsistencyResult, } from './consistency/types';
|
|
6
|
+
export type { UILintIssue, StyleGuide, ExtractedStyles, SerializedStyles, DOMSnapshot, AnalysisResult, };
|
|
7
|
+
export { scanDOM } from './scanner/dom-scanner';
|
|
8
|
+
export { isBrowser, isJSDOM, isNode } from './scanner/environment';
|
|
9
|
+
export { extractStylesFromDOM, serializeStyles, createStyleSummary, } from 'uilint-core';
|
|
10
|
+
export { parseStyleGuide } from 'uilint-core';
|
|
11
|
+
export { generateStyleGuideFromStyles as generateStyleGuide } from 'uilint-core';
|
|
12
|
+
export { createEmptyStyleGuide, mergeStyleGuides } from 'uilint-core';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,cAAc,EAEd,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EAEpB,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,eAAe,EAEf,WAAW,EACX,gBAAgB,EAChB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,cAAc,EACd,cAAc,EACd,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,cAAc,GACf,CAAC;AAGF,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAMnE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,4BAA4B,IAAI,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|