@sanity/workflow-studio-plugin 0.33.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @sanity/workflow-studio-plugin
2
2
 
3
+ ## 0.35.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7e24e4a]
8
+ - Updated dependencies [7e24e4a]
9
+ - Updated dependencies [7e24e4a]
10
+ - Updated dependencies [ab8754a]
11
+ - @sanity/workflow-react@0.35.0
12
+ - @sanity/workflow-studio@0.35.0
13
+ - @sanity/workflow-engine@0.35.0
14
+ - @sanity/workflow-components@0.35.0
15
+ - @sanity/workflow-diagram@0.35.0
16
+
17
+ ## 0.34.0
18
+
19
+ ### Minor Changes
20
+
21
+ - 30a515c: **BREAKING:** Workflows Studio packages now target the Sanity UI 4 API. The Studio plugin, shared components, and diagram package each install `@sanity/ui ^4.2.1` for the UI they render; React, styled-components, and Studio remain peer contracts. This does not prevent Studio from hosting unrelated Sanity UI 3 plugins. Upgrade Sanity Studio to 6.15 or later and upgrade every `@sanity/workflow-*` package in the installation to the same release, then reinstall dependencies and commit the updated lockfile. Partial Workflows upgrades can pair packages built for different Sanity UI APIs and fail the Studio build.
22
+
23
+ Docs impact: Update the Studio plugin installation prerequisites and release guidance to require Sanity Studio 6.15 or later and a lockstep Workflows package upgrade.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [30a515c]
28
+ - @sanity/workflow-components@0.34.0
29
+ - @sanity/workflow-diagram@0.34.0
30
+ - @sanity/workflow-studio@0.34.0
31
+ - @sanity/workflow-engine@0.34.0
32
+ - @sanity/workflow-react@0.34.0
33
+
3
34
  ## 0.33.0
4
35
 
5
36
  ### Minor Changes
package/README.md CHANGED
@@ -41,8 +41,9 @@ treat plugin-side checks as a security boundary.
41
41
  ## 1. Install
42
42
 
43
43
  Use one matching version for every `@sanity/workflow-*` package in the
44
- command below. The plugin also requires `sanity ^6`, `react ^19`,
45
- `styled-components ^6`, and `@sanity/sdk ^3.1`.
44
+ command below. The plugin also requires `sanity ^6.15`, which provides
45
+ `@sanity/ui ^4.2.1`, plus `react ^19`, `styled-components ^6`, and
46
+ `@sanity/sdk ^3.1`.
46
47
 
47
48
  Before installing, select Mutate 0.18.2 for SDK 3 in your application's root
48
49
  configuration. For npm, set `overrides["@sanity/sdk"]["@sanity/mutate"]` to
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var jsxRuntime = require("react/jsx-runtime"), Timeline = require("@sanity/icons/Timeline"), ui = require("@sanity/ui"), workflowReact = require("@sanity/workflow-react"), react = require("react"), structure = require("sanity/structure"), workflowEngine = require("@sanity/workflow-engine"), Checkmark = require("@sanity/icons/Checkmark"), Close = require("@sanity/icons/Close"), workflowComponents = require("@sanity/workflow-components"), formatDistanceToNow = require("date-fns/formatDistanceToNow"), csm = require("@sanity/client/csm"), telemetry = require("@sanity/telemetry"), workflowStudio = require("@sanity/workflow-studio"), sanity = require("sanity"), Calendar = require("@sanity/icons/Calendar"), User = require("@sanity/icons/User"), Search = require("@sanity/icons/Search"), Edit = require("@sanity/icons/Edit"), content = require("@sanity/util/content"), InfoOutline = require("@sanity/icons/InfoOutline"), Document = require("@sanity/icons/Document"), WarningOutline = require("@sanity/icons/WarningOutline"), router = require("sanity/router"), types = require("@sanity/types"), observer = require("@sanity/workflow-react/observer"), Launch = require("@sanity/icons/Launch"), ErrorOutline = require("@sanity/icons/ErrorOutline"), AddUser = require("@sanity/icons/AddUser"), Add = require("@sanity/icons/Add"), Ulist = require("@sanity/icons/Ulist"), CheckmarkCircle = require("@sanity/icons/CheckmarkCircle"), Bolt = require("@sanity/icons/Bolt"), ChevronDown = require("@sanity/icons/ChevronDown"), pluralize = require("pluralize-esm"), ChevronRight = require("@sanity/icons/ChevronRight"), styledComponents = require("styled-components"), EllipsisHorizontal = require("@sanity/icons/EllipsisHorizontal"), Clock = require("@sanity/icons/Clock"), Cog = require("@sanity/icons/Cog"), ArrowUp = require("@sanity/icons/ArrowUp"), rxjs = require("rxjs"), operators = require("rxjs/operators"), Transfer = require("@sanity/icons/Transfer"), Users = require("@sanity/icons/Users"), reactVirtual = require("@tanstack/react-virtual");
3
+ var jsxRuntime = require("react/jsx-runtime"), Timeline = require("@sanity/icons/Timeline"), ui = require("@sanity/ui"), workflowReact = require("@sanity/workflow-react"), react = require("react"), structure = require("sanity/structure"), workflowEngine = require("@sanity/workflow-engine"), Checkmark = require("@sanity/icons/Checkmark"), Close = require("@sanity/icons/Close"), workflowComponents = require("@sanity/workflow-components"), formatDistanceToNow = require("date-fns/formatDistanceToNow"), csm = require("@sanity/client/csm"), telemetry = require("@sanity/telemetry"), workflowStudio = require("@sanity/workflow-studio"), sanity = require("sanity"), Calendar = require("@sanity/icons/Calendar"), popover = require("@sanity/ui/popover"), User = require("@sanity/icons/User"), Search = require("@sanity/icons/Search"), autocomplete = require("@sanity/ui/autocomplete"), toast = require("@sanity/ui/toast"), Edit = require("@sanity/icons/Edit"), content = require("@sanity/util/content"), InfoOutline = require("@sanity/icons/InfoOutline"), code = require("@sanity/ui/code"), Document = require("@sanity/icons/Document"), WarningOutline = require("@sanity/icons/WarningOutline"), router = require("sanity/router"), types = require("@sanity/types"), observer = require("@sanity/workflow-react/observer"), Launch = require("@sanity/icons/Launch"), ErrorOutline = require("@sanity/icons/ErrorOutline"), AddUser = require("@sanity/icons/AddUser"), Add = require("@sanity/icons/Add"), Ulist = require("@sanity/icons/Ulist"), CheckmarkCircle = require("@sanity/icons/CheckmarkCircle"), Bolt = require("@sanity/icons/Bolt"), ChevronDown = require("@sanity/icons/ChevronDown"), menu = require("@sanity/ui/menu"), pluralize = require("pluralize-esm"), ChevronRight = require("@sanity/icons/ChevronRight"), styledComponents = require("styled-components"), EllipsisHorizontal = require("@sanity/icons/EllipsisHorizontal"), Clock = require("@sanity/icons/Clock"), Cog = require("@sanity/icons/Cog"), ArrowUp = require("@sanity/icons/ArrowUp"), rxjs = require("rxjs"), operators = require("rxjs/operators"), Transfer = require("@sanity/icons/Transfer"), Users = require("@sanity/icons/Users"), reactVirtual = require("@tanstack/react-virtual");
4
4
 
