@parallelworks/ui 0.2.0 → 0.3.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/dist/chunks/CodePreviewEditor-CSPRILMp.js +61 -0
- package/dist/chunks/Indicator-hBSIxOPK.js +39 -0
- package/dist/chunks/Markdown-C5Re2ezs.js +101 -0
- package/dist/chunks/{Indicator-fF8AVbjQ.js → Modal-sOUEwebV.js} +1 -38
- package/dist/chunks/{Monaco-CP_cL9gp.js → Monaco-CC4ak1JG.js} +3 -31
- package/dist/chunks/Provider-DvVvScTQ.js +391 -0
- package/dist/chunks/StatusBadge-DXp4zkSd.js +46 -0
- package/dist/chunks/{Table-DWuRINhu.js → SwitchToggle-2uRw8ZeJ.js} +2 -132
- package/dist/chunks/Table-C5z6qWjM.js +91 -0
- package/dist/chunks/editor-D55tumuZ.js +372 -0
- package/dist/chunks/list-7PyDF1tz.js +465 -0
- package/dist/components/Provider.d.ts +293 -0
- package/dist/editor/index.d.ts +1 -0
- package/dist/editor/index.js +2 -219
- package/dist/editor/useCssIsDark.d.ts +6 -0
- package/dist/file-explorer/FileExplorer.d.ts +23 -0
- package/dist/file-explorer/FileExplorerContext.d.ts +17 -0
- package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +6 -0
- package/dist/file-explorer/FilePreview/Inline.d.ts +13 -0
- package/dist/file-explorer/FilePreview/StreamedBadge.d.ts +1 -0
- package/dist/file-explorer/FilePreview/Viewer.d.ts +15 -0
- package/dist/file-explorer/FilePreview/index.d.ts +15 -0
- package/dist/file-explorer/FilePreview/parse.d.ts +24 -0
- package/dist/file-explorer/FilePreview/previewCache.d.ts +26 -0
- package/dist/file-explorer/FilePreview/previewType.d.ts +21 -0
- package/dist/file-explorer/FilePreview/readCappedBytes.d.ts +37 -0
- package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +16 -0
- package/dist/file-explorer/FilePreview/useObjectText.d.ts +23 -0
- package/dist/file-explorer/FilePreview/usePresignedUrl.d.ts +12 -0
- package/dist/file-explorer/FileRow.d.ts +35 -0
- package/dist/file-explorer/FileRowsWindow.d.ts +43 -0
- package/dist/file-explorer/FileTable.d.ts +26 -0
- package/dist/file-explorer/FileTableHeaders.d.ts +13 -0
- package/dist/file-explorer/LoadMoreRow.d.ts +15 -0
- package/dist/file-explorer/TreeView.d.ts +28 -0
- package/dist/file-explorer/helpers.d.ts +47 -0
- package/dist/file-explorer/index.d.ts +10 -0
- package/dist/file-explorer/index.js +5646 -0
- package/dist/file-explorer/lib/batch.d.ts +3 -0
- package/dist/file-explorer/lib/errors.d.ts +3 -0
- package/dist/file-explorer/lib/fileExplorer.d.ts +32 -0
- package/dist/file-explorer/lib/paging.d.ts +93 -0
- package/dist/file-explorer/lib/types.d.ts +92 -0
- package/dist/file-explorer/lib/utils.d.ts +37 -0
- package/dist/file-explorer/toasts.d.ts +9 -0
- package/dist/file-explorer/treeRows.d.ts +35 -0
- package/dist/file-explorer/useNearEnd.d.ts +7 -0
- package/dist/form/index.js +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -101
- package/dist/list/ListTable.d.ts +63 -0
- package/dist/list/RowContextMenu.d.ts +113 -0
- package/dist/list/index.d.ts +2 -0
- package/dist/list/index.js +2 -0
- package/dist/logviewer/index.js +1 -1
- package/dist/styles/theme.css +30 -0
- package/dist/styles.css +1 -1
- package/dist/workflow/index.js +3 -2
- package/package.json +12 -1
- package/dist/chunks/Provider-C2VtPnh5.js +0 -151
- 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 };
|