uilint-react 0.2.21 → 0.2.23
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/components/ui-lint/ElementBadges.d.ts.map +1 -1
- package/dist/components/ui-lint/FloatingIcon.d.ts +3 -0
- package/dist/components/ui-lint/FloatingIcon.d.ts.map +1 -0
- package/dist/components/ui-lint/HeatmapOverlay.d.ts +3 -0
- package/dist/components/ui-lint/HeatmapOverlay.d.ts.map +1 -0
- package/dist/components/ui-lint/LocatorOverlay.d.ts +0 -4
- package/dist/components/ui-lint/LocatorOverlay.d.ts.map +1 -1
- package/dist/components/ui-lint/UILintUI.d.ts.map +1 -1
- package/dist/components/ui-lint/VisionIssueBadge.d.ts.map +1 -1
- package/dist/components/ui-lint/VisionIssuesPanel.d.ts.map +1 -1
- package/dist/components/ui-lint/command-palette/CategorySidebar.d.ts +27 -0
- package/dist/components/ui-lint/command-palette/CategorySidebar.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/CommandPalette.d.ts +7 -0
- package/dist/components/ui-lint/command-palette/CommandPalette.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/CommandPaletteInput.d.ts +18 -0
- package/dist/components/ui-lint/command-palette/CommandPaletteInput.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/CommandPaletteItem.d.ts +26 -0
- package/dist/components/ui-lint/command-palette/CommandPaletteItem.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/CommandPaletteResults.d.ts +43 -0
- package/dist/components/ui-lint/command-palette/CommandPaletteResults.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/FilterChips.d.ts +11 -0
- package/dist/components/ui-lint/command-palette/FilterChips.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/RuleEditor.d.ts +22 -0
- package/dist/components/ui-lint/command-palette/RuleEditor.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/RuleToggleItem.d.ts +21 -0
- package/dist/components/ui-lint/command-palette/RuleToggleItem.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/SourceCodePreview.d.ts +17 -0
- package/dist/components/ui-lint/command-palette/SourceCodePreview.d.ts.map +1 -0
- package/dist/components/ui-lint/{toolbar → command-palette}/icons.d.ts +9 -11
- package/dist/components/ui-lint/command-palette/icons.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/index.d.ts +13 -0
- package/dist/components/ui-lint/command-palette/index.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/types.d.ts +160 -0
- package/dist/components/ui-lint/command-palette/types.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/use-fuzzy-search.d.ts +19 -0
- package/dist/components/ui-lint/command-palette/use-fuzzy-search.d.ts.map +1 -0
- package/dist/components/ui-lint/command-palette/use-keyboard-navigation.d.ts +10 -0
- package/dist/components/ui-lint/command-palette/use-keyboard-navigation.d.ts.map +1 -0
- package/dist/components/ui-lint/dom-utils.d.ts +13 -2
- package/dist/components/ui-lint/dom-utils.d.ts.map +1 -1
- package/dist/components/ui-lint/heatmap-colors.d.ts +24 -0
- package/dist/components/ui-lint/heatmap-colors.d.ts.map +1 -0
- package/dist/components/ui-lint/hooks/useDevToolEventHandlers.d.ts.map +1 -1
- package/dist/components/ui-lint/index.d.ts +3 -3
- package/dist/components/ui-lint/index.d.ts.map +1 -1
- package/dist/components/ui-lint/store.d.ts +138 -5
- package/dist/components/ui-lint/store.d.ts.map +1 -1
- package/dist/components/ui-lint/types.d.ts +7 -1
- package/dist/components/ui-lint/types.d.ts.map +1 -1
- package/dist/components/ui-lint/useDOMObserver.d.ts.map +1 -1
- package/dist/devtools.js +105 -99
- package/dist/devtools.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7469 -7045
- package/dist/index.js.map +1 -1
- package/dist/scanner/vision-capture.d.ts +1 -1
- package/dist/scanner/vision-capture.d.ts.map +1 -1
- package/dist/{vision-capture-l4ZJB8M8.js → vision-capture-8mhdjw77.js} +56 -50
- package/dist/vision-capture-8mhdjw77.js.map +1 -0
- package/dist/web-component.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/components/ui-lint/InspectionPanel.d.ts +0 -6
- package/dist/components/ui-lint/InspectionPanel.d.ts.map +0 -1
- package/dist/components/ui-lint/ScanResultsPopover.d.ts +0 -6
- package/dist/components/ui-lint/ScanResultsPopover.d.ts.map +0 -1
- package/dist/components/ui-lint/scan-results/FileTree.d.ts +0 -25
- package/dist/components/ui-lint/scan-results/FileTree.d.ts.map +0 -1
- package/dist/components/ui-lint/scan-results/IssueRow.d.ts +0 -16
- package/dist/components/ui-lint/scan-results/IssueRow.d.ts.map +0 -1
- package/dist/components/ui-lint/scan-results/SearchFilter.d.ts +0 -8
- package/dist/components/ui-lint/scan-results/SearchFilter.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/TabbedToolbar.d.ts +0 -2
- package/dist/components/ui-lint/toolbar/TabbedToolbar.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/icons.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/index.d.ts +0 -3
- package/dist/components/ui-lint/toolbar/index.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/tabs/ConfigureTab.d.ts +0 -2
- package/dist/components/ui-lint/toolbar/tabs/ConfigureTab.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/tabs/ESLintTab.d.ts +0 -2
- package/dist/components/ui-lint/toolbar/tabs/ESLintTab.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/tabs/VisionTab.d.ts +0 -2
- package/dist/components/ui-lint/toolbar/tabs/VisionTab.d.ts.map +0 -1
- package/dist/components/ui-lint/toolbar/tokens.d.ts +0 -45
- package/dist/components/ui-lint/toolbar/tokens.d.ts.map +0 -1
- package/dist/vision-capture-l4ZJB8M8.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementBadges.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/ElementBadges.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAoD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ElementBadges.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/ElementBadges.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAoD,MAAM,OAAO,CAAC;AA6JzE;;GAEG;AACH,wBAAgB,aAAa,6BAyP5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingIcon.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/FloatingIcon.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,KAA4D,MAAM,OAAO,CAAC;AAoCjF,wBAAgB,YAAY,6BA+S3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeatmapOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/HeatmapOverlay.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAAoD,MAAM,OAAO,CAAC;AAiCzE,wBAAgB,cAAc,6BAgQ7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocatorOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/LocatorOverlay.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"LocatorOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/LocatorOverlay.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD;;GAEG;AACH,wBAAgB,oBAAoB,6BAqEnC;AAED;;GAEG;AACH,wBAAgB,yBAAyB,6BA8ExC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UILintUI.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/UILintUI.tsx"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"UILintUI.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/UILintUI.tsx"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,QAAQ,mDAiFvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisionIssueBadge.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/VisionIssueBadge.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VisionIssueBadge.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/VisionIssueBadge.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,KAA+B,MAAM,OAAO,CAAC;AA0JpD;;GAEG;AACH,wBAAgB,iBAAiB,6BAkFhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisionIssuesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/VisionIssuesPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VisionIssuesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/VisionIssuesPanel.tsx"],"names":[],"mappings":"AAsZA,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,OAAO,EACP,QAAgB,GACjB,EAAE,sBAAsB,kDA+exB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface FileCategory {
|
|
2
|
+
filePath: string;
|
|
3
|
+
fileName: string;
|
|
4
|
+
directory: string;
|
|
5
|
+
issueCount: number;
|
|
6
|
+
}
|
|
7
|
+
interface CategorySidebarProps {
|
|
8
|
+
/** File categories with issue counts */
|
|
9
|
+
fileCategories: FileCategory[];
|
|
10
|
+
/** Number of settings items in current results */
|
|
11
|
+
settingsCount: number;
|
|
12
|
+
/** Number of vision action items in current results */
|
|
13
|
+
visionCount: number;
|
|
14
|
+
/** Number of captures in current results */
|
|
15
|
+
capturesCount: number;
|
|
16
|
+
/** Number of rules in current results */
|
|
17
|
+
rulesCount: number;
|
|
18
|
+
/** Called when a category is clicked */
|
|
19
|
+
onCategoryClick: (categoryId: string) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Sidebar showing categories for quick navigation
|
|
23
|
+
* Order: Issues (files) → Vision → Rules → Settings
|
|
24
|
+
*/
|
|
25
|
+
export declare function CategorySidebar({ fileCategories, settingsCount, visionCount, capturesCount, rulesCount, onCategoryClick, }: CategorySidebarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=CategorySidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategorySidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/CategorySidebar.tsx"],"names":[],"mappings":"AAMA,UAAU,YAAY;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,oBAAoB;IAC5B,wCAAwC;IACxC,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,eAAe,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,aAAa,EACb,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,GAChB,EAAE,oBAAoB,kDAsEtB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Command Palette - Unified search interface for UILint
|
|
4
|
+
* Single searchable list with contextual categories
|
|
5
|
+
*/
|
|
6
|
+
export declare function CommandPalette(): React.ReactPortal | null;
|
|
7
|
+
//# sourceMappingURL=CommandPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPalette.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/CommandPalette.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAiIzE;;;GAGG;AACH,wBAAgB,cAAc,6BAoc7B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CommandPaletteFilter } from './types';
|
|
2
|
+
interface CommandPaletteInputProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
/** Connection status indicator */
|
|
7
|
+
isConnected?: boolean;
|
|
8
|
+
/** Active filters shown as chips */
|
|
9
|
+
filters?: CommandPaletteFilter[];
|
|
10
|
+
/** Callback to remove a filter by index */
|
|
11
|
+
onRemoveFilter?: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Search input for command palette - unified search, no mode tabs
|
|
15
|
+
*/
|
|
16
|
+
export declare function CommandPaletteInput({ value, onChange, placeholder, isConnected, filters, onRemoveFilter, }: CommandPaletteInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=CommandPaletteInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPaletteInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/CommandPaletteInput.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,UAAU,wBAAwB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oCAAoC;IACpC,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACjC,2CAA2C;IAC3C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,WAAuD,EACvD,WAAW,EACX,OAAY,EACZ,cAAc,GACf,EAAE,wBAAwB,2CA2G1B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CommandPaletteItemProps {
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
rightElement?: React.ReactNode;
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
onMouseEnter?: () => void;
|
|
10
|
+
onMouseLeave?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generic item component for command palette results
|
|
14
|
+
*/
|
|
15
|
+
export declare function CommandPaletteItem({ icon, title, subtitle, rightElement, isSelected, onClick, onMouseEnter, onMouseLeave, }: CommandPaletteItemProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Section header for grouping results
|
|
18
|
+
*/
|
|
19
|
+
export declare function CommandPaletteSectionHeader({ children, icon, categoryId, }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
/** Used for scroll-to-category navigation */
|
|
23
|
+
categoryId?: string;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=CommandPaletteItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPaletteItem.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/CommandPaletteItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,uBAAuB;IAC/B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,UAAkB,EAClB,OAAO,EACP,YAAY,EACZ,YAAY,GACb,EAAE,uBAAuB,2CAoCzB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,EACR,IAAI,EACJ,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,2CAgBA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ScoredSearchResult, CommandPaletteFilter } from './types';
|
|
2
|
+
import { AvailableRule, RuleConfig } from '../store';
|
|
3
|
+
interface CommandPaletteResultsProps {
|
|
4
|
+
results: ScoredSearchResult[];
|
|
5
|
+
selectedIndex: number;
|
|
6
|
+
/** ID of the currently selected/pinned item (persists across interactions) */
|
|
7
|
+
selectedItemId: string | null;
|
|
8
|
+
onSelect: (index: number) => void;
|
|
9
|
+
onHover: (itemId: string | null) => void;
|
|
10
|
+
onToggleRule: (ruleId: string) => void;
|
|
11
|
+
/** Callback for toggling ESLint scan on/off */
|
|
12
|
+
onToggleScan: () => void;
|
|
13
|
+
/** Current state of ESLint live scanning */
|
|
14
|
+
liveScanEnabled: boolean;
|
|
15
|
+
disabledRules: Set<string>;
|
|
16
|
+
/** Called when a filter should be added (e.g., clicking a rule adds rule filter) */
|
|
17
|
+
onAddFilter?: (filter: CommandPaletteFilter) => void;
|
|
18
|
+
/** Active loc filters - issues matching these should be expanded */
|
|
19
|
+
activeLocFilters?: CommandPaletteFilter[];
|
|
20
|
+
/** Category ID to scroll to (e.g., "rules" or "file:/path/to/file.tsx") */
|
|
21
|
+
scrollToCategory?: string | null;
|
|
22
|
+
/** Called after scrolling to category completes */
|
|
23
|
+
onScrollComplete?: () => void;
|
|
24
|
+
/** Available rules with full metadata (docs, optionSchema, etc.) */
|
|
25
|
+
availableRules?: AvailableRule[];
|
|
26
|
+
/** Current rule configurations (severity + options) */
|
|
27
|
+
ruleConfigs?: Map<string, RuleConfig>;
|
|
28
|
+
/** Rule config update in progress (loading states) */
|
|
29
|
+
ruleConfigUpdating?: Map<string, boolean>;
|
|
30
|
+
/** Set rule config (severity and/or options) */
|
|
31
|
+
onSetRuleConfig?: (ruleId: string, severity: "error" | "warn" | "off", options?: Record<string, unknown>) => Promise<void>;
|
|
32
|
+
/** ID of expanded rule (showing editor) */
|
|
33
|
+
expandedRuleId?: string | null;
|
|
34
|
+
/** Set expanded rule ID */
|
|
35
|
+
onExpandRule?: (ruleId: string | null) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Results list for command palette - unified view with category sections
|
|
39
|
+
* Issues are grouped by file with per-file headers
|
|
40
|
+
*/
|
|
41
|
+
export declare function CommandPaletteResults({ results, selectedIndex, selectedItemId, onSelect, onHover, onToggleRule, onToggleScan, liveScanEnabled, disabledRules, onAddFilter, activeLocFilters, scrollToCategory, onScrollComplete, availableRules, ruleConfigs, ruleConfigUpdating, onSetRuleConfig, expandedRuleId, onExpandRule, }: CommandPaletteResultsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=CommandPaletteResults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandPaletteResults.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/CommandPaletteResults.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,kBAAkB,EAOlB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE1D,UAAU,0BAA0B;IAClC,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,+CAA+C;IAC/C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,4CAA4C;IAC5C,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,oFAAoF;IACpF,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACrD,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC1C,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,oEAAoE;IACpE,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,uDAAuD;IACvD,WAAW,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACtC,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,gDAAgD;IAChD,eAAe,CAAC,EAAE,CAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAChD;AAkBD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,aAAa,EACb,cAAc,EACd,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,EACX,gBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,cAAmB,EACnB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,YAAY,GACb,EAAE,0BAA0B,2CAwR5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommandPaletteFilter } from './types';
|
|
2
|
+
interface FilterChipsProps {
|
|
3
|
+
filters: CommandPaletteFilter[];
|
|
4
|
+
onRemove: (index: number) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* FilterChips - Renders all active filter chips
|
|
8
|
+
*/
|
|
9
|
+
export declare function FilterChips({ filters, onRemove }: FilterChipsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=FilterChips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterChips.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/FilterChips.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,UAAU,gBAAgB;IACxB,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAuFD;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,gBAAgB,kDAclE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AvailableRule, RuleConfig } from '../store';
|
|
2
|
+
interface RuleEditorProps {
|
|
3
|
+
rule: AvailableRule;
|
|
4
|
+
currentConfig: RuleConfig;
|
|
5
|
+
onSave: (severity: "error" | "warn" | "off", options?: Record<string, unknown>) => void;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
isUpdating: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Severity selector - 3-state toggle (Error/Warn/Off)
|
|
11
|
+
*/
|
|
12
|
+
declare function SeveritySelector({ value, onChange, disabled, }: {
|
|
13
|
+
value: "error" | "warn" | "off";
|
|
14
|
+
onChange: (severity: "error" | "warn" | "off") => void;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* Rule editor panel - shown when expanding a rule item
|
|
19
|
+
*/
|
|
20
|
+
export declare function RuleEditor({ rule, currentConfig, onSave, onClose, isUpdating, }: RuleEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { SeveritySelector };
|
|
22
|
+
//# sourceMappingURL=RuleEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/RuleEditor.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EAEX,MAAM,UAAU,CAAC;AAElB,UAAU,eAAe;IACvB,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,EAAE,UAAU,CAAC;IAC1B,MAAM,EAAE,CACN,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,IAAI,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,OAAO,CAAC;CACnB,2CAiDA;AA2KD;;GAEG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,aAAa,EACb,MAAM,EACN,OAAO,EACP,UAAU,GACX,EAAE,eAAe,2CA8JjB;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface RuleToggleItemProps {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category: "static" | "semantic";
|
|
6
|
+
severity: "error" | "warn" | "off";
|
|
7
|
+
isSelected?: boolean;
|
|
8
|
+
isExpanded?: boolean;
|
|
9
|
+
isUpdating?: boolean;
|
|
10
|
+
hasOptions?: boolean;
|
|
11
|
+
onSeverityChange: (id: string, severity: "error" | "warn" | "off") => void;
|
|
12
|
+
onExpandClick: (id: string) => void;
|
|
13
|
+
onMouseEnter?: () => void;
|
|
14
|
+
issueCount?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Rule item with severity toggle and settings button for command palette
|
|
18
|
+
*/
|
|
19
|
+
export declare function RuleToggleItem({ id, name, description, category, severity, isSelected, isExpanded, isUpdating, hasOptions, onSeverityChange, onExpandClick, onMouseEnter, issueCount, }: RuleToggleItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=RuleToggleItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RuleToggleItem.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/RuleToggleItem.tsx"],"names":[],"mappings":"AAKA,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAC;IAChC,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IAC3E,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAoHD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,EAAE,EACF,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,UAAc,GACf,EAAE,mBAAmB,2CA4ErB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface SourceCodePreviewProps {
|
|
2
|
+
filePath: string;
|
|
3
|
+
lineNumber: number;
|
|
4
|
+
columnNumber?: number;
|
|
5
|
+
/** Whether to show context controls (default: true) */
|
|
6
|
+
showControls?: boolean;
|
|
7
|
+
/** Initial context lines (default: 3) */
|
|
8
|
+
initialContextLines?: number;
|
|
9
|
+
/** Maximum height of the preview (default: "max-h-64") */
|
|
10
|
+
maxHeightClass?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Source code preview component with context controls
|
|
14
|
+
*/
|
|
15
|
+
export declare function SourceCodePreview({ filePath, lineNumber, columnNumber, showControls, initialContextLines, maxHeightClass, }: SourceCodePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=SourceCodePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourceCodePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/SourceCodePreview.tsx"],"names":[],"mappings":"AAQA,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0DAA0D;IAC1D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,YAAmB,EACnB,mBAAuB,EACvB,cAA2B,GAC5B,EAAE,sBAAsB,2CAuJxB"}
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
|
-
* Icon components for
|
|
5
|
+
* Icon components for command palette and floating icon
|
|
6
6
|
*/
|
|
7
7
|
export declare const Icons: {
|
|
8
8
|
Eye: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,8 @@ export declare const Icons: {
|
|
|
10
10
|
Check: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
AlertTriangle: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
ChevronDown: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
ChevronLeft: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
ChevronRight: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
X: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
16
|
Unplug: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
Scan: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,17 +19,13 @@ export declare const Icons: {
|
|
|
17
19
|
Crop: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
Spinner: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
Play: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
Layout: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
Type: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
Palette: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
AlignLeft: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
Grid: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
Contrast: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
AlertCircle: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
CheckCircle: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
22
|
Image: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
Search: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
File: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
Zap: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
Plug: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
ExternalLink: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
Box: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
29
|
};
|
|
32
30
|
export {};
|
|
33
31
|
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,SAAU,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;CAAG;AAE5D;;GAEG;AACH,eAAO,MAAM,KAAK;iBACH,SAAS;sBAgBJ,SAAS;mBAgBZ,SAAS;2BAeD,SAAS;yBAiBX,SAAS;yBAeT,SAAS;0BAeR,SAAS;eAepB,SAAS;oBAgBJ,SAAS;kBAmBX,SAAS;oBAmBP,SAAS;kBAgBX,SAAS;qBAgBN,SAAS;kBAgBZ,SAAS;mBAeR,SAAS;oBAiBR,SAAS;kBAgBX,SAAS;iBAgBV,SAAS;kBAeR,SAAS;0BAkBD,SAAS;iBAiBlB,SAAS;CAiBvB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Command Palette - Command+K inspired panel for UILint
|
|
3
|
+
*/
|
|
4
|
+
export { CommandPalette } from './CommandPalette';
|
|
5
|
+
export { CommandPaletteInput } from './CommandPaletteInput';
|
|
6
|
+
export { CommandPaletteResults } from './CommandPaletteResults';
|
|
7
|
+
export { CommandPaletteItem, CommandPaletteSectionHeader, } from './CommandPaletteItem';
|
|
8
|
+
export { CategorySidebar } from './CategorySidebar';
|
|
9
|
+
export { RuleToggleItem } from './RuleToggleItem';
|
|
10
|
+
export { useFuzzySearch, buildSearchableItems } from './use-fuzzy-search';
|
|
11
|
+
export { useKeyboardNavigation, useCommandPaletteShortcut, } from './use-keyboard-navigation';
|
|
12
|
+
export type * from './types';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { ESLintIssue, ScannedElement, SourceFile, ScreenshotCapture } from '../types';
|
|
2
|
+
import { VisionIssue } from '../../../scanner/vision-capture';
|
|
3
|
+
/**
|
|
4
|
+
* Categories for organizing items in the unified list
|
|
5
|
+
*/
|
|
6
|
+
export type CategoryType = "settings" | "vision" | "actions" | "rules" | "captures" | "files" | "issues";
|
|
7
|
+
/**
|
|
8
|
+
* Result types that can appear in search
|
|
9
|
+
*/
|
|
10
|
+
export type SearchResultType = "action" | "file" | "rule" | "element" | "issue" | "capture";
|
|
11
|
+
/**
|
|
12
|
+
* Rule metadata from uilint-eslint (simplified for command palette)
|
|
13
|
+
*/
|
|
14
|
+
export interface RuleMeta {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
category: "static" | "semantic";
|
|
19
|
+
defaultSeverity: "error" | "warn" | "off";
|
|
20
|
+
docs?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A searchable item in the command palette
|
|
24
|
+
*/
|
|
25
|
+
export interface SearchableItem {
|
|
26
|
+
type: SearchResultType;
|
|
27
|
+
category: CategoryType;
|
|
28
|
+
id: string;
|
|
29
|
+
/** Text to search against */
|
|
30
|
+
searchText: string;
|
|
31
|
+
/** Primary display text */
|
|
32
|
+
title: string;
|
|
33
|
+
/** Secondary display text */
|
|
34
|
+
subtitle?: string;
|
|
35
|
+
/** Issue count for files/elements/rules */
|
|
36
|
+
issueCount?: number;
|
|
37
|
+
/** Original data for actions */
|
|
38
|
+
data: ActionSearchData | FileSearchData | RuleSearchData | ElementSearchData | IssueSearchData | CaptureSearchData;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Action types for suggested actions
|
|
42
|
+
*/
|
|
43
|
+
export type ActionType = "connect" | "toggle-scan" | "start-scan" | "stop-scan" | "capture-full" | "capture-region";
|
|
44
|
+
/**
|
|
45
|
+
* Action search result data
|
|
46
|
+
*/
|
|
47
|
+
export interface ActionSearchData {
|
|
48
|
+
type: "action";
|
|
49
|
+
actionType: ActionType;
|
|
50
|
+
icon?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* File search result data
|
|
54
|
+
*/
|
|
55
|
+
export interface FileSearchData {
|
|
56
|
+
type: "file";
|
|
57
|
+
sourceFile: SourceFile;
|
|
58
|
+
issueCount: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Rule search result data
|
|
62
|
+
*/
|
|
63
|
+
export interface RuleSearchData {
|
|
64
|
+
type: "rule";
|
|
65
|
+
rule: RuleMeta;
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Element search result data
|
|
70
|
+
*/
|
|
71
|
+
export interface ElementSearchData {
|
|
72
|
+
type: "element";
|
|
73
|
+
element: ScannedElement;
|
|
74
|
+
issues: ESLintIssue[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Issue search result data
|
|
78
|
+
*/
|
|
79
|
+
export interface IssueSearchData {
|
|
80
|
+
type: "issue";
|
|
81
|
+
issue: ESLintIssue;
|
|
82
|
+
elementId?: string;
|
|
83
|
+
filePath: string;
|
|
84
|
+
/** For file-level issues, the loc of the first element in the file (used for loc filter matching) */
|
|
85
|
+
elementLoc?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Capture/screenshot search result data
|
|
89
|
+
*/
|
|
90
|
+
export interface CaptureSearchData {
|
|
91
|
+
type: "capture";
|
|
92
|
+
capture: ScreenshotCapture;
|
|
93
|
+
issues: VisionIssue[];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Search result with match score
|
|
97
|
+
*/
|
|
98
|
+
export interface ScoredSearchResult {
|
|
99
|
+
item: SearchableItem;
|
|
100
|
+
score: number;
|
|
101
|
+
/** Matched indices for highlighting */
|
|
102
|
+
matches?: number[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Props for keyboard navigation hook
|
|
106
|
+
*/
|
|
107
|
+
export interface KeyboardNavigationOptions {
|
|
108
|
+
isOpen: boolean;
|
|
109
|
+
itemCount: number;
|
|
110
|
+
selectedIndex: number;
|
|
111
|
+
onSelect: (index: number) => void;
|
|
112
|
+
onIndexChange: (index: number) => void;
|
|
113
|
+
onClose: () => void;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Grouped search results by category
|
|
117
|
+
*/
|
|
118
|
+
export interface GroupedSearchResults {
|
|
119
|
+
settings: ScoredSearchResult[];
|
|
120
|
+
vision: ScoredSearchResult[];
|
|
121
|
+
rules: ScoredSearchResult[];
|
|
122
|
+
captures: ScoredSearchResult[];
|
|
123
|
+
files: ScoredSearchResult[];
|
|
124
|
+
issues: ScoredSearchResult[];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* State for expanded items in the list
|
|
128
|
+
*/
|
|
129
|
+
export interface ExpandedItemState {
|
|
130
|
+
/** ID of the currently expanded item (only one at a time) */
|
|
131
|
+
expandedId: string | null;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Item interaction callbacks
|
|
135
|
+
*/
|
|
136
|
+
export interface ItemCallbacks {
|
|
137
|
+
onHover?: (itemId: string | null) => void;
|
|
138
|
+
onClick?: (itemId: string) => void;
|
|
139
|
+
onToggle?: (itemId: string, enabled: boolean) => void;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Context for element inspection mode
|
|
143
|
+
*/
|
|
144
|
+
export interface ElementContext {
|
|
145
|
+
element: Element;
|
|
146
|
+
scannedElement?: ScannedElement;
|
|
147
|
+
issues: ESLintIssue[];
|
|
148
|
+
filePath: string;
|
|
149
|
+
lineNumber: number;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Filter chip for the command palette search
|
|
153
|
+
* Allows filtering by rule, issue, loc (source location), file, or capture
|
|
154
|
+
*/
|
|
155
|
+
export interface CommandPaletteFilter {
|
|
156
|
+
type: "rule" | "issue" | "loc" | "file" | "capture";
|
|
157
|
+
value: string;
|
|
158
|
+
label: string;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SearchableItem, ScoredSearchResult, CommandPaletteFilter } from './types';
|
|
2
|
+
import { ScannedElement, ElementIssue, ESLintIssue, ScreenshotCapture } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to perform fuzzy search over items with optional filters
|
|
5
|
+
* When query is empty, returns items grouped by category
|
|
6
|
+
*/
|
|
7
|
+
export declare function useFuzzySearch(query: string, items: SearchableItem[], filters?: CommandPaletteFilter[]): ScoredSearchResult[];
|
|
8
|
+
/**
|
|
9
|
+
* Build searchable items from store data
|
|
10
|
+
* Includes rules, files, captures, and issues (but not actions - those are built separately)
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildSearchableItems(elements: ScannedElement[], elementIssuesCache: Map<string, ElementIssue>, fileIssuesCache: Map<string, ESLintIssue[]>, rules: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
category: "static" | "semantic";
|
|
17
|
+
defaultSeverity: "error" | "warn" | "off";
|
|
18
|
+
}>, disabledRules: Set<string>, screenshotHistory: Map<string, ScreenshotCapture>): SearchableItem[];
|
|
19
|
+
//# sourceMappingURL=use-fuzzy-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-fuzzy-search.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/use-fuzzy-search.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAMlB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AA0N7F;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,cAAc,EAAE,EACvB,OAAO,GAAE,oBAAoB,EAAO,GACnC,kBAAkB,EAAE,CA6BtB;AAUD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,cAAc,EAAE,EAC1B,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC7C,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAC3C,KAAK,EAAE,KAAK,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,GAAG,UAAU,CAAC;IAChC,eAAe,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;CAC3C,CAAC,EACF,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAChD,cAAc,EAAE,CA6KlB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KeyboardNavigationOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to handle keyboard navigation in command palette
|
|
4
|
+
*/
|
|
5
|
+
export declare function useKeyboardNavigation({ isOpen, itemCount, selectedIndex, onSelect, onIndexChange, onClose, }: KeyboardNavigationOptions): void;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to detect Cmd+K / Ctrl+K to open command palette
|
|
8
|
+
*/
|
|
9
|
+
export declare function useCommandPaletteShortcut(onOpen: () => void): void;
|
|
10
|
+
//# sourceMappingURL=use-keyboard-navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-keyboard-navigation.d.ts","sourceRoot":"","sources":["../../../../src/components/ui-lint/command-palette/use-keyboard-navigation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,SAAS,EACT,aAAa,EACb,QAAQ,EACR,aAAa,EACb,OAAO,GACR,EAAE,yBAAyB,QAoD3B;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,IAAI,QAgB3D"}
|
|
@@ -2,7 +2,9 @@ import { SourceLocation, ScannedElement, SourceFile } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* Parse source location from data-loc attribute
|
|
4
4
|
* Format: "path/to/file.tsx:line:column" (injected by jsx-loc-plugin)
|
|
5
|
-
* Also supports
|
|
5
|
+
* Also supports:
|
|
6
|
+
* - Legacy format: "path/to/file.tsx:line"
|
|
7
|
+
* - Runtime ID format: "loc:path/to/file.tsx:line:column#occurrence"
|
|
6
8
|
*/
|
|
7
9
|
export declare function getSourceFromDataLoc(element: Element): SourceLocation | null;
|
|
8
10
|
/**
|
|
@@ -22,7 +24,8 @@ export declare function scanDOMForSources(root?: Element, hideNodeModules?: bool
|
|
|
22
24
|
*/
|
|
23
25
|
export declare function groupBySourceFile(elements: ScannedElement[]): SourceFile[];
|
|
24
26
|
/**
|
|
25
|
-
* Clean up
|
|
27
|
+
* Clean up runtime IDs from previous scans, restoring to source location only
|
|
28
|
+
* Elements with data-loc in "loc:..." format will have the ID reset
|
|
26
29
|
*/
|
|
27
30
|
export declare function cleanupDataAttributes(): void;
|
|
28
31
|
/**
|
|
@@ -33,6 +36,14 @@ export declare function getElementById(id: string): Element | null;
|
|
|
33
36
|
* Update element rects (for scroll/resize handling)
|
|
34
37
|
*/
|
|
35
38
|
export declare function updateElementRects(elements: ScannedElement[]): ScannedElement[];
|
|
39
|
+
/**
|
|
40
|
+
* Identify the top-level (first declared) element for each source file.
|
|
41
|
+
* The top-level element is determined by the earliest line number within each file.
|
|
42
|
+
* This is used to display file-level issues on the appropriate element in heatmap mode.
|
|
43
|
+
*
|
|
44
|
+
* @returns Map of filePath -> elementId for the top-level element
|
|
45
|
+
*/
|
|
46
|
+
export declare function identifyTopLevelElements(elements: ScannedElement[]): Map<string, string>;
|
|
36
47
|
/**
|
|
37
48
|
* Build an "Open in Editor" URL
|
|
38
49
|
* @param source - The source location (fileName may be relative or absolute)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom-utils.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/dom-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"dom-utils.d.ts","sourceRoot":"","sources":["../../../src/components/ui-lint/dom-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAgC1E;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CA+C5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD;AA0BD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,GAAE,OAAuB,EAC7B,eAAe,GAAE,OAAc,GAC9B,cAAc,EAAE,CAsDlB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CA6B1E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAc5C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAEzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,EAAE,GACzB,cAAc,EAAE,CAKlB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,cAAc,EAAE,GACzB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA2BrB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,GAAE,QAAQ,GAAG,QAAmB,EACtC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAC5B,MAAM,CAuBR"}
|