myoperator-ui 0.0.217 → 0.0.218-beta.0

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.
Files changed (2) hide show
  1. package/dist/index.js +149 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5666,7 +5666,7 @@ const DropdownMenuItem = React.forwardRef(({ className, inset, children, descrip
5666
5666
  <DropdownMenuPrimitive.Item
5667
5667
  ref={ref}
5668
5668
  className={cn(
5669
- "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-2 text-sm text-semantic-text-secondary outline-none transition-colors focus:bg-semantic-bg-ui focus:text-semantic-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
5669
+ "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-2 text-sm text-semantic-text-secondary outline-none transition-colors focus:bg-semantic-bg-ui focus:text-semantic-text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
5670
5670
  inset && "pl-8",
5671
5671
  className
5672
5672
  )}
@@ -6432,7 +6432,7 @@ const Tag = React.forwardRef(
6432
6432
  {...props}
6433
6433
  >
6434
6434
  {label && <span className="font-semibold mr-1">{label}</span>}
6435
- <span className="font-normal">{children}</span>
6435
+ <span className="font-normal inline-flex items-center gap-1">{children}</span>
6436
6436
  </span>
6437
6437
  );
6438
6438
  }
@@ -16563,6 +16563,126 @@ export interface ChatBubbleProps extends React.HTMLAttributes<HTMLDivElement> {
16563
16563
  name: "index.ts",
16564
16564
  content: prefixTailwindClasses(`export { ChatBubble } from "./chat-bubble";
16565
16565
  export type { ChatBubbleProps, ChatBubbleReply, DeliveryStatus } from "./types";
16566
+ `, prefix)
16567
+ }
16568
+ ]
16569
+ },
16570
+ "chat-timeline-divider": {
16571
+ name: "chat-timeline-divider",
16572
+ description: "A timeline divider for chat message lists \u2014 renders centered content between horizontal lines with date, unread, and system event variants",
16573
+ category: "custom",
16574
+ dependencies: [
16575
+ "clsx",
16576
+ "tailwind-merge"
16577
+ ],
16578
+ internalDependencies: [],
16579
+ isMultiFile: true,
16580
+ directory: "chat-timeline-divider",
16581
+ mainFile: "chat-timeline-divider.tsx",
16582
+ files: [
16583
+ {
16584
+ name: "chat-timeline-divider.tsx",
16585
+ content: prefixTailwindClasses(`import * as React from "react";
16586
+ import { cn } from "../../../lib/utils";
16587
+
16588
+ /* \u2500\u2500 Types \u2500\u2500 */
16589
+
16590
+ export type ChatTimelineDividerVariant = "default" | "unread" | "system";
16591
+
16592
+ export interface ChatTimelineDividerProps
16593
+ extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
16594
+ /**
16595
+ * Visual style of the divider.
16596
+ * - \`default\`: plain centered text between lines (e.g. "Today", "Yesterday")
16597
+ * - \`unread\`: bold text in a white pill with border (e.g. "3 unread messages")
16598
+ * - \`system\`: muted text in a white pill with border (e.g. "Assigned to Alex Smith")
16599
+ */
16600
+ variant?: ChatTimelineDividerVariant;
16601
+ /** Content to display \u2014 text or ReactNode for rich content (e.g. linked names) */
16602
+ children: React.ReactNode;
16603
+ }
16604
+
16605
+ /* \u2500\u2500 Variant styles \u2500\u2500 */
16606
+
16607
+ const containerStyles: Record<ChatTimelineDividerVariant, string> = {
16608
+ default: "",
16609
+ unread:
16610
+ "bg-white px-2.5 py-0.5 rounded-full border border-semantic-border-layout shadow-sm",
16611
+ system:
16612
+ "bg-white px-2.5 py-1 rounded-full border border-semantic-border-layout shadow-[0px_1px_2px_0px_rgba(10,13,18,0.05)]",
16613
+ };
16614
+
16615
+ const textStyles: Record<ChatTimelineDividerVariant, string> = {
16616
+ default: "text-[13px] text-semantic-text-muted",
16617
+ unread: "text-[12px] font-semibold text-semantic-text-primary",
16618
+ system: "text-[13px] text-semantic-text-muted",
16619
+ };
16620
+
16621
+ /* \u2500\u2500 Component \u2500\u2500 */
16622
+
16623
+ /**
16624
+ * ChatTimelineDivider renders a centered label between two horizontal lines
16625
+ * in a chat message timeline.
16626
+ *
16627
+ * Use it to separate messages by date, mark unread boundaries,
16628
+ * or display system/action events (assignments, resolutions, etc.).
16629
+ *
16630
+ * @example
16631
+ * \`\`\`tsx
16632
+ * // Date separator
16633
+ * <ChatTimelineDivider>Today</ChatTimelineDivider>
16634
+ *
16635
+ * // Unread count
16636
+ * <ChatTimelineDivider variant="unread">3 unread messages</ChatTimelineDivider>
16637
+ *
16638
+ * // System event with linked names
16639
+ * <ChatTimelineDivider variant="system">
16640
+ * Assigned to <span className="text-semantic-text-link font-medium">Alex Smith</span>
16641
+ * </ChatTimelineDivider>
16642
+ * \`\`\`
16643
+ */
16644
+ const ChatTimelineDivider = React.forwardRef<
16645
+ HTMLDivElement,
16646
+ ChatTimelineDividerProps
16647
+ >(
16648
+ (
16649
+ { variant = "default", children, className, ...props },
16650
+ ref
16651
+ ) => {
16652
+ const showLines = true;
16653
+
16654
+ return (
16655
+ <div
16656
+ ref={ref}
16657
+ role="separator"
16658
+ className={cn("flex items-center gap-4 my-2", className)}
16659
+ {...props}
16660
+ >
16661
+ {showLines && (
16662
+ <div className="flex-1 h-px bg-semantic-border-layout" />
16663
+ )}
16664
+ <div className={cn(containerStyles[variant])}>
16665
+ <span className={cn(textStyles[variant])}>{children}</span>
16666
+ </div>
16667
+ {showLines && (
16668
+ <div className="flex-1 h-px bg-semantic-border-layout" />
16669
+ )}
16670
+ </div>
16671
+ );
16672
+ }
16673
+ );
16674
+ ChatTimelineDivider.displayName = "ChatTimelineDivider";
16675
+
16676
+ export { ChatTimelineDivider };
16677
+ `, prefix)
16678
+ },
16679
+ {
16680
+ name: "index.ts",
16681
+ content: prefixTailwindClasses(`export {
16682
+ ChatTimelineDivider,
16683
+ type ChatTimelineDividerProps,
16684
+ type ChatTimelineDividerVariant,
16685
+ } from "./chat-timeline-divider";
16566
16686
  `, prefix)
16567
16687
  }
16568
16688
  ]
@@ -16818,8 +16938,8 @@ export interface ChatComposerProps extends Omit<React.HTMLAttributes<HTMLDivElem
16818
16938
  leftActions?: React.ReactNode;
16819
16939
  /** Slot for right action buttons (rendered inside textarea container, bottom-right) */
16820
16940
  rightActions?: React.ReactNode;
16821
- /** Send button label. Defaults to "Send" */
16822
- sendLabel?: string;
16941
+ /** Send button label. Accepts text or JSX (e.g. icon + text). Defaults to "Send" */
16942
+ sendLabel?: React.ReactNode;
16823
16943
  /** Whether to show the send dropdown chevron. Defaults to false */
16824
16944
  showSendDropdown?: boolean;
16825
16945
  /** Whether the chat is expired (shows template prompt instead of composer) */
@@ -16913,12 +17033,35 @@ const DocMedia = React.forwardRef(
16913
17033
 
16914
17034
  if (variant === "download") {
16915
17035
  return (
16916
- <div ref={ref} className={cn("relative", className)} {...props}>
17036
+ <div
17037
+ ref={ref}
17038
+ className={cn("relative rounded-t overflow-hidden", className)}
17039
+ {...props}
17040
+ >
16917
17041
  <img
16918
17042
  src={thumbnailUrl}
16919
17043
  alt={caption || filename || "Document"}
16920
- className="w-full rounded-t object-cover max-h-[280px]"
17044
+ className="w-full object-cover"
17045
+ style={{ aspectRatio: "442/308" }}
16921
17046
  />
17047
+ <div className="absolute inset-0 bg-gradient-to-t from-[#1d222f] via-[#1d222f]/30 to-transparent" />
17048
+ <div className="absolute bottom-0 left-0 right-0 px-4 py-3">
17049
+ <p className="m-0 text-[14px] font-semibold text-white truncate">
17050
+ {filename || "Document"}
17051
+ </p>
17052
+ <div className="flex items-center gap-1.5 mt-1">
17053
+ <File className="size-3.5 text-white/80" />
17054
+ <span className="text-[12px] text-white/80">
17055
+ {[
17056
+ fileType,
17057
+ pageCount && \`\${pageCount} pages\`,
17058
+ fileSize,
17059
+ ]
17060
+ .filter(Boolean)
17061
+ .join(" \\u00B7 ")}
17062
+ </span>
17063
+ </div>
17064
+ </div>
16922
17065
  </div>
16923
17066
  );
16924
17067
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.217",
3
+ "version": "0.0.218-beta.0",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",