@parallelworks/ui 0.77.0 → 0.79.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.
Files changed (268) hide show
  1. package/README.md +42 -6
  2. package/dist/access/AccessDrawer.d.ts +49 -7
  3. package/dist/access/AccessDrawer.js +243 -38
  4. package/dist/access/AccessList.d.ts +19 -1
  5. package/dist/access/AccessList.js +220 -9
  6. package/dist/access/GrantView.d.ts +3 -1
  7. package/dist/access/GrantView.js +17 -4
  8. package/dist/access/PrincipalPicker.js +5 -5
  9. package/dist/access/focus.js +1 -1
  10. package/dist/access/index.d.ts +2 -2
  11. package/dist/access/index.js +2 -2
  12. package/dist/access/strings.d.ts +25 -1
  13. package/dist/access/strings.js +27 -3
  14. package/dist/access/types.d.ts +26 -0
  15. package/dist/ai/components/AllocationSelector.js +1 -1
  16. package/dist/ai/components/AttachmentManager.js +5 -5
  17. package/dist/ai/components/AttachmentUpload.js +2 -2
  18. package/dist/ai/components/BranchNavigator.js +1 -1
  19. package/dist/ai/components/ChatActivity.js +1 -1
  20. package/dist/ai/components/ChatEmptyState.js +3 -3
  21. package/dist/ai/components/ChatInput.js +3 -5
  22. package/dist/ai/components/ChatLayout.js +1 -1
  23. package/dist/ai/components/ChatMessage.js +1 -1
  24. package/dist/ai/components/ChatMessageList.js +23 -8
  25. package/dist/ai/components/ChatSidebar.js +3 -3
  26. package/dist/ai/components/ChatThread.js +4 -4
  27. package/dist/ai/components/ComposerAddMenu.js +9 -20
  28. package/dist/ai/components/ModelSelector.js +3 -3
  29. package/dist/ai/components/PastedText.js +5 -5
  30. package/dist/ai/components/SessionView.js +1 -1
  31. package/dist/ai/components/ShareDialog.js +3 -3
  32. package/dist/ai/components/SlashMenu.d.ts +31 -4
  33. package/dist/ai/components/SlashMenu.js +36 -63
  34. package/dist/ai/components/agent/ActivityLine.js +1 -1
  35. package/dist/ai/components/agent/AgentMessageParts.js +13 -13
  36. package/dist/ai/components/conversationActions.js +3 -3
  37. package/dist/ai/core/ChatProvider.js +1 -1
  38. package/dist/ai/core/config.js +1 -1
  39. package/dist/ai/ui/ConversationSidebar.js +3 -3
  40. package/dist/ai/ui/sidebar.js +3 -3
  41. package/dist/assets/yaml.worker-DOBV2lND.js +884 -0
  42. package/dist/components/ActionMenu.d.ts +38 -9
  43. package/dist/components/ActionMenu.js +48 -22
  44. package/dist/components/Avatar.d.ts +66 -6
  45. package/dist/components/Avatar.js +130 -18
  46. package/dist/components/Breadcrumbs.d.ts +4 -0
  47. package/dist/components/Breadcrumbs.js +26 -10
  48. package/dist/components/Button.d.ts +3 -2
  49. package/dist/components/Button.js +11 -1
  50. package/dist/components/Callout.d.ts +3 -2
  51. package/dist/components/Callout.js +3 -2
  52. package/dist/components/Card.d.ts +33 -9
  53. package/dist/components/Card.js +24 -8
  54. package/dist/components/Checkbox.d.ts +3 -1
  55. package/dist/components/Checkbox.js +4 -2
  56. package/dist/components/ColorInput.js +1 -1
  57. package/dist/components/Combobox.d.ts +23 -0
  58. package/dist/components/Combobox.js +252 -86
  59. package/dist/components/ConfirmModal.d.ts +28 -2
  60. package/dist/components/ConfirmModal.js +100 -15
  61. package/dist/components/ContextMenu.d.ts +29 -2
  62. package/dist/components/ContextMenu.js +60 -8
  63. package/dist/components/CopyButton.d.ts +21 -8
  64. package/dist/components/CopyButton.js +29 -9
  65. package/dist/components/CreateModal.d.ts +20 -4
  66. package/dist/components/CreateModal.js +28 -17
  67. package/dist/components/DatePicker.d.ts +31 -1
  68. package/dist/components/DatePicker.js +178 -47
  69. package/dist/components/DescriptionList.d.ts +13 -3
  70. package/dist/components/DescriptionList.js +43 -11
  71. package/dist/components/Disclosure.d.ts +10 -2
  72. package/dist/components/Disclosure.js +18 -7
  73. package/dist/components/Drawer.js +5 -5
  74. package/dist/components/EmptyState.d.ts +12 -4
  75. package/dist/components/EmptyState.js +18 -10
  76. package/dist/components/ErrorPage.d.ts +40 -0
  77. package/dist/components/ErrorPage.js +101 -0
  78. package/dist/components/ExternalLink.d.ts +4 -1
  79. package/dist/components/ExternalLink.js +4 -5
  80. package/dist/components/Field.d.ts +21 -6
  81. package/dist/components/Field.js +32 -16
  82. package/dist/components/FileButton.d.ts +19 -0
  83. package/dist/components/FileButton.js +32 -0
  84. package/dist/components/HoverCard.d.ts +26 -6
  85. package/dist/components/HoverCard.js +11 -5
  86. package/dist/components/IconButton.js +4 -2
  87. package/dist/components/InfoTip.js +3 -3
  88. package/dist/components/Input.d.ts +33 -3
  89. package/dist/components/Input.js +149 -14
  90. package/dist/components/Kbd.d.ts +40 -0
  91. package/dist/components/Kbd.js +168 -0
  92. package/dist/components/Listbox.d.ts +103 -0
  93. package/dist/components/Listbox.js +190 -0
  94. package/dist/components/Loader.d.ts +8 -2
  95. package/dist/components/Loader.js +16 -1
  96. package/dist/components/Markdown.js +1 -1
  97. package/dist/components/MarkdownImpl.js +1 -1
  98. package/dist/components/Menu.d.ts +20 -2
  99. package/dist/components/Menu.js +48 -19
  100. package/dist/components/MenuEntries.d.ts +41 -4
  101. package/dist/components/MenuEntries.js +266 -39
  102. package/dist/components/Meter.d.ts +50 -11
  103. package/dist/components/Meter.js +71 -21
  104. package/dist/components/Modal.d.ts +9 -3
  105. package/dist/components/Modal.js +68 -29
  106. package/dist/components/OneTimeCodeInput.js +1 -1
  107. package/dist/components/PageHeader.js +111 -7
  108. package/dist/components/PageHeaderAction.d.ts +8 -3
  109. package/dist/components/PageHeaderAction.js +122 -34
  110. package/dist/components/Pagination.d.ts +13 -1
  111. package/dist/components/Pagination.js +90 -19
  112. package/dist/components/Popover.d.ts +16 -2
  113. package/dist/components/Popover.js +20 -21
  114. package/dist/components/Provider.d.ts +172 -5
  115. package/dist/components/Provider.js +157 -14
  116. package/dist/components/RefreshButton.d.ts +13 -6
  117. package/dist/components/RefreshButton.js +17 -9
  118. package/dist/components/RunStatusIcon.d.ts +16 -7
  119. package/dist/components/RunStatusIcon.js +21 -8
  120. package/dist/components/Section.d.ts +11 -4
  121. package/dist/components/Section.js +33 -22
  122. package/dist/components/SegmentedControl.d.ts +16 -3
  123. package/dist/components/SegmentedControl.js +7 -3
  124. package/dist/components/Select.d.ts +19 -3
  125. package/dist/components/Select.js +114 -68
  126. package/dist/components/SelectionCopy.d.ts +10 -0
  127. package/dist/components/SelectionCopy.js +105 -0
  128. package/dist/components/SettingModeOption.js +1 -1
  129. package/dist/components/SettingsCard.js +1 -1
  130. package/dist/components/Skeleton.js +1 -1
  131. package/dist/components/StatusBadge.d.ts +55 -10
  132. package/dist/components/StatusBadge.js +91 -15
  133. package/dist/components/StickyBar.js +1 -1
  134. package/dist/components/Table.d.ts +22 -4
  135. package/dist/components/Table.js +46 -24
  136. package/dist/components/Tabs.d.ts +9 -4
  137. package/dist/components/Tabs.js +9 -4
  138. package/dist/components/Tag.d.ts +49 -0
  139. package/dist/components/Tag.js +199 -0
  140. package/dist/components/ThemeEditor.js +1 -1
  141. package/dist/components/Toast.js +1 -1
  142. package/dist/components/ToggleGroup.d.ts +4 -1
  143. package/dist/components/ToggleGroup.js +30 -13
  144. package/dist/components/Tooltip.d.ts +9 -3
  145. package/dist/components/Tooltip.js +55 -39
  146. package/dist/components/buttonClasses.d.ts +5 -2
  147. package/dist/components/buttonClasses.js +11 -10
  148. package/dist/components/chart.d.ts +69 -0
  149. package/dist/components/chart.js +145 -0
  150. package/dist/components/comboboxItems.d.ts +7 -1
  151. package/dist/components/comboboxItems.js +6 -2
  152. package/dist/components/dismiss.d.ts +5 -1
  153. package/dist/components/dismiss.js +6 -2
  154. package/dist/components/floating.d.ts +4 -4
  155. package/dist/components/floating.js +5 -5
  156. package/dist/components/headerActionsFit.d.ts +37 -0
  157. package/dist/components/headerActionsFit.js +81 -0
  158. package/dist/components/pageHeaderStore.d.ts +3 -0
  159. package/dist/components/pageHeaderStore.js +3 -0
  160. package/dist/components/pathBreaks.js +2 -2
  161. package/dist/components/popupContainer.d.ts +17 -0
  162. package/dist/components/popupContainer.js +69 -0
  163. package/dist/components/relativeTime.d.ts +21 -10
  164. package/dist/components/relativeTime.js +50 -22
  165. package/dist/components/segmented.d.ts +18 -4
  166. package/dist/components/segmented.js +48 -6
  167. package/dist/components/typedDate.d.ts +5 -0
  168. package/dist/components/typedDate.js +50 -0
  169. package/dist/components/useClosingValue.d.ts +4 -0
  170. package/dist/components/useClosingValue.js +12 -0
  171. package/dist/components/useCopy.d.ts +6 -0
  172. package/dist/components/useCopy.js +3 -3
  173. package/dist/components/useNarrow.d.ts +2 -0
  174. package/dist/components/useNarrow.js +16 -0
  175. package/dist/editor/Editor.js +1 -1
  176. package/dist/editor/FormCodePanel.js +1 -1
  177. package/dist/editor/Monaco.js +1 -1
  178. package/dist/editor/workers.js +1 -1
  179. package/dist/file-explorer/FileExplorer.js +16 -15
  180. package/dist/file-explorer/FileExplorerContext.js +2 -2
  181. package/dist/file-explorer/FilePreview/Viewer.js +3 -3
  182. package/dist/file-explorer/FilePreview/index.js +2 -2
  183. package/dist/file-explorer/FileRowsWindow.js +3 -3
  184. package/dist/file-explorer/FileTable.js +1 -1
  185. package/dist/file-explorer/LoadMoreRow.js +1 -1
  186. package/dist/file-explorer/TreeView.js +5 -5
  187. package/dist/file-explorer/helpers.js +2 -2
  188. package/dist/file-explorer/toasts.js +2 -2
  189. package/dist/form/Fields/CheckboxGroupField.js +1 -1
  190. package/dist/form/Fields/DropdownField.js +1 -1
  191. package/dist/form/Fields/DurationField.js +2 -2
  192. package/dist/form/Fields/MultiDropdownField.js +1 -1
  193. package/dist/form/Fields/NumberField.js +1 -1
  194. package/dist/form/Fields/ObjectField.js +1 -1
  195. package/dist/form/Fields/RangeField.js +1 -1
  196. package/dist/form/Fields/StringField.js +1 -1
  197. package/dist/form/Form.js +3 -3
  198. package/dist/form/FormLayout.js +1 -1
  199. package/dist/form/Wizard/WizardContainer.js +1 -1
  200. package/dist/form/Wizard/WizardNavigation.js +1 -1
  201. package/dist/form/Wizard/WizardStepContent.js +1 -1
  202. package/dist/form/fieldRegistry.js +1 -1
  203. package/dist/form/formEditing.js +1 -1
  204. package/dist/format.d.ts +17 -7
  205. package/dist/format.js +39 -16
  206. package/dist/graph/AnnotationBanner.js +2 -2
  207. package/dist/graph/Connectors.js +5 -5
  208. package/dist/graph/DependencyGraph.js +10 -9
  209. package/dist/graph/GraphEditor.js +4 -4
  210. package/dist/graph/GraphEditorDialogs.js +13 -12
  211. package/dist/graph/GraphNode.js +1 -1
  212. package/dist/graph/InputDialog.js +5 -5
  213. package/dist/graph/InputsEditor.js +10 -9
  214. package/dist/graph/MatrixGroup.js +2 -2
  215. package/dist/graph/ProblemPageLink.d.ts +9 -0
  216. package/dist/graph/ProblemPageLink.js +21 -0
  217. package/dist/graph/ProblemsButton.js +26 -16
  218. package/dist/graph/Reveal.js +1 -1
  219. package/dist/graph/RunWarningsList.js +21 -12
  220. package/dist/graph/ShortcutsButton.js +25 -8
  221. package/dist/graph/StepSummaries.js +1 -1
  222. package/dist/graph/TreeView.js +2 -2
  223. package/dist/graph/WorkflowSettingsDialog.js +3 -3
  224. package/dist/graph/editorApi.d.ts +10 -0
  225. package/dist/graph/editorFields.js +3 -3
  226. package/dist/graph/editorPrimitives.js +1 -1
  227. package/dist/graph/editorRows.js +8 -6
  228. package/dist/graph/editorStrings.d.ts +1 -0
  229. package/dist/graph/editorStrings.js +1 -0
  230. package/dist/graph/fieldProblems.js +2 -2
  231. package/dist/graph/inputRefs.js +7 -6
  232. package/dist/graph/runWarnings.d.ts +12 -1
  233. package/dist/graph/stepWith.js +2 -2
  234. package/dist/index.d.ts +30 -21
  235. package/dist/index.js +20 -12
  236. package/dist/list/ActionToolbar.d.ts +4 -0
  237. package/dist/list/ActionToolbar.js +35 -12
  238. package/dist/list/ListFilterBar.d.ts +42 -0
  239. package/dist/list/ListFilterBar.js +789 -0
  240. package/dist/list/ListPage.d.ts +42 -4
  241. package/dist/list/ListPage.js +56 -22
  242. package/dist/list/ListTable.d.ts +27 -3
  243. package/dist/list/ListTable.js +48 -23
  244. package/dist/list/ListToolbar.d.ts +31 -0
  245. package/dist/list/ListToolbar.js +43 -0
  246. package/dist/list/ListViewControls.d.ts +8 -4
  247. package/dist/list/ListViewControls.js +22 -14
  248. package/dist/list/UserHoverCard.d.ts +8 -2
  249. package/dist/list/UserHoverCard.js +26 -13
  250. package/dist/list/filterModel.d.ts +122 -0
  251. package/dist/list/filterModel.js +308 -0
  252. package/dist/list/index.d.ts +6 -2
  253. package/dist/list/index.js +6 -2
  254. package/dist/list/listSearch.d.ts +1 -1
  255. package/dist/list/listSearch.js +8 -4
  256. package/dist/list/listView.d.ts +24 -2
  257. package/dist/list/listView.js +47 -45
  258. package/dist/list/rowMenu.d.ts +10 -5
  259. package/dist/list/rowMenu.js +17 -7
  260. package/dist/list/useListFilters.d.ts +68 -0
  261. package/dist/list/useListFilters.js +252 -0
  262. package/dist/logviewer/LogViewer.js +4 -4
  263. package/dist/styles/theme.css +94 -0
  264. package/dist/styles.css +1 -1
  265. package/package.json +11 -11
  266. package/dist/assets/yaml.worker-k9AdOqzf.js +0 -1441
  267. package/dist/components/fullscreen.d.ts +0 -4
  268. package/dist/components/fullscreen.js +0 -18
