@parallelworks/ui 0.19.1 → 0.20.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/AttachmentManager.js +4 -1
- package/dist/ai/components/ChatMessage.js +4 -1
- package/dist/ai/core/config.js +2 -1
- package/dist/assets/editor.worker-DfmPPyOL.js +60 -0
- package/dist/assets/json.worker-Dqgjpq9F.js +92 -0
- package/dist/assets/yaml.worker-DLx0whrM.js +1441 -0
- package/dist/components/Provider.js +12 -4
- package/dist/editor/Monaco.js +2 -25
- package/dist/editor/workers.d.ts +5 -0
- package/dist/editor/workers.js +14 -8
- package/dist/editor/yaml.d.ts +9 -1
- package/dist/editor/yaml.worker.d.ts +1 -0
- package/dist/editor/yamlLanguage.d.ts +6 -0
- package/dist/editor/yamlLanguage.js +312 -0
- package/dist/file-explorer/FileExplorer.js +4 -1
- package/dist/icons.d.ts +4 -4
- package/dist/icons.js +5 -5
- package/dist/list/RowContextMenu.js +2 -1
- package/dist/list/UserHoverCard.js +5 -5
- package/dist/safeUrl.d.ts +6 -0
- package/dist/safeUrl.js +22 -0
- package/package.json +7 -9
- package/dist/assets/editor.worker-BmHUIVG4.js +0 -14807
- package/dist/assets/json.worker-D8bJ92nw.js +0 -22207
- package/dist/assets/yaml.worker-C4gyGAko.js +0 -50201
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ so an application ships only what it imports:
|
|
|
11
11
|
| `./list` | list pages, tables, row menus and list controls |
|
|
12
12
|
| `./form` | `DynamicForm` and its field registry |
|
|
13
13
|
| `./graph` | job dependency graph and tree view |
|
|
14
|
-
| `./editor` | Monaco editor (`monaco-editor`
|
|
14
|
+
| `./editor` | Monaco editor (`monaco-editor` is an optional peer); YAML validation, completion and hover run in a bundled worker |
|
|
15
15
|
| `./logviewer` | log viewer with ANSI color and search |
|
|
16
16
|
| `./file-explorer` | object storage explorer over a host-supplied provider |
|
|
17
17
|
| `./ai`, `./ai/openai`, `./ai/mock` | chat interface and adapters |
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { safeUrl } from "../../safeUrl.js";
|
|
1
2
|
import { DownloadFileIcon, FileIcon, TrashIcon } from "../../icons.js";
|
|
2
3
|
import { useChatConfig } from "../core/config.js";
|
|
3
4
|
import { useChat } from "../core/ChatProvider.js";
|
|
@@ -10,8 +11,10 @@ import { DateTime } from "luxon";
|
|
|
10
11
|
import useSWRInfinite from "swr/infinite";
|
|
11
12
|
//#region src/ai/components/AttachmentManager.tsx
|
|
12
13
|
function triggerDownload(url, filename) {
|
|
14
|
+
const href = safeUrl(url);
|
|
15
|
+
if (!href) return;
|
|
13
16
|
const a = document.createElement("a");
|
|
14
|
-
a.href =
|
|
17
|
+
a.href = href;
|
|
15
18
|
a.download = filename;
|
|
16
19
|
document.body.appendChild(a);
|
|
17
20
|
a.click();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { safeUrl } from "../../safeUrl.js";
|
|
1
2
|
import { CheckIcon, ChevronRightIcon, CopyIcon, DownloadFileIcon, EditIcon, ErrorIcon, FileIcon, RefreshIcon, RetryIcon } from "../../icons.js";
|
|
2
3
|
import { durationToAbsHumanDuration } from "../../duration.js";
|
|
3
4
|
import { useChatConfig } from "../core/config.js";
|
|
@@ -23,8 +24,10 @@ function parseTimestamp(iso) {
|
|
|
23
24
|
return dt.isValid ? dt : null;
|
|
24
25
|
}
|
|
25
26
|
function triggerDownload(url, filename) {
|
|
27
|
+
const href = safeUrl(url);
|
|
28
|
+
if (!href) return;
|
|
26
29
|
const a = document.createElement("a");
|
|
27
|
-
a.href =
|
|
30
|
+
a.href = href;
|
|
28
31
|
a.download = filename;
|
|
29
32
|
document.body.appendChild(a);
|
|
30
33
|
a.click();
|
package/dist/ai/core/config.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { safeUrl } from "../../safeUrl.js";
|
|
1
2
|
import { defaultChatStrings } from "../strings.js";
|
|
2
3
|
import { createContext, useContext } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -11,7 +12,7 @@ function hrefFor(target) {
|
|
|
11
12
|
}
|
|
12
13
|
function DefaultLink({ target, className, title, onClick, children }) {
|
|
13
14
|
return /* @__PURE__ */ jsx("a", {
|
|
14
|
-
href: hrefFor(target),
|
|
15
|
+
href: safeUrl(hrefFor(target)),
|
|
15
16
|
className,
|
|
16
17
|
title,
|
|
17
18
|
onClick,
|