@natoe/colab 0.1.4 → 0.1.6

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.mts CHANGED
@@ -141,9 +141,9 @@ interface Message {
141
141
  interface SendMessagePayload {
142
142
  body: string;
143
143
  type: MessageType;
144
- mediaUrl?: string;
145
- mediaDuration?: number;
146
- fileName?: string;
144
+ media_url?: string;
145
+ media_duration?: number;
146
+ file_name?: string;
147
147
  metadata?: Record<string, unknown>;
148
148
  /** ID of message being replied to (snapshot is built server-side) */
149
149
  replyToId?: string;
@@ -200,6 +200,8 @@ interface CollabPopupProps {
200
200
  isOpen: boolean;
201
201
  /** Close the popup */
202
202
  onClose: () => void;
203
+ /** Optional back navigation — renders a ← button in the title bar when provided */
204
+ onBack?: () => void;
203
205
  /** Initial position (defaults to bottom-right) */
204
206
  initialPosition?: {
205
207
  x: number;
@@ -215,7 +217,7 @@ interface CollabPopupProps {
215
217
  * Draggable floating chat popup — drop-in replacement for DraggableChatPopup.
216
218
  * Renders a CollabPanel inside a movable, resizable container.
217
219
  */
218
- declare function CollabPopup({ orderId, patientData, participantIds, isOpen, onClose, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
220
+ declare function CollabPopup({ orderId, patientData, participantIds, isOpen, onClose, onBack, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
219
221
 
220
222
  interface CollabInlineProps {
221
223
  orderId: string;
@@ -734,17 +736,22 @@ interface MessageActionsMenuProps {
734
736
  onPin: (messageId: string) => void;
735
737
  onUnpin: (messageId: string) => void;
736
738
  onCopy?: (text: string) => void;
737
- /** True when the menu should show (hover / open state managed by parent) */
738
- visible: boolean;
739
739
  /** Whether we've hit the pin limit — if true, pin is disabled */
740
740
  pinDisabled?: boolean;
741
+ /** Anchor the popover to the left of the trigger (use for own bubbles) */
742
+ anchorRight?: boolean;
741
743
  className?: string;
742
744
  }
743
745
  /**
744
- * Inline action menu for a single message.
745
- * Parent controls visibility (typically via hover state in MessageBubble).
746
+ * Self-contained "⋯" trigger + popover for per-message actions. Replaces
747
+ * the previous hover-only floating menu so touch users (and anyone with
748
+ * a non-pointer device) can reach Reply / Pin / Copy.
749
+ *
750
+ * Menu rows are icon + text so the affordance reads cold; the trigger is
751
+ * a 36px tap target. Closes on outside-click, Escape, or after selecting
752
+ * an action.
746
753
  */
747
- declare function MessageActionsMenu({ message, onReply, onPin, onUnpin, onCopy, visible, pinDisabled, className, }: MessageActionsMenuProps): react_jsx_runtime.JSX.Element | null;
754
+ declare function MessageActionsMenu({ message, onReply, onPin, onUnpin, onCopy, pinDisabled, anchorRight, className, }: MessageActionsMenuProps): react_jsx_runtime.JSX.Element;
748
755
 
749
756
  interface ReplyPreviewProps {
750
757
  /** The message being replied to */
package/dist/index.d.ts CHANGED
@@ -141,9 +141,9 @@ interface Message {
141
141
  interface SendMessagePayload {
142
142
  body: string;
143
143
  type: MessageType;
144
- mediaUrl?: string;
145
- mediaDuration?: number;
146
- fileName?: string;
144
+ media_url?: string;
145
+ media_duration?: number;
146
+ file_name?: string;
147
147
  metadata?: Record<string, unknown>;
148
148
  /** ID of message being replied to (snapshot is built server-side) */
149
149
  replyToId?: string;
@@ -200,6 +200,8 @@ interface CollabPopupProps {
200
200
  isOpen: boolean;
201
201
  /** Close the popup */
202
202
  onClose: () => void;
203
+ /** Optional back navigation — renders a ← button in the title bar when provided */
204
+ onBack?: () => void;
203
205
  /** Initial position (defaults to bottom-right) */
204
206
  initialPosition?: {
205
207
  x: number;
@@ -215,7 +217,7 @@ interface CollabPopupProps {
215
217
  * Draggable floating chat popup — drop-in replacement for DraggableChatPopup.
216
218
  * Renders a CollabPanel inside a movable, resizable container.
217
219
  */
218
- declare function CollabPopup({ orderId, patientData, participantIds, isOpen, onClose, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
220
+ declare function CollabPopup({ orderId, patientData, participantIds, isOpen, onClose, onBack, initialPosition, width, height, className, }: CollabPopupProps): react_jsx_runtime.JSX.Element | null;
219
221
 
220
222
  interface CollabInlineProps {
221
223
  orderId: string;
@@ -734,17 +736,22 @@ interface MessageActionsMenuProps {
734
736
  onPin: (messageId: string) => void;
735
737
  onUnpin: (messageId: string) => void;
736
738
  onCopy?: (text: string) => void;
737
- /** True when the menu should show (hover / open state managed by parent) */
738
- visible: boolean;
739
739
  /** Whether we've hit the pin limit — if true, pin is disabled */
740
740
  pinDisabled?: boolean;
741
+ /** Anchor the popover to the left of the trigger (use for own bubbles) */
742
+ anchorRight?: boolean;
741
743
  className?: string;
742
744
  }
743
745
  /**
744
- * Inline action menu for a single message.
745
- * Parent controls visibility (typically via hover state in MessageBubble).
746
+ * Self-contained "⋯" trigger + popover for per-message actions. Replaces
747
+ * the previous hover-only floating menu so touch users (and anyone with
748
+ * a non-pointer device) can reach Reply / Pin / Copy.
749
+ *
750
+ * Menu rows are icon + text so the affordance reads cold; the trigger is
751
+ * a 36px tap target. Closes on outside-click, Escape, or after selecting
752
+ * an action.
746
753
  */
747
- declare function MessageActionsMenu({ message, onReply, onPin, onUnpin, onCopy, visible, pinDisabled, className, }: MessageActionsMenuProps): react_jsx_runtime.JSX.Element | null;
754
+ declare function MessageActionsMenu({ message, onReply, onPin, onUnpin, onCopy, pinDisabled, anchorRight, className, }: MessageActionsMenuProps): react_jsx_runtime.JSX.Element;
748
755
 
749
756
  interface ReplyPreviewProps {
750
757
  /** The message being replied to */