@@ -1,15 +1,18 @@
1
1
  import { WarningIcon } from "../icons.js";
2
- import { keyedByContent } from "../components/keys.js";
3
2
  import { Tooltip } from "../components/Tooltip.js";
3
+ import { useProblemText } from "../components/Provider.js";
4
+ import { keyedByContent } from "../components/keys.js";
4
5
  import { Popover } from "../components/Popover.js";
6
+ import { ProblemPageLink } from "./ProblemPageLink.js";
5
7
  import { useGraphEditorStrings } from "./editorStrings.js";
6
8
  import { toolbarPanel } from "./toolbarPanel.js";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
9
  import { useState } from "react";
10
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
11
  //#region src/graph/ProblemsButton.tsx
10
12
  /** A toolbar's count of the problems it lists, which opens the list. */
11
13
  function ProblemsButton({ problems }) {
12
14
  const t = useGraphEditorStrings();
15
+ const problemText = useProblemText();
13
16
  const [open, setOpen] = useState(false);
14
17
  if (problems.length === 0) return null;
15
18
  const label = t.problemCount(problems.length);
@@ -32,25 +35,32 @@ function ProblemsButton({ problems }) {
32
35
  className: "flex flex-col gap-0.5",
33
36
  children: keyedByContent(problems, (problem) => `${problem.line}:${problem.message}`).map(({ key, item: problem }) => {
34
37
  const { pick } = problem;
35
- const text = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
38
+ const text = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
36
39
  className: "mr-1.5 theme-muted-text",
37
40
  children: t.problemLine(problem.line)
38
41
  }), /* @__PURE__ */ jsx("span", {
39
42
  className: "text-(--theme-error-text)",
40
- children: problem.message
43
+ children: problemText(problem)
41
44
  })] });
