@gpustack/core-ui 1.0.7 → 1.0.9

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 (28) hide show
  1. package/dist/{editor-wrap-DBTG5A-7.js → editor-wrap-DschAPhW.js} +2 -2
  2. package/dist/{epubjs-C7q2NtLD.js → epubjs-BxcPGxCG.js} +11 -8
  3. package/dist/{excel-reader-B0E9DWVT.js → excel-reader-jQgyThK1.js} +2 -2
  4. package/dist/excel.es.js +1 -1
  5. package/dist/file-readers.es.js +2 -2
  6. package/dist/{highlight-code-C6xOjDyX.js → highlight-code-CxGYFG-K.js} +11 -52
  7. package/dist/index.css +1 -1
  8. package/dist/index.es.js +7813 -2631
  9. package/dist/{jszip-aevhPAHa.js → jszip-CNVWBM0E.js} +1 -1
  10. package/dist/{lodash-k2j6dYGv.js → lodash-DVkZQU_K.js} +3 -2
  11. package/dist/{mammoth-vi3pqzr_.js → mammoth-Cz4NVm9J.js} +1100 -1052
  12. package/dist/markdown.es.js +3438 -3380
  13. package/dist/{pdfjs-dist-zGGfit5L.js → pdfjs-dist-CO-ekNVq.js} +16 -11
  14. package/dist/{rolldown-runtime-BETGA6I9.js → rolldown-runtime-gEudmnaM.js} +1 -1
  15. package/dist/src/lib/components/icon-font/icons.d.ts +13 -13
  16. package/dist/src/lib/components/index.d.ts +1 -0
  17. package/dist/src/lib/components/page-container/index.d.ts +15 -0
  18. package/dist/src/lib/context/CoreUIContext.d.ts +6 -0
  19. package/dist/src/lib/hooks/index.d.ts +2 -1
  20. package/dist/src/lib/hooks/useCoreUISlots.d.ts +3 -0
  21. package/dist/{useIntl-Ch0EABFx.js → useIntl-6aAPK8Pf.js} +1 -1
  22. package/dist/{utils-CAmt8TVf.js → utils-8vGWRIPF.js} +4 -4
  23. package/dist/utils.es.js +3 -3
  24. package/dist/{word-reader-B8l8Mmvn.js → word-reader-CIrD60Ns.js} +5 -5
  25. package/dist/{xlsx-BxM-6u7U.js → xlsx-CPuMg8xj.js} +1 -1
  26. package/dist/yaml-editor.es.js +2 -2
  27. package/package.json +3 -1
  28. package/dist/lib-CYhlAgFY.js +0 -2
@@ -1,4 +1,4 @@
1
- import { r as e } from "./rolldown-runtime-BETGA6I9.js";
1
+ import { r as e } from "./rolldown-runtime-gEudmnaM.js";
2
2
  //#region ../../node_modules/.pnpm/pdfjs-dist@4.10.38/node_modules/pdfjs-dist/build/pdf.mjs
