@sanity/assist 6.0.4 → 6.0.6
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/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -60
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as sanity from "sanity";
|
|
1
|
+
import * as _$sanity from "sanity";
|
|
2
2
|
import { CurrentUser, DocumentFieldActionDivider, DocumentFieldActionGroup, DocumentFieldActionItem, ObjectSchemaType, Path, SanityClient, SanityDocumentLike, SchemaType } from "sanity";
|
|
3
3
|
import { SanityClient as SanityClient$1 } from "@sanity/client";
|
|
4
|
-
import { AgentActionPath } from "@sanity/client/stega";
|
|
4
|
+
import { AgentActionPath } from "/home/runner/work/plugins/plugins/node_modules/.pnpm/@sanity+client@7.21.0/node_modules/@sanity/client/dist/stega.js";
|
|
5
5
|
import { PortableTextBlock, PortableTextMarkDefinition, PortableTextSpan } from "@portabletext/types";
|
|
6
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
7
|
interface AssistConfig {
|
|
8
8
|
/**
|
|
9
9
|
* As of v3.0 Assist can write to date and datetime fields.
|
|
@@ -470,8 +470,8 @@ interface AssistPluginConfig {
|
|
|
470
470
|
*/
|
|
471
471
|
__presets?: Record<string, AssistPreset>;
|
|
472
472
|
}
|
|
473
|
-
declare const assist: sanity.Plugin<void | AssistPluginConfig>;
|
|
474
|
-
declare function SchemaTypeTool(): react_jsx_runtime0.JSX.Element;
|
|
473
|
+
declare const assist: _$sanity.Plugin<void | AssistPluginConfig>;
|
|
474
|
+
declare function SchemaTypeTool(): _$react_jsx_runtime0.JSX.Element;
|
|
475
475
|
interface AssistOptions {
|
|
476
476
|
aiAssist?: {
|
|
477
477
|
/** Set to true to disable assistance for this field or type */exclude?: boolean;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/assistTypes.ts","../src/fieldActions/customFieldActions.tsx","../src/translate/types.ts","../src/types.ts","../src/plugin.tsx","../src/schemas/serialize/SchemTypeTool.tsx","../src/schemas/typeDefExtensions.ts","../src/translate/paths.ts","../src/fieldActions/useUserInput.ts","../src/helpers/typeUtils.ts"],"mappings":";;;;;;UAEiB,YAAA;;;;;;AAAjB;;;;;;;;;;;;EAkBE,cAAA,IAAkB,OAAA,EAAS,qBAAA,KAA0B,cAAA;EAkCjB;;;;;;;;;AAKtC;;;;;;EAtBE,YAAA;ECXyC;;;;;;;;;AAM3C;;;EDmBE,WAAA;AAAA;AAAA,UAGe,qBAAA;EACf,IAAA,EAAM,WAAA;EACN,eAAA,EAAiB,cAAA;AAAA;AAAA,UAGF,cAAA;ECkGc;;;;;;;;;EDxF7B,MAAA;ECoDA;;;;;;;;AAuCF;;ED/EE,QAAA;AAAA;AAAA,UCvDe,0BAAA;EACf,IAAA,EAAM,eAAA;EACN,QAAA;EACA,MAAA;AAAA;AAAA,UAGe,sBAAA;ED9BY;;;;ECmC3B,UAAA;EDjBkB;;;;;;AAkCpB;;;;;;;;;;AAKA;ECJE,mBAAA;;;;;EAMA,kBAAA,EAAoB,gBAAA;EAnCqB;;;;;;EA2CzC,gBAAA,QAAwB,kBAAA;EAxClB;;AAGR;;;EA4CE,mBAAA,QAA2B,0BAAA;EAPH;;;;;;;;;;;;;;;;;;;;;EA8BxB,QAAA;EA0D6B;;AAG/B;;;;;;;;;;;;;AAKA;;;;;EA5CE,IAAA,EAAM,eAAA;EAgDwB;;;;;;;;AAGhC;;;;;;;;;;;;;;AAaA;;EAtCE,UAAA,EAAY,UAAA;EAuCC;;;;;;;;EA7Bb,gBAAA,GAAmB,UAAA;AAAA;AAAA,KAGT,qBAAA,GACR,qBAAA,GACA,sBAAA,GACA,0BAA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EACf,SAAA,GAAY,iBAAA;EJxBG;;;EI6Bf,MAAA,GAAS,YAAA;EAET,YAAA;IACE,KAAA;IJdgB;;;IIkBhB,eAAA,IAAmB,KAAA,EAAO,sBAAA,MAA4B,qBAAA;EAAA;EJa7C;AAGb;;EIVE,iBAAA,IAAqB,aAAA,EAAe,cAAA,KAAiB,cAAA;EJYtB;;;EIP/B,SAAA,GAAY,MAAA,SAAe,YAAA;AAAA;AAAA,cAGhB,MAAA,EAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/assistTypes.ts","../src/fieldActions/customFieldActions.tsx","../src/translate/types.ts","../src/types.ts","../src/plugin.tsx","../src/schemas/serialize/SchemTypeTool.tsx","../src/schemas/typeDefExtensions.ts","../src/translate/paths.ts","../src/fieldActions/useUserInput.ts","../src/helpers/typeUtils.ts"],"mappings":";;;;;;UAEiB,YAAA;;;;;;AAAjB;;;;;;;;;;;;EAkBE,cAAA,IAAkB,OAAA,EAAS,qBAAA,KAA0B,cAAA;EAkCjB;;;;;;;;;AAKtC;;;;;;EAtBE,YAAA;ECXyC;;;;;;;;;AAM3C;;;EDmBE,WAAA;AAAA;AAAA,UAGe,qBAAA;EACf,IAAA,EAAM,WAAA;EACN,eAAA,EAAiB,cAAA;AAAA;AAAA,UAGF,cAAA;ECkGc;;;;;;;;;EDxF7B,MAAA;ECoDA;;;;;;;;AAuCF;;ED/EE,QAAA;AAAA;AAAA,UCvDe,0BAAA;EACf,IAAA,EAAM,eAAA;EACN,QAAA;EACA,MAAA;AAAA;AAAA,UAGe,sBAAA;ED9BY;;;;ECmC3B,UAAA;EDjBkB;;;;;;AAkCpB;;;;;;;;;;AAKA;ECJE,mBAAA;;;;;EAMA,kBAAA,EAAoB,gBAAA;EAnCqB;;;;;;EA2CzC,gBAAA,QAAwB,kBAAA;EAxClB;;AAGR;;;EA4CE,mBAAA,QAA2B,0BAAA;EAPH;;;;;;;;;;;;;;;;;;;;;EA8BxB,QAAA;EA0D6B;;A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A,UAIA,aAAA,SAAsB,aAAA;EAAA,UACtB,aAAA,SAAsB,aAAA;EAAA,UACtB,oBAAA;IACR,QAAA;ML2EmC,+DKzEjC,OAAA;ML0EI;;;;MKpEJ,eAAA;IAAA;EAAA;EAAA,UAGM,WAAA,SAAoB,aAAA;EAAA,UACpB,aAAA,SAAsB,aAAA;EAAA,UACtB,WAAA,SAAoB,aAAA;EAAA,UACpB,UAAA,SAAmB,aAAA;EAAA,UACnB,YAAA,SAAqB,aAAA;AAAA;AAAA,cCUpB,sBAAA,EAAwB,0BAAA;AAAA,KCrIzB,YAAA,IAAgB,IAAA;;;;EAI1B,KAAA;;;ARJF;EQQE,MAAA,EAAQ,WAAA;AAAA,MACJ,OAAA,CAAQ,iBAAA;;;;UAKG,WAAA;ERIsC;;;EQArD,EAAA;ER+BW;AAGb;;EQ9BE,KAAA;ERgC+B;;;EQ5B/B,WAAA;AAAA;AAAA,KAGU,iBAAA;ERyBqB;AAGjC;;EQxBE,KAAA,EAAO,WAAA;ERkCP;;;EQ7BA,MAAA;AAAA;;;;;;;;;APRF;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgIA;;;;;;;;;;;;;AAKA;;;;;;;;;;;iBO9DgB,YAAA,CAAA,GAAgB,YAAA;;;;;;ARrGhC;iBSUgB,MAAA,CAAO,UAAA,EAAY,UAAA,EAAY,QAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { pathToString, isVersionId, getVersionFromId, getPublishedId, useEditSta
|
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useToast, useLayer, Dialog, Stack, Flex, Tooltip, Text, Button, TextArea, Card, Box, ErrorBoundary, focusFirstDescendant, Spinner, Container, Autocomplete, Breadcrumbs, useClickOutside, Popover, useGlobalKeyDown, useTheme, rgba, Checkbox, Radio, ThemeProvider, MenuButton, MenuItem, Menu, Switch, Label } from "@sanity/ui";
|
|
5
5
|
import { useDocumentPane, usePaneRouter, DocumentPaneProvider, DocumentInspectorHeader } from "sanity/structure";
|
|
6
|
-
import { useRef, useState, useEffect, createContext, useContext, useCallback, useId, forwardRef, useMemo, useReducer } from "react";
|
|
6
|
+
import { useRef, useState, useEffect, createContext, useContext, useCallback, useId, forwardRef, useMemo, useEffectEvent, useReducer } from "react";
|
|
7
7
|
import { minutesToMilliseconds, isAfter, addSeconds, formatDistanceToNow } from "date-fns";
|
|
8
8
|
import { DocumentIcon, LinkIcon, ImageIcon, BlockContentIcon, OlistIcon, BlockquoteIcon, StringIcon, PlayIcon, SparklesIcon, SearchIcon, SyncIcon, ErrorOutlineIcon, CheckmarkCircleIcon, ClockIcon, CloseCircleIcon, ArrowRightIcon, RetryIcon, CloseIcon, icons, TranslateIcon, LockIcon, ControlsIcon, ArrowLeftIcon, TokenIcon, DocumentTextIcon, ThListIcon, CodeIcon, ComposeIcon } from "@sanity/icons";
|
|
9
9
|
import { extractWithPath } from "@sanity/mutator";
|
|
@@ -988,7 +988,7 @@ function RunInstructionProvider(props) {
|
|
|
988
988
|
}, $[18] = loading, $[19] = runInstruction, $[20] = t7) : t7 = $[20];
|
|
989
989
|
const contextValue = t7;
|
|
990
990
|
let t8;
|
|
991
|
-
$[21] !== close || $[22] !== id || $[23] !== inputs || $[24] !== open || $[25] !== runButton || $[26] !== runDisabled || $[27] !== runRequest ? (t8 = open ? /* @__PURE__ */ jsx(Dialog, { id, open, onClose: close, width: 1, header: "dialogTitle" in runRequest ? runRequest.dialogTitle : getInstructionTitle(runRequest?.instruction), footer: /* @__PURE__ */ jsx(Flex, { justify: "space-between", padding: 2, flex: 1, children: runDisabled ? /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(Flex, { padding: 2, children: /* @__PURE__ */ jsx(Text, { children: "Unable to run instruction. All fields must have a value." }) }), placement: "top", children: /* @__PURE__ */ jsx(Flex, { flex: 1, children: runButton }) }) : runButton }), children: /* @__PURE__ */ jsx(Stack, { padding: 4,
|
|
991
|
+
$[21] !== close || $[22] !== id || $[23] !== inputs || $[24] !== open || $[25] !== runButton || $[26] !== runDisabled || $[27] !== runRequest ? (t8 = open ? /* @__PURE__ */ jsx(Dialog, { id, open, onClose: close, width: 1, header: "dialogTitle" in runRequest ? runRequest.dialogTitle : getInstructionTitle(runRequest?.instruction), footer: /* @__PURE__ */ jsx(Flex, { justify: "space-between", padding: 2, flex: 1, children: runDisabled ? /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(Flex, { padding: 2, children: /* @__PURE__ */ jsx(Text, { children: "Unable to run instruction. All fields must have a value." }) }), placement: "top", children: /* @__PURE__ */ jsx(Flex, { flex: 1, children: runButton }) }) : runButton }), children: /* @__PURE__ */ jsx(Stack, { padding: 4, gap: 2, children: runRequest?.userInputBlocks?.map((block_0, i_1) => /* @__PURE__ */ jsx(UserInput, { block: block_0, autoFocus: i_1 === 0, inputs, setInputs }, block_0._key)) }) }) : null, $[21] = close, $[22] = id, $[23] = inputs, $[24] = open, $[25] = runButton, $[26] = runDisabled, $[27] = runRequest, $[28] = t8) : t8 = $[28];
|
|
992
992
|
let t9;
|
|
993
993
|
return $[29] !== contextValue || $[30] !== props.children || $[31] !== t8 ? (t9 = /* @__PURE__ */ jsxs(RunInstructionContext.Provider, { value: contextValue, children: [
|
|
994
994
|
t8,
|
|
@@ -1046,7 +1046,7 @@ function UserInput(props) {
|
|
|
1046
1046
|
let t6;
|
|
1047
1047
|
$[10] !== onChange || $[11] !== value ? (t6 = /* @__PURE__ */ jsx(TextArea, { ref: textAreaRef, rows: 4, value, onChange, style: t5 }), $[10] = onChange, $[11] = value, $[12] = t6) : t6 = $[12];
|
|
1048
1048
|
let t7;
|
|
1049
|
-
return $[13] !== t4 || $[14] !== t6 ? (t7 = /* @__PURE__ */ jsxs(Stack, { padding: 2,
|
|
1049
|
+
return $[13] !== t4 || $[14] !== t6 ? (t7 = /* @__PURE__ */ jsxs(Stack, { padding: 2, gap: 3, children: [
|
|
1050
1050
|
t4,
|
|
1051
1051
|
t6
|
|
1052
1052
|
] }), $[13] = t4, $[14] = t6, $[15] = t7) : t7 = $[15], t7;
|
|
@@ -1414,7 +1414,7 @@ function ErrorWrapper(props) {
|
|
|
1414
1414
|
$[4] !== props.children ? (t3 = /* @__PURE__ */ jsx(ErrorBoundary, { onCatch: catchError2, children: props.children }), $[4] = props.children, $[5] = t3) : t3 = $[5];
|
|
1415
1415
|
const catcher = t3;
|
|
1416
1416
|
let t4;
|
|
1417
|
-
return $[6] !== catcher || $[7] !== error || $[8] !== unsetValue ? (t4 = error ? /* @__PURE__ */ jsx(Card, { border: !0, tone: "critical", padding: 2, contentEditable: !1, children: /* @__PURE__ */ jsxs(Stack, {
|
|
1417
|
+
return $[6] !== catcher || $[7] !== error || $[8] !== unsetValue ? (t4 = error ? /* @__PURE__ */ jsx(Card, { border: !0, tone: "critical", padding: 2, contentEditable: !1, children: /* @__PURE__ */ jsxs(Stack, { gap: 3, children: [
|
|
1418
1418
|
/* @__PURE__ */ jsx(Text, { muted: !0, weight: "semibold", children: "An error occurred." }),
|
|
1419
1419
|
/* @__PURE__ */ jsx(WrapPreCard, { flex: 1, padding: 2, tone: "critical", border: !0, children: catcher }),
|
|
1420
1420
|
/* @__PURE__ */ jsxs(Flex, { width: "fill", flex: 1, gap: 3, children: [
|
|
@@ -1500,7 +1500,7 @@ function _temp$9(pre) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
const preventDefault = (ev) => ev.preventDefault();
|
|
1502
1502
|
function DocumentForm(props) {
|
|
1503
|
-
const {
|
|
1503
|
+
const $ = c(38), {
|
|
1504
1504
|
collapsedFieldSets,
|
|
1505
1505
|
collapsedPaths,
|
|
1506
1506
|
displayed: value,
|
|
@@ -1517,56 +1517,54 @@ function DocumentForm(props) {
|
|
|
1517
1517
|
onSetCollapsedPath,
|
|
1518
1518
|
ready,
|
|
1519
1519
|
validation
|
|
1520
|
-
} = useDocumentPane(), documentStore = useDocumentStore(), presence = useDocumentPresence(documentId)
|
|
1521
|
-
|
|
1520
|
+
} = useDocumentPane(), documentStore = useDocumentStore(), presence = useDocumentPresence(documentId);
|
|
1521
|
+
let t0;
|
|
1522
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = createPatchChannel(), $[0] = t0) : t0 = $[0];
|
|
1523
|
+
const patchChannel = t0, isLocked = editState?.transactionSyncLock?.enabled;
|
|
1524
|
+
let t1;
|
|
1525
|
+
$[1] !== documentId || $[2] !== documentStore.pair || $[3] !== documentType ? (t1 = () => {
|
|
1522
1526
|
const sub = documentStore.pair.documentEvents(documentId, documentType).pipe(tap((event) => {
|
|
1523
1527
|
event.type === "mutation" && patchChannel.publish(prepareMutationEvent(event)), event.type === "rebase" && patchChannel.publish(prepareRebaseEvent(event));
|
|
1524
1528
|
})).subscribe();
|
|
1525
1529
|
return () => {
|
|
1526
1530
|
sub.unsubscribe();
|
|
1527
1531
|
};
|
|
1528
|
-
}, [documentId, documentStore, documentType,
|
|
1532
|
+
}, $[1] = documentId, $[2] = documentStore.pair, $[3] = documentType, $[4] = t1) : t1 = $[4];
|
|
1533
|
+
let t2;
|
|
1534
|
+
$[5] !== documentId || $[6] !== documentStore || $[7] !== documentType ? (t2 = [documentId, documentStore, documentType, patchChannel], $[5] = documentId, $[6] = documentStore, $[7] = documentType, $[8] = t2) : t2 = $[8], useEffect(t1, t2);
|
|
1529
1535
|
const hasRev = !!value?._rev;
|
|
1530
|
-
|
|
1531
|
-
|
|
1536
|
+
let t3;
|
|
1537
|
+
$[9] !== value ? (t3 = () => {
|
|
1538
|
+
patchChannel.publish({
|
|
1532
1539
|
type: "mutation",
|
|
1533
1540
|
patches: [],
|
|
1534
1541
|
snapshot: value
|
|
1535
1542
|
});
|
|
1536
|
-
}, [
|
|
1543
|
+
}, $[9] = value, $[10] = t3) : t3 = $[10];
|
|
1544
|
+
const patchChannelPublish = useEffectEvent(t3);
|
|
1545
|
+
let t4;
|
|
1546
|
+
$[11] !== hasRev || $[12] !== patchChannelPublish ? (t4 = () => {
|
|
1547
|
+
hasRev && patchChannelPublish();
|
|
1548
|
+
}, $[11] = hasRev, $[12] = patchChannelPublish, $[13] = t4) : t4 = $[13];
|
|
1549
|
+
let t5;
|
|
1550
|
+
$[14] !== hasRev ? (t5 = [hasRev], $[14] = hasRev, $[15] = t5) : t5 = $[15], useEffect(t4, t5);
|
|
1537
1551
|
const formRef = useRef(null);
|
|
1538
|
-
|
|
1552
|
+
let t6, t7;
|
|
1553
|
+
if ($[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
|
|
1539
1554
|
focusFirstDescendant(formRef.current);
|
|
1540
|
-
}, []
|
|
1541
|
-
|
|
1542
|
-
{
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
focused: formState.focused,
|
|
1549
|
-
groups: formState.groups,
|
|
1550
|
-
id: assistFormId,
|
|
1551
|
-
members: formState.members,
|
|
1552
|
-
onChange,
|
|
1553
|
-
onFieldGroupSelect: onSetActiveFieldGroup,
|
|
1554
|
-
onPathBlur: onBlur,
|
|
1555
|
-
onPathFocus: onFocus,
|
|
1556
|
-
onPathOpen,
|
|
1557
|
-
onSetFieldSetCollapsed: onSetCollapsedFieldSet,
|
|
1558
|
-
onSetPathCollapsed: onSetCollapsedPath,
|
|
1559
|
-
presence,
|
|
1560
|
-
readOnly: formState.readOnly,
|
|
1561
|
-
schemaType: formState.schemaType,
|
|
1562
|
-
validation,
|
|
1563
|
-
value: formState.value,
|
|
1564
|
-
hasUpstreamVersion: !1
|
|
1565
|
-
}
|
|
1566
|
-
) : /* @__PURE__ */ jsxs(Flex, { align: "center", direction: "column", height: "fill", justify: "center", padding: 3, sizing: "border", children: [
|
|
1555
|
+
}, t7 = [], $[16] = t6, $[17] = t7) : (t6 = $[16], t7 = $[17]), useEffect(t6, t7), isLocked) {
|
|
1556
|
+
let t82;
|
|
1557
|
+
$[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t82 = /* @__PURE__ */ jsx(Flex, { align: "center", direction: "column", height: "fill", justify: "center", padding: 3, sizing: "border", children: /* @__PURE__ */ jsx(Text, { size: 1, children: "Please hold tight while the document is synced. This usually happens right after the document has been published, and it shouldn\u2019t take more than a few seconds" }) }), $[18] = t82) : t82 = $[18];
|
|
1558
|
+
let t92;
|
|
1559
|
+
return $[19] !== props ? (t92 = /* @__PURE__ */ jsx(Box, { as: "form", ...props, ref: formRef, children: t82 }), $[19] = props, $[20] = t92) : t92 = $[20], t92;
|
|
1560
|
+
}
|
|
1561
|
+
let t8;
|
|
1562
|
+
$[21] !== collapsedFieldSets || $[22] !== collapsedPaths || $[23] !== formState || $[24] !== onBlur || $[25] !== onChange || $[26] !== onFocus || $[27] !== onPathOpen || $[28] !== onSetActiveFieldGroup || $[29] !== onSetCollapsedFieldSet || $[30] !== onSetCollapsedPath || $[31] !== presence || $[32] !== ready || $[33] !== validation ? (t8 = ready ? formState === null ? /* @__PURE__ */ jsx(Flex, { align: "center", direction: "column", height: "fill", justify: "center", padding: 3, sizing: "border", children: /* @__PURE__ */ jsx(Text, { size: 1, children: "This form is hidden" }) }) : /* @__PURE__ */ jsx(FormBuilder, { __internal_patchChannel: patchChannel, collapsedFieldSets, collapsedPaths, focusPath: formState.focusPath, changed: formState.changed, focused: formState.focused, groups: formState.groups, id: assistFormId, members: formState.members, onChange, onFieldGroupSelect: onSetActiveFieldGroup, onPathBlur: onBlur, onPathFocus: onFocus, onPathOpen, onSetFieldSetCollapsed: onSetCollapsedFieldSet, onSetPathCollapsed: onSetCollapsedPath, presence, readOnly: formState.readOnly, schemaType: formState.schemaType, validation, value: formState.value, hasUpstreamVersion: !1 }) : /* @__PURE__ */ jsxs(Flex, { align: "center", direction: "column", height: "fill", justify: "center", padding: 3, sizing: "border", children: [
|
|
1567
1563
|
/* @__PURE__ */ jsx(Spinner, { muted: !0 }),
|
|
1568
1564
|
/* @__PURE__ */ jsx(Box, { marginTop: 3, children: /* @__PURE__ */ jsx(Text, { align: "center", muted: !0, size: 1, children: "Loading document" }) })
|
|
1569
|
-
] })
|
|
1565
|
+
] }), $[21] = collapsedFieldSets, $[22] = collapsedPaths, $[23] = formState, $[24] = onBlur, $[25] = onChange, $[26] = onFocus, $[27] = onPathOpen, $[28] = onSetActiveFieldGroup, $[29] = onSetCollapsedFieldSet, $[30] = onSetCollapsedPath, $[31] = presence, $[32] = ready, $[33] = validation, $[34] = t8) : t8 = $[34];
|
|
1566
|
+
let t9;
|
|
1567
|
+
return $[35] !== props || $[36] !== t8 ? (t9 = /* @__PURE__ */ jsx(Box, { as: "form", ...props, onSubmit: preventDefault, ref: formRef, children: t8 }), $[35] = props, $[36] = t8, $[37] = t9) : t9 = $[37], t9;
|
|
1570
1568
|
}
|
|
1571
1569
|
function prepareMutationEvent(event) {
|
|
1572
1570
|
const patches = event.mutations.map((mut) => mut.patch).filter(Boolean);
|
|
@@ -1669,7 +1667,7 @@ function InspectorOnboarding(props) {
|
|
|
1669
1667
|
textAlign: "center"
|
|
1670
1668
|
}, children: /* @__PURE__ */ jsx(SparklesIllustration, {}) }), t1 = /* @__PURE__ */ jsx(Text, { align: "center", size: 1, children: "Create reusable AI instructions that can be applied across all documents of a certain type." }), $[0] = t0, $[1] = t1) : (t0 = $[0], t1 = $[1]);
|
|
1671
1669
|
let t2;
|
|
1672
|
-
return $[2] !== onDismiss ? (t2 = /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Container, { width: 0, children: /* @__PURE__ */ jsxs(Stack, {
|
|
1670
|
+
return $[2] !== onDismiss ? (t2 = /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Container, { width: 0, children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
1673
1671
|
t0,
|
|
1674
1672
|
t1,
|
|
1675
1673
|
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, justify: "center", children: [
|
|
@@ -1783,7 +1781,7 @@ function FieldTitle(props) {
|
|
|
1783
1781
|
let t6;
|
|
1784
1782
|
$[11] !== t5 ? (t6 = /* @__PURE__ */ jsx(Box, { marginTop: 1, children: /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: t5 }) }), $[11] = t5, $[12] = t6) : t6 = $[12];
|
|
1785
1783
|
let t7;
|
|
1786
|
-
$[13] !== T0 || $[14] !== t0 || $[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, { style: t0, separator: t1,
|
|
1784
|
+
$[13] !== T0 || $[14] !== t0 || $[15] !== t1 || $[16] !== t2 || $[17] !== t3 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, { style: t0, separator: t1, gap: t2, children: [
|
|
1787
1785
|
t3,
|
|
1788
1786
|
t6
|
|
1789
1787
|
] }), $[13] = T0, $[14] = t0, $[15] = t1, $[16] = t2, $[17] = t3, $[18] = t6, $[19] = t7) : t7 = $[19];
|
|
@@ -1912,7 +1910,7 @@ function TaskList(props) {
|
|
|
1912
1910
|
let t1;
|
|
1913
1911
|
$[3] !== tasks ? (t1 = tasks.map(_temp$6), $[3] = tasks, $[4] = t1) : t1 = $[4];
|
|
1914
1912
|
let t2;
|
|
1915
|
-
return $[5] !== t1 ? (t2 = /* @__PURE__ */ jsx(Stack, { padding: 1,
|
|
1913
|
+
return $[5] !== t1 ? (t2 = /* @__PURE__ */ jsx(Stack, { padding: 1, gap: 1, children: t1 }), $[5] = t1, $[6] = t2) : t2 = $[6], t2;
|
|
1916
1914
|
}
|
|
1917
1915
|
function _temp$6(task) {
|
|
1918
1916
|
return /* @__PURE__ */ jsx(TaskItem, { task }, task._key);
|
|
@@ -1947,7 +1945,7 @@ function TaskItem(props) {
|
|
|
1947
1945
|
let t9;
|
|
1948
1946
|
$[14] !== t8 ? (t9 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: /* @__PURE__ */ jsx(TimeAgo, { date: t8 }) }), $[14] = t8, $[15] = t9) : t9 = $[15];
|
|
1949
1947
|
let t10;
|
|
1950
|
-
$[16] !== t6 || $[17] !== t7 || $[18] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Stack, { flex: 1,
|
|
1948
|
+
$[16] !== t6 || $[17] !== t7 || $[18] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Stack, { flex: 1, gap: 2, children: [
|
|
1951
1949
|
t6,
|
|
1952
1950
|
t7,
|
|
1953
1951
|
t9
|
|
@@ -1978,7 +1976,7 @@ function AssistInspectorWrapper(props) {
|
|
|
1978
1976
|
const $ = c(43), context = useAiAssistanceConfig();
|
|
1979
1977
|
if (context.statusLoading) {
|
|
1980
1978
|
let t02;
|
|
1981
|
-
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t02 = /* @__PURE__ */ jsx(Flex, { align: "center", height: "fill", justify: "center", padding: 4, sizing: "border", children: /* @__PURE__ */ jsxs(Stack, {
|
|
1979
|
+
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t02 = /* @__PURE__ */ jsx(Flex, { align: "center", height: "fill", justify: "center", padding: 4, sizing: "border", children: /* @__PURE__ */ jsxs(Stack, { gap: 3, style: {
|
|
1982
1980
|
textAlign: "center"
|
|
1983
1981
|
}, children: [
|
|
1984
1982
|
/* @__PURE__ */ jsx(Spinner, { muted: !0 }),
|
|
@@ -2001,7 +1999,7 @@ function AssistInspectorWrapper(props) {
|
|
|
2001
1999
|
let t2;
|
|
2002
2000
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx("a", { href: salesUrl, target: "_blank", rel: "noreferrer", children: "contact our sales team" }), $[4] = t2) : t2 = $[4];
|
|
2003
2001
|
let t3;
|
|
2004
|
-
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsxs(Stack, { flex: 1, overflow: "auto", padding: 4,
|
|
2002
|
+
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsxs(Stack, { flex: 1, overflow: "auto", padding: 4, gap: 3, children: [
|
|
2005
2003
|
t1,
|
|
2006
2004
|
/* @__PURE__ */ jsxs(Text, { as: "p", muted: !0, size: 1, children: [
|
|
2007
2005
|
"Please get in touch with a Sanity account manager or",
|
|
@@ -2053,7 +2051,7 @@ function AssistInspectorWrapper(props) {
|
|
|
2053
2051
|
let t8;
|
|
2054
2052
|
$[26] !== context.init || $[27] !== context.initLoading || $[28] !== t6 || $[29] !== t7 ? (t8 = /* @__PURE__ */ jsx(Button, { fontSize: 1, icon: t6, text: t7, tone: "primary", onClick: context.init, disabled: context.initLoading }), $[26] = context.init, $[27] = context.initLoading, $[28] = t6, $[29] = t7, $[30] = t8) : t8 = $[30];
|
|
2055
2053
|
let t9;
|
|
2056
|
-
$[31] !== t1 || $[32] !== t2 || $[33] !== t3 || $[34] !== t4 || $[35] !== t5 || $[36] !== t8 ? (t9 = /* @__PURE__ */ jsxs(Stack, { padding: 4,
|
|
2054
|
+
$[31] !== t1 || $[32] !== t2 || $[33] !== t3 || $[34] !== t4 || $[35] !== t5 || $[36] !== t8 ? (t9 = /* @__PURE__ */ jsxs(Stack, { padding: 4, gap: 3, children: [
|
|
2057
2055
|
t1,
|
|
2058
2056
|
t2,
|
|
2059
2057
|
t3,
|
|
@@ -2590,11 +2588,11 @@ function FieldTranslationProvider(props) {
|
|
|
2590
2588
|
const runButton = t10;
|
|
2591
2589
|
let t11;
|
|
2592
2590
|
$[34] !== dialogOpen || $[35] !== fieldTranslationParams || $[36] !== fromLanguage || $[37] !== id || $[38] !== languages || $[39] !== runButton || $[40] !== runDisabled || $[41] !== selectFromLanguage || $[42] !== toLanguages || $[43] !== toggleToLanguage ? (t11 = dialogOpen ? /* @__PURE__ */ jsx(Dialog, { id, width: 1, open: dialogOpen, onClose: close, header: "Translate fields", footer: /* @__PURE__ */ jsx(Flex, { justify: "space-between", padding: 2, flex: 1, children: runDisabled ? /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(Flex, { padding: 2, children: /* @__PURE__ */ jsx(Text, { children: "There is nothing to translate in the selected from-language." }) }), placement: "top", children: /* @__PURE__ */ jsx(Flex, { flex: 1, children: runButton }) }) : runButton }), children: languages ? /* @__PURE__ */ jsxs(Flex, { padding: 4, gap: 5, align: "flex-start", justify: "center", children: [
|
|
2593
|
-
/* @__PURE__ */ jsxs(Stack, {
|
|
2591
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
2594
2592
|
/* @__PURE__ */ jsx(Box, { marginBottom: 2, children: /* @__PURE__ */ jsx(Text, { weight: "semibold", children: "From" }) }),
|
|
2595
2593
|
languages?.map((radioLanguage) => /* @__PURE__ */ jsx(FromLanguageRadio, { radioLanguage, fromLanguage, selectFromLanguage, languages, fieldTranslationParams }, radioLanguage.id))
|
|
2596
2594
|
] }),
|
|
2597
|
-
/* @__PURE__ */ jsxs(Stack, {
|
|
2595
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
2598
2596
|
/* @__PURE__ */ jsx(Box, { marginBottom: 2, children: /* @__PURE__ */ jsx(Text, { weight: "semibold", children: "To" }) }),
|
|
2599
2597
|
languages.map((checkboxLanguage) => /* @__PURE__ */ jsx(ToLanguageCheckbox, { checkboxLanguage, fromLanguage, toLanguages, toggleToLanguage, languages }, checkboxLanguage.id))
|
|
2600
2598
|
] })
|
|
@@ -3084,6 +3082,7 @@ function useCustomFieldActions(props) {
|
|
|
3084
3082
|
const title = fieldActions?.title, customActions = configActions?.filter(isDefined).map((node) => createSafeNode({
|
|
3085
3083
|
node,
|
|
3086
3084
|
pushToast,
|
|
3085
|
+
// oxlint-disable-next-line react-hooks-js/memo-dependencies
|
|
3087
3086
|
addSyntheticTask,
|
|
3088
3087
|
removeSyntheticTask
|
|
3089
3088
|
})).filter(isDefined), onlyGroups = customActions?.length && customActions?.every((node_0) => node_0.type === "group");
|
|
@@ -3414,7 +3413,7 @@ function BackToInstructionListLink() {
|
|
|
3414
3413
|
}), $[0] = openInspector, $[1] = t0) : t0 = $[1];
|
|
3415
3414
|
const goBack = t0;
|
|
3416
3415
|
let t1;
|
|
3417
|
-
return $[2] !== goBack ? (t1 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { as: "a", fontSize: 1, icon: ArrowLeftIcon, mode: "bleed", padding: 1,
|
|
3416
|
+
return $[2] !== goBack ? (t1 = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Button, { as: "a", fontSize: 1, icon: ArrowLeftIcon, mode: "bleed", padding: 1, gap: 2, onClick: goBack, text: " Instructions", textAlign: "left" }) }), $[2] = goBack, $[3] = t1) : t1 = $[3], t1;
|
|
3418
3417
|
}
|
|
3419
3418
|
const SelectedFieldContext = createContext(void 0), SelectedFieldContextProvider = SelectedFieldContext.Provider, EMPTY_FIELDS = [];
|
|
3420
3419
|
function AssistDocumentForm(props) {
|
|
@@ -3530,7 +3529,7 @@ function AssistDocumentFormEditable(props) {
|
|
|
3530
3529
|
let t16;
|
|
3531
3530
|
$[53] !== activePath || $[54] !== props ? (t16 = !activePath && props.renderDefault(props), $[53] = activePath, $[54] = props, $[55] = t16) : t16 = $[55];
|
|
3532
3531
|
let t17;
|
|
3533
|
-
$[56] !== fieldError_0 || $[57] !== t13 || $[58] !== t14 || $[59] !== t15 || $[60] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Stack, {
|
|
3532
|
+
$[56] !== fieldError_0 || $[57] !== t13 || $[58] !== t14 || $[59] !== t15 || $[60] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Stack, { gap: 5, children: [
|
|
3534
3533
|
t13,
|
|
3535
3534
|
t14,
|
|
3536
3535
|
t15,
|
|
@@ -3737,7 +3736,7 @@ function InstructionInput(props) {
|
|
|
3737
3736
|
let t0;
|
|
3738
3737
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = [4, 4, 4, 5], $[0] = t0) : t0 = $[0];
|
|
3739
3738
|
let t1;
|
|
3740
|
-
return $[1] !== props ? (t1 = /* @__PURE__ */ jsxs(Stack, {
|
|
3739
|
+
return $[1] !== props ? (t1 = /* @__PURE__ */ jsxs(Stack, { gap: t0, children: [
|
|
3741
3740
|
/* @__PURE__ */ jsx(NameField, { ...props }),
|
|
3742
3741
|
/* @__PURE__ */ jsx(ShareField, { ...props }),
|
|
3743
3742
|
/* @__PURE__ */ jsx(ObjectMember, { fieldName: "prompt", ...props }),
|
|
@@ -3806,7 +3805,7 @@ function NameField(props) {
|
|
|
3806
3805
|
t4
|
|
3807
3806
|
] }), $[17] = t3, $[18] = t4, $[19] = t5) : t5 = $[19];
|
|
3808
3807
|
let t6;
|
|
3809
|
-
return $[20] !== t1 || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx(Stack, {
|
|
3808
|
+
return $[20] !== t1 || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx(Stack, { gap: 5, children: /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
3810
3809
|
t1,
|
|
3811
3810
|
t2,
|
|
3812
3811
|
t5
|
|
@@ -3923,7 +3922,7 @@ function ObjectOutputInput(t0) {
|
|
|
3923
3922
|
} else
|
|
3924
3923
|
t3 = $[12];
|
|
3925
3924
|
let t4;
|
|
3926
|
-
return $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, {
|
|
3925
|
+
return $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, { gap: 2, children: t3 }), $[16] = t3, $[17] = t4) : t4 = $[17], t4;
|
|
3927
3926
|
}
|
|
3928
3927
|
function _temp2$1(field_0) {
|
|
3929
3928
|
return typed({
|
|
@@ -3978,7 +3977,7 @@ function ArrayOutputInput(t0) {
|
|
|
3978
3977
|
} else
|
|
3979
3978
|
t3 = $[12];
|
|
3980
3979
|
let t4;
|
|
3981
|
-
return $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, {
|
|
3980
|
+
return $[16] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, { gap: 2, children: t3 }), $[16] = t3, $[17] = t4) : t4 = $[17], t4;
|
|
3982
3981
|
}
|
|
3983
3982
|
function _temp4(field) {
|
|
3984
3983
|
return typed({
|
|
@@ -4038,7 +4037,7 @@ function PromptInput(props) {
|
|
|
4038
4037
|
let t1;
|
|
4039
4038
|
$[1] !== props ? (t1 = props.renderDefault(props), $[1] = props, $[2] = t1) : t1 = $[2];
|
|
4040
4039
|
let t2;
|
|
4041
|
-
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(PteMods, { children: /* @__PURE__ */ jsxs(Stack, {
|
|
4040
|
+
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(PteMods, { children: /* @__PURE__ */ jsxs(Stack, { gap: 3, children: [
|
|
4042
4041
|
t0,
|
|
4043
4042
|
t1
|
|
4044
4043
|
] }) }), $[3] = t1, $[4] = t2) : t2 = $[4], t2;
|
|
@@ -4377,7 +4376,7 @@ const contextDocumentSchema = defineType({
|
|
|
4377
4376
|
const Icon = props.icon;
|
|
4378
4377
|
return /* @__PURE__ */ jsxs(Flex, { gap: 3, align: "center", padding: 2, children: [
|
|
4379
4378
|
Icon && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(Text, { size: 1, children: /* @__PURE__ */ jsx(Icon, {}) }) }),
|
|
4380
|
-
/* @__PURE__ */ jsx(Stack, { flex: 1,
|
|
4379
|
+
/* @__PURE__ */ jsx(Stack, { flex: 1, gap: 2, children: /* @__PURE__ */ jsx(Text, { size: 1, textOverflow: "ellipsis", weight: "medium", children: getInstructionTitle(props) }) }),
|
|
4381
4380
|
props.userId && /* @__PURE__ */ jsx(Text, { size: 1, children: /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(Text, { size: 1, children: "Only visible to you" }), padding: 2, placement: "top", portal: !0, children: /* @__PURE__ */ jsx(LockIcon, {}) }) })
|
|
4382
4381
|
] });
|
|
4383
4382
|
}
|
|
@@ -4741,7 +4740,7 @@ function SchemaTypeTool() {
|
|
|
4741
4740
|
let t8;
|
|
4742
4741
|
$[16] !== types ? (t8 = types.map(_temp), $[16] = types, $[17] = t8) : t8 = $[17];
|
|
4743
4742
|
let t9;
|
|
4744
|
-
$[18] !== t8 ? (t9 = /* @__PURE__ */ jsxs(Stack, {
|
|
4743
|
+
$[18] !== t8 ? (t9 = /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
4745
4744
|
t7,
|
|
4746
4745
|
/* @__PURE__ */ jsx("ul", { children: t8 })
|
|
4747
4746
|
] }), $[18] = t8, $[19] = t9) : t9 = $[19];
|
|
@@ -4751,7 +4750,7 @@ function SchemaTypeTool() {
|
|
|
4751
4750
|
let t12;
|
|
4752
4751
|
$[21] !== t11 ? (t12 = t11.map(_temp2), $[21] = t11, $[22] = t12) : t12 = $[22];
|
|
4753
4752
|
let t13;
|
|
4754
|
-
$[23] !== t12 ? (t13 = /* @__PURE__ */ jsxs(Stack, {
|
|
4753
|
+
$[23] !== t12 ? (t13 = /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
4755
4754
|
t10,
|
|
4756
4755
|
/* @__PURE__ */ jsx("ul", { children: t12 })
|
|
4757
4756
|
] }), $[23] = t12, $[24] = t13) : t13 = $[24];
|
|
@@ -4761,7 +4760,7 @@ function SchemaTypeTool() {
|
|
|
4761
4760
|
t13
|
|
4762
4761
|
] }), $[25] = t13, $[26] = t9, $[27] = t14) : t14 = $[27];
|
|
4763
4762
|
let t15;
|
|
4764
|
-
return $[28] !== t14 || $[29] !== t6 ? (t15 = /* @__PURE__ */ jsx(Card, { padding: 4, overflow: "auto", style: t4, children: /* @__PURE__ */ jsxs(Stack, {
|
|
4763
|
+
return $[28] !== t14 || $[29] !== t6 ? (t15 = /* @__PURE__ */ jsx(Card, { padding: 4, overflow: "auto", style: t4, children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
4765
4764
|
t6,
|
|
4766
4765
|
t14
|
|
4767
4766
|
] }) }), $[28] = t14, $[29] = t6, $[30] = t15) : t15 = $[30], t15;
|