@nocode-factory/sanity-kit 2.25.0 → 2.27.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/{componentDefaults-BY3hQ6aD.js → componentDefaults-2eWjLLBf.js} +6 -6
- package/dist/componentDefaults-2eWjLLBf.js.map +1 -0
- package/dist/index.d.ts +11 -3
- package/dist/index.js +605 -406
- package/dist/index.js.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/web-server.js +2 -2
- package/dist/web-server.js.map +1 -1
- package/dist/web.js +9 -9
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/PropagatePublish.tsx +52 -21
- package/src/actions/RemoveFromSite.tsx +9 -9
- package/src/config/defaults.ts +8 -8
- package/src/config/resolve.ts +4 -1
- package/src/config/types.ts +8 -0
- package/src/config/validate.ts +24 -24
- package/src/context/BoardLayoutContext.tsx +1 -1
- package/src/context/KitContext.tsx +1 -1
- package/src/context/PreviewTargetContext.tsx +1 -1
- package/src/form/OverrideInput.tsx +67 -6
- package/src/form/SlugUrlInput.tsx +2 -2
- package/src/form/TranslationTodoInput.tsx +38 -4
- package/src/hooks/useHistory.ts +5 -5
- package/src/hooks/useOccurrences.ts +1 -1
- package/src/hooks/useOpenOnline.ts +4 -4
- package/src/hooks/useTranslationTodo.ts +2 -1
- package/src/index.ts +9 -5
- package/src/lib/aiTexts.ts +72 -0
- package/src/lib/aiTranslate.ts +61 -0
- package/src/lib/grouping.ts +2 -2
- package/src/lib/overrides.ts +10 -10
- package/src/lib/pages.ts +3 -3
- package/src/lib/service.ts +5 -5
- package/src/lib/status.ts +3 -3
- package/src/lib/studioLinks.ts +6 -6
- package/src/schema/boardLayout.ts +32 -32
- package/src/schema/componentDefaults.ts +5 -5
- package/src/schema/translationTodo.ts +6 -6
- package/src/tools/components/BlockCard.tsx +3 -3
- package/src/tools/components/ComponentsTool.tsx +17 -17
- package/src/tools/components/map/SectionNode.tsx +1 -1
- package/src/tools/components/map/SectionsMap.tsx +10 -10
- package/src/tools/designSystem/DesignSystemTool.tsx +3 -3
- package/src/tools/history/DiffPanel.tsx +23 -23
- package/src/tools/history/HistoryTool.tsx +21 -23
- package/src/tools/more/MoreTool.tsx +1 -1
- package/src/tools/navbar/KitUpdate.tsx +8 -8
- package/src/tools/navbar/PreviewLauncher.tsx +6 -6
- package/src/tools/navbar/ToolButtons.tsx +2 -2
- package/src/tools/pages/ColumnHeader.tsx +18 -18
- package/src/tools/pages/ColumnVisibility.tsx +10 -10
- package/src/tools/pages/FieldValue.tsx +9 -9
- package/src/tools/pages/PagesTable.tsx +11 -11
- package/src/tools/pages/PagesTool.tsx +19 -19
- package/src/tools/pages/PagesToolbar.tsx +3 -3
- package/src/tools/pages/PathCell.tsx +1 -1
- package/src/tools/pages/PreviewTarget.tsx +10 -10
- package/src/tools/pages/SharePreview.tsx +19 -20
- package/src/tools/pages/TagCell.tsx +2 -2
- package/src/tools/pages/ViewTabs.tsx +4 -4
- package/src/tools/pages/board/BoardView.tsx +11 -11
- package/src/tools/pages/board/PageNode.tsx +5 -5
- package/src/tools/pages/board/PagePanel.tsx +10 -10
- package/src/tools/presentation/PreviewHeader.tsx +1 -1
- package/src/tools/shared/AnnotationNode.tsx +3 -3
- package/src/ui/ActorName.tsx +1 -1
- package/src/ui/ConfigIssues.tsx +3 -3
- package/src/ui/PreviewOriginsNotice.tsx +3 -3
- package/src/ui/ProjectStatusNotice.tsx +7 -7
- package/src/ui/QueryError.tsx +2 -2
- package/src/ui/ToolPlaceholder.tsx +2 -2
- package/src/ui/formatDate.ts +1 -1
- package/src/version.ts +1 -1
- package/src/web/PreviewBanner.tsx +9 -9
- package/src/web/draftModeToggle.ts +1 -1
- package/src/web/previewGrant.ts +5 -5
- package/dist/componentDefaults-BY3hQ6aD.js.map +0 -1
|
@@ -199,7 +199,7 @@ function MapCanvas(props: SectionsMapProps) {
|
|
|
199
199
|
<Stack gap={3}>
|
|
200
200
|
<Flex gap={2} align="center" wrap="wrap">
|
|
201
201
|
<Button
|
|
202
|
-
text="
|
|
202
|
+
text="Auto arrange"
|
|
203
203
|
mode="ghost"
|
|
204
204
|
fontSize={1}
|
|
205
205
|
padding={2}
|
|
@@ -215,20 +215,20 @@ function MapCanvas(props: SectionsMapProps) {
|
|
|
215
215
|
/>
|
|
216
216
|
<Button
|
|
217
217
|
icon={AddIcon}
|
|
218
|
-
text="
|
|
218
|
+
text="Shape"
|
|
219
219
|
mode="ghost"
|
|
220
220
|
fontSize={1}
|
|
221
221
|
padding={2}
|
|
222
222
|
onClick={() => addAnnotation('rect', screenToFlowPosition({x: 300, y: 320}))}
|
|
223
223
|
/>
|
|
224
224
|
<Text size={0} muted>
|
|
225
|
-
|
|
225
|
+
Dragging a tile saves its position · clicking shows its pages
|
|
226
226
|
</Text>
|
|
227
227
|
</Flex>
|
|
228
228
|
|
|
229
229
|
{saveError && (
|
|
230
230
|
<Card padding={3} radius={2} tone="critical">
|
|
231
|
-
<Text size={1}>
|
|
231
|
+
<Text size={1}>The layout could not be saved: {saveError.message}</Text>
|
|
232
232
|
</Card>
|
|
233
233
|
)}
|
|
234
234
|
|
|
@@ -280,13 +280,13 @@ function MapCanvas(props: SectionsMapProps) {
|
|
|
280
280
|
padding={1}
|
|
281
281
|
fontSize={0}
|
|
282
282
|
icon={CloseIcon}
|
|
283
|
-
aria-label="
|
|
283
|
+
aria-label="Close"
|
|
284
284
|
onClick={() => setSelected(null)}
|
|
285
285
|
/>
|
|
286
286
|
</Flex>
|
|
287
287
|
<Text size={0} muted>
|
|
288
288
|
{selectedEntry.occurrence.count === 0
|
|
289
|
-
? '
|
|
289
|
+
? 'Never used on the site.'
|
|
290
290
|
: `${selectedPages.length} page${selectedPages.length > 1 ? 's' : ''} · ${selectedEntry.occurrence.count} instance${selectedEntry.occurrence.count > 1 ? 's' : ''}`}
|
|
291
291
|
</Text>
|
|
292
292
|
{openComponent && (
|
|
@@ -296,8 +296,8 @@ function MapCanvas(props: SectionsMapProps) {
|
|
|
296
296
|
tone="primary"
|
|
297
297
|
fontSize={1}
|
|
298
298
|
padding={2}
|
|
299
|
-
text="
|
|
300
|
-
title="
|
|
299
|
+
text="Open component"
|
|
300
|
+
title="Real rendering and default values, side by side"
|
|
301
301
|
onClick={() => openComponent(selectedEntry.block.name)}
|
|
302
302
|
/>
|
|
303
303
|
</Box>
|
|
@@ -336,7 +336,7 @@ function MapCanvas(props: SectionsMapProps) {
|
|
|
336
336
|
fontSize={1}
|
|
337
337
|
padding={2}
|
|
338
338
|
icon={LaunchIcon}
|
|
339
|
-
text="
|
|
339
|
+
text="View on the design system"
|
|
340
340
|
/>
|
|
341
341
|
</Box>
|
|
342
342
|
)}
|
|
@@ -344,7 +344,7 @@ function MapCanvas(props: SectionsMapProps) {
|
|
|
344
344
|
) : (
|
|
345
345
|
<Flex align="center" justify="center" style={{height: '100%'}}>
|
|
346
346
|
<Text size={0} muted align="center">
|
|
347
|
-
|
|
347
|
+
Click a section to open it (real rendering and default values) or go to where it is used in the pages.
|
|
348
348
|
</Text>
|
|
349
349
|
</Flex>
|
|
350
350
|
)}
|
|
@@ -48,12 +48,12 @@ export function DesignSystemTool() {
|
|
|
48
48
|
</Text>
|
|
49
49
|
<Text size={1} muted>
|
|
50
50
|
{available
|
|
51
|
-
? `
|
|
52
|
-
: '
|
|
51
|
+
? `Opens the ${config.componentPreview.path} page in Presentation, with the component default values. A style changed here changes the component everywhere it is not overridden.`
|
|
52
|
+
: 'No component default values document and no previewUrl: nothing to open. See the kit checklist (README).'}
|
|
53
53
|
</Text>
|
|
54
54
|
{available && (
|
|
55
55
|
<Flex>
|
|
56
|
-
<Button text="
|
|
56
|
+
<Button text="Open design system" tone="primary" fontSize={1} onClick={open} />
|
|
57
57
|
</Flex>
|
|
58
58
|
)}
|
|
59
59
|
</Stack>
|
|
@@ -51,7 +51,7 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
51
51
|
if (!controller.signal.aborted) setDetail(result)
|
|
52
52
|
})
|
|
53
53
|
.catch(() => {
|
|
54
|
-
if (!controller.signal.aborted) setError(
|
|
54
|
+
if (!controller.signal.aborted) setError('This detail could not be loaded.')
|
|
55
55
|
})
|
|
56
56
|
.finally(() => {
|
|
57
57
|
if (!controller.signal.aborted) setLoading(false)
|
|
@@ -121,7 +121,7 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
121
121
|
</Text>
|
|
122
122
|
<Flex gap={2} align="center">
|
|
123
123
|
<Text size={0} muted>
|
|
124
|
-
{new Date(event.occurred_at).toLocaleString('
|
|
124
|
+
{new Date(event.occurred_at).toLocaleString('en-US')} ·
|
|
125
125
|
</Text>
|
|
126
126
|
<ActorName actorId={event.actor_id} actorName={event.actor_name} />
|
|
127
127
|
</Flex>
|
|
@@ -131,7 +131,7 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
131
131
|
padding={1}
|
|
132
132
|
fontSize={0}
|
|
133
133
|
icon={CloseIcon}
|
|
134
|
-
aria-label="
|
|
134
|
+
aria-label="Close"
|
|
135
135
|
onClick={onClose}
|
|
136
136
|
/>
|
|
137
137
|
</Flex>
|
|
@@ -140,7 +140,7 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
140
140
|
<Flex align="center" gap={2} padding={3}>
|
|
141
141
|
<Spinner muted />
|
|
142
142
|
<Text size={1} muted>
|
|
143
|
-
|
|
143
|
+
Loading…
|
|
144
144
|
</Text>
|
|
145
145
|
</Flex>
|
|
146
146
|
)}
|
|
@@ -155,12 +155,12 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
155
155
|
<Card padding={3} radius={2} tone="positive">
|
|
156
156
|
<Stack gap={3}>
|
|
157
157
|
<Text size={1}>
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
Done <b>in the draft</b>. Nothing is live yet: open the document,
|
|
159
|
+
check it, then <b>publish</b>.
|
|
160
160
|
</Text>
|
|
161
161
|
{conflicts.length > 0 && (
|
|
162
162
|
<Text size={1}>
|
|
163
|
-
|
|
163
|
+
Not undone, because changed since: {conflicts.join(', ')}.
|
|
164
164
|
</Text>
|
|
165
165
|
)}
|
|
166
166
|
<IntentLink
|
|
@@ -168,7 +168,7 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
168
168
|
params={{id: restored, type: event.document_type}}
|
|
169
169
|
style={{textDecoration: 'none'}}
|
|
170
170
|
>
|
|
171
|
-
<Button mode="ghost" fontSize={1} padding={2} text="
|
|
171
|
+
<Button mode="ghost" fontSize={1} padding={2} text="Open draft" as="span" />
|
|
172
172
|
</IntentLink>
|
|
173
173
|
</Stack>
|
|
174
174
|
</Card>
|
|
@@ -178,18 +178,18 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
178
178
|
<>
|
|
179
179
|
{!detail.previous && (
|
|
180
180
|
<Text size={0} muted>
|
|
181
|
-
|
|
181
|
+
First known state: everything shows as added.
|
|
182
182
|
</Text>
|
|
183
183
|
)}
|
|
184
184
|
|
|
185
185
|
{changes.length === 0 ? (
|
|
186
186
|
<Text size={1} muted>
|
|
187
|
-
|
|
187
|
+
No content changes, only system fields changed.
|
|
188
188
|
</Text>
|
|
189
189
|
) : (
|
|
190
190
|
<Stack gap={2}>
|
|
191
191
|
<Text size={0} weight="semibold" muted>
|
|
192
|
-
{changes.length}
|
|
192
|
+
{changes.length} change{changes.length > 1 ? 's' : ''}
|
|
193
193
|
</Text>
|
|
194
194
|
<Card radius={2} border style={{overflow: 'hidden'}}>
|
|
195
195
|
<Stack>
|
|
@@ -221,14 +221,14 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
221
221
|
fontSize={1}
|
|
222
222
|
padding={3}
|
|
223
223
|
icon={UndoIcon}
|
|
224
|
-
text={restoring ? '
|
|
224
|
+
text={restoring ? 'Undoing…' : 'Undo this change'}
|
|
225
225
|
disabled={restoring}
|
|
226
226
|
onClick={undo}
|
|
227
227
|
/>
|
|
228
228
|
<Text size={0} muted>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
Restores the values from before this change, and only those: anything
|
|
230
|
+
changed afterwards is kept. The result goes into the draft: publish it
|
|
231
|
+
to put it live.
|
|
232
232
|
</Text>
|
|
233
233
|
</Stack>
|
|
234
234
|
)}
|
|
@@ -239,14 +239,14 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
239
239
|
fontSize={1}
|
|
240
240
|
padding={3}
|
|
241
241
|
icon={RestoreIcon}
|
|
242
|
-
text={restoring ? '
|
|
242
|
+
text={restoring ? 'Restoring…' : 'Restore the document as it was after this change'}
|
|
243
243
|
disabled={restoring}
|
|
244
244
|
onClick={restore}
|
|
245
245
|
/>
|
|
246
246
|
<Text size={0} muted>
|
|
247
|
-
|
|
248
|
-
(
|
|
249
|
-
|
|
247
|
+
Puts the ENTIRE document back in the state that followed this change
|
|
248
|
+
(more recent changes are lost), in the draft. The published version is
|
|
249
|
+
not touched until you publish.
|
|
250
250
|
</Text>
|
|
251
251
|
</Stack>
|
|
252
252
|
</Stack>
|
|
@@ -265,13 +265,13 @@ export function DiffPanel(props: DiffPanelProps) {
|
|
|
265
265
|
function explainRestore(cause: unknown): string {
|
|
266
266
|
const message = cause instanceof Error ? cause.message : String(cause)
|
|
267
267
|
if (/permission|insufficient|not allowed/i.test(message)) {
|
|
268
|
-
return "
|
|
268
|
+
return "Your permissions on this dataset do not allow writing this document."
|
|
269
269
|
}
|
|
270
270
|
if (/schema|unknown type|invalid/i.test(message)) {
|
|
271
271
|
return (
|
|
272
|
-
|
|
273
|
-
'
|
|
272
|
+
'This state no longer matches the current schema: the type has changed since. ' +
|
|
273
|
+
'It cannot be restored without manual intervention.'
|
|
274
274
|
)
|
|
275
275
|
}
|
|
276
|
-
return `
|
|
276
|
+
return `Restore failed, nothing was changed. (${message.slice(0, 120)})`
|
|
277
277
|
}
|
|
@@ -9,9 +9,9 @@ import {ActorName} from '../../ui/ActorName'
|
|
|
9
9
|
import type {HistoryEvent} from '../../lib/service'
|
|
10
10
|
|
|
11
11
|
const OPERATION: Record<string, {label: string; tone: 'positive' | 'primary' | 'critical'}> = {
|
|
12
|
-
create: {label: '
|
|
13
|
-
update: {label: '
|
|
14
|
-
delete: {label: '
|
|
12
|
+
create: {label: 'created', tone: 'positive'},
|
|
13
|
+
update: {label: 'updated', tone: 'primary'},
|
|
14
|
+
delete: {label: 'deleted', tone: 'critical'},
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
type Scope = 'all' | 'published'
|
|
@@ -23,8 +23,8 @@ type Scope = 'all' | 'published'
|
|
|
23
23
|
* « qu'est-ce qui a été touché ? ».
|
|
24
24
|
*/
|
|
25
25
|
const SCOPES: {id: Scope; label: string}[] = [
|
|
26
|
-
{id: 'all', label: '
|
|
27
|
-
{id: 'published', label: '
|
|
26
|
+
{id: 'all', label: 'All'},
|
|
27
|
+
{id: 'published', label: 'Published'},
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
/** Journal des modifications du dataset, alimenté par les webhooks Sanity. */
|
|
@@ -54,18 +54,18 @@ export function HistoryTool() {
|
|
|
54
54
|
<Card padding={4} radius={3} tone="caution">
|
|
55
55
|
<Stack gap={3}>
|
|
56
56
|
<Text size={1} weight="semibold">
|
|
57
|
-
|
|
57
|
+
History not configured
|
|
58
58
|
</Text>
|
|
59
59
|
<Text size={1}>
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
No read key. In the studio folder, the following command enables the project,
|
|
61
|
+
writes the key to <code>.env</code> and creates the log webhook:
|
|
62
62
|
</Text>
|
|
63
63
|
<Text size={0} style={MONO}>
|
|
64
64
|
npx ncf-kit setup --types page,homePage
|
|
65
65
|
</Text>
|
|
66
66
|
<Text size={0} muted>
|
|
67
|
-
|
|
68
|
-
sanity.config.ts
|
|
67
|
+
Then add <code>history: {'{'}projectKey: process.env.SANITY_STUDIO_NCF_PROJECT_KEY{'}'}</code> to
|
|
68
|
+
sanity.config.ts and redeploy the studio. Or hide this tab with{' '}
|
|
69
69
|
<code>tools: {'{'}history: false{'}'}</code>.
|
|
70
70
|
</Text>
|
|
71
71
|
</Stack>
|
|
@@ -83,7 +83,7 @@ export function HistoryTool() {
|
|
|
83
83
|
fontSize={1}
|
|
84
84
|
padding={3}
|
|
85
85
|
radius={2}
|
|
86
|
-
placeholder="
|
|
86
|
+
placeholder="Filter by document, type or author…"
|
|
87
87
|
value={search}
|
|
88
88
|
onChange={(event) => setSearch(event.currentTarget.value)}
|
|
89
89
|
/>
|
|
@@ -105,7 +105,7 @@ export function HistoryTool() {
|
|
|
105
105
|
fontSize={1}
|
|
106
106
|
padding={3}
|
|
107
107
|
icon={RefreshIcon}
|
|
108
|
-
text="
|
|
108
|
+
text="Refresh"
|
|
109
109
|
onClick={refresh}
|
|
110
110
|
/>
|
|
111
111
|
</Flex>
|
|
@@ -120,7 +120,7 @@ export function HistoryTool() {
|
|
|
120
120
|
<Flex align="center" gap={2} padding={4}>
|
|
121
121
|
<Spinner muted />
|
|
122
122
|
<Text size={1} muted>
|
|
123
|
-
|
|
123
|
+
Loading the log…
|
|
124
124
|
</Text>
|
|
125
125
|
</Flex>
|
|
126
126
|
)}
|
|
@@ -129,13 +129,12 @@ export function HistoryTool() {
|
|
|
129
129
|
<Card padding={4} radius={3} tone="transparent" border>
|
|
130
130
|
<Stack gap={3}>
|
|
131
131
|
<Text size={1} weight="semibold">
|
|
132
|
-
|
|
132
|
+
No changes recorded
|
|
133
133
|
</Text>
|
|
134
134
|
<Text size={1} muted>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
dataset de ce Studio.
|
|
135
|
+
The log is filled by this project's Sanity webhook. If it was just set up,
|
|
136
|
+
only upcoming changes will appear: nothing is rebuilt retroactively. Also
|
|
137
|
+
check that the webhook targets this Studio's dataset.
|
|
139
138
|
</Text>
|
|
140
139
|
</Stack>
|
|
141
140
|
</Card>
|
|
@@ -175,7 +174,7 @@ export function HistoryTool() {
|
|
|
175
174
|
fontSize={0}
|
|
176
175
|
padding={1}
|
|
177
176
|
>
|
|
178
|
-
{event.is_draft ? '
|
|
177
|
+
{event.is_draft ? 'draft' : 'published'}
|
|
179
178
|
</Badge>
|
|
180
179
|
</Box>
|
|
181
180
|
<Box flex={1} style={{minWidth: 0}}>
|
|
@@ -188,7 +187,7 @@ export function HistoryTool() {
|
|
|
188
187
|
</Box>
|
|
189
188
|
<Box style={{width: 140, flex: 'none'}}>
|
|
190
189
|
<Text size={0} muted>
|
|
191
|
-
{new Date(event.occurred_at).toLocaleString('
|
|
190
|
+
{new Date(event.occurred_at).toLocaleString('en-US', {
|
|
192
191
|
day: '2-digit',
|
|
193
192
|
month: '2-digit',
|
|
194
193
|
hour: '2-digit',
|
|
@@ -209,7 +208,7 @@ export function HistoryTool() {
|
|
|
209
208
|
mode="ghost"
|
|
210
209
|
fontSize={1}
|
|
211
210
|
padding={3}
|
|
212
|
-
text={loading ? '
|
|
211
|
+
text={loading ? 'Loading…' : 'Load more'}
|
|
213
212
|
disabled={loading}
|
|
214
213
|
onClick={loadMore}
|
|
215
214
|
/>
|
|
@@ -218,8 +217,7 @@ export function HistoryTool() {
|
|
|
218
217
|
|
|
219
218
|
{search && visible.length === 0 && events.length > 0 && (
|
|
220
219
|
<Text size={1} muted>
|
|
221
|
-
|
|
222
|
-
chargés.
|
|
220
|
+
No matching events. The filter only applies to events already loaded.
|
|
223
221
|
</Text>
|
|
224
222
|
)}
|
|
225
223
|
</Stack>
|
|
@@ -73,7 +73,7 @@ export function withMoreTool(tools: Tool[], names: string[] = DEFAULT_MORE_TOOLS
|
|
|
73
73
|
|
|
74
74
|
const more: Tool<MoreToolOptions> = {
|
|
75
75
|
name: NCF_MORE_TOOL,
|
|
76
|
-
title: '
|
|
76
|
+
title: 'More',
|
|
77
77
|
icon: EllipsisHorizontalIcon,
|
|
78
78
|
component: MoreToolComponent,
|
|
79
79
|
options: {tools: hidden},
|
|
@@ -47,7 +47,7 @@ export function NcfKitUpdate(props: {inline?: boolean}) {
|
|
|
47
47
|
padding={props.inline ? 2 : 3}
|
|
48
48
|
icon={ArrowUpIcon}
|
|
49
49
|
text={`Kit ${update.latest}`}
|
|
50
|
-
title={`
|
|
50
|
+
title={`A newer version of the kit is available (you are running ${update.current})`}
|
|
51
51
|
justify={props.inline ? undefined : 'flex-start'}
|
|
52
52
|
onClick={toggle}
|
|
53
53
|
/>
|
|
@@ -57,10 +57,10 @@ export function NcfKitUpdate(props: {inline?: boolean}) {
|
|
|
57
57
|
<Stack gap={3} padding={2}>
|
|
58
58
|
<Stack gap={2}>
|
|
59
59
|
<Text size={1} weight="semibold">
|
|
60
|
-
Kit {update.latest}
|
|
60
|
+
Kit {update.latest} available
|
|
61
61
|
</Text>
|
|
62
62
|
<Text size={0} muted>
|
|
63
|
-
|
|
63
|
+
You are running {update.current}.
|
|
64
64
|
</Text>
|
|
65
65
|
</Stack>
|
|
66
66
|
|
|
@@ -77,7 +77,7 @@ export function NcfKitUpdate(props: {inline?: boolean}) {
|
|
|
77
77
|
fontSize={1}
|
|
78
78
|
padding={2}
|
|
79
79
|
icon={copied ? CheckmarkIcon : CopyIcon}
|
|
80
|
-
text={copied ? '
|
|
80
|
+
text={copied ? 'Copied' : 'Copy command'}
|
|
81
81
|
onClick={copy}
|
|
82
82
|
/>
|
|
83
83
|
<Button
|
|
@@ -88,15 +88,15 @@ export function NcfKitUpdate(props: {inline?: boolean}) {
|
|
|
88
88
|
mode="bleed"
|
|
89
89
|
fontSize={1}
|
|
90
90
|
padding={2}
|
|
91
|
-
text="
|
|
91
|
+
text="What's new"
|
|
92
92
|
/>
|
|
93
93
|
</Flex>
|
|
94
94
|
|
|
95
95
|
<Box style={{borderTop: `1px solid ${BORDER}`, paddingTop: 10}}>
|
|
96
96
|
<Text size={0} muted>
|
|
97
|
-
|
|
98
|
-
<code>npx sanity deploy</code>.
|
|
99
|
-
|
|
97
|
+
Run it in <code>studio/</code> then <code>web/</code>, followed by{' '}
|
|
98
|
+
<code>npx sanity deploy</code>. The Studio cannot do it itself: it runs in your
|
|
99
|
+
browser, not on the machine that builds it.
|
|
100
100
|
</Text>
|
|
101
101
|
</Box>
|
|
102
102
|
</Stack>
|
|
@@ -85,8 +85,8 @@ export function NcfPreviewLauncher(props: ToolMenuProps) {
|
|
|
85
85
|
fontSize={1}
|
|
86
86
|
padding={inline ? 2 : 3}
|
|
87
87
|
icon={EyeOpenIcon}
|
|
88
|
-
text="
|
|
89
|
-
title="
|
|
88
|
+
text="Preview"
|
|
89
|
+
title="Open the site in the preview"
|
|
90
90
|
justify={inline ? undefined : 'flex-start'}
|
|
91
91
|
onClick={toggle}
|
|
92
92
|
/>
|
|
@@ -96,7 +96,7 @@ export function NcfPreviewLauncher(props: ToolMenuProps) {
|
|
|
96
96
|
<Stack gap={1}>
|
|
97
97
|
<Box paddingX={2} paddingTop={1} paddingBottom={2}>
|
|
98
98
|
<Text size={0} muted>
|
|
99
|
-
|
|
99
|
+
Click: opens in the Studio. The ↗ icon: opens the live site.
|
|
100
100
|
</Text>
|
|
101
101
|
</Box>
|
|
102
102
|
{previewTargets(environments, config.previewUrl).map((target) => {
|
|
@@ -113,7 +113,7 @@ export function NcfPreviewLauncher(props: ToolMenuProps) {
|
|
|
113
113
|
close()
|
|
114
114
|
}}
|
|
115
115
|
style={{cursor: 'pointer', borderRadius: 6, minWidth: 0, background: tone.background, color: tone.color}}
|
|
116
|
-
title="
|
|
116
|
+
title="Open in the Studio (Presentation)"
|
|
117
117
|
>
|
|
118
118
|
<Stack gap={1} style={{minWidth: 0}}>
|
|
119
119
|
<Text size={1} weight="semibold" style={{color: tone.color}}>
|
|
@@ -129,8 +129,8 @@ export function NcfPreviewLauncher(props: ToolMenuProps) {
|
|
|
129
129
|
padding={2}
|
|
130
130
|
fontSize={1}
|
|
131
131
|
icon={LaunchIcon}
|
|
132
|
-
title="
|
|
133
|
-
aria-label={`
|
|
132
|
+
title="Open the live site in a new tab"
|
|
133
|
+
aria-label={`Open ${target.label} in a new tab`}
|
|
134
134
|
onClick={() => {
|
|
135
135
|
openOnline(target.environment, target.perspective)
|
|
136
136
|
close()
|
|
@@ -64,12 +64,12 @@ export function NcfToolButtons(props: ToolMenuProps & {more: string[]}) {
|
|
|
64
64
|
button={
|
|
65
65
|
<Button
|
|
66
66
|
icon={EllipsisHorizontalIcon}
|
|
67
|
-
text="
|
|
67
|
+
text="More"
|
|
68
68
|
mode="bleed"
|
|
69
69
|
fontSize={1}
|
|
70
70
|
padding={3}
|
|
71
71
|
selected={more.some((t) => t.name === activeToolName)}
|
|
72
|
-
title={`
|
|
72
|
+
title={`Technical tools (${more.map((t) => t.title || t.name).join(', ')})`}
|
|
73
73
|
/>
|
|
74
74
|
}
|
|
75
75
|
menu={
|
|
@@ -50,17 +50,17 @@ export function ColumnHeader(props: ColumnHeaderProps) {
|
|
|
50
50
|
return (
|
|
51
51
|
<Flex align="center" gap={1}>
|
|
52
52
|
<Text size={0} muted>
|
|
53
|
-
|
|
53
|
+
Delete?
|
|
54
54
|
</Text>
|
|
55
55
|
<Button
|
|
56
56
|
mode="bleed"
|
|
57
57
|
tone="critical"
|
|
58
58
|
padding={1}
|
|
59
59
|
fontSize={0}
|
|
60
|
-
text="
|
|
60
|
+
text="Yes"
|
|
61
61
|
onClick={() => onRemove(column.id)}
|
|
62
62
|
/>
|
|
63
|
-
<Button mode="bleed" padding={1} fontSize={0} text="
|
|
63
|
+
<Button mode="bleed" padding={1} fontSize={0} text="No" onClick={() => setConfirming(false)} />
|
|
64
64
|
</Flex>
|
|
65
65
|
)
|
|
66
66
|
}
|
|
@@ -74,7 +74,7 @@ export function ColumnHeader(props: ColumnHeaderProps) {
|
|
|
74
74
|
onMouseLeave={() => setHovered(false)}
|
|
75
75
|
>
|
|
76
76
|
<Box flex={1} style={{minWidth: 0, cursor: 'text'}} onClick={() => setEditing(true)}>
|
|
77
|
-
<Text size={0} weight="medium" muted textOverflow="ellipsis" title="
|
|
77
|
+
<Text size={0} weight="medium" muted textOverflow="ellipsis" title="Click to rename">
|
|
78
78
|
{column.label || column.id}
|
|
79
79
|
</Text>
|
|
80
80
|
</Box>
|
|
@@ -94,8 +94,8 @@ export function ColumnHeader(props: ColumnHeaderProps) {
|
|
|
94
94
|
padding={1}
|
|
95
95
|
fontSize={0}
|
|
96
96
|
icon={UlistIcon}
|
|
97
|
-
title="
|
|
98
|
-
aria-label="
|
|
97
|
+
title="Manage choices"
|
|
98
|
+
aria-label="Manage column choices"
|
|
99
99
|
onClick={toggle}
|
|
100
100
|
/>
|
|
101
101
|
)}
|
|
@@ -108,8 +108,8 @@ export function ColumnHeader(props: ColumnHeaderProps) {
|
|
|
108
108
|
padding={1}
|
|
109
109
|
fontSize={0}
|
|
110
110
|
icon={ChevronLeftIcon}
|
|
111
|
-
title="
|
|
112
|
-
aria-label="
|
|
111
|
+
title="Move left"
|
|
112
|
+
aria-label="Move column left"
|
|
113
113
|
onClick={() => onMove(column.id, -1)}
|
|
114
114
|
/>
|
|
115
115
|
<Button
|
|
@@ -117,8 +117,8 @@ export function ColumnHeader(props: ColumnHeaderProps) {
|
|
|
117
117
|
padding={1}
|
|
118
118
|
fontSize={0}
|
|
119
119
|
icon={ChevronRightIcon}
|
|
120
|
-
title="
|
|
121
|
-
aria-label="
|
|
120
|
+
title="Move right"
|
|
121
|
+
aria-label="Move column right"
|
|
122
122
|
onClick={() => onMove(column.id, 1)}
|
|
123
123
|
/>
|
|
124
124
|
<Button
|
|
@@ -127,8 +127,8 @@ export function ColumnHeader(props: ColumnHeaderProps) {
|
|
|
127
127
|
fontSize={0}
|
|
128
128
|
icon={CloseIcon}
|
|
129
129
|
tone="critical"
|
|
130
|
-
title="
|
|
131
|
-
aria-label="
|
|
130
|
+
title="Delete column"
|
|
131
|
+
aria-label="Delete column"
|
|
132
132
|
onClick={() => setConfirming(true)}
|
|
133
133
|
/>
|
|
134
134
|
</Flex>
|
|
@@ -154,7 +154,7 @@ export function AddColumn(props: AddColumnProps) {
|
|
|
154
154
|
padding={1}
|
|
155
155
|
fontSize={0}
|
|
156
156
|
icon={AddIcon}
|
|
157
|
-
text="
|
|
157
|
+
text="Column"
|
|
158
158
|
onClick={() => setOpen(true)}
|
|
159
159
|
/>
|
|
160
160
|
)
|
|
@@ -175,7 +175,7 @@ export function AddColumn(props: AddColumnProps) {
|
|
|
175
175
|
padding={1}
|
|
176
176
|
radius={2}
|
|
177
177
|
autoFocus
|
|
178
|
-
placeholder="
|
|
178
|
+
placeholder="Column name"
|
|
179
179
|
value={label}
|
|
180
180
|
onChange={(event) => setLabel(event.currentTarget.value)}
|
|
181
181
|
onKeyDown={(event) => {
|
|
@@ -188,14 +188,14 @@ export function AddColumn(props: AddColumnProps) {
|
|
|
188
188
|
mode={type === 'text' ? 'default' : 'bleed'}
|
|
189
189
|
padding={1}
|
|
190
190
|
fontSize={0}
|
|
191
|
-
text="
|
|
191
|
+
text="Text"
|
|
192
192
|
onClick={() => setType('text')}
|
|
193
193
|
/>
|
|
194
194
|
<Button
|
|
195
195
|
mode={type === 'select' ? 'default' : 'bleed'}
|
|
196
196
|
padding={1}
|
|
197
197
|
fontSize={0}
|
|
198
|
-
text="
|
|
198
|
+
text="List"
|
|
199
199
|
onClick={() => setType('select')}
|
|
200
200
|
/>
|
|
201
201
|
</Flex>
|
|
@@ -205,10 +205,10 @@ export function AddColumn(props: AddColumnProps) {
|
|
|
205
205
|
tone="primary"
|
|
206
206
|
padding={1}
|
|
207
207
|
fontSize={0}
|
|
208
|
-
text="
|
|
208
|
+
text="Add"
|
|
209
209
|
onClick={submit}
|
|
210
210
|
/>
|
|
211
|
-
<Button mode="bleed" padding={1} fontSize={0} text="
|
|
211
|
+
<Button mode="bleed" padding={1} fontSize={0} text="Cancel" onClick={() => setOpen(false)} />
|
|
212
212
|
</Flex>
|
|
213
213
|
</Stack>
|
|
214
214
|
</Card>
|