@sanity/workbench-cli 1.7.2 → 1.9.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.
Files changed (57) hide show
  1. package/dist/_exports/build.d.ts +25 -11
  2. package/dist/_exports/deploy.d.ts +29 -72
  3. package/dist/_exports/deploy.js +1 -1
  4. package/dist/_exports/deploy.js.map +1 -1
  5. package/dist/_exports/dev.d.ts +13 -0
  6. package/dist/_exports/index.d.ts +47 -9
  7. package/dist/_exports/index.js.map +1 -1
  8. package/dist/_exports/init.d.ts +5 -3
  9. package/dist/_exports/init.js +2 -1
  10. package/dist/_exports/init.js.map +1 -1
  11. package/dist/_exports/preview.d.ts +13 -0
  12. package/dist/_exports/undeploy.d.ts +26 -11
  13. package/dist/actions/deploy/deployConfig.js +1 -1
  14. package/dist/actions/deploy/deployConfig.js.map +1 -1
  15. package/dist/actions/deploy/deployWorkbenchApp.js +10 -2
  16. package/dist/actions/deploy/deployWorkbenchApp.js.map +1 -1
  17. package/dist/actions/deploy/summarizeInterfaces.js +33 -0
  18. package/dist/actions/deploy/summarizeInterfaces.js.map +1 -0
  19. package/dist/actions/deploy/viewDeployment.js +2 -1
  20. package/dist/actions/deploy/viewDeployment.js.map +1 -1
  21. package/dist/actions/dev/{deriveInterfaces.js → deriveConfigs.js} +3 -52
  22. package/dist/actions/dev/deriveConfigs.js.map +1 -0
  23. package/dist/actions/dev/exposesSetId.js +1 -1
  24. package/dist/actions/dev/exposesSetId.js.map +1 -1
  25. package/dist/actions/dev/registry.js +6 -1
  26. package/dist/actions/dev/registry.js.map +1 -1
  27. package/dist/actions/dev/startDevManifestWatcher.js.map +1 -1
  28. package/dist/actions/dev/startDevServerRegistration.js +2 -1
  29. package/dist/actions/dev/startDevServerRegistration.js.map +1 -1
  30. package/dist/actions/dev/startWorkbenchDevServer.js +2 -1
  31. package/dist/actions/dev/startWorkbenchDevServer.js.map +1 -1
  32. package/dist/actions/dev/writeWorkbenchRuntime.js +2 -1
  33. package/dist/actions/dev/writeWorkbenchRuntime.js.map +1 -1
  34. package/dist/actions/init/cliConfig.js +2 -4
  35. package/dist/actions/init/cliConfig.js.map +1 -1
  36. package/dist/actions/preview/startWorkbenchPreview.js +2 -1
  37. package/dist/actions/preview/startWorkbenchPreview.js.map +1 -1
  38. package/dist/actions/undeploy/workbenchUndeployAdapter.js +3 -3
  39. package/dist/actions/undeploy/workbenchUndeployAdapter.js.map +1 -1
  40. package/dist/appId.js +1 -1
  41. package/dist/appId.js.map +1 -1
  42. package/dist/appSlug.js +7 -0
  43. package/dist/appSlug.js.map +1 -0
  44. package/dist/contract.js +27 -4
  45. package/dist/contract.js.map +1 -1
  46. package/dist/defineApp.js +7 -7
  47. package/dist/defineApp.js.map +1 -1
  48. package/dist/defineView.js.map +1 -1
  49. package/dist/deriveInterfaces.js +48 -0
  50. package/dist/deriveInterfaces.js.map +1 -0
  51. package/dist/resolveWorkbenchApp.js +0 -1
  52. package/dist/resolveWorkbenchApp.js.map +1 -1
  53. package/dist/services/applications.js.map +1 -1
  54. package/package.json +7 -6
  55. package/dist/actions/deploy/buildExposes.js +0 -72
  56. package/dist/actions/deploy/buildExposes.js.map +0 -1
  57. package/dist/actions/dev/deriveInterfaces.js.map +0 -1
@@ -3,6 +3,14 @@ import { CliConfig } from "@sanity/cli-core";
3
3
  import { PluginOption } from "vite";
4
4
  import { z } from "zod/mini";
5
5
 
6
+ /** The `asset_source` variant of an app's `views`. @public */
7
+ declare type AssetSourceView = Extract<
8
+ NonNullable<z.output<typeof DefineAppInputSchema>["views"]>[number],
9
+ {
10
+ type: "asset_source";
11
+ }
12
+ >;
13
+
6
14
  /**
7
15
  * The `build`/`start` id — a hash of the app's declared shape (its identity, not
8
16
  * its code), so the bundle inlined by `sanity build` and the registry entry
@@ -14,10 +22,11 @@ export declare function buildAppId(app: ResolvedWorkbenchApp): Promise<string>;
14
22
 
15
23
  /**
16
24
  * User-facing input for `unstable_defineApp`. Excludes the internal
17
- * `applicationType`, `isSingleton`, and `config` — validated by the
18
- * schema but not part of the public surface (Sanity-owned apps set them via
19
- * `@ts-expect-error`). A union so an app declares an app `entry` or `views`,
20
- * never both.
25
+ * `applicationType`, `isSingleton`, and `config` — validated by the schema but
26
+ * not part of the public surface (Sanity-owned apps set them via
27
+ * `@ts-expect-error`). A union: an app declares an app `entry` (navigable) or
28
+ * panel `views`, never both — but an `asset_source` view is a separate kind and
29
+ * may accompany either.
21
30
  * @public
22
31
  */
23
32
  declare type DefineAppInput = Omit<
@@ -31,7 +40,7 @@ declare type DefineAppInput = Omit<
31
40
  }
32
41
  | {
33
42
  entry?: string;
34
- views?: never;
43
+ views?: AssetSourceView[];
35
44
  }
36
45
  );
37
46
 
@@ -84,7 +93,6 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
84
93
  >;
85
94
  icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
86
95
  isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
87
- name: z.ZodMiniString<string>;
88
96
  organizationId: z.ZodMiniString<string>;
89
97
  priority: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
90
98
  services: z.ZodMiniOptional<
