@gpustack/core-ui 1.0.13 → 1.0.16

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.
@@ -1,6 +1,6 @@
1
1
  import { o as e, r as t, t as n } from "./rolldown-runtime-gEudmnaM.js";
2
2
  import { t as r } from "./lodash-DVkZQU_K.js";
3
- import { t as i } from "./highlight-code-BFmm0x52.js";
3
+ import { t as i } from "./highlight-code-DaPJLZGP.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";
@@ -13,5 +13,5 @@ interface WrapperContextProps {
13
13
  setSScrollContentPaddingBottom?: (padding: number) => void;
14
14
  }
15
15
  export declare const WrapperContext: import('react').Context<WrapperContextProps>;
16
- export declare const useWrapperContext: () => WrapperContextProps;
16
+ export declare const useColumnWrapperContext: () => WrapperContextProps;
17
17
  export {};
@@ -3,5 +3,9 @@ import { default as React } from 'react';
3
3
  import { SealFormItemProps } from './types';
4
4
  declare const SealSelect: React.FC<SelectProps & SealFormItemProps & {
5
5
  showTags?: boolean;
6
+ styles?: {
7
+ wrapper?: React.CSSProperties;
8
+ select?: React.CSSProperties;
9
+ };
6
10
  }>;
7
11
  export default SealSelect;
@@ -18,7 +18,7 @@ export { default as HeadlessCollapse } from './collapse-container/headless-colla
18
18
  export { default as CollapsePanel } from './collapse-panel';
19
19
  export { default as ColumnSettings } from './column-settings';
20
20
  export { default as ColumnWrapper } from './column-wrapper';
21
- export { useWrapperContext } from './column-wrapper/use-wrapper-context';
21
+ export { useColumnWrapperContext, useColumnWrapperContext as useWrapperContext } from './column-wrapper/use-column-wrapper-context';
22
22
  export { default as CommandViewer } from './command-viewer';
23
23
  export { default as ContentWrapper } from './content-wrapper';
24
24
  export { default as CopyButton } from './copy-button';
@@ -7,6 +7,7 @@ interface HintInputProps {
7
7
  onPaste?: (e: any) => void;
8
8
  placeholder?: string;
9
9
  trim?: boolean;
10
+ disabled?: boolean;
10
11
  sourceOptions?: Global.HintOptions[];
11
12
  }
12
13
  declare const HintInput: React.FC<HintInputProps>;
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  interface ListInputProps {
3
3
  required?: boolean;
4
4
  value?: string[];
5
+ disabled?: boolean;
5
6
  label?: React.ReactNode;
6
7
  description?: React.ReactNode;
7
8
  btnText?: string;
@@ -15,6 +15,7 @@ interface LabelItemProps {
15
15
  options?: Global.HintOptions[];
16
16
  trim?: boolean;
17
17
  data?: any;
18
+ disabled?: boolean;
18
19
  required?: boolean;
19
20
  }
20
21
  declare const ListItem: React.FC<LabelItemProps>;
@@ -7,9 +7,9 @@ interface SelectPanelProps {
7
7
  key: string;
8
8
  title: string;
9
9
  }>;
10
- value: string[];
10
+ value?: string[];
11
11
  notFoundContent?: React.ReactNode;
12
- onChange: (value: string[]) => void;
12
+ onChange?: (value: string[]) => void;
13
13
  styles?: {
14
14
  container?: React.CSSProperties;
15
15
  left?: React.CSSProperties;
@@ -11,7 +11,7 @@ export type SubDrawerProps = {
11
11
  className?: string;
12
12
  style?: React.CSSProperties;
13
13
  maskClosable?: boolean;
14
- getContainer?: () => HTMLElement | null | undefined;
14
+ getContainer: () => HTMLElement | null | undefined;
15
15
  styles?: {
16
16
  mask?: React.CSSProperties;
17
17
  overlay?: React.CSSProperties;
@@ -8,6 +8,7 @@ export interface CoreUIConfig {
8
8
  defaultColorPrimary?: string;
9
9
  }
10
10
  export interface CoreUII18n {
11
+ locale?: string;
11
12
  formatMessage: (descriptor: {
12
13
  id: string;
13
14
  }, values?: any) => string;
@@ -1,5 +1,5 @@
1
1
  export declare const useIntl: () => {
2
- locale: any;
2
+ locale: string;
3
3
  formatMessage: (descriptor: {
4
4
  id: string;
5
5
  }, values?: any) => string;
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./rolldown-runtime-gEudmnaM.js";
2
2
  import "axios";
3
- import { createContext as t, useContext as n } from "react";
3
+ import { createContext as t, useContext as n, useMemo as r } from "react";
4
4
  //#region src/lib/context/CoreUIContext.ts
5
- var r = t({
5
+ var i = t({
6
6
  config: {
7
7
  apiBaseUrl: "",
8
8
  iconUrl: "",
@@ -25,7 +25,7 @@ var r = t({
25
25
  },
26
26
  tokens: {},
27
27
  services: { request: async (e, t) => Promise.resolve({}) }
28
- }), i = () => n(r), a = /* @__PURE__ */ e(((e, t) => {
28
+ }), a = () => n(i), o = /* @__PURE__ */ e(((e, t) => {
29
29
  (function() {
30
30
  var e = {}.hasOwnProperty;
31
31
  function n() {
@@ -51,13 +51,12 @@ var r = t({
51
51
  return n;
52
52
  }) : window.classNames = n;
53
53
  })();
54
- })), o = () => {
55
- let { hooks: e } = i(), t = e?.useIntl?.(), n = (e, n) => t && t.formatMessage ? t.formatMessage(e, n) : e.id;
56
- return {
54
+ })), s = () => {
55
+ let { hooks: e } = a(), t = e.useIntl();
56
+ return r(() => ({
57
57
  ...t,
58
- locale: t?.locale || "en-US",
59
- formatMessage: n
60
- };
58
+ locale: t.locale || "en-US"
59
+ }), [t]);
61
60
  };
62
61
  //#endregion
63
- export { r as i, a as n, i as r, o as t };
62
+ export { i, o as n, a as r, s as t };
@@ -1,5 +1,5 @@
1
- import { t as e } from "./useIntl-CtHcH0Kd.js";
2
- import { t } from "./editor-wrap-DQdG3MHA.js";
1
+ import { t as e } from "./useIntl-CQ7P5Olk.js";
2
+ import { t } from "./editor-wrap-BGZYfHpj.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpustack/core-ui",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",