@parallelworks/ui 0.50.0 → 0.52.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 +204 -18
- package/dist/ai/agent/toolStrings.d.ts +2 -0
- package/dist/ai/agent/toolStrings.js +20 -18
- package/dist/ai/ai.css +12 -0
- 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 +4 -4
- 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 +117 -56
- 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 +81 -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 +21 -9
- 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 +51 -24
- 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 +51 -17
- package/dist/components/DescriptionList.js +117 -31
- package/dist/components/Disclosure.js +1 -1
- package/dist/components/Drawer.js +10 -16
- package/dist/components/Field.d.ts +15 -5
- package/dist/components/Field.js +41 -9
- package/dist/components/IconButton.d.ts +14 -5
- package/dist/components/IconButton.js +25 -14
- package/dist/components/InfoTip.d.ts +4 -1
- package/dist/components/InfoTip.js +2 -1
- 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/MenuEntries.d.ts +43 -12
- package/dist/components/MenuEntries.js +34 -19
- 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.js +3 -2
- 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/RunStatusIcon.js +2 -2
- 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/StatusIcons.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 +24 -14
- package/dist/components/Toast.d.ts +11 -3
- package/dist/components/Toast.js +47 -22
- package/dist/components/buttonClasses.js +2 -2
- 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/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/tone.d.ts +5 -2
- package/dist/components/tone.js +15 -6
- 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 +11 -2
- 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 +14 -5
- package/dist/editor/Monaco.js +163 -112
- package/dist/editor/index.d.ts +5 -5
- package/dist/editor/index.js +3 -3
- package/dist/editor/themes.d.ts +8 -5
- package/dist/editor/themes.js +58 -30
- package/dist/editor/yaml.d.ts +6 -2
- package/dist/editor/yaml.js +11 -2
- package/dist/file-explorer/FileExplorer.js +143 -124
- package/dist/file-explorer/FileExplorerContext.js +1 -1
- package/dist/file-explorer/FilePreview/StreamedBadge.js +3 -1
- package/dist/file-explorer/FilePreview/Viewer.js +2 -2
- package/dist/file-explorer/FilePreview/index.js +4 -4
- package/dist/file-explorer/FileRow.js +1 -1
- package/dist/file-explorer/FileRowsWindow.js +34 -3
- package/dist/file-explorer/FileTable.js +3 -1
- package/dist/file-explorer/TreeView.js +37 -14
- package/dist/file-explorer/helpers.d.ts +2 -1
- package/dist/file-explorer/helpers.js +21 -20
- 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 +1 -4
- package/dist/form/Wizard/WizardStepIndicator.js +1 -1
- package/dist/form/Wizard/utils.js +1 -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 +12 -10
- package/dist/graph/GraphEditorDialogs.js +2 -2
- 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/ProblemsButton.js +2 -2
- package/dist/graph/Reveal.js +18 -10
- package/dist/graph/ShortcutsButton.d.ts +11 -2
- package/dist/graph/ShortcutsButton.js +15 -4
- package/dist/graph/TreeView.js +35 -18
- package/dist/graph/WorkflowSettingsDialog.js +1 -1
- package/dist/graph/editorChrome.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/fieldProblems.js +1 -1
- package/dist/graph/inputRefs.js +1 -1
- package/dist/graph/settingsViews.js +11 -18
- package/dist/graph/stepWith.js +2 -2
- 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 +44 -8
- package/dist/list/ActionToolbar.js +301 -102
- package/dist/list/ListPage.d.ts +15 -23
- package/dist/list/ListPage.js +46 -45
- package/dist/list/ListTable.d.ts +32 -7
- package/dist/list/ListTable.js +48 -12
- package/dist/list/ListViewControls.js +2 -2
- 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/list/rowMenu.d.ts +2 -2
- package/dist/logviewer/LogViewer.d.ts +4 -2
- package/dist/logviewer/LogViewer.js +88 -70
- 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/theme.css +24 -10
- package/dist/styles.css +1 -1
- package/dist/theme/derive.d.ts +1 -1
- package/dist/theme/derive.js +46 -21
- package/dist/theme/fit.js +10 -4
- package/package.json +1 -1
- 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
|
@@ -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. */
|
|
@@ -20,6 +20,7 @@ function Popover$1({ trigger, at, title, open, defaultOpen, onOpenChange, side =
|
|
|
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 },
|
|
@@ -51,7 +52,7 @@ function Popover$1({ trigger, at, title, open, defaultOpen, onOpenChange, side =
|
|
|
51
52
|
children: title
|
|
52
53
|
}),
|
|
53
54
|
/* @__PURE__ */ jsx(CloseContext, {
|
|
54
|
-
value:
|
|
55
|
+
value: close,
|
|
55
56
|
children
|
|
56
57
|
})
|
|
57
58
|
]
|
|
@@ -56,6 +56,8 @@ export interface UIStrings {
|
|
|
56
56
|
copyThing: (label: string) => string;
|
|
57
57
|
copiedThing: (label: string) => string;
|
|
58
58
|
copyThingFailed: (label: string) => string;
|
|
59
|
+
/** Read out where a value is missing, which shows as a dash. */
|
|
60
|
+
noValue: string;
|
|
59
61
|
/** A name field's rule: the characters a key or identifier allows. */
|
|
60
62
|
invalidName: string;
|
|
61
63
|
invalidNumber: string;
|
|
@@ -73,6 +75,10 @@ export interface UIStrings {
|
|
|
73
75
|
remove: string;
|
|
74
76
|
sort: string;
|
|
75
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;
|
|
76
82
|
moreInfo: string;
|
|
77
83
|
/** The name of a menu of actions on a page or row. */
|
|
78
84
|
actions: string;
|
|
@@ -82,10 +88,16 @@ export interface UIStrings {
|
|
|
82
88
|
clearSearch: string;
|
|
83
89
|
filterPlaceholder: string;
|
|
84
90
|
breadcrumb: string;
|
|
91
|
+
/** Names the menu of the breadcrumbs a narrow trail folds away. */
|
|
92
|
+
showFullPath: string;
|
|
85
93
|
yes: string;
|
|
86
94
|
no: string;
|
|
87
95
|
/** Read after a link that opens a new tab. */
|
|
88
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;
|
|
89
101
|
/** Names the handle that resizes a panel. */
|
|
90
102
|
resizePanel: string;
|
|
91
103
|
/** A resizable panel's width, read aloud. */
|
|
@@ -103,6 +115,8 @@ export interface UIStrings {
|
|
|
103
115
|
add: (text: string) => string;
|
|
104
116
|
/** In place of the placeholder once a field holds as many values as it takes. */
|
|
105
117
|
limitReached: (max: number) => string;
|
|
118
|
+
/** Names the button on a chosen value's chip that takes it out. */
|
|
119
|
+
removeValue: (label: string) => string;
|
|
106
120
|
};
|
|
107
121
|
datePicker: {
|
|
108
122
|
/** The button's text while no date is chosen. */
|
|
@@ -191,6 +205,8 @@ export interface UIStrings {
|
|
|
191
205
|
endInFuture: string;
|
|
192
206
|
follow: string;
|
|
193
207
|
following: string;
|
|
208
|
+
/** A line number's name: it selects the line for copying. */
|
|
209
|
+
selectLine: (line: number) => string;
|
|
194
210
|
};
|
|
195
211
|
dag: {
|
|
196
212
|
workflow: string;
|
|
@@ -224,6 +240,13 @@ export interface UIStrings {
|
|
|
224
240
|
warning: string;
|
|
225
241
|
notice: string;
|
|
226
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;
|
|
227
250
|
/** Where an annotation came from, under its message. */
|
|
228
251
|
annotationSource: (job: string, step: string) => string;
|
|
229
252
|
/** A step without a name, numbered from 0 as the run reports it. */
|
|
@@ -249,9 +272,10 @@ export interface UIStrings {
|
|
|
249
272
|
previewTab: string;
|
|
250
273
|
preview: string;
|
|
251
274
|
openFullPreview: string;
|
|
252
|
-
/** Names the choice between a
|
|
275
|
+
/** Names the choice between a compact preview and the full window. */
|
|
253
276
|
previewLayout: string;
|
|
254
|
-
|
|
277
|
+
/** The preview in a panel over the page, beside `fullWindow`. */
|
|
278
|
+
compact: string;
|
|
255
279
|
fullWindow: string;
|
|
256
280
|
streamed: string;
|
|
257
281
|
streamedTooltip: string;
|
|
@@ -358,6 +382,10 @@ export interface UIStrings {
|
|
|
358
382
|
corsAdded: string;
|
|
359
383
|
corsPropagating: string;
|
|
360
384
|
previewUnsupported: string;
|
|
385
|
+
/** A folder's listing failed; `name` is the folder. */
|
|
386
|
+
loadFailed: (name: string, message: string) => string;
|
|
387
|
+
/** A failure that came with no message of its own. */
|
|
388
|
+
unknownError: string;
|
|
361
389
|
};
|
|
362
390
|
chrome: {
|
|
363
391
|
explorer: string;
|
|
@@ -380,6 +408,14 @@ export interface UIStrings {
|
|
|
380
408
|
details: string;
|
|
381
409
|
selectFiles: string;
|
|
382
410
|
selectFolder: string;
|
|
411
|
+
/** Names the table of a folder's contents. */
|
|
412
|
+
files: string;
|
|
413
|
+
/** Names the folder tree. */
|
|
414
|
+
folders: string;
|
|
415
|
+
/** Names the trail from the storage down to the open folder. */
|
|
416
|
+
location: string;
|
|
417
|
+
/** Explains a share link, beside Share. */
|
|
418
|
+
shareHelp: string;
|
|
383
419
|
};
|
|
384
420
|
confirmUpload: {
|
|
385
421
|
title: string;
|
|
@@ -466,8 +502,6 @@ export interface UIStrings {
|
|
|
466
502
|
stepDone: string;
|
|
467
503
|
/** A step with a value to fix. */
|
|
468
504
|
stepNeedsAttention: string;
|
|
469
|
-
previousStep: string;
|
|
470
|
-
nextStep: string;
|
|
471
505
|
/** A wizard's last button, unless its config names its own. */
|
|
472
506
|
runWizard: string;
|
|
473
507
|
fixErrorsToContinue: string;
|
|
@@ -492,6 +526,12 @@ export interface UIStrings {
|
|
|
492
526
|
labelId: string;
|
|
493
527
|
labelUrl: string;
|
|
494
528
|
couldNotLoad: (noun: string) => string;
|
|
529
|
+
/** What `ListError` names when the host gives no noun. */
|
|
530
|
+
data: string;
|
|
531
|
+
/** A list's size, as `ListCount` shows it; `count` is formatted and `noun` agrees with it. */
|
|
532
|
+
count: (count: string, noun: string) => string;
|
|
533
|
+
/** How many rows a filter left, of how many. */
|
|
534
|
+
matchCount: (matches: string, total: string, nounPlural: string) => string;
|
|
495
535
|
displayOptions: string;
|
|
496
536
|
grouping: string;
|
|
497
537
|
ordering: string;
|
|
@@ -501,6 +541,8 @@ export interface UIStrings {
|
|
|
501
541
|
descending: string;
|
|
502
542
|
columnHeaders: string;
|
|
503
543
|
showColumnHeaders: string;
|
|
544
|
+
/** The header checkbox that ticks every row, or clears them all. */
|
|
545
|
+
selectAll: string;
|
|
504
546
|
showActions: string;
|
|
505
547
|
showRowActions: string;
|
|
506
548
|
alwaysShowActions: string;
|
|
@@ -519,6 +561,12 @@ export interface UIStrings {
|
|
|
519
561
|
removeSearchTerm: (term: string) => string;
|
|
520
562
|
};
|
|
521
563
|
}
|
|
564
|
+
/** What a host passes to translate the strings: any group, any string in it, at any depth.
|
|
565
|
+
* A string it leaves out stays in English. */
|
|
566
|
+
export type UIStringOverrides = Overrides<UIStrings>;
|
|
567
|
+
type Overrides<T> = {
|
|
568
|
+
[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];
|
|
569
|
+
};
|
|
522
570
|
export interface UINavigation {
|
|
523
571
|
goTo: (to: string) => void;
|
|
524
572
|
/** Opens the source of a step that runs another workflow, named by its `uses`;
|
|
@@ -572,11 +620,14 @@ export interface UIData {
|
|
|
572
620
|
usePersistedState: PersistedStateHook;
|
|
573
621
|
}
|
|
574
622
|
import type { FieldComponent } from '../form/fieldRegistry.js';
|
|
575
|
-
import type {
|
|
576
|
-
/**
|
|
577
|
-
*
|
|
578
|
-
|
|
579
|
-
*
|
|
623
|
+
import type { Breadcrumb } from './pageHeaderStore.js';
|
|
624
|
+
/** An internal navigation link, which hosts bind to their router's Link. Its
|
|
625
|
+
* `href` is a full in-app URL that may carry a search and a hash, such as
|
|
626
|
+
* `/runs/42?tab=logs#step-3`, and the host routes all of it client-side on a
|
|
627
|
+
* plain click, leaving modified and middle clicks to the browser. It passes
|
|
628
|
+
* every other prop, ref included, to its anchor, so menus and tooltips can
|
|
629
|
+
* attach to it. Components render it through `AppLink`, which sanitizes the
|
|
630
|
+
* href and keeps full page loads and other origins off the router. */
|
|
580
631
|
export type UILinkComponent = React.ComponentType<React.ComponentPropsWithRef<'a'> & {
|
|
581
632
|
href: string;
|
|
582
633
|
}>;
|
|
@@ -630,7 +681,7 @@ export interface UISlots {
|
|
|
630
681
|
}) => ReactNode;
|
|
631
682
|
/** Pin affordance rendered after the page header's crumb trail; absent hides it. */
|
|
632
683
|
breadcrumbPin?: (args: {
|
|
633
|
-
crumbs: readonly
|
|
684
|
+
crumbs: readonly Breadcrumb[];
|
|
634
685
|
}) => ReactNode;
|
|
635
686
|
/** Control rendered at the start of the page header row, before the crumb
|
|
636
687
|
* trail — the host's app-nav toggle. Absent hides it. */
|
|
@@ -659,13 +710,22 @@ export declare function useRunFile(slug: string, path: string | null, options?:
|
|
|
659
710
|
refreshInterval?: number;
|
|
660
711
|
}): RunFileResult;
|
|
661
712
|
export declare function usePersistedState<T>(key: string, defaultValue: T): [T, Dispatch<SetStateAction<T>>];
|
|
662
|
-
export
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
713
|
+
export interface UIProviderProps {
|
|
714
|
+
/** Translations over the English defaults, at any depth. Define them outside a component, or
|
|
715
|
+
* memoize them: the provider compares them by value, but a function made each render differs. */
|
|
716
|
+
strings?: UIStringOverrides | undefined;
|
|
717
|
+
/** How the package navigates; read at the moment it navigates, so a new one never re-renders. */
|
|
718
|
+
navigation?: Partial<UINavigation> | undefined;
|
|
719
|
+
/** The host's data hooks and resolvers. `useRunFile` and `usePersistedState` are called as
|
|
720
|
+
* hooks, so each must stay the same function for the life of the app. */
|
|
721
|
+
data?: Partial<UIData> | undefined;
|
|
722
|
+
/** Components the host renders inside the package's; a component made each render would
|
|
723
|
+
* remount everything it renders. */
|
|
724
|
+
slots?: UISlots | undefined;
|
|
725
|
+
/** The engine, or a loader that resolves to it. A loader is called once, the first one
|
|
726
|
+
* passed, so it may be written inline. */
|
|
727
|
+
engine?: WorkflowEngineSource | undefined;
|
|
670
728
|
children: React.ReactNode;
|
|
671
|
-
}
|
|
729
|
+
}
|
|
730
|
+
export declare function UIProvider({ strings, navigation, data, slots, engine: engineProp, children, }: UIProviderProps): import("react").JSX.Element;
|
|
731
|
+
export {};
|