@parallelworks/ui 0.52.0 → 0.53.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.
Files changed (55) hide show
  1. package/README.md +42 -3
  2. package/dist/ai/ai.css +5 -3
  3. package/dist/ai/components/agent/AgentMessageParts.js +1 -1
  4. package/dist/ai/strings.js +0 -1
  5. package/dist/ai/ui/sidebar.js +1 -1
  6. package/dist/components/Field.d.ts +5 -4
  7. package/dist/components/Field.js +27 -4
  8. package/dist/components/InfoTip.d.ts +12 -4
  9. package/dist/components/InfoTip.js +13 -3
  10. package/dist/components/MarkdownImpl.d.ts +1 -0
  11. package/dist/components/MarkdownImpl.js +1 -0
  12. package/dist/components/Popover.d.ts +4 -1
  13. package/dist/components/Popover.js +2 -1
  14. package/dist/components/Provider.d.ts +2 -0
  15. package/dist/components/Provider.js +1 -0
  16. package/dist/components/focus.d.ts +5 -0
  17. package/dist/components/focus.js +21 -1
  18. package/dist/editor/Editor.js +13 -3
  19. package/dist/editor/Monaco.d.ts +8 -1
  20. package/dist/editor/Monaco.js +16 -3
  21. package/dist/editor/editorModel.d.ts +1 -1
  22. package/dist/editor/editorModel.js +1 -1
  23. package/dist/editor/index.d.ts +1 -0
  24. package/dist/editor/index.js +2 -1
  25. package/dist/editor/languages.d.ts +24 -0
  26. package/dist/editor/languages.js +31 -0
  27. package/dist/editor/monacoFeatures.d.ts +7 -0
  28. package/dist/editor/monacoFeatures.js +19 -0
  29. package/dist/editor/themes.js +7 -2
  30. package/dist/editor/workers.d.ts +3 -3
  31. package/dist/editor/workers.js +8 -4
  32. package/dist/editor/yamlLanguage.js +55 -38
  33. package/dist/file-explorer/FileExplorer.d.ts +18 -4
  34. package/dist/file-explorer/FileExplorer.js +62 -19
  35. package/dist/file-explorer/FilePreview/Viewer.js +12 -8
  36. package/dist/file-explorer/FileRow.d.ts +6 -2
  37. package/dist/file-explorer/FileRow.js +35 -17
  38. package/dist/file-explorer/FileRowsWindow.d.ts +2 -1
  39. package/dist/file-explorer/FileRowsWindow.js +2 -1
  40. package/dist/file-explorer/FileTable.d.ts +3 -1
  41. package/dist/file-explorer/FileTable.js +3 -2
  42. package/dist/file-explorer/TreeView.d.ts +5 -1
  43. package/dist/file-explorer/TreeView.js +49 -25
  44. package/dist/file-explorer/helpers.js +3 -3
  45. package/dist/file-explorer/lib/utils.d.ts +3 -0
  46. package/dist/file-explorer/lib/utils.js +6 -1
  47. package/dist/form/Wizard/utils.js +2 -1
  48. package/dist/list/ActionToolbar.js +3 -2
  49. package/dist/list/ListPage.js +1 -1
  50. package/dist/list/ListTable.d.ts +5 -0
  51. package/dist/list/ListTable.js +6 -2
  52. package/dist/styles.css +1 -1
  53. package/package.json +5 -2
  54. package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +0 -6
  55. package/dist/file-explorer/FilePreview/CodePreviewEditor.js +0 -64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallelworks/ui",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "description": "React UI components: a theme contract, icons, brand logos, 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": {
@@ -10,7 +10,9 @@
10
10
  },
11
11
  "type": "module",
12
12
  "sideEffects": [
13
- "**/*.css"
13
+ "**/*.css",
14
+ "./src/editor/monacoFeatures.ts",
15
+ "./dist/editor/monacoFeatures.js"
14
16
  ],
15
17
  "exports": {
16
18
  ".": {
@@ -96,6 +98,7 @@
96
98
  "clsx": "^2.1.1",
97
99
  "css-tree": "^3.2.1",
98
100
  "dequal": "^2.0.3",
101
+ "katex": "^0.16.27",
99
102
  "lucide-react": "1.52.0",
100
103
  "luxon": "^3.7.2",
101
104
  "react-zoom-pan-pinch": "^4.2.0",
@@ -1,6 +0,0 @@
1
- interface CodePreviewEditorProps {
2
- value: string;
3
- language: string;
4
- }
5
- export default function CodePreviewEditor({ value, language }: CodePreviewEditorProps): import("react").JSX.Element;
6
- export {};
@@ -1,64 +0,0 @@
1
- import { useCssIsDark } from "../../components/useCssIsDark.js";
2
- import { defineEditorThemes, followThemeTokens, getThemeName } from "../../editor/themes.js";
3
- import { setupMonacoWorkers } from "../../editor/workers.js";
4
- import { jsx } from "react/jsx-runtime";
5
- import { useEffect, useRef } from "react";
6
- import * as monaco from "monaco-editor";
7
- //#region src/file-explorer/FilePreview/CodePreviewEditor.tsx
8
- var OPTIONS = {
9
- readOnly: true,
10
- domReadOnly: true,
11
- automaticLayout: true,
12
- minimap: { enabled: false },
13
- scrollBeyondLastLine: false,
14
- renderLineHighlight: "none",
15
- overviewRulerLanes: 0,
16
- hideCursorInOverviewRuler: true,
17
- lineNumbers: "on",
18
- wordWrap: "off",
19
- fontSize: 12,
20
- scrollbar: { alwaysConsumeMouseWheel: false }
21
- };
22
- setupMonacoWorkers();
23
- function CodePreviewEditor({ value, language }) {
24
- const isDark = useCssIsDark();
25
- const editorRef = useRef(null);
26
- useEffect(() => {
27
- return () => {
28
- editorRef.current?.getModel()?.dispose();
29
- editorRef.current?.dispose();
30
- editorRef.current = null;
31
- };
32
- }, []);
33
- useEffect(() => {
34
- const model = editorRef.current?.getModel();
35
- if (model && model.getValue() !== value) model.setValue(value);
36
- }, [value]);
37
- useEffect(() => {
38
- const model = editorRef.current?.getModel();
39
- if (model) monaco.editor.setModelLanguage(model, language);
40
- }, [language]);
41
- useEffect(() => {
42
- if (editorRef.current) {
43
- defineEditorThemes(monaco.editor);
44
- monaco.editor.setTheme(getThemeName(isDark));
45
- }
46
- return followThemeTokens(monaco.editor, () => getThemeName(isDark));
47
- }, [isDark]);
48
- return /* @__PURE__ */ jsx("div", {
49
- className: "h-full w-full",
50
- ref: (container) => {
51
- if (container && !editorRef.current) {
52
- defineEditorThemes(monaco.editor);
53
- const model = monaco.editor.createModel(value, language);
54
- editorRef.current = monaco.editor.create(container, {
55
- ...OPTIONS,
56
- model
57
- });
58
- monaco.editor.setTheme(getThemeName(isDark));
59
- }
60
- }
61
- });
62
- }
63
- //#endregion
64
- export { CodePreviewEditor as default };