uilint-react 0.2.103 → 0.2.104

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.
@@ -0,0 +1,109 @@
1
+ import { ComposedState } from './composed-store';
2
+ import { HeatmapFilterState } from './core-slice';
3
+ /**
4
+ * Clear the heatmap data locs cache. Call this when the store is reset.
5
+ */
6
+ export declare function clearHeatmapDataLocsCache(): void;
7
+ /**
8
+ * Select the heatmap filter state.
9
+ *
10
+ * @param state - The composed store state
11
+ * @returns The heatmap filter state object
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const heatmapFilter = useComposedStore(selectHeatmapFilter);
16
+ * console.log(heatmapFilter.mode); // "all" | "related-only"
17
+ * ```
18
+ */
19
+ export declare function selectHeatmapFilter(state: ComposedState): HeatmapFilterState;
20
+ /**
21
+ * Select the filter label (if any).
22
+ * The label describes what the current filter is showing (e.g., "Duplicate Pair").
23
+ *
24
+ * @param state - The composed store state
25
+ * @returns The filter label string or null if no label is set
26
+ *
27
+ * @example
28
+ * ```tsx
29
+ * const filterLabel = useComposedStore(selectHeatmapFilterLabel);
30
+ * if (filterLabel) {
31
+ * console.log(`Showing: ${filterLabel}`);
32
+ * }
33
+ * ```
34
+ */
35
+ export declare function selectHeatmapFilterLabel(state: ComposedState): string | null;
36
+ /**
37
+ * Select if heatmap is in filtered mode.
38
+ * Returns true when the heatmap is showing only a subset of elements
39
+ * (mode is "related-only" AND there are highlighted locations).
40
+ *
41
+ * @param state - The composed store state
42
+ * @returns true if the heatmap is currently filtered
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * const isFiltered = useComposedStore(selectIsHeatmapFiltered);
47
+ * if (isFiltered) {
48
+ * // Show "Clear filter" button
49
+ * }
50
+ * ```
51
+ */
52
+ export declare function selectIsHeatmapFiltered(state: ComposedState): boolean;
53
+ /**
54
+ * Select the highlighted locations array.
55
+ *
56
+ * @param state - The composed store state
57
+ * @returns Array of dataLoc strings that are highlighted
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * const highlightedLocs = useComposedStore(selectHighlightedLocs);
62
+ * console.log(`${highlightedLocs.length} locations highlighted`);
63
+ * ```
64
+ */
65
+ export declare function selectHighlightedLocs(state: ComposedState): string[];
66
+ /**
67
+ * Select the count of highlighted locations.
68
+ *
69
+ * @param state - The composed store state
70
+ * @returns Number of highlighted locations
71
+ *
72
+ * @example
73
+ * ```tsx
74
+ * const count = useComposedStore(selectHighlightedLocsCount);
75
+ * console.log(`Showing ${count} related elements`);
76
+ * ```
77
+ */
78
+ export declare function selectHighlightedLocsCount(state: ComposedState): number;
79
+ /**
80
+ * Derive the dataLocs to highlight based on current tile filters.
81
+ * This connects tile navigation to heatmap visualization.
82
+ *
83
+ * Filter logic:
84
+ * - No filters: return empty array (show all issues)
85
+ * - Rule filter only: return all dataLocs for that rule
86
+ * - Rule + File filter: return dataLocs for that rule in that file
87
+ *
88
+ * Results are memoized to ensure stable references for React.
89
+ *
90
+ * @param state - The composed store state
91
+ * @returns Array of dataLoc strings that should be highlighted
92
+ *
93
+ * @example
94
+ * ```tsx
95
+ * const dataLocs = useComposedStore(selectHeatmapDataLocs);
96
+ * // When user filters to "no-unused-vars" rule, dataLocs contains
97
+ * // all dataLoc values for issues with that rule
98
+ * ```
99
+ */
100
+ export declare function selectHeatmapDataLocs(state: ComposedState): string[];
101
+ /**
102
+ * Check if heatmap filtering is active based on tile filters.
103
+ * Returns true when there are tile filters that scope which issues to show.
104
+ *
105
+ * @param state - The composed store state
106
+ * @returns true if tile filters are limiting the heatmap display
107
+ */
108
+ export declare function selectHasActiveTileFilters(state: ComposedState): boolean;
109
+ //# sourceMappingURL=heatmap-selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heatmap-selectors.d.ts","sourceRoot":"","sources":["../../../src/core/store/heatmap-selectors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAmBvD;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAIhD;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,kBAAkB,CAE5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAE5E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAGrE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CAEpE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAEvE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,EAAE,CA+CpE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAExE"}
@@ -2,6 +2,8 @@
2
2
  * Core Store - UI state management
3
3
  */
4
4
  export { createCoreSlice, type CoreSlice, type FloatingIconPosition, type CommandPaletteState, type CommandPaletteFilter, type InspectorState, type HeatmapFilterState, } from './core-slice';