3
3
  var t = /* @__PURE__ */ e({
4
4
  GlobalWorkerOptions: () => ei,
@@ -3211,9 +3211,9 @@ var Ie = class {
3211
3211
  #e;
3212
3212
  constructor(e) {
3213
3213
  super();
3214
- let { map: t, hash: n, transfer: r } = e.serializable;
3214
+ let { map: t, hash: n, transfer: r } = e.serializable, i = structuredClone(t, r ? { transfer: r } : null);
3215
3215
  this.#e = {
3216
- map: structuredClone(t, r ? { transfer: r } : null),
3216
+ map: i,
3217
3217
  hash: n,
3218
3218
  transfer: r
3219
3219
  };
@@ -5065,8 +5065,8 @@ var Bt = [
5065
5065
  endGroup(e) {
5066
5066
  if (!this.contentVisible) return;
5067
5067
  this.groupLevel--;
5068
- let t = this.ctx;
5069
- if (this.ctx = this.groupStack.pop(), this.ctx.imageSmoothingEnabled = !1, e.smask) this.tempSMask = this.smaskStack.pop(), this.restore();
5068
+ let t = this.ctx, n = this.groupStack.pop();
5069
+ if (this.ctx = n, this.ctx.imageSmoothingEnabled = !1, e.smask) this.tempSMask = this.smaskStack.pop(), this.restore();
5070
5070
  else {
5071
5071
  this.ctx.restore();
5072
5072
  let e = H(this.ctx);
@@ -6163,9 +6163,11 @@ var xn = class {
6163
6163
  }
6164
6164
  }, Cn = class {
6165
6165
  constructor(e, t, n) {
6166
- this._url = e.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers(), this._isStreamingSupported = !e.source.disableStream;
6167
- let r = process.getBuiltinModule("fs");
6168
- this._setReadableStream(r.createReadStream(this._url, {
6166
+ this._url = e.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
6167
+ let r = e.source;
6168
+ this._isStreamingSupported = !r.disableStream;
6169
+ let i = process.getBuiltinModule("fs");
6170
+ this._setReadableStream(i.createReadStream(this._url, {
6169
6171
  start: t,
6170
6172
  end: n - 1
6171
6173
  }));
@@ -10242,9 +10244,12 @@ var cr = class {
10242
10244
  return { numberOfColors: e.get("color").size };
10243
10245
  }
10244
10246
  #v() {
10245
- this.#l = new zr(this.#n, .001).getOutlines(), [this.x, this.y, this.width, this.height] = this.#l.box, this.#a = new zr(this.#n, .0025, .001, this._uiManager.direction === "ltr").getOutlines();
10246
- let { lastPoint: e } = this.#a;
10247
- this.#f = [(e[0] - this.x) / this.width, (e[1] - this.y) / this.height];
10247
+ let e = new zr(this.#n, .001);
10248
+ this.#l = e.getOutlines(), [this.x, this.y, this.width, this.height] = this.#l.box;
10249
+ let t = new zr(this.#n, .0025, .001, this._uiManager.direction === "ltr");
10250
+ this.#a = t.getOutlines();
10251
+ let { lastPoint: n } = this.#a;
10252
+ this.#f = [(n[0] - this.x) / this.width, (n[1] - this.y) / this.height];
10248
10253
  }
10249
10254
  #y({ highlightOutlines: t, highlightId: n, clipPathId: r }) {
10250
10255
  if (this.#l = t, this.#a = t.getNewOutline(this.#g / 2 + 1.5, .0025), n >= 0) this.#u = n, this.#r = r, this.parent.drawLayer.finalizeDraw(n, {
@@ -1,5 +1,5 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), c = (e, n) => {
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (e && (t = e(e = 0)), t), s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => {
3
3
  let r = {};
4
4
  for (var i in e) t(r, i, {
5
5
  get: e[i],
@@ -1,16 +1,16 @@
1
1
  import { default as React } from 'react';
2
2
  declare const icons: {
3
- EditOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
- ExperimentOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
5
- DeleteOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
- ThunderboltOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
7
- RetweetOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
8
- DownloadOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
- FileTextOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
10
- ApiOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
- KubernetesOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
12
- ProfileOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
13
- DockerOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
3
+ EditOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ ExperimentOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
5
+ DeleteOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ ThunderboltOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
7
+ RetweetOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
8
+ DownloadOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
+ FileTextOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
10
+ ApiOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
+ KubernetesOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
12
+ ProfileOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
13
+ DockerOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
14
14
  Stop: React.FunctionComponentElement<{
15
15
  type: string;
16
16
  rotate?: number;
@@ -135,7 +135,7 @@ declare const icons: {
135
135
  type: string;
136
136
  rotate?: number;
137
137
  } & React.HTMLAttributes<HTMLElement>>;
138
- StarOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
138
+ StarOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
139
139
  Charger: React.FunctionComponentElement<{
140
140
  type: string;
141
141
  rotate?: number;
@@ -144,7 +144,7 @@ declare const icons: {
144
144
  type: string;
145
145
  rotate?: number;
146
146
  } & React.HTMLAttributes<HTMLElement>>;
147
- CopyOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/lib/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
147
+ CopyOutlined: React.FunctionComponentElement<Omit<import('@ant-design/icons/es/components/AntdIcon').AntdIconProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
148
148
  Metrics: React.FunctionComponentElement<{
149
149
  type: string;
150
150
  rotate?: number;
@@ -82,6 +82,7 @@ export { default as MoreButton } from './more-button';
82
82
  export { default as NoResult } from './no-result';
83
83
  export { default as OverlayScroller, TooltipOverlayScroller as TooltipOverlayScroller } from './overlay-scroller';
84
84
  export { default as PageBreadcrumb } from './page-breadcrumb';
85
+ export { PageBox, default as PageContainerInner } from './page-container';
85
86
  export { FilterBar, FiltersButton, default as PageTools } from './page-tools';
86
87
  export { default as Popover } from './popover';
87
88
  export { default as ProgressBar } from './progress-bar';
@@ -0,0 +1,15 @@
1
+ import { PageContainerProps } from '@ant-design/pro-components';
2
+ export declare const PageContainerInner: React.FC<PageContainerProps & {
3
+ paddingInlinePageContainerContent?: number;
4
+ extraContentRender?: () => React.ReactNode;
5
+ leftContent?: React.ReactNode;
6
+ rightContent?: React.ReactNode;
7
+ styles?: {
8
+ containerWrapper?: React.CSSProperties;
9
+ };
10
+ }>;
11
+ export declare const PageBox: React.FC<{
12
+ children: React.ReactNode;
13
+ style?: React.CSSProperties;
14
+ }>;
15
+ export default PageContainerInner;
@@ -73,6 +73,11 @@ export interface CoreHooks {
73
73
  getStorageUserSettings: () => any;
74
74
  };
75
75
  }
76
+ export interface CoreUISlots {
77
+ ExtraContent?: React.ComponentType<{
78
+ isDarkTheme?: boolean;
79
+ }>;
80
+ }
76
81
  export interface CoreUIContextProps {
77
82
  config: CoreUIConfig;
78
83
  tokens?: Record<string, string>;
@@ -86,6 +91,7 @@ export interface CoreUIContextProps {
86
91
  writeColumnSettings: (key: string, value: any) => void;
87
92
  writeState: (key: string, value: any) => void;
88
93
  };
94
+ slots?: CoreUISlots;
89
95
  }
90
96
  declare const CoreUIContext: import('react').Context<CoreUIContextProps>;
91
97
  export default CoreUIContext;
@@ -20,6 +20,7 @@ export { default as useUpdateChunkedList } from './use-update-chunk-list';
20
20
  export { default as useWatchList } from './use-watch-list';
21
21
  export { default as useWindowResize } from './use-window-resize';
22
22
  export { default as useCoreUIContext } from './useCoreUIContext';
23
- export { default as useIntl } from './useIntl';
23
+ export { default as useCoreUISlots } from './useCoreUISlots';
24
24
  export { default as useCurrentUser } from './useCurrentUser';
25
+ export { default as useIntl } from './useIntl';
25
26
  export { default as useTableFetch } from './useTableFetch';
@@ -0,0 +1,3 @@
1
+ import { CoreUISlots } from '../context/CoreUIContext';
2
+ declare const useCoreUISlots: () => CoreUISlots;
3
+ export default useCoreUISlots;
@@ -1,4 +1,4 @@
1
- import { t as e } from "./rolldown-runtime-BETGA6I9.js";
1
+ import { t as e } from "./rolldown-runtime-gEudmnaM.js";
2
2
  import "axios";
3
3
  import { createContext as t, useContext as n } from "react";
4
4
  //#region src/lib/context/CoreUIContext.ts
@@ -1,7 +1,7 @@
1
- import { i as e, o as t, r as n } from "./rolldown-runtime-BETGA6I9.js";
2
- import { n as r, t as i } from "./excel-reader-B0E9DWVT.js";
3
- import { a, i as o, n as s, r as c, t as l } from "./word-reader-B8l8Mmvn.js";
4
- import { t as u } from "./lodash-k2j6dYGv.js";
1
+ import { i as e, o as t, r as n } from "./rolldown-runtime-gEudmnaM.js";
2
+ import { n as r, t as i } from "./excel-reader-jQgyThK1.js";
3
+ import { a, i as o, n as s, r as c, t as l } from "./word-reader-CIrD60Ns.js";
4
+ import { t as u } from "./lodash-DVkZQU_K.js";
5
5
  import { saveAs as d } from "file-saver";
6
6
  import { message as ee } from "antd";
7
7
  //#region ../../node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js
package/dist/utils.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "./excel-reader-B0E9DWVT.js";
2
- import { a as n, i as r, n as i, r as a, t as o } from "./word-reader-B8l8Mmvn.js";
3
- import { C as s, D as c, E as l, O as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F } from "./utils-CAmt8TVf.js";
1
+ import { n as e, t } from "./excel-reader-jQgyThK1.js";
2
+ import { a as n, i as r, n as i, r as a, t as o } from "./word-reader-CIrD60Ns.js";
3
+ import { C as s, D as c, E as l, O as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F } from "./utils-8vGWRIPF.js";
4
4
  export { j as base64ToFile, E as convertFileSize, k as convertFileSizeByUnit, F as convertFileToBase64, x as cosineSimilarity, P as createFormData, S as downloadFile, f as errorHandler, t as exportJsonToExcel, l as fetchChunkedData, c as fetchChunkedDataPostFormData, m as formatLargeNumber, D as formatNumber, A as formatTime, g as genColors, w as generateRandomNumber, M as handleBatchRequest, _ as isHTMLDocumentString, v as isNotEmptyValue, O as isNotEmptyValueAllowNull, T as isOnline, d as loadAudioData, b as loadLanguageConfig, y as parseParamsString, h as pcmToWav, p as platformCall, s as readAudioFile, N as readBlob, n as readEpubContent, e as readExcelContent, i as readHtmlContent, u as readLargeStreamData, r as readPDFContent, a as readPptxContent, C as readStreamData, o as readWordContent };