@parallelworks/ui 0.17.0 → 0.19.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 +86 -6
- package/dist/ai/adapter/memoryStore.d.ts +8 -0
- package/dist/ai/adapter/mock/index.d.ts +2 -0
- package/dist/ai/adapter/mock/index.js +81 -0
- package/dist/ai/adapter/mock/mockAdapter.d.ts +4 -0
- package/dist/ai/adapter/openai/createOpenAIStream.d.ts +9 -0
- package/dist/ai/adapter/openai/errors.d.ts +3 -0
- package/dist/ai/adapter/openai/index.d.ts +6 -0
- package/dist/ai/adapter/openai/index.js +334 -0
- package/dist/ai/adapter/openai/openaiAdapter.d.ts +9 -0
- package/dist/ai/adapter/openai/responses.d.ts +4 -0
- package/dist/ai/adapter/openai/sse.d.ts +24 -0
- package/dist/ai/adapter/openai/wire.d.ts +40 -0
- package/dist/ai/adapter/types.d.ts +131 -0
- package/dist/ai/agent/classifier.d.ts +2 -0
- package/dist/ai/agent/diff.d.ts +35 -0
- package/dist/ai/agent/diffHighlight.d.ts +6 -0
- package/dist/ai/agent/index.d.ts +6 -0
- package/dist/ai/agent/permissions.d.ts +11 -0
- package/dist/ai/agent/toolfmt.d.ts +18 -0
- package/dist/ai/agent/transcript.d.ts +38 -0
- package/dist/ai/ai.css +325 -0
- package/dist/ai/components/AllocationSelector.d.ts +4 -0
- package/dist/ai/components/AttachmentManager.d.ts +1 -0
- package/dist/ai/components/AttachmentUpload.d.ts +24 -0
- package/dist/ai/components/BlockedGroupBanner.d.ts +1 -0
- package/dist/ai/components/BranchNavigator.d.ts +8 -0
- package/dist/ai/components/ChatEmptyState.d.ts +3 -0
- package/dist/ai/components/ChatInput.d.ts +45 -0
- package/dist/ai/components/ChatLayout.d.ts +5 -0
- package/dist/ai/components/ChatMessage.d.ts +24 -0
- package/dist/ai/components/ChatMessageList.d.ts +35 -0
- package/dist/ai/components/ChatSidebar.d.ts +5 -0
- package/dist/ai/components/ChatThread.d.ts +3 -0
- package/dist/ai/components/ComposerChrome.d.ts +18 -0
- package/dist/ai/components/ComposerFrame.d.ts +16 -0
- package/dist/ai/components/DragOverlay.d.ts +5 -0
- package/dist/ai/components/ModelSelector.d.ts +6 -0
- package/dist/ai/components/ShareDialog.d.ts +11 -0
- package/dist/ai/components/SlashMenu.d.ts +28 -0
- package/dist/ai/components/agent/ActivityLine.d.ts +21 -0
- package/dist/ai/components/agent/AgentMessageParts.d.ts +54 -0
- package/dist/ai/components/agent/PermissionPicker.d.ts +11 -0
- package/dist/ai/components/attachmentKeys.d.ts +4 -0
- package/dist/ai/core/ChatProvider.d.ts +66 -0
- package/dist/ai/core/KeyboardShortcutsProvider.d.ts +5 -0
- package/dist/ai/core/chatReducer.d.ts +114 -0
- package/dist/ai/core/config.d.ts +47 -0
- package/dist/ai/core/events.d.ts +1 -0
- package/dist/ai/core/exportConversation.d.ts +4 -0
- package/dist/ai/core/greeting.d.ts +3 -0
- package/dist/ai/core/parts.d.ts +11 -0
- package/dist/ai/core/useDragDrop.d.ts +14 -0
- package/dist/ai/core/useKeyboardShortcuts.d.ts +12 -0
- package/dist/ai/core/useSSEStream.d.ts +34 -0
- package/dist/ai/index.d.ts +40 -0
- package/dist/ai/index.js +6645 -0
- package/dist/ai/strings.d.ts +167 -0
- package/dist/ai/types.d.ts +236 -0
- package/dist/ai/ui/Avatar.d.ts +8 -0
- package/dist/ai/ui/Dropdown.d.ts +31 -0
- package/dist/ai/ui/Markdown.d.ts +8 -0
- package/dist/ai/ui/Notice.d.ts +21 -0
- package/dist/ai/ui/buttons.d.ts +1 -0
- package/dist/ai/ui/codeBreaks.d.ts +16 -0
- package/dist/ai/ui/prose.d.ts +1 -0
- package/dist/ai/ui/sidebar.d.ts +81 -0
- package/dist/ai/utils.d.ts +4 -0
- package/dist/assets/{editor.worker-CuBRIwi-.js → editor.worker-BmHUIVG4.js} +194 -163
- package/dist/assets/{json.worker-8ytS02vz.js → json.worker-D8bJ92nw.js} +384 -338
- package/dist/assets/{yaml.worker-DJC-VUcv.js → yaml.worker-C4gyGAko.js} +15657 -13823
- package/dist/chunks/{CodePreviewEditor-UAtnpmOV.js → CodePreviewEditor-YqQBz1YL.js} +2 -2
- package/dist/chunks/ConfirmModal-aOR4O1QE.js +79 -0
- package/dist/chunks/{lib-CUTRDpa6.js → FieldWrapper-Cszwg-4B.js} +52 -55
- package/dist/chunks/{CreateModal-BbV5cTj7.js → Markdown-CM-FenNE.js} +25 -97
- package/dist/chunks/Monaco-DJ8MW-Dq.js +110 -0
- package/dist/chunks/{PageHeader-MxuOs9cH.js → PageHeader-0kG_iypP.js} +170 -105
- package/dist/chunks/{Provider-DHmZ3v9i.js → Provider-CDYurraE.js} +60 -24
- package/dist/chunks/{SwitchToggle-BRQoEwLZ.js → SwitchToggle-DShNdcao.js} +143 -140
- package/dist/chunks/{Table-C6JdFFiJ.js → Table-DU2MW8xz.js} +6 -4
- package/dist/chunks/{Tooltip-n9w7Tkt1.js → Tooltip-K5HJr4_p.js} +32 -5
- package/dist/chunks/duration-BOv8Phl8.js +17 -0
- package/dist/chunks/{editor-mNznodJN.js → editor-Dk1rbV75.js} +33 -19
- package/dist/chunks/focus-D_iZJTW1.js +7 -0
- package/dist/chunks/{list-7k0eaI5N.js → list-CJm875m7.js} +497 -379
- package/dist/chunks/logviewer-BTKuQWzw.js +828 -0
- package/dist/chunks/memoryStore-CC91S5LP.js +152 -0
- package/dist/chunks/types-Yy0NrerF.js +11 -0
- package/dist/components/AddMenu.d.ts +1 -0
- package/dist/components/Avatar.d.ts +13 -0
- package/dist/components/Breadcrumbs.d.ts +1 -1
- package/dist/components/Dropdown.d.ts +3 -1
- package/dist/components/EmptyState.d.ts +1 -1
- package/dist/components/Indicator.d.ts +2 -2
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/LetterBadge.d.ts +1 -1
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/Provider.d.ts +18 -65
- package/dist/components/SettingRow.d.ts +1 -1
- package/dist/components/SettingsGroup.d.ts +1 -1
- package/dist/components/focus.d.ts +2 -0
- package/dist/components/keys.d.ts +12 -0
- package/dist/duration.d.ts +3 -0
- package/dist/editor/Monaco.d.ts +1 -20
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/index.js +2 -2
- package/dist/editor/yaml.d.ts +5 -0
- package/dist/engine.d.ts +98 -0
- package/dist/file-explorer/FileExplorer.d.ts +11 -2
- package/dist/file-explorer/FileExplorerContext.d.ts +1 -1
- package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +1 -1
- package/dist/file-explorer/FilePreview/previewType.d.ts +1 -1
- package/dist/file-explorer/FileRow.d.ts +1 -1
- package/dist/file-explorer/helpers.d.ts +4 -4
- package/dist/file-explorer/index.d.ts +3 -3
- package/dist/file-explorer/index.js +632 -665
- package/dist/file-explorer/lib/types.d.ts +6 -1
- package/dist/file-explorer/lib/utils.d.ts +1 -3
- package/dist/file-explorer/useNearEnd.d.ts +1 -1
- package/dist/form/FieldWrapper.d.ts +2 -1
- package/dist/form/Fields/ResourceOptionIcon.d.ts +1 -1
- package/dist/form/Form.d.ts +7 -22
- package/dist/form/index.d.ts +11 -12
- package/dist/form/index.js +1333 -1454
- package/dist/form/lib.d.ts +6 -1
- package/dist/form/types/fieldComponentTypes.d.ts +4 -2
- package/dist/form/types/fieldTypes.d.ts +6 -20
- package/dist/form/useParsedOpts.d.ts +2 -2
- package/dist/form/utils/{slurmDuration.d.ts → duration.d.ts} +2 -2
- package/dist/{workflow → graph}/MatrixGroup.d.ts +2 -2
- package/dist/{workflow → graph}/index.d.ts +1 -1
- package/dist/{workflow → graph}/index.js +220 -185
- package/dist/{workflow → graph}/types.d.ts +3 -3
- package/dist/icons.d.ts +20 -21
- package/dist/icons.js +3 -3
- package/dist/index.d.ts +38 -39
- package/dist/index.js +355 -354
- package/dist/list/ListTable.d.ts +1 -1
- package/dist/list/ListViewControls.d.ts +2 -2
- package/dist/list/RowContextMenu.d.ts +9 -9
- package/dist/list/UserHoverCard.d.ts +45 -0
- package/dist/list/index.d.ts +9 -8
- package/dist/list/index.js +3 -3
- package/dist/logviewer/LogViewer.d.ts +1 -1
- package/dist/logviewer/index.d.ts +1 -0
- package/dist/logviewer/index.js +2 -742
- package/dist/logviewer/segments.d.ts +9 -0
- package/dist/styles/Geist-Variable.woff2 +0 -0
- package/dist/styles/GeistMono-Variable.woff2 +0 -0
- package/dist/styles/base.css +57 -0
- package/dist/styles/fonts.css +15 -0
- package/dist/styles/theme.css +9 -41
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +2 -2
- package/package.json +45 -20
- package/LICENSE +0 -21
- package/dist/chunks/Monaco-DVyIpyv4.js +0 -1046
- package/dist/editor/usesGitlab.d.ts +0 -97
- package/dist/form/Fields/BucketReadOnlyField.d.ts +0 -7
- package/dist/form/types/workflow-schema.d.ts +0 -1145
- package/dist/form/utils/pwResolver.d.ts +0 -18
- package/dist/chunks/{BareModal-BqroLbZ5.js → BareModal-BtRiQezg.js} +1 -1
- package/dist/chunks/{MarkdownImpl-Bq4QhrtA.js → MarkdownImpl-CyeTVvSt.js} +1 -1
- /package/dist/{workflow → graph}/AnnotationBanner.d.ts +0 -0
- /package/dist/{workflow → graph}/Collapse.d.ts +0 -0
- /package/dist/{workflow → graph}/DependencyGraph.d.ts +0 -0
- /package/dist/{workflow → graph}/JobSummary.d.ts +0 -0
- /package/dist/{workflow → graph}/Reveal.d.ts +0 -0
- /package/dist/{workflow → graph}/TreeView.d.ts +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import { d as useWorkflowEngine, i as useNotify, u as useStrings } from "./Provider-CDYurraE.js";
|
|
1
2
|
import { CheckIcon, CopyIcon, EyeIcon, EyeOffIcon } from "../icons.js";
|
|
2
|
-
import { i as useNotify, u as useStrings } from "./Provider-DHmZ3v9i.js";
|
|
3
3
|
import { t as Loader } from "./Loader-BXoXTZGc.js";
|
|
4
4
|
import { t as SwitchToggleSmall } from "./SwitchToggleSmall-FcsaYSTs.js";
|
|
5
|
-
import {
|
|
5
|
+
import { i as impureSetValueFromPath, r as flattenGroups, t as FieldWrapper } from "./FieldWrapper-Cszwg-4B.js";
|
|
6
6
|
import cx from "classnames";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { Suspense, lazy, useId, useMemo, useRef, useState } from "react";
|
|
9
|
-
import {
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { useField, useFormikContext } from "formik";
|
|
11
10
|
//#region src/editor/Editor.tsx
|
|
12
|
-
var MonacoEditor = lazy(() => import("./Monaco-
|
|
11
|
+
var MonacoEditor = lazy(() => import("./Monaco-DJ8MW-Dq.js"));
|
|
13
12
|
function Editor({ ...props }) {
|
|
14
13
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
15
14
|
fallback: /* @__PURE__ */ jsx(Loader, { text: "Loading editor..." }),
|
|
@@ -65,16 +64,16 @@ function EditorField(props) {
|
|
|
65
64
|
//#endregion
|
|
66
65
|
//#region src/editor/FormCodePanel.tsx
|
|
67
66
|
var isObject = (value) => typeof value === "object" && value !== null;
|
|
68
|
-
var shouldIgnoreField = (fieldSchema, inputs, arrayIndex) => {
|
|
67
|
+
var shouldIgnoreField = (engine, fieldSchema, inputs, arrayIndex) => {
|
|
69
68
|
if (!fieldSchema?.["ignore"] || !fieldSchema?.["hidden"]) return false;
|
|
70
|
-
if (!
|
|
71
|
-
return
|
|
69
|
+
if (!engine.isReady()) return false;
|
|
70
|
+
return engine.evaluate({
|
|
72
71
|
inputs,
|
|
73
|
-
obj:
|
|
72
|
+
obj: engine.convertInputs(fieldSchema),
|
|
74
73
|
index: arrayIndex ?? -1
|
|
75
74
|
})["hidden"] === true;
|
|
76
75
|
};
|
|
77
|
-
var filterFields = (formJSON, data, prefix, rootData, arrayIndex) => {
|
|
76
|
+
var filterFields = (engine, formJSON, data, prefix, rootData, arrayIndex) => {
|
|
78
77
|
const filteredFields = [];
|
|
79
78
|
return {
|
|
80
79
|
filteredFields,
|
|
@@ -91,7 +90,7 @@ var filterFields = (formJSON, data, prefix, rootData, arrayIndex) => {
|
|
|
91
90
|
let filteredNested = {};
|
|
92
91
|
const item = value[i];
|
|
93
92
|
if (isObject(item)) {
|
|
94
|
-
const result = filterFields(isObject(nestedSchema) ? nestedSchema : {}, item, key + `[${i}].`, rootData || data, i);
|
|
93
|
+
const result = filterFields(engine, isObject(nestedSchema) ? nestedSchema : {}, item, key + `[${i}].`, rootData || data, i);
|
|
95
94
|
filteredNested = result.filtered;
|
|
96
95
|
filteredFieldsNested = result.filteredFields;
|
|
97
96
|
} else filteredNested = item;
|
|
@@ -101,7 +100,7 @@ var filterFields = (formJSON, data, prefix, rootData, arrayIndex) => {
|
|
|
101
100
|
return acc;
|
|
102
101
|
}
|
|
103
102
|
if (fieldSchema && isObject(value)) {
|
|
104
|
-
const { filteredFields: filteredFieldsNested, filtered: filteredNested } = filterFields(isObject(fieldSchema) ? fieldSchema : {}, value, key + ".", rootData || data, arrayIndex);
|
|
103
|
+
const { filteredFields: filteredFieldsNested, filtered: filteredNested } = filterFields(engine, isObject(fieldSchema) ? fieldSchema : {}, value, key + ".", rootData || data, arrayIndex);
|
|
105
104
|
filteredFields.push(...filteredFieldsNested);
|
|
106
105
|
acc[key] = filteredNested;
|
|
107
106
|
return acc;
|
|
@@ -115,7 +114,7 @@ var filterFields = (formJSON, data, prefix, rootData, arrayIndex) => {
|
|
|
115
114
|
return acc;
|
|
116
115
|
}
|
|
117
116
|
const contextData = rootData || data;
|
|
118
|
-
if (isObject(fieldSchema) && shouldIgnoreField(fieldSchema, contextData, arrayIndex)) return acc;
|
|
117
|
+
if (isObject(fieldSchema) && shouldIgnoreField(engine, fieldSchema, contextData, arrayIndex)) return acc;
|
|
119
118
|
acc[key] = value;
|
|
120
119
|
return acc;
|
|
121
120
|
}, {})
|
|
@@ -128,6 +127,7 @@ var populateFiltered = (filteredFields, data) => {
|
|
|
128
127
|
return data;
|
|
129
128
|
};
|
|
130
129
|
function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = false }) {
|
|
130
|
+
const engine = useWorkflowEngine();
|
|
131
131
|
const notify = useNotify();
|
|
132
132
|
const { common: t } = useStrings();
|
|
133
133
|
const uid = useId();
|
|
@@ -138,7 +138,7 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
|
|
|
138
138
|
const isValidJson = (errors) => {
|
|
139
139
|
setJsonHasErrors(errors.length > 0);
|
|
140
140
|
};
|
|
141
|
-
const { filteredFields, filtered } = filterFields(flattenGroups(formJSON), data || {});
|
|
141
|
+
const { filteredFields, filtered } = filterFields(engine, flattenGroups(formJSON), data || {});
|
|
142
142
|
const hasHiddenFields = filteredFields.length > 0;
|
|
143
143
|
const displayObj = showHidden && hasHiddenFields ? populateFiltered(filteredFields, structuredClone(filtered)) : filtered;
|
|
144
144
|
const showHiddenRef = useRef(showHidden);
|
|
@@ -212,7 +212,7 @@ function FormCodePanel({ formJSON, data, mutate, height = "600px", disabled = fa
|
|
|
212
212
|
if (!isObject(parsed)) return;
|
|
213
213
|
mutate(showHiddenRef.current ? parsed : populateFiltered(filteredFieldsRef.current, parsed));
|
|
214
214
|
} catch {
|
|
215
|
-
console.log("JSON.parse error in
|
|
215
|
+
console.log("JSON.parse error in form code editor");
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
218
|
language: "json",
|
|
@@ -320,17 +320,17 @@ function getThemeName(isDark, disabled) {
|
|
|
320
320
|
var monacoEnvironment = { getWorker(_moduleId, label) {
|
|
321
321
|
if (label === "json") return new Worker(new URL(
|
|
322
322
|
/* @vite-ignore */
|
|
323
|
-
"/assets/json.worker-
|
|
323
|
+
"/assets/json.worker-D8bJ92nw.js",
|
|
324
324
|
"" + import.meta.url
|
|
325
325
|
), { type: "module" });
|
|
326
326
|
if (label === "yaml") return new Worker(new URL(
|
|
327
327
|
/* @vite-ignore */
|
|
328
|
-
"/assets/yaml.worker-
|
|
328
|
+
"/assets/yaml.worker-C4gyGAko.js",
|
|
329
329
|
"" + import.meta.url
|
|
330
330
|
), { type: "module" });
|
|
331
331
|
return new Worker(new URL(
|
|
332
332
|
/* @vite-ignore */
|
|
333
|
-
"/assets/editor.worker-
|
|
333
|
+
"/assets/editor.worker-BmHUIVG4.js",
|
|
334
334
|
"" + import.meta.url
|
|
335
335
|
), { type: "module" });
|
|
336
336
|
} };
|
|
@@ -344,4 +344,18 @@ function setupMonacoWorkers() {
|
|
|
344
344
|
window.MonacoEnvironment = monacoEnvironment;
|
|
345
345
|
}
|
|
346
346
|
//#endregion
|
|
347
|
-
|
|
347
|
+
//#region src/editor/yaml.ts
|
|
348
|
+
var schemas = [];
|
|
349
|
+
var apply;
|
|
350
|
+
/** Adds JSON schemas that validate and complete YAML models whose URI matches. */
|
|
351
|
+
function configureEditorYaml(added) {
|
|
352
|
+
schemas = [...schemas, ...added];
|
|
353
|
+
apply?.(schemas);
|
|
354
|
+
}
|
|
355
|
+
/** Lets the loaded editor pick up schemas added before or after it loads. */
|
|
356
|
+
function onYamlSchemas(listener) {
|
|
357
|
+
apply = listener;
|
|
358
|
+
listener(schemas);
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
export { getThemeName as a, Editor as c, defineEditorThemes as i, onYamlSchemas as n, FormCodePanel as o, setupMonacoWorkers as r, EditorField as s, configureEditorYaml as t };
|