@zuzjs/ui 1.0.70 → 1.0.71

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.d.cts CHANGED
@@ -4,7 +4,7 @@ import { DragOptions, LineChartProps, MediaItem, useMediaPlayer, ScrollBreakpoin
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { dynamic as dynamic$1, PubSub } from '@zuzjs/core';
6
6
 
7
- declare const VERSION = "1.0.69";
7
+ declare const VERSION = "1.0.70";
8
8
 
9
9
  declare const AVATAR: {
10
10
  readonly Circle: "CIRCLE";
@@ -806,6 +806,12 @@ type BubbleAttachment = {
806
806
  };
807
807
  type BubbleProps = BoxProps & {
808
808
  id?: string | number;
809
+ sender?: {
810
+ id: string;
811
+ name: string;
812
+ picture?: string;
813
+ color?: string;
814
+ };
809
815
  text?: string;
810
816
  media?: {
811
817
  type: BubbleMediaType;
@@ -843,27 +849,9 @@ type BubbleProps = BoxProps & {
843
849
  children?: ReactNode;
844
850
  };
845
851
 
846
- /**
847
- * ChatBubble component optimized for performance.
848
- * Supports:
849
- * - Complex nested content (reactions, replies, forwarded messages)
850
- * - Automatic link preview fetching and display
851
- * - Memoization for optimal rendering
852
- * - Media attachments (audio, image, video, documents)
853
- *
854
- * @example
855
- * // Basic usage
856
- * ```tsx
857
- * <ChatBubble text="Hello! How can I help?" side="me" />
858
- * ```
859
- *
860
- * @example
861
- * // With link preview auto-fetch
862
- * ```tsx
863
- * <ChatBubble text="Check this out: https://example.com" side="you" autoFetchLinkPreview />
864
- * ```
865
- */
866
- declare const Bubble: react.NamedExoticComponent<Omit<BubbleProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
852
+ declare const Bubble: react.MemoExoticComponent<({ ref, ...props }: BubbleProps & {
853
+ ref?: Ref<HTMLDivElement>;
854
+ }) => react_jsx_runtime.JSX.Element>;
867
855
 
868
856
  type ChatMessage = BubbleProps;
869
857
  type ChatDateLabels = {
@@ -1489,6 +1477,7 @@ type DrawerProps = Omit<BoxProps, `id`> & {
1489
1477
  prerender?: boolean;
1490
1478
  margin?: number;
1491
1479
  animation?: ValueOf<typeof TRANSITION_CURVES>;
1480
+ closeBtn?: Extract<Placement, "left" | "right">;
1492
1481
  onClose?: (id: number) => void;
1493
1482
  } & LayerHandler;
1494
1483
  interface DrawerHandler {
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ import { DragOptions, LineChartProps, MediaItem, useMediaPlayer, ScrollBreakpoin
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { dynamic as dynamic$1, PubSub } from '@zuzjs/core';
6
6
 
7
- declare const VERSION = "1.0.69";
7
+ declare const VERSION = "1.0.70";
8
8
 
9
9
  declare const AVATAR: {
10
10
  readonly Circle: "CIRCLE";
@@ -806,6 +806,12 @@ type BubbleAttachment = {
806
806
  };
807
807
  type BubbleProps = BoxProps & {
808
808
  id?: string | number;
809
+ sender?: {
810
+ id: string;
811
+ name: string;
812
+ picture?: string;
813
+ color?: string;
814
+ };
809
815
  text?: string;
810
816
  media?: {
811
817
  type: BubbleMediaType;
@@ -843,27 +849,9 @@ type BubbleProps = BoxProps & {
843
849
  children?: ReactNode;
844
850
  };
845
851
 
846
- /**
847
- * ChatBubble component optimized for performance.
848
- * Supports:
849
- * - Complex nested content (reactions, replies, forwarded messages)
850
- * - Automatic link preview fetching and display
851
- * - Memoization for optimal rendering
852
- * - Media attachments (audio, image, video, documents)
853
- *
854
- * @example
855
- * // Basic usage
856
- * ```tsx
857
- * <ChatBubble text="Hello! How can I help?" side="me" />
858
- * ```
859
- *
860
- * @example
861
- * // With link preview auto-fetch
862
- * ```tsx
863
- * <ChatBubble text="Check this out: https://example.com" side="you" autoFetchLinkPreview />
864
- * ```
865
- */
866
- declare const Bubble: react.NamedExoticComponent<Omit<BubbleProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
852
+ declare const Bubble: react.MemoExoticComponent<({ ref, ...props }: BubbleProps & {
853
+ ref?: Ref<HTMLDivElement>;
854
+ }) => react_jsx_runtime.JSX.Element>;
867
855
 
868
856
  type ChatMessage = BubbleProps;
869
857
  type ChatDateLabels = {
@@ -1489,6 +1477,7 @@ type DrawerProps = Omit<BoxProps, `id`> & {
1489
1477
  prerender?: boolean;
1490
1478
  margin?: number;
1491
1479
  animation?: ValueOf<typeof TRANSITION_CURVES>;
1480
+ closeBtn?: Extract<Placement, "left" | "right">;
1492
1481
  onClose?: (id: number) => void;
1493
1482
  } & LayerHandler;
1494
1483
  interface DrawerHandler {