5
- export { selectTileItems, selectRawTileItems, selectTileItemsLoading, filterByQuery, dedupeItems, } from './tile-selectors';
5
+ export { selectFilteredTileItems, selectTileQuery, selectTileFilters, selectRawTileItems, selectTileItemsLoading, filterByQuery, dedupeItems, clearTileItemsCache, } from './tile-selectors';
6
+ export { selectHeatmapFilter, selectHeatmapFilterLabel, selectIsHeatmapFiltered, selectHighlightedLocs, selectHighlightedLocsCount, selectHeatmapDataLocs, selectHasActiveTileFilters, clearHeatmapDataLocsCache, } from './heatmap-selectors';
7
+ export { selectIssuesMap, selectAllIssues, selectIssuesByFile, selectTotalIssueCount, selectSeverityCounts, selectHasIssues, selectHasErrors, type SeverityCounts, } from './issues-selectors';
6
8
  export { createComposedStore, createComposedStoreFactory, useComposedStore, initializePlugins, getStoreApi, getPluginServices, resetStore, hasPluginSlice, getPluginSlice, createScopedPluginServices, type ComposedStoreOptions, type PluginSliceMap, type AnyPluginSlice, type PluginSlices, type ComposedState, type ComposedStoreActions, type ComposedStore, } from './composed-store';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/store/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,eAAe,EACf,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAEL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EAEjB,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,0BAA0B,EAE1B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/store/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,eAAe,EACf,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,kBAAkB,GACxB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAEL,mBAAmB,EACnB,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EAEjB,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,cAAc,EACd,0BAA0B,EAE1B,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { ComposedState } from './composed-store';
2
+ import { Issue } from '../../ui/types';
3
+ export interface SeverityCounts {
4
+ error: number;
5
+ warning: number;
6
+ info: number;
7
+ }
8
+ /**
9
+ * Selector to get the raw issues Map from the ESLint plugin state.
10
+ * Returns the Map keyed by dataLoc, or an empty Map if not available.
11
+ *
12
+ * @param state - The composed store state
13
+ * @returns Map of dataLoc to Issue[]
14
+ */
15
+ export declare function selectIssuesMap(state: ComposedState): Map<string, Issue[]>;
16
+ /**
17
+ * Selector to get all issues as a flat array.
18
+ * Flattens the Map values into a single Issue[].
19
+ *
20
+ * @param state - The composed store state
21
+ * @returns All issues from all dataLocs
22
+ */
23
+ export declare function selectAllIssues(state: ComposedState): Issue[];
24
+ /**
25
+ * Selector to get issues grouped by file path.
26
+ * Reorganizes issues from dataLoc-keyed to filePath-keyed Map.
27
+ *
28
+ * @param state - The composed store state
29
+ * @returns Map of filePath to Issue[]
30
+ */
31
+ export declare function selectIssuesByFile(state: ComposedState): Map<string, Issue[]>;
32
+ /**
33
+ * Selector to get the total count of all issues.
34
+ *
35
+ * @param state - The composed store state
36
+ * @returns Total number of issues across all dataLocs
37
+ */
38
+ export declare function selectTotalIssueCount(state: ComposedState): number;
39
+ /**
40
+ * Selector to get issue counts grouped by severity.
41
+ *
42
+ * @param state - The composed store state
43
+ * @returns Object with error, warning, and info counts
44
+ */
45
+ export declare function selectSeverityCounts(state: ComposedState): SeverityCounts;
46
+ /**
47
+ * Selector to check if there are any issues.
48
+ *
49
+ * @param state - The composed store state
50
+ * @returns true if there are any issues
51
+ */
52
+ export declare function selectHasIssues(state: ComposedState): boolean;
53
+ /**
54
+ * Selector to check if there are any errors (highest severity).
55
+ *
56
+ * @param state - The composed store state
57
+ * @returns true if there are any error-severity issues
58
+ */
59
+ export declare function selectHasErrors(state: ComposedState): boolean;
60
+ //# sourceMappingURL=issues-selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issues-selectors.d.ts","sourceRoot":"","sources":["../../../src/core/store/issues-selectors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAM5C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAeD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,EAAE,CAY7D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC,CAoB7E;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAYlE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAezE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAa7D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAe7D"}
@@ -9,19 +9,29 @@ export declare function filterByQuery(items: TileItem[], query: string): TileIte
9
9
  * Deduplicate tile items by id, keeping the first occurrence.
10
10
  */
11
11
  export declare function dedupeItems(items: TileItem[]): TileItem[];
12
+ /**
13
+ * Clear the tile items cache. Call this when the store is reset.
14
+ */
15
+ export declare function clearTileItemsCache(): void;
12
16
  /**
13
17
  * Selector to get filtered and deduplicated tile items.
14
- * Returns a selector function that can be used with useComposedStore.
15
- *
16
- * @param query - Search query for filtering items
17
- * @returns Selector function
18
+ * Uses the query from commandPalette.query in the store.
19
+ * Results are memoized to ensure stable references for React.
18
20
  *
19
21
  * @example
20
22
  * ```tsx
21
- * const items = useComposedStore(selectTileItems("search text"));
23
+ * const items = useComposedStore(selectFilteredTileItems);
22
24
  * ```
23
25
  */
24
- export declare function selectTileItems(query: string): (state: CoreSlice) => TileItem[];
26
+ export declare function selectFilteredTileItems(state: CoreSlice): TileItem[];
27
+ /**
28
+ * Selector to get the current command palette query.
29
+ */
30
+ export declare function selectTileQuery(state: CoreSlice): string;
31
+ /**
32
+ * Selector to get the current tile filters.
33
+ */
34
+ export declare function selectTileFilters(state: CoreSlice): CoreSlice["commandPalette"]["filters"];
25
35
  /**
26
36
  * Selector to get raw tile items without filtering.
27
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"tile-selectors.d.ts","sourceRoot":"","sources":["../../../src/core/store/tile-selectors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMvD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,EAAE,CAa1E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAYzD;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,IACnC,OAAO,SAAS,KAAG,QAAQ,EAAE,CAStC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,EAAE,CAE/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAEhE"}
1
+ {"version":3,"file":"tile-selectors.d.ts","sourceRoot":"","sources":["../../../src/core/store/tile-selectors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMvD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,EAAE,CAa1E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAYzD;AAcD;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAMD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,EAAE,CAqBpE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAE1F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,EAAE,CAE/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAEhE"}