42
- return /* @__PURE__ */ jsx("li", { children: pick ? /* @__PURE__ */ jsx("button", {
43
- type: "button",
44
- className: "w-full cursor-pointer rounded px-1.5 py-1 text-left theme-hover",
45
- onClick: () => {
46
- setOpen(false);
47
- pick();
48
- },
49
- children: text
50
- }) : /* @__PURE__ */ jsx("div", {
51
- className: "px-1.5 py-1",
52
- children: text
53
- }) }, key);
45
+ return /* @__PURE__ */ jsxs("li", {
46
+ className: "flex items-baseline gap-2",
47
+ children: [pick ? /* @__PURE__ */ jsx("button", {
48
+ type: "button",
49
+ className: "min-w-0 flex-1 cursor-pointer rounded px-1.5 py-1 text-left theme-hover",
50
+ onClick: () => {
51
+ setOpen(false);
52
+ pick();
53
+ },
54
+ children: text
55
+ }) : /* @__PURE__ */ jsx("div", {
56
+ className: "min-w-0 flex-1 px-1.5 py-1",
57
+ children: text
58
+ }), /* @__PURE__ */ jsx(ProblemPageLink, {
59
+ type: problem.type,
60
+ label: t.problemAbout,
61
+ className: "shrink-0"
62
+ })]
63
+ }, key);
54
64
  })
