@pagebridge/sanity 0.0.2 → 0.1.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.
Files changed (37) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +228 -214
  3. package/dist/components/RefreshQueueTool.js +10 -10
  4. package/dist/components/SearchPerformancePane.js +10 -10
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/plugin.d.ts +3 -3
  9. package/dist/plugin.d.ts.map +1 -1
  10. package/dist/plugin.js +2 -2
  11. package/package.json +20 -1
  12. package/.turbo/turbo-build.log +0 -2
  13. package/dist/components/DecayAlertCard.d.ts +0 -16
  14. package/dist/components/DecayAlertCard.d.ts.map +0 -1
  15. package/dist/components/DecayAlertCard.js +0 -24
  16. package/dist/components/DecayBadge.d.ts +0 -3
  17. package/dist/components/DecayBadge.d.ts.map +0 -1
  18. package/dist/components/DecayBadge.js +0 -19
  19. package/dist/components/PerformanceChart.d.ts +0 -12
  20. package/dist/components/PerformanceChart.d.ts.map +0 -1
  21. package/dist/components/PerformanceChart.js +0 -18
  22. package/dist/components/PerformanceInspector.d.ts +0 -3
  23. package/dist/components/PerformanceInspector.d.ts.map +0 -1
  24. package/dist/components/PerformanceInspector.js +0 -174
  25. package/dist/schemas/gscKeywordTarget.d.ts +0 -22
  26. package/dist/schemas/gscKeywordTarget.d.ts.map +0 -1
  27. package/dist/schemas/gscKeywordTarget.js +0 -43
  28. package/eslint.config.js +0 -3
  29. package/src/components/RefreshQueueTool.tsx +0 -196
  30. package/src/components/SearchPerformancePane.tsx +0 -237
  31. package/src/index.ts +0 -18
  32. package/src/plugin.ts +0 -120
  33. package/src/schemas/gscRefreshTask.ts +0 -203
  34. package/src/schemas/gscSite.ts +0 -71
  35. package/src/schemas/gscSnapshot.ts +0 -131
  36. package/src/schemas/index.ts +0 -11
  37. package/tsconfig.json +0 -23
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Soma Somorjai
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Soma Somorjai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,214 +1,228 @@
1
- # @pagebridge/sanity-plugin
2
-
3
- Sanity Studio v3 plugin for PageBridge. Provides document schemas, UI components, and tools for viewing search performance data and managing content refresh tasks.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- pnpm add @pagebridge/sanity-plugin
9
- ```
10
-
11
- ## Setup
12
-
13
- ### 1. Add the Plugin
14
-
15
- In your `sanity.config.ts`:
16
-
17
- ```typescript
18
- import { defineConfig } from 'sanity';
19
- import { gscPlugin } from '@pagebridge/sanity-plugin';
20
-
21
- export default defineConfig({
22
- // ... other config
23
- plugins: [
24
- gscPlugin({
25
- contentTypes: ['post', 'page'], // Document types to track
26
- }),
27
- ],
28
- });
29
- ```
30
-
31
- ### 2. Add the Structure Resolver
32
-
33
- To display the Performance pane on your content documents:
34
-
35
- ```typescript
36
- import { defineConfig } from 'sanity';
37
- import { structureTool } from 'sanity/structure';
38
- import { gscPlugin, createGscStructureResolver } from '@pagebridge/sanity-plugin';
39
-
40
- export default defineConfig({
41
- // ... other config
42
- plugins: [
43
- structureTool({
44
- structure: createGscStructureResolver({
45
- contentTypes: ['post', 'page'],
46
- }),
47
- }),
48
- gscPlugin({
49
- contentTypes: ['post', 'page'],
50
- }),
51
- ],
52
- });
53
- ```
54
-
55
- ## Document Schemas
56
-
57
- The plugin registers three document types:
58
-
59
- ### gscSite
60
-
61
- Represents a Google Search Console property.
62
-
63
- | Field | Type | Description |
64
- |-------|------|-------------|
65
- | siteUrl | string | GSC site URL (e.g., `sc-domain:example.com`) |
66
- | slug | slug | URL-friendly identifier |
67
- | defaultLocale | string | Default locale (default: "en") |
68
- | pathPrefix | string | Path prefix for URL matching (e.g., `/blog`) |
69
- | lastSyncedAt | datetime | Last sync timestamp (read-only) |
70
-
71
- ### gscSnapshot
72
-
73
- Performance metrics snapshot linked to content documents.
74
-
75
- | Field | Type | Description |
76
- |-------|------|-------------|
77
- | site | reference | Reference to gscSite |
78
- | page | string | Page URL |
79
- | linkedDocument | reference | Matched content document |
80
- | period | string | `last7`, `last28`, or `last90` |
81
- | clicks | number | Total clicks |
82
- | impressions | number | Total impressions |
83
- | ctr | number | Click-through rate |
84
- | position | number | Average position |
85
- | topQueries | array | Top search queries with metrics |
86
- | fetchedAt | datetime | When data was fetched |
87
- | indexStatus | object | Google index status details |
88
-
89
- ### gscRefreshTask
90
-
91
- Content refresh task with decay signal information.
92
-
93
- | Field | Type | Description |
94
- |-------|------|-------------|
95
- | site | reference | Reference to gscSite |
96
- | linkedDocument | reference | Content document needing refresh |
97
- | reason | string | `position_decay`, `low_ctr`, `impressions_drop`, `manual` |
98
- | severity | string | `low`, `medium`, `high` |
99
- | status | string | `open`, `snoozed`, `in_progress`, `done`, `dismissed` |
100
- | snoozedUntil | datetime | When to resurface (if snoozed) |
101
- | metrics | object | Position, CTR, impressions data |
102
- | queryContext | array | Top 5 queries with stats |
103
- | notes | text | Resolution notes |
104
- | createdAt | datetime | Task creation time |
105
- | resolvedAt | datetime | Task resolution time |
106
-
107
- ## Components
108
-
109
- ### SearchPerformancePane
110
-
111
- Document view pane showing performance metrics for a content document.
112
-
113
- ```typescript
114
- import { SearchPerformancePane } from '@pagebridge/sanity-plugin';
115
-
116
- // Used automatically when you configure the structure resolver
117
- // Can also be used directly in custom document views
118
- ```
119
-
120
- The pane displays:
121
- - Clicks, impressions, CTR, and position metrics
122
- - Top search queries driving traffic
123
- - Google index status
124
- - Link to associated refresh tasks
125
-
126
- ### RefreshQueueTool
127
-
128
- Sanity tool for managing content refresh tasks. Accessible from the Studio sidebar.
129
-
130
- Features:
131
- - Filter tasks by status (open, in progress, snoozed, done, dismissed)
132
- - Sort by severity or creation date
133
- - View decay signal details
134
- - Update task status
135
- - Add resolution notes
136
-
137
- ## Configuration Options
138
-
139
- ### gscPlugin
140
-
141
- ```typescript
142
- interface GscPluginConfig {
143
- // Document types that can be linked to snapshots and tasks
144
- contentTypes: string[];
145
- }
146
- ```
147
-
148
- ### createGscStructureResolver
149
-
150
- ```typescript
151
- interface StructureResolverConfig {
152
- // Document types to show the Performance pane on
153
- contentTypes: string[];
154
- }
155
- ```
156
-
157
- ## Using Schemas Directly
158
-
159
- If you need to customize the schemas or use them without the plugin:
160
-
161
- ```typescript
162
- import {
163
- gscSite,
164
- createGscSnapshot,
165
- createGscRefreshTask,
166
- } from '@pagebridge/sanity-plugin/schemas';
167
-
168
- // Create snapshot schema with custom content types
169
- const customSnapshot = createGscSnapshot({
170
- contentTypes: ['article', 'guide'],
171
- });
172
-
173
- // Create task schema with custom content types
174
- const customTask = createGscRefreshTask({
175
- contentTypes: ['article', 'guide'],
176
- });
177
- ```
178
-
179
- ## Styling
180
-
181
- The components use Sanity UI and follow the Studio's theme. No additional CSS is required.
182
-
183
- ## Peer Dependencies
184
-
185
- - `sanity` >= 3.0.0
186
- - `react` >= 18.0.0
187
- - `react-dom` >= 18.0.0
188
- - `@sanity/ui` >= 2.0.0
189
- - `@sanity/icons` >= 3.0.0
190
-
191
- ## Exports
192
-
193
- ```typescript
194
- // Plugin
195
- export { gscPlugin, createGscStructureResolver } from '@pagebridge/sanity-plugin';
196
- export type { GscPluginConfig } from '@pagebridge/sanity-plugin';
197
-
198
- // Components
199
- export { SearchPerformancePane, RefreshQueueTool } from '@pagebridge/sanity-plugin';
200
-
201
- // Schemas
202
- export {
203
- gscSite,
204
- gscSnapshot,
205
- gscRefreshTask,
206
- createGscSnapshot,
207
- createGscRefreshTask,
208
- } from '@pagebridge/sanity-plugin/schemas';
209
- export type { GscSnapshotOptions, GscRefreshTaskOptions } from '@pagebridge/sanity-plugin/schemas';
210
- ```
211
-
212
- ## License
213
-
214
- MIT
1
+ # @pagebridge/sanity
2
+
3
+ Sanity Studio v3 plugin for PageBridge. Provides document schemas, UI components, and tools for viewing search performance data and managing content refresh tasks.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @pagebridge/sanity
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ ### 1. Add the Plugin
14
+
15
+ In your `sanity.config.ts`:
16
+
17
+ ```typescript
18
+ import { defineConfig } from "sanity";
19
+ import { pageBridgePlugin } from "@pagebridge/sanity";
20
+
21
+ export default defineConfig({
22
+ // ... other config
23
+ plugins: [
24
+ pageBridgePlugin({
25
+ contentTypes: ["post", "page"], // Document types to track
26
+ }),
27
+ ],
28
+ });
29
+ ```
30
+
31
+ ### 2. Add the Structure Resolver
32
+
33
+ To display the Performance pane on your content documents:
34
+
35
+ ```typescript
36
+ import { defineConfig } from "sanity";
37
+ import { structureTool } from "sanity/structure";
38
+ import {
39
+ pageBridgePlugin,
40
+ createPageBridgeStructureResolver,
41
+ } from "@pagebridge/sanity";
42
+
43
+ export default defineConfig({
44
+ // ... other config
45
+ plugins: [
46
+ structureTool({
47
+ structure: createPageBridgeStructureResolver({
48
+ contentTypes: ["post", "page"],
49
+ }),
50
+ }),
51
+ pageBridgePlugin({
52
+ contentTypes: ["post", "page"],
53
+ }),
54
+ ],
55
+ });
56
+ ```
57
+
58
+ ## Document Schemas
59
+
60
+ The plugin registers three document types:
61
+
62
+ ### gscSite
63
+
64
+ Represents a Google Search Console property.
65
+
66
+ | Field | Type | Description |
67
+ | ------------- | -------- | -------------------------------------------- |
68
+ | siteUrl | string | GSC site URL (e.g., `sc-domain:example.com`) |
69
+ | slug | slug | URL-friendly identifier |
70
+ | defaultLocale | string | Default locale (default: "en") |
71
+ | pathPrefix | string | Path prefix for URL matching (e.g., `/blog`) |
72
+ | lastSyncedAt | datetime | Last sync timestamp (read-only) |
73
+
74
+ ### gscSnapshot
75
+
76
+ Performance metrics snapshot linked to content documents.
77
+
78
+ | Field | Type | Description |
79
+ | -------------- | --------- | ------------------------------- |
80
+ | site | reference | Reference to gscSite |
81
+ | page | string | Page URL |
82
+ | linkedDocument | reference | Matched content document |
83
+ | period | string | `last7`, `last28`, or `last90` |
84
+ | clicks | number | Total clicks |
85
+ | impressions | number | Total impressions |
86
+ | ctr | number | Click-through rate |
87
+ | position | number | Average position |
88
+ | topQueries | array | Top search queries with metrics |
89
+ | fetchedAt | datetime | When data was fetched |
90
+ | indexStatus | object | Google index status details |
91
+
92
+ ### gscRefreshTask
93
+
94
+ Content refresh task with decay signal information.
95
+
96
+ | Field | Type | Description |
97
+ | -------------- | --------- | --------------------------------------------------------- |
98
+ | site | reference | Reference to gscSite |
99
+ | linkedDocument | reference | Content document needing refresh |
100
+ | reason | string | `position_decay`, `low_ctr`, `impressions_drop`, `manual` |
101
+ | severity | string | `low`, `medium`, `high` |
102
+ | status | string | `open`, `snoozed`, `in_progress`, `done`, `dismissed` |
103
+ | snoozedUntil | datetime | When to resurface (if snoozed) |
104
+ | metrics | object | Position, CTR, impressions data |
105
+ | queryContext | array | Top 5 queries with stats |
106
+ | notes | text | Resolution notes |
107
+ | createdAt | datetime | Task creation time |
108
+ | resolvedAt | datetime | Task resolution time |
109
+
110
+ ## Components
111
+
112
+ ### SearchPerformancePane
113
+
114
+ Document view pane showing performance metrics for a content document.
115
+
116
+ ```typescript
117
+ import { SearchPerformancePane } from "@pagebridge/sanity";
118
+
119
+ // Used automatically when you configure the structure resolver
120
+ // Can also be used directly in custom document views
121
+ ```
122
+
123
+ The pane displays:
124
+
125
+ - Clicks, impressions, CTR, and position metrics
126
+ - Top search queries driving traffic
127
+ - Google index status
128
+ - Link to associated refresh tasks
129
+
130
+ ### RefreshQueueTool
131
+
132
+ Sanity tool for managing content refresh tasks. Accessible from the Studio sidebar.
133
+
134
+ Features:
135
+
136
+ - Filter tasks by status (open, in progress, snoozed, done, dismissed)
137
+ - Sort by severity or creation date
138
+ - View decay signal details
139
+ - Update task status
140
+ - Add resolution notes
141
+
142
+ ## Configuration Options
143
+
144
+ ### pageBridgePlugin
145
+
146
+ ```typescript
147
+ interface PageBridgePluginConfig {
148
+ // Document types that can be linked to snapshots and tasks
149
+ contentTypes: string[];
150
+ }
151
+ ```
152
+
153
+ ### createPageBridgeStructureResolver
154
+
155
+ ```typescript
156
+ interface StructureResolverConfig {
157
+ // Document types to show the Performance pane on
158
+ contentTypes: string[];
159
+ }
160
+ ```
161
+
162
+ ## Using Schemas Directly
163
+
164
+ If you need to customize the schemas or use them without the plugin:
165
+
166
+ ```typescript
167
+ import {
168
+ gscSite,
169
+ createGscSnapshot,
170
+ createGscRefreshTask,
171
+ } from "@pagebridge/sanity/schemas";
172
+
173
+ // Create snapshot schema with custom content types
174
+ const customSnapshot = createGscSnapshot({
175
+ contentTypes: ["article", "guide"],
176
+ });
177
+
178
+ // Create task schema with custom content types
179
+ const customTask = createGscRefreshTask({
180
+ contentTypes: ["article", "guide"],
181
+ });
182
+ ```
183
+
184
+ ## Styling
185
+
186
+ The components use Sanity UI and follow the Studio's theme. No additional CSS is required.
187
+
188
+ ## Peer Dependencies
189
+
190
+ - `sanity` >= 3.0.0
191
+ - `react` >= 18.0.0
192
+ - `react-dom` >= 18.0.0
193
+ - `@sanity/ui` >= 2.0.0
194
+ - `@sanity/icons` >= 3.0.0
195
+
196
+ ## Exports
197
+
198
+ ```typescript
199
+ // Plugin
200
+ export {
201
+ pageBridgePlugin,
202
+ createPageBridgeStructureResolver,
203
+ } from "@pagebridge/sanity";
204
+ export type { PageBridgePluginConfig } from "@pagebridge/sanity";
205
+
206
+ // Components
207
+ export {
208
+ SearchPerformancePane,
209
+ RefreshQueueTool,
210
+ } from "@pagebridge/sanity";
211
+
212
+ // Schemas
213
+ export {
214
+ gscSite,
215
+ gscSnapshot,
216
+ gscRefreshTask,
217
+ createGscSnapshot,
218
+ createGscRefreshTask,
219
+ } from "@pagebridge/sanity/schemas";
220
+ export type {
221
+ GscSnapshotOptions,
222
+ GscRefreshTaskOptions,
223
+ } from "@pagebridge/sanity/schemas";
224
+ ```
225
+
226
+ ## License
227
+
228
+ MIT
@@ -22,16 +22,16 @@ export function RefreshQueueTool() {
22
22
  const query = filter === "all"
23
23
  ? `*[_type == "gscRefreshTask" && status != "done" && status != "dismissed"]`
24
24
  : `*[_type == "gscRefreshTask" && status == $status]`;
25
- const results = await client.fetch(`${query} | order(severity desc, createdAt desc) {
26
- _id,
27
- reason,
28
- severity,
29
- status,
30
- snoozedUntil,
31
- metrics,
32
- "documentTitle": linkedDocument->title,
33
- "documentSlug": linkedDocument->slug.current,
34
- createdAt
25
+ const results = await client.fetch(`${query} | order(severity desc, createdAt desc) {
26
+ _id,
27
+ reason,
28
+ severity,
29
+ status,
30
+ snoozedUntil,
31
+ metrics,
32
+ "documentTitle": linkedDocument->title,
33
+ "documentSlug": linkedDocument->slug.current,
34
+ createdAt
35
35
  }`, { status: filter });
36
36
  setTasks(results);
37
37
  }, [filter, client]);
