@sanity/dashboard 3.0.0-studio-v3.0 → 3.0.0-studio-v3.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.
package/lib/esm/index.js CHANGED
@@ -1,12 +1,14 @@
1
- import {jsxs as $5lYf0$jsxs, jsx as $5lYf0$jsx, Fragment as $5lYf0$Fragment} from "react/jsx-runtime";
2
- import {useMemo as $5lYf0$useMemo, createElement as $5lYf0$createElement, createContext as $5lYf0$createContext, useContext as $5lYf0$useContext, forwardRef as $5lYf0$forwardRef, useState as $5lYf0$useState, useEffect as $5lYf0$useEffect, useCallback as $5lYf0$useCallback} from "react";
3
- import {createPlugin as $5lYf0$createPlugin, useClient as $5lYf0$useClient, useSource as $5lYf0$useSource} from "sanity";
4
- import {Container as $5lYf0$Container, Grid as $5lYf0$Grid, Card as $5lYf0$Card, Text as $5lYf0$Text, Box as $5lYf0$Box, Heading as $5lYf0$Heading, Button as $5lYf0$Button, Stack as $5lYf0$Stack, Label as $5lYf0$Label, Code as $5lYf0$Code, Spinner as $5lYf0$Spinner, Flex as $5lYf0$Flex} from "@sanity/ui";
5
- import $5lYf0$styledcomponents, {css as $5lYf0$css} from "styled-components";
6
- import {switchMap as $5lYf0$switchMap, map as $5lYf0$map} from "rxjs/operators";
7
- import {RobotIcon as $5lYf0$RobotIcon, PlayIcon as $5lYf0$PlayIcon} from "@sanity/icons";
8
- import {DefaultPreview as $5lYf0$DefaultPreview} from "sanity/_unstable";
9
- import $5lYf0$sanityimageurl from "@sanity/image-url";
1
+ import {jsxs as $7XdDa$jsxs, jsx as $7XdDa$jsx, Fragment as $7XdDa$Fragment} from "react/jsx-runtime";
2
+ import {useMemo as $7XdDa$useMemo, createElement as $7XdDa$createElement, createContext as $7XdDa$createContext, useContext as $7XdDa$useContext, forwardRef as $7XdDa$forwardRef, useState as $7XdDa$useState, useEffect as $7XdDa$useEffect, useCallback as $7XdDa$useCallback} from "react";
3
+ import {createPlugin as $7XdDa$createPlugin, useClient as $7XdDa$useClient} from "sanity";
4
+ import {Container as $7XdDa$Container, Grid as $7XdDa$Grid, Card as $7XdDa$Card, Text as $7XdDa$Text, Box as $7XdDa$Box, Heading as $7XdDa$Heading, Button as $7XdDa$Button, Stack as $7XdDa$Stack, Label as $7XdDa$Label, Code as $7XdDa$Code, Spinner as $7XdDa$Spinner, Flex as $7XdDa$Flex} from "@sanity/ui";
5
+ import $7XdDa$styledcomponents, {css as $7XdDa$css} from "styled-components";
6
+ import {from as $7XdDa$from} from "rxjs";
7
+ import {switchMap as $7XdDa$switchMap, map as $7XdDa$map} from "rxjs/operators";
8
+ import {RobotIcon as $7XdDa$RobotIcon, PlayIcon as $7XdDa$PlayIcon} from "@sanity/icons";
9
+ import {DefaultPreview as $7XdDa$DefaultPreview} from "sanity/_unstable";
10
+ import {useUserStore as $7XdDa$useUserStore} from "sanity/lib/dts/src/datastores";
11
+ import $7XdDa$sanityimageurl from "@sanity/image-url";
10
12
 