55
65
  })
56
66
  });
@@ -1,6 +1,6 @@
1
1
  import { useReducedMotion } from "../reducedMotion.js";
2
- import { jsx } from "react/jsx-runtime";
3
2
  import { useLayoutEffect, useRef, useState } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
4
  //#region src/graph/Reveal.tsx
5
5
  var EASE = "cubic-bezier(0.25, 0.1, 0.25, 1)";
6
6
  var ROWS_TRANSITION = `grid-template-rows 200ms ${EASE}`;
@@ -1,11 +1,12 @@
1
1
  import { cx } from "../cx.js";
2
2
  import { WarningIcon } from "../icons.js";
3
3
  import { toneIcon } from "../components/tone.js";
4
- import { keyedByContent, withPositionKeys } from "../components/keys.js";
5
4
  import { Tooltip } from "../components/Tooltip.js";
6
- import { useStrings, useWorkflowEngine } from "../components/Provider.js";
5
+ import { useProblemText, useStrings, useWorkflowEngine } from "../components/Provider.js";
6
+ import { keyedByContent, withPositionKeys } from "../components/keys.js";
7
7
  import { Callout } from "../components/Callout.js";
8
8
  import { jobLabel } from "./util.js";
9
+ import { ProblemPageLink } from "./ProblemPageLink.js";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
11
  //#region src/graph/RunWarningsList.tsx
11
12
  /** A warning's message, with the text it puts in backticks, such as a keyword, set as code. */
@@ -21,11 +22,12 @@ function WarningText({ message }) {
21
22
  * it lists them. */
22
23
  function WarningMark({ warnings, className }) {
23
24
  const { dag } = useStrings();
25
+ const problemText = useProblemText();
24
26
  if (warnings.length === 0) return null;
25
27
  return /* @__PURE__ */ jsx(Tooltip, {
26
28
  content: /* @__PURE__ */ jsx("ul", {
27
29
  className: "m-0 flex list-none flex-col gap-1 p-0",
28
- children: keyedByContent(warnings, (w) => w.message).map(({ key, item }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WarningText, { message: item.message }) }, key))
30
+ children: keyedByContent(warnings, (w) => w.message).map(({ key, item }) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WarningText, { message: problemText(item) }) }, key))
29
31
  }),
