@react-component-selector-mcp/react 1.0.0
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/index.d.ts +21 -0
- package/dist/index.js +1198 -0
- package/dist/index.js.map +1 -0
- package/package.json +64 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ComponentPickerProps {
|
|
4
|
+
/** WebSocket server port (default: 3333) */
|
|
5
|
+
port?: number;
|
|
6
|
+
/** Children to wrap */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Keyboard shortcut key (default: 'C' for Ctrl+Alt+C / Cmd+Option+C) */
|
|
9
|
+
shortcutKey?: string;
|
|
10
|
+
/** Called when connection status changes */
|
|
11
|
+
onConnectionChange?: (connected: boolean) => void;
|
|
12
|
+
/** Called when a component is selected */
|
|
13
|
+
onSelect?: (componentName: string, filePath: string | null) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Wrapper component that enables component selection in development mode.
|
|
17
|
+
* In production, this is a no-op passthrough.
|
|
18
|
+
*/
|
|
19
|
+
declare function ComponentPicker(props: ComponentPickerProps): ReactNode;
|
|
20
|
+
|
|
21
|
+
export { ComponentPicker, type ComponentPickerProps };
|