@gpustack/core-ui 1.0.4 → 1.0.5
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/index.css +2 -1
- package/dist/index.es.js +31 -25
- package/dist/markdown.es.js +1 -1
- package/dist/src/lib/components/form-drawer/index.d.ts +1 -0
- package/dist/src/lib/components/label-selector/index.d.ts +1 -1
- package/dist/src/lib/components/list-input/index.d.ts +2 -2
- package/dist/src/lib/components/page-tools/index.d.ts +2 -1
- package/dist/yaml-editor.es.js +1 -1
- package/package.json +1 -1
- package/dist/editor-wrap.css +0 -1
- package/dist/highlight-code.css +0 -1
- package/dist/markdown.css +0 -1
- /package/dist/{editor-wrap-CMFkPgsW.js → editor-wrap-DFbXkvlV.js} +0 -0
- /package/dist/{highlight-code-CyMnhIMR.js → highlight-code-BGo6UgwT.js} +0 -0
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./rolldown-runtime-BETGA6I9.js";
|
|
2
2
|
import { i as r, n as i, r as a, t as o } from "./useIntl-BZWVSOXz.js";
|
|
3
3
|
import { t as s } from "./lodash-k2j6dYGv.js";
|
|
4
|
-
import { a as c, i as l, n as u, o as d, r as f, t as p } from "./highlight-code-
|
|
4
|
+
import { a as c, i as l, n as u, o as d, r as f, t as p } from "./highlight-code-BGo6UgwT.js";
|
|
5
5
|
import { A as m, _ as h, a as g, c as _, f as v, g as y, n as b, s as x, y as S } from "./utils-CAmt8TVf.js";
|
|
6
|
-
import { t as C } from "./editor-wrap-
|
|
6
|
+
import { t as C } from "./editor-wrap-DFbXkvlV.js";
|
|
7
7
|
import w from "axios";
|
|
8
8
|
import * as T from "react";
|
|
9
9
|
import E, { PureComponent as D, createContext as O, createElement as k, forwardRef as A, isValidElement as j, memo as M, useCallback as N, useContext as P, useEffect as F, useImperativeHandle as I, useLayoutEffect as L, useMemo as R, useRef as z, useState as B, version as ee } from "react";
|
|
@@ -4158,7 +4158,7 @@ var da = J.div`
|
|
|
4158
4158
|
}
|
|
4159
4159
|
|
|
4160
4160
|
.ant-select .ant-select-input {
|
|
4161
|
-
top: -
|
|
4161
|
+
top: -1px !important;
|
|
4162
4162
|
}
|
|
4163
4163
|
.ant-select-placeholder {
|
|
4164
4164
|
position: absolute;
|
|
@@ -6455,7 +6455,7 @@ var Es = (e) => {
|
|
|
6455
6455
|
padding: "16px 24px 8px",
|
|
6456
6456
|
display: "flex",
|
|
6457
6457
|
justifyContent: "flex-end"
|
|
6458
|
-
}, Os = ({ title: e, open: t, onCancel: n, onSubmit: r, children: i, width: a = 600, subTitle: o, footer: s }) => /* @__PURE__ */ H(Es, {
|
|
6458
|
+
}, Os = ({ title: e, open: t, onCancel: n, onSubmit: r, children: i, width: a = 600, subTitle: o, footer: s, loading: c }) => /* @__PURE__ */ H(Es, {
|
|
6459
6459
|
title: /* @__PURE__ */ U(V, { children: [e, o && /* @__PURE__ */ H(Mt, {
|
|
6460
6460
|
variant: "outlined",
|
|
6461
6461
|
style: {
|
|
@@ -6481,6 +6481,7 @@ var Es = (e) => {
|
|
|
6481
6481
|
footer: s ?? /* @__PURE__ */ H(Ko, {
|
|
6482
6482
|
onOk: r,
|
|
6483
6483
|
onCancel: n,
|
|
6484
|
+
loading: c,
|
|
6484
6485
|
style: Ds
|
|
6485
6486
|
}),
|
|
6486
6487
|
children: i
|
|
@@ -8242,18 +8243,19 @@ var Cc = (e) => {
|
|
|
8242
8243
|
onBlur: (e, t) => a?.(e, t, n)
|
|
8243
8244
|
}, n)) })
|
|
8244
8245
|
});
|
|
8245
|
-
}, Pc = ({
|
|
8246
|
+
}, Pc = ({ value: e, onChange: t, onBlur: n, onDelete: r, disabled: i, label: a, btnText: s, description: c, isAutoComplete: l, enablePaste: u = !0 }) => {
|
|
8246
8247
|
let d = o(), [f, p] = B({}), [m, h] = B([]);
|
|
8247
8248
|
F(() => {
|
|
8248
|
-
|
|
8249
|
-
|
|
8250
|
-
|
|
8249
|
+
let t = e ?? {};
|
|
8250
|
+
Z.default.isEqual(t, f) || (p(t), h(Z.default.map(Z.default.keys(t), (e) => ({
|
|
8251
|
+
key: e,
|
|
8252
|
+
value: t[e]
|
|
8251
8253
|
}))));
|
|
8252
8254
|
}, [e]);
|
|
8253
8255
|
let g = (e) => {
|
|
8254
8256
|
h(e);
|
|
8255
8257
|
}, _ = (e) => {
|
|
8256
|
-
|
|
8258
|
+
p(e), t?.(e);
|
|
8257
8259
|
}, v = (e) => {
|
|
8258
8260
|
let n = Z.default.reduce(e, (e, t) => (t.key && (e[t.key] = t.value), e), {});
|
|
8259
8261
|
t?.(n);
|
|
@@ -8274,10 +8276,10 @@ var Cc = (e) => {
|
|
|
8274
8276
|
if (!n || n.indexOf("=") === -1) return;
|
|
8275
8277
|
e.preventDefault();
|
|
8276
8278
|
let r = Z.default.split(n, /\r?\n/).map((e) => e.trim()).filter((e) => e && e.includes("=")).map((e) => {
|
|
8277
|
-
let [t, n] = e.split(/=(.+)/)
|
|
8279
|
+
let [t = "", n = ""] = e.split(/=(.+)/);
|
|
8278
8280
|
return {
|
|
8279
|
-
key: t,
|
|
8280
|
-
value: n
|
|
8281
|
+
key: t.trim(),
|
|
8282
|
+
value: n.trim()
|
|
8281
8283
|
};
|
|
8282
8284
|
}), i = [...m];
|
|
8283
8285
|
i.splice(t, 1, ...r), v(i), h(i);
|
|
@@ -8361,18 +8363,18 @@ var Cc = (e) => {
|
|
|
8361
8363
|
})]
|
|
8362
8364
|
});
|
|
8363
8365
|
}, zc = (e) => {
|
|
8364
|
-
let {
|
|
8366
|
+
let { value: t, label: n, description: r, onChange: i, onBlur: a, onDelete: o, btnText: s, options: c, labelExtra: l, trim: u = !0, styles: d, required: f, renderItem: p } = e, [m, h] = E.useState([]), g = E.useRef(0), _ = () => {
|
|
8365
8367
|
g.current += 1;
|
|
8366
8368
|
}, v = (e) => {
|
|
8367
8369
|
let t = Z.default.cloneDeep(m);
|
|
8368
8370
|
t.splice(e, 1);
|
|
8369
8371
|
let n = Z.default.map(t, "value").filter((e) => !!e);
|
|
8370
|
-
h(t), i(n), o?.(e);
|
|
8372
|
+
h(t), i?.(n), o?.(e);
|
|
8371
8373
|
}, b = (e, t) => {
|
|
8372
8374
|
let n = Z.default.cloneDeep(m);
|
|
8373
8375
|
n[t].value = e;
|
|
8374
8376
|
let r = Z.default.map(n, "value").filter((e) => !!e);
|
|
8375
|
-
h(n), i(r);
|
|
8377
|
+
h(n), i?.(r);
|
|
8376
8378
|
}, x = () => {
|
|
8377
8379
|
_();
|
|
8378
8380
|
let e = Z.default.cloneDeep(m);
|
|
@@ -8386,18 +8388,22 @@ var Cc = (e) => {
|
|
|
8386
8388
|
let r = y(n);
|
|
8387
8389
|
if (r.length <= 1) return;
|
|
8388
8390
|
e.preventDefault();
|
|
8389
|
-
let a = Z.default.cloneDeep(m);
|
|
8390
|
-
a[t].value =
|
|
8391
|
-
for (let e = 1; e < r.length; e++)
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8391
|
+
let a = Z.default.cloneDeep(m), o = u ? r[0]?.trim() : r[0];
|
|
8392
|
+
a[t].value = o || "";
|
|
8393
|
+
for (let e = 1; e < r.length; e++) {
|
|
8394
|
+
_();
|
|
8395
|
+
let n = u ? r[e]?.trim() : r[e];
|
|
8396
|
+
a.splice(t + e, 0, {
|
|
8397
|
+
value: n || "",
|
|
8398
|
+
uid: g.current
|
|
8399
|
+
});
|
|
8400
|
+
}
|
|
8401
|
+
let s = Z.default.map(a, "value").filter((e) => !!e);
|
|
8402
|
+
h(a), i?.(s);
|
|
8397
8403
|
};
|
|
8398
8404
|
return E.useEffect(() => {
|
|
8399
|
-
let e = Z.default.map(m, "value").filter((e) => !!e);
|
|
8400
|
-
Z.default.isEqual(
|
|
8405
|
+
let e = t ?? [], n = Z.default.map(m, "value").filter((e) => !!e);
|
|
8406
|
+
Z.default.isEqual(n, e) || h(Z.default.map(e, (e) => (_(), {
|
|
8401
8407
|
value: e,
|
|
8402
8408
|
uid: g.current
|
|
8403
8409
|
})));
|
package/dist/markdown.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./rolldown-runtime-BETGA6I9.js";
|
|
2
2
|
import { t as r } from "./lodash-k2j6dYGv.js";
|
|
3
|
-
import { t as i } from "./highlight-code-
|
|
3
|
+
import { t as i } from "./highlight-code-BGo6UgwT.js";
|
|
4
4
|
import a, { Fragment as o, useCallback as s, useEffect as c, useMemo as l } from "react";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
6
|
import { EyeOutlined as p } from "@ant-design/icons";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
interface ListInputProps {
|
|
3
3
|
required?: boolean;
|
|
4
|
-
|
|
4
|
+
value?: string[];
|
|
5
5
|
label?: React.ReactNode;
|
|
6
6
|
description?: React.ReactNode;
|
|
7
7
|
btnText?: string;
|
|
@@ -13,7 +13,7 @@ interface ListInputProps {
|
|
|
13
13
|
wrapper?: React.CSSProperties;
|
|
14
14
|
item?: React.CSSProperties;
|
|
15
15
|
};
|
|
16
|
-
onChange
|
|
16
|
+
onChange?: (data: string[]) => void;
|
|
17
17
|
onBlur?: (e: any, index: number) => void;
|
|
18
18
|
onDelete?: (index: number) => void;
|
|
19
19
|
renderItem?: (data: any, props: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectProps } from 'antd';
|
|
1
2
|
import { default as React } from 'react';
|
|
2
3
|
type PageToolsProps = {
|
|
3
4
|
left?: React.ReactNode;
|
|
@@ -48,7 +49,7 @@ interface FilterBarProps {
|
|
|
48
49
|
onClear: () => void;
|
|
49
50
|
};
|
|
50
51
|
select?: {
|
|
51
|
-
showSearch?:
|
|
52
|
+
showSearch?: SelectProps['showSearch'];
|
|
52
53
|
};
|
|
53
54
|
widths?: {
|
|
54
55
|
input?: number;
|
package/dist/yaml-editor.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./useIntl-BZWVSOXz.js";
|
|
2
|
-
import { t } from "./editor-wrap-
|
|
2
|
+
import { t } from "./editor-wrap-DFbXkvlV.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
5
|
import { ImportOutlined as c, LoadingOutlined as l } from "@ant-design/icons";
|
package/package.json
CHANGED
package/dist/editor-wrap.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.editor-wrap{border-radius:var(--border-radius-mini);font-size:0;overflow:hidden}.editor-wrap .code-pre{margin-bottom:0}.editor-wrap .editor-header{background-color:var(--color-editor-header-bg);justify-content:space-between;align-items:center;padding-block:0;padding-inline:12px 10px;display:flex}.editor-wrap .scrollbar .slider{border-radius:6px}
|
package/dist/highlight-code.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.index-module__wrapper___AP3Au{width:100%;padding-inline:8px;overflow-y:auto}.code-pre.dark .hljs{color:#abb2bf;background:var(--color-editor-dark)}.code-pre.dark .hljs-comment,.code-pre.dark .hljs-quote{color:#5c6370;font-style:italic}.code-pre.dark .hljs-doctag,.code-pre.dark .hljs-keyword,.code-pre.dark .hljs-formula{color:#c678dd}.code-pre.dark .hljs-section,.code-pre.dark .hljs-name,.code-pre.dark .hljs-selector-tag,.code-pre.dark .hljs-deletion,.code-pre.dark .hljs-subst{color:#e06c75}.code-pre.dark .hljs-literal{color:#56b6c2}.code-pre.dark .hljs-string,.code-pre.dark .hljs-regexp,.code-pre.dark .hljs-addition,.code-pre.dark .hljs-attribute,.code-pre.dark .hljs-meta .hljs-string{color:#98c379}.code-pre.dark .hljs-attr,.code-pre.dark .hljs-variable,.code-pre.dark .hljs-template-variable,.code-pre.dark .hljs-type,.code-pre.dark .hljs-selector-class,.code-pre.dark .hljs-selector-attr,.code-pre.dark .hljs-selector-pseudo,.code-pre.dark .hljs-number{color:#d19a66}.code-pre.dark .hljs-symbol,.code-pre.dark .hljs-bullet,.code-pre.dark .hljs-link,.code-pre.dark .hljs-meta,.code-pre.dark .hljs-selector-id,.code-pre.dark .hljs-title{color:#61aeee}.code-pre.dark .hljs-built_in,.code-pre.dark .hljs-title.class_,.code-pre.dark .hljs-class .hljs-title{color:#e6c07b}.code-pre.dark .hljs-emphasis{font-style:italic}.code-pre.dark .hljs-strong{font-weight:700}.code-pre.dark .hljs-link{text-decoration:underline}pre code.hljs{padding:1em;display:block;overflow-x:auto}code.hljs{padding:3px 5px}.code-pre.light .hljs{color:#383a42;background:var(--color-editor-light)}.code-pre.light .hljs-comment,.code-pre.light .hljs-quote{color:#a0a1a7;font-style:italic}.code-pre.light .hljs-doctag,.code-pre.light .hljs-keyword,.code-pre.light .hljs-formula{color:#a626a4}.code-pre.light .hljs-section,.code-pre.light .hljs-name,.code-pre.light .hljs-selector-tag,.code-pre.light .hljs-deletion,.code-pre.light .hljs-subst{color:#e45649}.code-pre.light .hljs-literal{color:#0184bb}.code-pre.light .hljs-string,.code-pre.light .hljs-regexp,.code-pre.light .hljs-addition,.code-pre.light .hljs-attribute,.code-pre.light .hljs-meta .hljs-string{color:#50a14f}.code-pre.light .hljs-attr,.code-pre.light .hljs-variable,.code-pre.light .hljs-template-variable,.code-pre.light .hljs-type,.code-pre.light .hljs-selector-class,.code-pre.light .hljs-selector-attr,.code-pre.light .hljs-selector-pseudo,.code-pre.light .hljs-number{color:#986801}.code-pre.light .hljs-symbol,.code-pre.light .hljs-bullet,.code-pre.light .hljs-link,.code-pre.light .hljs-meta,.code-pre.light .hljs-selector-id,.code-pre.light .hljs-title{color:#4078f2}.code-pre.light .hljs-built_in,.code-pre.light .hljs-title.class_,.code-pre.light .hljs-class .hljs-title{color:#c18401}.code-pre.light .hljs-emphasis{font-style:italic}.code-pre.light .hljs-strong{font-weight:700}.code-pre.light .hljs-link{text-decoration:underline}.high-light-wrapper{text-align:left;font-size:var(--font-size-code)}.high-light-wrapper .hljs{font-weight:var(--font-weight-normal);padding-block:1.2em;padding-inline:0}.high-light-wrapper .hljs::-webkit-scrollbar{height:var(--scrollbar-size)}.high-light-wrapper .hljs::-webkit-scrollbar-thumb{background-color:#0000;border-radius:4px}.high-light-wrapper .hljs::-webkit-scrollbar-track{background-color:#0000}.high-light-wrapper .hljs.light:hover::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-thumb);border-radius:4px}.high-light-wrapper .hljs.dark:hover::-webkit-scrollbar-thumb{background-color:var(--scrollbar-handle-light-bg);border-radius:4px}.high-light-wrapper .code-pre{border-radius:0 0 var(--border-radius-mini) var(--border-radius-mini);white-space:pre-wrap;padding-inline:12px;position:relative}.high-light-wrapper .code-pre code{line-height:1.6}.high-light-wrapper .code-pre.copyable{padding-inline:12px 32px}.high-light-wrapper .code-pre .copy-button{position:absolute;top:6px;right:6px}.high-light-wrapper .code-pre.dark{background-color:var(--color-editor-dark)}.high-light-wrapper .code-pre.dark:hover::-webkit-scrollbar-thumb{background-color:var(--scrollbar-handle-light-bg);border-radius:4px}.high-light-wrapper .code-pre.light{background-color:#fafafa}.high-light-wrapper .code-pre.light:hover::-webkit-scrollbar-thumb{background-color:var(--color-scrollbar-thumb);border-radius:4px}
|