@parallelworks/ui 0.37.0 → 0.39.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 +1 -1
- package/dist/ai/components/ChatInput.js +8 -23
- package/dist/ai/components/ChatSidebar.js +7 -4
- package/dist/ai/components/chatDraft.d.ts +7 -0
- package/dist/ai/components/chatDraft.js +66 -0
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +2 -2
- package/dist/ai/ui/sidebar.d.ts +6 -0
- package/dist/ai/ui/sidebar.js +15 -1
- package/dist/editing.d.ts +2 -0
- package/dist/editor/Monaco.js +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/editor/lintContext.js +15 -3
- package/dist/form/FieldWrapper.js +1 -0
- package/dist/form/Form.js +64 -23
- package/dist/form/Wizard/WizardContainer.js +66 -6
- package/dist/form/Wizard/WizardStepContent.js +23 -10
- package/dist/form/Wizard/wizardPages.d.ts +12 -0
- package/dist/form/Wizard/wizardPages.js +5 -0
- package/dist/form/formEditing.d.ts +25 -0
- package/dist/form/formEditing.js +20 -0
- package/dist/graph/DependencyGraph.d.ts +8 -1
- package/dist/graph/DependencyGraph.js +433 -204
- package/dist/graph/GraphEditor.d.ts +27 -0
- package/dist/graph/GraphEditor.js +1543 -0
- package/dist/graph/GraphEditorDialogs.d.ts +87 -0
- package/dist/graph/GraphEditorDialogs.js +1808 -0
- package/dist/graph/InputDialog.js +1568 -54
- package/dist/graph/InputsEditor.d.ts +12 -0
- package/dist/graph/InputsEditor.js +1594 -0
- package/dist/graph/JobSummary.d.ts +3 -0
- package/dist/graph/JobSummary.js +34 -21
- package/dist/graph/MatrixGroup.d.ts +2 -1
- package/dist/graph/MatrixGroup.js +10 -3
- package/dist/graph/ShortcutsButton.js +56 -0
- package/dist/graph/SuggestionInput.js +29 -0
- package/dist/graph/WorkflowSettingsDialog.d.ts +21 -0
- package/dist/graph/WorkflowSettingsDialog.js +670 -0
- package/dist/graph/editorApi.js +8 -0
- package/dist/graph/editorChrome.js +75 -0
- package/dist/graph/editorFields.js +535 -0
- package/dist/graph/editorPrimitives.js +95 -4
- package/dist/graph/editorRows.d.ts +58 -0
- package/dist/graph/editorRows.js +460 -0
- package/dist/graph/editorStrings.d.ts +1 -0
- package/dist/graph/editorStrings.js +10 -1
- package/dist/graph/expressionRefs.js +39 -0
- package/dist/graph/fieldProblems.js +111 -0
- package/dist/graph/graphEditorState.d.ts +191 -0
- package/dist/graph/graphEditorState.js +74 -0
- package/dist/graph/index.d.ts +4 -0
- package/dist/graph/index.js +6 -2
- package/dist/graph/inputLayout.js +337 -0
- package/dist/graph/inputPages.d.ts +33 -0
- package/dist/graph/inputPages.js +186 -0
- package/dist/graph/inputRefs.js +388 -0
- package/dist/graph/inputRows.d.ts +43 -0
- package/dist/graph/inputRows.js +65 -0
- package/dist/graph/refusalText.js +13 -0
- package/dist/graph/settingsViews.js +62 -0
- package/dist/graph/stepWith.d.ts +38 -0
- package/dist/graph/stepWith.js +536 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { GraphEdit } from '../editing.js';
|
|
3
|
+
import { type DialogShellProps, type Json, type OpenOnAdd } from './editorFields.js';
|
|
4
|
+
import { type SettingsView } from './settingsViews.js';
|
|
5
|
+
export declare const SSH_KEYS: readonly ['remoteHost', 'remoteUser', 'jumpNodeHost', 'jumpNodeUser', 'disconnect-timeout'];
|
|
6
|
+
/** What the job dialog writes; the schema coverage test holds these to the workflow schema. */
|
|
7
|
+
export declare const JOB_FIELDS: readonly ['needs', 'if', 'ssh', 'runs-on', 'working-directory', 'timeout', 'env', 'outputs', 'strategy'];
|
|
8
|
+
export declare const RUNS_ON_FIELDS: readonly ['environment', 'environment.cluster', 'environment.name', 'params', 'mode', 'targetId', 'environmentId', 'schedulingParams', 'newWorker', 'workerId'];
|
|
9
|
+
export declare const STRATEGY_FIELDS: readonly ['matrix', 'matrix.include', 'matrix.exclude', 'fail-fast', 'max-parallel'];
|
|
10
|
+
/** What the step dialog writes. */
|
|
11
|
+
export declare const STEP_FIELDS: readonly ['name', 'run', 'shell', 'uses', 'with', 'if', 'working-directory', 'id', 'timeout', 'ignore-errors', 'early-cancel', 'cleanup', 'retry', 'env', 'ssh'];
|
|
12
|
+
export declare const RETRY_FIELDS: readonly ['max-retries', 'interval', 'timeout', 'clean-on-retry'];
|
|
13
|
+
interface ViewProps {
|
|
14
|
+
source?: string | undefined;
|
|
15
|
+
/** Adds the job or step being edited; applied with the first save, so cancelling adds nothing. */
|
|
16
|
+
addition?: GraphEdit | undefined;
|
|
17
|
+
/** The view to open in; YAML unless the host says form. */
|
|
18
|
+
view?: SettingsView | undefined;
|
|
19
|
+
onViewChange?: ((view: SettingsView) => void) | undefined;
|
|
20
|
+
openOnAdd?: OpenOnAdd | undefined;
|
|
21
|
+
}
|
|
22
|
+
interface JobDialogProps {
|
|
23
|
+
job: string;
|
|
24
|
+
jobs: Json;
|
|
25
|
+
inputs: Json | undefined;
|
|
26
|
+
workflow?: Json | undefined;
|
|
27
|
+
onEdit: (edit: GraphEdit) => void;
|
|
28
|
+
onClose: () => void;
|
|
29
|
+
}
|
|
30
|
+
interface StepDialogProps {
|
|
31
|
+
job: string;
|
|
32
|
+
index: number;
|
|
33
|
+
steps: unknown[];
|
|
34
|
+
inputs: Json | undefined;
|
|
35
|
+
workflow?: Json | undefined;
|
|
36
|
+
usesSuggestions: string[];
|
|
37
|
+
onEdit: (edit: GraphEdit) => void;
|
|
38
|
+
onClose: () => void;
|
|
39
|
+
}
|
|
40
|
+
/** What a job or step form hands the dialog around it, so the same settings can be edited as YAML. */
|
|
41
|
+
export interface SettingsFormHooks {
|
|
42
|
+
renderShell?: ((props: DialogShellProps) => ReactNode) | undefined;
|
|
43
|
+
/** Called on each render with the edit Save would send, and whether a field is invalid. */
|
|
44
|
+
onDraft?: ((edit: GraphEdit | null, invalid: boolean) => void) | undefined;
|
|
45
|
+
/** Edits made in the YAML view are waiting to be saved. */
|
|
46
|
+
pending?: boolean;
|
|
47
|
+
/** The step exists only once saved, so deleting it just closes the dialog. */
|
|
48
|
+
adding?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface SettingsViewsOptions extends ViewProps {
|
|
51
|
+
onEdit: (edit: GraphEdit) => void;
|
|
52
|
+
onClose: () => void;
|
|
53
|
+
/** What the dialog edits, by the name the job dialog can change. */
|
|
54
|
+
name: string;
|
|
55
|
+
read: (workflow: string, name: string) => string;
|
|
56
|
+
write: (name: string, yaml: string) => GraphEdit;
|
|
57
|
+
scope: (name: string) => string[];
|
|
58
|
+
/** Keys right under the scope whose problems belong to other editors. */
|
|
59
|
+
exclude?: string[];
|
|
60
|
+
/** Whether empty text, meaning no settings at all, is fine. */
|
|
61
|
+
optional?: boolean;
|
|
62
|
+
/** The YAML shows a job's settings, not its key, so its view renames through a field. */
|
|
63
|
+
rename?: {
|
|
64
|
+
label: string;
|
|
65
|
+
description: string;
|
|
66
|
+
error: (next: string, current: string) => string | undefined;
|
|
67
|
+
edit: (from: string, to: string) => GraphEdit;
|
|
68
|
+
/** The name a form draft gives the job. */
|
|
69
|
+
from: (draft: GraphEdit | null) => string | undefined;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
type FormHost = Required<Pick<SettingsFormHooks, 'renderShell' | 'onDraft' | 'pending'>>;
|
|
73
|
+
/** A dialog's settings in a form or as YAML, with the edits carried across a switch. */
|
|
74
|
+
export declare function useSettingsViews(o: SettingsViewsOptions): {
|
|
75
|
+
start: string | undefined;
|
|
76
|
+
yaml: string | null;
|
|
77
|
+
name: string;
|
|
78
|
+
version: number;
|
|
79
|
+
current: Record<string, unknown> | null;
|
|
80
|
+
yamlDialog: (title: string, path: string, text: string) => import("react").JSX.Element;
|
|
81
|
+
formDialog: (render: (host: FormHost) => ReactNode) => import("react").JSX.Element;
|
|
82
|
+
};
|
|
83
|
+
/** A job's settings in a form, or as YAML; switching carries the edits across. */
|
|
84
|
+
export declare function JobDialog(props: JobDialogProps & ViewProps): import("react").JSX.Element;
|
|
85
|
+
/** A step's settings in a form, or as YAML; switching carries the edits across. */
|
|
86
|
+
export declare function StepDialog(props: StepDialogProps & ViewProps): import("react").JSX.Element;
|
|
87
|
+
export {};
|