sanity-plugin-seo-copilot 0.2.15 → 0.2.17

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 (43) hide show
  1. package/README.md +63 -50
  2. package/dist/index.d.mts +1 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +898 -809
  5. package/dist/index.mjs +822 -733
  6. package/package.json +5 -7
  7. package/dist/index.js.map +0 -1
  8. package/dist/index.mjs.map +0 -1
  9. package/sanity.json +0 -3
  10. package/src/components/ChatPanel.tsx +0 -311
  11. package/src/components/ConfigContext.tsx +0 -22
  12. package/src/components/FeedbackButton.tsx +0 -218
  13. package/src/components/KeywordBadge.tsx +0 -50
  14. package/src/components/KeywordPanel.tsx +0 -1234
  15. package/src/components/OnboardingPopup.tsx +0 -108
  16. package/src/components/PlacementIndicators.tsx +0 -80
  17. package/src/components/ReportProblemButton.tsx +0 -212
  18. package/src/components/SEOCopilotPanel.tsx +0 -1287
  19. package/src/components/ScoreDonut.tsx +0 -158
  20. package/src/components/SeedKeywordInput.tsx +0 -128
  21. package/src/components/ShimmerLoader.tsx +0 -123
  22. package/src/components/TabBar.tsx +0 -373
  23. package/src/components/styles.ts +0 -158
  24. package/src/components/tabs/AEOTab.tsx +0 -585
  25. package/src/components/tabs/LinkingTab.tsx +0 -446
  26. package/src/components/tabs/MetaTab.tsx +0 -431
  27. package/src/components/tabs/SummaryTab.tsx +0 -405
  28. package/src/components/tabs/TechnicalTab.tsx +0 -933
  29. package/src/hooks/useDocumentContent.ts +0 -48
  30. package/src/hooks/useKeywordAnalysis.ts +0 -292
  31. package/src/hooks/useSEOChat.ts +0 -254
  32. package/src/index.ts +0 -18
  33. package/src/inspector.ts +0 -58
  34. package/src/lib/api.ts +0 -262
  35. package/src/lib/apiKey.ts +0 -30
  36. package/src/lib/documentExtract.ts +0 -422
  37. package/src/lib/geoAnalysis.ts +0 -122
  38. package/src/lib/persistence.ts +0 -69
  39. package/src/lib/scoring.ts +0 -197
  40. package/src/lib/summary.ts +0 -645
  41. package/src/lib/types.ts +0 -212
  42. package/src/lib/utils.ts +0 -35
  43. package/v2-incompatible.js +0 -10
