fixdog 0.0.1

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,67 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type ElementInfoKind = "source" | "dom";
5
+ interface DomSnapshot {
6
+ outerHTML: string;
7
+ text: string;
8
+ attributes: Record<string, string>;
9
+ }
10
+ interface ElementInfo {
11
+ kind: ElementInfoKind;
12
+ componentName?: string;
13
+ filePath?: string;
14
+ line?: number;
15
+ column?: number;
16
+ domSnapshot?: DomSnapshot;
17
+ box?: {
18
+ x: number;
19
+ y: number;
20
+ width: number;
21
+ height: number;
22
+ };
23
+ }
24
+ type EditorType = "vscode" | "vscode-insiders" | "cursor" | "webstorm" | "atom" | "sublime";
25
+ interface UiDogNextOptions {
26
+ /**
27
+ * Editor to open when clicking elements
28
+ * @default 'cursor'
29
+ */
30
+ editor?: EditorType;
31
+ /**
32
+ * Project root path for resolving file paths
33
+ */
34
+ projectPath?: string;
35
+ /**
36
+ * Modifier key for element selection
37
+ * @default 'alt'
38
+ */
39
+ modifier?: "alt" | "ctrl" | "meta" | "shift";
40
+ /**
41
+ * Enable sidebar mode
42
+ * @default true
43
+ */
44
+ enableSidebar?: boolean;
45
+ /**
46
+ * API endpoint for edit requests
47
+ * @default 'https://api.ui.dog'
48
+ */
49
+ apiEndpoint?: string;
50
+ }
51
+ declare global {
52
+ interface Window {
53
+ __UIDOG_NEXT_INITIALIZED__?: boolean;
54
+ __UIDOG_SIDEBAR__?: {
55
+ isOpen: boolean;
56
+ elementInfo: ElementInfo | null;
57
+ editorUrl: string | null;
58
+ };
59
+ }
60
+ }
61
+
62
+ interface UiDogProviderProps extends UiDogNextOptions {
63
+ children: ReactNode;
64
+ }
65
+ declare function UiDogProvider({ children, editor, projectPath, modifier, enableSidebar, apiEndpoint, }: UiDogProviderProps): react_jsx_runtime.JSX.Element;
66
+
67
+ export { EditorType, UiDogNextOptions, UiDogProvider, UiDogProviderProps };
@@ -0,0 +1,67 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ type ElementInfoKind = "source" | "dom";
5
+ interface DomSnapshot {
6
+ outerHTML: string;
7
+ text: string;
8
+ attributes: Record<string, string>;
9
+ }
10
+ interface ElementInfo {
11
+ kind: ElementInfoKind;
12
+ componentName?: string;
13
+ filePath?: string;
14
+ line?: number;
15
+ column?: number;
16
+ domSnapshot?: DomSnapshot;
17
+ box?: {
18
+ x: number;
19
+ y: number;
20
+ width: number;
21
+ height: number;
22
+ };
23
+ }
24
+ type EditorType = "vscode" | "vscode-insiders" | "cursor" | "webstorm" | "atom" | "sublime";
25
+ interface UiDogNextOptions {
26
+ /**
27
+ * Editor to open when clicking elements
28
+ * @default 'cursor'
29
+ */
30
+ editor?: EditorType;
31
+ /**
32
+ * Project root path for resolving file paths
33
+ */
34
+ projectPath?: string;
35
+ /**
36
+ * Modifier key for element selection
37
+ * @default 'alt'
38
+ */
39
+ modifier?: "alt" | "ctrl" | "meta" | "shift";
40
+ /**
41
+ * Enable sidebar mode
42
+ * @default true
43
+ */
44
+ enableSidebar?: boolean;
45
+ /**
46
+ * API endpoint for edit requests
47
+ * @default 'https://api.ui.dog'
48
+ */
49
+ apiEndpoint?: string;
50
+ }
51
+ declare global {
52
+ interface Window {
53
+ __UIDOG_NEXT_INITIALIZED__?: boolean;
54
+ __UIDOG_SIDEBAR__?: {
55
+ isOpen: boolean;
56
+ elementInfo: ElementInfo | null;
57
+ editorUrl: string | null;
58
+ };
59
+ }
60
+ }
61
+
62
+ interface UiDogProviderProps extends UiDogNextOptions {
63
+ children: ReactNode;
64
+ }
65
+ declare function UiDogProvider({ children, editor, projectPath, modifier, enableSidebar, apiEndpoint, }: UiDogProviderProps): react_jsx_runtime.JSX.Element;
66
+
67
+ export { EditorType, UiDogNextOptions, UiDogProvider, UiDogProviderProps };