uilint-react 0.2.48 → 0.2.49

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.
Files changed (174) hide show
  1. package/dist/DevTool.d.ts +1 -2
  2. package/dist/DevTool.d.ts.map +1 -1
  3. package/dist/components/ui-lint/index.d.ts +3 -10
  4. package/dist/components/ui-lint/index.d.ts.map +1 -1
  5. package/dist/consistency/highlights.d.ts.map +1 -1
  6. package/dist/core/index.d.ts +13 -0
  7. package/dist/core/index.d.ts.map +1 -0
  8. package/dist/core/plugin-system/index.d.ts +7 -0
  9. package/dist/core/plugin-system/index.d.ts.map +1 -0
  10. package/dist/core/plugin-system/loader.d.ts +38 -0
  11. package/dist/core/plugin-system/loader.d.ts.map +1 -0
  12. package/dist/core/plugin-system/registry.d.ts +130 -0
  13. package/dist/core/plugin-system/registry.d.ts.map +1 -0
  14. package/dist/core/plugin-system/types.d.ts +353 -0
  15. package/dist/core/plugin-system/types.d.ts.map +1 -0
  16. package/dist/core/services/dom-observer.d.ts +171 -0
  17. package/dist/core/services/dom-observer.d.ts.map +1 -0
  18. package/dist/core/services/index.d.ts +6 -0
  19. package/dist/core/services/index.d.ts.map +1 -0
  20. package/dist/core/services/websocket.d.ts +112 -0
  21. package/dist/core/services/websocket.d.ts.map +1 -0
  22. package/dist/core/store/composed-store.d.ts +212 -0
  23. package/dist/core/store/composed-store.d.ts.map +1 -0
  24. package/dist/core/store/core-slice.d.ts +126 -0
  25. package/dist/core/store/core-slice.d.ts.map +1 -0
  26. package/dist/core/store/index.d.ts +6 -0
  27. package/dist/core/store/index.d.ts.map +1 -0
  28. package/dist/devtools.js +117 -136
  29. package/dist/devtools.js.map +1 -1
  30. package/dist/index.d.ts +4 -2
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1675 -12464
  33. package/dist/index.js.map +1 -1
  34. package/dist/plugins/eslint/commands.d.ts +6 -0
  35. package/dist/plugins/eslint/commands.d.ts.map +1 -0
  36. package/dist/plugins/eslint/index.d.ts +10 -0
  37. package/dist/plugins/eslint/index.d.ts.map +1 -0
  38. package/dist/plugins/eslint/slice.d.ts +66 -0
  39. package/dist/plugins/eslint/slice.d.ts.map +1 -0
  40. package/dist/plugins/eslint/types.d.ts +128 -0
  41. package/dist/plugins/eslint/types.d.ts.map +1 -0
  42. package/dist/plugins/semantic/commands.d.ts +6 -0
  43. package/dist/plugins/semantic/commands.d.ts.map +1 -0
  44. package/dist/plugins/semantic/index.d.ts +15 -0
  45. package/dist/plugins/semantic/index.d.ts.map +1 -0
  46. package/dist/plugins/semantic/slice.d.ts +52 -0
  47. package/dist/plugins/semantic/slice.d.ts.map +1 -0
  48. package/dist/plugins/semantic/types.d.ts +121 -0
  49. package/dist/plugins/semantic/types.d.ts.map +1 -0
  50. package/dist/plugins/vision/commands.d.ts +6 -0
  51. package/dist/plugins/vision/commands.d.ts.map +1 -0
  52. package/dist/plugins/vision/index.d.ts +12 -0
  53. package/dist/plugins/vision/index.d.ts.map +1 -0
  54. package/dist/plugins/vision/slice.d.ts +104 -0
  55. package/dist/plugins/vision/slice.d.ts.map +1 -0
  56. package/dist/plugins/vision/types.d.ts +169 -0
  57. package/dist/plugins/vision/types.d.ts.map +1 -0
  58. package/dist/scanner/vision-capture.d.ts.map +1 -1
  59. package/dist/ui/UILint.d.ts +11 -0
  60. package/dist/ui/UILint.d.ts.map +1 -0
  61. package/dist/ui/components/CommandPalette/CommandPalette.d.ts +3 -0
  62. package/dist/ui/components/CommandPalette/CommandPalette.d.ts.map +1 -0
  63. package/dist/ui/components/CommandPalette/ResultItem.d.ts +9 -0
  64. package/dist/ui/components/CommandPalette/ResultItem.d.ts.map +1 -0
  65. package/dist/ui/components/CommandPalette/SearchInput.d.ts +8 -0
  66. package/dist/ui/components/CommandPalette/SearchInput.d.ts.map +1 -0
  67. package/dist/ui/components/CommandPalette/index.d.ts +2 -0
  68. package/dist/ui/components/CommandPalette/index.d.ts.map +1 -0
  69. package/dist/ui/components/FloatingIcon.d.ts +3 -0
  70. package/dist/ui/components/FloatingIcon.d.ts.map +1 -0
  71. package/dist/ui/components/HeatmapOverlay.d.ts.map +1 -0
  72. package/dist/ui/components/Inspector/ElementDetail.d.ts +8 -0
  73. package/dist/ui/components/Inspector/ElementDetail.d.ts.map +1 -0
  74. package/dist/ui/components/Inspector/InspectorSidebar.d.ts +3 -0
  75. package/dist/ui/components/Inspector/InspectorSidebar.d.ts.map +1 -0
  76. package/dist/ui/components/Inspector/IssueDetail.d.ts +7 -0
  77. package/dist/ui/components/Inspector/IssueDetail.d.ts.map +1 -0
  78. package/dist/ui/components/Inspector/index.d.ts +2 -0
  79. package/dist/ui/components/Inspector/index.d.ts.map +1 -0
  80. package/dist/ui/hooks/index.d.ts +4 -0
  81. package/dist/ui/hooks/index.d.ts.map +1 -0
  82. package/dist/ui/hooks/useElementRects.d.ts +12 -0
  83. package/dist/ui/hooks/useElementRects.d.ts.map +1 -0
  84. package/dist/ui/hooks/useIssues.d.ts +17 -0
  85. package/dist/ui/hooks/useIssues.d.ts.map +1 -0
  86. package/dist/ui/hooks/useKeyboardShortcuts.d.ts +8 -0
  87. package/dist/ui/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  88. package/dist/ui/icons.d.ts +20 -0
  89. package/dist/ui/icons.d.ts.map +1 -0
  90. package/dist/ui/index.d.ts +16 -0
  91. package/dist/ui/index.d.ts.map +1 -0
  92. package/dist/ui/types.d.ts +69 -0
  93. package/dist/ui/types.d.ts.map +1 -0
  94. package/package.json +3 -3
  95. package/dist/components/ui-lint/FloatingIcon.d.ts +0 -3
  96. package/dist/components/ui-lint/FloatingIcon.d.ts.map +0 -1
  97. package/dist/components/ui-lint/HeatmapOverlay.d.ts.map +0 -1
  98. package/dist/components/ui-lint/IndexingIndicator.d.ts +0 -3
  99. package/dist/components/ui-lint/IndexingIndicator.d.ts.map +0 -1
  100. package/dist/components/ui-lint/RegionSelector.d.ts +0 -18
  101. package/dist/components/ui-lint/RegionSelector.d.ts.map +0 -1
  102. package/dist/components/ui-lint/ScreenshotViewer.d.ts +0 -11
  103. package/dist/components/ui-lint/ScreenshotViewer.d.ts.map +0 -1
  104. package/dist/components/ui-lint/UILintUI.d.ts +0 -5
  105. package/dist/components/ui-lint/UILintUI.d.ts.map +0 -1
  106. package/dist/components/ui-lint/VisionIssuesPanel.d.ts +0 -12
  107. package/dist/components/ui-lint/VisionIssuesPanel.d.ts.map +0 -1
  108. package/dist/components/ui-lint/command-palette/CategorySidebar.d.ts +0 -29
  109. package/dist/components/ui-lint/command-palette/CategorySidebar.d.ts.map +0 -1
  110. package/dist/components/ui-lint/command-palette/CommandPalette.d.ts +0 -7
  111. package/dist/components/ui-lint/command-palette/CommandPalette.d.ts.map +0 -1
  112. package/dist/components/ui-lint/command-palette/CommandPaletteInput.d.ts +0 -18
  113. package/dist/components/ui-lint/command-palette/CommandPaletteInput.d.ts.map +0 -1
  114. package/dist/components/ui-lint/command-palette/CommandPaletteItem.d.ts +0 -26
  115. package/dist/components/ui-lint/command-palette/CommandPaletteItem.d.ts.map +0 -1
  116. package/dist/components/ui-lint/command-palette/CommandPaletteResults.d.ts +0 -46
  117. package/dist/components/ui-lint/command-palette/CommandPaletteResults.d.ts.map +0 -1
  118. package/dist/components/ui-lint/command-palette/FilterChips.d.ts +0 -11
  119. package/dist/components/ui-lint/command-palette/FilterChips.d.ts.map +0 -1
  120. package/dist/components/ui-lint/command-palette/RuleDetailItem.d.ts +0 -15
  121. package/dist/components/ui-lint/command-palette/RuleDetailItem.d.ts.map +0 -1
  122. package/dist/components/ui-lint/command-palette/RuleEditor.d.ts +0 -22
  123. package/dist/components/ui-lint/command-palette/RuleEditor.d.ts.map +0 -1
  124. package/dist/components/ui-lint/command-palette/RuleToggleItem.d.ts +0 -20
  125. package/dist/components/ui-lint/command-palette/RuleToggleItem.d.ts.map +0 -1
  126. package/dist/components/ui-lint/command-palette/SourceCodePreview.d.ts +0 -17
  127. package/dist/components/ui-lint/command-palette/SourceCodePreview.d.ts.map +0 -1
  128. package/dist/components/ui-lint/command-palette/icons.d.ts +0 -39
  129. package/dist/components/ui-lint/command-palette/icons.d.ts.map +0 -1
  130. package/dist/components/ui-lint/command-palette/index.d.ts +0 -13
  131. package/dist/components/ui-lint/command-palette/index.d.ts.map +0 -1
  132. package/dist/components/ui-lint/command-palette/types.d.ts +0 -160
  133. package/dist/components/ui-lint/command-palette/types.d.ts.map +0 -1
  134. package/dist/components/ui-lint/command-palette/use-fuzzy-search.d.ts +0 -19
  135. package/dist/components/ui-lint/command-palette/use-fuzzy-search.d.ts.map +0 -1
  136. package/dist/components/ui-lint/command-palette/use-keyboard-navigation.d.ts +0 -10
  137. package/dist/components/ui-lint/command-palette/use-keyboard-navigation.d.ts.map +0 -1
  138. package/dist/components/ui-lint/hooks/index.d.ts +0 -4
  139. package/dist/components/ui-lint/hooks/index.d.ts.map +0 -1
  140. package/dist/components/ui-lint/hooks/useAutoScans.d.ts +0 -5
  141. package/dist/components/ui-lint/hooks/useAutoScans.d.ts.map +0 -1
  142. package/dist/components/ui-lint/hooks/useDevToolEventHandlers.d.ts +0 -5
  143. package/dist/components/ui-lint/hooks/useDevToolEventHandlers.d.ts.map +0 -1
  144. package/dist/components/ui-lint/hooks/useNavigationDetection.d.ts +0 -6
  145. package/dist/components/ui-lint/hooks/useNavigationDetection.d.ts.map +0 -1
  146. package/dist/components/ui-lint/inspector/ElementInspector.d.ts +0 -9
  147. package/dist/components/ui-lint/inspector/ElementInspector.d.ts.map +0 -1
  148. package/dist/components/ui-lint/inspector/FixesInspector.d.ts +0 -6
  149. package/dist/components/ui-lint/inspector/FixesInspector.d.ts.map +0 -1
  150. package/dist/components/ui-lint/inspector/FullFileViewer.d.ts +0 -17
  151. package/dist/components/ui-lint/inspector/FullFileViewer.d.ts.map +0 -1
  152. package/dist/components/ui-lint/inspector/InspectorSidebar.d.ts +0 -12
  153. package/dist/components/ui-lint/inspector/InspectorSidebar.d.ts.map +0 -1
  154. package/dist/components/ui-lint/inspector/IssueInspector.d.ts +0 -12
  155. package/dist/components/ui-lint/inspector/IssueInspector.d.ts.map +0 -1
  156. package/dist/components/ui-lint/inspector/MarkdownRenderer.d.ts +0 -11
  157. package/dist/components/ui-lint/inspector/MarkdownRenderer.d.ts.map +0 -1
  158. package/dist/components/ui-lint/inspector/ResizeHandle.d.ts +0 -19
  159. package/dist/components/ui-lint/inspector/ResizeHandle.d.ts.map +0 -1
  160. package/dist/components/ui-lint/inspector/RuleInspector.d.ts +0 -10
  161. package/dist/components/ui-lint/inspector/RuleInspector.d.ts.map +0 -1
  162. package/dist/components/ui-lint/inspector/index.d.ts +0 -8
  163. package/dist/components/ui-lint/inspector/index.d.ts.map +0 -1
  164. package/dist/components/ui-lint/portal-host.d.ts +0 -3
  165. package/dist/components/ui-lint/portal-host.d.ts.map +0 -1
  166. package/dist/components/ui-lint/store.d.ts +0 -431
  167. package/dist/components/ui-lint/store.d.ts.map +0 -1
  168. package/dist/components/ui-lint/useDOMObserver.d.ts +0 -11
  169. package/dist/components/ui-lint/useDOMObserver.d.ts.map +0 -1
  170. package/dist/index-L3Zm-CoX.js +0 -513
  171. package/dist/index-L3Zm-CoX.js.map +0 -1
  172. package/dist/vision-capture-8mhdjw77.js +0 -235
  173. package/dist/vision-capture-8mhdjw77.js.map +0 -1
  174. /package/dist/{components/ui-lint → ui/components}/HeatmapOverlay.d.ts +0 -0
