@liiift-studio/deploy-vercel-from-sanity 1.0.10 → 1.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
@@ -3,7 +3,7 @@
3
3
  **Trigger and monitor Vercel deployments directly from [Sanity Studio](https://www.sanity.io) — no context switching required.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@liiift-studio/deploy-vercel-from-sanity)](https://www.npmjs.com/package/@liiift-studio/deploy-vercel-from-sanity)
6
- [![Sanity v3/v4/v5](https://img.shields.io/badge/sanity-v3%20%7C%20v4%20%7C%20v5-f03e2f)](https://www.sanity.io)
6
+ [![Sanity v3–v6](https://img.shields.io/badge/sanity-v3%20%E2%80%93%20v6-f03e2f)](https://www.sanity.io)
7
7
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
8
8
 
9
9
  ![The Deploy tool inside Sanity Studio — Production and Preview targets each showing a live status badge, branch, commit SHA, deploy author, and a one-click Deploy button](https://raw.githubusercontent.com/Liiift-Studio/Deploy-Vercel-from-Sanity/main/docs/screenshot.png?v=1)
@@ -198,11 +198,23 @@ If "No stderr or stdout was captured" appears, the build may have failed before
198
198
 
199
199
  ## Requirements
200
200
 
201
- - Sanity Studio v3, v4, or v5
201
+ - Sanity Studio v3, v4, v5, or v6
202
202
  - React 18 or 19
203
203
  - A Vercel account with at least one project and a deploy hook configured
204
204
 
205
- Zero runtime dependencies — `react` and `sanity` are peer dependencies provided by your Studio; the plugin ships nothing else.
205
+ Zero runtime dependencies — `react`, `sanity`, `@sanity/ui` and `@sanity/icons` are peer dependencies provided by your Studio; the plugin ships nothing else.
206
+
207
+ ### Studio compatibility
208
+
209
+ A single build supports the whole range. `@sanity/icons` v5 and `@sanity/ui` v4
210
+ both moved components out of their barrel files, so the plugin resolves them at
211
+ runtime rather than importing names that only exist on one major:
212
+
213
+ | Studio | `@sanity/icons` | `@sanity/ui` | Notes |
214
+ | --- | --- | --- | --- |
215
+ | v3 – v6.3 | 3.x | 2.x / 3.x | Fully Studio-native |
216
+ | v6.4 – v6.9 | 5.x | 3.x | Icons resolved via `<Icon symbol>` |
217
+ | v6.10+ | 5.x | 4.x | Tooltips, overflow menu, log blocks and toasts use built-in fallbacks, since `@sanity/ui` v4 serves those from subpaths that do not exist on earlier majors |
206
218
 
207
219
  ---
208
220
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as sanity from 'sanity';
2
+ import { ComponentType, SVGProps } from 'react';
2
3
 
3
4
  type VercelDeployState = 'QUEUED' | 'INITIALIZING' | 'BUILDING' | 'READY' | 'ERROR' | 'CANCELED' | 'LOADING';
4
5
  /** A vercel_deploy document stored in the Sanity dataset */
@@ -51,14 +52,46 @@ interface VercelDeployPluginConfig {
51
52
  icon?: React.ComponentType;
52
53
  }
53
54
 
55
+ /** Props every Sanity icon accepts — it renders a plain sized SVG. */
56
+ type IconProps = SVGProps<SVGSVGElement>;
57
+ /** An icon component, whichever shape the installed @sanity/icons exposes it in. */
58
+ type IconComponent = ComponentType<IconProps>;
59
+
54
60
  declare const vercelDeploySchema: {
55
- type: "document";
56
61
  name: "vercel_deploy";
57
- } & Omit<sanity.DocumentDefinition, "preview"> & {
58
- preview?: sanity.PreviewConfig<{
62
+ title: string;
63
+ type: "document";
64
+ icon: IconComponent;
65
+ fields: (({
66
+ name: "name";
67
+ title: string;
68
+ type: "string";
69
+ description: string;
70
+ validation: (Rule: sanity.StringRule) => sanity.StringRule;
71
+ } & sanity.WidenValidation) | ({
72
+ name: "url";
59
73
  title: string;
60
- subtitle: string;
61
- }, Record<"title" | "subtitle", any>> | undefined;
74
+ type: "url";
75
+ description: string;
76
+ validation: (Rule: sanity.UrlRule) => sanity.UrlRule;
77
+ } & sanity.WidenValidation) | {
78
+ name: "teamId";
79
+ title: string;
80
+ type: "string";
81
+ description: string;
82
+ } | ({
83
+ name: "disableDeleteAction";
84
+ title: string;
85
+ type: "boolean";
86
+ description: string;
87
+ initialValue: false;
88
+ } & sanity.WidenInitialValue))[];
89
+ preview: {
90
+ select: {
91
+ title: string;
92
+ subtitle: string;
93
+ };
94
+ };
62
95
  };
63
96
 
64
97
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as sanity from 'sanity';
2
+ import { ComponentType, SVGProps } from 'react';
2
3
 
3
4
  type VercelDeployState = 'QUEUED' | 'INITIALIZING' | 'BUILDING' | 'READY' | 'ERROR' | 'CANCELED' | 'LOADING';
4
5
  /** A vercel_deploy document stored in the Sanity dataset */
@@ -51,14 +52,46 @@ interface VercelDeployPluginConfig {
51
52
  icon?: React.ComponentType;
52
53
  }
53
54
 
55
+ /** Props every Sanity icon accepts — it renders a plain sized SVG. */
56
+ type IconProps = SVGProps<SVGSVGElement>;
57
+ /** An icon component, whichever shape the installed @sanity/icons exposes it in. */
58
+ type IconComponent = ComponentType<IconProps>;
59
+
54
60
  declare const vercelDeploySchema: {
55
- type: "document";
56
61
  name: "vercel_deploy";
57
- } & Omit<sanity.DocumentDefinition, "preview"> & {
58
- preview?: sanity.PreviewConfig<{
62
+ title: string;
63
+ type: "document";
64
+ icon: IconComponent;
65
+ fields: (({
66
+ name: "name";
67
+ title: string;
68
+ type: "string";
69
+ description: string;
70
+ validation: (Rule: sanity.StringRule) => sanity.StringRule;
71
+ } & sanity.WidenValidation) | ({
72
+ name: "url";
59
73
  title: string;
60
- subtitle: string;
61
- }, Record<"title" | "subtitle", any>> | undefined;
74
+ type: "url";
75
+ description: string;
76
+ validation: (Rule: sanity.UrlRule) => sanity.UrlRule;
77
+ } & sanity.WidenValidation) | {
78
+ name: "teamId";
79
+ title: string;
80
+ type: "string";
81
+ description: string;
82
+ } | ({
83
+ name: "disableDeleteAction";
84
+ title: string;
85
+ type: "boolean";
86
+ description: string;
87
+ initialValue: false;
88
+ } & sanity.WidenInitialValue))[];
89
+ preview: {
90
+ select: {
91
+ title: string;
92
+ subtitle: string;
93
+ };
94
+ };
62
95
  };
63
96
 
64
97
  /**