fixdog 0.0.10 → 0.1.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/README.md CHANGED
@@ -1,125 +1,136 @@
1
- # fixdog-sdk
1
+ # fixdog
2
2
 
3
- > Option+Click any React component to instantly see its source location.
3
+ > Turn live UI edits into reviewable GitHub pull requests
4
4
 
5
- [![fixdog](https://img.shields.io/badge/fixdog-inspector-61dafb?logo=react&labelColor=20232a)](#)
6
- _GIF demo placeholder goes here_
5
+ ## Quick Start
7
6
 
8
- ## Quick start (3 steps)
7
+ The easiest way to set up fixdog is using the CLI:
9
8
 
10
- 1. `npm install fixdog-sdk`
11
- 2. In your app entry, import and init:
12
- ```ts
13
- import { init } from "fixdog-sdk";
14
- init();
15
- ```
16
- 3. Option/Alt + click a component in the browser to log its source.
9
+ ```bash
10
+ npx fixdog init
11
+ ```
12
+
13
+ The CLI will:
14
+
15
+ - Detect your framework (Vite or Next.js)
16
+ - Prompt for your project ID (get it from [app.fix.dog](https://app.fix.dog))
17
+ - Automatically inject the fixdog script into your project
18
+
19
+ ### Non-interactive Mode
20
+
21
+ For CI/CD or automation:
22
+
23
+ ```bash
24
+ npx fixdog init --projectId your-project-id --yes
25
+ ```
17
26
 
18
- ## Installation
27
+ **CLI Options:**
19
28
 
20
- - **Next.js / Vite / CRA**: `npm install fixdog-sdk` (or `yarn add`, `pnpm add`)
21
- - Works in React 16.8+ through React 19. No runtime deps.
29
+ - `--projectId`, `--project-id`, `-p` - Project ID (non-interactive mode)
30
+ - `--yes`, `-y` - Skip confirmation prompt
31
+ - `--silent`, `-s` - Silent mode (no output except errors)
32
+ - `--help`, `-h` - Show help message
22
33
 
23
- ## Usage
34
+ ## Manual Setup
24
35
 
25
- ```ts
26
- import { init, Inspector } from "fixdog-sdk";
36
+ If you prefer to set up manually, see the [integration guide](USAGE.md) or visit [fix.dog](https://fix.dog) for detailed documentation.
27
37
 
28
- // simple
29
- init();
38
+ ### Vite
30
39
 
31
- // with options
32
- init({
33
- borderColor: "#ff6b6b",
34
- onClick: (info) => console.log("clicked", info),
35
- });
40
+ Add to your `index.html` inside `<head>`:
36
41
 
37
- // manual control
38
- const inspector = new Inspector({ enabled: true });
39
- inspector.activate();
40
- inspector.deactivate();
41
- inspector.destroy();
42
+ ```html
43
+ <script type="module">
44
+ if (import.meta.env.DEV) {
45
+ import(
46
+ "https://unpkg.com/fixdog/dist/fixdog.esm.js?projectId=your-project-id"
47
+ );
48
+ }
49
+ </script>
42
50
  ```
43
51
 
44
- ### React provider (optional)
52
+ ### Next.js App Router
45
53
 
46
- ```tsx
47
- import { InspectorProvider } from "fixdog-sdk/react";
54
+ Add to your `app/layout.tsx`:
48
55
 
49
- export function App() {
56
+ ```tsx
57
+ export default function RootLayout({ children }) {
50
58
  return (
51
- <InspectorProvider options={{}}>
52
- <YourApp />
53
- </InspectorProvider>
59
+ <html>
60
+ <head>
61
+ {process.env.NODE_ENV === "development" && (
62
+ <script
63
+ type="module"
64
+ src="https://unpkg.com/fixdog/dist/fixdog.esm.js?projectId=your-project-id"
65
+ />
66
+ )}
67
+ </head>
68
+ <body>{children}</body>
69
+ </html>
54
70
  );
55
71
  }
56
72
  ```
57
73
 
58
- ## Options
59
-
60
- | option | type | default | description |
61
- | ----------------- | ----------------------------- | -------------- | ---------------------------------------- |
62
- | `onClick` | `(info) => void` | `undefined` | Called on click with source info |
63
- | `onHover` | `(info \| null) => void` | `undefined` | Called when hover target changes |
64
- | `shortcut` | `string` | `ctrl+shift+x` | Toggle persistent inspect mode |
65
- | `useOptionClick` | `boolean` | `true` | Enable Option/Alt + click activation |
66
- | `enabled` | `boolean` | `!production` | Auto-disabled in prod unless forced true |
67
- | `zIndex` | `number` | `999999` | Overlay/tooltip stacking |
68
- | `borderColor` | `string` | `#61dafb` | Highlight + tooltip border color |
69
- | `tooltipPosition` | `'auto' \| 'top' \| 'bottom'` | `auto` | Tooltip placement preference |
70
-
71
- ## API
72
-
73
- - `init(options?)` → `Inspector` singleton (auto-activates)
74
- - `new Inspector(options?)` → manual instance
75
- - `.activate()` enable listeners and overlay
76
- - `.deactivate()` remove listeners and hide overlay
77
- - `.destroy()` cleanup overlay
78
- - `InspectorProvider` React wrapper (optional)
79
-
80
- ### SourceInfo
81
-
82
- ```ts
83
- interface SourceInfo {
84
- componentName: string;
85
- fileName: string;
86
- lineNumber: number;
87
- columnNumber: number;
88
- fiber?: any; // raw React fiber
89
- element?: Element; // DOM element
74
+ ### Next.js Pages Router
75
+
76
+ Add to your `pages/_document.tsx`:
77
+
78
+ ```tsx
79
+ import { Html, Head, Main, NextScript } from "next/document";
80
+
81
+ export default function Document() {
82
+ return (
83
+ <Html>
84
+ <Head>
85
+ {process.env.NODE_ENV === "development" && (
86
+ <script
87
+ type="module"
88
+ src="https://unpkg.com/fixdog/dist/fixdog.esm.js?projectId=your-project-id"
89
+ />
90
+ )}
91
+ </Head>
92
+ <body>
93
+ <Main />
94
+ <NextScript />
95
+ </body>
96
+ </Html>
97
+ );
90
98
  }
91
99
  ```
92
100
 
93
- ## How it works
101
+ ## Configuration
94
102
 
95
- - Grabs the nearest React fiber on Option/Alt click (or persistent mode).
96
- - Walks up the fiber tree to `_debugSource` for `fileName:line:column`.
97
- - Shows an overlay + tooltip; logs formatted message and passes full info to callbacks.
103
+ ### Query Parameters
104
+
105
+ | Parameter | Required | Description |
106
+ | ----------- | -------- | -------------------------------------------------------------------- |
107
+ | `projectId` | Yes | Your Fixdog project ID (get from [app.fix.dog](https://app.fix.dog)) |
108
+
109
+ Example:
110
+
111
+ ```
112
+ https://unpkg.com/fixdog/dist/fixdog.esm.js?projectId=my-project
113
+ ```
114
+
115
+ For more configuration options and API details, visit [fix.dog](https://fix.dog).
98
116
 
99
117
  ## Troubleshooting
100
118
 
101
119
  - **Source not available**: Ensure dev/build has `_debugSource` (development or React Refresh). Production builds often strip it.
102
- - **Next.js / RSC**: Server Components dont have client-side fibers; ensure the inspected component is a client component.
120
+ - **Next.js / RSC**: Server Components don't have client-side fibers; ensure the inspected component is a client component.
103
121
  - **Plain HTML element**: No React fiber → nothing to log.
104
122
  - **Iframes / shadow DOM**: Inspector stays within the current document; shadow hosts are walked, but cross-iframe is skipped.
105
123
 
106
- ## Testing locally
107
-
108
- 1. `npm install`
109
- 2. `npm link`
110
- 3. Create a test app (e.g., `npm create vite@latest test-app -- --template react-ts`)
111
- 4. In that app: `npm link fixdog-sdk`
112
- 5. Import and run `init()` in `main.tsx`, then Option/Alt+click in the browser.
113
-
114
- ## Build
124
+ ## Requirements
115
125
 
116
- - `npm run build` (Rollup → ESM + CJS + types)
117
- - `npm run dev` (watch)
126
+ - React 16.8+ through React 19
127
+ - Works with Next.js (App Router and Pages Router) and Vite
128
+ - Only runs in development mode by default
118
129
 
119
- ## Contributing
130
+ ## Getting Your Project ID
120
131
 
121
- PRs welcome. Please keep the bundle lean and TypeScript strict.
132
+ Visit [app.fix.dog](https://app.fix.dog) to create a project and get your project ID.
122
133
 
123
- ## License
134
+ ## Documentation
124
135
 
125
- MIT © fixdog
136
+ For detailed documentation, examples, and advanced usage, visit [fix.dog](https://fix.dog).
package/bin/cli.js ADDED
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { main } from "../dist/cli/index.js";
4
+
5
+ const command = process.argv[2];
6
+ const nextArg = process.argv[3];
7
+
8
+ const showHelp = () => {
9
+ console.log(`
10
+ 🐕 Fixdog CLI
11
+
12
+ Usage:
13
+ npx fixdog init [options] Setup fixdog in your project
14
+
15
+ Options:
16
+ --projectId, --project-id, -p <id> Project ID (non-interactive mode)
17
+ --yes, -y Skip confirmation prompt
18
+ --silent, -s Silent mode (no output except errors)
19
+ --help, -h Show this help message
20
+
21
+ Examples:
22
+ npx fixdog init
23
+ npx fixdog init --projectId my-project
24
+ npx fixdog init --projectId my-project --yes
25
+ npx fixdog init -p my-project -y
26
+ `);
27
+ };
28
+
29
+ if (command === "init") {
30
+ // Check if help is requested
31
+ if (nextArg === "--help" || nextArg === "-h" || command === "--help" || command === "-h") {
32
+ showHelp();
33
+ } else {
34
+ // Pass remaining args to main (it will parse them)
35
+ main();
36
+ }
37
+ } else if (command === "--help" || command === "-h") {
38
+ showHelp();
39
+ } else {
40
+ console.log(`
41
+ 🐕 Fixdog CLI
42
+
43
+ Usage:
44
+ npx fixdog init [options] Setup fixdog in your project
45
+
46
+ Run 'npx fixdog init --help' for more information.
47
+ `);
48
+ }
@@ -0,0 +1,7 @@
1
+ interface CliOptions {
2
+ projectId?: string;
3
+ yes?: boolean;
4
+ silent?: boolean;
5
+ }
6
+ export declare function main(options?: CliOptions): Promise<void>;
7
+ export {};
@@ -0,0 +1,204 @@
1
+ import fs from 'fs';
2
+ import { intro, spinner, outro, text, confirm } from '@clack/prompts';
3
+ import color from 'picocolors';
4
+ import { diffLines } from 'diff';
5
+
6
+ const SCRIPT_URL = "https://unpkg.com/fixdog/dist/fixdog.esm.js";
7
+ const VITE_SNIPPET = (projectId) => `<script type="module">
8
+ if (import.meta.env.DEV) {
9
+ import(
10
+ /* @vite-ignore */
11
+ "${SCRIPT_URL}?projectId=${projectId}"
12
+ );
13
+ }
14
+ </script>`;
15
+ const NEXT_SCRIPT_SNIPPET = (projectId) => `{process.env.NODE_ENV === "development" && (
16
+ <script
17
+ type="module"
18
+ src="${SCRIPT_URL}?projectId=${projectId}"
19
+ />
20
+ )}`;
21
+ function detectFramework() {
22
+ if (!fs.existsSync("package.json"))
23
+ return null;
24
+ const pkg = JSON.parse(fs.readFileSync("package.json", "utf-8"));
25
+ const deps = { ...pkg.dependencies, ...pkg.devDependencies };
26
+ if (deps["next"])
27
+ return "next";
28
+ if (deps["vite"])
29
+ return "vite";
30
+ return null;
31
+ }
32
+ function detectNextRouter() {
33
+ const appPaths = [
34
+ "app/layout.tsx",
35
+ "app/layout.js",
36
+ "src/app/layout.tsx",
37
+ "src/app/layout.js",
38
+ ];
39
+ const pagesPaths = [
40
+ "pages/_document.tsx",
41
+ "pages/_document.js",
42
+ "src/pages/_document.tsx",
43
+ "src/pages/_document.js",
44
+ ];
45
+ if (appPaths.some((p) => fs.existsSync(p)))
46
+ return "app";
47
+ if (pagesPaths.some((p) => fs.existsSync(p)))
48
+ return "pages";
49
+ return null;
50
+ }
51
+ function findFile(paths) {
52
+ return paths.find((p) => fs.existsSync(p)) || null;
53
+ }
54
+ function injectVite(projectId) {
55
+ const file = findFile(["index.html", "public/index.html"]);
56
+ if (!file)
57
+ return null;
58
+ const before = fs.readFileSync(file, "utf-8");
59
+ if (before.includes("fixdog"))
60
+ return null;
61
+ const after = before.replace("</head>", ` ${VITE_SNIPPET(projectId)}\n </head>`);
62
+ return { file, before, after };
63
+ }
64
+ function injectNextApp(projectId) {
65
+ const file = findFile([
66
+ "app/layout.tsx",
67
+ "app/layout.js",
68
+ "src/app/layout.tsx",
69
+ "src/app/layout.js",
70
+ ]);
71
+ if (!file)
72
+ return null;
73
+ const before = fs.readFileSync(file, "utf-8");
74
+ if (before.includes("fixdog"))
75
+ return null;
76
+ let after = before;
77
+ if (before.includes("<head>")) {
78
+ after = before.replace(/<head>/, `<head>\n ${NEXT_SCRIPT_SNIPPET(projectId)}`);
79
+ }
80
+ else {
81
+ after = before.replace(/<html([^>]*)>/, `<html$1>\n <head>\n ${NEXT_SCRIPT_SNIPPET(projectId)}\n </head>`);
82
+ }
83
+ return { file, before, after };
84
+ }
85
+ function injectNextPages(projectId) {
86
+ const file = findFile([
87
+ "pages/_document.tsx",
88
+ "pages/_document.js",
89
+ "src/pages/_document.tsx",
90
+ "src/pages/_document.js",
91
+ ]);
92
+ if (!file)
93
+ return null;
94
+ const before = fs.readFileSync(file, "utf-8");
95
+ if (before.includes("fixdog"))
96
+ return null;
97
+ const after = before.replace(/<Head>/, `<Head>\n ${NEXT_SCRIPT_SNIPPET(projectId)}`);
98
+ return { file, before, after };
99
+ }
100
+ function showDiff(before, after) {
101
+ const changes = diffLines(before, after);
102
+ changes.forEach((part) => {
103
+ if (part.added)
104
+ process.stdout.write(color.green(`+ ${part.value}`));
105
+ else if (part.removed)
106
+ process.stdout.write(color.red(`- ${part.value}`));
107
+ });
108
+ }
109
+ function parseArgs() {
110
+ const args = process.argv.slice(2);
111
+ const options = {};
112
+ for (let i = 0; i < args.length; i++) {
113
+ const arg = args[i];
114
+ if (arg === "--projectId" || arg === "--project-id" || arg === "-p") {
115
+ options.projectId = args[++i];
116
+ }
117
+ else if (arg === "--yes" || arg === "-y") {
118
+ options.yes = true;
119
+ }
120
+ else if (arg === "--silent" || arg === "-s") {
121
+ options.silent = true;
122
+ }
123
+ else if (arg.startsWith("--projectId=") ||
124
+ arg.startsWith("--project-id=")) {
125
+ options.projectId = arg.split("=")[1];
126
+ }
127
+ }
128
+ return options;
129
+ }
130
+ async function main(options) {
131
+ const cliOptions = options || parseArgs();
132
+ if (!cliOptions.silent) {
133
+ intro(color.bgCyan(color.black(" 🐕 Fixdog Setup ")));
134
+ }
135
+ const s = spinner();
136
+ s.start("Detecting framework");
137
+ const framework = detectFramework();
138
+ if (!framework) {
139
+ s.stop("Not detected");
140
+ if (!cliOptions.silent) {
141
+ outro(color.red("Could not detect framework. Supported: Next.js, Vite"));
142
+ }
143
+ process.exit(1);
144
+ }
145
+ const router = framework === "next" ? detectNextRouter() : null;
146
+ s.stop(`Found ${framework === "next" ? "Next.js" : "Vite"}${router ? ` (${router} router)` : ""}`);
147
+ let projectId;
148
+ if (cliOptions.projectId) {
149
+ projectId = cliOptions.projectId;
150
+ }
151
+ else {
152
+ const input = await text({
153
+ message: "Enter your project ID:",
154
+ placeholder: "my-project",
155
+ validate: (v) => (!v ? "Required" : undefined),
156
+ });
157
+ if (typeof input !== "string") {
158
+ if (!cliOptions.silent) {
159
+ outro(color.red("Cancelled"));
160
+ }
161
+ process.exit(1);
162
+ }
163
+ projectId = input;
164
+ }
165
+ let result = framework === "vite"
166
+ ? injectVite(projectId)
167
+ : router === "app"
168
+ ? injectNextApp(projectId)
169
+ : injectNextPages(projectId);
170
+ if (!result) {
171
+ if (!cliOptions.silent) {
172
+ outro(color.yellow("Already installed or target file not found"));
173
+ }
174
+ process.exit(0);
175
+ }
176
+ if (!cliOptions.silent) {
177
+ console.log(color.dim(`\nChanges to ${result.file}:\n`));
178
+ showDiff(result.before, result.after);
179
+ console.log();
180
+ }
181
+ let apply;
182
+ if (cliOptions.yes || cliOptions.silent) {
183
+ apply = true;
184
+ }
185
+ else {
186
+ const confirmed = await confirm({ message: "Apply changes?" });
187
+ apply = confirmed === true;
188
+ }
189
+ if (apply) {
190
+ fs.writeFileSync(result.file, result.after);
191
+ if (!cliOptions.silent) {
192
+ outro(color.green("✅ Done! Run your dev server."));
193
+ }
194
+ }
195
+ else {
196
+ if (!cliOptions.silent) {
197
+ outro(color.yellow("Cancelled"));
198
+ }
199
+ process.exit(1);
200
+ }
201
+ }
202
+
203
+ export { main };
204
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/cli/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAKA,MAAM,UAAU,GAAG,6CAA6C;AAEhE,MAAM,YAAY,GAAG,CAAC,SAAiB,KACrC,CAAA;;;;AAIW,WAAA,EAAA,UAAU,cAAc,SAAS,CAAA;;;cAGhC;AAEd,MAAM,mBAAmB,GAAG,CAAC,SAAiB,KAC5C,CAAA;;;AAGiB,iBAAA,EAAA,UAAU,cAAc,SAAS,CAAA;;WAEzC;AAEX,SAAS,eAAe,GAAA;AACtB,IAAA,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC;AAAE,QAAA,OAAO,IAAI;AAC/C,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAChE,IAAA,MAAM,IAAI,GAAG,EAAE,GAAG,GAAG,CAAC,YAAY,EAAE,GAAG,GAAG,CAAC,eAAe,EAAE;IAC5D,IAAI,IAAI,CAAC,MAAM,CAAC;AAAE,QA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;AAEA,IAAA,IAAI,KAAc;IAClB,IAAI,UAAU,CAAC,GAAG,IAAI,UAAU,CAAC,MAAM,EAAE;QACvC,KAAK,GAAG,IAAI;IACd;SAAO;QACL,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC9D,QAAA,KAAK,GAAG,SAAS,KAAK,IAAI;IAC5B;IAEA,IAAI,KAAK,EAAE;QACT,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC;AAC3C,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpD;IACF;SAAO;AACL,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAClC;AACA,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;;;;"}
@@ -4836,9 +4836,6 @@ if (typeof import.meta !== "undefined" && import.meta.url) {
4836
4836
  const projectId = url.searchParams.get("projectId");
4837
4837
  if (projectId) {
4838
4838
  const options = { projectId };
4839
- const modelId = url.searchParams.get("modelId");
4840
- if (modelId)
4841
- options.modelId = modelId;
4842
4839
  const apiEndpoint = url.searchParams.get("apiEndpoint");
4843
4840
  if (apiEndpoint)
4844
4841
  options.apiEndpoint = apiEndpoint;