package/README.md CHANGED
@@ -1,50 +1,63 @@
1
- # sanity-plugin-seo-copilot
2
-
3
- AI-powered SEO writing assistant for Sanity Studio v3.
4
-
5
- Adds an SEO Copilot inspector panel to every document in your Sanity Studio. Editors get real-time keyword analysis, search volume data, placement tracking, and an AI chat assistant - all without leaving the editor.
6
-
7
- ## Installation
8
-
9
- ```sh
10
- npm install sanity-plugin-seo-copilot
11
- ```
12
-
13
- ## Configuration
14
-
15
- Add the plugin to your `sanity.config.ts`:
16
-
17
- ```ts
18
- import { defineConfig } from 'sanity'
19
- import { seoCopilot } from 'sanity-plugin-seo-copilot'
20
-
21
- export default defineConfig({
22
- // ... your existing config
23
- plugins: [
24
- // ... your existing plugins
25
- seoCopilot({
26
- apiUrl: 'https://ecaruso.vercel.app',
27
- publication: 'Your Publication Name', // optional
28
- }),
29
- ],
30
- })
31
- ```
32
-
33
- ### Options
34
-
35
- | Option | Type | Required | Description |
36
- | ------------- | ------ | -------- | ------------------------------------------------ |
37
- | `apiUrl` | string | Yes | Backend API URL for SEO analysis |
38
- | `publication` | string | No | Publication name for tailored keyword suggestions |
39
-
40
- ## Usage
41
-
42
- Once installed, every document in your Studio gets an SEO Copilot icon in the toolbar. Click it to open the inspector panel with:
43
-
44
- - **Keywords tab** - Real-time keyword analysis with search volume data, placement indicators (body, title, description, image, URL), and AI-suggested keywords
45
- - **Chat tab** - AI assistant that understands your document content and can help with SEO strategy, title suggestions, meta descriptions, and more
46
-
47
- ## How it works
48
-
49
- The plugin reads document content from the Sanity editor and sends it to the backend API for analysis. The backend uses Claude AI for keyword analysis and SEMrush for search volume data. All processing happens server-side - the plugin itself is a lightweight UI.
50
-
1
+ # sanity-plugin-seo-copilot
2
+
3
+ AI-powered SEO writing assistant for Sanity Studio v3.
4
+
5
+ Adds an SEO Copilot inspector panel to every document in your Sanity Studio. Editors get real-time keyword analysis, search volume data, placement tracking, and an AI chat assistant - all without leaving the editor.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install sanity-plugin-seo-copilot
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ Add the plugin to your `sanity.config.ts`:
16
+
17
+ ```ts
18
+ import { defineConfig } from 'sanity'
19
+ import { seoCopilot } from 'sanity-plugin-seo-copilot'
20
+
21
+ export default defineConfig({
22
+ // ... your existing config
23
+ plugins: [
24
+ // ... your existing plugins
25
+ seoCopilot({
26
+ apiUrl: 'https://ecaruso.vercel.app',
27
+ publication: 'onclive', // optional - defaults to the current workspace's dataset
28
+ }),
29
+ ],
30
+ })
31
+ ```
32
+
33
+ ### Options
34
+
35
+ | Option | Type | Required | Description |
36
+ | ------------- | ------ | -------- | ----------- |
37
+ | `apiUrl` | string | Yes | Backend API URL for SEO analysis |
38
+ | `publication` | string | No | Optional. Sanity dataset slug (for example `onclive`). Leave unset to use the current workspace's dataset. |
39
+
40
+ ## Usage
41
+
42
+ Once installed, every document in your Studio gets an SEO Copilot icon in the toolbar. Click it to open the inspector panel with:
43
+
44
+ - **Summary** - Content score and a checklist of fixes, each linking to the tab it comes from
45
+ - **Keywords** - Primary and secondary keyword picks, search volume, placement indicators (body, title, description, image, URL), and AI-suggested keywords
46
+ - **AEO/GEO** - Question-style headings, fact density, and content suggestions for AI search
47
+ - **Linking** - Suggested internal links to related articles from the same dataset
48
+ - **Meta** - Title tag, meta description, URL slug, and author and date checks
49
+ - **Other Recs** - Headings, images, word count, and link checks
50
+ - **Chat drawer** - An AI assistant, available from every tab, that can help with SEO strategy, titles, meta descriptions, and more
51
+
52
+ ## How it works
53
+
54
+ The plugin reads document content from the Sanity editor and sends it to the backend API for analysis. The backend runs the AI analysis and looks up search volume data. All processing happens server-side - the plugin itself is a lightweight UI.
55
+
56
+ ## What gets sent
57
+
58
+ - **Analysis** - The article text and title, plus the other fields the checks read (meta description, slug, headings, image alt text and titles, body links, author and date fields), the dataset, and the keywords you pick, are sent to the backend for analysis. The Linking tab also sends the document ID so the current article is left out of its suggestions, and the link check sends the URLs found in the article so the backend can test them.
59
+ - **Chat** - Your messages, the article text, and the keyword data shown in the panel are sent to the backend to answer each message. The conversation is kept only in this browser.
60
+ - **Thumbs up / down** - Your vote, the suggestion text and any note you type, plus your Sanity user ID, document ID, and dataset when available.
61
+ - **Report a problem** - Your message, your Sanity user ID, the document ID, document type, dataset, open tab and primary keyword, the page URL, your browser's user agent, and a timestamp.
62
+
63
+ Nothing is written to Sanity. The plugin only reads the open document. Analysis results, chat, and panel settings are cached in this browser's local storage.
package/dist/index.d.mts CHANGED
@@ -3,6 +3,7 @@ import * as sanity from 'sanity';
3
3
  interface SEOCopilotConfig {
4
4
  apiUrl: string;
5
5
  publication?: string;
6
+ autoOpen?: boolean;
6
7
  }
7
8
  declare const seoCopilot: sanity.Plugin<SEOCopilotConfig>;
8
9
 
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import * as sanity from 'sanity';
3
3
  interface SEOCopilotConfig {
4
4
  apiUrl: string;
5
5
  publication?: string;
6
+ autoOpen?: boolean;
6
7
  }
7
8
  declare const seoCopilot: sanity.Plugin<SEOCopilotConfig>;
8
9