@@ -93,7 +101,7 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
93
101
  [
94
102
  z.ZodMiniObject<
95
103
  {
96
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
104
+ title: z.ZodMiniString<string>;
97
105
  name: z.ZodMiniString<string>;
98
106
  src: z.ZodMiniString<string>;
99
107
  type: z.ZodMiniLiteral<"worker">;
@@ -113,13 +121,22 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
113
121
  [
114
122
  z.ZodMiniObject<
115
123
  {
116
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
124
+ title: z.ZodMiniString<string>;
117
125
  name: z.ZodMiniString<string>;
118
126
  src: z.ZodMiniString<string>;
119
127
  type: z.ZodMiniLiteral<"panel">;
120
128
  },
121
129
  z.core.$strip
122
130
  >,
131
+ z.ZodMiniObject<
132
+ {
133
+ title: z.ZodMiniString<string>;
134
+ name: z.ZodMiniString<string>;
135
+ src: z.ZodMiniString<string>;
136
+ type: z.ZodMiniLiteral<"asset_source">;
137
+ },
138
+ z.core.$strip
139
+ >,
123
140
  ],
124
141
  "type"
125
142
  >
@@ -147,13 +164,10 @@ declare type DefineAppResult = DefineAppInput & {
147
164
 
148
165
  /** @public */
149
166
  declare interface ResolvedWorkbenchApp {
150
- /** The app's unique `name` from `unstable_defineApp`. */
151
- readonly name: string;
152
167
  /** Organization that owns the app — part of its build-id identity. */
153
168
  readonly organizationId: string;
154
169
  /** Background worker services the app declares. */
155
170
  readonly services: NonNullable<DefineAppInput["services"]>;
156
- /** Hostname the application is created at on first deploy. */
157
171
  readonly slug: string;
158
172
  /** Dock panel views the app declares. */
159
173
  readonly views: NonNullable<DefineAppInput["views"]>;
@@ -3,22 +3,6 @@ import { CliConfig } from "@sanity/cli-core";
3
3
  import { Output } from "@sanity/cli-core";
4
4
  import { z } from "zod/mini";
5
5
 
6
- /** @internal */
7
- declare type AppInterfaceMetadata = z.infer<typeof AppInterfaceMetadataSchema>;
8
-
9
- /**
10
- * The `app` interface's dock-placement metadata. Interface metadata is
11
- * discriminated on `type`; `app` is the only type with a shape so far.
12
- * @internal
13
- */
14
- declare const AppInterfaceMetadataSchema: z.ZodMiniObject<
15
- {
16
- group: z.ZodMiniOptional<z.ZodMiniString<string>>;
17
- priority: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
18
- },
19
- z.core.$strip
20
- >;
21
-
22
6
  export declare interface Application {
23
7
  id: string;
24
8
  organizationId: string;
@@ -29,31 +13,13 @@ export declare interface Application {
29
13
 
30
14
  declare type ApplicationType = "coreApp" | "studio";
31
15
 
32
- /**
33
- * An interface as Brett stores it, discriminated on `type`. `moduleId` is
34
- * remote-relative — the host prepends the app's id. Brett assigns the id.
35
- * @internal
36
- */
37
- export declare type BrettInterface =
38
- | (BrettInterfaceBase & {
39
- metadata: AppInterfaceMetadata | null;
40
- type: "app";
41
- })
42
- | (BrettInterfaceBase & {
43
- metadata: null;
44
- type: "panel";
45
- })
46
- | (BrettInterfaceBase & {
47
- metadata: null;
48
- type: "worker";
49
- });
50
-
51
- declare interface BrettInterfaceBase {
52
- moduleId: string;
53
- name: string;
54
- title: string;
55
- version: string;
56
- }
16
+ /** The `asset_source` variant of an app's `views`. @public */
17
+ declare type AssetSourceView = Extract<
18
+ NonNullable<z.output<typeof DefineAppInputSchema>["views"]>[number],
19
+ {
20
+ type: "asset_source";
21
+ }
22
+ >;
57
23
 
58
24
  /** A studio workspace as Brett stores it. */
59
25
  export declare interface BrettWorkspace {
@@ -68,24 +34,6 @@ export declare interface BrettWorkspace {
68
34
  title?: string;
69
35
  }
70
36
 
71
- /**
72
- * The interface records deploy sends: the app view (only when `exposesAppView`),
73
- * every view, and every service.
74
- * @internal
75
- */
76
- export declare function buildExposes(
77
- exposes: WorkbenchExposes,
78
- { appName, appTitle, exposesAppView, version }: BuildExposesContext,
79
- ): BrettInterface[];
80
-
81
- declare interface BuildExposesContext {
82
- appName: string;
83
- appTitle: string;
84
- /** Whether the build exposes the app view (`./App`) — apps with an `entry`, and every studio. */
85
- exposesAppView: boolean;
86
- version: string;
87
- }
88
-
89
37
  /**
90
38
  * Throws unless `sourceDir` is a directory holding a federation build.
91
39
  * A workbench build always emits a module-federation remote, and may
@@ -128,14 +76,16 @@ export declare function createStudio(options: {
128
76
  projectId: string | undefined;
129
77
  slug: string;
130
78
  title: string;
79
+ visibility?: AppVisibility;
131
80
  }): Promise<CreatedApplication>;
132
81
 
133
82
  /**
134
83
  * User-facing input for `unstable_defineApp`. Excludes the internal
135
- * `applicationType`, `isSingleton`, and `config` — validated by the
136
- * schema but not part of the public surface (Sanity-owned apps set them via
137
- * `@ts-expect-error`). A union so an app declares an app `entry` or `views`,
138
- * never both.
84
+ * `applicationType`, `isSingleton`, and `config` — validated by the schema but
85
+ * not part of the public surface (Sanity-owned apps set them via
86
+ * `@ts-expect-error`). A union: an app declares an app `entry` (navigable) or
87
+ * panel `views`, never both — but an `asset_source` view is a separate kind and
88
+ * may accompany either.
139
89
  * @public
140
90
  */
141
91
  declare type DefineAppInput = Omit<
@@ -149,7 +99,7 @@ declare type DefineAppInput = Omit<
149
99
  }
150
100
  | {
151
101
  entry?: string;
152
- views?: never;
102
+ views?: AssetSourceView[];
153
103
  }
154
104
  );
155
105
 
@@ -202,7 +152,6 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
202
152
  >;
203
153
  icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
204
154
  isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
205
- name: z.ZodMiniString<string>;
206
155
  organizationId: z.ZodMiniString<string>;
207
156
  priority: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
208
157
  services: z.ZodMiniOptional<
@@ -211,7 +160,7 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
211
160
  [
212
161
  z.ZodMiniObject<
213
162
  {
214
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
163
+ title: z.ZodMiniString<string>;
215
164
  name: z.ZodMiniString<string>;
216
165
  src: z.ZodMiniString<string>;
217
166
  type: z.ZodMiniLiteral<"worker">;
@@ -231,13 +180,22 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
231
180
  [
232
181
  z.ZodMiniObject<
233
182
  {
234
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
183
+ title: z.ZodMiniString<string>;
235
184
  name: z.ZodMiniString<string>;
236
185
  src: z.ZodMiniString<string>;
237
186
  type: z.ZodMiniLiteral<"panel">;
238
187
  },
239
188
  z.core.$strip
240
189
  >,
190
+ z.ZodMiniObject<
191
+ {
192
+ title: z.ZodMiniString<string>;
193
+ name: z.ZodMiniString<string>;
194
+ src: z.ZodMiniString<string>;
195
+ type: z.ZodMiniLiteral<"asset_source">;
196
+ },
197
+ z.core.$strip
198
+ >,
241
199
  ],
242
200
  "type"
243
201
  >
@@ -319,9 +277,10 @@ export declare interface DeployedExpose {
319
277
  * @internal
320
278
  */
321
279
  export declare function deployWorkbenchApp(options: {
280
+ app: CliConfig["app"];
322
281
  applicationId: string;
323
282
  icon?: string;
324
- interfaces: readonly BrettInterface[];
283
+ isApp: boolean;
325
284
  isAutoUpdating: boolean;
326
285
  label?: string;
327
286
  onDeployed?: () => void;
@@ -354,13 +313,10 @@ export declare function listApplications(
354
313
 
355
314
  /** @public */
356
315
  declare interface ResolvedWorkbenchApp {
357
- /** The app's unique `name` from `unstable_defineApp`. */
358
- readonly name: string;
359
316
  /** Organization that owns the app — part of its build-id identity. */
360
317
  readonly organizationId: string;
361
318
  /** Background worker services the app declares. */
362
319
  readonly services: NonNullable<DefineAppInput["services"]>;
363
- /** Hostname the application is created at on first deploy. */
364
320
  readonly slug: string;
365
321
  /** Dock panel views the app declares. */
366
322
  readonly views: NonNullable<DefineAppInput["views"]>;
@@ -407,7 +363,7 @@ export declare function summarizeConfig(config: {
407
363
  * and one report line per non-empty group (for the human report).
408
364
  * @internal
409
365
  */
410
- export declare function summarizeExposes({
366
+ export declare function summarizeInterfaces({
411
367
  services,
412
368
  views,
413
369
  }: WorkbenchExposes): {
@@ -435,6 +391,7 @@ declare const viewDeploymentPayloadSchema: z.ZodMiniObject<
435
391
  name: z.ZodMiniString<string>;
436
392
  src: z.ZodMiniString<string>;
437
393
  type: z.ZodMiniEnum<{
394
+ asset_source: "asset_source";
438
395
  panel: "panel";
439
396
  }>;
440
397
  },
@@ -1,8 +1,8 @@
1
- export { buildExposes, summarizeExposes } from '../actions/deploy/buildExposes.js';
2
1
  export { checkBuiltOutput } from '../actions/deploy/checkBuiltOutput.js';
3
2
  export { deployConfig, resolveInstallationId, summarizeConfig } from '../actions/deploy/deployConfig.js';
4
3
  export { createCoreApp, createStudio, deployWorkbenchApp } from '../actions/deploy/deployWorkbenchApp.js';
5
4
  export { getWorkbench } from '../actions/deploy/getWorkbench.js';
5
+ export { summarizeInterfaces } from '../actions/deploy/summarizeInterfaces.js';
6
6
  export { getApplication, getApplicationUrl, getWorkbenchUrl, listApplications } from '../services/applications.js';
7
7
 
8
8
  //# sourceMappingURL=deploy.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/deploy.ts"],"sourcesContent":["export {\n buildExposes,\n type DeployedExpose,\n summarizeExposes,\n} from '../actions/deploy/buildExposes.js'\nexport {checkBuiltOutput} from '../actions/deploy/checkBuiltOutput.js'\nexport {\n deployConfig,\n resolveInstallationId,\n summarizeConfig,\n} from '../actions/deploy/deployConfig.js'\nexport {\n createCoreApp,\n type CreatedApplication,\n createStudio,\n deployWorkbenchApp,\n} from '../actions/deploy/deployWorkbenchApp.js'\nexport {getWorkbench} from '../actions/deploy/getWorkbench.js'\nexport {\n type Application,\n type BrettInterface,\n type BrettWorkspace,\n getApplication,\n getApplicationUrl,\n getWorkbenchUrl,\n listApplications,\n} from '../services/applications.js'\n"],"names":["buildExposes","summarizeExposes","checkBuiltOutput","deployConfig","resolveInstallationId","summarizeConfig","createCoreApp","createStudio","deployWorkbenchApp","getWorkbench","getApplication","getApplicationUrl","getWorkbenchUrl","listApplications"],"mappings":"AAAA,SACEA,YAAY,EAEZC,gBAAgB,QACX,oCAAmC;AAC1C,SAAQC,gBAAgB,QAAO,wCAAuC;AACtE,SACEC,YAAY,EACZC,qBAAqB,EACrBC,eAAe,QACV,oCAAmC;AAC1C,SACEC,aAAa,EAEbC,YAAY,EACZC,kBAAkB,QACb,0CAAyC;AAChD,SAAQC,YAAY,QAAO,oCAAmC;AAC9D,SAIEC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,8BAA6B"}
1
+ {"version":3,"sources":["../../src/_exports/deploy.ts"],"sourcesContent":["export {checkBuiltOutput} from '../actions/deploy/checkBuiltOutput.js'\nexport {\n deployConfig,\n resolveInstallationId,\n summarizeConfig,\n} from '../actions/deploy/deployConfig.js'\nexport {\n createCoreApp,\n type CreatedApplication,\n createStudio,\n deployWorkbenchApp,\n} from '../actions/deploy/deployWorkbenchApp.js'\nexport {getWorkbench} from '../actions/deploy/getWorkbench.js'\nexport {type DeployedExpose, summarizeInterfaces} from '../actions/deploy/summarizeInterfaces.js'\nexport {\n type Application,\n type BrettWorkspace,\n getApplication,\n getApplicationUrl,\n getWorkbenchUrl,\n listApplications,\n} from '../services/applications.js'\n"],"names":["checkBuiltOutput","deployConfig","resolveInstallationId","summarizeConfig","createCoreApp","createStudio","deployWorkbenchApp","getWorkbench","summarizeInterfaces","getApplication","getApplicationUrl","getWorkbenchUrl","listApplications"],"mappings":"AAAA,SAAQA,gBAAgB,QAAO,wCAAuC;AACtE,SACEC,YAAY,EACZC,qBAAqB,EACrBC,eAAe,QACV,oCAAmC;AAC1C,SACEC,aAAa,EAEbC,YAAY,EACZC,kBAAkB,QACb,0CAAyC;AAChD,SAAQC,YAAY,QAAO,oCAAmC;AAC9D,SAA6BC,mBAAmB,QAAO,2CAA0C;AACjG,SAGEC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,8BAA6B"}
@@ -94,6 +94,19 @@ declare const devServerManifestSchema: z.ZodMiniObject<
94
94
  },
95
95
  z.core.$strip
96
96
  >,
97
+ z.ZodMiniObject<
98
+ {
99
+ metadata: z.ZodMiniNull;
100
+ type: z.ZodMiniLiteral<"asset_source">;
101
+ id: z.ZodMiniString<string>;
102
+ moduleId: z.ZodMiniString<string>;
103
+ name: z.ZodMiniString<string>;
104
+ src: z.ZodMiniString<string>;
105
+ title: z.ZodMiniString<string>;
106
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
107
+ },
108
+ z.core.$strip
109
+ >,
97
110
  z.ZodMiniObject<
98
111
  {
99
112
  metadata: z.ZodMiniNull;
@@ -1,11 +1,39 @@
1
+ import { AssetSourceComponentProps } from "@sanity/types";
1
2
  import { z } from "zod/mini";
2
3
 
4
+ /**
5
+ * An asset source's view-component slot — the module-federation expose for its
6
+ * one island.
7
+ * @public
8
+ */
9
+ export declare type AssetSourceComponent = keyof AssetSourceViewComponents;
10
+
11
+ /** The `asset_source` variant of an app's `views`. @public */
12
+ declare type AssetSourceView = Extract<
13
+ NonNullable<z.output<typeof DefineAppInputSchema>["views"]>[number],
14
+ {
15
+ type: "asset_source";
16
+ }
17
+ >;
18
+
19
+ /**
20
+ * The component slots an `asset_source` view exposes — a single picker island,
21
+ * typed with the studio asset-source props it renders behind. The props are
22
+ * `@sanity/types`' `AssetSourceComponentProps` directly, so an authored picker
23
+ * receives exactly what a studio `AssetSource.component` does.
24
+ * @public
25
+ */
26
+ export declare interface AssetSourceViewComponents {
27
+ asset_source: ViewComponent<AssetSourceComponentProps>;
28
+ }
29
+
3
30
  /**
4
31
  * User-facing input for `unstable_defineApp`. Excludes the internal
5
- * `applicationType`, `isSingleton`, and `config` — validated by the
6
- * schema but not part of the public surface (Sanity-owned apps set them via
7
- * `@ts-expect-error`). A union so an app declares an app `entry` or `views`,
8
- * never both.
32
+ * `applicationType`, `isSingleton`, and `config` — validated by the schema but
33
+ * not part of the public surface (Sanity-owned apps set them via
34
+ * `@ts-expect-error`). A union: an app declares an app `entry` (navigable) or
35
+ * panel `views`, never both — but an `asset_source` view is a separate kind and
36
+ * may accompany either.
9
37
  * @public
10
38
  */
11
39
  export declare type DefineAppInput = Omit<
@@ -19,7 +47,7 @@ export declare type DefineAppInput = Omit<
19
47
  }
20
48
  | {
21
49
  entry?: string;
22
- views?: never;
50
+ views?: AssetSourceView[];
23
51
  }
24
52
  );
25
53
 
@@ -72,7 +100,6 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
72
100
  >;
73
101
  icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
74
102
  isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
75
- name: z.ZodMiniString<string>;
76
103
  organizationId: z.ZodMiniString<string>;
77
104
  priority: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
78
105
  services: z.ZodMiniOptional<
@@ -81,7 +108,7 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
81
108
  [
82
109
  z.ZodMiniObject<
83
110
  {
84
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
111
+ title: z.ZodMiniString<string>;
85
112
  name: z.ZodMiniString<string>;
86
113
  src: z.ZodMiniString<string>;
87
114
  type: z.ZodMiniLiteral<"worker">;
@@ -101,13 +128,22 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
101
128
  [
102
129
  z.ZodMiniObject<
103
130
  {
104
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
131
+ title: z.ZodMiniString<string>;
105
132
  name: z.ZodMiniString<string>;
106
133
  src: z.ZodMiniString<string>;
107
134
  type: z.ZodMiniLiteral<"panel">;
108
135
  },
109
136
  z.core.$strip
110
137
  >,
138
+ z.ZodMiniObject<
139
+ {
140
+ title: z.ZodMiniString<string>;
141
+ name: z.ZodMiniString<string>;
142
+ src: z.ZodMiniString<string>;
143
+ type: z.ZodMiniLiteral<"asset_source">;
144
+ },
145
+ z.core.$strip
146
+ >,
111
147
  ],
112
148
  "type"
113
149
  >
@@ -291,7 +327,7 @@ export declare type ServiceType = "worker";
291
327
  /**
292
328
  * Declare a Sanity Workbench application. Identity at runtime — returns the same
293
329
  * object reference, tagged with the workbench brand. Field validation (the
294
- * `name` pattern etc.) runs at build time in the CLI via `DefineAppInputSchema`;
330
+ * `slug` pattern etc.) runs at build time in the CLI via `DefineAppInputSchema`;
295
331
  * this helper stays a thin, pure identity wrapper.
296
332
  * @public
297
333
  */
@@ -343,6 +379,7 @@ export declare function unstable_defineView<TType extends InterfaceType>(
343
379
  * @internal
344
380
  */
345
381
  declare const VIEW_COMPONENTS: {
382
+ readonly asset_source: readonly ["asset_source"];
346
383
  readonly panel: readonly ["title", "panel"];
347
384
  };
348
385
 
@@ -366,6 +403,7 @@ declare interface ViewComponentBaseProps<TView> {
366
403
  * @public
367
404
  */
368
405
  export declare interface ViewComponentsByType {
406
+ asset_source: AssetSourceViewComponents;
369
407
  panel: PanelViewComponents;
370
408
  }
371
409
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/index.ts"],"sourcesContent":["export {resolveAppId} from '../appId.js'\nexport type {InterfaceType, ServiceType} from '../contract.js'\nexport {isWorkbenchApp, unstable_defineApp, unstable_defineMediaLibrary} from '../defineApp.js'\nexport type {\n DefineAppInput,\n DefineAppResult,\n DefineMediaLibraryInput,\n DockGroup,\n MediaLibraryField,\n WorkbenchApp,\n} from '../defineApp.js'\nexport {unstable_defineService} from '../defineService.js'\nexport type {\n DefinedService,\n ServiceCallback,\n ServiceContext,\n ServiceInfo,\n} from '../defineService.js'\nexport {unstable_defineView} from '../defineView.js'\nexport type {\n DefinedView,\n PanelComponent,\n PanelViewComponents,\n PanelViewProps,\n ViewComponentsByType,\n} from '../defineView.js'\n"],"names":["resolveAppId","isWorkbenchApp","unstable_defineApp","unstable_defineMediaLibrary","unstable_defineService","unstable_defineView"],"mappings":"AAAA,SAAQA,YAAY,QAAO,cAAa;AAExC,SAAQC,cAAc,EAAEC,kBAAkB,EAAEC,2BAA2B,QAAO,kBAAiB;AAS/F,SAAQC,sBAAsB,QAAO,sBAAqB;AAO1D,SAAQC,mBAAmB,QAAO,mBAAkB"}
1
+ {"version":3,"sources":["../../src/_exports/index.ts"],"sourcesContent":["export {resolveAppId} from '../appId.js'\nexport type {InterfaceType, ServiceType} from '../contract.js'\nexport {isWorkbenchApp, unstable_defineApp, unstable_defineMediaLibrary} from '../defineApp.js'\nexport type {\n DefineAppInput,\n DefineAppResult,\n DefineMediaLibraryInput,\n DockGroup,\n MediaLibraryField,\n WorkbenchApp,\n} from '../defineApp.js'\nexport {unstable_defineService} from '../defineService.js'\nexport type {\n DefinedService,\n ServiceCallback,\n ServiceContext,\n ServiceInfo,\n} from '../defineService.js'\nexport {unstable_defineView} from '../defineView.js'\nexport type {\n AssetSourceComponent,\n AssetSourceViewComponents,\n DefinedView,\n PanelComponent,\n PanelViewComponents,\n PanelViewProps,\n ViewComponentsByType,\n} from '../defineView.js'\n"],"names":["resolveAppId","isWorkbenchApp","unstable_defineApp","unstable_defineMediaLibrary","unstable_defineService","unstable_defineView"],"mappings":"AAAA,SAAQA,YAAY,QAAO,cAAa;AAExC,SAAQC,cAAc,EAAEC,kBAAkB,EAAEC,2BAA2B,QAAO,kBAAiB;AAS/F,SAAQC,sBAAsB,QAAO,sBAAqB;AAO1D,SAAQC,mBAAmB,QAAO,mBAAkB"}
@@ -1,12 +1,14 @@
1
+ export declare function toAppSlug(value: string): string | null;
2
+
1
3
  /** App scaffold — `entry` auto-declares the navigable app view. */
2
4
  export declare const workbenchAppConfigTemplate =
3
- "\nimport {defineCliConfig, unstable_defineApp} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: unstable_defineApp({\n name: '%name%',\n title: '%title%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n entry: '%entry%',\n }),\n})\n";
5
+ "\nimport {defineCliConfig, unstable_defineApp} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: unstable_defineApp({\n title: '%title%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n entry: '%entry%',\n }),\n})\n";
4
6
 
5
7
  /**
6
- * Studio scaffold — brands with name/title only, no `entry` (studio app views
8
+ * Studio scaffold — brands with slug/title only, no `entry` (studio app views
7
9
  * aren't implemented yet).
8
10
  */
9
11
  export declare const workbenchStudioConfigTemplate =
10
- "\nimport {defineCliConfig, unstable_defineApp} from 'sanity/cli'\n\nexport default defineCliConfig({\n api: {\n projectId: '%projectId%',\n dataset: '%dataset%'\n },\n app: unstable_defineApp({\n name: '%name%',\n title: '%title%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n }),\n deployment: {\n /**\n * Enable auto-updates for studios.\n * Learn more at https://www.sanity.io/docs/studio/latest-version-of-sanity#k47faf43faf56\n */\n autoUpdates: __BOOL__autoUpdates__,\n },\n})\n";
12
+ "\nimport {defineCliConfig, unstable_defineApp} from 'sanity/cli'\n\nexport default defineCliConfig({\n api: {\n projectId: '%projectId%',\n dataset: '%dataset%'\n },\n app: unstable_defineApp({\n title: '%title%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n }),\n deployment: {\n /**\n * Enable auto-updates for studios.\n * Learn more at https://www.sanity.io/docs/studio/latest-version-of-sanity#k47faf43faf56\n */\n autoUpdates: __BOOL__autoUpdates__,\n },\n})\n";
11
13
 
12
14
  export {};
@@ -1,5 +1,6 @@
1
1
  // Browser-safe `init` entry: the workbench `sanity.cli.ts` config templates the
2
- // CLI's init scaffolding fills in. Plain strings no runtime deps.
2
+ // CLI's init scaffolding fills in, and the coercion that fills `%slug%`. No runtime deps.
3
3
  export { workbenchAppConfigTemplate, workbenchStudioConfigTemplate } from '../actions/init/cliConfig.js';
4
+ export { toAppSlug } from '../appSlug.js';
4
5
 
5
6
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/init.ts"],"sourcesContent":["// Browser-safe `init` entry: the workbench `sanity.cli.ts` config templates the\n// CLI's init scaffolding fills in. Plain strings no runtime deps.\nexport {\n workbenchAppConfigTemplate,\n workbenchStudioConfigTemplate,\n} from '../actions/init/cliConfig.js'\n"],"names":["workbenchAppConfigTemplate","workbenchStudioConfigTemplate"],"mappings":"AAAA,gFAAgF;AAChF,oEAAoE;AACpE,SACEA,0BAA0B,EAC1BC,6BAA6B,QACxB,+BAA8B"}
1
+ {"version":3,"sources":["../../src/_exports/init.ts"],"sourcesContent":["// Browser-safe `init` entry: the workbench `sanity.cli.ts` config templates the\n// CLI's init scaffolding fills in, and the coercion that fills `%slug%`. No runtime deps.\nexport {\n workbenchAppConfigTemplate,\n workbenchStudioConfigTemplate,\n} from '../actions/init/cliConfig.js'\nexport {toAppSlug} from '../appSlug.js'\n"],"names":["workbenchAppConfigTemplate","workbenchStudioConfigTemplate","toAppSlug"],"mappings":"AAAA,gFAAgF;AAChF,0FAA0F;AAC1F,SACEA,0BAA0B,EAC1BC,6BAA6B,QACxB,+BAA8B;AACrC,SAAQC,SAAS,QAAO,gBAAe"}
@@ -77,6 +77,19 @@ declare const devServerManifestSchema: z.ZodMiniObject<
77
77
  },
78
78
  z.core.$strip
79
79
  >,
80
+ z.ZodMiniObject<
81
+ {
82
+ metadata: z.ZodMiniNull;
83
+ type: z.ZodMiniLiteral<"asset_source">;
84
+ id: z.ZodMiniString<string>;
85
+ moduleId: z.ZodMiniString<string>;
86
+ name: z.ZodMiniString<string>;
87
+ src: z.ZodMiniString<string>;
88
+ title: z.ZodMiniString<string>;
89
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
90
+ },
91
+ z.core.$strip
92
+ >,
80
93
  z.ZodMiniObject<
81
94
  {
82
95
  metadata: z.ZodMiniNull;
@@ -4,6 +4,14 @@ import { UndeployApplicationTarget } from "@sanity/cli-core/undeploy";
4
4
  import { UndeployConfigTarget } from "@sanity/cli-core/undeploy";
5
5
  import { z } from "zod/mini";
6
6
 
7
+ /** The `asset_source` variant of an app's `views`. @public */
8
+ declare type AssetSourceView = Extract<
9
+ NonNullable<z.output<typeof DefineAppInputSchema>["views"]>[number],
10
+ {
11
+ type: "asset_source";
12
+ }
13
+ >;
14
+
7
15
  /**
8
16
  * The undeploy adapter for workbench apps, mirroring what a workbench deploy
9
17
  * creates: apps that expose interfaces delete their Brett application (the
@@ -20,10 +28,11 @@ export declare function createWorkbenchUndeployAdapter(options: {
20
28
 
21
29
  /**
22
30
  * User-facing input for `unstable_defineApp`. Excludes the internal
23
- * `applicationType`, `isSingleton`, and `config` — validated by the
24
- * schema but not part of the public surface (Sanity-owned apps set them via
25
- * `@ts-expect-error`). A union so an app declares an app `entry` or `views`,
26
- * never both.
31
+ * `applicationType`, `isSingleton`, and `config` — validated by the schema but
32
+ * not part of the public surface (Sanity-owned apps set them via
33
+ * `@ts-expect-error`). A union: an app declares an app `entry` (navigable) or
34
+ * panel `views`, never both — but an `asset_source` view is a separate kind and
35
+ * may accompany either.
27
36
  * @public
28
37
  */
29
38
  declare type DefineAppInput = Omit<
@@ -37,7 +46,7 @@ declare type DefineAppInput = Omit<
37
46
  }
38
47
  | {
39
48
  entry?: string;
40
- views?: never;
49
+ views?: AssetSourceView[];
41
50
  }
42
51
  );
43
52
 
@@ -90,7 +99,6 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
90
99
  >;
91
100
  icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
92
101
  isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
93
- name: z.ZodMiniString<string>;
94
102
  organizationId: z.ZodMiniString<string>;
95
103
  priority: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
96
104
  services: z.ZodMiniOptional<
@@ -99,7 +107,7 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
99
107
  [
100
108
  z.ZodMiniObject<
101
109
  {
102
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
110
+ title: z.ZodMiniString<string>;
103
111
  name: z.ZodMiniString<string>;
104
112
  src: z.ZodMiniString<string>;
105
113
  type: z.ZodMiniLiteral<"worker">;
@@ -119,13 +127,22 @@ declare const DefineAppInputSchema: z.ZodMiniObject<
119
127
  [
120
128
  z.ZodMiniObject<
121
129
  {
122
- title: z.ZodMiniOptional<z.ZodMiniString<string>>;
130
+ title: z.ZodMiniString<string>;
123
131
  name: z.ZodMiniString<string>;
124
132
  src: z.ZodMiniString<string>;
125
133
  type: z.ZodMiniLiteral<"panel">;
126
134
  },
127
135
  z.core.$strip
128
136
  >,
137
+ z.ZodMiniObject<
138
+ {
139
+ title: z.ZodMiniString<string>;
140
+ name: z.ZodMiniString<string>;
141
+ src: z.ZodMiniString<string>;
142
+ type: z.ZodMiniLiteral<"asset_source">;
143
+ },
144
+ z.core.$strip
145
+ >,
129
146
  ],
130
147
  "type"
131
148
  >
@@ -182,13 +199,10 @@ declare interface DeployedExpose {
182
199
 
183
200
  /** @public */
184
201
  declare interface ResolvedWorkbenchApp {
185
- /** The app's unique `name` from `unstable_defineApp`. */
186
- readonly name: string;
187
202
  /** Organization that owns the app — part of its build-id identity. */
188
203
  readonly organizationId: string;
189
204
  /** Background worker services the app declares. */
190
205
  readonly services: NonNullable<DefineAppInput["services"]>;
191
- /** Hostname the application is created at on first deploy. */
192
206
  readonly slug: string;
193
207
  /** Dock panel views the app declares. */
194
208
  readonly views: NonNullable<DefineAppInput["views"]>;
@@ -226,6 +240,7 @@ declare const viewDeploymentPayloadSchema: z.ZodMiniObject<
226
240
  name: z.ZodMiniString<string>;
227
241
  src: z.ZodMiniString<string>;
228
242
  type: z.ZodMiniEnum<{
243
+ asset_source: "asset_source";
229
244
  panel: "panel";
230
245
  }>;
231
246
  },
@@ -5,7 +5,7 @@ import { subdebug } from '@sanity/cli-core';
5
5
  import { pack } from 'tar-fs';
6
6
  import { getWorkbenchUrl } from '../../services/applications.js';
7
7
  import { createConfig, resolveSingletonInstallationId } from '../../services/installations.js';
8
- import { summarizeExposeGroup } from './buildExposes.js';
8
+ import { summarizeExposeGroup } from './summarizeInterfaces.js';
9
9
  const debug = subdebug('deploy');
10
10
  /**
11
11
  * The org's active installation for an app type, or `undefined` when none is
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/actions/deploy/deployConfig.ts"],"sourcesContent":["import {basename, dirname} from 'node:path'\nimport {styleText} from 'node:util'\nimport {createGzip} from 'node:zlib'\n\nimport {type Output, subdebug} from '@sanity/cli-core'\nimport {pack} from 'tar-fs'\n\nimport {getWorkbenchUrl} from '../../services/applications.js'\nimport {createConfig, resolveSingletonInstallationId} from '../../services/installations.js'\nimport {summarizeExposeGroup} from './buildExposes.js'\n\nconst debug = subdebug('deploy')\n\n/**\n * The org's active installation for an app type, or `undefined` when none is\n * installed. Read-only, so `--dry-run` can report deployability.\n * @internal\n */\nexport async function resolveInstallationId(options: {\n appType: string\n organizationId: string\n}): Promise<string | undefined> {\n switch (options.appType) {\n case 'media-library': {\n return resolveSingletonInstallationId(options.organizationId, 'media-library')\n }\n default: {\n throw new Error(`Cannot create config for unknown app type: ${options.appType}`)\n }\n }\n}\n\n/**\n * A report heading and item list for a config; a media library's `fields` are\n * one of potentially many shapes.\n * @internal\n */\nexport function summarizeConfig(config: {\n appType: string\n fields: {name: string; src: string; title: string}[]\n}): string {\n switch (config.appType) {\n case 'media-library': {\n return summarizeExposeGroup('Media library fields', config.fields)\n }\n default: {\n throw new Error(`Cannot create config for unknown app type: ${config.appType}`)\n }\n }\n}\n\n/**\n * Upload the built module-federation remote to the installation as its config\n * snapshot. `installationId` is resolved by the caller so `--dry-run` never\n * reaches this mutating step.\n * @internal\n */\nexport async function deployConfig(options: {\n appType: string\n installationId: string\n organizationId: string\n output: Output\n sourceDir: string\n version: string\n}): Promise<void> {\n const {appType, installationId, organizationId, output, sourceDir, version} = options\n const tarball = pack(dirname(sourceDir), {entries: [basename(sourceDir)]}).pipe(createGzip())\n await createConfig(installationId, {tarball, version})\n\n debug('Deployed config for app type: %s', appType)\n const url = getWorkbenchUrl(organizationId)\n output.log(`\\n🚀 ${styleText('bold', 'Success!')} Config deployed to ${styleText('cyan', url)}`)\n}\n"],"names":["basename","dirname","styleText","createGzip","subdebug","pack","getWorkbenchUrl","createConfig","resolveSingletonInstallationId","summarizeExposeGroup","debug","resolveInstallationId","options","appType","organizationId","Error","summarizeConfig","config","fields","deployConfig","installationId","output","sourceDir","version","tarball","entries","pipe","url","log"],"mappings":"AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,YAAW;AAC3C,SAAQC,SAAS,QAAO,YAAW;AACnC,SAAQC,UAAU,QAAO,YAAW;AAEpC,SAAqBC,QAAQ,QAAO,mBAAkB;AACtD,SAAQC,IAAI,QAAO,SAAQ;AAE3B,SAAQC,eAAe,QAAO,iCAAgC;AAC9D,SAAQC,YAAY,EAAEC,8BAA8B,QAAO,kCAAiC;AAC5F,SAAQC,oBAAoB,QAAO,oBAAmB;AAEtD,MAAMC,QAAQN,SAAS;AAEvB;;;;CAIC,GACD,OAAO,eAAeO,sBAAsBC,OAG3C;IACC,OAAQA,QAAQC,OAAO;QACrB,KAAK;YAAiB;gBACpB,OAAOL,+BAA+BI,QAAQE,cAAc,EAAE;YAChE;QACA;YAAS;gBACP,MAAM,IAAIC,MAAM,CAAC,2CAA2C,EAAEH,QAAQC,OAAO,EAAE;YACjF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASG,gBAAgBC,MAG/B;IACC,OAAQA,OAAOJ,OAAO;QACpB,KAAK;YAAiB;gBACpB,OAAOJ,qBAAqB,wBAAwBQ,OAAOC,MAAM;YACnE;QACA;YAAS;gBACP,MAAM,IAAIH,MAAM,CAAC,2CAA2C,EAAEE,OAAOJ,OAAO,EAAE;YAChF;IACF;AACF;AAEA;;;;;CAKC,GACD,OAAO,eAAeM,aAAaP,OAOlC;IACC,MAAM,EAACC,OAAO,EAAEO,cAAc,EAAEN,cAAc,EAAEO,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAC,GAAGX;IAC9E,MAAMY,UAAUnB,KAAKJ,QAAQqB,YAAY;QAACG,SAAS;YAACzB,SAASsB;SAAW;IAAA,GAAGI,IAAI,CAACvB;IAChF,MAAMI,aAAaa,gBAAgB;QAACI;QAASD;IAAO;IAEpDb,MAAM,oCAAoCG;IAC1C,MAAMc,MAAMrB,gBAAgBQ;IAC5BO,OAAOO,GAAG,CAAC,CAAC,KAAK,EAAE1B,UAAU,QAAQ,YAAY,oBAAoB,EAAEA,UAAU,QAAQyB,MAAM;AACjG"}
1
+ {"version":3,"sources":["../../../src/actions/deploy/deployConfig.ts"],"sourcesContent":["import {basename, dirname} from 'node:path'\nimport {styleText} from 'node:util'\nimport {createGzip} from 'node:zlib'\n\nimport {type Output, subdebug} from '@sanity/cli-core'\nimport {pack} from 'tar-fs'\n\nimport {getWorkbenchUrl} from '../../services/applications.js'\nimport {createConfig, resolveSingletonInstallationId} from '../../services/installations.js'\nimport {summarizeExposeGroup} from './summarizeInterfaces.js'\n\nconst debug = subdebug('deploy')\n\n/**\n * The org's active installation for an app type, or `undefined` when none is\n * installed. Read-only, so `--dry-run` can report deployability.\n * @internal\n */\nexport async function resolveInstallationId(options: {\n appType: string\n organizationId: string\n}): Promise<string | undefined> {\n switch (options.appType) {\n case 'media-library': {\n return resolveSingletonInstallationId(options.organizationId, 'media-library')\n }\n default: {\n throw new Error(`Cannot create config for unknown app type: ${options.appType}`)\n }\n }\n}\n\n/**\n * A report heading and item list for a config; a media library's `fields` are\n * one of potentially many shapes.\n * @internal\n */\nexport function summarizeConfig(config: {\n appType: string\n fields: {name: string; src: string; title: string}[]\n}): string {\n switch (config.appType) {\n case 'media-library': {\n return summarizeExposeGroup('Media library fields', config.fields)\n }\n default: {\n throw new Error(`Cannot create config for unknown app type: ${config.appType}`)\n }\n }\n}\n\n/**\n * Upload the built module-federation remote to the installation as its config\n * snapshot. `installationId` is resolved by the caller so `--dry-run` never\n * reaches this mutating step.\n * @internal\n */\nexport async function deployConfig(options: {\n appType: string\n installationId: string\n organizationId: string\n output: Output\n sourceDir: string\n version: string\n}): Promise<void> {\n const {appType, installationId, organizationId, output, sourceDir, version} = options\n const tarball = pack(dirname(sourceDir), {entries: [basename(sourceDir)]}).pipe(createGzip())\n await createConfig(installationId, {tarball, version})\n\n debug('Deployed config for app type: %s', appType)\n const url = getWorkbenchUrl(organizationId)\n output.log(`\\n🚀 ${styleText('bold', 'Success!')} Config deployed to ${styleText('cyan', url)}`)\n}\n"],"names":["basename","dirname","styleText","createGzip","subdebug","pack","getWorkbenchUrl","createConfig","resolveSingletonInstallationId","summarizeExposeGroup","debug","resolveInstallationId","options","appType","organizationId","Error","summarizeConfig","config","fields","deployConfig","installationId","output","sourceDir","version","tarball","entries","pipe","url","log"],"mappings":"AAAA,SAAQA,QAAQ,EAAEC,OAAO,QAAO,YAAW;AAC3C,SAAQC,SAAS,QAAO,YAAW;AACnC,SAAQC,UAAU,QAAO,YAAW;AAEpC,SAAqBC,QAAQ,QAAO,mBAAkB;AACtD,SAAQC,IAAI,QAAO,SAAQ;AAE3B,SAAQC,eAAe,QAAO,iCAAgC;AAC9D,SAAQC,YAAY,EAAEC,8BAA8B,QAAO,kCAAiC;AAC5F,SAAQC,oBAAoB,QAAO,2BAA0B;AAE7D,MAAMC,QAAQN,SAAS;AAEvB;;;;CAIC,GACD,OAAO,eAAeO,sBAAsBC,OAG3C;IACC,OAAQA,QAAQC,OAAO;QACrB,KAAK;YAAiB;gBACpB,OAAOL,+BAA+BI,QAAQE,cAAc,EAAE;YAChE;QACA;YAAS;gBACP,MAAM,IAAIC,MAAM,CAAC,2CAA2C,EAAEH,QAAQC,OAAO,EAAE;YACjF;IACF;AACF;AAEA;;;;CAIC,GACD,OAAO,SAASG,gBAAgBC,MAG/B;IACC,OAAQA,OAAOJ,OAAO;QACpB,KAAK;YAAiB;gBACpB,OAAOJ,qBAAqB,wBAAwBQ,OAAOC,MAAM;YACnE;QACA;YAAS;gBACP,MAAM,IAAIH,MAAM,CAAC,2CAA2C,EAAEE,OAAOJ,OAAO,EAAE;YAChF;IACF;AACF;AAEA;;;;;CAKC,GACD,OAAO,eAAeM,aAAaP,OAOlC;IACC,MAAM,EAACC,OAAO,EAAEO,cAAc,EAAEN,cAAc,EAAEO,MAAM,EAAEC,SAAS,EAAEC,OAAO,EAAC,GAAGX;IAC9E,MAAMY,UAAUnB,KAAKJ,QAAQqB,YAAY;QAACG,SAAS;YAACzB,SAASsB;SAAW;IAAA,GAAGI,IAAI,CAACvB;IAChF,MAAMI,aAAaa,gBAAgB;QAACI;QAASD;IAAO;IAEpDb,MAAM,oCAAoCG;IAC1C,MAAMc,MAAMrB,gBAAgBQ;IAC5BO,OAAOO,GAAG,CAAC,CAAC,KAAK,EAAE1B,UAAU,QAAQ,YAAY,oBAAoB,EAAEA,UAAU,QAAQyB,MAAM;AACjG"}