@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.
@@ -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.19.1",
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.55.1",
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.55.1",
127
- "monaco-yaml": "^5.5.1",
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": {