5
5
  function _interopDefaultCompat(e) {
6
6
  return e && typeof e == "object" && "default" in e ? e : {
@@ -1571,7 +1571,7 @@ function DismissablePopover({children: children, content: content2, onDismiss: o
1571
1571
  const triggerRef = react.useRef(null), [popoverElement, setPopoverElement] = react.useState(null);
1572
1572
  return ui.useClickOutsideEvent(() => {
1573
1573
  open && onDismiss();
1574
- }, () => [ triggerRef.current, popoverElement ]), /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, {
1574
+ }, () => [ triggerRef.current, popoverElement ]), /* @__PURE__ */ jsxRuntime.jsx(popover.Popover, {
1575
1575
  content: /* @__PURE__ */ jsxRuntime.jsx(ui.Box, {
1576
1576
  onKeyDown: event => {
1577
1577
  event.key === "Escape" && onDismiss();
@@ -1866,7 +1866,7 @@ function DocPicker({value: value, onChange: onChange, types: types2, readOnly: r
1866
1866
  }) : /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, {
1867
1867
  gap: 2,
1868
1868
  children: [
1869
- /* @__PURE__ */ jsxRuntime.jsx(ui.Autocomplete, {
1869
+ /* @__PURE__ */ jsxRuntime.jsx(autocomplete.Autocomplete, {
1870
1870
  filterOption: () => !0,
1871
1871
  fontSize: 1,
1872
1872
  icon: Search.SearchIcon,
@@ -2079,18 +2079,18 @@ function withConvention(params) {
2079
2079
  }
2080
2080
 
2081
2081
  function useWorkflowToast() {
2082
- const toast = ui.useToast();
2082
+ const toast$1 = toast.useToast();
2083
2083
  return react.useMemo(() => ({
2084
2084
  push: params => {
2085
- toast.push(withConvention(params));
2085
+ toast$1.push(withConvention(params));
2086
2086
  },
2087
2087
  dismiss: id => {
2088
- toast.push({
2088
+ toast$1.push({
2089
2089
  id: id,
2090
2090
  duration: DISMISS_SENTINEL_DURATION
2091
2091
  });
2092
2092
  }
2093
- }), [ toast ]);
2093
+ }), [ toast$1 ]);
2094
2094
  }
2095
2095
 
2096
2096
  const COMMITTED_INCOMPLETE_TITLE = "Saved, but its follow-up didn’t run";
@@ -2115,15 +2115,15 @@ function rejectionToast(reading, titles) {
2115
2115
  }
2116
2116
 
2117
2117
  function useRejectionReport() {
2118
- const toast = useWorkflowToast();
2118
+ const toast2 = useWorkflowToast();
2119
2119
  return react.useMemo(() => ({
2120
2120
  rejected: args => {
2121
2121
  const reading = readRejection(args.err);
2122
2122
  reading.kind !== "refusal" && console.error(`[workflow-studio-plugin] ${args.context} rejected:`, args.err),
2123
- toast.push(rejectionToast(reading, args));
2123
+ toast2.push(rejectionToast(reading, args));
2124
2124
  },
2125
- dismiss: toast.dismiss
2126
- }), [ toast ]);
2125
+ dismiss: toast2.dismiss
2126
+ }), [ toast2 ]);
2127
2127
  }
2128
2128
 
2129
2129
  const ActionClusterContext = react.createContext(void 0), ActionClusterProvider = ActionClusterContext.Provider;
@@ -3181,7 +3181,7 @@ const fieldValueRenderer = {
3181
3181
  label: field.title ?? field.name,
3182
3182
  value: field.value
3183
3183
  }),
3184
- object: field => field.value === null ? /* @__PURE__ */ jsxRuntime.jsx(Empty, {}) : /* @__PURE__ */ jsxRuntime.jsx(ui.Code, {
3184
+ object: field => field.value === null ? /* @__PURE__ */ jsxRuntime.jsx(Empty, {}) : /* @__PURE__ */ jsxRuntime.jsx(code.Code, {
3185
3185
  size: 1,
3186
3186
  style: {
3187
3187
  overflowWrap: "anywhere",
@@ -3267,7 +3267,7 @@ function ArrayRow({row: row}) {
3267
3267
  /* @__PURE__ */ jsxRuntime.jsx(NoteMeta, {
3268
3268
  row: row
3269
3269
  }) ]
3270
- }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Code, {
3270
+ }) : /* @__PURE__ */ jsxRuntime.jsx(code.Code, {
3271
3271
  size: 1,
3272
3272
  style: {
3273
3273
  overflowWrap: "anywhere",
@@ -3963,19 +3963,19 @@ function Hairline({weight: weight, style: style}) {
3963
3963
  }
3964
3964
 
3965
3965
  function useDrainEffects(instanceId) {
3966
- const {drainEffectsFor: drainEffectsFor} = useWorkflowContext(), toast = useWorkflowToast(), [busy, setBusy] = react.useState(!1);
3966
+ const {drainEffectsFor: drainEffectsFor} = useWorkflowContext(), toast2 = useWorkflowToast(), [busy, setBusy] = react.useState(!1);
3967
3967
  return {
3968
3968
  busy: busy,
3969
3969
  run: async () => {
3970
3970
  setBusy(!0);
3971
3971
  try {
3972
- await drainEffectsFor(instanceId), toast.push({
3972
+ await drainEffectsFor(instanceId), toast2.push({
3973
3973
  id: TOAST_ID.effectsDrain,
3974
3974
  status: "info",
3975
3975
  title: "Ran the registered handlers"
3976
3976
  });
3977
3977
  } catch (err) {
3978
- toast.push({
3978
+ toast2.push({
3979
3979
  id: TOAST_ID.effectsDrain,
3980
3980
  status: "error",
3981
3981
  title: "Failed to run pending effects",
@@ -5158,8 +5158,8 @@ function AutomationActionRow({actionEval: actionEval, definition: definition}) {
5158
5158
  function inlineActionCount(args) {
5159
5159
  const {available: available, actionWidths: actionWidths, menuWidth: menuWidth, gap: gap} = args, max = Math.min(3, actionWidths.length);
5160
5160
  for (let count = max; count > 0; count--) {
5161
- const buttons = actionWidths.slice(0, count).reduce((sum, w) => sum + w, 0) + gap * (count - 1), menu = count === actionWidths.length ? 0 : menuWidth + gap;
5162
- if (buttons + menu <= available) return count;
5161
+ const buttons = actionWidths.slice(0, count).reduce((sum, w) => sum + w, 0) + gap * (count - 1), menu2 = count === actionWidths.length ? 0 : menuWidth + gap;
5162
+ if (buttons + menu2 <= available) return count;
5163
5163
  }
5164
5164
  return 0;
5165
5165
  }
@@ -5186,12 +5186,12 @@ function ActionMenuItem({actionEval: actionEval, instanceId: instanceId, activit
5186
5186
  placement: placement,
5187
5187
  viaMenu: !0
5188
5188
  });
5189
- return rowKind.kind === "disabled" ? /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
5189
+ return rowKind.kind === "disabled" ? /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
5190
5190
  disabled: !0,
5191
5191
  ...iconProp,
5192
5192
  text: label,
5193
5193
  tone: tone
5194
- }) : rowKind.kind === "plain" ? /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
5194
+ }) : rowKind.kind === "plain" ? /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
5195
5195
  disabled: pending,
5196
5196
  ...iconProp,
5197
5197
  onClick: () => {
@@ -5199,7 +5199,7 @@ function ActionMenuItem({actionEval: actionEval, instanceId: instanceId, activit
5199
5199
  },
5200
5200
  text: label,
5201
5201
  tone: tone
5202
- }) : /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
5202
+ }) : /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
5203
5203
  disabled: pending,
5204
5204
  ...iconProp,
5205
5205
  onClick: onCollectParams,
@@ -5221,7 +5221,7 @@ function rowShield(menuButton) {
5221
5221
  }
5222
5222
 
5223
5223
  function ActionsMenuButton({actions: actions, instanceId: instanceId, activity: activity, label: label, surface: surface, placement: placement, mode: mode = "ghost", inButtonCard: inButtonCard = !1}) {
5224
- const [paramsAction, setParamsAction] = react.useState(void 0), clusterPending = useActionClusterPending(), menuId = react.useId(), menuButton = /* @__PURE__ */ jsxRuntime.jsx(ui.MenuButton, {
5224
+ const [paramsAction, setParamsAction] = react.useState(void 0), clusterPending = useActionClusterPending(), menuId = react.useId(), menuButton = /* @__PURE__ */ jsxRuntime.jsx(menu.MenuButton, {
5225
5225
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
5226
5226
  ...ACTIONS_MENU_TRIGGER,
5227
5227
  mode: mode,
@@ -5234,7 +5234,7 @@ function ActionsMenuButton({actions: actions, instanceId: instanceId, activity:
5234
5234
  } : {}
5235
5235
  }),
5236
5236
  id: `workflow-actions-menu-${menuId}`,
5237
- menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, {
5237
+ menu: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu, {
5238
5238
  children: actions.map(a => /* @__PURE__ */ jsxRuntime.jsx(ActionMenuItem, {
5239
5239
  actionEval: a,
5240
5240
  activity: activity,
@@ -6840,7 +6840,7 @@ function BooleanPill({entry: entry, pill: pill, editability: editability, surfac
6840
6840
  /* @__PURE__ */
6841
6841
  return jsxRuntime.jsx(PillHint, {
6842
6842
  pill: pill,
6843
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuButton, {
6843
+ children: /* @__PURE__ */ jsxRuntime.jsx(menu.MenuButton, {
6844
6844
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
6845
6845
  ...chrome,
6846
6846
  children: /* @__PURE__ */ jsxRuntime.jsx(PillFaceContent, {
@@ -6850,9 +6850,9 @@ function BooleanPill({entry: entry, pill: pill, editability: editability, surfac
6850
6850
  })
6851
6851
  }),
6852
6852
  id: `boolean-pill-${menuId}`,
6853
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
6853
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
6854
6854
  children: [
6855
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
6855
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
6856
6856
  ...current === !0 ? {
6857
6857
  iconRight: Checkmark.CheckmarkIcon
6858
6858
  } : {},
@@ -6861,7 +6861,7 @@ function BooleanPill({entry: entry, pill: pill, editability: editability, surfac
6861
6861
  },
6862
6862
  text: formatBoolean(!0)
6863
6863
  }),
6864
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
6864
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
6865
6865
  ...current === !1 ? {
6866
6866
  iconRight: Checkmark.CheckmarkIcon
6867
6867
  } : {},
@@ -7256,7 +7256,7 @@ function abortUnconfirmedToast(args) {
7256
7256
  }
7257
7257
 
7258
7258
  function AbortWorkflowDialog({entry: entry, onClose: onClose}) {
7259
- const {engine: engine} = useWorkflowContext(), definition = useDefinition(entry), toast = useWorkflowToast(), telemetry2 = workflowReact.useWorkflowTelemetry(), [typedReason, setTypedReason] = react.useState(""), [pending, setPending] = react.useState(!1), {instance: instance} = entry, title = instanceTitle(instance, definition), reason = normalizeAbortReason(typedReason), reasonInputId = `abort-workflow-reason-${instance._id}`;
7259
+ const {engine: engine} = useWorkflowContext(), definition = useDefinition(entry), toast2 = useWorkflowToast(), telemetry2 = workflowReact.useWorkflowTelemetry(), [typedReason, setTypedReason] = react.useState(""), [pending, setPending] = react.useState(!1), {instance: instance} = entry, title = instanceTitle(instance, definition), reason = normalizeAbortReason(typedReason), reasonInputId = `abort-workflow-reason-${instance._id}`;
7260
7260
  useLogEventOnMount(WorkflowAbortDialogOpened, {
7261
7261
  instanceId: instance._id
7262
7262
  });
@@ -7275,9 +7275,9 @@ function AbortWorkflowDialog({entry: entry, onClose: onClose}) {
7275
7275
  title: title,
7276
7276
  changed: changed
7277
7277
  });
7278
- toast.push(report.toast), log(report.outcome), onClose();
7278
+ toast2.push(report.toast), log(report.outcome), onClose();
7279
7279
  } catch (err) {
7280
- toast.push(abortUnconfirmedToast({
7280
+ toast2.push(abortUnconfirmedToast({
7281
7281
  title: title,
7282
7282
  err: err
7283
7283
  })), log("unconfirmed"), setPending(!1);
@@ -7436,7 +7436,7 @@ function CodeChip({value: value}) {
7436
7436
  }
7437
7437
 
7438
7438
  function HintedMenuButton({hint: hint, ...menuButtonProps}) {
7439
- const [open, setOpen] = react.useState(!1), popover = {
7439
+ const [open, setOpen] = react.useState(!1), popover2 = {
7440
7440
  tone: "default",
7441
7441
  ...menuButtonProps.popover?.placement === void 0 ? {
7442
7442
  placement: "bottom-end",
@@ -7444,17 +7444,17 @@ function HintedMenuButton({hint: hint, ...menuButtonProps}) {
7444
7444
  } : {},
7445
7445
  ...menuButtonProps.popover
7446
7446
  };
7447
- return hint === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.MenuButton, {
7447
+ return hint === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(menu.MenuButton, {
7448
7448
  ...menuButtonProps,
7449
- popover: popover
7449
+ popover: popover2
7450
7450
  }) : /* @__PURE__ */ jsxRuntime.jsx(workflowComponents._HoverHint, {
7451
7451
  disabled: open,
7452
7452
  text: hint,
7453
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuButton, {
7453
+ children: /* @__PURE__ */ jsxRuntime.jsx(menu.MenuButton, {
7454
7454
  ...menuButtonProps,
7455
7455
  onClose: () => setOpen(!1),
7456
7456
  onOpen: () => setOpen(!0),
7457
- popover: popover
7457
+ popover: popover2
7458
7458
  })
7459
7459
  });
7460
7460
  }
@@ -7489,7 +7489,7 @@ function historyWindow(args) {
7489
7489
  }
7490
7490
 
7491
7491
  function PendingEffectRows({instance: instance, now: now}) {
7492
- const {completeEffectFor: completeEffectFor, effectHandlers: effectHandlers} = useWorkflowContext(), toast = useWorkflowToast(), drain = useDrainEffects(instance._id), [resolving, setResolving] = react.useState(!1), pending = instance.pendingEffects ?? [];
7492
+ const {completeEffectFor: completeEffectFor, effectHandlers: effectHandlers} = useWorkflowContext(), toast2 = useWorkflowToast(), drain = useDrainEffects(instance._id), [resolving, setResolving] = react.useState(!1), pending = instance.pendingEffects ?? [];
7493
7493
  if (pending.length === 0) return null;
7494
7494
  const resolve = async (effectKey, status) => {
7495
7495
  setResolving(!0);
@@ -7498,13 +7498,13 @@ function PendingEffectRows({instance: instance, now: now}) {
7498
7498
  effectKey: effectKey,
7499
7499
  status: status,
7500
7500
  detail: "Resolved in Studio"
7501
- }), toast.push({
7501
+ }), toast2.push({
7502
7502
  id: TOAST_ID.effectResolve,
7503
7503
  status: "info",
7504
7504
  title: `Effect marked as ${status}`
7505
7505
  });
7506
7506
  } catch (err) {
7507
- toast.push({
7507
+ toast2.push({
7508
7508
  id: TOAST_ID.effectResolve,
7509
7509
  status: "error",
7510
7510
  title: "Failed to resolve the effect",
@@ -7583,16 +7583,16 @@ function PendingEffectRow({busy: busy, effect: effect, instanceId: instanceId, n
7583
7583
  }),
7584
7584
  hint: "Resolve",
7585
7585
  id: `pending-effect-menu-${instanceId}-${effect._key}`,
7586
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
7587
- children: [ registered ? /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
7586
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
7587
+ children: [ registered ? /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
7588
7588
  onClick: onRunHandlers,
7589
7589
  text: "Run registered handlers"
7590
7590
  }) : null,
7591
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
7591
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
7592
7592
  onClick: () => onResolve("done"),
7593
7593
  text: "Mark done"
7594
7594
  }),
7595
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
7595
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
7596
7596
  onClick: () => onResolve("failed"),
7597
7597
  text: "Mark failed",
7598
7598
  tone: "critical"
@@ -7760,7 +7760,7 @@ function InstanceCardMenu({entry: entry, title: title}) {
7760
7760
  /* @__PURE__ */
7761
7761
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
7762
7762
  children: [
7763
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuButton, {
7763
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuButton, {
7764
7764
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
7765
7765
  "aria-label": `More options for ${title}`,
7766
7766
  fontSize: 1,
@@ -7769,15 +7769,15 @@ function InstanceCardMenu({entry: entry, title: title}) {
7769
7769
  padding: 2
7770
7770
  }),
7771
7771
  id: `workflow-instance-menu-${menuId}`,
7772
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
7772
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
7773
7773
  children: [
7774
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
7774
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
7775
7775
  onClick: () => setDialog("history"),
7776
7776
  text: "Workflow history"
7777
7777
  }), isLiveEntry(entry) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
7778
7778
  children: [
7779
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuDivider, {}),
7780
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
7779
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuDivider, {}),
7780
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
7781
7781
  onClick: () => setDialog("abort"),
7782
7782
  text: "Cancel workflow…",
7783
7783
  tone: "critical"
@@ -8405,17 +8405,17 @@ function NoteBanner({action: action, label: label, tone: tone = "caution"}) {
8405
8405
  }
8406
8406
 
8407
8407
  function CopyDetailsButton({unreadable: unreadable}) {
8408
- const toast = useWorkflowToast();
8408
+ const toast2 = useWorkflowToast();
8409
8409
  /* @__PURE__ */
8410
8410
  return jsxRuntime.jsx(ui.Button, {
8411
8411
  fontSize: 1,
8412
8412
  mode: "ghost",
8413
8413
  onClick: () => {
8414
- navigator.clipboard.writeText(unreadableDocsReport(unreadable)).then(() => toast.push({
8414
+ navigator.clipboard.writeText(unreadableDocsReport(unreadable)).then(() => toast2.push({
8415
8415
  id: TOAST_ID.detailsCopy,
8416
8416
  status: "info",
8417
8417
  title: "Details copied to clipboard"
8418
- }), () => toast.push({
8418
+ }), () => toast2.push({
8419
8419
  id: TOAST_ID.detailsCopy,
8420
8420
  status: "error",
8421
8421
  title: "Failed to copy the details"
@@ -8455,7 +8455,7 @@ function InvalidDocNotice({invalid: invalid}) {
8455
8455
  radius: 2,
8456
8456
  tone: "caution",
8457
8457
  children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, {
8458
- space: 3,
8458
+ gap: 3,
8459
8459
  children: [
8460
8460
  /* @__PURE__ */ jsxRuntime.jsx(ui.Text, {
8461
8461
  size: 1,
@@ -9072,7 +9072,7 @@ function showRowOnError(key, mapping) {
9072
9072
  }
9073
9073
 
9074
9074
  function useStartWorkflow(args) {
9075
- const {mapping: mapping, docId: docId, initialValue: initialValue, source: source} = args, toast = useWorkflowToast(), schema = sanity.useSchema(), {engine: engine, openStartDialog: openStartDialog, mappingIssues: mappingIssues2, mappingStarts: mappingStarts} = useWorkflowContext(), observer2 = workflowStudio.useStudioObserver({
9075
+ const {mapping: mapping, docId: docId, initialValue: initialValue, source: source} = args, toast2 = useWorkflowToast(), schema = sanity.useSchema(), {engine: engine, openStartDialog: openStartDialog, mappingIssues: mappingIssues2, mappingStarts: mappingStarts} = useWorkflowContext(), observer2 = workflowStudio.useStudioObserver({
9076
9076
  engine: engine
9077
9077
  }), [starting, setStarting] = react.useState(!1), {selectedReleaseId: selectedReleaseId} = sanity.usePerspective(), releaseActive = sanity.useIsReleaseActive(), startBlock = mappingStarts.get(mappingKey(mapping)), hidden = workflowEngine.startKindOf({
9078
9078
  start: startBlock
@@ -9115,7 +9115,7 @@ function useStartWorkflow(args) {
9115
9115
  initialValue: initialValue,
9116
9116
  selectedReleaseId: selectedReleaseId,
9117
9117
  ensureDocumentExists: observer2.ensureDocumentExists,
9118
- onPersistFailure: err => toast.push({
9118
+ onPersistFailure: err => toast2.push({
9119
9119
  id: TOAST_ID.documentSave,
9120
9120
  status: "error",
9121
9121
  title: "Failed to save the document",
@@ -9207,7 +9207,7 @@ function StartWorkflowControl({mappings: mappings, docId: docId, initialValue: i
9207
9207
  hint: menuLabel
9208
9208
  } : {},
9209
9209
  id: `start-workflow-menu-${menuId}`,
9210
- menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, {
9210
+ menu: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu, {
9211
9211
  children: startable.map(mapping => /* @__PURE__ */ jsxRuntime.jsx(StartWorkflowMenuItem, {
9212
9212
  docId: docId,
9213
9213
  initialValue: initialValue,
@@ -9229,7 +9229,7 @@ function StartWorkflowMenuItem({mapping: mapping, docId: docId, initialValue: in
9229
9229
  docId: docId,
9230
9230
  initialValue: initialValue,
9231
9231
  source: source
9232
- }), item = /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
9232
+ }), item = /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
9233
9233
  disabled: blocked || starting || !docId,
9234
9234
  onClick: () => {
9235
9235
  start();
@@ -10513,7 +10513,7 @@ function ReleasePicker({value: value, onChange: onChange}) {
10513
10513
  releaseName: value.releaseName
10514
10514
  })
10515
10515
  })
10516
- }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Autocomplete, {
10516
+ }) : /* @__PURE__ */ jsxRuntime.jsx(autocomplete.Autocomplete, {
10517
10517
  filterOption: (query, option) => labelOf(option.value).toLowerCase().includes(query.toLowerCase()),
10518
10518
  fontSize: 1,
10519
10519
  icon: Search.SearchIcon,
@@ -10574,7 +10574,7 @@ function useLatestDefinition(definitionName) {
10574
10574
  function useCreateDoc(args) {
10575
10575
  const {releaseId: releaseId, onCreated: onCreated} = args, {engine: engine, binding: binding} = useWorkflowContext(), observer2 = workflowStudio.useStudioObserver({
10576
10576
  engine: engine
10577
- }), schema = sanity.useSchema(), templates = sanity.useTemplates(), resolverContext = sanity.useInitialValueResolverContext(), toast = useWorkflowToast(), [creating, setCreating] = react.useState(!1);
10577
+ }), schema = sanity.useSchema(), templates = sanity.useTemplates(), resolverContext = sanity.useInitialValueResolverContext(), toast2 = useWorkflowToast(), [creating, setCreating] = react.useState(!1);
10578
10578
  return {
10579
10579
  creating: creating,
10580
10580
  createDoc: async type => {
@@ -10598,7 +10598,7 @@ function useCreateDoc(args) {
10598
10598
  type: type
10599
10599
  }));
10600
10600
  } catch (err) {
10601
- toast.push({
10601
+ toast2.push({
10602
10602
  id: TOAST_ID.documentCreate,
10603
10603
  status: "error",
10604
10604
  title: "Failed to create the document",
@@ -10646,7 +10646,7 @@ function CreateDocMenu({entryName: entryName, options: options, releaseId: relea
10646
10646
  onCreated: onCreated
10647
10647
  });
10648
10648
  return options.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ui.Flex, {
10649
- children: /* @__PURE__ */ jsxRuntime.jsx(ui.MenuButton, {
10649
+ children: /* @__PURE__ */ jsxRuntime.jsx(menu.MenuButton, {
10650
10650
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
10651
10651
  disabled: creating,
10652
10652
  fontSize: 1,
@@ -10656,8 +10656,8 @@ function CreateDocMenu({entryName: entryName, options: options, releaseId: relea
10656
10656
  text: creating ? "Creating…" : "Create new document…"
10657
10657
  }),
10658
10658
  id: `create-doc-${entryName}`,
10659
- menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, {
10660
- children: options.map(type => /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
10659
+ menu: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu, {
10660
+ children: options.map(type => /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
10661
10661
  onClick: () => {
10662
10662
  createDoc(type);
10663
10663
  },
@@ -10852,7 +10852,6 @@ function SelectedReleaseRow({mapping: mapping, selectedReleaseId: selectedReleas
10852
10852
  children: "Release:"
10853
10853
  }),
10854
10854
  /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, {
10855
- mode: "outline",
10856
10855
  style: badgeTrim,
10857
10856
  tone: "primary",
10858
10857
  children: selectedReleaseId
@@ -10928,13 +10927,13 @@ function ResumeNote({onStartNew: onStartNew}) {
10928
10927
  }
10929
10928
 
10930
10929
  function handleStartError(args) {
10931
- const {label: label, toast: toast, seedInstance: seedInstance, onClose: onClose} = args, outcome = classifyStartError(args.err);
10932
- toast.push(startOutcomeToast(outcome, label)), startProducedRun(outcome) && (outcome.instance !== void 0 && seedInstance(outcome.instance),
10930
+ const {label: label, toast: toast2, seedInstance: seedInstance, onClose: onClose} = args, outcome = classifyStartError(args.err);
10931
+ toast2.push(startOutcomeToast(outcome, label)), startProducedRun(outcome) && (outcome.instance !== void 0 && seedInstance(outcome.instance),
10933
10932
  onClose());
10934
10933
  }
10935
10934
 
10936
10935
  function StartWorkflowForm({request: request, onClose: onClose}) {
10937
- const {definition: definitionName, label: label, mapping: mapping, subjectDocId: subjectDocId} = request, {engine: engine, binding: binding, seedInstance: seedInstance} = useWorkflowContext(), telemetry2 = workflowReact.useWorkflowTelemetry(), toast = useWorkflowToast(), {def: definition, error: definitionError} = useLatestDefinition(definitionName), {selectedReleaseId: selectedReleaseId} = sanity.usePerspective(), releaseId = boundReleaseId(mapping, selectedReleaseId), [values, setValues] = react.useState({}), [attempt, setAttempt] = react.useState(void 0), starting = attempt !== void 0, [heldInstanceId, setHeldInstanceId] = react.useState(void 0), [startNew, setStartNew] = react.useState(!1), {entries: entries} = useWorkflowsForDocument(subjectDocId), resumeEntry = presentedResumeEntry({
10936
+ const {definition: definitionName, label: label, mapping: mapping, subjectDocId: subjectDocId} = request, {engine: engine, binding: binding, seedInstance: seedInstance} = useWorkflowContext(), telemetry2 = workflowReact.useWorkflowTelemetry(), toast2 = useWorkflowToast(), {def: definition, error: definitionError} = useLatestDefinition(definitionName), {selectedReleaseId: selectedReleaseId} = sanity.usePerspective(), releaseId = boundReleaseId(mapping, selectedReleaseId), [values, setValues] = react.useState({}), [attempt, setAttempt] = react.useState(void 0), starting = attempt !== void 0, [heldInstanceId, setHeldInstanceId] = react.useState(void 0), [startNew, setStartNew] = react.useState(!1), {entries: entries} = useWorkflowsForDocument(subjectDocId), resumeEntry = presentedResumeEntry({
10938
10937
  entries: entries,
10939
10938
  definitionName: definitionName,
10940
10939
  heldInstanceId: heldInstanceId,
@@ -10973,7 +10972,7 @@ function StartWorkflowForm({request: request, onClose: onClose}) {
10973
10972
  initFields: initFields,
10974
10973
  values: values
10975
10974
  }));
10976
- toast.push({
10975
+ toast2.push({
10977
10976
  id: TOAST_ID.start,
10978
10977
  status: "info",
10979
10978
  title: `“${definition?.title ?? label}” started`,
@@ -10983,7 +10982,7 @@ function StartWorkflowForm({request: request, onClose: onClose}) {
10983
10982
  handleStartError({
10984
10983
  err: err,
10985
10984
  label: definition?.title ?? label,
10986
- toast: toast,
10985
+ toast: toast2,
10987
10986
  seedInstance: seedInstance,
10988
10987
  onClose: onClose
10989
10988
  });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- var jsxRuntime = require("react/jsx-runtime"), ChevronDown = require("@sanity/icons/ChevronDown"), ChevronRight = require("@sanity/icons/ChevronRight"), EllipsisHorizontal = require("@sanity/icons/EllipsisHorizontal"), Launch = require("@sanity/icons/Launch"), ui = require("@sanity/ui"), workflowReact = require("@sanity/workflow-react"), react = require("react"), router = require("sanity/router"), index = require("./index.cjs"), Transfer = require("@sanity/icons/Transfer"), WarningOutline = require("@sanity/icons/WarningOutline"), workflowComponents = require("@sanity/workflow-components"), sanity = require("sanity"), workflowEngine = require("@sanity/workflow-engine"), workflowStudio = require("@sanity/workflow-studio"), pluralize = require("pluralize-esm"), ChevronLeft = require("@sanity/icons/ChevronLeft"), Close = require("@sanity/icons/Close"), Expand = require("@sanity/icons/Expand"), react$1 = require("motion/react"), reactVirtual = require("@tanstack/react-virtual"), reactDom = require("react-dom"), styledComponents = require("styled-components"), types = require("@sanity/types"), User = require("@sanity/icons/User"), Add = require("@sanity/icons/Add"), Checkmark = require("@sanity/icons/Checkmark"), Search = require("@sanity/icons/Search"), workflowDiagram = require("@sanity/workflow-diagram");
3
+ var jsxRuntime = require("react/jsx-runtime"), ChevronDown = require("@sanity/icons/ChevronDown"), ChevronRight = require("@sanity/icons/ChevronRight"), EllipsisHorizontal = require("@sanity/icons/EllipsisHorizontal"), Launch = require("@sanity/icons/Launch"), ui = require("@sanity/ui"), menu = require("@sanity/ui/menu"), workflowReact = require("@sanity/workflow-react"), react = require("react"), router = require("sanity/router"), index = require("./index.cjs"), Transfer = require("@sanity/icons/Transfer"), WarningOutline = require("@sanity/icons/WarningOutline"), workflowComponents = require("@sanity/workflow-components"), sanity = require("sanity"), workflowEngine = require("@sanity/workflow-engine"), workflowStudio = require("@sanity/workflow-studio"), pluralize = require("pluralize-esm"), ChevronLeft = require("@sanity/icons/ChevronLeft"), Close = require("@sanity/icons/Close"), Expand = require("@sanity/icons/Expand"), react$1 = require("motion/react"), reactVirtual = require("@tanstack/react-virtual"), reactDom = require("react-dom"), styledComponents = require("styled-components"), types = require("@sanity/types"), User = require("@sanity/icons/User"), popover = require("@sanity/ui/popover"), Add = require("@sanity/icons/Add"), Checkmark = require("@sanity/icons/Checkmark"), Search = require("@sanity/icons/Search"), workflowDiagram = require("@sanity/workflow-diagram");
4
4
 
5
5
  function _interopDefaultCompat(e) {
6
6
  return e && typeof e == "object" && "default" in e ? e : {
@@ -708,7 +708,7 @@ function DefinitionRow({countKnown: countKnown, now: now, onOpen: onOpen, row: r
708
708
  paddingRight: titleGap
709
709
  },
710
710
  children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Stack, {
711
- space: 3,
711
+ gap: 3,
712
712
  children: [
713
713
  /* @__PURE__ */ jsxRuntime.jsx(ui.Text, {
714
714
  size: 1,
@@ -3600,7 +3600,7 @@ function RunsFilterMenu({definition: definition, onView: onView, scoped: scoped,
3600
3600
  value: value
3601
3601
  })), applied = facet => appliedFacetValues(view.filters, facet), myId = index.useCurrentUserId();
3602
3602
  /* @__PURE__ */
3603
- return jsxRuntime.jsx(ui.MenuButton, {
3603
+ return jsxRuntime.jsx(menu.MenuButton, {
3604
3604
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
3605
3605
  fontSize: 1,
3606
3606
  gap: 2,
@@ -3610,9 +3610,9 @@ function RunsFilterMenu({definition: definition, onView: onView, scoped: scoped,
3610
3610
  text: "Add filter"
3611
3611
  }),
3612
3612
  id: "runs-filter-menu",
3613
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
3613
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
3614
3614
  children: [
3615
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuGroup, {
3615
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuGroup, {
3616
3616
  fontSize: 1,
3617
3617
  popover: SUBMENU_POPOVER,
3618
3618
  text: "Assignee",
@@ -3630,11 +3630,11 @@ function RunsFilterMenu({definition: definition, onView: onView, scoped: scoped,
3630
3630
  unassignedCount: index.unassignedRunCount(scoped)
3631
3631
  })
3632
3632
  })
3633
- }), definition === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ui.MenuGroup, {
3633
+ }), definition === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(menu.MenuGroup, {
3634
3634
  fontSize: 1,
3635
3635
  popover: SUBMENU_POPOVER,
3636
3636
  text: "Stage",
3637
- children: options.stage.map(option => /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
3637
+ children: options.stage.map(option => /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
3638
3638
  fontSize: 1,
3639
3639
  onClick: () => add("stage", option.key),
3640
3640
  children: /* @__PURE__ */ jsxRuntime.jsx(CountedMenuRow, {
@@ -3645,11 +3645,11 @@ function RunsFilterMenu({definition: definition, onView: onView, scoped: scoped,
3645
3645
  })
3646
3646
  }, option.key))
3647
3647
  }),
3648
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuGroup, {
3648
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuGroup, {
3649
3649
  fontSize: 1,
3650
3650
  popover: SUBMENU_POPOVER,
3651
3651
  text: "Needs attention",
3652
- children: options.attention.map(option => /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
3652
+ children: options.attention.map(option => /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
3653
3653
  fontSize: 1,
3654
3654
  onClick: () => add("attention", option.key),
3655
3655
  children: /* @__PURE__ */ jsxRuntime.jsx(CountedMenuRow, {
@@ -3660,8 +3660,8 @@ function RunsFilterMenu({definition: definition, onView: onView, scoped: scoped,
3660
3660
  })
3661
3661
  }, option.key))
3662
3662
  }),
3663
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuDivider, {}),
3664
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuGroup, {
3663
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuDivider, {}),
3664
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuGroup, {
3665
3665
  fontSize: 1,
3666
3666
  popover: SUBMENU_POPOVER,
3667
3667
  text: "Release",
@@ -3771,7 +3771,7 @@ function QueryableValues({mediaOf: mediaOf, onPick: onPick, onToggle: onToggle,
3771
3771
  children: [ shownSpecials.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
3772
3772
  children: [ shownSpecials.map(row => /* @__PURE__ */ jsxRuntime.jsx(SpecialValueItem, {
3773
3773
  special: row
3774
- }, row.label)), trimmed === "" && hitSections.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.MenuDivider, {}) : null ]
3774
+ }, row.label)), trimmed === "" && hitSections.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(menu.MenuDivider, {}) : null ]
3775
3775
  }), hitSections.length === 0 && shownSpecials.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.Box, {
3776
3776
  padding: 3,
3777
3777
  children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, {
@@ -3781,7 +3781,7 @@ function QueryableValues({mediaOf: mediaOf, onPick: onPick, onToggle: onToggle,
3781
3781
  })
3782
3782
  }) : null, grouped.map((rows, index2) =>
3783
3783
  /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, {
3784
- children: [ index2 > 0 ? /* @__PURE__ */ jsxRuntime.jsx(ui.MenuDivider, {}) : null, rows.map(row => /* @__PURE__ */ jsxRuntime.jsx(ValueItem, {
3784
+ children: [ index2 > 0 ? /* @__PURE__ */ jsxRuntime.jsx(menu.MenuDivider, {}) : null, rows.map(row => /* @__PURE__ */ jsxRuntime.jsx(ValueItem, {
3785
3785
  media: mediaOf?.(row),
3786
3786
  onPick: () => onPick(row),
3787
3787
  onToggle: onToggle === void 0 ? void 0 : () => onToggle(row),
@@ -3804,7 +3804,7 @@ function mannerProps(args) {
3804
3804
 
3805
3805
  function SpecialValueItem({special: special}) {
3806
3806
  /* @__PURE__ */
3807
- return jsxRuntime.jsx(ui.MenuItem, {
3807
+ return jsxRuntime.jsx(menu.MenuItem, {
3808
3808
  fontSize: 1,
3809
3809
  onClick: special.onPick,
3810
3810
  children: /* @__PURE__ */ jsxRuntime.jsx(CountedMenuRow, {
@@ -3823,7 +3823,7 @@ function SpecialValueItem({special: special}) {
3823
3823
 
3824
3824
  function ValueItem({media: media, onPick: onPick, onToggle: onToggle, row: row}) {
3825
3825
  /* @__PURE__ */
3826
- return jsxRuntime.jsx(ui.MenuItem, {
3826
+ return jsxRuntime.jsx(menu.MenuItem, {
3827
3827
  fontSize: 1,
3828
3828
  onClick: onPick,
3829
3829
  children: /* @__PURE__ */ jsxRuntime.jsx(CountedMenuRow, {
@@ -3898,7 +3898,7 @@ function RunsFilterChips({definition: definition, onView: onView, scoped: scoped
3898
3898
 
3899
3899
  function OperatorButton({facet: facet, index: index2, label: label, onPick: onPick, picked: picked}) {
3900
3900
  /* @__PURE__ */
3901
- return jsxRuntime.jsx(ui.MenuButton, {
3901
+ return jsxRuntime.jsx(menu.MenuButton, {
3902
3902
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
3903
3903
  fontSize: 1,
3904
3904
  mode: "bleed",
@@ -3907,8 +3907,8 @@ function OperatorButton({facet: facet, index: index2, label: label, onPick: onPi
3907
3907
  text: label
3908
3908
  }),
3909
3909
  id: `runs-chip-operator-${index2}`,
3910
- menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, {
3911
- children: polarityOptionsOf(facet).map(option => /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
3910
+ menu: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu, {
3911
+ children: polarityOptionsOf(facet).map(option => /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
3912
3912
  fontSize: 1,
3913
3913
  onClick: () => onPick(option.key),
3914
3914
  pressed: picked === option.key,
@@ -3994,7 +3994,7 @@ function ValuesButton({apply: apply, chip: chip, displayById: displayById, optio
3994
3994
  /* @__PURE__ */
3995
3995
  return jsxRuntime.jsx(ValuePopoverButton, {
3996
3996
  label: label,
3997
- children: close => listed.map(option => /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
3997
+ children: close => listed.map(option => /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
3998
3998
  fontSize: 1,
3999
3999
  onClick: () => pick(option.key, close),
4000
4000
  children: /* @__PURE__ */ jsxRuntime.jsx(CountedMenuRow, {
@@ -4010,8 +4010,8 @@ function ValuesButton({apply: apply, chip: chip, displayById: displayById, optio
4010
4010
  function ValuePopoverButton({children: children, faces: faces, label: label}) {
4011
4011
  const [open, setOpen] = react.useState(!1), buttonRef = react.useRef(null), close = () => setOpen(!1);
4012
4012
  /* @__PURE__ */
4013
- return jsxRuntime.jsx(ui.Popover, {
4014
- content: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, {
4013
+ return jsxRuntime.jsx(popover.Popover, {
4014
+ content: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu, {
4015
4015
  onClickOutside: event => {
4016
4016
  event.target instanceof Node && buttonRef.current?.contains(event.target) || close();
4017
4017
  },
@@ -4276,7 +4276,7 @@ function ScopeSelect({onView: onView, view: view}) {
4276
4276
  filters: view.filters
4277
4277
  });
4278
4278
  /* @__PURE__ */
4279
- return jsxRuntime.jsx(ui.MenuButton, {
4279
+ return jsxRuntime.jsx(menu.MenuButton, {
4280
4280
  button: /* @__PURE__ */ jsxRuntime.jsx(SurfaceButton, {
4281
4281
  $surface: color.bg,
4282
4282
  fontSize: 1,
@@ -4286,15 +4286,15 @@ function ScopeSelect({onView: onView, view: view}) {
4286
4286
  text: view.scope === "closed" ? "Closed runs" : "Open runs"
4287
4287
  }),
4288
4288
  id: "runs-scope-filter",
4289
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
4289
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
4290
4290
  children: [
4291
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
4291
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
4292
4292
  fontSize: 1,
4293
4293
  onClick: () => pick("open"),
4294
4294
  pressed: view.scope === "open",
4295
4295
  text: "Open runs"
4296
4296
  }),
4297
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
4297
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
4298
4298
  fontSize: 1,
4299
4299
  onClick: () => pick("closed"),
4300
4300
  pressed: view.scope === "closed",
@@ -4313,7 +4313,7 @@ function ScopeSelect({onView: onView, view: view}) {
4313
4313
  function WorkflowSelect({counts: counts, definitions: definitions, onView: onView, totalCount: totalCount, view: view}) {
4314
4314
  const options = [ ...definitions ].sort(byTitleThenName), selected = options.find(definition => definition.name === view.filters.workflow), pick = name => onView(workflowScopedView(view, name));
4315
4315
  /* @__PURE__ */
4316
- return jsxRuntime.jsx(ui.MenuButton, {
4316
+ return jsxRuntime.jsx(menu.MenuButton, {
4317
4317
  button:
4318
4318
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
4319
4319
  disabled: options.length === 0,
@@ -4337,7 +4337,7 @@ function WorkflowSelect({counts: counts, definitions: definitions, onView: onVie
4337
4337
  })
4338
4338
  }),
4339
4339
  id: "runs-workflow-filter",
4340
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
4340
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
4341
4341
  children: [
4342
4342
  /* @__PURE__ */ jsxRuntime.jsx(QueryableValues, {
4343
4343
  onPick: row => pick(row.key),
@@ -4355,7 +4355,7 @@ function WorkflowSelect({counts: counts, definitions: definitions, onView: onVie
4355
4355
  } ]
4356
4356
  }), options.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
4357
4357
  children: [
4358
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuDivider, {}),
4358
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuDivider, {}),
4359
4359
  /* @__PURE__ */ jsxRuntime.jsx(ui.Box, {
4360
4360
  padding: 2,
4361
4361
  children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, {
@@ -5561,7 +5561,7 @@ function WorkflowsToolRoot() {
5561
5561
 
5562
5562
  function ToolOverflowMenu({onOpenDefinitions: onOpenDefinitions}) {
5563
5563
  /* @__PURE__ */
5564
- return jsxRuntime.jsx(ui.MenuButton, {
5564
+ return jsxRuntime.jsx(menu.MenuButton, {
5565
5565
  button: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
5566
5566
  "aria-label": "More",
5567
5567
  fontSize: 1,
@@ -5570,15 +5570,15 @@ function ToolOverflowMenu({onOpenDefinitions: onOpenDefinitions}) {
5570
5570
  padding: 2
5571
5571
  }),
5572
5572
  id: "workflows-tool-overflow",
5573
- menu: /* @__PURE__ */ jsxRuntime.jsxs(ui.Menu, {
5573
+ menu: /* @__PURE__ */ jsxRuntime.jsxs(menu.Menu, {
5574
5574
  children: [
5575
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
5575
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
5576
5576
  fontSize: 1,
5577
5577
  onClick: onOpenDefinitions,
5578
5578
  text: "Definitions"
5579
5579
  }),
5580
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuDivider, {}),
5581
- /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
5580
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuDivider, {}),
5581
+ /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
5582
5582
  as: "a",
5583
5583
  fontSize: 1,
5584
5584
  href: WORKFLOWS_DOCS_URL,
@@ -5644,7 +5644,7 @@ function DefinitionsCrumbs({onOpenDefinitions: onOpenDefinitions, onOpenWorkflow
5644
5644
  function WorkflowCrumbPicker({name: name, onOpenWorkflow: onOpenWorkflow}) {
5645
5645
  const {definitions: definitions} = useDeployedDefinitions(), options = workflowOptions(definitions ?? []), title = options.find(option => option.name === name)?.title ?? name;
5646
5646
  /* @__PURE__ */
5647
- return jsxRuntime.jsx(ui.MenuButton, {
5647
+ return jsxRuntime.jsx(menu.MenuButton, {
5648
5648
  button:
5649
5649
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, {
5650
5650
  disabled: options.length === 0,
@@ -5668,8 +5668,8 @@ function WorkflowCrumbPicker({name: name, onOpenWorkflow: onOpenWorkflow}) {
5668
5668
  })
5669
5669
  }),
5670
5670
  id: "workflows-crumb-picker",
5671
- menu: /* @__PURE__ */ jsxRuntime.jsx(ui.Menu, {
5672
- children: options.map(option => /* @__PURE__ */ jsxRuntime.jsx(ui.MenuItem, {
5671
+ menu: /* @__PURE__ */ jsxRuntime.jsx(menu.Menu, {
5672
+ children: options.map(option => /* @__PURE__ */ jsxRuntime.jsx(menu.MenuItem, {
5673
5673
  fontSize: 1,
5674
5674
  onClick: () => onOpenWorkflow(option.name),
5675
5675
  pressed: option.name === name,
@@ -2,7 +2,7 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
 
3
3
  import { TimelineIcon } from "@sanity/icons/Timeline";
4
4
 
5
- import { useClickOutsideEvent, Popover, Box, Flex, TextInput, Button, Select, Checkbox, Text, Stack, Autocomplete, Card, TextArea, useToast, Dialog, Switch, useTheme_v2, TextSkeleton, Code, Badge, Spinner, MenuButton, Menu, MenuItem, useElementSize, MenuDivider, TabList, Tab, TabPanel } from "@sanity/ui";
5
+ import { useClickOutsideEvent, Box, Flex, TextInput, Button, Select, Checkbox, Text, Stack, Card, TextArea, Dialog, Switch, useTheme_v2, TextSkeleton, Badge, Spinner, useElementSize, TabList, Tab, TabPanel } from "@sanity/ui";
6
6
 
7
7
  import { editFieldTarget, useWorkflowTelemetry, useRefcountedIds } from "@sanity/workflow-react";
8
8
 
@@ -30,16 +30,24 @@ import { useCurrentUser, Preview, useValuePreview, SanityDefaultPreview, useClie
30
30
 
31
31
  import { CalendarIcon } from "@sanity/icons/Calendar";
32
32
 
33
+ import { Popover } from "@sanity/ui/popover";
34
+
33
35
  import { UserIcon } from "@sanity/icons/User";
34
36
 
35
37
  import { SearchIcon } from "@sanity/icons/Search";
36
38
 
39
+ import { Autocomplete } from "@sanity/ui/autocomplete";
40
+
41
+ import { useToast } from "@sanity/ui/toast";
42
+
37
43
  import { EditIcon } from "@sanity/icons/Edit";
38
44
 
39
45
  import { randomKey } from "@sanity/util/content";
40
46
 
41
47
  import { InfoOutlineIcon } from "@sanity/icons/InfoOutline";
42
48
 
49
+ import { Code } from "@sanity/ui/code";
50
+
43
51
  import { DocumentIcon } from "@sanity/icons/Document";
44
52
 
45
53
  import { WarningOutlineIcon } from "@sanity/icons/WarningOutline";
@@ -66,6 +74,8 @@ import { BoltIcon } from "@sanity/icons/Bolt";
66
74
 
67
75
  import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
68
76
 
77
+ import { MenuButton, Menu, MenuItem, MenuDivider } from "@sanity/ui/menu";
78
+
69
79
  import pluralize from "pluralize-esm";
70
80
 
71
81
  import { ChevronRightIcon } from "@sanity/icons/ChevronRight";
@@ -8535,7 +8545,7 @@ function InvalidDocNotice({invalid: invalid}) {
8535
8545
  radius: 2,
8536
8546
  tone: "caution",
8537
8547
  children: /* @__PURE__ */ jsxs(Stack, {
8538
- space: 3,
8548
+ gap: 3,
8539
8549
  children: [
8540
8550
  /* @__PURE__ */ jsx(Text, {
8541
8551
  size: 1,
@@ -10931,7 +10941,6 @@ function SelectedReleaseRow({mapping: mapping, selectedReleaseId: selectedReleas
10931
10941
  children: "Release:"
10932
10942
  }),
10933
10943
  /* @__PURE__ */ jsx(Badge, {
10934
- mode: "outline",
10935
10944
  style: badgeTrim,
10936
10945
  tone: "primary",
10937
10946
  children: selectedReleaseId
@@ -8,7 +8,9 @@ import { EllipsisHorizontalIcon } from "@sanity/icons/EllipsisHorizontal";
8
8
 
9
9
  import { LaunchIcon } from "@sanity/icons/Launch";
10
10
 
11
- import { Box, Text, Flex, Stack, Button, useTheme_v2, Card, Dialog, MenuButton, Menu, MenuGroup, MenuItem, MenuDivider, TextInput, Checkbox, Popover, KBD, TabPanel } from "@sanity/ui";
11
+ import { Box, Text, Flex, Stack, Button, useTheme_v2, Card, Dialog, TextInput, Checkbox, KBD, TabPanel } from "@sanity/ui";
12
+
13
+ import { MenuButton, Menu, MenuGroup, MenuItem, MenuDivider } from "@sanity/ui/menu";
12
14
 
13
15
  import { useWorkflowTelemetry } from "@sanity/workflow-react";
14
16
 
@@ -50,6 +52,8 @@ import { isReferenceSchemaType } from "@sanity/types";
50
52
 
51
53
  import { UserIcon } from "@sanity/icons/User";
52
54
 
55
+ import { Popover } from "@sanity/ui/popover";
56
+
53
57
  import { AddIcon } from "@sanity/icons/Add";
54
58
 
55
59
  import { CheckmarkIcon } from "@sanity/icons/Checkmark";
@@ -756,7 +760,7 @@ function DefinitionRow({countKnown: countKnown, now: now, onOpen: onOpen, row: r
756
760
  paddingRight: titleGap
757
761
  },
758
762
  children: /* @__PURE__ */ jsxs(Stack, {
759
- space: 3,
763
+ gap: 3,
760
764
  children: [
761
765
  /* @__PURE__ */ jsx(Text, {
762
766
  size: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/workflow-studio-plugin",
3
- "version": "0.33.0",
3
+ "version": "0.35.0",
4
4
  "description": "Sanity Studio plugin for @sanity/workflow-engine: the form strip, a Workflows document view, stage badges, and the document-action lock.",
5
5
  "keywords": [
6
6
  "sanity",
@@ -42,12 +42,12 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@sanity/client": "^7.24.0",
45
+ "@sanity/client": "^8.6.2",
46
46
  "@sanity/icons": "^4.1.0",
47
47
  "@sanity/telemetry": "^1.1.0",
48
- "@sanity/types": "^6",
49
- "@sanity/ui": "^3.3.0",
50
- "@sanity/util": "^6.3.0",
48
+ "@sanity/types": "^6.15.0",
49
+ "@sanity/ui": "^4.2.1",
50
+ "@sanity/util": "^6.15.0",
51
51
  "@tanstack/react-virtual": "^3.14.6",
52
52
  "date-fns": "^4.4.0",
53
53
  "motion": "^12.43.0",
@@ -56,39 +56,39 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@sanity/pkg-utils": "^10.5.3",
59
- "@sanity/schema": "^6",
60
- "@sanity/sdk": "^3.1.0",
59
+ "@sanity/schema": "^6.15.0",
60
+ "@sanity/sdk": "^3.3.0",
61
61
  "@storybook/react-vite": "^10.6.0",
62
62
  "@testing-library/react": "^16.3.2",
63
63
  "@types/react": "^19.2.17",
64
64
  "@types/react-dom": "^19.2.3",
65
65
  "jsdom": "^29.1.1",
66
- "react": "^19.2.7",
67
- "react-dom": "^19.2.7",
68
- "sanity": "^6",
66
+ "react": "^19.3.0",
67
+ "react-dom": "^19.3.0",
68
+ "sanity": "^6.15.0",
69
69
  "storybook": "^10.6.0",
70
70
  "styled-components": "^6.4.2",
71
71
  "vite": "^8.2.2",
72
72
  "vitest": "^4.1.8",
73
- "@sanity/workflow-components": "0.33.0",
74
- "@sanity/workflow-diagram": "0.33.0",
75
- "@sanity/workflow-engine": "0.33.0",
76
- "@sanity/workflow-engine-test": "0.33.0",
77
- "@sanity/workflow-react": "0.33.0",
78
- "@sanity/workflow-studio": "0.33.0",
79
- "@sanity/workflow-test-fixtures": "0.0.0"
73
+ "@sanity/workflow-components": "0.35.0",
74
+ "@sanity/workflow-diagram": "0.35.0",
75
+ "@sanity/workflow-engine": "0.35.0",
76
+ "@sanity/workflow-engine-test": "0.35.0",
77
+ "@sanity/workflow-react": "0.35.0",
78
+ "@sanity/workflow-test-fixtures": "0.0.0",
79
+ "@sanity/workflow-studio": "0.35.0"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "@sanity/sdk": "^3.1.0",
83
83
  "react": "^19.2.7",
84
84
  "react-dom": "^19.2.7",
85
- "sanity": "^6.3.0",
85
+ "sanity": "^6.15.0",
86
86
  "styled-components": "^6.4.2",
87
- "@sanity/workflow-components": "0.33.0",
88
- "@sanity/workflow-diagram": "0.33.0",
89
- "@sanity/workflow-engine": "0.33.0",
90
- "@sanity/workflow-react": "0.33.0",
91
- "@sanity/workflow-studio": "0.33.0"
87
+ "@sanity/workflow-diagram": "0.35.0",
88
+ "@sanity/workflow-components": "0.35.0",
89
+ "@sanity/workflow-engine": "0.35.0",
90
+ "@sanity/workflow-react": "0.35.0",
91
+ "@sanity/workflow-studio": "0.35.0"
92
92
  },
93
93
  "engines": {
94
94
  "node": ">=20"