@sanity/blueprints 0.34.1 → 0.35.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/dist/definers/agents.d.ts +3 -1
- package/dist/definers/agents.js +3 -1
- package/dist/definers/agents.js.map +1 -1
- package/dist/definers/applications.d.ts +30 -18
- package/dist/definers/applications.js +30 -18
- package/dist/definers/applications.js.map +1 -1
- package/dist/definers/blueprints.d.ts +1 -0
- package/dist/definers/blueprints.js +1 -25
- package/dist/definers/blueprints.js.map +1 -1
- package/dist/definers/context.d.ts +6 -2
- package/dist/definers/context.js +6 -2
- package/dist/definers/context.js.map +1 -1
- package/dist/definers/cors.d.ts +11 -1
- package/dist/definers/cors.js +10 -12
- package/dist/definers/cors.js.map +1 -1
- package/dist/definers/datasets.d.ts +12 -2
- package/dist/definers/datasets.js +11 -14
- package/dist/definers/datasets.js.map +1 -1
- package/dist/definers/functions/document.d.ts +30 -0
- package/dist/definers/functions/document.js.map +1 -1
- package/dist/definers/functions/durable.d.ts +4 -3
- package/dist/definers/functions/durable.js +4 -3
- package/dist/definers/functions/durable.js.map +1 -1
- package/dist/definers/functions/media-library.d.ts +31 -0
- package/dist/definers/functions/media-library.js +18 -19
- package/dist/definers/functions/media-library.js.map +1 -1
- package/dist/definers/functions/pubsub.d.ts +2 -3
- package/dist/definers/functions/pubsub.js +2 -3
- package/dist/definers/functions/pubsub.js.map +1 -1
- package/dist/definers/functions/queue.d.ts +15 -4
- package/dist/definers/functions/queue.js +19 -6
- package/dist/definers/functions/queue.js.map +1 -1
- package/dist/definers/functions/scheduled.d.ts +7 -6
- package/dist/definers/functions/scheduled.js +7 -6
- package/dist/definers/functions/scheduled.js.map +1 -1
- package/dist/definers/functions/sync-tag-invalidate.d.ts +5 -2
- package/dist/definers/functions/sync-tag-invalidate.js +5 -2
- package/dist/definers/functions/sync-tag-invalidate.js.map +1 -1
- package/dist/definers/installation-config.d.ts +4 -2
- package/dist/definers/installation-config.js +4 -2
- package/dist/definers/installation-config.js.map +1 -1
- package/dist/definers/permissions.d.ts +8 -2
- package/dist/definers/permissions.js +8 -2
- package/dist/definers/permissions.js.map +1 -1
- package/dist/definers/projects.d.ts +3 -4
- package/dist/definers/projects.js +3 -4
- package/dist/definers/projects.js.map +1 -1
- package/dist/definers/resources.d.ts +1 -0
- package/dist/definers/resources.js +1 -11
- package/dist/definers/resources.js.map +1 -1
- package/dist/definers/robotTokens.d.ts +22 -3
- package/dist/definers/robotTokens.js +17 -18
- package/dist/definers/robotTokens.js.map +1 -1
- package/dist/definers/roles.d.ts +53 -5
- package/dist/definers/roles.js +38 -40
- package/dist/definers/roles.js.map +1 -1
- package/dist/definers/studios.d.ts +5 -3
- package/dist/definers/studios.js +5 -3
- package/dist/definers/studios.js.map +1 -1
- package/dist/definers/webhooks.d.ts +19 -1
- package/dist/definers/webhooks.js +15 -17
- package/dist/definers/webhooks.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +19 -20
- package/dist/index.js.map +1 -1
- package/dist/resolve/index.d.ts +2 -3
- package/dist/resolve/index.js +2 -3
- package/dist/resolve/index.js.map +1 -1
- package/dist/types/agents.d.ts +7 -3
- package/dist/types/applications.d.ts +67 -49
- package/dist/types/applications.js +9 -6
- package/dist/types/applications.js.map +1 -1
- package/dist/types/context.d.ts +17 -7
- package/dist/types/cors.d.ts +0 -2
- package/dist/types/datasets.d.ts +0 -6
- package/dist/types/functions/index.d.ts +64 -14
- package/dist/types/functions/index.js +2 -1
- package/dist/types/functions/index.js.map +1 -1
- package/dist/types/installation-config.d.ts +13 -10
- package/dist/types/permissions.d.ts +8 -4
- package/dist/types/projects.d.ts +5 -4
- package/dist/types/robotTokens.d.ts +0 -3
- package/dist/types/roles.d.ts +0 -4
- package/dist/types/studios.d.ts +28 -13
- package/dist/types/studios.js +3 -2
- package/dist/types/studios.js.map +1 -1
- package/dist/types/webhooks.d.ts +0 -3
- package/dist/utils/debounce.d.ts +0 -11
- package/dist/utils/debounce.js +0 -22
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/parse-duration.d.ts +13 -0
- package/dist/utils/parse-duration.js +24 -0
- package/dist/utils/parse-duration.js.map +1 -1
- package/dist/utils/throttle.d.ts +9 -0
- package/dist/utils/throttle.js +22 -0
- package/dist/utils/throttle.js.map +1 -0
- package/dist/validation/applications.js +7 -2
- package/dist/validation/applications.js.map +1 -1
- package/dist/validation/functions.d.ts +10 -0
- package/dist/validation/functions.js +112 -12
- package/dist/validation/functions.js.map +1 -1
- package/dist/validation/projects.js +3 -0
- package/dist/validation/projects.js.map +1 -1
- package/dist/validation/studios.js +4 -0
- package/dist/validation/studios.js.map +1 -1
- package/package.json +1 -1
- package/src/definers/agents.ts +3 -1
- package/src/definers/applications.ts +30 -18
- package/src/definers/blueprints.ts +1 -25
- package/src/definers/context.ts +6 -2
- package/src/definers/cors.ts +10 -12
- package/src/definers/datasets.ts +11 -14
- package/src/definers/functions/document.ts +17 -24
- package/src/definers/functions/durable.ts +4 -3
- package/src/definers/functions/media-library.ts +18 -19
- package/src/definers/functions/pubsub.ts +2 -3
- package/src/definers/functions/queue.ts +19 -6
- package/src/definers/functions/scheduled.ts +7 -6
- package/src/definers/functions/sync-tag-invalidate.ts +5 -2
- package/src/definers/installation-config.ts +4 -2
- package/src/definers/permissions.ts +8 -2
- package/src/definers/projects.ts +3 -4
- package/src/definers/resources.ts +1 -11
- package/src/definers/robotTokens.ts +17 -18
- package/src/definers/roles.ts +38 -40
- package/src/definers/studios.ts +5 -3
- package/src/definers/webhooks.ts +15 -17
- package/src/index.ts +20 -21
- package/src/resolve/index.ts +2 -4
- package/src/types/agents.ts +7 -3
- package/src/types/applications.ts +67 -49
- package/src/types/context.ts +17 -7
- package/src/types/cors.ts +0 -2
- package/src/types/datasets.ts +0 -6
- package/src/types/functions/index.ts +67 -14
- package/src/types/installation-config.ts +13 -10
- package/src/types/permissions.ts +8 -4
- package/src/types/projects.ts +6 -4
- package/src/types/robotTokens.ts +0 -3
- package/src/types/roles.ts +0 -4
- package/src/types/studios.ts +28 -13
- package/src/types/webhooks.ts +0 -3
- package/src/utils/debounce.ts +0 -25
- package/src/utils/parse-duration.ts +27 -0
- package/src/utils/throttle.ts +25 -0
- package/src/validation/applications.ts +6 -2
- package/src/validation/functions.ts +123 -12
- package/src/validation/projects.ts +4 -0
- package/src/validation/studios.ts +3 -0
|
@@ -2,6 +2,8 @@ import { type BlueprintAgentConfig, type BlueprintAgentResource } from '../index
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines an Agent to be managed in a Blueprint.
|
|
4
4
|
*
|
|
5
|
+
* Deploying Agents via Blueprints is experimental. This feature is subject to breaking changes.
|
|
6
|
+
*
|
|
5
7
|
* @remarks
|
|
6
8
|
* `model` is required; its `apiKey` is passed by reference and resolved at blueprint-eval time.
|
|
7
9
|
*
|
|
@@ -34,7 +36,7 @@ import { type BlueprintAgentConfig, type BlueprintAgentResource } from '../index
|
|
|
34
36
|
* })
|
|
35
37
|
* ```
|
|
36
38
|
* @param config The agent configuration
|
|
37
|
-
* @alpha
|
|
39
|
+
* @alpha
|
|
38
40
|
* @hidden
|
|
39
41
|
* @category Definers
|
|
40
42
|
* @expandType BlueprintAgentConfig
|
package/dist/definers/agents.js
CHANGED
|
@@ -3,6 +3,8 @@ import { runValidation } from '../utils/validation.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines an Agent to be managed in a Blueprint.
|
|
5
5
|
*
|
|
6
|
+
* Deploying Agents via Blueprints is experimental. This feature is subject to breaking changes.
|
|
7
|
+
*
|
|
6
8
|
* @remarks
|
|
7
9
|
* `model` is required; its `apiKey` is passed by reference and resolved at blueprint-eval time.
|
|
8
10
|
*
|
|
@@ -35,7 +37,7 @@ import { runValidation } from '../utils/validation.js';
|
|
|
35
37
|
* })
|
|
36
38
|
* ```
|
|
37
39
|
* @param config The agent configuration
|
|
38
|
-
* @alpha
|
|
40
|
+
* @alpha
|
|
39
41
|
* @hidden
|
|
40
42
|
* @category Definers
|
|
41
43
|
* @expandType BlueprintAgentConfig
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/definers/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,aAAa,EAAC,MAAM,aAAa,CAAA;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/definers/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,aAAa,EAAC,MAAM,aAAa,CAAA;AACjG,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,WAAW,CAAC,MAA4B;IACtD,MAAM,EAAC,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,EAAC,GAAG,MAAM,CAAA;IAEnC,MAAM,aAAa,GAA2B;QAC5C,GAAG,IAAI;QACP,IAAI;QACJ,IAAI,EAAE,cAAc;QACpB,GAAG,EAAE,GAAG,IAAI,UAAU,IAAI,EAAE;KAC7B,CAAA;IAED,aAAa,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAA;IAEjD,OAAO,aAAa,CAAA;AACtB,CAAC"}
|
|
@@ -3,6 +3,9 @@ import { type BlueprintApplicationConfig, type BlueprintApplicationResource, typ
|
|
|
3
3
|
* Defines a window view — the navigable, full-page view of an application.
|
|
4
4
|
* An application may declare at most one window view.
|
|
5
5
|
*
|
|
6
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
6
9
|
* ```ts
|
|
7
10
|
* defineWindowView({
|
|
8
11
|
* name: 'main',
|
|
@@ -22,16 +25,18 @@ import { type BlueprintApplicationConfig, type BlueprintApplicationResource, typ
|
|
|
22
25
|
* ```
|
|
23
26
|
* @param config The window view configuration
|
|
24
27
|
* @public
|
|
25
|
-
* @beta
|
|
26
|
-
* @category
|
|
28
|
+
* @beta
|
|
29
|
+
* @category Application Children
|
|
27
30
|
* @expandType BlueprintWindowViewConfig
|
|
28
31
|
* @returns The window view declaration
|
|
29
|
-
* @hidden
|
|
30
32
|
*/
|
|
31
33
|
export declare function defineWindowView(config: Omit<BlueprintWindowViewConfig, 'surface' | 'type'>): BlueprintWindowViewConfig;
|
|
32
34
|
/**
|
|
33
35
|
* Defines a panel view — renders in the dock.
|
|
34
36
|
*
|
|
37
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
35
40
|
* ```ts
|
|
36
41
|
* definePanelView({
|
|
37
42
|
* name: 'side',
|
|
@@ -41,16 +46,18 @@ export declare function defineWindowView(config: Omit<BlueprintWindowViewConfig,
|
|
|
41
46
|
* ```
|
|
42
47
|
* @param config The panel view configuration
|
|
43
48
|
* @public
|
|
44
|
-
* @beta
|
|
45
|
-
* @category
|
|
49
|
+
* @beta
|
|
50
|
+
* @category Application Children
|
|
46
51
|
* @expandType BlueprintPanelViewConfig
|
|
47
52
|
* @returns The panel view declaration
|
|
48
|
-
* @hidden
|
|
49
53
|
*/
|
|
50
54
|
export declare function definePanelView(config: Omit<BlueprintPanelViewConfig, 'surface' | 'type'>): BlueprintPanelViewConfig;
|
|
51
55
|
/**
|
|
52
56
|
* Defines an asset source view — contributes an asset source.
|
|
53
57
|
*
|
|
58
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
54
61
|
* ```ts
|
|
55
62
|
* defineAssetSourceView({
|
|
56
63
|
* name: 'image-picker',
|
|
@@ -60,16 +67,18 @@ export declare function definePanelView(config: Omit<BlueprintPanelViewConfig, '
|
|
|
60
67
|
* ```
|
|
61
68
|
* @param config The asset source view configuration
|
|
62
69
|
* @public
|
|
63
|
-
* @beta
|
|
64
|
-
* @category
|
|
70
|
+
* @beta
|
|
71
|
+
* @category Application Children
|
|
65
72
|
* @expandType BlueprintAssetSourceViewConfig
|
|
66
73
|
* @returns The asset source view declaration
|
|
67
|
-
* @hidden
|
|
68
74
|
*/
|
|
69
75
|
export declare function defineAssetSourceView(config: Omit<BlueprintAssetSourceViewConfig, 'surface' | 'type'>): BlueprintAssetSourceViewConfig;
|
|
70
76
|
/**
|
|
71
77
|
* Defines a tile view — docks on the dashboard with a footprint `size`.
|
|
72
78
|
*
|
|
79
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
73
82
|
* ```ts
|
|
74
83
|
* defineTileView({
|
|
75
84
|
* name: 'jump-back-in',
|
|
@@ -80,16 +89,18 @@ export declare function defineAssetSourceView(config: Omit<BlueprintAssetSourceV
|
|
|
80
89
|
* ```
|
|
81
90
|
* @param config The tile view configuration
|
|
82
91
|
* @public
|
|
83
|
-
* @beta
|
|
84
|
-
* @category
|
|
92
|
+
* @beta
|
|
93
|
+
* @category Application Children
|
|
85
94
|
* @expandType BlueprintTileViewConfig
|
|
86
95
|
* @returns The tile view declaration
|
|
87
|
-
* @hidden
|
|
88
96
|
*/
|
|
89
97
|
export declare function defineTileView(config: Omit<BlueprintTileViewConfig, 'surface' | 'type'>): BlueprintTileViewConfig;
|
|
90
98
|
/**
|
|
91
99
|
* Defines a background web worker an application runs.
|
|
92
100
|
*
|
|
101
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
93
104
|
* ```ts
|
|
94
105
|
* defineWebWorker({
|
|
95
106
|
* name: 'background-refresh',
|
|
@@ -99,16 +110,17 @@ export declare function defineTileView(config: Omit<BlueprintTileViewConfig, 'su
|
|
|
99
110
|
* ```
|
|
100
111
|
* @param config The web worker configuration
|
|
101
112
|
* @public
|
|
102
|
-
* @beta
|
|
103
|
-
* @category
|
|
113
|
+
* @beta
|
|
114
|
+
* @category Application Children
|
|
104
115
|
* @expandType BlueprintWebWorkerConfig
|
|
105
116
|
* @returns The web worker declaration
|
|
106
|
-
* @hidden
|
|
107
117
|
*/
|
|
108
118
|
export declare function defineWebWorker(config: BlueprintWebWorkerConfig): BlueprintWebWorker;
|
|
109
119
|
/**
|
|
110
120
|
* Defines an application.
|
|
111
121
|
*
|
|
122
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
123
|
+
*
|
|
112
124
|
* @remarks
|
|
113
125
|
* Views are authored in `views` and web workers in `webWorkers`, mirroring the
|
|
114
126
|
* emitted resource. Views are discriminated by `surface` (`window`, `panel`,
|
|
@@ -117,6 +129,7 @@ export declare function defineWebWorker(config: BlueprintWebWorkerConfig): Bluep
|
|
|
117
129
|
* surface, and at most one `window` view. Every view and web worker `src` is
|
|
118
130
|
* resolved relative to `root`. The `slug` defaults to the resource `name`.
|
|
119
131
|
*
|
|
132
|
+
* @example
|
|
120
133
|
* ```ts
|
|
121
134
|
* defineApplication({
|
|
122
135
|
* name: 'design-retro',
|
|
@@ -135,7 +148,7 @@ export declare function defineWebWorker(config: BlueprintWebWorkerConfig): Bluep
|
|
|
135
148
|
* title: 'Design Retro',
|
|
136
149
|
* root: './apps/design-retro',
|
|
137
150
|
* slug: 'design-retro',
|
|
138
|
-
* icon: './src/icons/app-icon.
|
|
151
|
+
* icon: './src/icons/app-icon.png',
|
|
139
152
|
* visibility: 'unlisted',
|
|
140
153
|
* views: [
|
|
141
154
|
* defineWindowView({
|
|
@@ -155,10 +168,9 @@ export declare function defineWebWorker(config: BlueprintWebWorkerConfig): Bluep
|
|
|
155
168
|
* ```
|
|
156
169
|
* @param config The application configuration
|
|
157
170
|
* @public
|
|
158
|
-
* @beta
|
|
171
|
+
* @beta
|
|
159
172
|
* @category Definers
|
|
160
173
|
* @expandType BlueprintApplicationConfig
|
|
161
174
|
* @returns The application resource
|
|
162
|
-
* @hidden
|
|
163
175
|
*/
|
|
164
176
|
export declare function defineApplication(config: BlueprintApplicationConfig): BlueprintApplicationResource;
|
|
@@ -20,6 +20,9 @@ function viewConfigToResource(view) {
|
|
|
20
20
|
* Defines a window view — the navigable, full-page view of an application.
|
|
21
21
|
* An application may declare at most one window view.
|
|
22
22
|
*
|
|
23
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
23
26
|
* ```ts
|
|
24
27
|
* defineWindowView({
|
|
25
28
|
* name: 'main',
|
|
@@ -39,11 +42,10 @@ function viewConfigToResource(view) {
|
|
|
39
42
|
* ```
|
|
40
43
|
* @param config The window view configuration
|
|
41
44
|
* @public
|
|
42
|
-
* @beta
|
|
43
|
-
* @category
|
|
45
|
+
* @beta
|
|
46
|
+
* @category Application Children
|
|
44
47
|
* @expandType BlueprintWindowViewConfig
|
|
45
48
|
* @returns The window view declaration
|
|
46
|
-
* @hidden
|
|
47
49
|
*/
|
|
48
50
|
export function defineWindowView(config) {
|
|
49
51
|
const view = { ...config, surface: 'window', type: 'view' };
|
|
@@ -53,6 +55,9 @@ export function defineWindowView(config) {
|
|
|
53
55
|
/**
|
|
54
56
|
* Defines a panel view — renders in the dock.
|
|
55
57
|
*
|
|
58
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
56
61
|
* ```ts
|
|
57
62
|
* definePanelView({
|
|
58
63
|
* name: 'side',
|
|
@@ -62,11 +67,10 @@ export function defineWindowView(config) {
|
|
|
62
67
|
* ```
|
|
63
68
|
* @param config The panel view configuration
|
|
64
69
|
* @public
|
|
65
|
-
* @beta
|
|
66
|
-
* @category
|
|
70
|
+
* @beta
|
|
71
|
+
* @category Application Children
|
|
67
72
|
* @expandType BlueprintPanelViewConfig
|
|
68
73
|
* @returns The panel view declaration
|
|
69
|
-
* @hidden
|
|
70
74
|
*/
|
|
71
75
|
export function definePanelView(config) {
|
|
72
76
|
const view = { ...config, surface: 'panel', type: 'view' };
|
|
@@ -76,6 +80,9 @@ export function definePanelView(config) {
|
|
|
76
80
|
/**
|
|
77
81
|
* Defines an asset source view — contributes an asset source.
|
|
78
82
|
*
|
|
83
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
79
86
|
* ```ts
|
|
80
87
|
* defineAssetSourceView({
|
|
81
88
|
* name: 'image-picker',
|
|
@@ -85,11 +92,10 @@ export function definePanelView(config) {
|
|
|
85
92
|
* ```
|
|
86
93
|
* @param config The asset source view configuration
|
|
87
94
|
* @public
|
|
88
|
-
* @beta
|
|
89
|
-
* @category
|
|
95
|
+
* @beta
|
|
96
|
+
* @category Application Children
|
|
90
97
|
* @expandType BlueprintAssetSourceViewConfig
|
|
91
98
|
* @returns The asset source view declaration
|
|
92
|
-
* @hidden
|
|
93
99
|
*/
|
|
94
100
|
export function defineAssetSourceView(config) {
|
|
95
101
|
const view = { ...config, surface: 'asset-source', type: 'view' };
|
|
@@ -99,6 +105,9 @@ export function defineAssetSourceView(config) {
|
|
|
99
105
|
/**
|
|
100
106
|
* Defines a tile view — docks on the dashboard with a footprint `size`.
|
|
101
107
|
*
|
|
108
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
102
111
|
* ```ts
|
|
103
112
|
* defineTileView({
|
|
104
113
|
* name: 'jump-back-in',
|
|
@@ -109,11 +118,10 @@ export function defineAssetSourceView(config) {
|
|
|
109
118
|
* ```
|
|
110
119
|
* @param config The tile view configuration
|
|
111
120
|
* @public
|
|
112
|
-
* @beta
|
|
113
|
-
* @category
|
|
121
|
+
* @beta
|
|
122
|
+
* @category Application Children
|
|
114
123
|
* @expandType BlueprintTileViewConfig
|
|
115
124
|
* @returns The tile view declaration
|
|
116
|
-
* @hidden
|
|
117
125
|
*/
|
|
118
126
|
export function defineTileView(config) {
|
|
119
127
|
const view = { ...config, surface: 'tile', type: 'view' };
|
|
@@ -123,6 +131,9 @@ export function defineTileView(config) {
|
|
|
123
131
|
/**
|
|
124
132
|
* Defines a background web worker an application runs.
|
|
125
133
|
*
|
|
134
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
126
137
|
* ```ts
|
|
127
138
|
* defineWebWorker({
|
|
128
139
|
* name: 'background-refresh',
|
|
@@ -132,11 +143,10 @@ export function defineTileView(config) {
|
|
|
132
143
|
* ```
|
|
133
144
|
* @param config The web worker configuration
|
|
134
145
|
* @public
|
|
135
|
-
* @beta
|
|
136
|
-
* @category
|
|
146
|
+
* @beta
|
|
147
|
+
* @category Application Children
|
|
137
148
|
* @expandType BlueprintWebWorkerConfig
|
|
138
149
|
* @returns The web worker declaration
|
|
139
|
-
* @hidden
|
|
140
150
|
*/
|
|
141
151
|
export function defineWebWorker(config) {
|
|
142
152
|
const worker = { ...config, type: 'worker' };
|
|
@@ -146,6 +156,8 @@ export function defineWebWorker(config) {
|
|
|
146
156
|
/**
|
|
147
157
|
* Defines an application.
|
|
148
158
|
*
|
|
159
|
+
* Deploying Applications via Blueprints is experimental. This may be subject to breaking changes.
|
|
160
|
+
*
|
|
149
161
|
* @remarks
|
|
150
162
|
* Views are authored in `views` and web workers in `webWorkers`, mirroring the
|
|
151
163
|
* emitted resource. Views are discriminated by `surface` (`window`, `panel`,
|
|
@@ -154,6 +166,7 @@ export function defineWebWorker(config) {
|
|
|
154
166
|
* surface, and at most one `window` view. Every view and web worker `src` is
|
|
155
167
|
* resolved relative to `root`. The `slug` defaults to the resource `name`.
|
|
156
168
|
*
|
|
169
|
+
* @example
|
|
157
170
|
* ```ts
|
|
158
171
|
* defineApplication({
|
|
159
172
|
* name: 'design-retro',
|
|
@@ -172,7 +185,7 @@ export function defineWebWorker(config) {
|
|
|
172
185
|
* title: 'Design Retro',
|
|
173
186
|
* root: './apps/design-retro',
|
|
174
187
|
* slug: 'design-retro',
|
|
175
|
-
* icon: './src/icons/app-icon.
|
|
188
|
+
* icon: './src/icons/app-icon.png',
|
|
176
189
|
* visibility: 'unlisted',
|
|
177
190
|
* views: [
|
|
178
191
|
* defineWindowView({
|
|
@@ -192,11 +205,10 @@ export function defineWebWorker(config) {
|
|
|
192
205
|
* ```
|
|
193
206
|
* @param config The application configuration
|
|
194
207
|
* @public
|
|
195
|
-
* @beta
|
|
208
|
+
* @beta
|
|
196
209
|
* @category Definers
|
|
197
210
|
* @expandType BlueprintApplicationConfig
|
|
198
211
|
* @returns The application resource
|
|
199
|
-
* @hidden
|
|
200
212
|
*/
|
|
201
213
|
export function defineApplication(config) {
|
|
202
214
|
const { views, webWorkers, slug, ...rest } = config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applications.js","sourceRoot":"","sources":["../../src/definers/applications.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD,oEAAoE;AACpE,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,cAAc;IAC9B,IAAI,EAAE,MAAM;CACuE,CAAA;AAErF;;;GAGG;AACH,SAAS,oBAAoB,CAAC,IAAoC;IAChE,MAAM,EAAC,OAAO,EAAE,GAAG,IAAI,EAAC,GAAG,IAAI,CAAA;IAC/B,2EAA2E;IAC3E,OAAO,EAAC,GAAG,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,EAA6B,CAAA;AAC9E,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"applications.js","sourceRoot":"","sources":["../../src/definers/applications.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,33 +1,9 @@
|
|
|
1
1
|
import { validateBlueprint } from '../index.js';
|
|
2
2
|
import { runValidation } from '../utils/validation.js';
|
|
3
|
-
/*
|
|
4
|
-
* FUTURE example (move below @example when ready)
|
|
5
|
-
* @example With deployment API config
|
|
6
|
-
* ```ts
|
|
7
|
-
* defineBlueprint({
|
|
8
|
-
* resources: [
|
|
9
|
-
* defineCorsOrigin({
|
|
10
|
-
* name: 'cors-localhost',
|
|
11
|
-
* origin: 'http://localhost:3333'
|
|
12
|
-
* }),
|
|
13
|
-
* defineRole({
|
|
14
|
-
* name: 'role-ci',
|
|
15
|
-
* title: 'CI Role',
|
|
16
|
-
* appliesToRobots: true,
|
|
17
|
-
* permissions: []
|
|
18
|
-
* }),
|
|
19
|
-
* defineRobotToken({
|
|
20
|
-
* name: 'ci-robot',
|
|
21
|
-
* memberships: [{
|
|
22
|
-
* roleNames: ['$.resources.ci-role']}],
|
|
23
|
-
* }),
|
|
24
|
-
* ],
|
|
25
|
-
* })
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
3
|
/**
|
|
29
4
|
* Define a Blueprint to manage Sanity resources
|
|
30
5
|
*
|
|
6
|
+
* @example
|
|
31
7
|
* ```ts
|
|
32
8
|
* defineBlueprint({
|
|
33
9
|
* resources: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blueprints.js","sourceRoot":"","sources":["../../src/definers/blueprints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAC7G,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"blueprints.js","sourceRoot":"","sources":["../../src/definers/blueprints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiE,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAC7G,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,eAAe,CAAC,eAAkE;IAChG,MAAM,EAAC,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAC,GAAG,eAAe,CAAA;IAE1G,aAAa,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,EAAE,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAA;IAE3E,SAAS,SAAS;QAChB,OAAO;YACL,OAAO,EAAE,wEAAwE;YACjF,gBAAgB,EAAE,gBAAgB,IAAI,YAAY;YAClD,SAAS;YACT,MAAM;YACN,OAAO;SACR,CAAA;IACH,CAAC;IAED,SAAS,CAAC,cAAc,GAAG,cAAc,CAAA;IACzC,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;IAC/B,SAAS,CAAC,OAAO,GAAG,OAAO,CAAA;IAE3B,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { type BlueprintContextKnowledgeBaseConfig, type BlueprintContextKnowledg
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines a Context knowledge base.
|
|
4
4
|
*
|
|
5
|
+
* Deploying Context via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
6
|
+
*
|
|
5
7
|
* @remarks
|
|
6
8
|
* The blueprint must be scoped to an organization. A new knowledge base has no sources. Add sources in the Context API
|
|
7
9
|
* or the dashboard.
|
|
@@ -32,7 +34,7 @@ import { type BlueprintContextKnowledgeBaseConfig, type BlueprintContextKnowledg
|
|
|
32
34
|
* ```
|
|
33
35
|
* @param parameters The knowledge base configuration
|
|
34
36
|
* @public
|
|
35
|
-
* @beta
|
|
37
|
+
* @beta
|
|
36
38
|
* @category Definers
|
|
37
39
|
* @expandType BlueprintContextKnowledgeBaseConfig
|
|
38
40
|
* @returns The knowledge base resource
|
|
@@ -41,6 +43,8 @@ export declare function defineContextKnowledgeBase(parameters: BlueprintContextK
|
|
|
41
43
|
/**
|
|
42
44
|
* Defines a Context MCP endpoint that agents connect to.
|
|
43
45
|
*
|
|
46
|
+
* Deploying Context via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
47
|
+
*
|
|
44
48
|
* @remarks
|
|
45
49
|
* The blueprint must be scoped to an organization.
|
|
46
50
|
*
|
|
@@ -80,7 +84,7 @@ export declare function defineContextKnowledgeBase(parameters: BlueprintContextK
|
|
|
80
84
|
* ```
|
|
81
85
|
* @param parameters The MCP endpoint configuration
|
|
82
86
|
* @public
|
|
83
|
-
* @beta
|
|
87
|
+
* @beta
|
|
84
88
|
* @category Definers
|
|
85
89
|
* @expandType BlueprintContextMcpEndpointConfig
|
|
86
90
|
* @returns The MCP endpoint resource
|
package/dist/definers/context.js
CHANGED
|
@@ -3,6 +3,8 @@ import { runValidation } from '../utils/validation.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Defines a Context knowledge base.
|
|
5
5
|
*
|
|
6
|
+
* Deploying Context via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
7
|
+
*
|
|
6
8
|
* @remarks
|
|
7
9
|
* The blueprint must be scoped to an organization. A new knowledge base has no sources. Add sources in the Context API
|
|
8
10
|
* or the dashboard.
|
|
@@ -33,7 +35,7 @@ import { runValidation } from '../utils/validation.js';
|
|
|
33
35
|
* ```
|
|
34
36
|
* @param parameters The knowledge base configuration
|
|
35
37
|
* @public
|
|
36
|
-
* @beta
|
|
38
|
+
* @beta
|
|
37
39
|
* @category Definers
|
|
38
40
|
* @expandType BlueprintContextKnowledgeBaseConfig
|
|
39
41
|
* @returns The knowledge base resource
|
|
@@ -49,6 +51,8 @@ export function defineContextKnowledgeBase(parameters) {
|
|
|
49
51
|
/**
|
|
50
52
|
* Defines a Context MCP endpoint that agents connect to.
|
|
51
53
|
*
|
|
54
|
+
* Deploying Context via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
55
|
+
*
|
|
52
56
|
* @remarks
|
|
53
57
|
* The blueprint must be scoped to an organization.
|
|
54
58
|
*
|
|
@@ -88,7 +92,7 @@ export function defineContextKnowledgeBase(parameters) {
|
|
|
88
92
|
* ```
|
|
89
93
|
* @param parameters The MCP endpoint configuration
|
|
90
94
|
* @public
|
|
91
|
-
* @beta
|
|
95
|
+
* @beta
|
|
92
96
|
* @category Definers
|
|
93
97
|
* @expandType BlueprintContextMcpEndpointConfig
|
|
94
98
|
* @returns The MCP endpoint resource
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/definers/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/definers/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAA+C;IACxF,MAAM,qBAAqB,GAA0C;QACnE,GAAG,UAAU;QACb,IAAI,EAAE,+BAA+B;KACtC,CAAA;IAED,aAAa,CAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC,qBAAqB,CAAC,CAAC,CAAA;IAExE,OAAO,qBAAqB,CAAA;AAC9B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,UAAU,wBAAwB,CAAC,UAA6C;IACpF,MAAM,mBAAmB,GAAwC;QAC/D,GAAG,UAAU;QACb,IAAI,EAAE,oBAAoB;QAC1B,iGAAiG;QACjG,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;YACxC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAChC,MAAM,EAAE,IAAI,KAAK,+BAA+B,CAAC,CAAC,CAAC,EAAC,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC,IAAI,EAAE,EAAC,CAAC,CAAC,CAAC,MAAM,CACvH;YACH,CAAC,CAAC,UAAU,CAAC,OAAO;KACvB,CAAA;IAED,aAAa,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC,mBAAmB,CAAC,CAAC,CAAA;IAEpE,OAAO,mBAAmB,CAAA;AAC5B,CAAC"}
|
package/dist/definers/cors.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type BlueprintCorsOriginConfig, type BlueprintCorsOriginResource } from
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines a CORS Origin to be managed in a Blueprint.
|
|
4
4
|
*
|
|
5
|
+
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* defineCorsOrigin({
|
|
7
8
|
* name: 'my-cors-origin',
|
|
@@ -9,9 +10,18 @@ import { type BlueprintCorsOriginConfig, type BlueprintCorsOriginResource } from
|
|
|
9
10
|
* allowCredentials: true,
|
|
10
11
|
* })
|
|
11
12
|
* ```
|
|
13
|
+
*
|
|
14
|
+
* @example All options
|
|
15
|
+
* ```ts
|
|
16
|
+
* defineCorsOrigin({
|
|
17
|
+
* name: 'studio-cors',
|
|
18
|
+
* origin: 'https://my-studio.sanity.studio',
|
|
19
|
+
* allowCredentials: true,
|
|
20
|
+
* project: 'my-project-id',
|
|
21
|
+
* })
|
|
22
|
+
* ```
|
|
12
23
|
* @param parameters The CORS Origin configuration
|
|
13
24
|
* @public
|
|
14
|
-
* @beta Deploying CORS Origins via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
15
25
|
* @category Definers
|
|
16
26
|
* @expandType BlueprintCorsOriginConfig
|
|
17
27
|
* @returns The CORS Origin resource
|
package/dist/definers/cors.js
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
import { validateCorsOrigin } from '../index.js';
|
|
2
2
|
import { runValidation } from '../utils/validation.js';
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
/**
|
|
4
|
+
* Defines a CORS Origin to be managed in a Blueprint.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
6
7
|
* ```ts
|
|
7
8
|
* defineCorsOrigin({
|
|
8
|
-
* name: '
|
|
9
|
-
* origin: 'https://
|
|
9
|
+
* name: 'my-cors-origin',
|
|
10
|
+
* origin: 'https://mydomain.com',
|
|
10
11
|
* allowCredentials: true,
|
|
11
|
-
* project: 'my-project-id',
|
|
12
12
|
* })
|
|
13
13
|
* ```
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Defines a CORS Origin to be managed in a Blueprint.
|
|
17
14
|
*
|
|
15
|
+
* @example All options
|
|
18
16
|
* ```ts
|
|
19
17
|
* defineCorsOrigin({
|
|
20
|
-
* name: '
|
|
21
|
-
* origin: 'https://
|
|
18
|
+
* name: 'studio-cors',
|
|
19
|
+
* origin: 'https://my-studio.sanity.studio',
|
|
22
20
|
* allowCredentials: true,
|
|
21
|
+
* project: 'my-project-id',
|
|
23
22
|
* })
|
|
24
23
|
* ```
|
|
25
24
|
* @param parameters The CORS Origin configuration
|
|
26
25
|
* @public
|
|
27
|
-
* @beta Deploying CORS Origins via Blueprints is experimental. This feature is stabilizing but may still be subject to breaking changes.
|
|
28
26
|
* @category Definers
|
|
29
27
|
* @expandType BlueprintCorsOriginConfig
|
|
30
28
|
* @returns The CORS Origin resource
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cors.js","sourceRoot":"","sources":["../../src/definers/cors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmE,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAChH,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"cors.js","sourceRoot":"","sources":["../../src/definers/cors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmE,kBAAkB,EAAC,MAAM,aAAa,CAAA;AAChH,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAqC;IACpE,MAAM,YAAY,GAAgC;QAChD,GAAG,UAAU;QACb,gBAAgB,EAAE,UAAU,CAAC,gBAAgB,IAAI,KAAK;QACtD,IAAI,EAAE,qBAAqB;KAC5B,CAAA;IAED,aAAa,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAA;IAErD,OAAO,YAAY,CAAA;AACrB,CAAC"}
|
|
@@ -2,16 +2,26 @@ import { type BlueprintDatasetConfig, type BlueprintDatasetResource } from '../i
|
|
|
2
2
|
/**
|
|
3
3
|
* Defines a Dataset to be managed in a Blueprint.
|
|
4
4
|
*
|
|
5
|
+
* @example
|
|
5
6
|
* ```ts
|
|
6
7
|
* defineDataset({
|
|
7
8
|
* name: 'staging-dataset',
|
|
8
9
|
* datasetName: 'staging',
|
|
9
10
|
* })
|
|
10
11
|
* ```
|
|
12
|
+
*
|
|
13
|
+
* @example All options
|
|
14
|
+
* ```ts
|
|
15
|
+
* defineDataset({
|
|
16
|
+
* name: 'staging',
|
|
17
|
+
* datasetName: 'staging-v2',
|
|
18
|
+
* visibility: 'private',
|
|
19
|
+
* project: 'my-project-id',
|
|
20
|
+
* lifecycle: {deletionPolicy: 'protect'},
|
|
21
|
+
* })
|
|
22
|
+
* ```
|
|
11
23
|
* @param parameters The dataset configuration
|
|
12
24
|
* @public
|
|
13
|
-
* @alpha Deploying Datasets via Blueprints is experimental. This feature is subject to breaking changes.
|
|
14
|
-
* @hidden
|
|
15
25
|
* @category Definers
|
|
16
26
|
* @expandType BlueprintDatasetConfig
|
|
17
27
|
* @returns The dataset resource
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { validateDataset } from '../index.js';
|
|
2
2
|
import { runValidation } from '../utils/validation.js';
|
|
3
|
-
|
|
4
|
-
*
|
|
3
|
+
/**
|
|
4
|
+
* Defines a Dataset to be managed in a Blueprint.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* defineDataset({
|
|
9
|
+
* name: 'staging-dataset',
|
|
10
|
+
* datasetName: 'staging',
|
|
11
|
+
* })
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
5
14
|
* @example All options
|
|
6
15
|
* ```ts
|
|
7
16
|
* defineDataset({
|
|
@@ -12,20 +21,8 @@ import { runValidation } from '../utils/validation.js';
|
|
|
12
21
|
* lifecycle: {deletionPolicy: 'protect'},
|
|
13
22
|
* })
|
|
14
23
|
* ```
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Defines a Dataset to be managed in a Blueprint.
|
|
18
|
-
*
|
|
19
|
-
* ```ts
|
|
20
|
-
* defineDataset({
|
|
21
|
-
* name: 'staging-dataset',
|
|
22
|
-
* datasetName: 'staging',
|
|
23
|
-
* })
|
|
24
|
-
* ```
|
|
25
24
|
* @param parameters The dataset configuration
|
|
26
25
|
* @public
|
|
27
|
-
* @alpha Deploying Datasets via Blueprints is experimental. This feature is subject to breaking changes.
|
|
28
|
-
* @hidden
|
|
29
26
|
* @category Definers
|
|
30
27
|
* @expandType BlueprintDatasetConfig
|
|
31
28
|
* @returns The dataset resource
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../src/definers/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6D,eAAe,EAAC,MAAM,aAAa,CAAA;AACvG,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD
|
|
1
|
+
{"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../src/definers/datasets.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6D,eAAe,EAAC,MAAM,aAAa,CAAA;AACvG,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,aAAa,CAAC,UAAkC;IAC9D,oCAAoC;IACpC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,IAAI,CAAA;IAC7D,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,IAAI,UAAU,CAAC,UAAU,IAAI,QAAQ,CAAA;IAEvE,MAAM,eAAe,GAA6B;QAChD,GAAG,UAAU;QACb,WAAW;QACX,OAAO;QACP,IAAI,EAAE,wBAAwB;KAC/B,CAAA;IAED,aAAa,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAA;IAErD,OAAO,eAAe,CAAA;AACxB,CAAC"}
|