@zuzjs/ui 1.0.70 → 1.0.72

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.71";
8
8
 
9
9
  declare const AVATAR: {
10
10
  readonly Circle: "CIRCLE";
@@ -629,6 +629,7 @@ type ButtonProps = Props<`button`> & {
629
629
  tooltip?: string;
630
630
  tooltipProps?: Omit<ToolTipProps, `title`>;
631
631
  kind?: ButtonKind;
632
+ alignment?: `start` | `center` | `end`;
632
633
  };
633
634
  interface ButtonHandler extends HTMLButtonElement {
634
635
  reset: () => void;
@@ -806,6 +807,12 @@ type BubbleAttachment = {
806
807
  };
807
808
  type BubbleProps = BoxProps & {
808
809
  id?: string | number;
810
+ sender?: {
811
+ id: string;
812
+ name: string;
813
+ picture?: string;
814
+ color?: string;
815
+ };
809
816
  text?: string;
810
817
  media?: {
811
818
  type: BubbleMediaType;
@@ -843,27 +850,9 @@ type BubbleProps = BoxProps & {
843
850
  children?: ReactNode;
844
851
  };
845
852
 
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>>;
853
+ declare const Bubble: react.MemoExoticComponent<({ ref, ...props }: BubbleProps & {
854
+ ref?: Ref<HTMLDivElement>;
855
+ }) => react_jsx_runtime.JSX.Element>;
867
856
 
868
857
  type ChatMessage = BubbleProps;
869
858
  type ChatDateLabels = {
@@ -1489,6 +1478,7 @@ type DrawerProps = Omit<BoxProps, `id`> & {
1489
1478
  prerender?: boolean;
1490
1479
  margin?: number;
1491
1480
  animation?: ValueOf<typeof TRANSITION_CURVES>;
1481
+ closeBtn?: Extract<Placement, "left" | "right">;
1492
1482
  onClose?: (id: number) => void;
1493
1483
  } & LayerHandler;
1494
1484
  interface DrawerHandler {
@@ -1631,6 +1621,8 @@ type FlexProps = BoxProps & {
1631
1621
  cols?: boolean;
1632
1622
  /** Shortcut for gap */
1633
1623
  gap?: number | string;
1624
+ /** Shortcut for align-self: flex-start */
1625
+ ass?: boolean;
1634
1626
  /** Shortcut for align-items: center */
1635
1627
  ais?: boolean;
1636
1628
  /** Shortcut for align-items: flex-start */
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.71";
8
8
 
9
9
  declare const AVATAR: {
10
10
  readonly Circle: "CIRCLE";
@@ -629,6 +629,7 @@ type ButtonProps = Props<`button`> & {
629
629
  tooltip?: string;
630
630
  tooltipProps?: Omit<ToolTipProps, `title`>;
631
631
  kind?: ButtonKind;
632
+ alignment?: `start` | `center` | `end`;
632
633
  };
633
634
  interface ButtonHandler extends HTMLButtonElement {
634
635
  reset: () => void;
@@ -806,6 +807,12 @@ type BubbleAttachment = {
806
807
  };
807
808
  type BubbleProps = BoxProps & {
808
809
  id?: string | number;
810
+ sender?: {
811
+ id: string;
812
+ name: string;
813
+ picture?: string;
814
+ color?: string;
815
+ };
809
816
  text?: string;
810
817
  media?: {
811
818
  type: BubbleMediaType;
@@ -843,27 +850,9 @@ type BubbleProps = BoxProps & {
843
850
  children?: ReactNode;
844
851
  };
845
852
 
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>>;
853
+ declare const Bubble: react.MemoExoticComponent<({ ref, ...props }: BubbleProps & {
854
+ ref?: Ref<HTMLDivElement>;
855
+ }) => react_jsx_runtime.JSX.Element>;
867
856
 
868
857
  type ChatMessage = BubbleProps;
869
858
  type ChatDateLabels = {
@@ -1489,6 +1478,7 @@ type DrawerProps = Omit<BoxProps, `id`> & {
1489
1478
  prerender?: boolean;
1490
1479
  margin?: number;
1491
1480
  animation?: ValueOf<typeof TRANSITION_CURVES>;
1481
+ closeBtn?: Extract<Placement, "left" | "right">;
1492
1482
  onClose?: (id: number) => void;
1493
1483
  } & LayerHandler;
1494
1484
  interface DrawerHandler {
@@ -1631,6 +1621,8 @@ type FlexProps = BoxProps & {
1631
1621
  cols?: boolean;
1632
1622
  /** Shortcut for gap */
1633
1623
  gap?: number | string;
1624
+ /** Shortcut for align-self: flex-start */
1625
+ ass?: boolean;
1634
1626
  /** Shortcut for align-items: center */
1635
1627
  ais?: boolean;
1636
1628
  /** Shortcut for align-items: flex-start */