@parallelworks/ui 0.51.0 → 0.53.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/README.md +197 -17
- package/dist/ai/agent/toolStrings.d.ts +2 -0
- package/dist/ai/agent/toolStrings.js +20 -18
- package/dist/ai/ai.css +17 -3
- package/dist/ai/components/AllocationSelector.js +5 -1
- package/dist/ai/components/AttachmentManager.js +51 -42
- package/dist/ai/components/AttachmentUpload.d.ts +4 -2
- package/dist/ai/components/AttachmentUpload.js +9 -9
- package/dist/ai/components/BlockedGroupBanner.js +8 -14
- package/dist/ai/components/BranchNavigator.js +11 -12
- package/dist/ai/components/ChatEmptyState.js +12 -19
- package/dist/ai/components/ChatInput.d.ts +4 -3
- package/dist/ai/components/ChatInput.js +27 -13
- package/dist/ai/components/ChatMessage.js +45 -121
- package/dist/ai/components/ChatMessageList.d.ts +5 -2
- package/dist/ai/components/ChatMessageList.js +89 -51
- package/dist/ai/components/ChatSidebar.js +11 -7
- package/dist/ai/components/ChatThread.js +1 -13
- package/dist/ai/components/DragOverlay.js +3 -3
- package/dist/ai/components/MessageAttachments.d.ts +10 -0
- package/dist/ai/components/MessageAttachments.js +78 -0
- package/dist/ai/components/ModelSelector.js +3 -3
- package/dist/ai/components/PastedText.js +2 -2
- package/dist/ai/components/ProviderIssueBanner.js +19 -23
- package/dist/ai/components/ShareDialog.js +2 -2
- package/dist/ai/components/agent/ActivityLine.d.ts +0 -2
- package/dist/ai/components/agent/ActivityLine.js +8 -51
- package/dist/ai/components/agent/AgentMessageParts.js +114 -53
- package/dist/ai/core/ChatProvider.d.ts +16 -5
- package/dist/ai/core/ChatProvider.js +41 -8
- package/dist/ai/core/config.js +4 -3
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +3 -3
- package/dist/ai/strings.d.ts +29 -3
- package/dist/ai/strings.js +80 -26
- package/dist/ai/types.d.ts +4 -0
- package/dist/ai/ui/Notice.d.ts +2 -2
- package/dist/ai/ui/Notice.js +29 -62
- package/dist/ai/ui/sidebar.d.ts +5 -3
- package/dist/ai/ui/sidebar.js +22 -10
- package/dist/components/ActionMenu.d.ts +1 -0
- package/dist/components/ActionMenu.js +6 -1
- package/dist/components/AppLink.d.ts +26 -0
- package/dist/components/AppLink.js +51 -0
- package/dist/components/Avatar.d.ts +2 -1
- package/dist/components/Avatar.js +4 -2
- package/dist/components/Button.d.ts +15 -5
- package/dist/components/Button.js +47 -40
- package/dist/components/Callout.d.ts +31 -7
- package/dist/components/Callout.js +50 -19
- package/dist/components/Card.d.ts +11 -6
- package/dist/components/Card.js +14 -8
- package/dist/components/Checkbox.js +2 -1
- package/dist/components/ColorInput.js +5 -3
- package/dist/components/Combobox.js +49 -19
- package/dist/components/ConfirmModal.d.ts +19 -8
- package/dist/components/ConfirmModal.js +31 -53
- package/dist/components/CopyButton.d.ts +38 -0
- package/dist/components/CopyButton.js +68 -0
- package/dist/components/CreateModal.js +118 -111
- package/dist/components/DatePicker.js +12 -8
- package/dist/components/DescriptionList.d.ts +25 -5
- package/dist/components/DescriptionList.js +56 -22
- package/dist/components/Disclosure.js +1 -1
- package/dist/components/Drawer.js +10 -16
- package/dist/components/Field.d.ts +16 -5
- package/dist/components/Field.js +63 -8
- package/dist/components/IconButton.d.ts +14 -5
- package/dist/components/IconButton.js +25 -14
- package/dist/components/InfoTip.d.ts +12 -1
- package/dist/components/InfoTip.js +13 -2
- package/dist/components/Input.d.ts +14 -8
- package/dist/components/Input.js +46 -31
- package/dist/components/Loader.js +1 -1
- package/dist/components/MarkdownImpl.d.ts +1 -0
- package/dist/components/MarkdownImpl.js +1 -0
- package/dist/components/MenuEntries.d.ts +4 -0
- package/dist/components/MenuEntries.js +11 -12
- package/dist/components/Meter.js +5 -4
- package/dist/components/Modal.d.ts +28 -4
- package/dist/components/Modal.js +37 -14
- package/dist/components/Overview.d.ts +20 -12
- package/dist/components/Overview.js +14 -9
- package/dist/components/PageHeader.d.ts +47 -65
- package/dist/components/PageHeader.js +275 -153
- package/dist/components/PageHeaderAction.d.ts +67 -0
- package/dist/components/PageHeaderAction.js +107 -0
- package/dist/components/Pagination.js +6 -16
- package/dist/components/Popover.d.ts +4 -1
- package/dist/components/Popover.js +5 -3
- package/dist/components/Provider.d.ts +79 -19
- package/dist/components/Provider.js +140 -130
- package/dist/components/Radio.js +2 -1
- package/dist/components/RefreshButton.js +7 -8
- package/dist/components/RequiredMark.js +1 -1
- package/dist/components/Section.js +1 -1
- package/dist/components/Select.d.ts +4 -9
- package/dist/components/Select.js +24 -11
- package/dist/components/SettingModeOption.d.ts +1 -1
- package/dist/components/SettingModeOption.js +7 -1
- package/dist/components/SettingsCard.d.ts +5 -3
- package/dist/components/SettingsCard.js +27 -20
- package/dist/components/Slider.js +1 -1
- package/dist/components/StatusBadge.js +2 -2
- package/dist/components/Switch.js +5 -4
- package/dist/components/Table.d.ts +30 -20
- package/dist/components/Table.js +50 -73
- package/dist/components/Tabs.d.ts +3 -7
- package/dist/components/Tabs.js +6 -10
- package/dist/components/ThemeEditor.js +18 -8
- package/dist/components/Toast.d.ts +11 -3
- package/dist/components/Toast.js +45 -20
- package/dist/components/buttonClasses.js +1 -1
- package/dist/components/comboboxItems.d.ts +4 -0
- package/dist/components/comboboxItems.js +6 -1
- package/dist/components/dismiss.d.ts +12 -0
- package/dist/components/dismiss.js +19 -0
- package/dist/components/fieldBox.d.ts +4 -0
- package/dist/components/fieldBox.js +7 -3
- package/dist/components/floating.d.ts +3 -3
- package/dist/components/floating.js +1 -1
- package/dist/components/focus.d.ts +5 -0
- package/dist/components/focus.js +21 -1
- package/dist/components/markdownCodeBreaks.js +3 -4
- package/dist/components/pageHeaderStore.d.ts +41 -0
- package/dist/components/pageHeaderStore.js +67 -0
- package/dist/components/pathBreaks.d.ts +8 -0
- package/dist/components/pathBreaks.js +28 -0
- package/dist/components/segmented.js +1 -1
- package/dist/components/shortcutKey.d.ts +2 -1
- package/dist/components/shortcutKey.js +19 -2
- package/dist/components/splitter.js +1 -1
- package/dist/components/useCssIsDark.js +40 -18
- package/dist/components/useTheme.js +9 -10
- package/dist/dev.d.ts +9 -0
- package/dist/dev.js +14 -0
- package/dist/editor/Editor.d.ts +3 -2
- package/dist/editor/Editor.js +24 -5
- package/dist/editor/EditorField.d.ts +2 -1
- package/dist/editor/EditorField.js +11 -29
- package/dist/editor/FormCodePanel.d.ts +7 -3
- package/dist/editor/FormCodePanel.js +14 -7
- package/dist/editor/Monaco.d.ts +22 -6
- package/dist/editor/Monaco.js +177 -113
- package/dist/editor/editorModel.d.ts +1 -1
- package/dist/editor/editorModel.js +1 -1
- package/dist/editor/index.d.ts +6 -5
- package/dist/editor/index.js +5 -4
- package/dist/editor/languages.d.ts +24 -0
- package/dist/editor/languages.js +31 -0
- package/dist/editor/monacoFeatures.d.ts +7 -0
- package/dist/editor/monacoFeatures.js +19 -0
- package/dist/editor/themes.d.ts +8 -5
- package/dist/editor/themes.js +65 -32
- package/dist/editor/workers.d.ts +3 -3
- package/dist/editor/workers.js +8 -4
- package/dist/editor/yaml.d.ts +6 -2
- package/dist/editor/yaml.js +11 -2
- package/dist/editor/yamlLanguage.js +55 -38
- package/dist/file-explorer/FileExplorer.d.ts +18 -4
- package/dist/file-explorer/FileExplorer.js +204 -142
- package/dist/file-explorer/FileExplorerContext.js +1 -1
- package/dist/file-explorer/FilePreview/StreamedBadge.js +3 -1
- package/dist/file-explorer/FilePreview/Viewer.js +14 -10
- package/dist/file-explorer/FilePreview/index.js +4 -4
- package/dist/file-explorer/FileRow.d.ts +6 -2
- package/dist/file-explorer/FileRow.js +35 -17
- package/dist/file-explorer/FileRowsWindow.d.ts +2 -1
- package/dist/file-explorer/FileRowsWindow.js +36 -4
- package/dist/file-explorer/FileTable.d.ts +3 -1
- package/dist/file-explorer/FileTable.js +6 -3
- package/dist/file-explorer/TreeView.d.ts +5 -1
- package/dist/file-explorer/TreeView.js +86 -39
- package/dist/file-explorer/helpers.d.ts +2 -1
- package/dist/file-explorer/helpers.js +24 -23
- package/dist/file-explorer/lib/utils.d.ts +3 -0
- package/dist/file-explorer/lib/utils.js +6 -1
- package/dist/file-explorer/toasts.js +27 -19
- package/dist/file-explorer/treeRows.d.ts +6 -0
- package/dist/file-explorer/treeRows.js +19 -1
- package/dist/file-explorer/useNearEnd.js +3 -6
- package/dist/form/Fields/CheckboxGroupField.js +12 -5
- package/dist/form/Fields/DurationField.js +1 -1
- package/dist/form/Fields/LabelField.js +1 -1
- package/dist/form/Fields/ObjectField.d.ts +1 -1
- package/dist/form/Fields/ObjectField.js +3 -2
- package/dist/form/Fields/StringField.js +16 -29
- package/dist/form/Fields/TextAreaField.js +3 -4
- package/dist/form/Form.js +3 -8
- package/dist/form/Wizard/WizardNavigation.js +0 -3
- package/dist/form/Wizard/utils.js +2 -1
- package/dist/form/fieldFrame.d.ts +1 -1
- package/dist/form/fieldFrame.js +2 -2
- package/dist/form/types/fieldComponentTypes.d.ts +2 -1
- package/dist/graph/AnnotationBanner.d.ts +1 -2
- package/dist/graph/AnnotationBanner.js +30 -32
- package/dist/graph/Connectors.js +4 -1
- package/dist/graph/DependencyGraph.js +2 -2
- package/dist/graph/GraphEditor.js +11 -9
- package/dist/graph/GraphEditorDialogs.js +1 -1
- package/dist/graph/GraphNode.js +7 -4
- package/dist/graph/InputDialog.js +1 -1
- package/dist/graph/InputsEditor.js +14 -11
- package/dist/graph/MatrixGroup.js +9 -3
- package/dist/graph/Reveal.js +18 -10
- package/dist/graph/ShortcutsButton.d.ts +11 -2
- package/dist/graph/ShortcutsButton.js +14 -3
- package/dist/graph/TreeView.js +35 -18
- package/dist/graph/WorkflowSettingsDialog.js +1 -1
- package/dist/graph/editorFields.js +1 -1
- package/dist/graph/editorRows.js +16 -10
- package/dist/graph/editorStrings.d.ts +7 -0
- package/dist/graph/editorStrings.js +8 -1
- package/dist/graph/inputRefs.js +1 -1
- package/dist/graph/settingsViews.js +11 -18
- package/dist/graph/stepWith.js +1 -1
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +4 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +16 -16
- package/dist/list/ActionToolbar.d.ts +42 -6
- package/dist/list/ActionToolbar.js +298 -101
- package/dist/list/ListPage.d.ts +15 -23
- package/dist/list/ListPage.js +42 -43
- package/dist/list/ListTable.d.ts +37 -7
- package/dist/list/ListTable.js +52 -12
- package/dist/list/ListViewControls.js +1 -1
- package/dist/list/UserHoverCard.js +7 -15
- package/dist/list/index.d.ts +2 -2
- package/dist/list/index.js +2 -2
- package/dist/list/listSearch.js +12 -10
- package/dist/list/listView.d.ts +10 -1
- package/dist/list/listView.js +15 -1
- package/dist/logviewer/LogViewer.d.ts +4 -2
- package/dist/logviewer/LogViewer.js +87 -69
- package/dist/logviewer/logviewer.css +3 -2
- package/dist/reducedMotion.d.ts +5 -0
- package/dist/reducedMotion.js +20 -0
- package/dist/safeUrl.d.ts +1 -1
- package/dist/safeUrl.js +4 -2
- package/dist/styles.css +1 -1
- package/package.json +5 -2
- package/dist/components/Breadcrumbs.d.ts +0 -37
- package/dist/components/Breadcrumbs.js +0 -90
- package/dist/components/CopyToClipboard.d.ts +0 -17
- package/dist/components/CopyToClipboard.js +0 -66
- package/dist/components/Sort.d.ts +0 -9
- package/dist/components/Sort.js +0 -42
- package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +0 -6
- package/dist/file-explorer/FilePreview/CodePreviewEditor.js +0 -64
|
@@ -33,6 +33,9 @@ export interface PopoverOptions extends Omit<BasePopover.Popup.Props, 'className
|
|
|
33
33
|
* a list read before one item in it is picked, or nowhere, for a popover that
|
|
34
34
|
* offers an action on what the reader is doing, such as copying a selection. */
|
|
35
35
|
initialFocus?: 'first-control' | 'popup' | 'none';
|
|
36
|
+
/** Stays on `side` where it doesn't fit rather than flipping to the other, for a popup that
|
|
37
|
+
* must not cover what is there, such as the control a tip describes while it is typed in. */
|
|
38
|
+
keepSide?: boolean | undefined;
|
|
36
39
|
/** `panel` holds controls or a list; `tip` is a tooltip-sized note with an arrow. */
|
|
37
40
|
variant?: 'panel' | 'tip';
|
|
38
41
|
/** On the popup: its width, padding or text size. */
|
|
@@ -43,5 +46,5 @@ export interface PopoverOptions extends Omit<BasePopover.Popup.Props, 'className
|
|
|
43
46
|
* flips and shifts to stay on screen, closes on Escape or a press outside, and
|
|
44
47
|
* returns focus to the trigger. Use a Menu for a list of actions, and a
|
|
45
48
|
* HoverCard for a preview a link already leads to. */
|
|
46
|
-
export declare function Popover({ trigger, at, title, open, defaultOpen, onOpenChange, side, align, openOnHover, initialFocus, variant, className, children, ...popupProps }: PopoverProps): import("react").JSX.Element;
|
|
49
|
+
export declare function Popover({ trigger, at, title, open, defaultOpen, onOpenChange, side, align, openOnHover, initialFocus, keepSide, variant, className, children, ...popupProps }: PopoverProps): import("react").JSX.Element;
|
|
47
50
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx } from "../cx.js";
|
|
2
2
|
import { panelClassName, positionerClassName, tipClassName, toPositionerAnchor } from "./floating.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { createContext, use, useRef } from "react";
|
|
4
|
+
import { createContext, use, useCallback, useRef } from "react";
|
|
5
5
|
import { Popover } from "@base-ui/react/popover";
|
|
6
6
|
//#region src/components/Popover.tsx
|
|
7
7
|
/** A button that closes the popover it sits in. */
|
|
@@ -16,10 +16,11 @@ function useClosePopover() {
|
|
|
16
16
|
* flips and shifts to stay on screen, closes on Escape or a press outside, and
|
|
17
17
|
* returns focus to the trigger. Use a Menu for a list of actions, and a
|
|
18
18
|
* HoverCard for a preview a link already leads to. */
|
|
19
|
-
function Popover$1({ trigger, at, title, open, defaultOpen, onOpenChange, side = "bottom", align = "center", openOnHover = false, initialFocus = "first-control", variant = "panel", className, children, ...popupProps }) {
|
|
19
|
+
function Popover$1({ trigger, at, title, open, defaultOpen, onOpenChange, side = "bottom", align = "center", openOnHover = false, initialFocus = "first-control", keepSide = false, variant = "panel", className, children, ...popupProps }) {
|
|
20
20
|
const tip = variant === "tip";
|
|
21
21
|
const popup = useRef(null);
|
|
22
22
|
const actions = useRef(null);
|
|
23
|
+
const close = useCallback(() => actions.current?.close(), []);
|
|
23
24
|
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
24
25
|
actionsRef: actions,
|
|
25
26
|
...open === void 0 ? {} : { open },
|
|
@@ -37,6 +38,7 @@ function Popover$1({ trigger, at, title, open, defaultOpen, onOpenChange, side =
|
|
|
37
38
|
align,
|
|
38
39
|
sideOffset: tip ? 8 : 6,
|
|
39
40
|
collisionPadding: 8,
|
|
41
|
+
...keepSide && { collisionAvoidance: { side: "none" } },
|
|
40
42
|
...at ? { anchor: toPositionerAnchor(at) } : {},
|
|
41
43
|
className: positionerClassName,
|
|
42
44
|
children: /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
@@ -51,7 +53,7 @@ function Popover$1({ trigger, at, title, open, defaultOpen, onOpenChange, side =
|
|
|
51
53
|
children: title
|
|
52
54
|
}),
|
|
53
55
|
/* @__PURE__ */ jsx(CloseContext, {
|
|
54
|
-
value:
|
|
56
|
+
value: close,
|
|
55
57
|
children
|
|
56
58
|
})
|
|
57
59
|
]
|
|
@@ -75,6 +75,10 @@ export interface UIStrings {
|
|
|
75
75
|
remove: string;
|
|
76
76
|
sort: string;
|
|
77
77
|
userAvatar: string;
|
|
78
|
+
/** A person's presence beside their avatar, read with their name. */
|
|
79
|
+
presence: Record<'online' | 'offline' | 'busy' | 'away', string>;
|
|
80
|
+
/** An avatar's name with the person's presence, such as "Ada Lovelace, online". */
|
|
81
|
+
withPresence: (name: string, presence: string) => string;
|
|
78
82
|
moreInfo: string;
|
|
79
83
|
/** The name of a menu of actions on a page or row. */
|
|
80
84
|
actions: string;
|
|
@@ -84,10 +88,16 @@ export interface UIStrings {
|
|
|
84
88
|
clearSearch: string;
|
|
85
89
|
filterPlaceholder: string;
|
|
86
90
|
breadcrumb: string;
|
|
91
|
+
/** Names the menu of the breadcrumbs a narrow trail folds away. */
|
|
92
|
+
showFullPath: string;
|
|
87
93
|
yes: string;
|
|
88
94
|
no: string;
|
|
89
95
|
/** Read after a link that opens a new tab. */
|
|
90
96
|
opensInNewTab: string;
|
|
97
|
+
/** Names a code editor that has no label of its own. */
|
|
98
|
+
codeEditor: string;
|
|
99
|
+
/** Shown when someone types in a read-only code editor. */
|
|
100
|
+
readOnlyText: string;
|
|
91
101
|
/** Names the handle that resizes a panel. */
|
|
92
102
|
resizePanel: string;
|
|
93
103
|
/** A resizable panel's width, read aloud. */
|
|
@@ -105,6 +115,8 @@ export interface UIStrings {
|
|
|
105
115
|
add: (text: string) => string;
|
|
106
116
|
/** In place of the placeholder once a field holds as many values as it takes. */
|
|
107
117
|
limitReached: (max: number) => string;
|
|
118
|
+
/** Names the button on a chosen value's chip that takes it out. */
|
|
119
|
+
removeValue: (label: string) => string;
|
|
108
120
|
};
|
|
109
121
|
datePicker: {
|
|
110
122
|
/** The button's text while no date is chosen. */
|
|
@@ -193,6 +205,8 @@ export interface UIStrings {
|
|
|
193
205
|
endInFuture: string;
|
|
194
206
|
follow: string;
|
|
195
207
|
following: string;
|
|
208
|
+
/** A line number's name: it selects the line for copying. */
|
|
209
|
+
selectLine: (line: number) => string;
|
|
196
210
|
};
|
|
197
211
|
dag: {
|
|
198
212
|
workflow: string;
|
|
@@ -226,6 +240,13 @@ export interface UIStrings {
|
|
|
226
240
|
warning: string;
|
|
227
241
|
notice: string;
|
|
228
242
|
};
|
|
243
|
+
/** Names the annotations' toggle for a screen reader, in place of its count badges, such as
|
|
244
|
+
* "Annotations: 2 errors, 1 warning". It starts with `annotations`, the toggle's visible text. */
|
|
245
|
+
annotationsLabel: (counts: {
|
|
246
|
+
error: number;
|
|
247
|
+
warning: number;
|
|
248
|
+
notice: number;
|
|
249
|
+
}) => string;
|
|
229
250
|
/** Where an annotation came from, under its message. */
|
|
230
251
|
annotationSource: (job: string, step: string) => string;
|
|
231
252
|
/** A step without a name, numbered from 0 as the run reports it. */
|
|
@@ -247,13 +268,16 @@ export interface UIStrings {
|
|
|
247
268
|
select: (name: string) => string;
|
|
248
269
|
viewDetails: string;
|
|
249
270
|
openFolder: string;
|
|
271
|
+
/** A path's page in the app, as in "Copy link". */
|
|
272
|
+
link: string;
|
|
250
273
|
detailsTab: string;
|
|
251
274
|
previewTab: string;
|
|
252
275
|
preview: string;
|
|
253
276
|
openFullPreview: string;
|
|
254
|
-
/** Names the choice between a
|
|
277
|
+
/** Names the choice between a compact preview and the full window. */
|
|
255
278
|
previewLayout: string;
|
|
256
|
-
|
|
279
|
+
/** The preview in a panel over the page, beside `fullWindow`. */
|
|
280
|
+
compact: string;
|
|
257
281
|
fullWindow: string;
|
|
258
282
|
streamed: string;
|
|
259
283
|
streamedTooltip: string;
|
|
@@ -360,6 +384,10 @@ export interface UIStrings {
|
|
|
360
384
|
corsAdded: string;
|
|
361
385
|
corsPropagating: string;
|
|
362
386
|
previewUnsupported: string;
|
|
387
|
+
/** A folder's listing failed; `name` is the folder. */
|
|
388
|
+
loadFailed: (name: string, message: string) => string;
|
|
389
|
+
/** A failure that came with no message of its own. */
|
|
390
|
+
unknownError: string;
|
|
363
391
|
};
|
|
364
392
|
chrome: {
|
|
365
393
|
explorer: string;
|
|
@@ -382,6 +410,14 @@ export interface UIStrings {
|
|
|
382
410
|
details: string;
|
|
383
411
|
selectFiles: string;
|
|
384
412
|
selectFolder: string;
|
|
413
|
+
/** Names the table of a folder's contents. */
|
|
414
|
+
files: string;
|
|
415
|
+
/** Names the folder tree. */
|
|
416
|
+
folders: string;
|
|
417
|
+
/** Names the trail from the storage down to the open folder. */
|
|
418
|
+
location: string;
|
|
419
|
+
/** Explains a share link, beside Share. */
|
|
420
|
+
shareHelp: string;
|
|
385
421
|
};
|
|
386
422
|
confirmUpload: {
|
|
387
423
|
title: string;
|
|
@@ -468,8 +504,6 @@ export interface UIStrings {
|
|
|
468
504
|
stepDone: string;
|
|
469
505
|
/** A step with a value to fix. */
|
|
470
506
|
stepNeedsAttention: string;
|
|
471
|
-
previousStep: string;
|
|
472
|
-
nextStep: string;
|
|
473
507
|
/** A wizard's last button, unless its config names its own. */
|
|
474
508
|
runWizard: string;
|
|
475
509
|
fixErrorsToContinue: string;
|
|
@@ -494,6 +528,12 @@ export interface UIStrings {
|
|
|
494
528
|
labelId: string;
|
|
495
529
|
labelUrl: string;
|
|
496
530
|
couldNotLoad: (noun: string) => string;
|
|
531
|
+
/** What `ListError` names when the host gives no noun. */
|
|
532
|
+
data: string;
|
|
533
|
+
/** A list's size, as `ListCount` shows it; `count` is formatted and `noun` agrees with it. */
|
|
534
|
+
count: (count: string, noun: string) => string;
|
|
535
|
+
/** How many rows a filter left, of how many. */
|
|
536
|
+
matchCount: (matches: string, total: string, nounPlural: string) => string;
|
|
497
537
|
displayOptions: string;
|
|
498
538
|
grouping: string;
|
|
499
539
|
ordering: string;
|
|
@@ -503,6 +543,8 @@ export interface UIStrings {
|
|
|
503
543
|
descending: string;
|
|
504
544
|
columnHeaders: string;
|
|
505
545
|
showColumnHeaders: string;
|
|
546
|
+
/** The header checkbox that ticks every row, or clears them all. */
|
|
547
|
+
selectAll: string;
|
|
506
548
|
showActions: string;
|
|
507
549
|
showRowActions: string;
|
|
508
550
|
alwaysShowActions: string;
|
|
@@ -521,6 +563,12 @@ export interface UIStrings {
|
|
|
521
563
|
removeSearchTerm: (term: string) => string;
|
|
522
564
|
};
|
|
523
565
|
}
|
|
566
|
+
/** What a host passes to translate the strings: any group, any string in it, at any depth.
|
|
567
|
+
* A string it leaves out stays in English. */
|
|
568
|
+
export type UIStringOverrides = Overrides<UIStrings>;
|
|
569
|
+
type Overrides<T> = {
|
|
570
|
+
[K in keyof T]?: T[K] extends (...args: never[]) => unknown ? T[K] : T[K] extends readonly unknown[] ? T[K] : T[K] extends object ? Overrides<T[K]> : T[K];
|
|
571
|
+
};
|
|
524
572
|
export interface UINavigation {
|
|
525
573
|
goTo: (to: string) => void;
|
|
526
574
|
/** Opens the source of a step that runs another workflow, named by its `uses`;
|
|
@@ -574,11 +622,14 @@ export interface UIData {
|
|
|
574
622
|
usePersistedState: PersistedStateHook;
|
|
575
623
|
}
|
|
576
624
|
import type { FieldComponent } from '../form/fieldRegistry.js';
|
|
577
|
-
import type {
|
|
578
|
-
/**
|
|
579
|
-
*
|
|
580
|
-
|
|
581
|
-
*
|
|
625
|
+
import type { Breadcrumb } from './pageHeaderStore.js';
|
|
626
|
+
/** An internal navigation link, which hosts bind to their router's Link. Its
|
|
627
|
+
* `href` is a full in-app URL that may carry a search and a hash, such as
|
|
628
|
+
* `/runs/42?tab=logs#step-3`, and the host routes all of it client-side on a
|
|
629
|
+
* plain click, leaving modified and middle clicks to the browser. It passes
|
|
630
|
+
* every other prop, ref included, to its anchor, so menus and tooltips can
|
|
631
|
+
* attach to it. Components render it through `AppLink`, which sanitizes the
|
|
632
|
+
* href and keeps full page loads and other origins off the router. */
|
|
582
633
|
export type UILinkComponent = React.ComponentType<React.ComponentPropsWithRef<'a'> & {
|
|
583
634
|
href: string;
|
|
584
635
|
}>;
|
|
@@ -632,7 +683,7 @@ export interface UISlots {
|
|
|
632
683
|
}) => ReactNode;
|
|
633
684
|
/** Pin affordance rendered after the page header's crumb trail; absent hides it. */
|
|
634
685
|
breadcrumbPin?: (args: {
|
|
635
|
-
crumbs: readonly
|
|
686
|
+
crumbs: readonly Breadcrumb[];
|
|
636
687
|
}) => ReactNode;
|
|
637
688
|
/** Control rendered at the start of the page header row, before the crumb
|
|
638
689
|
* trail — the host's app-nav toggle. Absent hides it. */
|
|
@@ -661,13 +712,22 @@ export declare function useRunFile(slug: string, path: string | null, options?:
|
|
|
661
712
|
refreshInterval?: number;
|
|
662
713
|
}): RunFileResult;
|
|
663
714
|
export declare function usePersistedState<T>(key: string, defaultValue: T): [T, Dispatch<SetStateAction<T>>];
|
|
664
|
-
export
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
715
|
+
export interface UIProviderProps {
|
|
716
|
+
/** Translations over the English defaults, at any depth. Define them outside a component, or
|
|
717
|
+
* memoize them: the provider compares them by value, but a function made each render differs. */
|
|
718
|
+
strings?: UIStringOverrides | undefined;
|
|
719
|
+
/** How the package navigates; read at the moment it navigates, so a new one never re-renders. */
|
|
720
|
+
navigation?: Partial<UINavigation> | undefined;
|
|
721
|
+
/** The host's data hooks and resolvers. `useRunFile` and `usePersistedState` are called as
|
|
722
|
+
* hooks, so each must stay the same function for the life of the app. */
|
|
723
|
+
data?: Partial<UIData> | undefined;
|
|
724
|
+
/** Components the host renders inside the package's; a component made each render would
|
|
725
|
+
* remount everything it renders. */
|
|
726
|
+
slots?: UISlots | undefined;
|
|
727
|
+
/** The engine, or a loader that resolves to it. A loader is called once, the first one
|
|
728
|
+
* passed, so it may be written inline. */
|
|
729
|
+
engine?: WorkflowEngineSource | undefined;
|
|
672
730
|
children: React.ReactNode;
|
|
673
|
-
}
|
|
731
|
+
}
|
|
732
|
+
export declare function UIProvider({ strings, navigation, data, slots, engine: engineProp, children, }: UIProviderProps): import("react").JSX.Element;
|
|
733
|
+
export {};
|