@@ -0,0 +1,6 @@
1
+ import { Command } from '../../core/plugin-system/types';
2
+ /**
3
+ * All ESLint commands exported for the plugin
4
+ */
5
+ export declare const eslintCommands: Command[];
6
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/plugins/eslint/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,gCAAgC,CAAC;AAyJ9E;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,EAMnC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Plugin } from '../../core/plugin-system/types';
2
+ /**
3
+ * ESLint Plugin Definition
4
+ */
5
+ export declare const eslintPlugin: Plugin;
6
+ export default eslintPlugin;
7
+ export * from './types';
8
+ export * from './slice';
9
+ export { eslintCommands } from './commands';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/eslint/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAA4B,MAAM,gCAAgC,CAAC;AAsBvF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAkI1B,CAAC;AA4LF,eAAe,YAAY,CAAC;AAG5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { PluginServices } from '../../core/plugin-system/types';
2
+ import { Issue } from '../../ui/types';
3
+ import { AvailableRule } from './types';
4
+ /** Scan status */
5
+ export type ScanStatus = "idle" | "scanning" | "complete" | "error";
6
+ /**
7
+ * ESLint plugin state
8
+ */
9
+ export interface ESLintSlice {
10
+ /** Issues keyed by dataLoc */
11
+ issues: Map<string, Issue[]>;
12
+ /** DataLocs that have been scanned */
13
+ scannedDataLocs: Set<string>;
14
+ /** Whether live scanning is enabled */
15
+ liveScanEnabled: boolean;
16
+ /** Current scan status */
17
+ scanStatus: ScanStatus;
18
+ /** Available rules from server */
19
+ availableRules: AvailableRule[];
20
+ /** Disabled rules (visual filtering) */
21
+ disabledRules: Set<string>;
22
+ /** Workspace root path */
23
+ workspaceRoot: string | null;
24
+ }
25
+ /**
26
+ * ESLint plugin actions
27
+ */
28
+ export interface ESLintActions {
29
+ /** Enable live scanning */
30
+ enableLiveScan: () => void;
31
+ /** Disable live scanning and clear results */
32
+ disableLiveScan: () => void;
33
+ /** Set issues for a dataLoc */
34
+ setIssues: (dataLoc: string, issues: Issue[]) => void;
35
+ /** Clear all issues */
36
+ clearIssues: () => void;
37
+ /** Toggle a rule on/off */
38
+ toggleRule: (ruleId: string) => void;
39
+ /** Set available rules */
40
+ setAvailableRules: (rules: AvailableRule[]) => void;
41
+ /** Set workspace root */
42
+ setWorkspaceRoot: (root: string | null) => void;
43
+ /** Mark a dataLoc as scanned */
44
+ markScanned: (dataLoc: string) => void;
45
+ /** Set scan status */
46
+ setScanStatus: (status: ScanStatus) => void;
47
+ }
48
+ /** Combined slice type */
49
+ export type ESLintPluginSlice = ESLintSlice & ESLintActions;
50
+ /**
51
+ * Initial state
52
+ */
53
+ export declare const initialESLintState: ESLintSlice;
54
+ /**
55
+ * Create ESLint slice state
56
+ */
57
+ export declare function createESLintSlice(_services: PluginServices): ESLintSlice;
58
+ /**
59
+ * Create ESLint slice actions
60
+ */
61
+ export declare function createESLintActions(_services: PluginServices, getSlice: () => ESLintSlice, setSlice: (partial: Partial<ESLintSlice>) => void): ESLintActions;
62
+ /**
63
+ * Filter issues by disabled rules
64
+ */
65
+ export declare function filterByDisabledRules(issues: Issue[], disabledRules: Set<string>): Issue[];
66
+ //# sourceMappingURL=slice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../src/plugins/eslint/slice.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,kBAAkB;AAClB,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,C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cAAc,GAAG,WAAW,CAExE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,MAAM,WAAW,EAC3B,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,GAChD,aAAa,CAkEf;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,KAAK,EAAE,EACf,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,GACzB,KAAK,EAAE,CAGT"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * ESLint Plugin Types
3
+ *
4
+ * Types extracted from the main store for ESLint-related functionality.
5
+ */
6
+ /**
7
+ * ESLint issue from WebSocket server (uilint serve)
8
+ */
9
+ export interface ESLintIssue {
10
+ /** Line number in source file */
11
+ line: number;
12
+ /** Column number */
13
+ column?: number;
14
+ /** Issue description */
15
+ message: string;
16
+ /** ESLint rule ID (e.g., "uilint/semantic", "uilint/no-arbitrary-tailwind") */
17
+ ruleId?: string;
18
+ /** data-loc value to match to DOM element */
19
+ dataLoc?: string;
20
+ }
21
+ /**
22
+ * Cached issue data for a source location (dataLoc)
23
+ * Multiple DOM elements can share the same dataLoc (e.g., list items),
24
+ * so we key by dataLoc (path:line:column) rather than element ID.
25
+ */
26
+ export interface ElementIssue {
27
+ /** The dataLoc key (format: "path:line:column") */
28
+ dataLoc: string;
29
+ /** ESLint rule violations from uilint-eslint (including semantic rule) */
30
+ issues: ESLintIssue[];
31
+ status: "pending" | "scanning" | "complete" | "error";
32
+ }
33
+ /**
34
+ * Extended rule metadata with full configuration info
35
+ */
36
+ export interface AvailableRule {
37
+ id: string;
38
+ name: string;
39
+ description: string;
40
+ category: "static" | "semantic";
41
+ defaultSeverity: "error" | "warn" | "off";
42
+ /** Current severity from ESLint config (may differ from default) */
43
+ currentSeverity?: "error" | "warn" | "off";
44
+ /** Current options from ESLint config */
45
+ currentOptions?: Record<string, unknown>;
46
+ docs?: string;
47
+ optionSchema?: RuleOptionSchema;
48
+ defaultOptions?: unknown[];
49
+ }
50
+ /**
51
+ * Current configuration state for a rule
52
+ */
53
+ export interface RuleConfig {
54
+ severity: "error" | "warn" | "off";
55
+ options?: Record<string, unknown>;
56
+ }
57
+ /**
58
+ * Rule option schema for configuration
59
+ */
60
+ export interface RuleOptionSchema {
61
+ fields: OptionFieldSchema[];
62
+ }
63
+ /**
64
+ * Option field schema for rule configuration UI
65
+ */
66
+ export interface OptionFieldSchema {
67
+ key: string;
68
+ label: string;
69
+ type: "text" | "number" | "boolean" | "select" | "multiselect" | "array";
70
+ defaultValue: unknown;
71
+ placeholder?: string;
72
+ options?: Array<{
73
+ value: string | number;
74
+ label: string;
75
+ }>;
76
+ description?: string;
77
+ }
78
+ /**
79
+ * Auto-scan settings for ESLint and Vision analysis
80
+ * Persisted to localStorage
81
+ */
82
+ export interface AutoScanSettings {
83
+ eslint: {
84
+ /** Auto-scan when page first loads */
85
+ onPageLoad: boolean;
86
+ /** Re-scan when files change (existing behavior) */
87
+ onFileChange: boolean;
88
+ };
89
+ vision: {
90
+ /** Auto-capture and analyze on route change */
91
+ onRouteChange: boolean;
92
+ /** Auto-capture and analyze on initial page load */
93
+ onInitialLoad: boolean;
94
+ };
95
+ }
96
+ /**
97
+ * A scanned DOM element with its source information
98
+ */
99
+ export interface ScannedElement {
100
+ /**
101
+ * Unique per-instance ID derived from data-loc.
102
+ * Format: "loc:path:line:column#occurrence"
103
+ */
104
+ id: string;
105
+ element: Element;
106
+ tagName: string;
107
+ className: string;
108
+ /** Source location (always present from data-loc) */
109
+ source: SourceLocation;
110
+ rect: DOMRect;
111
+ }
112
+ /**
113
+ * Source location from data-loc attribute
114
+ */
115
+ export interface SourceLocation {
116
+ fileName: string;
117
+ lineNumber: number;
118
+ columnNumber?: number;
119
+ }
120
+ /**
121
+ * Scan status for the auto-scan feature
122
+ */
123
+ export type ScanStatus = "idle" | "scanning" | "paused" | "complete";
124
+ /**
125
+ * Default auto-scan settings
126
+ */
127
+ export declare const DEFAULT_AUTO_SCAN_SETTINGS: AutoScanSettings;
128
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/eslint/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,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;IAC1C,oEAAoE;IACpE,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAC3C,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;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IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBASxC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from '../../core/plugin-system/types';
2
+ /**
3
+ * All commands contributed by the semantic plugin
4
+ */
5
+ export declare const semanticCommands: Command[];
6
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/plugins/semantic/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AA+I9D;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,EAMrC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Plugin } from '../../core/plugin-system/types';
2
+ import { SemanticPluginSlice } from './slice';
3
+ /**
4
+ * Semantic analysis plugin
5
+ *
6
+ * Provides LLM-powered code analysis including:
7
+ * - Semantic rule: Analyzes code against project styleguide
8
+ * - Duplicates detection: Finds semantically similar code
9
+ */
10
+ export declare const semanticPlugin: Plugin<SemanticPluginSlice>;
11
+ export default semanticPlugin;
12
+ export * from './types';
13
+ export * from './slice';
14
+ export * from './commands';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/semantic/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,SAAS,CAAC;AAEjB;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,mBAAmB,CAgLtD,CAAC;AAEF,eAAe,cAAc,CAAC;AAG9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { SemanticPluginState, DuplicatesIndexStatus, DuplicatesIndexProgress, DuplicatesIndexStats, DuplicatesIndexingProgressMessage, DuplicatesIndexingCompleteMessage, DuplicatesIndexingErrorMessage } from './types';
2
+ import { PluginServices } from '../../core/plugin-system/types';
3
+ /**
4
+ * Actions for updating the semantic plugin state
5
+ */
6
+ export interface SemanticPluginActions {
7
+ /** Set the duplicates index status */
8
+ setDuplicatesIndexStatus: (status: DuplicatesIndexStatus) => void;
9
+ /** Set the current indexing message */
10
+ setDuplicatesIndexMessage: (message: string | null) => void;
11
+ /** Set the current indexing progress */
12
+ setDuplicatesIndexProgress: (progress: DuplicatesIndexProgress | null) => void;
13
+ /** Set the indexing error */
14
+ setDuplicatesIndexError: (error: string | null) => void;
15
+ /** Set the indexing stats */
16
+ setDuplicatesIndexStats: (stats: DuplicatesIndexStats | null) => void;
17
+ /** Handle duplicates indexing start */
18
+ handleDuplicatesIndexingStart: () => void;
19
+ /** Handle duplicates indexing progress */
20
+ handleDuplicatesIndexingProgress: (data: DuplicatesIndexingProgressMessage) => void;
21
+ /** Handle duplicates indexing complete */
22
+ handleDuplicatesIndexingComplete: (data: DuplicatesIndexingCompleteMessage) => void;
23
+ /** Handle duplicates indexing error */
24
+ handleDuplicatesIndexingError: (data: DuplicatesIndexingErrorMessage) => void;
25
+ /** Reset the duplicates index state */
26
+ resetDuplicatesIndexState: () => void;
27
+ }
28
+ /**
29
+ * Combined state and actions for the semantic plugin slice
30
+ */
31
+ export type SemanticPluginSlice = SemanticPluginState & SemanticPluginActions;
32
+ /**
33
+ * Initial state for the semantic plugin
34
+ */
35
+ export declare const initialSemanticPluginState: SemanticPluginState;
36
+ /**
37
+ * Create the semantic plugin state slice
38
+ *
39
+ * @param set - Zustand set function
40
+ * @param get - Zustand get function
41
+ * @returns The semantic plugin slice with state and actions
42
+ */
43
+ export declare function createSemanticPluginSlice(set: <T>(partial: Partial<T>) => void, get: () => SemanticPluginState): SemanticPluginSlice;
44
+ /**
45
+ * Subscribe to duplicates indexing WebSocket messages
46
+ *
47
+ * @param services - Plugin services for WebSocket access
48
+ * @param slice - The semantic plugin slice to update
49
+ * @returns Cleanup function to unsubscribe
50
+ */
51
+ export declare function subscribeToDuplicatesIndexingMessages(services: PluginServices, slice: SemanticPluginSlice): () => void;
52
+ //# sourceMappingURL=slice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../src/plugins/semantic/slice.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,iCAAiC,EACjC,iCAAiC,EACjC,8BAA8B,EAC/B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,wBAAwB,EAAE,CAAC,MAAM,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAClE,uCAAuC;IACvC,yBAAyB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D,wCAAwC;IACxC,0BAA0B,EAAE,CAAC,QAAQ,EAAE,uBAAuB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/E,6BAA6B;IAC7B,uBAAuB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,6BAA6B;IAC7B,uBAAuB,EAAE,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,uCAAuC;IACvC,6BAA6B,EAAE,MAAM,IAAI,CAAC;IAC1C,0CAA0C;IAC1C,gCAAgC,EAAE,CAAC,IAAI,EAAE,iCAAiC,KAAK,IAAI,CAAC;IACpF,0CAA0C;IAC1C,gCAAgC,EAAE,CAAC,IAAI,EAAE,iCAAiC,KAAK,IAAI,CAAC;IACpF,uCAAuC;IACvC,6BAA6B,EAAE,CAAC,IAAI,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC9E,uCAAuC;IACvC,yBAAyB,EAAE,MAAM,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAMxC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,EACrC,GAAG,EAAE,MAAM,mBAAmB,GAC7B,mBAAmB,CAgFrB;AAED;;;;;;GAMG;AACH,wBAAgB,qCAAqC,CACnD,QAAQ,EAAE,cAAc,EACxB,KAAK,EAAE,mBAAmB,GACzB,MAAM,IAAI,CA4BZ"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Semantic Plugin Types
3
+ *
4
+ * Type definitions for the semantic analysis plugin, including
5
+ * duplicates indexing status and semantic issue types.
6
+ */
7
+ /**
8
+ * Status of the duplicates index
9
+ */
10
+ export type DuplicatesIndexStatus = "idle" | "indexing" | "ready" | "error";
11
+ /**
12
+ * Progress information for duplicates indexing
13
+ */
14
+ export interface DuplicatesIndexProgress {
15
+ /** Current item being processed */
16
+ current: number;
17
+ /** Total items to process */
18
+ total: number;
19
+ }
20
+ /**
21
+ * Statistics from a completed indexing operation
22
+ */
23
+ export interface DuplicatesIndexStats {
24
+ /** Total number of chunks in the index */
25
+ totalChunks: number;
26
+ /** Number of chunks added */
27
+ added: number;
28
+ /** Number of chunks modified */
29
+ modified: number;
30
+ /** Number of chunks deleted */
31
+ deleted: number;
32
+ /** Duration of the indexing operation in milliseconds */
33
+ duration: number;
34
+ }
35
+ /**
36
+ * State slice for the semantic plugin
37
+ */
38
+ export interface SemanticPluginState {
39
+ /** Current status of the duplicates index */
40
+ duplicatesIndexStatus: DuplicatesIndexStatus;
41
+ /** Current indexing progress message */
42
+ duplicatesIndexMessage: string | null;
43
+ /** Current indexing progress (current/total) */
44
+ duplicatesIndexProgress: DuplicatesIndexProgress | null;
45
+ /** Last indexing error message */
46
+ duplicatesIndexError: string | null;
47
+ /** Statistics from the last indexing operation */
48
+ duplicatesIndexStats: DuplicatesIndexStats | null;
49
+ }
50
+ /**
51
+ * A semantic issue detected by LLM analysis
52
+ */
53
+ export interface SemanticIssue {
54
+ /** Line number in the source file (1-indexed) */
55
+ line: number;
56
+ /** Column number in the source file (1-indexed, optional) */
57
+ column?: number;
58
+ /** Human-readable issue message */
59
+ message: string;
60
+ /** Rule ID that generated this issue */
61
+ ruleId: string;
62
+ /** Severity level (1 = warning, 2 = error) */
63
+ severity: 1 | 2;
64
+ }
65
+ /**
66
+ * A duplicate detection result
67
+ */
68
+ export interface DuplicateMatch {
69
+ /** Chunk ID of the similar code */
70
+ id: string;
71
+ /** Similarity score (0-1) */
72
+ score: number;
73
+ /** File path of the similar code */
74
+ filePath: string;
75
+ /** Start line of the similar code */
76
+ startLine: number;
77
+ /** End line of the similar code */
78
+ endLine: number;
79
+ /** Name of the function/component (if available) */
80
+ name: string | null;
81
+ /** Kind of code chunk (e.g., "function", "component") */
82
+ kind: string;
83
+ }
84
+ /**
85
+ * Message sent when duplicates indexing starts
86
+ */
87
+ export interface DuplicatesIndexingStartMessage {
88
+ type: "duplicates:indexing:start";
89
+ }
90
+ /**
91
+ * Message sent during duplicates indexing progress
92
+ */
93
+ export interface DuplicatesIndexingProgressMessage {
94
+ type: "duplicates:indexing:progress";
95
+ message: string;
96
+ current?: number;
97
+ total?: number;
98
+ }
99
+ /**
100
+ * Message sent when duplicates indexing completes
101
+ */
102
+ export interface DuplicatesIndexingCompleteMessage {
103
+ type: "duplicates:indexing:complete";
104
+ added: number;
105
+ modified: number;
106
+ deleted: number;
107
+ totalChunks: number;
108
+ duration: number;
109
+ }
110
+ /**
111
+ * Message sent when duplicates indexing fails
112
+ */
113
+ export interface DuplicatesIndexingErrorMessage {
114
+ type: "duplicates:indexing:error";
115
+ error: string;
116
+ }
117
+ /**
118
+ * Union of all duplicates-related WebSocket messages
119
+ */
120
+ export type DuplicatesMessage = DuplicatesIndexingStartMessage | DuplicatesIndexingProgressMessage | DuplicatesIndexingCompleteMessage | DuplicatesIndexingErrorMessage;
121
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/semantic/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6CAA6C;IAC7C,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,wCAAwC;IACxC,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,gDAAgD;IAChD,uBAAuB,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACxD,kCAAkC;IAClC,oBAAoB,EAAE,MA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;AACH,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,2BAA2B,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,8BAA8B,GAC9B,iCAAiC,GACjC,iCAAiC,GACjC,8BAA8B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from '../../core/plugin-system/types';
2
+ /**
3
+ * Vision plugin commands for the command palette
4
+ */
5
+ export declare const visionCommands: Command[];
6
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/plugins/vision/commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAkB,MAAM,gCAAgC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,EAuKnC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Plugin } from '../../core/plugin-system/types';
2
+ import { VisionSlice } from './slice';
3
+ /**
4
+ * Vision plugin definition
5
+ */
6
+ export declare const visionPlugin: Plugin<VisionSlice>;
7
+ export type { VisionIssue, ScreenshotCapture, VisionAutoScanSettings, VisionErrorInfo, VisionStage, CaptureMode, CaptureRegion, ElementManifest, VisionAnalysisResult, } from './types';
8
+ export { visionCommands } from './commands';
9
+ export type { VisionSlice, VisionSliceState, VisionSliceActions } from './slice';
10
+ export { createVisionSlice, defaultVisionState, loadVisionAutoScanSettings, saveVisionAutoScanSettings } from './slice';
11
+ export default visionPlugin;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/vision/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAqC,MAAM,gCAAgC,CAAC;AAEhG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,WAAW,CAwL5C,CAAC;AAGF,YAAY,EACV,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,WAAW,EACX,aAAa,EACb,eAAe,EACf,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAExH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,104 @@
1
+ import { VisionIssue, ScreenshotCapture, VisionAutoScanSettings, VisionErrorInfo, VisionAnalysisResult, CaptureMode, CaptureRegion } from './types';
2
+ /**
3
+ * Vision plugin state
4
+ */
5
+ export interface VisionSliceState {
6
+ /** Whether vision analysis is in progress */
7
+ visionAnalyzing: boolean;
8
+ /** Current vision analysis progress phase */
9
+ visionProgressPhase: string | null;
10
+ /** Last vision error (if any), with stage for user-friendly UI */
11
+ visionLastError: VisionErrorInfo | null;
12
+ /** Latest vision analysis result */
13
+ visionResult: VisionAnalysisResult | null;
14
+ /** Vision issues cache by route */
15
+ visionIssuesCache: Map<string, VisionIssue[]>;
16
+ /** Screenshot gallery - captures with unique IDs, supports both full-page and region */
17
+ screenshotHistory: Map<string, ScreenshotCapture>;
18
+ /** Currently selected screenshot ID for gallery display */
19
+ selectedScreenshotId: string | null;
20
+ /** Current route being analyzed or last analyzed */
21
+ visionCurrentRoute: string | null;
22
+ /** Highlighted vision issue element ID (for click-to-highlight) */
23
+ highlightedVisionElementId: string | null;
24
+ /** Capture mode: full page or region selection */
25
+ captureMode: CaptureMode;
26
+ /** Whether region selection is currently active */
27
+ regionSelectionActive: boolean;
28
+ /** Selected region for capture (null if full page) */
29
+ selectedRegion: CaptureRegion | null;
30
+ /** Auto-scan settings for vision */
31
+ autoScanSettings: VisionAutoScanSettings;
32
+ /** Whether persisted screenshots are being loaded */
33
+ loadingPersistedScreenshots: boolean;
34
+ /** Whether persisted screenshots have been fetched (prevents re-fetching) */
35
+ persistedScreenshotsFetched: boolean;
36
+ }
37
+ /**
38
+ * Vision plugin actions
39
+ */
40
+ export interface VisionSliceActions {
41
+ /** Trigger vision analysis for current page */
42
+ triggerVisionAnalysis: () => Promise<void>;
43
+ /** Clear vision results */
44
+ clearVisionResults: () => void;
45
+ /** Clear last vision error */
46
+ clearVisionLastError: () => void;
47
+ /** Set highlighted vision element */
48
+ setHighlightedVisionElementId: (id: string | null) => void;
49
+ /** Set capture mode */
50
+ setCaptureMode: (mode: CaptureMode) => void;
51
+ /** Set region selection active state */
52
+ setRegionSelectionActive: (active: boolean) => void;
53
+ /** Set selected region for capture */
54
+ setSelectedRegion: (region: CaptureRegion | null) => void;
55
+ /** Set selected screenshot ID for gallery display */
56
+ setSelectedScreenshotId: (id: string | null) => void;
57
+ /** Fetch persisted screenshots from disk (via API) */
58
+ fetchPersistedScreenshots: () => Promise<void>;
59
+ /** Update vision auto-scan settings */
60
+ updateVisionAutoScanSettings: (partial: Partial<VisionAutoScanSettings>) => void;
61
+ /** Set vision analyzing state */
62
+ setVisionAnalyzing: (analyzing: boolean) => void;
63
+ /** Set vision progress phase */
64
+ setVisionProgressPhase: (phase: string | null) => void;
65
+ /** Set vision last error */
66
+ setVisionLastError: (error: VisionErrorInfo | null) => void;
67
+ /** Set vision result */
68
+ setVisionResult: (result: VisionAnalysisResult | null) => void;
69
+ /** Update vision issues cache */
70
+ updateVisionIssuesCache: (route: string, issues: VisionIssue[]) => void;
71
+ /** Add screenshot to history */
72
+ addScreenshotToHistory: (capture: ScreenshotCapture) => void;
73
+ /** Update screenshot in history (e.g., add issues after analysis) */
74
+ updateScreenshotInHistory: (id: string, updates: Partial<ScreenshotCapture>) => void;
75
+ /** Set vision current route */
76
+ setVisionCurrentRoute: (route: string | null) => void;
77
+ }
78
+ /**
79
+ * Combined vision slice type
80
+ */
81
+ export type VisionSlice = VisionSliceState & VisionSliceActions;
82
+ /**
83
+ * Default vision slice state
84
+ */
85
+ export declare const defaultVisionState: VisionSliceState;
86
+ /**
87
+ * Load vision auto-scan settings from localStorage
88
+ */
89
+ export declare function loadVisionAutoScanSettings(): VisionAutoScanSettings;
90
+ /**
91
+ * Save vision auto-scan settings to localStorage
92
+ */
93
+ export declare function saveVisionAutoScanSettings(settings: VisionAutoScanSettings): void;
94
+ /**
95
+ * Create vision slice actions factory
96
+ *
97
+ * This factory can be used with Zustand's create function to add vision
98
+ * state and actions to a store.
99
+ *
100
+ * @param set - Zustand set function
101
+ * @param get - Zustand get function
102
+ */
103
+ export declare function createVisionSlice(set: <T>(partial: T | Partial<T> | ((state: T) => T | Partial<T>), replace?: boolean) => void, get: () => VisionSlice): VisionSlice;
104
+ //# sourceMappingURL=slice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../../../src/plugins/vision/slice.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,aAAa,EACd,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kEAAkE;IAClE,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,oCAAoC;IACpC,YAAY,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC1C,mCAAmC;IACnC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9C,wFAAwF;IACxF,iBAAiB,EAAE,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