@parallelworks/ui 0.2.0 → 0.3.1

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 (62) hide show
  1. package/README.md +5 -0
  2. package/dist/chunks/CodePreviewEditor-CSPRILMp.js +61 -0
  3. package/dist/chunks/Indicator-hBSIxOPK.js +39 -0
  4. package/dist/chunks/Markdown-C5Re2ezs.js +101 -0
  5. package/dist/chunks/{Indicator-fF8AVbjQ.js → Modal-sOUEwebV.js} +1 -38
  6. package/dist/chunks/{Monaco-CP_cL9gp.js → Monaco-CC4ak1JG.js} +3 -31
  7. package/dist/chunks/Provider-DvVvScTQ.js +391 -0
  8. package/dist/chunks/StatusBadge-DXp4zkSd.js +46 -0
  9. package/dist/chunks/{Table-DWuRINhu.js → SwitchToggle-2uRw8ZeJ.js} +2 -132
  10. package/dist/chunks/Table-C5z6qWjM.js +91 -0
  11. package/dist/chunks/editor-D55tumuZ.js +372 -0
  12. package/dist/chunks/list-7PyDF1tz.js +465 -0
  13. package/dist/components/Provider.d.ts +293 -0
  14. package/dist/editor/index.d.ts +1 -0
  15. package/dist/editor/index.js +2 -219
  16. package/dist/editor/useCssIsDark.d.ts +6 -0
  17. package/dist/file-explorer/FileExplorer.d.ts +23 -0
  18. package/dist/file-explorer/FileExplorerContext.d.ts +17 -0
  19. package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +6 -0
  20. package/dist/file-explorer/FilePreview/Inline.d.ts +13 -0
  21. package/dist/file-explorer/FilePreview/StreamedBadge.d.ts +1 -0
  22. package/dist/file-explorer/FilePreview/Viewer.d.ts +15 -0
  23. package/dist/file-explorer/FilePreview/index.d.ts +15 -0
  24. package/dist/file-explorer/FilePreview/parse.d.ts +24 -0
  25. package/dist/file-explorer/FilePreview/previewCache.d.ts +26 -0
  26. package/dist/file-explorer/FilePreview/previewType.d.ts +21 -0
  27. package/dist/file-explorer/FilePreview/readCappedBytes.d.ts +37 -0
  28. package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +16 -0
  29. package/dist/file-explorer/FilePreview/useObjectText.d.ts +23 -0
  30. package/dist/file-explorer/FilePreview/usePresignedUrl.d.ts +12 -0
  31. package/dist/file-explorer/FileRow.d.ts +35 -0
  32. package/dist/file-explorer/FileRowsWindow.d.ts +43 -0
  33. package/dist/file-explorer/FileTable.d.ts +26 -0
  34. package/dist/file-explorer/FileTableHeaders.d.ts +13 -0
  35. package/dist/file-explorer/LoadMoreRow.d.ts +15 -0
  36. package/dist/file-explorer/TreeView.d.ts +28 -0
  37. package/dist/file-explorer/helpers.d.ts +47 -0
  38. package/dist/file-explorer/index.d.ts +10 -0
  39. package/dist/file-explorer/index.js +5646 -0
  40. package/dist/file-explorer/lib/batch.d.ts +3 -0
  41. package/dist/file-explorer/lib/errors.d.ts +3 -0
  42. package/dist/file-explorer/lib/fileExplorer.d.ts +32 -0
  43. package/dist/file-explorer/lib/paging.d.ts +93 -0
  44. package/dist/file-explorer/lib/types.d.ts +92 -0
  45. package/dist/file-explorer/lib/utils.d.ts +37 -0
  46. package/dist/file-explorer/toasts.d.ts +9 -0
  47. package/dist/file-explorer/treeRows.d.ts +35 -0
  48. package/dist/file-explorer/useNearEnd.d.ts +7 -0
  49. package/dist/form/index.js +4 -2
  50. package/dist/index.d.ts +1 -1
  51. package/dist/index.js +9 -101
  52. package/dist/list/ListTable.d.ts +63 -0
  53. package/dist/list/RowContextMenu.d.ts +113 -0
  54. package/dist/list/index.d.ts +2 -0
  55. package/dist/list/index.js +2 -0
  56. package/dist/logviewer/index.js +1 -1
  57. package/dist/styles/theme.css +30 -0
  58. package/dist/styles.css +1 -1
  59. package/dist/workflow/index.js +3 -2
  60. package/package.json +20 -3
  61. package/dist/chunks/Provider-C2VtPnh5.js +0 -151
  62. package/dist/chunks/workers-Cjfjb8E7.js +0 -119
