fixdog 0.0.1 → 0.0.2

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 (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -433
  3. package/dist/api/client.d.ts +74 -0
  4. package/dist/components/ConversationalInputReact.d.ts +26 -0
  5. package/dist/components/ElementInfoDisplayReact.d.ts +9 -0
  6. package/dist/components/FixdogSidebarReact.d.ts +29 -0
  7. package/dist/fiber.d.ts +9 -0
  8. package/dist/index.cjs.js +33 -0
  9. package/dist/index.cjs.js.map +1 -0
  10. package/dist/index.d.ts +6 -158
  11. package/dist/index.esm.js +29 -0
  12. package/dist/index.esm.js.map +1 -0
  13. package/dist/inspector-B4F5CBT7.cjs.js +1159 -0
  14. package/dist/inspector-B4F5CBT7.cjs.js.map +1 -0
  15. package/dist/inspector-BL2pNjn-.cjs.js +1173 -0
  16. package/dist/inspector-BL2pNjn-.cjs.js.map +1 -0
  17. package/dist/inspector-Bg6uSvk0.esm.js +1273 -0
  18. package/dist/inspector-Bg6uSvk0.esm.js.map +1 -0
  19. package/dist/inspector-BuOffbVc.cjs.js +1280 -0
  20. package/dist/inspector-BuOffbVc.cjs.js.map +1 -0
  21. package/dist/inspector-CNgFkZOU.esm.js +1185 -0
  22. package/dist/inspector-CNgFkZOU.esm.js.map +1 -0
  23. package/dist/inspector-CPF1N9dL.esm.js +1185 -0
  24. package/dist/inspector-CPF1N9dL.esm.js.map +1 -0
  25. package/dist/inspector-CPGK5Lg7.esm.js +1155 -0
  26. package/dist/inspector-CPGK5Lg7.esm.js.map +1 -0
  27. package/dist/inspector-CWcTSREy.cjs.js +1174 -0
  28. package/dist/inspector-CWcTSREy.cjs.js.map +1 -0
  29. package/dist/inspector-Cn_bl9Io.cjs.js +1189 -0
  30. package/dist/inspector-Cn_bl9Io.cjs.js.map +1 -0
  31. package/dist/inspector-D9DuXirp.cjs.js +1189 -0
  32. package/dist/inspector-D9DuXirp.cjs.js.map +1 -0
  33. package/dist/inspector-DQEtAjyM.esm.js +1129 -0
  34. package/dist/inspector-DQEtAjyM.esm.js.map +1 -0
  35. package/dist/inspector-DVlU9p44.cjs.js +1189 -0
  36. package/dist/inspector-DVlU9p44.cjs.js.map +1 -0
  37. package/dist/inspector-DaRVppX9.cjs.js +1134 -0
  38. package/dist/inspector-DaRVppX9.cjs.js.map +1 -0
  39. package/dist/inspector-huqtI2MD.esm.js +1170 -0
  40. package/dist/inspector-huqtI2MD.esm.js.map +1 -0
  41. package/dist/inspector-spoCY1tf.esm.js +1169 -0
  42. package/dist/inspector-spoCY1tf.esm.js.map +1 -0
  43. package/dist/inspector-tY1kJK5_.esm.js +1185 -0
  44. package/dist/inspector-tY1kJK5_.esm.js.map +1 -0
  45. package/dist/inspector.d.ts +43 -0
  46. package/dist/keyboard.d.ts +10 -0
  47. package/dist/overlay.d.ts +31 -0
  48. package/dist/react/InspectorProvider.d.ts +6 -0
  49. package/dist/react/index.cjs.js +32 -0
  50. package/dist/react/index.cjs.js.map +1 -0
  51. package/dist/react/index.esm.js +30 -0
  52. package/dist/react/index.esm.js.map +1 -0
  53. package/dist/sidebar/SidebarRuntime.d.ts +8 -0
  54. package/dist/sidebar-runtime.esm.js +2122 -0
  55. package/dist/sidebar-runtime.esm.js.map +1 -0
  56. package/dist/sidebar-runtime.iife.js +2991 -0
  57. package/dist/styles/sidebarStyles.d.ts +2 -0
  58. package/dist/styles.d.ts +8 -0
  59. package/dist/types/sidebar.d.ts +62 -0
  60. package/dist/types.d.ts +47 -0
  61. package/dist/utils/cookies.d.ts +10 -0
  62. package/dist/utils/devMode.d.ts +17 -0
  63. package/dist/utils/sessionStorage.d.ts +19 -0
  64. package/package.json +57 -40
  65. package/USAGE.md +0 -77
  66. package/dist/client/index.d.mts +0 -110
  67. package/dist/client/index.d.ts +0 -110
  68. package/dist/client/index.js +0 -1601
  69. package/dist/client/index.mjs +0 -1582
  70. package/dist/client/init.d.mts +0 -67
  71. package/dist/client/init.d.ts +0 -67
  72. package/dist/client/init.js +0 -1609
  73. package/dist/client/init.mjs +0 -1593
  74. package/dist/index.d.mts +0 -158
  75. package/dist/index.js +0 -1635
  76. package/dist/index.mjs +0 -1606
  77. package/src/api/client.ts +0 -141
  78. package/src/client/index.ts +0 -75
  79. package/src/client/init.tsx +0 -78
  80. package/src/components/ConversationalInputReact.tsx +0 -406
  81. package/src/components/ElementInfoDisplayReact.tsx +0 -84
  82. package/src/components/UiDogSidebarReact.tsx +0 -49
  83. package/src/element-detector.ts +0 -186
  84. package/src/index.ts +0 -228
  85. package/src/instrument.ts +0 -171
  86. package/src/sidebar-initializer.ts +0 -171
  87. package/src/source-resolver.ts +0 -121
  88. package/src/styles/sidebarStyles.ts +0 -597
  89. package/src/types/css.d.ts +0 -9
  90. package/src/types/sidebar.ts +0 -56
  91. package/src/types.ts +0 -119
  92. package/tsconfig.json +0 -23
  93. package/tsup.config.ts +0 -40
package/src/types.ts DELETED
@@ -1,119 +0,0 @@
1
- // Element information from source detection
2
- export type ElementInfoKind = "source" | "dom";
3
-
4
- export interface DomSnapshot {
5
- outerHTML: string;
6
- text: string;
7
- attributes: Record<string, string>;
8
- }
9
-
10
- export interface ElementInfo {
11
- kind: ElementInfoKind;
12
-
13
- // Source-mapped fields (present for kind === "source")
14
- componentName?: string;
15
- filePath?: string;
16
- line?: number;
17
- column?: number;
18
-
19
- // DOM snapshot fields (present for kind === "dom")
20
- domSnapshot?: DomSnapshot;
21
-
22
- // Bounding box is useful for both modes
23
- box?: {
24
- x: number;
25
- y: number;
26
- width: number;
27
- height: number;
28
- };
29
- }
30
-
31
- // Source location from Bippy fiber inspection
32
- export interface SourceLocation {
33
- fileName: string;
34
- lineNumber: number;
35
- columnNumber: number;
36
- functionName?: string;
37
- }
38
-
39
- // Supported editor types
40
- export type EditorType =
41
- | "vscode"
42
- | "vscode-insiders"
43
- | "cursor"
44
- | "webstorm"
45
- | "atom"
46
- | "sublime";
47
-
48
- // Configuration options for UiDog Next
49
- export interface UiDogNextOptions {
50
- /**
51
- * Editor to open when clicking elements
52
- * @default 'cursor'
53
- */
54
- editor?: EditorType;
55
-
56
- /**
57
- * Project root path for resolving file paths
58
- */
59
- projectPath?: string;
60
-
61
- /**
62
- * Modifier key for element selection
63
- * @default 'alt'
64
- */
65
- modifier?: "alt" | "ctrl" | "meta" | "shift";
66
-
67
- /**
68
- * Enable sidebar mode
69
- * @default true
70
- */
71
- enableSidebar?: boolean;
72
-
73
- /**
74
- * API endpoint for edit requests
75
- * @default 'https://api.ui.dog'
76
- */
77
- apiEndpoint?: string;
78
- }
79
-
80
- // Element detector options
81
- export interface ElementDetectorOptions {
82
- onElementSelected: (source: SourceLocation | null, element: Element) => void;
83
- modifier?: "alt" | "ctrl" | "meta" | "shift";
84
- }
85
-
86
- // Sidebar configuration
87
- export interface SidebarConfig {
88
- apiEndpoint: string;
89
- }
90
-
91
- // API types
92
- export interface EditRequest {
93
- editorUrl: string;
94
- userInput: string;
95
- /**
96
- * Optional metadata to help when source is unavailable (e.g., server components)
97
- */
98
- elementKind?: ElementInfoKind;
99
- domSnapshot?: DomSnapshot;
100
- }
101
-
102
- export interface EditResponse {
103
- sessionId: string;
104
- message: string;
105
- status: "success" | "error";
106
- error?: string;
107
- }
108
-
109
- // Global window extensions
110
- declare global {
111
- interface Window {
112
- __UIDOG_NEXT_INITIALIZED__?: boolean;
113
- __UIDOG_SIDEBAR__?: {
114
- isOpen: boolean;
115
- elementInfo: ElementInfo | null;
116
- editorUrl: string | null;
117
- };
118
- }
119
- }
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
7
- "jsx": "react-jsx",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "declarationMap": true,
14
- "sourceMap": true,
15
- "outDir": "./dist",
16
- "rootDir": "./src",
17
- "resolveJsonModule": true,
18
- "isolatedModules": true,
19
- "noEmit": false
20
- },
21
- "include": ["src/**/*"],
22
- "exclude": ["node_modules", "dist"]
23
- }
package/tsup.config.ts DELETED
@@ -1,40 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig([
4
- // Main entry
5
- {
6
- entry: {
7
- index: "src/index.ts",
8
- },
9
- format: ["cjs", "esm"],
10
- dts: true,
11
- clean: true,
12
- external: ["react", "react-dom", "next"],
13
- splitting: false,
14
- shims: true,
15
- },
16
- // Client entry (for instrumentation-client.ts)
17
- {
18
- entry: {
19
- "client/index": "src/client/index.ts",
20
- },
21
- format: ["cjs", "esm"],
22
- dts: true,
23
- clean: false,
24
- external: ["react", "react-dom", "next"],
25
- splitting: false,
26
- shims: true,
27
- },
28
- // React component entry (UiDogProvider)
29
- {
30
- entry: {
31
- "client/init": "src/client/init.tsx",
32
- },
33
- format: ["cjs", "esm"],
34
- dts: true,
35
- clean: false,
36
- external: ["react", "react-dom", "next"],
37
- splitting: false,
38
- shims: true,
39
- },
40
- ]);