@sciol/xyzen 0.3.13 → 0.3.15
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/README.md +3 -18
- package/dist/components/animate-ui/components/radix/sheet.d.ts +20 -0
- package/dist/components/animate-ui/primitives/radix/sheet.d.ts +32 -0
- package/dist/components/layouts/components/SessionHistory.d.ts +3 -2
- package/dist/store/types.d.ts +1 -0
- package/dist/xyzen.css +1 -0
- package/dist/xyzen.es.js +11267 -11268
- package/dist/xyzen.umd.js +100 -100
- package/package.json +3 -4
- package/dist/style.css +0 -1
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ The Xyzen component requires a running backend service to handle chat logic and
|
|
|
66
66
|
```tsx
|
|
67
67
|
// src/App.tsx
|
|
68
68
|
import { Xyzen, useXyzen } from "@sciol/xyzen";
|
|
69
|
-
import "@sciol/xyzen/style.css"; //
|
|
69
|
+
import "@sciol/xyzen/dist/style.css"; // Import the CSS
|
|
70
70
|
|
|
71
71
|
function App() {
|
|
72
72
|
const { openXyzen } = useXyzen();
|
|
@@ -86,24 +86,9 @@ The Xyzen component requires a running backend service to handle chat logic and
|
|
|
86
86
|
export default App;
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
- 必须导入 `@sciol/xyzen/style.css` 样式文件,它包含所有必需的 CSS 变量、主题配置和 Markdown 样式
|
|
91
|
-
- `backendUrl` 应指向您部署的 Xyzen 后端基础 URL,组件会自动处理 `/xyzen/api`、`/xyzen/ws` 和 `/xyzen/mcp` 等端点
|
|
89
|
+
**Note:** The `backendUrl` should point to the base URL of your Xyzen backend deployment. The component will automatically handle endpoints like `/xyzen/api`, `/xyzen/ws`, and `/xyzen/mcp`.
|
|
92
90
|
|
|
93
|
-
3.
|
|
94
|
-
|
|
95
|
-
```css
|
|
96
|
-
/* your-app.css */
|
|
97
|
-
@import "@sciol/xyzen/style.css";
|
|
98
|
-
|
|
99
|
-
/* 自定义主题变量 */
|
|
100
|
-
:root {
|
|
101
|
-
--primary: oklch(0.5 0.2 250); /* 自定义主色 */
|
|
102
|
-
--radius: 0.5rem; /* 自定义圆角 */
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
4. Control the Xyzen panel from any component:
|
|
91
|
+
3. Control the Xyzen panel from any component:
|
|
107
92
|
|
|
108
93
|
Use the `useXyzen` hook to control the sidebar's visibility:
|
|
109
94
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SheetProps as SheetPrimitiveProps, SheetTriggerProps as SheetTriggerPrimitiveProps, SheetCloseProps as SheetClosePrimitiveProps, SheetContentProps as SheetContentPrimitiveProps, SheetHeaderProps as SheetHeaderPrimitiveProps, SheetFooterProps as SheetFooterPrimitiveProps, SheetTitleProps as SheetTitlePrimitiveProps, SheetDescriptionProps as SheetDescriptionPrimitiveProps } from '../../primitives/radix/sheet';
|
|
2
|
+
type SheetProps = SheetPrimitiveProps;
|
|
3
|
+
declare function Sheet(props: SheetProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
type SheetTriggerProps = SheetTriggerPrimitiveProps;
|
|
5
|
+
declare function SheetTrigger(props: SheetTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
type SheetCloseProps = SheetClosePrimitiveProps;
|
|
7
|
+
declare function SheetClose(props: SheetCloseProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
type SheetContentProps = SheetContentPrimitiveProps & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetContentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
type SheetHeaderProps = SheetHeaderPrimitiveProps;
|
|
13
|
+
declare function SheetHeader({ className, ...props }: SheetHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
type SheetFooterProps = SheetFooterPrimitiveProps;
|
|
15
|
+
declare function SheetFooter({ className, ...props }: SheetFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
type SheetTitleProps = SheetTitlePrimitiveProps;
|
|
17
|
+
declare function SheetTitle({ className, ...props }: SheetTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
type SheetDescriptionProps = SheetDescriptionPrimitiveProps;
|
|
19
|
+
declare function SheetDescription({ className, ...props }: SheetDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, type SheetProps, type SheetTriggerProps, type SheetCloseProps, type SheetContentProps, type SheetHeaderProps, type SheetFooterProps, type SheetTitleProps, type SheetDescriptionProps, };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from 'radix-ui';
|
|
2
|
+
import { HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
type SheetContextType = {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const useSheet: () => SheetContextType;
|
|
9
|
+
type SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;
|
|
10
|
+
declare function Sheet(props: SheetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
type SheetTriggerProps = React.ComponentProps<typeof SheetPrimitive.Trigger>;
|
|
12
|
+
declare function SheetTrigger(props: SheetTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
type SheetCloseProps = React.ComponentProps<typeof SheetPrimitive.Close>;
|
|
14
|
+
declare function SheetClose(props: SheetCloseProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
type SheetPortalProps = React.ComponentProps<typeof SheetPrimitive.Portal>;
|
|
16
|
+
declare function SheetPortal(props: SheetPortalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
type SheetOverlayProps = Omit<React.ComponentProps<typeof SheetPrimitive.Overlay>, "asChild" | "forceMount"> & HTMLMotionProps<"div">;
|
|
18
|
+
declare function SheetOverlay({ transition, ...props }: SheetOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
type Side = "top" | "bottom" | "left" | "right";
|
|
20
|
+
type SheetContentProps = React.ComponentProps<typeof SheetPrimitive.Content> & HTMLMotionProps<"div"> & {
|
|
21
|
+
side?: Side;
|
|
22
|
+
};
|
|
23
|
+
declare function SheetContent({ side, transition, style, ...props }: SheetContentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
type SheetHeaderProps = React.ComponentProps<"div">;
|
|
25
|
+
declare function SheetHeader(props: SheetHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
type SheetFooterProps = React.ComponentProps<"div">;
|
|
27
|
+
declare function SheetFooter(props: SheetFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
type SheetTitleProps = React.ComponentProps<typeof SheetPrimitive.Title>;
|
|
29
|
+
declare function SheetTitle(props: SheetTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
type SheetDescriptionProps = React.ComponentProps<typeof SheetPrimitive.Description>;
|
|
31
|
+
declare function SheetDescription(props: SheetDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export { useSheet, Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, type SheetProps, type SheetPortalProps, type SheetOverlayProps, type SheetTriggerProps, type SheetCloseProps, type SheetContentProps, type SheetHeaderProps, type SheetFooterProps, type SheetTitleProps, type SheetDescriptionProps, };
|
|
@@ -4,5 +4,6 @@ interface SessionHistoryProps {
|
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
onSelectTopic?: (topicId: string) => void;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
declare function SessionHistory({ context, isOpen, onClose, onSelectTopic, }: SessionHistoryProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare const _default: import('react').MemoExoticComponent<typeof SessionHistory>;
|
|
9
|
+
export default _default;
|