30
32
  children: /* @__PURE__ */ jsx("span", {
31
33
  role: "img",
@@ -61,6 +63,7 @@ function placeOf({ warning, targets: [target] }, rootJobs, stepLabel, stepNumber
61
63
  function RunWarningsList({ warnings, rootJobs, onShow }) {
62
64
  const { dag } = useStrings();
63
65
  const engine = useWorkflowEngine();
66
+ const problemText = useProblemText();
64
67
  if (warnings.length === 0) return null;
65
68
  return /* @__PURE__ */ jsx(Callout, {
66
69
  tone: "warning",
@@ -75,15 +78,21 @@ function RunWarningsList({ warnings, rootJobs, onShow }) {
75
78
  className: "flex flex-col items-start gap-0.5",
76
79
  children: [/* @__PURE__ */ jsx("span", {
77
80
  className: "min-w-0 break-words",
78
- children: /* @__PURE__ */ jsx(WarningText, { message: item.warning.message })
79
- }), target && onShow ? /* @__PURE__ */ jsx("button", {
80
- type: "button",
81
- onClick: () => onShow(target),
82
- className: "cursor-pointer rounded-sm text-xs font-medium underline underline-offset-2 hover:decoration-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-focus)",
83
- children: where
84
- }) : /* @__PURE__ */ jsx("span", {
85
- className: "text-xs",
86
- children: where
81
+ children: /* @__PURE__ */ jsx(WarningText, { message: problemText(item.warning) })
82
+ }), /* @__PURE__ */ jsxs("span", {
83
+ className: "flex flex-wrap items-baseline gap-x-3 gap-y-0.5",
84
+ children: [target && onShow ? /* @__PURE__ */ jsx("button", {
85
+ type: "button",
86
+ onClick: () => onShow(target),
87
+ className: "cursor-pointer rounded-sm text-xs font-medium underline underline-offset-2 hover:decoration-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--theme-focus)",
88
+ children: where
89
+ }) : /* @__PURE__ */ jsx("span", {
90
+ className: "text-xs",
91
+ children: where
92
+ }), /* @__PURE__ */ jsx(ProblemPageLink, {
93
+ type: item.warning.type,
94
+ label: dag.warningAbout
95
+ })]
87
96
  })]
88
97
  }, key);
89
98
  })
@@ -1,13 +1,14 @@
1
1
  import { KeyboardIcon } from "../icons.js";
2
+ import { Kbd, isApplePlatform } from "../components/Kbd.js";
2
3
  import { IconButton } from "../components/IconButton.js";
3
4
  import { Popover } from "../components/Popover.js";
4
5
  import { useGraphEditorStrings } from "./editorStrings.js";
5
6
  import { toolbarPanel } from "./toolbarPanel.js";
7
+ import { Fragment } from "react";
6
8
  import { jsx, jsxs } from "react/jsx-runtime";
7
- import { Fragment as Fragment$1 } from "react";
8
9
  //#region src/graph/ShortcutsButton.tsx
9
10
  /** Whether the keyboard is an Apple one, whose Command key does what Control does elsewhere. */
10
- var IS_MAC = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform);
11
+ var IS_MAC = isApplePlatform();
11
12
  /** Copy, paste and undo take Command on a Mac and Control elsewhere, as the handlers do. A Mac
12
13
  * shows its symbols; elsewhere the keys go by the names their keycaps carry in the strings. */
13
14
  function modifierKeys(key) {
@@ -22,6 +23,19 @@ function modifierKeys(key) {
22
23
  /** A toolbar button that opens the list of gestures and keys a pane takes. */
23
24
  function ShortcutsButton({ groups }) {
24
25
  const t = useGraphEditorStrings();
26
+ const k = t.shortcutKeys;
27
+ const gestures = /* @__PURE__ */ new Set([
28
+ k.click,
29
+ k.drag,
30
+ k.dragJob,
31
+ k.dragCircle,
32
+ k.dragButton,
33
+ k.dragSpace,
34
+ k.dragHandle,
35
+ k.dragEdge,
36
+ k.rightClick,
37
+ k.scroll
38
+ ]);
25
39
  return /* @__PURE__ */ jsx(Popover, {
26
40
  title: t.shortcuts,
27
41
  ...toolbarPanel,
@@ -38,15 +52,18 @@ function ShortcutsButton({ groups }) {
38
52
  children: group.title
39
53
  }), /* @__PURE__ */ jsx("dl", {
40
54
  className: "grid grid-cols-[8.5rem_1fr] items-baseline gap-x-3 gap-y-1.5",
41
- children: group.shortcuts.map((shortcut) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("dt", {
55
+ children: group.shortcuts.map((shortcut) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", {
42
56
  className: "flex flex-wrap items-center gap-1",
43
- children: shortcut.combos.map((keys, i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [i > 0 && /* @__PURE__ */ jsx("span", {
57
+ children: shortcut.combos.map((keys, i) => /* @__PURE__ */ jsxs(Fragment, { children: [i > 0 && /* @__PURE__ */ jsx("span", {
44
58
  className: "theme-muted-text",
45
59
  children: "/"
46
- }), keys.map((key) => /* @__PURE__ */ jsx("kbd", {
47
- className: "rounded border theme-border px-1 py-px text-[11px]",
48
- children: key
49
- }, key))] }, keys.join("+")))
60
+ }), keys.some((key) => gestures.has(key)) ? /* @__PURE__ */ jsx("span", {
61
+ className: "inline-flex flex-wrap items-center gap-1",
62
+ children: keys.map((key) => gestures.has(key) ? /* @__PURE__ */ jsx("span", {
63
+ className: "text-[11px] text-(--theme-app)",
64
+ children: key
65
+ }, key) : /* @__PURE__ */ jsx(Kbd, { keys: [key] }, key))
66
+ }) : /* @__PURE__ */ jsx(Kbd, { keys })] }, keys.join("+")))
50
67
  }), /* @__PURE__ */ jsx("dd", {
51
68
  className: "theme-muted-text",
52
69
  children: shortcut.does
@@ -4,8 +4,8 @@ import { useRunFile, useStrings, useWorkflowEngine } from "../components/Provide
4
4
  import Markdown from "../components/Markdown.js";
5
5
  import { RunStatusIcon } from "../components/RunStatusIcon.js";
6
6
  import { jobLabel } from "./util.js";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { useEffect, useId, useRef, useState } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/graph/StepSummaries.tsx
10
10
  var SEPARATOR = " › ";
11
11
  function completion(job) {
@@ -1,8 +1,8 @@
1
1
  import { cx } from "../cx.js";
2
+ import { EmptyState } from "../components/EmptyState.js";
2
3
  import { ChevronRightIcon } from "../icons.js";
3
4
  import { Loader } from "../components/Loader.js";
4
5
  import { useRunFile, useSlots, useStrings, useWorkflowEngine } from "../components/Provider.js";
5
- import { EmptyState } from "../components/EmptyState.js";
6
6
  import { Button } from "../components/Button.js";
7
7
  import { DisclosurePanel } from "../components/Disclosure.js";
8
8
  import { Elapsed } from "../components/relativeTime.js";
@@ -11,8 +11,8 @@ import { LogViewer } from "../logviewer/LogViewer.js";
11
11
  import { jobLabel, toggled } from "./util.js";
12
12
  import { WarningMark } from "./RunWarningsList.js";
13
13
  import { rowKey, useWarningMarks } from "./runWarnings.js";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
14
  import { useCallback, useId, useMemo, useState } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
16
  //#region src/graph/TreeView.tsx
17
17
  function Chevron({ open, hidden = false }) {
18
18
  return /* @__PURE__ */ jsx("div", {
@@ -12,8 +12,8 @@ import { expressionRefs } from "./expressionRefs.js";
12
12
  import { useNewInputs } from "./InputDialog.js";
13
13
  import { useSettingsViews } from "./GraphEditorDialogs.js";
14
14
  import { firstPageEdits, pagesBackEdits } from "./inputPages.js";
15
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
15
  import { useState } from "react";
16
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
17
17
  //#region src/graph/WorkflowSettingsDialog.tsx
18
18
  var LINK_NAME = /^[a-z0-9_-]*[a-z0-9]$/;
19
19
  var ORG_VARIABLE = /^[A-Z][A-Z0-9_]*$/;
@@ -332,7 +332,7 @@ function SettingsForm({ workflow, onEdit, onClose, renderShell, onDraft, pending
332
332
  ] : wizardOn && flatten !== (wizard["flatten"] !== false) ? [...settings, ...reflattenEdits(inputs, wizardEdit)] : [update];
333
333
  const saveEdit = newInputs.save(dirty ? editing.batchOf(edits) : null);
334
334
  onDraft?.(saveEdit, invalid);
335
- const children = /* @__PURE__ */ jsxs(Fragment, { children: [
335
+ const children = /* @__PURE__ */ jsxs(Fragment$1, { children: [
336
336
  newInputs.dialog,
337
337
  /* @__PURE__ */ jsxs(DialogSection, {
338
338
  title: t.sectionGeneral,
@@ -617,7 +617,7 @@ function SettingsForm({ workflow, onEdit, onClose, renderShell, onDraft, pending
617
617
  }
618
618
  })
619
619
  }),
620
- wizardOn && /* @__PURE__ */ jsxs(Fragment, { children: [
620
+ wizardOn && /* @__PURE__ */ jsxs(Fragment$1, { children: [
621
621
  WIZARD_FLAGS.map((flag) => /* @__PURE__ */ jsx(FlagField, {
622
622
  label: t.fields[flag],
623
623
  yamlKey: flag,
@@ -1,10 +1,20 @@
1
+ import type { ProblemParams } from '../components/Provider.js';
1
2
  import type { GraphEdit, GraphEditResult } from '../editing.js';
2
3
  import type { Box } from './editorPrimitives.js';
3
4
  import type { ListedProblem } from './ProblemsButton.js';
4
5
  import type { SettingsView } from './settingsViews.js';
5
6
  export type { Box };
6
7
  export interface EditorProblem {
8
+ /** Its text, shown when it has no `code` or the host has no message for it. */
7
9
  message: string;
10
+ /** Its stable code, which the host's `useProblemMessage` shows in the reader's language with
11
+ * `params`. */
12
+ code?: string | null | undefined;
13
+ /** The values the code's message shows, by name. */
14
+ params?: ProblemParams | null | undefined;
15
+ /** The URI of the page that explains it, which the problems list links to, and which the host's
16
+ * `useProblemMessage` gets with its `code`. `about:blank` has none. */
17
+ type?: string | null | undefined;
8
18
  line: number;
9
19
  job?: string;
10
20
  step?: number;
@@ -1,6 +1,6 @@
1
1
  import { AddIcon, ExpressionIcon, RemoveIcon } from "../icons.js";
2
- import { withPositionKeys } from "../components/keys.js";
3
2
  import { Tooltip } from "../components/Tooltip.js";
3
+ import { withPositionKeys } from "../components/keys.js";
4
4
  import { Button } from "../components/Button.js";
5
5
  import { IconButton } from "../components/IconButton.js";
6
6
  import { Checkbox } from "../components/Checkbox.js";
@@ -14,8 +14,8 @@ import { useGraphEditorStrings } from "./editorStrings.js";
14
14
  import { asRecord } from "./records.js";
15
15
  import { useFieldLint } from "./fieldProblems.js";
16
16
  import { SuggestionInput } from "./SuggestionInput.js";
17
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
17
  import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
18
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
19
19
  //#region src/graph/editorFields.tsx
20
20
  var EXPRESSION = /^\$\{\{.*\}\}$/;
21
21
  var ENV_KEY = /^[a-zA-Z0-9_]+$/;
@@ -392,7 +392,7 @@ function SuggestedInput({ label, yamlKey, description, value, onChange, suggesti
392
392
  description,
393
393
  error: error ?? lint.message,
394
394
  id,
395
- children: (control) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
395
+ children: (control) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
396
396
  ...control,
397
397
  value,
398
398
  placeholder,
@@ -1,6 +1,6 @@
1
1
  import { cx } from "../cx.js";
2
- import { jsx } from "react/jsx-runtime";
3
2
  import { useEffect, useRef, useSyncExternalStore } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
4
  //#region src/graph/editorPrimitives.tsx
5
5
  /** A small store for an editor's view state, so a change redraws only what reads it. */
6
6
  function createStore(initial) {
@@ -1,10 +1,11 @@
1
1
  import { cx } from "../cx.js";
2
2
  import { AddIcon, DragHandleIcon, MoreIcon, WarningIcon } from "../icons.js";
3
3
  import { Tooltip } from "../components/Tooltip.js";
4
+ import { useProblemText } from "../components/Provider.js";
4
5
  import { MarqueeBox, place } from "./editorPrimitives.js";
5
6
  import { EDITOR_HANDLE_CLASS, NO_SELECTION, labelsOf, problemsIn, sameEdge, sameStep, selectionBounds, useGraphEditor, useSelectedEdges, useUi } from "./graphEditorState.js";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { useEffect, useMemo, useRef } from "react";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
9
  //#region src/graph/editorRows.tsx
9
10
  /** Drop indicators, the connection line and the selection, drawn in the graph's own coordinates. */
10
11
  function GraphEditorCanvas() {
@@ -71,7 +72,7 @@ function SelectionBox({ api }) {
71
72
  if (!grid || !bounds) return null;
72
73
  const anchor = grid.cols.flat(2).find((job) => jobs.includes(job));
73
74
  const y = bounds.connectorY;
74
- return /* @__PURE__ */ jsxs(Fragment, { children: [
75
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
75
76
  /* @__PURE__ */ jsx("div", {
76
77
  className: "absolute rounded-xl border-2 border-dashed border-(--theme-accent)",
77
78
  style: place(bounds)
@@ -145,12 +146,13 @@ var NO_PROBLEMS = [];
145
146
  function ProblemBadge({ api, job, step }) {
146
147
  const t = api.t;
147
148
  const problems = useUi(api, (state) => state.problems, NO_PROBLEMS);
149
+ const problemText = useProblemText();
148
150
  const mine = useMemo(() => step === void 0 ? problems.filter((problem) => problem.job === job) : problemsIn(problems, job, step), [
149
151
  problems,
150
152
  job,
151
153
  step
152
154
  ]);
153
- const messages = mine.map((problem) => problem.message).join("\n");
155
+ const messages = mine.map(problemText).join("\n");
154
156
  const line = mine[0]?.line ?? 0;
155
157
  if (!messages) return null;
156
158
  return /* @__PURE__ */ jsx(Tooltip, {
@@ -246,7 +248,7 @@ function EditableJobRow({ job, label, badge = true, children }) {
246
248
  menuLabel: t.jobActions,
247
249
  menuClassName: "p-1 group-hover/row:opacity-100",
248
250
  iconClassName: "h-[1em] w-[1em]",
249
- badges: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ProblemBadge, {
251
+ badges: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ProblemBadge, {
250
252
  api,
251
253
  job
252
254
  }), badge && api.isMatrixJob(job) && /* @__PURE__ */ jsx("span", {
@@ -295,7 +297,7 @@ function NodePorts({ jobs, left, right, drawLeft, drawRight, zIndex }) {
295
297
  if (!api) return null;
296
298
  const t = api.t;
297
299
  const port = `node:${jobs[0]}`;
298
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PortCircle, {
300
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(PortCircle, {
299
301
  side: "in",
300
302
  at: left,
301
303
  draw: drawLeft,
@@ -445,7 +447,7 @@ function EdgeEnds({ edge, start, end, zIndex }) {
445
447
  children: /* @__PURE__ */ jsx("span", { className: "h-5 w-5 rounded-full border-4 border-(--theme-accent) bg-(--theme-panel-bg)" })
446
448
  })
447
449
  }, side);
448
- return /* @__PURE__ */ jsxs(Fragment, { children: [handle("from", start, end), handle("to", end, start)] });
450
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [handle("from", start, end), handle("to", end, start)] });
449
451
  }
450
452
  /** Shown in place of the graph when the workflow has no jobs yet. */
451
453
  /** The canvas of a graph with no jobs, which takes the graph's keys, so undo and paste still work. */
@@ -12,6 +12,7 @@ export declare const GRAPH_EDITOR_STRINGS: {
12
12
  stepCount: (count: number) => string;
13
13
  problemCount: (count: number) => string;
14
14
  problemLine: (line: number) => string;
15
+ problemAbout: string;
15
16
  connectOutHint: string;
16
17
  connectInHint: string;
17
18
  moveBoxHint: string;
@@ -13,6 +13,7 @@ var GRAPH_EDITOR_STRINGS = {
13
13
  stepCount: (count) => count === 1 ? "1 step" : `${count} steps`,
14
14
  problemCount: (count) => count === 1 ? "1 problem" : `${count} problems`,
15
15
  problemLine: (line) => `Line ${line}`,
16
+ problemAbout: "About this problem",
16
17
  connectOutHint: "Drag onto a job to make it depend on this node. Drop on a circle to cover every job in that node.",
17
18
  connectInHint: "Drag onto a job to make this node depend on it. Drop on a circle to cover every job in that node.",
18
19
  moveBoxHint: "Drag to move these jobs together",
@@ -1,9 +1,9 @@
1
1
  import { WarningIcon } from "../icons.js";
2
- import { keyedByContent } from "../components/keys.js";
3
2
  import { useWorkflowEditing } from "../components/Provider.js";
3
+ import { keyedByContent } from "../components/keys.js";
4
4
  import { useGraphEditorStrings } from "./editorStrings.js";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
5
  import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/graph/fieldProblems.tsx
8
8
  var FieldProblemsContext = createContext(null);
9
9
  var keyOf = (at) => at.join(".");
@@ -10,8 +10,8 @@ import { asRecord } from "./records.js";
10
10
  import { useFieldLint } from "./fieldProblems.js";
11
11
  import { SuggestionInput } from "./SuggestionInput.js";
12
12
  import { ExpressionToggle, GROWING_AREA, YamlField, flagError, flagValue, text, useGrowingArea } from "./editorFields.js";
13
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
13
  import { useId, useRef, useState } from "react";
14
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
15
15
  //#region src/graph/inputRefs.tsx
16
16
  /** Every input with a value, where a run reads it: groups nest unless flattened, lists hide their rows. */
17
17
  function inputRefs(editing, inputs) {
@@ -88,6 +88,7 @@ function InputRefSelect({ refs, types, value, onChange, onNew, newLabel, label }
88
88
  ];
89
89
  return /* @__PURE__ */ jsx(Select, {
90
90
  "aria-label": label,
91
+ width: "fill",
91
92
  placeholder: matching.length > 0 ? t.chooseInput : t.noMatchingInputs,
92
93
  items,
93
94
  value: known || !current ? current || null : `?${current}`,
@@ -155,7 +156,7 @@ function FlagField({ label, yamlKey, description, value, original, fallback = fa
155
156
  onChange(void 0);
156
157
  }
157
158
  }),
158
- children: (control) => typed ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
159
+ children: (control) => typed ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
159
160
  className: "flex items-center gap-2",
160
161
  children: [/* @__PURE__ */ jsx("div", {
161
162
  className: "flex-1",
@@ -201,7 +202,7 @@ function ConditionField({ label, yamlKey, description, value, onChange, source,
201
202
  description,
202
203
  error: lint.message,
203
204
  id,
204
- actions: /* @__PURE__ */ jsxs(Fragment, { children: [allRefs(source).length > 0 && /* @__PURE__ */ jsx(InsertRefSelect, {
205
+ actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [allRefs(source).length > 0 && /* @__PURE__ */ jsx(InsertRefSelect, {
205
206
  source,
206
207
  label: t.insertValue,
207
208
  onInsert: insert
@@ -210,7 +211,7 @@ function ConditionField({ label, yamlKey, description, value, onChange, source,
210
211
  source,
211
212
  onCreated: (path) => onChange(flagExpression(path, false))
212
213
  })] }),
213
- children: (control) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
214
+ children: (control) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SuggestionInput, {
214
215
  ...control,
215
216
  value,
216
217
  placeholder: texts.default,
@@ -246,7 +247,7 @@ function ValueOrInputField({ label, yamlKey, description, value, onChange, sourc
246
247
  required,
247
248
  error: error ?? lint.message,
248
249
  id,
249
- children: (control) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
250
+ children: (control) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
250
251
  className: "flex items-center gap-2",
251
252
  children: [/* @__PURE__ */ jsx("div", {
252
253
  className: "flex-1",
@@ -286,7 +287,7 @@ function ScriptField({ label, yamlKey, description, value, onChange, source, row
286
287
  label: t.insertValue,
287
288
  onInsert: insert
288
289
  }),
289
- children: (control) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Textarea, {
290
+ children: (control) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Textarea, {
290
291
  ...control,
291
292
  ref: area ?? fixed,
292
293
  mono: true,
@@ -1,3 +1,4 @@
1
+ import type { ProblemParams } from '../components/Provider.js';
1
2
  import type { WorkflowJob } from './types.js';
2
3
  /** Something probably wrong with a run's workflow, found when the run was created, about one of its jobs or steps. */
3
4
  export interface RunWarning {
@@ -8,8 +9,18 @@ export interface RunWarning {
8
9
  job: string;
9
10
  /** The step's index among the job's steps as the run lists them; absent for the job's own. */
10
11
  step?: number | null | undefined;
11
- /** What is wrong and what to write instead. Text in backticks shows as code. */
12
+ /** What is wrong and what to write instead. Text in backticks shows as code. It shows when the
13
+ * warning has no `code`, or the host has no message for it. */
12
14
  message: string;
15
+ /** The warning's stable code, such as `undefined_input`, which the host's `useProblemMessage`
16
+ * shows in the reader's language with `params`. */
17
+ code?: string | null | undefined;
18
+ /** The values the code's message shows, by name. */
19
+ params?: ProblemParams | null | undefined;
20
+ /** The URI of the page that explains it, such as `/problems/workflow/undefined_input`, which the
21
+ * warning links to, and which the host's `useProblemMessage` gets with its `code`. `about:blank`
22
+ * has none. */
23
+ type?: string | null | undefined;
13
24
  }
14
25
  /** A subworkflow step on the way to a warning: its level's prefix, its job and its index. */
15
26
  interface Via {
@@ -11,8 +11,8 @@ import { SuggestionInput } from "./SuggestionInput.js";
11
11
  import { ChoiceButtons, EXPRESSION, KeyValueEditor, StringListEditor, SuggestedInput, ToggleField, YamlField, isScalar, labelled, parseJson, parseScalar, rowsError, rowsFrom, rowsTo, sameValue } from "./editorFields.js";
12
12
  import { ValueOrInputField, refSuggestions } from "./inputRefs.js";
13
13
  import { DynamicForm } from "../form/Form.js";
14
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
14
  import { useEffect, useId, useState } from "react";
15
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
16
16
  //#region src/graph/stepWith.tsx
17
17
  var REPO_INPUTS = [{
18
18
  key: "$yaml",
@@ -459,7 +459,7 @@ function WithEditor({ uses, draft, original, onChange, error, source }) {
459
459
  original,
460
460
  onChange
461
461
  }, key)),
462
- kind !== "action" && /* @__PURE__ */ jsxs(Fragment, { children: [known.map(([key, raw]) => {
462
+ kind !== "action" && /* @__PURE__ */ jsxs(Fragment$1, { children: [known.map(([key, raw]) => {
463
463
  const definition = asRecord(raw);
464
464
  const label = String(definition["label"] ?? "");
465
465
  const about = String(definition["description"] ?? "");