@gpustack/core-ui 1.0.32 → 1.0.34
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/charts.d.ts +7 -0
- package/dist/charts.es.js +859 -0
- package/dist/{useIntl-ClqxSZNY.js → classnames-1RsQ5HaB.js} +12 -35
- package/dist/{editor-wrap-BYfIcvle.js → editor-wrap-DV6LD3QO.js} +1 -1
- package/dist/{excel-reader-Bgm6Gd2H.js → excel-reader-Dm-T5v37.js} +2 -2
- package/dist/excel.es.js +1 -1
- package/dist/file-readers.es.js +3 -3
- package/dist/{highlight-code-DrKwSNa-.js → highlight-code-DFrfrxgM.js} +78 -75
- package/dist/index.css +1 -1
- package/dist/index.es.js +4979 -5859
- package/dist/lib/components/form/wrapper/index.d.ts +5 -5
- package/dist/lib/components/index.d.ts +1 -8
- package/dist/lib/components/page-container/header-slot.d.ts +14 -0
- package/dist/lib/components/page-container/index.d.ts +1 -15
- package/dist/lib/components/table/components/layout.d.ts +5 -5
- package/dist/lib-BIUIGY5e.js +2 -0
- package/dist/{mammoth-3bu5V8Au.js → mammoth-D6zSLJGM.js} +1 -1
- package/dist/markdown.es.js +8 -8
- package/dist/useCoreUIContext-_TAsecw_.js +29 -0
- package/dist/{utils-KsqXE63M.js → utils-B4OCyMbr.js} +523 -520
- package/dist/utils.es.js +4 -4
- package/dist/{word-reader-CSmNlWcx.js → word-reader-DZfu7nOd.js} +4 -4
- package/dist/yaml-editor.es.js +19 -19
- package/package.json +12 -8
- package/dist/lib-EFH8CfCi.js +0 -2
- /package/dist/{epubjs-DKV8rhQU.js → epubjs-DDuu_UAH.js} +0 -0
- /package/dist/{jszip-1lXK4oQn.js → jszip-CYj7myrF.js} +0 -0
- /package/dist/{lodash-i3XVVuwG.js → lodash-CFrt21kh.js} +0 -0
- /package/dist/{pdfjs-dist-DwiA-2_8.js → pdfjs-dist-CHJ4PZaN.js} +0 -0
- /package/dist/{xlsx-DLkyLHwb.js → xlsx-CkHo9SHP.js} +0 -0
package/dist/yaml-editor.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./editor-wrap-
|
|
1
|
+
import { n as e } from "./classnames-1RsQ5HaB.js";
|
|
2
|
+
import { t } from "./editor-wrap-DV6LD3QO.js";
|
|
3
3
|
import { forwardRef as n, useEffect as r, useImperativeHandle as i, useRef as a } from "react";
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Button as c, Typography as l, Upload as u, message as d } from "antd";
|
|
6
|
+
import { ImportOutlined as f, LoadingOutlined as p } from "@ant-design/icons";
|
|
7
7
|
import m from "styled-components";
|
|
8
8
|
import h, { loader as g } from "@monaco-editor/react";
|
|
9
9
|
import "antd/lib/upload";
|
|
@@ -12,7 +12,7 @@ import { yamlDefaults as v } from "monaco-yaml";
|
|
|
12
12
|
//#region src/lib/components/yaml-editor/editor.tsx
|
|
13
13
|
g.config({ monaco: _ });
|
|
14
14
|
var y = "inmemory://model/config.yaml", b = n((e, n) => {
|
|
15
|
-
let { value: s, height: c = 380, theme:
|
|
15
|
+
let { value: s, height: c = 380, theme: l = "vs-dark", header: u, variant: d = "borderless", schema: f, placeholder: m, onChange: g, onBlur: _, onFocus: b } = e, x = a(null), S = a(null), C = a(null), w = (e) => {
|
|
16
16
|
let t = e.Uri.parse(y);
|
|
17
17
|
v.setDiagnosticsOptions({
|
|
18
18
|
validate: !1,
|
|
@@ -21,7 +21,7 @@ var y = "inmemory://model/config.yaml", b = n((e, n) => {
|
|
|
21
21
|
schemas: [{
|
|
22
22
|
uri: "http://example.com/schema-name.json",
|
|
23
23
|
fileMatch: [t.toString()],
|
|
24
|
-
schema:
|
|
24
|
+
schema: f
|
|
25
25
|
}]
|
|
26
26
|
});
|
|
27
27
|
}, T = (e, t) => {
|
|
@@ -58,13 +58,13 @@ var y = "inmemory://model/config.yaml", b = n((e, n) => {
|
|
|
58
58
|
})), r(() => {
|
|
59
59
|
E();
|
|
60
60
|
}, [s]), /* @__PURE__ */ o(t, {
|
|
61
|
-
header:
|
|
62
|
-
variant:
|
|
61
|
+
header: u,
|
|
62
|
+
variant: d,
|
|
63
63
|
children: /* @__PURE__ */ o(h, {
|
|
64
64
|
path: y,
|
|
65
65
|
defaultPath: y,
|
|
66
66
|
height: c,
|
|
67
|
-
theme:
|
|
67
|
+
theme: l,
|
|
68
68
|
className: "monaco-editor",
|
|
69
69
|
defaultLanguage: "yaml",
|
|
70
70
|
language: "yaml",
|
|
@@ -79,13 +79,13 @@ var y = "inmemory://model/config.yaml", b = n((e, n) => {
|
|
|
79
79
|
horizontalScrollbarSize: 6
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
|
-
loading: /* @__PURE__ */ o(
|
|
82
|
+
loading: /* @__PURE__ */ o(p, { style: { fontSize: 24 } }),
|
|
83
83
|
beforeMount: w,
|
|
84
84
|
onMount: T,
|
|
85
85
|
onChange: g
|
|
86
86
|
})
|
|
87
87
|
});
|
|
88
|
-
}), { Text: x } =
|
|
88
|
+
}), { Text: x } = l;
|
|
89
89
|
g.config({ monaco: _ });
|
|
90
90
|
var S = m.div`
|
|
91
91
|
position: relative;
|
|
@@ -118,7 +118,7 @@ var S = m.div`
|
|
|
118
118
|
background-color: var(--ant-color-fill-quaternary);
|
|
119
119
|
border-radius: var(--ant-border-radius-lg) var(--ant-border-radius-lg) 0 0;
|
|
120
120
|
`, T = n((t, n) => {
|
|
121
|
-
let { value: l, height:
|
|
121
|
+
let { value: l, height: p = 380, variant: m = "borderless", isDarkTheme: h, schema: g, placeholder: _, validateMessage: v, title: y, onUpload: x, onChange: T, onBlur: E, onFocus: D } = t, O = e(), k = a(null), A = (e) => {
|
|
122
122
|
k.current?.setValue?.(e);
|
|
123
123
|
};
|
|
124
124
|
return i(n, () => ({
|
|
@@ -140,34 +140,34 @@ var S = m.div`
|
|
|
140
140
|
k.current?.format();
|
|
141
141
|
}, [l]), /* @__PURE__ */ s(S, {
|
|
142
142
|
className: "yaml-editor-container",
|
|
143
|
-
style: { minHeight:
|
|
143
|
+
style: { minHeight: p },
|
|
144
144
|
children: [/* @__PURE__ */ o(b, {
|
|
145
145
|
ref: k,
|
|
146
146
|
header: /* @__PURE__ */ s(w, { children: [/* @__PURE__ */ o("span", {
|
|
147
147
|
className: "title",
|
|
148
148
|
children: y || "YAML"
|
|
149
|
-
}), /* @__PURE__ */ o(
|
|
149
|
+
}), /* @__PURE__ */ o(u, {
|
|
150
150
|
name: "file",
|
|
151
151
|
multiple: !1,
|
|
152
152
|
beforeUpload: (e) => {
|
|
153
|
-
e.type === "application/x-yaml" || e.type === "text/yaml" || e.name.endsWith(".yaml") || e.name.endsWith(".yml") ||
|
|
153
|
+
e.type === "application/x-yaml" || e.type === "text/yaml" || e.name.endsWith(".yaml") || e.name.endsWith(".yml") || d.error("You can only upload YAML file!");
|
|
154
154
|
let t = new FileReader();
|
|
155
155
|
return t.onload = (e) => {
|
|
156
156
|
let t = e.target?.result;
|
|
157
|
-
typeof t == "string" ? (x?.(t), A(t)) :
|
|
157
|
+
typeof t == "string" ? (x?.(t), A(t)) : d.error("Failed to read file content!");
|
|
158
158
|
}, t.readAsText(e), !1;
|
|
159
159
|
},
|
|
160
160
|
showUploadList: !1,
|
|
161
161
|
accept: ".yaml,.yml,text/yaml,application/x-yaml",
|
|
162
|
-
children: /* @__PURE__ */ o(
|
|
163
|
-
icon: /* @__PURE__ */ o(
|
|
162
|
+
children: /* @__PURE__ */ o(c, {
|
|
163
|
+
icon: /* @__PURE__ */ o(f, {}),
|
|
164
164
|
type: "text",
|
|
165
165
|
size: "small",
|
|
166
166
|
children: O.formatMessage({ id: "common.button.import" })
|
|
167
167
|
})
|
|
168
168
|
})] }),
|
|
169
169
|
variant: m,
|
|
170
|
-
height:
|
|
170
|
+
height: p,
|
|
171
171
|
theme: h ? "vs-dark" : "light",
|
|
172
172
|
value: l,
|
|
173
173
|
placeholder: _,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gpustack/core-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,33 +13,37 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./dist/
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
17
|
"import": "./dist/index.es.js"
|
|
18
18
|
},
|
|
19
|
+
"./charts": {
|
|
20
|
+
"types": "./dist/charts.d.ts",
|
|
21
|
+
"import": "./dist/charts.es.js"
|
|
22
|
+
},
|
|
19
23
|
"./markdown": {
|
|
20
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/markdown.d.ts",
|
|
21
25
|
"import": "./dist/markdown.es.js"
|
|
22
26
|
},
|
|
23
27
|
"./yaml-editor": {
|
|
24
|
-
"types": "./dist/
|
|
28
|
+
"types": "./dist/yaml-editor.d.ts",
|
|
25
29
|
"import": "./dist/yaml-editor.es.js"
|
|
26
30
|
},
|
|
27
31
|
"./excel": {
|
|
28
|
-
"types": "./dist/
|
|
32
|
+
"types": "./dist/excel.d.ts",
|
|
29
33
|
"import": "./dist/excel.es.js"
|
|
30
34
|
},
|
|
31
35
|
"./file-readers": {
|
|
32
|
-
"types": "./dist/
|
|
36
|
+
"types": "./dist/file-readers.d.ts",
|
|
33
37
|
"import": "./dist/file-readers.es.js"
|
|
34
38
|
},
|
|
35
39
|
"./utils": {
|
|
36
|
-
"types": "./dist/
|
|
40
|
+
"types": "./dist/lib/utils/index.d.ts",
|
|
37
41
|
"import": "./dist/utils.es.js"
|
|
38
42
|
},
|
|
39
43
|
"./style.css": "./dist/index.css"
|
|
40
44
|
},
|
|
41
45
|
"module": "./dist/index.es.js",
|
|
42
|
-
"types": "./dist/
|
|
46
|
+
"types": "./dist/index.d.ts",
|
|
43
47
|
"files": [
|
|
44
48
|
"dist"
|
|
45
49
|
],
|
package/dist/lib-EFH8CfCi.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|