11
13
  function $parcel$export(e, n, v, s) {
12
14
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
@@ -18,8 +20,8 @@ function $parcel$export(e, n, v, s) {
18
20
 
19
21
 
20
22
 
21
- function $bb6535128092451c$export$3469e8c87b54056a(props) {
22
- return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Container), {
23
+ function $82da5a035d695e7d$export$3469e8c87b54056a(props) {
24
+ return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Container), {
23
25
  width: 4,
24
26
  padding: 4,
25
27
  sizing: "border",
@@ -38,46 +40,46 @@ function $bb6535128092451c$export$3469e8c87b54056a(props) {
38
40
 
39
41
 
40
42
 
41
- const $103cc300d7db8f8f$export$3d9a716c82234f3d = /*#__PURE__*/ (0, $5lYf0$createContext)({
43
+ const $eb4b9ad66697c2d1$export$3d9a716c82234f3d = /*#__PURE__*/ (0, $7XdDa$createContext)({
42
44
  widgets: []
43
45
  });
44
- function $103cc300d7db8f8f$export$f69a0df1904034e() {
45
- return (0, $5lYf0$useContext)($103cc300d7db8f8f$export$3d9a716c82234f3d);
46
+ function $eb4b9ad66697c2d1$export$f69a0df1904034e() {
47
+ return (0, $7XdDa$useContext)($eb4b9ad66697c2d1$export$3d9a716c82234f3d);
46
48
  }
47
49
 
48
50
 
49
51
 
50
- function $ee786c256a0386f4$export$d320a48219c7c153(props) {
51
- const config = (0, $103cc300d7db8f8f$export$f69a0df1904034e)();
52
- const layout = (0, $5lYf0$useMemo)(()=>({
52
+ function $d8fd3c76581cae12$export$d320a48219c7c153(props) {
53
+ const config = (0, $eb4b9ad66697c2d1$export$f69a0df1904034e)();
54
+ const layout = (0, $7XdDa$useMemo)(()=>({
53
55
  ...props.layout || {},
54
56
  ...config.layout || {}
55
57
  }), [
56
58
  props.layout,
57
59
  config.layout
58
60
  ]);
59
- return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Card), {
61
+ return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Card), {
60
62
  shadow: 1,
61
63
  "data-width": layout.width,
62
64
  "data-height": layout.height,
63
- children: /*#__PURE__*/ (0, $5lYf0$createElement)(props.component, {})
65
+ children: /*#__PURE__*/ (0, $7XdDa$createElement)(props.component, {})
64
66
  });
65
67
  }
66
68
 
67
69
 
68
- const $a64f5fea4a0ce905$var$media = {
69
- small: (...args)=>(0, $5lYf0$css)`
70
+ const $b3f6c4935414fea5$var$media = {
71
+ small: (...args)=>(0, $7XdDa$css)`
70
72
  @media (min-width: ${({ theme: theme })=>theme.sanity.media[0]}px) {
71
- ${(0, $5lYf0$css)(...args)}
73
+ ${(0, $7XdDa$css)(...args)}
72
74
  }
73
75
  `,
74
- medium: (...args)=>(0, $5lYf0$css)`
76
+ medium: (...args)=>(0, $7XdDa$css)`
75
77
  @media (min-width: ${({ theme: theme })=>theme.sanity.media[2]}px) {
76
- ${(0, $5lYf0$css)(...args)}
78
+ ${(0, $7XdDa$css)(...args)}
77
79
  }
78
80
  `
79
81
  };
80
- const $a64f5fea4a0ce905$var$Root = (0, $5lYf0$styledcomponents)((0, $5lYf0$Grid))`
82
+ const $b3f6c4935414fea5$var$Root = (0, $7XdDa$styledcomponents)((0, $7XdDa$Grid))`
81
83
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
82
84
 
83
85
  & > div {
@@ -85,76 +87,76 @@ const $a64f5fea4a0ce905$var$Root = (0, $5lYf0$styledcomponents)((0, $5lYf0$Grid)
85
87
  }
86
88
 
87
89
  & > div[data-width='medium'] {
88
- ${$a64f5fea4a0ce905$var$media.small`
90
+ ${$b3f6c4935414fea5$var$media.small`
89
91
  grid-column: span 2;
90
92
  `}
91
93
  }
92
94
 
93
95
  & > div[data-width='large'] {
94
- ${$a64f5fea4a0ce905$var$media.small`
96
+ ${$b3f6c4935414fea5$var$media.small`
95
97
  grid-column: span 2;
96
98
  `}
97
99
 
98
- ${$a64f5fea4a0ce905$var$media.medium`
100
+ ${$b3f6c4935414fea5$var$media.medium`
99
101
  grid-column: span 3;
100
102
  `}
101
103
  }
102
104
 
103
105
  & > div[data-width='full'] {
104
- ${$a64f5fea4a0ce905$var$media.small`
106
+ ${$b3f6c4935414fea5$var$media.small`
105
107
  grid-column: 1 / -1;
106
108
  `}
107
109
  }
108
110
 
109
111
  & > div[data-height='medium'] {
110
- ${$a64f5fea4a0ce905$var$media.small`
112
+ ${$b3f6c4935414fea5$var$media.small`
111
113
  grid-row: span 2;
112
114
  `}
113
115
  }
114
116
 
115
117
  & > div[data-height='large'] {
116
- ${$a64f5fea4a0ce905$var$media.small`
118
+ ${$b3f6c4935414fea5$var$media.small`
117
119
  grid-row: span 2;
118
120
  `}
119
121
 
120
- ${$a64f5fea4a0ce905$var$media.medium`
122
+ ${$b3f6c4935414fea5$var$media.medium`
121
123
  grid-row: span 3;
122
124
  `}
123
125
  }
124
126
 
125
127
  & > div[data-height='full'] {
126
- ${$a64f5fea4a0ce905$var$media.medium`
128
+ ${$b3f6c4935414fea5$var$media.medium`
127
129
  grid-row: 1 / -1;
128
130
  `}
129
131
  }
130
132
  `;
131
- const $a64f5fea4a0ce905$var$NO_WIDGETS = [];
132
- const $a64f5fea4a0ce905$var$NO_LAYOUT = {};
133
- function $a64f5fea4a0ce905$export$606a10b16bce9144(props) {
134
- const { config: { layout: layout = $a64f5fea4a0ce905$var$NO_LAYOUT , widgets: widgets = $a64f5fea4a0ce905$var$NO_WIDGETS } , } = props;
135
- return /*#__PURE__*/ (0, $5lYf0$jsxs)($a64f5fea4a0ce905$var$Root, {
133
+ const $b3f6c4935414fea5$var$NO_WIDGETS = [];
134
+ const $b3f6c4935414fea5$var$NO_LAYOUT = {};
135
+ function $b3f6c4935414fea5$export$606a10b16bce9144(props) {
136
+ const { config: { layout: layout = $b3f6c4935414fea5$var$NO_LAYOUT , widgets: widgets = $b3f6c4935414fea5$var$NO_WIDGETS } , } = props;
137
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)($b3f6c4935414fea5$var$Root, {
136
138
  autoFlow: "row dense",
137
139
  "data-width": layout.width || "auto",
138
140
  "data-height": layout.height || "auto",
139
141
  gap: 4,
140
142
  children: [
141
- widgets.length ? null : /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Card), {
143
+ widgets.length ? null : /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Card), {
142
144
  padding: 4,
143
145
  shadow: 1,
144
146
  tone: "primary",
145
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
147
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
146
148
  align: "center",
147
149
  children: "Add some widgets to populate this space."
148
150
  })
149
151
  }),
150
152
  widgets.map((widgetConfig, index)=>{
151
- if (widgetConfig.type === "__experimental_group") return /*#__PURE__*/ (0, $5lYf0$jsx)($a64f5fea4a0ce905$export$606a10b16bce9144, {
153
+ if (widgetConfig.type === "__experimental_group") return /*#__PURE__*/ (0, $7XdDa$jsx)($b3f6c4935414fea5$export$606a10b16bce9144, {
152
154
  config: widgetConfig
153
155
  }, index);
154
- if (widgetConfig.component) return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $ee786c256a0386f4$export$d320a48219c7c153), {
156
+ if (widgetConfig.component) return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $d8fd3c76581cae12$export$d320a48219c7c153), {
155
157
  ...widgetConfig
156
158
  }, index);
157
- return /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Box), {
159
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Box), {
158
160
  children: [
159
161
  widgetConfig.name,
160
162
  " is missing widget component"
@@ -167,12 +169,12 @@ function $a64f5fea4a0ce905$export$606a10b16bce9144(props) {
167
169
 
168
170
 
169
171
 
170
- function $086586914f992408$export$fe82a520fc33e5f4({ config: config }) {
172
+ function $415e81216941c75c$export$fe82a520fc33e5f4({ config: config }) {
171
173
  if (!config) return null;
172
- return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $103cc300d7db8f8f$export$3d9a716c82234f3d).Provider, {
174
+ return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $eb4b9ad66697c2d1$export$3d9a716c82234f3d).Provider, {
173
175
  value: config,
174
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $bb6535128092451c$export$3469e8c87b54056a), {
175
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $a64f5fea4a0ce905$export$606a10b16bce9144), {
176
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $82da5a035d695e7d$export$3469e8c87b54056a), {
177
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $b3f6c4935414fea5$export$606a10b16bce9144), {
176
178
  config: config
177
179
  })
178
180
  })
@@ -181,17 +183,17 @@ function $086586914f992408$export$fe82a520fc33e5f4({ config: config }) {
181
183
 
182
184
 
183
185
 
184
- var $81c1b644006d48ec$exports = {};
186
+ var $f17097ca2e05ac05$exports = {};
185
187
 
186
188
 
187
- var $1f0cda7387acedc8$exports = {};
189
+ var $17a16bf8b6a46960$exports = {};
188
190
 
189
- $parcel$export($1f0cda7387acedc8$exports, "DashboardWidgetContainer", () => $1f0cda7387acedc8$export$67b2e85605d868b2);
191
+ $parcel$export($17a16bf8b6a46960$exports, "DashboardWidgetContainer", () => $17a16bf8b6a46960$export$67b2e85605d868b2);
190
192
 
191
193
 
192
194
 
193
195
 
194
- const $1f0cda7387acedc8$var$Root = (0, $5lYf0$styledcomponents)((0, $5lYf0$Card))`
196
+ const $17a16bf8b6a46960$var$Root = (0, $7XdDa$styledcomponents)((0, $7XdDa$Card))`
195
197
  display: flex;
196
198
  flex-direction: column;
197
199
  justify-content: stretch;
@@ -199,14 +201,14 @@ const $1f0cda7387acedc8$var$Root = (0, $5lYf0$styledcomponents)((0, $5lYf0$Card)
199
201
  box-sizing: border-box;
200
202
  position: relative;
201
203
  `;
202
- const $1f0cda7387acedc8$var$Header = (0, $5lYf0$styledcomponents)((0, $5lYf0$Card))`
204
+ const $17a16bf8b6a46960$var$Header = (0, $7XdDa$styledcomponents)((0, $7XdDa$Card))`
203
205
  position: sticky;
204
206
  top: 0;
205
207
  z-index: 2;
206
208
  border-top-left-radius: inherit;
207
209
  border-top-right-radius: inherit;
208
210
  `;
209
- const $1f0cda7387acedc8$var$Footer = (0, $5lYf0$styledcomponents)((0, $5lYf0$Card))`
211
+ const $17a16bf8b6a46960$var$Footer = (0, $7XdDa$styledcomponents)((0, $7XdDa$Card))`
210
212
  position: sticky;
211
213
  overflow: hidden;
212
214
  bottom: 0;
@@ -215,7 +217,7 @@ const $1f0cda7387acedc8$var$Footer = (0, $5lYf0$styledcomponents)((0, $5lYf0$Car
215
217
  border-bottom-left-radius: inherit;
216
218
  margin-top: auto;
217
219
  `;
218
- const $1f0cda7387acedc8$var$Content = (0, $5lYf0$styledcomponents)((0, $5lYf0$Box))`
220
+ const $17a16bf8b6a46960$var$Content = (0, $7XdDa$styledcomponents)((0, $7XdDa$Box))`
219
221
  position: relative;
220
222
  z-index: 1;
221
223
  height: stretch;
@@ -226,27 +228,27 @@ const $1f0cda7387acedc8$var$Content = (0, $5lYf0$styledcomponents)((0, $5lYf0$Bo
226
228
  outline: none;
227
229
  }
228
230
  `;
229
- const $1f0cda7387acedc8$export$67b2e85605d868b2 = /*#__PURE__*/ (0, $5lYf0$forwardRef)(function DashboardWidgetContainer(props, ref) {
231
+ const $17a16bf8b6a46960$export$67b2e85605d868b2 = /*#__PURE__*/ (0, $7XdDa$forwardRef)(function DashboardWidgetContainer(props, ref) {
230
232
  const { header: header , children: children , footer: footer } = props;
231
- return /*#__PURE__*/ (0, $5lYf0$jsxs)($1f0cda7387acedc8$var$Root, {
233
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)($17a16bf8b6a46960$var$Root, {
232
234
  radius: 3,
233
235
  display: "flex",
234
236
  ref: ref,
235
237
  children: [
236
- header && /*#__PURE__*/ (0, $5lYf0$jsx)($1f0cda7387acedc8$var$Header, {
238
+ header && /*#__PURE__*/ (0, $7XdDa$jsx)($17a16bf8b6a46960$var$Header, {
237
239
  borderBottom: true,
238
240
  paddingX: 3,
239
241
  paddingY: 4,
240
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Heading), {
242
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Heading), {
241
243
  size: 1,
242
244
  textOverflow: "ellipsis",
243
245
  children: header
244
246
  })
245
247
  }),
246
- children && /*#__PURE__*/ (0, $5lYf0$jsx)($1f0cda7387acedc8$var$Content, {
248
+ children && /*#__PURE__*/ (0, $7XdDa$jsx)($17a16bf8b6a46960$var$Content, {
247
249
  children: children
248
250
  }),
249
- footer && /*#__PURE__*/ (0, $5lYf0$jsx)($1f0cda7387acedc8$var$Footer, {
251
+ footer && /*#__PURE__*/ (0, $7XdDa$jsx)($17a16bf8b6a46960$var$Footer, {
250
252
  borderTop: true,
251
253
  children: footer
252
254
  })
@@ -255,17 +257,17 @@ const $1f0cda7387acedc8$export$67b2e85605d868b2 = /*#__PURE__*/ (0, $5lYf0$forwa
255
257
  });
256
258
 
257
259
 
258
- var $ac478372f28acbf6$exports = {};
260
+ var $78de0fa9a220e58e$exports = {};
259
261
 
260
- $parcel$export($ac478372f28acbf6$exports, "projectInfoWidget", () => $ac478372f28acbf6$export$66362ea0e7ee12e);
262
+ $parcel$export($78de0fa9a220e58e$exports, "projectInfoWidget", () => $78de0fa9a220e58e$export$66362ea0e7ee12e);
261
263
 
262
264
 
263
265
 
264
266
 
265
267
 
266
- function $3a278251aab3d81f$export$270fde7c7e72cf26() {
267
- const client = (0, $5lYf0$useClient)();
268
- return (0, $5lYf0$useMemo)(()=>client.withConfig({
268
+ function $63829e89ad9918b0$export$270fde7c7e72cf26() {
269
+ const client = (0, $7XdDa$useClient)();
270
+ return (0, $7XdDa$useMemo)(()=>client.withConfig({
269
271
  apiVersion: "1"
270
272
  }), [
271
273
  client
@@ -275,27 +277,27 @@ function $3a278251aab3d81f$export$270fde7c7e72cf26() {
275
277
 
276
278
 
277
279
 
278
- function $72d86a2cfb80e9d7$var$isUrl(url) {
280
+ function $979771a49dfb41e9$var$isUrl(url) {
279
281
  return url && /^https?:\/\//.test(`${url}`);
280
282
  }
281
- function $72d86a2cfb80e9d7$var$getGraphQlUrl(projectId, dataset) {
283
+ function $979771a49dfb41e9$var$getGraphQlUrl(projectId, dataset) {
282
284
  return `https://${projectId}.api.sanity.io/v1/graphql/${dataset}/default`;
283
285
  }
284
- function $72d86a2cfb80e9d7$var$getGroqUrl(projectId, dataset) {
286
+ function $979771a49dfb41e9$var$getGroqUrl(projectId, dataset) {
285
287
  return `https://${projectId}.api.sanity.io/v1/groq/${dataset}`;
286
288
  }
287
- function $72d86a2cfb80e9d7$var$getManageUrl(projectId) {
289
+ function $979771a49dfb41e9$var$getManageUrl(projectId) {
288
290
  return `https://manage.sanity.io/projects/${projectId}`;
289
291
  }
290
- const $72d86a2cfb80e9d7$var$NO_EXPERIMENTAL = [];
291
- const $72d86a2cfb80e9d7$var$NO_DATA = [];
292
- function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
293
- const { __experimental_before: __experimental_before = $72d86a2cfb80e9d7$var$NO_EXPERIMENTAL , data: data = $72d86a2cfb80e9d7$var$NO_DATA } = props;
294
- const [studioHost, setStudioHost] = (0, $5lYf0$useState)();
295
- const [graphqlApi, setGraphQlApi] = (0, $5lYf0$useState)();
296
- const versionedClient = (0, $3a278251aab3d81f$export$270fde7c7e72cf26)();
292
+ const $979771a49dfb41e9$var$NO_EXPERIMENTAL = [];
293
+ const $979771a49dfb41e9$var$NO_DATA = [];
294
+ function $979771a49dfb41e9$export$a1c9a67310a2d004(props) {
295
+ const { __experimental_before: __experimental_before = $979771a49dfb41e9$var$NO_EXPERIMENTAL , data: data = $979771a49dfb41e9$var$NO_DATA } = props;
296
+ const [studioHost, setStudioHost] = (0, $7XdDa$useState)();
297
+ const [graphqlApi, setGraphQlApi] = (0, $7XdDa$useState)();
298
+ const versionedClient = (0, $63829e89ad9918b0$export$270fde7c7e72cf26)();
297
299
  const { projectId: projectId = "unknown" , dataset: dataset = "unknown" } = versionedClient.config();
298
- (0, $5lYf0$useEffect)(()=>{
300
+ (0, $7XdDa$useEffect)(()=>{
299
301
  const subscriptions = [];
300
302
  subscriptions.push(versionedClient.observable.request({
301
303
  uri: `/projects/${projectId}`
@@ -316,7 +318,7 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
316
318
  method: "HEAD",
317
319
  uri: `/graphql/${dataset}/default`
318
320
  }).subscribe({
319
- next: ()=>setGraphQlApi($72d86a2cfb80e9d7$var$getGraphQlUrl(projectId, dataset)),
321
+ next: ()=>setGraphQlApi($979771a49dfb41e9$var$getGraphQlUrl(projectId, dataset)),
320
322
  error: (error)=>{
321
323
  if (error.statusCode === 404) setGraphQlApi(undefined);
322
324
  else {
@@ -337,7 +339,7 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
337
339
  setGraphQlApi,
338
340
  setStudioHost
339
341
  ]);
340
- const assembleTableRows = (0, $5lYf0$useMemo)(()=>{
342
+ const assembleTableRows = (0, $7XdDa$useMemo)(()=>{
341
343
  let result = [
342
344
  {
343
345
  title: "Sanity project",
@@ -374,7 +376,7 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
374
376
  rows: [
375
377
  {
376
378
  title: "GROQ",
377
- value: $72d86a2cfb80e9d7$var$getGroqUrl(projectId, dataset)
379
+ value: $979771a49dfb41e9$var$getGroqUrl(projectId, dataset)
378
380
  },
379
381
  {
380
382
  title: "GraphQL",
@@ -405,16 +407,16 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
405
407
  dataset,
406
408
  data
407
409
  ]);
408
- return /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Fragment), {
410
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Fragment), {
409
411
  children: [
410
- __experimental_before.map((widgetConfig, idx)=>/*#__PURE__*/ (0, $5lYf0$jsx)((0, $ee786c256a0386f4$export$d320a48219c7c153), {
412
+ __experimental_before.map((widgetConfig, idx)=>/*#__PURE__*/ (0, $7XdDa$jsx)((0, $d8fd3c76581cae12$export$d320a48219c7c153), {
411
413
  ...widgetConfig
412
414
  }, idx)),
413
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Box), {
415
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Box), {
414
416
  height: "fill",
415
417
  marginTop: __experimental_before?.length > 0 ? 4 : 0,
416
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $1f0cda7387acedc8$export$67b2e85605d868b2), {
417
- footer: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Button), {
418
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $17a16bf8b6a46960$export$67b2e85605d868b2), {
419
+ footer: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Button), {
418
420
  style: {
419
421
  width: "100%"
420
422
  },
@@ -424,21 +426,21 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
424
426
  tone: "primary",
425
427
  text: "Manage project",
426
428
  as: "a",
427
- href: $72d86a2cfb80e9d7$var$getManageUrl(projectId)
429
+ href: $979771a49dfb41e9$var$getManageUrl(projectId)
428
430
  }),
429
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Card), {
431
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Card), {
430
432
  paddingY: 4,
431
433
  radius: 2,
432
434
  role: "table",
433
435
  "aria-label": "Project info",
434
436
  "aria-describedby": "project_info_table",
435
- children: /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Stack), {
437
+ children: /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Stack), {
436
438
  space: 4,
437
439
  children: [
438
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Box), {
440
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Box), {
439
441
  paddingX: 3,
440
442
  as: "header",
441
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Heading), {
443
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Heading), {
442
444
  size: 1,
443
445
  as: "h2",
444
446
  id: "project_info_table",
@@ -447,49 +449,49 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
447
449
  }),
448
450
  assembleTableRows.map((item)=>{
449
451
  if (!item || !item.rows) return null;
450
- return /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Stack), {
452
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Stack), {
451
453
  space: 3,
452
454
  children: [
453
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Card), {
455
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Card), {
454
456
  borderBottom: true,
455
457
  padding: 3,
456
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Label), {
458
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Label), {
457
459
  size: 0,
458
460
  muted: true,
459
461
  role: "columnheader",
460
462
  children: item.title
461
463
  })
462
464
  }),
463
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Stack), {
465
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Stack), {
464
466
  space: 4,
465
467
  paddingX: 3,
466
468
  role: "rowgroup",
467
469
  children: item.rows.map((row)=>{
468
- return /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Grid), {
470
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Grid), {
469
471
  columns: 2,
470
472
  role: "row",
471
473
  children: [
472
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
474
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
473
475
  weight: "medium",
474
476
  role: "rowheader",
475
477
  children: row.title
476
478
  }),
477
- typeof row.value === "object" && /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
479
+ typeof row.value === "object" && /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
478
480
  size: 1,
479
481
  children: row.value?.error
480
482
  }),
481
- typeof row.value === "string" && /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Fragment), {
482
- children: $72d86a2cfb80e9d7$var$isUrl(row.value) ? /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
483
+ typeof row.value === "string" && /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Fragment), {
484
+ children: $979771a49dfb41e9$var$isUrl(row.value) ? /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
483
485
  size: 1,
484
486
  role: "cell",
485
487
  style: {
486
488
  wordBreak: "break-word"
487
489
  },
488
- children: /*#__PURE__*/ (0, $5lYf0$jsx)("a", {
490
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)("a", {
489
491
  href: row.value,
490
492
  children: row.value
491
493
  })
492
- }) : /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Code), {
494
+ }) : /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Code), {
493
495
  size: 1,
494
496
  role: "cell",
495
497
  style: {
@@ -515,10 +517,10 @@ function $72d86a2cfb80e9d7$export$a1c9a67310a2d004(props) {
515
517
  }
516
518
 
517
519
 
518
- function $ac478372f28acbf6$export$66362ea0e7ee12e(config) {
520
+ function $78de0fa9a220e58e$export$66362ea0e7ee12e(config) {
519
521
  return {
520
522
  name: "project-info",
521
- component: (0, $72d86a2cfb80e9d7$export$a1c9a67310a2d004),
523
+ component: (0, $979771a49dfb41e9$export$a1c9a67310a2d004),
522
524
  layout: config?.layout ?? {
523
525
  width: "medium"
524
526
  }
@@ -526,9 +528,9 @@ function $ac478372f28acbf6$export$66362ea0e7ee12e(config) {
526
528
  }
527
529
 
528
530
 
529
- var $0ef0fb9920ec1f58$exports = {};
531
+ var $f409fc720124d423$exports = {};
530
532
 
531
- $parcel$export($0ef0fb9920ec1f58$exports, "projectUsersWidget", () => $0ef0fb9920ec1f58$export$5c0e62d7539f632);
533
+ $parcel$export($f409fc720124d423$exports, "projectUsersWidget", () => $f409fc720124d423$export$5c0e62d7539f632);
532
534
 
533
535
 
534
536
 
@@ -539,7 +541,8 @@ $parcel$export($0ef0fb9920ec1f58$exports, "projectUsersWidget", () => $0ef0fb992
539
541
 
540
542
 
541
543
 
542
- const $3a1cbcec6b01611f$var$AvatarWrapper = (0, $5lYf0$styledcomponents)((0, $5lYf0$Card))`
544
+
545
+ const $dc6a1647d6dccdcb$var$AvatarWrapper = (0, $7XdDa$styledcomponents)((0, $7XdDa$Card))`
543
546
  box-sizing: border-box;
544
547
  border-radius: 50%;
545
548
  border-color: transparent;
@@ -552,20 +555,20 @@ const $3a1cbcec6b01611f$var$AvatarWrapper = (0, $5lYf0$styledcomponents)((0, $5l
552
555
  height: auto;
553
556
  }
554
557
  `;
555
- function $3a1cbcec6b01611f$var$getInviteUrl(projectId) {
558
+ function $dc6a1647d6dccdcb$var$getInviteUrl(projectId) {
556
559
  return `https://manage.sanity.io/projects/${projectId}/team/invite`;
557
560
  }
558
- function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
559
- const [project, setProject] = (0, $5lYf0$useState)();
560
- const [users, setUsers] = (0, $5lYf0$useState)();
561
- const [error, setError] = (0, $5lYf0$useState)();
562
- const versionedClient = (0, $3a278251aab3d81f$export$270fde7c7e72cf26)();
563
- const { __internal: { userStore: userStore } , } = (0, $5lYf0$useSource)();
564
- const fetchData = (0, $5lYf0$useCallback)(()=>{
561
+ function $dc6a1647d6dccdcb$export$2500e0068175e4b9() {
562
+ const [project, setProject] = (0, $7XdDa$useState)();
563
+ const [users, setUsers] = (0, $7XdDa$useState)();
564
+ const [error, setError] = (0, $7XdDa$useState)();
565
+ const userStore = (0, $7XdDa$useUserStore)();
566
+ const versionedClient = (0, $63829e89ad9918b0$export$270fde7c7e72cf26)();
567
+ const fetchData = (0, $7XdDa$useCallback)(()=>{
565
568
  const { projectId: projectId } = versionedClient.config();
566
569
  const subscription = versionedClient.observable.request({
567
570
  uri: `/projects/${projectId}`
568
- }).pipe((0, $5lYf0$switchMap)((_project)=>userStore.observable.getUsers(_project.members.map((mem)=>mem.id)).pipe((0, $5lYf0$map)((_users)=>({
571
+ }).pipe((0, $7XdDa$switchMap)((_project)=>(0, $7XdDa$from)(userStore.getUsers(_project.members.map((mem)=>mem.id))).pipe((0, $7XdDa$map)((_users)=>({
569
572
  project: _project,
570
573
  users: _users
571
574
  }))))).subscribe({
@@ -573,7 +576,7 @@ function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
573
576
  setProject(_project);
574
577
  setUsers((Array.isArray(_users) ? _users : [
575
578
  _users
576
- ]).sort((userA, userB)=>$3a1cbcec6b01611f$var$sortUsersByRobotStatus(userA, userB, _project)));
579
+ ]).sort((userA, userB)=>$dc6a1647d6dccdcb$var$sortUsersByRobotStatus(userA, userB, _project)));
577
580
  },
578
581
  error: (e)=>setError(e)
579
582
  });
@@ -582,22 +585,22 @@ function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
582
585
  userStore,
583
586
  versionedClient
584
587
  ]);
585
- (0, $5lYf0$useEffect)(()=>fetchData(), [
588
+ (0, $7XdDa$useEffect)(()=>fetchData(), [
586
589
  fetchData
587
590
  ]);
588
- const handleRetryFetch = (0, $5lYf0$useCallback)(()=>fetchData(), [
591
+ const handleRetryFetch = (0, $7XdDa$useCallback)(()=>fetchData(), [
589
592
  fetchData
590
593
  ]);
591
594
  const isLoading = !users || !project;
592
- if (error) return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $1f0cda7387acedc8$export$67b2e85605d868b2), {
595
+ if (error) return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $17a16bf8b6a46960$export$67b2e85605d868b2), {
593
596
  header: "Project users",
594
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Box), {
597
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Box), {
595
598
  padding: 4,
596
- children: /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Text), {
599
+ children: /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Text), {
597
600
  children: [
598
601
  "Something went wrong while fetching data. You could",
599
602
  " ",
600
- /*#__PURE__*/ (0, $5lYf0$jsx)("a", {
603
+ /*#__PURE__*/ (0, $7XdDa$jsx)("a", {
601
604
  onClick: handleRetryFetch,
602
605
  title: "Retry users fetch",
603
606
  style: {
@@ -610,9 +613,9 @@ function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
610
613
  })
611
614
  })
612
615
  });
613
- return /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $1f0cda7387acedc8$export$67b2e85605d868b2), {
616
+ return /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $17a16bf8b6a46960$export$67b2e85605d868b2), {
614
617
  header: "Project users",
615
- footer: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Button), {
618
+ footer: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Button), {
616
619
  style: {
617
620
  width: "100%"
618
621
  },
@@ -623,22 +626,22 @@ function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
623
626
  text: "Invite members",
624
627
  as: "a",
625
628
  loading: isLoading,
626
- href: isLoading ? undefined : $3a1cbcec6b01611f$var$getInviteUrl(project.id)
629
+ href: isLoading ? undefined : $dc6a1647d6dccdcb$var$getInviteUrl(project.id)
627
630
  }),
628
631
  children: [
629
- isLoading && /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Box), {
632
+ isLoading && /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Box), {
630
633
  paddingY: 5,
631
634
  paddingX: 2,
632
- children: /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Stack), {
635
+ children: /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Stack), {
633
636
  space: 4,
634
637
  children: [
635
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
638
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
636
639
  align: "center",
637
640
  muted: true,
638
641
  size: 1,
639
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Spinner), {})
642
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Spinner), {})
640
643
  }),
641
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
644
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
642
645
  align: "center",
643
646
  size: 1,
644
647
  muted: true,
@@ -647,23 +650,23 @@ function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
647
650
  ]
648
651
  })
649
652
  }),
650
- !isLoading && /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Stack), {
653
+ !isLoading && /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Stack), {
651
654
  space: 3,
652
655
  padding: 3,
653
656
  children: users?.map((user)=>{
654
657
  const membership = project.members.find((member)=>member.id === user.id);
655
- const media = membership?.isRobot ? /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
658
+ const media = membership?.isRobot ? /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
656
659
  size: 3,
657
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$RobotIcon), {})
658
- }) : /*#__PURE__*/ (0, $5lYf0$jsx)($3a1cbcec6b01611f$var$AvatarWrapper, {
660
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$RobotIcon), {})
661
+ }) : /*#__PURE__*/ (0, $7XdDa$jsx)($dc6a1647d6dccdcb$var$AvatarWrapper, {
659
662
  tone: "transparent",
660
- children: user?.imageUrl && /*#__PURE__*/ (0, $5lYf0$jsx)("img", {
663
+ children: user?.imageUrl && /*#__PURE__*/ (0, $7XdDa$jsx)("img", {
661
664
  src: user.imageUrl,
662
665
  alt: user?.displayName
663
666
  })
664
667
  });
665
- return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Box), {
666
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$DefaultPreview), {
668
+ return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Box), {
669
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$DefaultPreview), {
667
670
  title: user.displayName,
668
671
  subtitle: membership?.role,
669
672
  media: media
@@ -674,7 +677,7 @@ function $3a1cbcec6b01611f$export$2500e0068175e4b9() {
674
677
  ]
675
678
  });
676
679
  }
677
- function $3a1cbcec6b01611f$var$sortUsersByRobotStatus(userA, userB, project) {
680
+ function $dc6a1647d6dccdcb$var$sortUsersByRobotStatus(userA, userB, project) {
678
681
  const { members: members } = project;
679
682
  const membershipA = members.find((member)=>member.id === userA?.id);
680
683
  const membershipB = members.find((member)=>member.id === userB?.id);
@@ -684,18 +687,18 @@ function $3a1cbcec6b01611f$var$sortUsersByRobotStatus(userA, userB, project) {
684
687
  }
685
688
 
686
689
 
687
- function $0ef0fb9920ec1f58$export$5c0e62d7539f632(config) {
690
+ function $f409fc720124d423$export$5c0e62d7539f632(config) {
688
691
  return {
689
692
  name: "project-info",
690
- component: (0, $3a1cbcec6b01611f$export$2500e0068175e4b9),
693
+ component: (0, $dc6a1647d6dccdcb$export$2500e0068175e4b9),
691
694
  layout: config?.layout
692
695
  };
693
696
  }
694
697
 
695
698
 
696
- var $dfd7c10d2685c9b1$exports = {};
699
+ var $814ac91a32d626ba$exports = {};
697
700
 
698
- $parcel$export($dfd7c10d2685c9b1$exports, "sanityTutorialsWidget", () => $dfd7c10d2685c9b1$export$b3552e87a7c5c47b);
701
+ $parcel$export($814ac91a32d626ba$exports, "sanityTutorialsWidget", () => $814ac91a32d626ba$export$b3552e87a7c5c47b);
699
702
 
700
703
 
701
704
 
@@ -704,7 +707,7 @@ $parcel$export($dfd7c10d2685c9b1$exports, "sanityTutorialsWidget", () => $dfd7c1
704
707
 
705
708
 
706
709
 
707
- const $f83ecb81d484a8cf$var$PlayIconBox = (0, $5lYf0$styledcomponents)((0, $5lYf0$Box))`
710
+ const $4cea1a19ce247dc2$var$PlayIconBox = (0, $7XdDa$styledcomponents)((0, $7XdDa$Box))`
708
711
  position: absolute;
709
712
  top: 50%;
710
713
  left: 50%;
@@ -723,21 +726,21 @@ const $f83ecb81d484a8cf$var$PlayIconBox = (0, $5lYf0$styledcomponents)((0, $5lYf
723
726
  opacity: 0.75;
724
727
  }
725
728
  `;
726
- const $f83ecb81d484a8cf$var$Root = (0, $5lYf0$styledcomponents)((0, $5lYf0$Flex))`
729
+ const $4cea1a19ce247dc2$var$Root = (0, $7XdDa$styledcomponents)((0, $7XdDa$Flex))`
727
730
  &:hover {
728
- ${$f83ecb81d484a8cf$var$PlayIconBox} {
731
+ ${$4cea1a19ce247dc2$var$PlayIconBox} {
729
732
  &:before {
730
733
  opacity: 1;
731
734
  }
732
735
  }
733
736
  }
734
737
  `;
735
- const $f83ecb81d484a8cf$var$PosterCard = (0, $5lYf0$styledcomponents)((0, $5lYf0$Card))`
738
+ const $4cea1a19ce247dc2$var$PosterCard = (0, $7XdDa$styledcomponents)((0, $7XdDa$Card))`
736
739
  width: 100%;
737
740
  padding-bottom: calc(9 / 16 * 100%);
738
741
  position: relative;
739
742
  `;
740
- const $f83ecb81d484a8cf$var$Poster = (0, $5lYf0$styledcomponents).img`
743
+ const $4cea1a19ce247dc2$var$Poster = (0, $7XdDa$styledcomponents).img`
741
744
  position: absolute;
742
745
  top: 0;
743
746
  left: 0;
@@ -750,11 +753,11 @@ const $f83ecb81d484a8cf$var$Poster = (0, $5lYf0$styledcomponents).img`
750
753
  display: none;
751
754
  }
752
755
  `;
753
- function $f83ecb81d484a8cf$export$825b76de5f2b0345(props) {
756
+ function $4cea1a19ce247dc2$export$825b76de5f2b0345(props) {
754
757
  const { title: title , posterURL: posterURL , showPlayIcon: showPlayIcon , href: href , presenterName: presenterName , presenterSubtitle: presenterSubtitle } = props;
755
- return /*#__PURE__*/ (0, $5lYf0$jsx)($f83ecb81d484a8cf$var$Root, {
758
+ return /*#__PURE__*/ (0, $7XdDa$jsx)($4cea1a19ce247dc2$var$Root, {
756
759
  flex: 1,
757
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Card), {
760
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Card), {
758
761
  sizing: "border",
759
762
  flex: 1,
760
763
  padding: 2,
@@ -766,49 +769,49 @@ function $f83ecb81d484a8cf$export$825b76de5f2b0345(props) {
766
769
  style: {
767
770
  position: "relative"
768
771
  },
769
- children: /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Flex), {
772
+ children: /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Flex), {
770
773
  direction: "column",
771
774
  style: {
772
775
  height: "100%"
773
776
  },
774
777
  children: [
775
- posterURL && /*#__PURE__*/ (0, $5lYf0$jsxs)($f83ecb81d484a8cf$var$PosterCard, {
778
+ posterURL && /*#__PURE__*/ (0, $7XdDa$jsxs)($4cea1a19ce247dc2$var$PosterCard, {
776
779
  marginBottom: 1,
777
780
  children: [
778
- /*#__PURE__*/ (0, $5lYf0$jsx)($f83ecb81d484a8cf$var$Poster, {
781
+ /*#__PURE__*/ (0, $7XdDa$jsx)($4cea1a19ce247dc2$var$Poster, {
779
782
  src: posterURL
780
783
  }),
781
- showPlayIcon && /*#__PURE__*/ (0, $5lYf0$jsx)($f83ecb81d484a8cf$var$PlayIconBox, {
784
+ showPlayIcon && /*#__PURE__*/ (0, $7XdDa$jsx)($4cea1a19ce247dc2$var$PlayIconBox, {
782
785
  display: "flex",
783
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
786
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
784
787
  align: "center",
785
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$PlayIcon), {})
788
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$PlayIcon), {})
786
789
  })
787
790
  })
788
791
  ]
789
792
  }),
790
- /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Flex), {
793
+ /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Flex), {
791
794
  direction: "column",
792
795
  justify: "space-between",
793
796
  paddingY: 2,
794
797
  flex: 1,
795
798
  children: [
796
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Heading), {
799
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Heading), {
797
800
  as: "h3",
798
801
  size: 1,
799
802
  children: title
800
803
  }),
801
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Box), {
804
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Box), {
802
805
  marginTop: 4,
803
- children: /*#__PURE__*/ (0, $5lYf0$jsxs)((0, $5lYf0$Stack), {
806
+ children: /*#__PURE__*/ (0, $7XdDa$jsxs)((0, $7XdDa$Stack), {
804
807
  space: 2,
805
808
  flex: 1,
806
809
  children: [
807
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
810
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
808
811
  size: 1,
809
812
  children: presenterName
810
813
  }),
811
- /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Text), {
814
+ /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Text), {
812
815
  size: 0,
813
816
  style: {
814
817
  opacity: 0.7
@@ -830,13 +833,13 @@ function $f83ecb81d484a8cf$export$825b76de5f2b0345(props) {
830
833
 
831
834
 
832
835
 
833
- const $041161d503c3990f$var$tutorialsProjectConfig = {
836
+ const $4f5dff4ed7dc82f6$var$tutorialsProjectConfig = {
834
837
  projectId: "3do82whm",
835
838
  dataset: "next"
836
839
  };
837
- function $041161d503c3990f$export$144c6e577729d454() {
838
- const versionedClient = (0, $3a278251aab3d81f$export$270fde7c7e72cf26)();
839
- return (0, $5lYf0$useMemo)(()=>({
840
+ function $4f5dff4ed7dc82f6$export$144c6e577729d454() {
841
+ const versionedClient = (0, $63829e89ad9918b0$export$270fde7c7e72cf26)();
842
+ return (0, $7XdDa$useMemo)(()=>({
840
843
  getFeed: (templateRepoId)=>{
841
844
  const uri = templateRepoId ? `/addons/dashboard?templateRepoId=${templateRepoId}` : "/addons/dashboard";
842
845
  return versionedClient.observable.request({
@@ -844,7 +847,7 @@ function $041161d503c3990f$export$144c6e577729d454() {
844
847
  withCredentials: false
845
848
  });
846
849
  },
847
- urlBuilder: (0, $5lYf0$sanityimageurl)($041161d503c3990f$var$tutorialsProjectConfig)
850
+ urlBuilder: (0, $7XdDa$sanityimageurl)($4f5dff4ed7dc82f6$var$tutorialsProjectConfig)
848
851
  }), [
849
852
  versionedClient
850
853
  ]);
@@ -852,16 +855,16 @@ function $041161d503c3990f$export$144c6e577729d454() {
852
855
 
853
856
 
854
857
 
855
- function $e6d104338a42de87$var$createUrl(slug, type) {
858
+ function $375b2dfb4ba4a890$var$createUrl(slug, type) {
856
859
  if (type === "tutorial") return `https://www.sanity.io/docs/tutorials/${slug.current}`;
857
860
  else if (type === "guide") return `https://www.sanity.io/docs/guides/${slug.current}`;
858
861
  return false;
859
862
  }
860
- function $e6d104338a42de87$export$5f156cc357b8467f(props) {
863
+ function $375b2dfb4ba4a890$export$5f156cc357b8467f(props) {
861
864
  const { templateRepoId: templateRepoId } = props;
862
- const [feedItems, setFeedItems] = (0, $5lYf0$useState)([]);
863
- const { getFeed: getFeed , urlBuilder: urlBuilder } = (0, $041161d503c3990f$export$144c6e577729d454)();
864
- (0, $5lYf0$useEffect)(()=>{
865
+ const [feedItems, setFeedItems] = (0, $7XdDa$useState)([]);
866
+ const { getFeed: getFeed , urlBuilder: urlBuilder } = (0, $4f5dff4ed7dc82f6$export$144c6e577729d454)();
867
+ (0, $7XdDa$useEffect)(()=>{
865
868
  const subscription = getFeed(templateRepoId).subscribe((response)=>{
866
869
  setFeedItems(response.items);
867
870
  });
@@ -874,9 +877,9 @@ function $e6d104338a42de87$export$5f156cc357b8467f(props) {
874
877
  templateRepoId
875
878
  ]);
876
879
  const title = "Learn about Sanity";
877
- return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $1f0cda7387acedc8$export$67b2e85605d868b2), {
880
+ return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $17a16bf8b6a46960$export$67b2e85605d868b2), {
878
881
  header: title,
879
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Flex), {
882
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Flex), {
880
883
  as: "ul",
881
884
  overflow: "auto",
882
885
  align: "stretch",
@@ -886,8 +889,8 @@ function $e6d104338a42de87$export$5f156cc357b8467f(props) {
886
889
  const presenter = feedItem.presenter || feedItem.guideOrTutorial?.presenter || {};
887
890
  const subtitle = feedItem.category;
888
891
  const { guideOrTutorial: guideOrTutorial = {} } = feedItem;
889
- const href = (guideOrTutorial.slug ? $e6d104338a42de87$var$createUrl(guideOrTutorial.slug, guideOrTutorial._type) : feedItem.externalLink) || feedItem.externalLink;
890
- return /*#__PURE__*/ (0, $5lYf0$jsx)((0, $5lYf0$Flex), {
892
+ const href = (guideOrTutorial.slug ? $375b2dfb4ba4a890$var$createUrl(guideOrTutorial.slug, guideOrTutorial._type) : feedItem.externalLink) || feedItem.externalLink;
893
+ return /*#__PURE__*/ (0, $7XdDa$jsx)((0, $7XdDa$Flex), {
891
894
  as: "li",
892
895
  paddingRight: index < feedItems?.length - 1 ? 1 : 3,
893
896
  paddingLeft: index === 0 ? 3 : 0,
@@ -896,7 +899,7 @@ function $e6d104338a42de87$export$5f156cc357b8467f(props) {
896
899
  minWidth: 272,
897
900
  width: "30%"
898
901
  },
899
- children: /*#__PURE__*/ (0, $5lYf0$jsx)((0, $f83ecb81d484a8cf$export$825b76de5f2b0345), {
902
+ children: /*#__PURE__*/ (0, $7XdDa$jsx)((0, $4cea1a19ce247dc2$export$825b76de5f2b0345), {
900
903
  title: feedItem.title,
901
904
  href: href ?? "",
902
905
  presenterName: presenter.name,
@@ -911,10 +914,10 @@ function $e6d104338a42de87$export$5f156cc357b8467f(props) {
911
914
  }
912
915
 
913
916
 
914
- function $dfd7c10d2685c9b1$export$b3552e87a7c5c47b(config) {
917
+ function $814ac91a32d626ba$export$b3552e87a7c5c47b(config) {
915
918
  return {
916
919
  name: "sanity-tutorials",
917
- component: (0, $e6d104338a42de87$export$5f156cc357b8467f),
920
+ component: (0, $375b2dfb4ba4a890$export$5f156cc357b8467f),
918
921
  layout: config?.layout ?? {
919
922
  width: "full"
920
923
  }
@@ -922,11 +925,11 @@ function $dfd7c10d2685c9b1$export$b3552e87a7c5c47b(config) {
922
925
  }
923
926
 
924
927
 
925
- const $090815f5086f7f29$var$strokeStyle = {
928
+ const $357f50a17451fe9f$var$strokeStyle = {
926
929
  stroke: "currentColor",
927
930
  strokeWidth: 1.2
928
931
  };
929
- const $090815f5086f7f29$var$DashboardIcon = ()=>/*#__PURE__*/ (0, $5lYf0$jsxs)("svg", {
932
+ const $357f50a17451fe9f$var$DashboardIcon = ()=>/*#__PURE__*/ (0, $7XdDa$jsxs)("svg", {
930
933
  "data-sanity-icon": true,
931
934
  viewBox: "0 0 25 25",
932
935
  fill: "none",
@@ -935,21 +938,21 @@ const $090815f5086f7f29$var$DashboardIcon = ()=>/*#__PURE__*/ (0, $5lYf0$jsxs)("
935
938
  width: "1em",
936
939
  height: "1em",
937
940
  children: [
938
- /*#__PURE__*/ (0, $5lYf0$jsx)("path", {
941
+ /*#__PURE__*/ (0, $7XdDa$jsx)("path", {
939
942
  d: "M19.5 19.5H5.5V5.5H19.5V19.5Z",
940
- style: $090815f5086f7f29$var$strokeStyle
943
+ style: $357f50a17451fe9f$var$strokeStyle
941
944
  }),
942
- /*#__PURE__*/ (0, $5lYf0$jsx)("path", {
945
+ /*#__PURE__*/ (0, $7XdDa$jsx)("path", {
943
946
  d: "M5.5 12.5H19.5",
944
- style: $090815f5086f7f29$var$strokeStyle
947
+ style: $357f50a17451fe9f$var$strokeStyle
945
948
  }),
946
- /*#__PURE__*/ (0, $5lYf0$jsx)("path", {
949
+ /*#__PURE__*/ (0, $7XdDa$jsx)("path", {
947
950
  d: "M14.5 19.5V12.5M10.5 12.5V5.5",
948
- style: $090815f5086f7f29$var$strokeStyle
951
+ style: $357f50a17451fe9f$var$strokeStyle
949
952
  })
950
953
  ]
951
954
  });
952
- const $090815f5086f7f29$export$dd097bc0a3a5adbd = (0, $5lYf0$createPlugin)((config = {})=>{
955
+ const $357f50a17451fe9f$export$dd097bc0a3a5adbd = (0, $7XdDa$createPlugin)((config = {})=>{
953
956
  const pluginConfig = {
954
957
  layout: config.defaultLayout ?? {},
955
958
  widgets: config.widgets ?? []
@@ -962,8 +965,8 @@ const $090815f5086f7f29$export$dd097bc0a3a5adbd = (0, $5lYf0$createPlugin)((conf
962
965
  {
963
966
  title: "Dashboard",
964
967
  name: "dashboard",
965
- icon: $090815f5086f7f29$var$DashboardIcon,
966
- component: ()=>/*#__PURE__*/ (0, $5lYf0$jsx)((0, $086586914f992408$export$fe82a520fc33e5f4), {
968
+ icon: $357f50a17451fe9f$var$DashboardIcon,
969
+ component: ()=>/*#__PURE__*/ (0, $7XdDa$jsx)((0, $415e81216941c75c$export$fe82a520fc33e5f4), {
967
970
  config: pluginConfig
968
971
  })
969
972
  },
@@ -973,5 +976,5 @@ const $090815f5086f7f29$export$dd097bc0a3a5adbd = (0, $5lYf0$createPlugin)((conf
973
976
  });
974
977
 
975
978
 
976
- export {$090815f5086f7f29$export$dd097bc0a3a5adbd as dashboardTool, $1f0cda7387acedc8$export$67b2e85605d868b2 as DashboardWidgetContainer, $ac478372f28acbf6$export$66362ea0e7ee12e as projectInfoWidget, $0ef0fb9920ec1f58$export$5c0e62d7539f632 as projectUsersWidget, $dfd7c10d2685c9b1$export$b3552e87a7c5c47b as sanityTutorialsWidget};
979
+ export {$357f50a17451fe9f$export$dd097bc0a3a5adbd as dashboardTool, $17a16bf8b6a46960$export$67b2e85605d868b2 as DashboardWidgetContainer, $78de0fa9a220e58e$export$66362ea0e7ee12e as projectInfoWidget, $f409fc720124d423$export$5c0e62d7539f632 as projectUsersWidget, $814ac91a32d626ba$export$b3552e87a7c5c47b as sanityTutorialsWidget};
977
980
  //# sourceMappingURL=index.js.map