@@ -1,119 +0,0 @@
1
- //#region src/editor/themes.ts
2
- function expandShorthandHex(color) {
3
- return /^#([0-9a-fA-F]{3,4})$/.test(color) ? "#" + color.slice(1).split("").map((c) => c + c).join("") : color;
4
- }
5
- function normalizeThemeColors(colors) {
6
- return Object.fromEntries(Object.entries(colors).map(([key, value]) => [key, expandShorthandHex(value)]));
7
- }
8
- function themeVar(name, fallback) {
9
- if (typeof window === "undefined") return fallback;
10
- return getComputedStyle(document.documentElement).getPropertyValue(name).trim() || fallback;
11
- }
12
- function createEditorThemes() {
13
- const dark = {
14
- foreground: themeVar("--theme-app", "#e6edf3"),
15
- background: themeVar("--theme-panel-bg", "#161b22"),
16
- border: themeVar("--theme-border", "#30363d"),
17
- lineHighlight: themeVar("--theme-muted-panel-bg", "#21262d"),
18
- lineNumber: themeVar("--theme-muted-text-color", "#8b949e"),
19
- selection: themeVar("--theme-element", "#2f81f7"),
20
- selectionFg: themeVar("--theme-element-text", "#ffffff"),
21
- disabledBg: themeVar("--theme-input-disabled-bg", "#1c2128"),
22
- disabledFg: themeVar("--theme-muted-text-color", "#8b949e")
23
- };
24
- const light = {
25
- disabledBg: themeVar("--theme-input-disabled-bg", "#f3f4f6"),
26
- disabledFg: themeVar("--theme-muted-text-color", "#6c757d"),
27
- border: themeVar("--theme-border", "#d1d5db"),
28
- selection: themeVar("--theme-element", "#2f81f7"),
29
- selectionFg: themeVar("--theme-element-text", "#ffffff")
30
- };
31
- return {
32
- "app-dark": {
33
- base: "vs-dark",
34
- inherit: true,
35
- rules: [],
36
- colors: {
37
- "editor.foreground": dark.foreground,
38
- "editor.background": dark.background,
39
- "editor.border": dark.border,
40
- "editorCursor.foreground": dark.foreground,
41
- "editor.lineHighlightBackground": dark.lineHighlight,
42
- "editorLineNumber.foreground": dark.lineNumber,
43
- "editor.selectionBackground": dark.selection,
44
- "editor.selectionForeground": dark.selectionFg
45
- }
46
- },
47
- "app-dark-disabled": {
48
- base: "vs-dark",
49
- inherit: true,
50
- rules: [],
51
- colors: {
52
- "editor.foreground": dark.disabledFg,
53
- "editor.background": dark.disabledBg,
54
- "editor.border": dark.border,
55
- "editorCursor.foreground": "transparent",
56
- "editor.lineHighlightBackground": dark.disabledBg,
57
- "editorLineNumber.foreground": dark.disabledFg,
58
- "editor.selectionBackground": dark.selection,
59
- "editor.selectionForeground": dark.selectionFg
60
- }
61
- },
62
- "app-light-disabled": {
63
- base: "vs",
64
- inherit: true,
65
- rules: [],
66
- colors: {
67
- "editor.foreground": light.disabledFg,
68
- "editor.background": light.disabledBg,
69
- "editor.border": light.border,
70
- "editorCursor.foreground": "transparent",
71
- "editor.lineHighlightBackground": light.disabledBg,
72
- "editorLineNumber.foreground": light.disabledFg,
73
- "editor.selectionBackground": light.selection,
74
- "editor.selectionForeground": light.selectionFg
75
- }
76
- }
77
- };
78
- }
79
- function defineEditorThemes(monacoEditor) {
80
- const themes = createEditorThemes();
81
- for (const [name, themeData] of Object.entries(themes)) monacoEditor.defineTheme(name, {
82
- ...themeData,
83
- colors: normalizeThemeColors(themeData.colors)
84
- });
85
- }
86
- function getThemeName(isDark, disabled) {
87
- if (isDark) return disabled ? "app-dark-disabled" : "app-dark";
88
- return disabled ? "app-light-disabled" : "vs";
89
- }
90
- //#endregion
91
- //#region src/editor/workers.ts
92
- var monacoEnvironment = { getWorker(_moduleId, label) {
93
- if (label === "json") return new Worker(new URL(
94
- /* @vite-ignore */
95
- "/assets/json.worker-8ytS02vz.js",
96
- "" + import.meta.url
97
- ), { type: "module" });
98
- if (label === "yaml") return new Worker(new URL(
99
- /* @vite-ignore */
100
- "/assets/yaml.worker-DJC-VUcv.js",
101
- "" + import.meta.url
102
- ), { type: "module" });
103
- return new Worker(new URL(
104
- /* @vite-ignore */
105
- "/assets/editor.worker-CuBRIwi-.js",
106
- "" + import.meta.url
107
- ), { type: "module" });
108
- } };
109
- /**
110
- * Points window.MonacoEnvironment at the bundled workers. Idempotent, and a
111
- * host that already configured its own MonacoEnvironment wins — the editor
112
- * calls this on first load only when nothing is configured.
113
- */
114
- function setupMonacoWorkers() {
115
- if (window.MonacoEnvironment) return;
116
- window.MonacoEnvironment = monacoEnvironment;
117
- }
118
- //#endregion
119
- export { defineEditorThemes as n, getThemeName as r, setupMonacoWorkers as t };