@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/dist/safeUrl.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/safeUrl.ts
|
|
2
|
+
var SAFE_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
3
|
+
"http:",
|
|
4
|
+
"https:",
|
|
5
|
+
"blob:"
|
|
6
|
+
]);
|
|
7
|
+
/**
|
|
8
|
+
* Returns url when following it cannot run script in the app's origin: a
|
|
9
|
+
* relative path or an http, https or blob URL. Hosts and servers supply these
|
|
10
|
+
* URLs, so a javascript: URL from either would otherwise run when clicked.
|
|
11
|
+
*/
|
|
12
|
+
function safeUrl(url) {
|
|
13
|
+
if (!url) return;
|
|
14
|
+
try {
|
|
15
|
+
const { protocol } = new URL(url, "https://relative.invalid");
|
|
16
|
+
return SAFE_PROTOCOLS.has(protocol) ? url : void 0;
|
|
17
|
+
} catch {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { safeUrl };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "React UI components: a theme contract, icons, primitives, lists, forms, a job graph, a code editor, a log viewer, a file explorer and an AI chat, each on its own subpath",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
],
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"formik": "^2.4.9",
|
|
79
|
-
"monaco-editor": "^0.
|
|
80
|
-
"monaco-yaml": "^5.5.1",
|
|
79
|
+
"monaco-editor": "^0.57.0",
|
|
81
80
|
"react": "^19.0.0",
|
|
82
81
|
"react-dom": "^19.0.0"
|
|
83
82
|
},
|
|
@@ -123,23 +122,22 @@
|
|
|
123
122
|
"@vitejs/plugin-react": "^6.0.2",
|
|
124
123
|
"formik": "^2.4.9",
|
|
125
124
|
"jsdom": "^26.1.0",
|
|
126
|
-
"monaco-editor": "^0.
|
|
127
|
-
"
|
|
125
|
+
"monaco-editor": "^0.57.0",
|
|
126
|
+
"path-browserify": "^1.0.1",
|
|
128
127
|
"publint": "^0.3.14",
|
|
129
128
|
"react": "19.3.0",
|
|
130
129
|
"react-dom": "19.3.0",
|
|
131
130
|
"storybook": "10.5.8",
|
|
132
131
|
"tailwindcss": "^4.3.0",
|
|
133
132
|
"typescript": "^7.0.0",
|
|
133
|
+
"url": "^0.11.4",
|
|
134
134
|
"vite": "^8.0.16",
|
|
135
|
-
"vitest": "^4.1.8"
|
|
135
|
+
"vitest": "^4.1.8",
|
|
136
|
+
"yaml-language-server": "^1.24.0"
|
|
136
137
|
},
|
|
137
138
|
"peerDependenciesMeta": {
|
|
138
139
|
"monaco-editor": {
|
|
139
140
|
"optional": true
|
|
140
|
-
},
|
|
141
|
-
"monaco-yaml": {
|
|
142
|
-
"optional": true
|
|
143
141
|
}
|
|
144
142
|
},
|
|
145
143
|
"scripts": {
|