@@ -9,17 +9,17 @@ export function SearchPerformancePane({ documentId, }) {
9
9
  const [loading, setLoading] = useState(true);
10
10
  useEffect(() => {
11
11
  async function fetchData() {
12
- const snapshot = await client.fetch(`*[_type == "gscSnapshot" && linkedDocument._ref == $id && period == "last28"][0]{
13
- clicks,
14
- impressions,
15
- ctr,
16
- position,
17
- topQueries,
18
- fetchedAt,
19
- indexStatus
12
+ const snapshot = await client.fetch(`*[_type == "gscSnapshot" && linkedDocument._ref == $id && period == "last28"][0]{
13
+ clicks,
14
+ impressions,
15
+ ctr,
16
+ position,
17
+ topQueries,
18
+ fetchedAt,
19
+ indexStatus
20
20
  }`, { id: documentId });
21
- const previousSnapshot = await client.fetch(`*[_type == "gscSnapshot" && linkedDocument._ref == $id && period == "last28"] | order(fetchedAt desc)[1]{
22
- position
21
+ const previousSnapshot = await client.fetch(`*[_type == "gscSnapshot" && linkedDocument._ref == $id && period == "last28"] | order(fetchedAt desc)[1]{
22
+ position
23
23
  }`, { id: documentId });
24
24
  if (snapshot) {
25
25
  setData({
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { gscPlugin, createGscStructureResolver, createPageBridgeStructure, PAGEBRIDGE_TYPES, type GscPluginConfig, } from "./plugin";
1
+ export { pageBridgePlugin, createPageBridgeStructureResolver, createPageBridgeStructure, PAGEBRIDGE_TYPES, type PageBridgePluginConfig, } from "./plugin";
2
2
  export { gscSite, gscSnapshot, gscRefreshTask, createGscSnapshot, createGscRefreshTask, type GscSnapshotOptions, type GscRefreshTaskOptions, } from "./schemas";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EAChB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,yBAAyB,EACzB,gBAAgB,EAChB,KAAK,sBAAsB,GAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,OAAO,EACP,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // Note: React components are not exported here to avoid loading them during schema extraction
2
2
  // They are lazy-loaded within the plugin when needed
3
- export { gscPlugin, createGscStructureResolver, createPageBridgeStructure, PAGEBRIDGE_TYPES, } from "./plugin";
3
+ export { pageBridgePlugin, createPageBridgeStructureResolver, createPageBridgeStructure, PAGEBRIDGE_TYPES, } from "./plugin";
4
4
  export { gscSite, gscSnapshot, gscRefreshTask, createGscSnapshot, createGscRefreshTask, } from "./schemas";
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { DefaultDocumentNodeResolver, StructureBuilder } from "sanity/structure";
2
- export interface GscPluginConfig {
2
+ export interface PageBridgePluginConfig {
3
3
  /**
4
4
  * Array of Sanity document type names that represent your content.
5
5
  * These will be available for linking in gscSnapshot and gscRefreshTask schemas.
@@ -35,6 +35,6 @@ export declare const createPageBridgeStructure: (S: StructureBuilder) => import(
35
35
  * Creates a structure resolver that adds the Performance view to content types
36
36
  * Use this with structureTool's defaultDocumentNode option
37
37
  */
38
- export declare const createGscStructureResolver: (contentTypes?: string[]) => DefaultDocumentNodeResolver;
39
- export declare const gscPlugin: import("sanity").Plugin<void | GscPluginConfig>;
38
+ export declare const createPageBridgeStructureResolver: (contentTypes?: string[]) => DefaultDocumentNodeResolver;
39
+ export declare const pageBridgePlugin: import("sanity").Plugin<void | PageBridgePluginConfig>;
40
40
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAO1B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,uDAInB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,GAAI,GAAG,gBAAgB,+CAqBxD,CAAC;AAEN;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GACrC,eAAc,MAAM,EAAO,KAC1B,2BAiBF,CAAC;AAEF,eAAO,MAAM,SAAS,iDAuBpB,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAC3B,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAO1B,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,8DAA8D;AAC9D,eAAO,MAAM,gBAAgB,uDAInB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,GAAI,GAAG,gBAAgB,+CAqBxD,CAAC;AAEN;;;GAGG;AACH,eAAO,MAAM,iCAAiC,GAC5C,eAAc,MAAM,EAAO,KAC1B,2BAiBF,CAAC;AAEF,eAAO,MAAM,gBAAgB,wDAuB3B,CAAC"}
package/dist/plugin.js CHANGED
@@ -53,7 +53,7 @@ export const createPageBridgeStructure = (S) => S.listItem()
53
53
  * Creates a structure resolver that adds the Performance view to content types
54
54
  * Use this with structureTool's defaultDocumentNode option
55
55
  */
56
- export const createGscStructureResolver = (contentTypes = []) => {
56
+ export const createPageBridgeStructureResolver = (contentTypes = []) => {
57
57
  return (S, { schemaType }) => {
58
58
  if (contentTypes.includes(schemaType)) {
59
59
  // Lazy import to avoid loading React component during schema extraction
@@ -69,7 +69,7 @@ export const createGscStructureResolver = (contentTypes = []) => {
69
69
  return S.document().views([S.view.form()]);
70
70
  };
71
71
  };
72
- export const gscPlugin = definePlugin((config) => {
72
+ export const pageBridgePlugin = definePlugin((config) => {
73
73
  const contentTypes = config?.contentTypes ?? [];
74
74
  const gscSnapshot = createGscSnapshot({ contentTypes });
75
75
  const gscRefreshTask = createGscRefreshTask({ contentTypes });
package/package.json CHANGED
@@ -1,9 +1,28 @@
1
1
  {
2
2
  "name": "@pagebridge/sanity",
3
- "version": "0.0.2",
3
+ "version": "0.1.1",
4
+ "description": "Sanity Studio plugin for PageBridge — performance pane, decay alerts, and refresh queue powered by Google Search Console data",
4
5
  "license": "MIT",
5
6
  "private": false,
6
7
  "type": "module",
8
+ "keywords": [
9
+ "pagebridge",
10
+ "sanity",
11
+ "sanity-plugin",
12
+ "sanity-studio",
13
+ "google-search-console",
14
+ "gsc",
15
+ "seo",
16
+ "content-decay",
17
+ "search-performance",
18
+ "cms",
19
+ "content-refresh"
20
+ ],
21
+ "files": [
22
+ "dist",
23
+ "LICENSE",
24
+ "README.md"
25
+ ],
7
26
  "exports": {
8
27
  ".": {
9
28
  "types": "./dist/index.d.ts",
@@ -1,2 +0,0 @@
1
- [?9001h[?1004h[?25l> @pagebridge/sanity@0.0.2 build F:\Code\pagebridge\oss\packages\sanity-plugin
2
- > pnpm exec tsc]0;C:\WINDOWS\system32\cmd.exe[?25h[?9001l[?1004l