@gpustack/core-ui 1.0.10 → 1.0.12

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-CxGYFG-K.js";
3
+ import { t as i } from "./highlight-code-BFmm0x52.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";
@@ -0,0 +1,7 @@
1
+ export interface AccessProps {
2
+ accessible: boolean;
3
+ fallback?: React.ReactNode;
4
+ children: React.ReactNode;
5
+ }
6
+ declare const Access: React.FC<AccessProps>;
7
+ export default Access;
@@ -1,4 +1,5 @@
1
1
  export { CoreUIProvider } from '../context/CoreUIProvider';
2
+ export { default as Access, type AccessProps } from './access';
2
3
  export { default as AlertInfo } from './alert-info';
3
4
  export { default as AlertBlockInfo } from './alert-info/block';
4
5
  export { default as AudioAnimation } from './audio-animation';
@@ -102,6 +103,7 @@ export { default as InfoColumn } from './simple-table/info-column';
102
103
  export { default as SmallCloseButton } from './small-close-button';
103
104
  export { default as SpeechContent } from './speech-content';
104
105
  export { default as StatusTag } from './status-tag';
106
+ export { default as SubDrawer, type SubDrawerProps } from './sub-drawer';
105
107
  export { default as Table } from './table';
106
108
  export { default as CellContent } from './table/components/cell-content';
107
109
  export { default as RowChildren } from './table/components/row-children';
@@ -3,6 +3,7 @@ interface LogsViewerProps {
3
3
  height?: number;
4
4
  content?: string;
5
5
  url: string;
6
+ watchable?: boolean;
6
7
  params?: Record<string, any>;
7
8
  ref?: any;
8
9
  tail?: number;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- type ModalOverlayViewProps = {
2
+ export type SubDrawerProps = {
3
3
  title: React.ReactNode;
4
4
  open: boolean;
5
5
  onCancel?: () => void;
@@ -21,5 +21,5 @@ type ModalOverlayViewProps = {
21
21
  container?: React.CSSProperties;
22
22
  };
23
23
  };
24
- declare const ModalOverlayView: React.FC<ModalOverlayViewProps>;
25
- export default ModalOverlayView;
24
+ declare const SubDrawer: React.FC<SubDrawerProps>;
25
+ export default SubDrawer;
@@ -78,6 +78,14 @@ export interface CoreUISlots {
78
78
  isDarkTheme?: boolean;
79
79
  }>;
80
80
  }
81
+ export interface CoreUIAccess {
82
+ Access: React.ComponentType<{
83
+ accessible: boolean;
84
+ fallback?: React.ReactNode;
85
+ children: React.ReactNode;
86
+ }>;
87
+ useAccess: () => Record<string, any>;
88
+ }
81
89
  export interface CoreUIContextProps {
82
90
  config: CoreUIConfig;
83
91
  tokens?: Record<string, string>;
@@ -92,6 +100,7 @@ export interface CoreUIContextProps {
92
100
  writeState: (key: string, value: any) => void;
93
101
  };
94
102
  slots?: CoreUISlots;
103
+ access?: CoreUIAccess;
95
104
  }
96
105
  declare const CoreUIContext: import('react').Context<CoreUIContextProps>;
97
106
  export default CoreUIContext;
@@ -19,6 +19,7 @@ export { useTableMultiSort, default as useTableSort } from './use-table-sort';
19
19
  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
+ export { default as useAccess } from './useAccess';
22
23
  export { default as useCoreUIContext } from './useCoreUIContext';
23
24
  export { default as useCoreUISlots } from './useCoreUISlots';
24
25
  export { default as useCurrentUser } from './useCurrentUser';
@@ -12,6 +12,7 @@ interface RequestConfig {
12
12
  beforeReconnect?: () => void;
13
13
  params?: object;
14
14
  watch?: boolean;
15
+ watchable?: boolean;
15
16
  contentType?: 'json' | 'text';
16
17
  }
17
18
  declare const useSetChunkFetch: () => {
@@ -0,0 +1,2 @@
1
+ export declare const useAccess: () => Record<string, any>;
2
+ export default useAccess;
@@ -25,7 +25,7 @@ var r = t({
25
25
  },
26
26
  tokens: {},
27
27
  services: { request: async (e, t) => Promise.resolve({}) }
28
- }), i = /* @__PURE__ */ e(((e, t) => {
28
+ }), i = () => n(r), a = /* @__PURE__ */ e(((e, t) => {
29
29
  (function() {
30
30
  var e = {}.hasOwnProperty;
31
31
  function n() {
@@ -51,8 +51,8 @@ var r = t({
51
51
  return n;
52
52
  }) : window.classNames = n;
53
53
  })();
54
- })), a = () => n(r), o = () => {
55
- let { hooks: e } = a(), t = e?.useIntl?.(), n = (e, n) => t && t.formatMessage ? t.formatMessage(e, n) : e.id;
54
+ })), o = () => {
55
+ let { hooks: e } = i(), t = e?.useIntl?.(), n = (e, n) => t && t.formatMessage ? t.formatMessage(e, n) : e.id;
56
56
  return {
57
57
  ...t,
58
58
  locale: t?.locale || "en-US",
@@ -1,5 +1,5 @@
1
- import { t as e } from "./useIntl-6aAPK8Pf.js";
2
- import { t } from "./editor-wrap-DschAPhW.js";
1
+ import { t as e } from "./useIntl-CtHcH0Kd.js";
2
+ import { t } from "./editor-wrap-DQdG3MHA.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.10",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",