@uipath/apollo-wind 2.66.1 → 2.67.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 (57) hide show
  1. package/dist/components/ui/attachment.cjs +174 -0
  2. package/dist/components/ui/attachment.d.ts +39 -0
  3. package/dist/components/ui/attachment.js +113 -0
  4. package/dist/components/ui/bubble.cjs +123 -0
  5. package/dist/components/ui/bubble.d.ts +28 -0
  6. package/dist/components/ui/bubble.js +77 -0
  7. package/dist/components/ui/index.cjs +268 -213
  8. package/dist/components/ui/index.d.ts +6 -1
  9. package/dist/components/ui/index.js +6 -1
  10. package/dist/components/ui/marker.cjs +89 -0
  11. package/dist/components/ui/marker.d.ts +16 -0
  12. package/dist/components/ui/marker.js +46 -0
  13. package/dist/components/ui/message-scroller/index.cjs +58 -0
  14. package/dist/components/ui/message-scroller/index.d.ts +1 -0
  15. package/dist/components/ui/message-scroller/index.js +1 -0
  16. package/dist/components/ui/message-scroller/message-scroller.cjs +137 -0
  17. package/dist/components/ui/message-scroller/message-scroller.d.ts +60 -0
  18. package/dist/components/ui/message-scroller/message-scroller.js +73 -0
  19. package/dist/components/ui/message-scroller/primitive/components.cjs +357 -0
  20. package/dist/components/ui/message-scroller/primitive/components.d.ts +28 -0
  21. package/dist/components/ui/message-scroller/primitive/components.js +299 -0
  22. package/dist/components/ui/message-scroller/primitive/geometry.cjs +232 -0
  23. package/dist/components/ui/message-scroller/primitive/geometry.d.ts +54 -0
  24. package/dist/components/ui/message-scroller/primitive/geometry.js +153 -0
  25. package/dist/components/ui/message-scroller/primitive/index.cjs +53 -0
  26. package/dist/components/ui/message-scroller/primitive/index.d.ts +23 -0
  27. package/dist/components/ui/message-scroller/primitive/index.js +10 -0
  28. package/dist/components/ui/message-scroller/primitive/stores.cjs +81 -0
  29. package/dist/components/ui/message-scroller/primitive/stores.d.ts +6 -0
  30. package/dist/components/ui/message-scroller/primitive/stores.js +38 -0
  31. package/dist/components/ui/message-scroller/primitive/types.cjs +82 -0
  32. package/dist/components/ui/message-scroller/primitive/types.d.ts +89 -0
  33. package/dist/components/ui/message-scroller/primitive/types.js +24 -0
  34. package/dist/components/ui/message-scroller/primitive/use-message-scroller-commands.cjs +213 -0
  35. package/dist/components/ui/message-scroller/primitive/use-message-scroller-commands.d.ts +18 -0
  36. package/dist/components/ui/message-scroller/primitive/use-message-scroller-commands.js +179 -0
  37. package/dist/components/ui/message-scroller/primitive/use-message-scroller-controller.cjs +474 -0
  38. package/dist/components/ui/message-scroller/primitive/use-message-scroller-controller.d.ts +6 -0
  39. package/dist/components/ui/message-scroller/primitive/use-message-scroller-controller.js +440 -0
  40. package/dist/components/ui/message-scroller/primitive/use-message-scroller-refs.cjs +124 -0
  41. package/dist/components/ui/message-scroller/primitive/use-message-scroller-refs.d.ts +52 -0
  42. package/dist/components/ui/message-scroller/primitive/use-message-scroller-refs.js +84 -0
  43. package/dist/components/ui/message-scroller/primitive/use-render.cjs +116 -0
  44. package/dist/components/ui/message-scroller/primitive/use-render.d.ts +21 -0
  45. package/dist/components/ui/message-scroller/primitive/use-render.js +76 -0
  46. package/dist/components/ui/message-scroller/primitive/utils.cjs +41 -0
  47. package/dist/components/ui/message-scroller/primitive/utils.d.ts +3 -0
  48. package/dist/components/ui/message-scroller/primitive/utils.js +7 -0
  49. package/dist/components/ui/message.cjs +96 -0
  50. package/dist/components/ui/message.d.ts +17 -0
  51. package/dist/components/ui/message.js +47 -0
  52. package/dist/index.cjs +164 -51
  53. package/dist/index.d.ts +10 -0
  54. package/dist/index.js +6 -1
  55. package/dist/styles.css +720 -0
  56. package/dist/tailwind.utilities.css +223 -0
  57. package/package.json +1 -1
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ AttachmentActions: ()=>AttachmentActions,
28
+ AttachmentAction: ()=>AttachmentAction,
29
+ AttachmentGroup: ()=>AttachmentGroup,
30
+ AttachmentMedia: ()=>AttachmentMedia,
31
+ AttachmentContent: ()=>AttachmentContent,
32
+ AttachmentTrigger: ()=>AttachmentTrigger,
33
+ AttachmentDescription: ()=>AttachmentDescription,
34
+ AttachmentTitle: ()=>AttachmentTitle,
35
+ Attachment: ()=>Attachment,
36
+ attachmentVariants: ()=>attachmentVariants
37
+ });
38
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
39
+ const react_slot_namespaceObject = require("@radix-ui/react-slot");
40
+ const external_class_variance_authority_namespaceObject = require("class-variance-authority");
41
+ const external_react_namespaceObject = require("react");
42
+ const external_button_cjs_namespaceObject = require("./button.cjs");
43
+ const index_cjs_namespaceObject = require("../../lib/index.cjs");
44
+ const attachmentVariants = (0, external_class_variance_authority_namespaceObject.cva)('group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed', {
45
+ variants: {
46
+ size: {
47
+ default: 'gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2',
48
+ sm: 'gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5',
49
+ xs: 'gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1'
50
+ },
51
+ orientation: {
52
+ horizontal: 'min-w-40 items-center',
53
+ vertical: 'w-24 flex-col has-data-[slot=attachment-content]:w-30'
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ size: 'default',
58
+ orientation: 'horizontal'
59
+ }
60
+ });
61
+ const Attachment = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, state = 'done', size = 'default', orientation = 'horizontal', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
62
+ ref: ref,
63
+ "data-slot": "attachment",
64
+ "data-state": state,
65
+ "data-size": size,
66
+ "data-orientation": orientation,
67
+ className: (0, index_cjs_namespaceObject.cn)(attachmentVariants({
68
+ size,
69
+ orientation
70
+ }), className),
71
+ ...props
72
+ }));
73
+ Attachment.displayName = 'Attachment';
74
+ const attachmentMediaVariants = (0, external_class_variance_authority_namespaceObject.cva)("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
75
+ variants: {
76
+ variant: {
77
+ icon: '',
78
+ image: 'opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover'
79
+ }
80
+ },
81
+ defaultVariants: {
82
+ variant: 'icon'
83
+ }
84
+ });
85
+ const AttachmentMedia = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, variant = 'icon', ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
86
+ ref: ref,
87
+ "data-slot": "attachment-media",
88
+ "data-variant": variant,
89
+ className: (0, index_cjs_namespaceObject.cn)(attachmentMediaVariants({
90
+ variant
91
+ }), className),
92
+ ...props
93
+ }));
94
+ AttachmentMedia.displayName = 'AttachmentMedia';
95
+ const AttachmentContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
96
+ ref: ref,
97
+ "data-slot": "attachment-content",
98
+ className: (0, index_cjs_namespaceObject.cn)('max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1', className),
99
+ ...props
100
+ }));
101
+ AttachmentContent.displayName = 'AttachmentContent';
102
+ const AttachmentTitle = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
103
+ ref: ref,
104
+ "data-slot": "attachment-title",
105
+ className: (0, index_cjs_namespaceObject.cn)('block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer', className),
106
+ ...props
107
+ }));
108
+ AttachmentTitle.displayName = 'AttachmentTitle';
109
+ const AttachmentDescription = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
110
+ ref: ref,
111
+ "data-slot": "attachment-description",
112
+ className: (0, index_cjs_namespaceObject.cn)('mt-0.5 block max-w-full min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80', className),
113
+ ...props
114
+ }));
115
+ AttachmentDescription.displayName = "AttachmentDescription";
116
+ const AttachmentActions = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
117
+ ref: ref,
118
+ "data-slot": "attachment-actions",
119
+ className: (0, index_cjs_namespaceObject.cn)('relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1', className),
120
+ ...props
121
+ }));
122
+ AttachmentActions.displayName = 'AttachmentActions';
123
+ const AttachmentAction = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ variant = 'ghost', size = '3xs', icon = true, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_button_cjs_namespaceObject.Button, {
124
+ ref: ref,
125
+ "data-slot": "attachment-action",
126
+ variant: variant,
127
+ size: size,
128
+ icon: icon,
129
+ ...props
130
+ }));
131
+ AttachmentAction.displayName = 'AttachmentAction';
132
+ const AttachmentTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, asChild = false, type, ...props }, ref)=>{
133
+ const Comp = asChild ? react_slot_namespaceObject.Slot : 'button';
134
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
135
+ ref: ref,
136
+ "data-slot": "attachment-trigger",
137
+ type: asChild ? void 0 : type ?? 'button',
138
+ className: (0, index_cjs_namespaceObject.cn)('absolute inset-0 z-10 outline-none', className),
139
+ ...props
140
+ });
141
+ });
142
+ AttachmentTrigger.displayName = 'AttachmentTrigger';
143
+ const AttachmentGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
144
+ ref: ref,
145
+ "data-slot": "attachment-group",
146
+ className: (0, index_cjs_namespaceObject.cn)('flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start', className),
147
+ ...props
148
+ }));
149
+ AttachmentGroup.displayName = 'AttachmentGroup';
150
+ exports.Attachment = __webpack_exports__.Attachment;
151
+ exports.AttachmentAction = __webpack_exports__.AttachmentAction;
152
+ exports.AttachmentActions = __webpack_exports__.AttachmentActions;
153
+ exports.AttachmentContent = __webpack_exports__.AttachmentContent;
154
+ exports.AttachmentDescription = __webpack_exports__.AttachmentDescription;
155
+ exports.AttachmentGroup = __webpack_exports__.AttachmentGroup;
156
+ exports.AttachmentMedia = __webpack_exports__.AttachmentMedia;
157
+ exports.AttachmentTitle = __webpack_exports__.AttachmentTitle;
158
+ exports.AttachmentTrigger = __webpack_exports__.AttachmentTrigger;
159
+ exports.attachmentVariants = __webpack_exports__.attachmentVariants;
160
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
161
+ "Attachment",
162
+ "AttachmentAction",
163
+ "AttachmentActions",
164
+ "AttachmentContent",
165
+ "AttachmentDescription",
166
+ "AttachmentGroup",
167
+ "AttachmentMedia",
168
+ "AttachmentTitle",
169
+ "AttachmentTrigger",
170
+ "attachmentVariants"
171
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
172
+ Object.defineProperty(exports, '__esModule', {
173
+ value: true
174
+ });
@@ -0,0 +1,39 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ import { type ButtonProps } from './button';
4
+ /**
5
+ * A file or image card for a chat composer or a sent message, ported from shadcn/ui's chat
6
+ * components. `state` drives the chrome: `idle` is a dashed placeholder, `uploading` and
7
+ * `processing` shimmer the title, `error` tints it. `AttachmentGroup` scrolls a row of them with
8
+ * faded edges.
9
+ */
10
+ declare const attachmentVariants: (props?: ({
11
+ size?: "default" | "sm" | "xs" | null | undefined;
12
+ orientation?: "horizontal" | "vertical" | null | undefined;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
+ export type AttachmentState = 'idle' | 'uploading' | 'processing' | 'error' | 'done';
15
+ export interface AttachmentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof attachmentVariants> {
16
+ state?: AttachmentState;
17
+ }
18
+ declare const Attachment: React.ForwardRefExoticComponent<AttachmentProps & React.RefAttributes<HTMLDivElement>>;
19
+ declare const attachmentMediaVariants: (props?: ({
20
+ variant?: "icon" | "image" | null | undefined;
21
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
22
+ export interface AttachmentMediaProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof attachmentMediaVariants> {
23
+ }
24
+ declare const AttachmentMedia: React.ForwardRefExoticComponent<AttachmentMediaProps & React.RefAttributes<HTMLDivElement>>;
25
+ declare const AttachmentContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
26
+ declare const AttachmentTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
27
+ declare const AttachmentDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
28
+ declare const AttachmentActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
29
+ export interface AttachmentActionProps extends ButtonProps {
30
+ }
31
+ /** A `Button` sized for the card: ghost, icon-only and `3xs` unless told otherwise. */
32
+ declare const AttachmentAction: React.ForwardRefExoticComponent<AttachmentActionProps & React.RefAttributes<HTMLButtonElement>>;
33
+ export interface AttachmentTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
34
+ asChild?: boolean;
35
+ }
36
+ /** An invisible full-card hit target, so the whole attachment opens or previews on click. */
37
+ declare const AttachmentTrigger: React.ForwardRefExoticComponent<AttachmentTriggerProps & React.RefAttributes<HTMLButtonElement>>;
38
+ declare const AttachmentGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
39
+ export { Attachment, AttachmentGroup, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentAction, AttachmentTrigger, attachmentVariants, };
@@ -0,0 +1,113 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { forwardRef } from "react";
5
+ import { Button } from "./button.js";
6
+ import { cn } from "../../lib/index.js";
7
+ const attachmentVariants = cva('group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed', {
8
+ variants: {
9
+ size: {
10
+ default: 'gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2',
11
+ sm: 'gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5',
12
+ xs: 'gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1'
13
+ },
14
+ orientation: {
15
+ horizontal: 'min-w-40 items-center',
16
+ vertical: 'w-24 flex-col has-data-[slot=attachment-content]:w-30'
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ size: 'default',
21
+ orientation: 'horizontal'
22
+ }
23
+ });
24
+ const Attachment = /*#__PURE__*/ forwardRef(({ className, state = 'done', size = 'default', orientation = 'horizontal', ...props }, ref)=>/*#__PURE__*/ jsx("div", {
25
+ ref: ref,
26
+ "data-slot": "attachment",
27
+ "data-state": state,
28
+ "data-size": size,
29
+ "data-orientation": orientation,
30
+ className: cn(attachmentVariants({
31
+ size,
32
+ orientation
33
+ }), className),
34
+ ...props
35
+ }));
36
+ Attachment.displayName = 'Attachment';
37
+ const attachmentMediaVariants = cva("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
38
+ variants: {
39
+ variant: {
40
+ icon: '',
41
+ image: 'opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover'
42
+ }
43
+ },
44
+ defaultVariants: {
45
+ variant: 'icon'
46
+ }
47
+ });
48
+ const AttachmentMedia = /*#__PURE__*/ forwardRef(({ className, variant = 'icon', ...props }, ref)=>/*#__PURE__*/ jsx("div", {
49
+ ref: ref,
50
+ "data-slot": "attachment-media",
51
+ "data-variant": variant,
52
+ className: cn(attachmentMediaVariants({
53
+ variant
54
+ }), className),
55
+ ...props
56
+ }));
57
+ AttachmentMedia.displayName = 'AttachmentMedia';
58
+ const AttachmentContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
59
+ ref: ref,
60
+ "data-slot": "attachment-content",
61
+ className: cn('max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1', className),
62
+ ...props
63
+ }));
64
+ AttachmentContent.displayName = 'AttachmentContent';
65
+ const AttachmentTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
66
+ ref: ref,
67
+ "data-slot": "attachment-title",
68
+ className: cn('block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer', className),
69
+ ...props
70
+ }));
71
+ AttachmentTitle.displayName = 'AttachmentTitle';
72
+ const AttachmentDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
73
+ ref: ref,
74
+ "data-slot": "attachment-description",
75
+ className: cn('mt-0.5 block max-w-full min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80', className),
76
+ ...props
77
+ }));
78
+ AttachmentDescription.displayName = "AttachmentDescription";
79
+ const AttachmentActions = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
80
+ ref: ref,
81
+ "data-slot": "attachment-actions",
82
+ className: cn('relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1', className),
83
+ ...props
84
+ }));
85
+ AttachmentActions.displayName = 'AttachmentActions';
86
+ const AttachmentAction = /*#__PURE__*/ forwardRef(({ variant = 'ghost', size = '3xs', icon = true, ...props }, ref)=>/*#__PURE__*/ jsx(Button, {
87
+ ref: ref,
88
+ "data-slot": "attachment-action",
89
+ variant: variant,
90
+ size: size,
91
+ icon: icon,
92
+ ...props
93
+ }));
94
+ AttachmentAction.displayName = 'AttachmentAction';
95
+ const AttachmentTrigger = /*#__PURE__*/ forwardRef(({ className, asChild = false, type, ...props }, ref)=>{
96
+ const Comp = asChild ? Slot : 'button';
97
+ return /*#__PURE__*/ jsx(Comp, {
98
+ ref: ref,
99
+ "data-slot": "attachment-trigger",
100
+ type: asChild ? void 0 : type ?? 'button',
101
+ className: cn('absolute inset-0 z-10 outline-none', className),
102
+ ...props
103
+ });
104
+ });
105
+ AttachmentTrigger.displayName = 'AttachmentTrigger';
106
+ const AttachmentGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
107
+ ref: ref,
108
+ "data-slot": "attachment-group",
109
+ className: cn('flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start', className),
110
+ ...props
111
+ }));
112
+ AttachmentGroup.displayName = 'AttachmentGroup';
113
+ export { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, attachmentVariants };
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ Bubble: ()=>Bubble,
28
+ BubbleContent: ()=>BubbleContent,
29
+ bubbleVariants: ()=>bubbleVariants,
30
+ BubbleGroup: ()=>BubbleGroup,
31
+ BubbleReactions: ()=>BubbleReactions
32
+ });
33
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
+ const react_slot_namespaceObject = require("@radix-ui/react-slot");
35
+ const external_class_variance_authority_namespaceObject = require("class-variance-authority");
36
+ const external_react_namespaceObject = require("react");
37
+ const index_cjs_namespaceObject = require("../../lib/index.cjs");
38
+ const BubbleGroup = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
39
+ ref: ref,
40
+ "data-slot": "bubble-group",
41
+ className: (0, index_cjs_namespaceObject.cn)('flex min-w-0 flex-col gap-2', className),
42
+ ...props
43
+ }));
44
+ BubbleGroup.displayName = 'BubbleGroup';
45
+ const bubbleVariants = (0, external_class_variance_authority_namespaceObject.cva)('group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end', {
46
+ variants: {
47
+ variant: {
48
+ default: '[&>[data-slot=bubble-content]]:bg-primary [&>[data-slot=bubble-content]]:text-primary-foreground',
49
+ secondary: '[&>[data-slot=bubble-content]]:bg-secondary [&>[data-slot=bubble-content]]:text-secondary-foreground',
50
+ muted: '[&>[data-slot=bubble-content]]:bg-surface-overlay',
51
+ outline: '[&>[data-slot=bubble-content]]:border-border [&>[data-slot=bubble-content]]:bg-background',
52
+ ghost: '[&>[data-slot=bubble-content]]:rounded-none [&>[data-slot=bubble-content]]:border-0 [&>[data-slot=bubble-content]]:bg-transparent [&>[data-slot=bubble-content]]:p-0',
53
+ destructive: '[&>[data-slot=bubble-content]]:bg-destructive/10 [&>[data-slot=bubble-content]]:text-destructive'
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ variant: 'default'
58
+ }
59
+ });
60
+ const Bubble = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ variant = 'default', align = 'start', className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
61
+ ref: ref,
62
+ "data-slot": "bubble",
63
+ "data-variant": variant,
64
+ "data-align": align,
65
+ className: (0, index_cjs_namespaceObject.cn)(bubbleVariants({
66
+ variant
67
+ }), className),
68
+ ...props
69
+ }));
70
+ Bubble.displayName = 'Bubble';
71
+ const BubbleContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ asChild = false, className, ...props }, ref)=>{
72
+ const Comp = asChild ? react_slot_namespaceObject.Slot : 'div';
73
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Comp, {
74
+ ref: ref,
75
+ "data-slot": "bubble-content",
76
+ className: (0, index_cjs_namespaceObject.cn)('w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed break-words group-data-[align=end]/bubble:self-end', className),
77
+ ...props
78
+ });
79
+ });
80
+ BubbleContent.displayName = 'BubbleContent';
81
+ const bubbleReactionsVariants = (0, external_class_variance_authority_namespaceObject.cva)('absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-surface-overlay px-1.5 py-0.5 text-sm ring-2 ring-card', {
82
+ variants: {
83
+ side: {
84
+ top: 'top-0 -translate-y-3/4',
85
+ bottom: 'bottom-0 translate-y-3/4'
86
+ },
87
+ align: {
88
+ start: 'left-3',
89
+ end: 'right-3'
90
+ }
91
+ },
92
+ defaultVariants: {
93
+ side: 'bottom',
94
+ align: 'end'
95
+ }
96
+ });
97
+ const BubbleReactions = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ side = 'bottom', align = 'end', className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
98
+ ref: ref,
99
+ "data-slot": "bubble-reactions",
100
+ "data-align": align,
101
+ "data-side": side,
102
+ className: (0, index_cjs_namespaceObject.cn)(bubbleReactionsVariants({
103
+ side,
104
+ align
105
+ }), className),
106
+ ...props
107
+ }));
108
+ BubbleReactions.displayName = 'BubbleReactions';
109
+ exports.Bubble = __webpack_exports__.Bubble;
110
+ exports.BubbleContent = __webpack_exports__.BubbleContent;
111
+ exports.BubbleGroup = __webpack_exports__.BubbleGroup;
112
+ exports.BubbleReactions = __webpack_exports__.BubbleReactions;
113
+ exports.bubbleVariants = __webpack_exports__.bubbleVariants;
114
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
115
+ "Bubble",
116
+ "BubbleContent",
117
+ "BubbleGroup",
118
+ "BubbleReactions",
119
+ "bubbleVariants"
120
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
121
+ Object.defineProperty(exports, '__esModule', {
122
+ value: true
123
+ });
@@ -0,0 +1,28 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ /**
4
+ * The surface of a chat message, ported from shadcn/ui's chat components. `Bubble` positions and
5
+ * colours; `BubbleContent` is the padded box the text lives in, so a bubble can also carry
6
+ * reactions or actions outside that box. Use inside `MessageContent`, or standalone with `align`.
7
+ */
8
+ declare const BubbleGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const bubbleVariants: (props?: ({
10
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "muted" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ export interface BubbleProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof bubbleVariants> {
13
+ /** `end` pins the bubble to the trailing edge when it is not inside an `end`-aligned `Message`. */
14
+ align?: 'start' | 'end';
15
+ }
16
+ declare const Bubble: React.ForwardRefExoticComponent<BubbleProps & React.RefAttributes<HTMLDivElement>>;
17
+ export interface BubbleContentProps extends React.HTMLAttributes<HTMLDivElement> {
18
+ asChild?: boolean;
19
+ }
20
+ declare const BubbleContent: React.ForwardRefExoticComponent<BubbleContentProps & React.RefAttributes<HTMLDivElement>>;
21
+ declare const bubbleReactionsVariants: (props?: ({
22
+ side?: "top" | "bottom" | null | undefined;
23
+ align?: "end" | "start" | null | undefined;
24
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
25
+ export interface BubbleReactionsProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof bubbleReactionsVariants> {
26
+ }
27
+ declare const BubbleReactions: React.ForwardRefExoticComponent<BubbleReactionsProps & React.RefAttributes<HTMLDivElement>>;
28
+ export { BubbleGroup, Bubble, BubbleContent, BubbleReactions, bubbleVariants };
@@ -0,0 +1,77 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva } from "class-variance-authority";
4
+ import { forwardRef } from "react";
5
+ import { cn } from "../../lib/index.js";
6
+ const BubbleGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
7
+ ref: ref,
8
+ "data-slot": "bubble-group",
9
+ className: cn('flex min-w-0 flex-col gap-2', className),
10
+ ...props
11
+ }));
12
+ BubbleGroup.displayName = 'BubbleGroup';
13
+ const bubbleVariants = cva('group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end', {
14
+ variants: {
15
+ variant: {
16
+ default: '[&>[data-slot=bubble-content]]:bg-primary [&>[data-slot=bubble-content]]:text-primary-foreground',
17
+ secondary: '[&>[data-slot=bubble-content]]:bg-secondary [&>[data-slot=bubble-content]]:text-secondary-foreground',
18
+ muted: '[&>[data-slot=bubble-content]]:bg-surface-overlay',
19
+ outline: '[&>[data-slot=bubble-content]]:border-border [&>[data-slot=bubble-content]]:bg-background',
20
+ ghost: '[&>[data-slot=bubble-content]]:rounded-none [&>[data-slot=bubble-content]]:border-0 [&>[data-slot=bubble-content]]:bg-transparent [&>[data-slot=bubble-content]]:p-0',
21
+ destructive: '[&>[data-slot=bubble-content]]:bg-destructive/10 [&>[data-slot=bubble-content]]:text-destructive'
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ variant: 'default'
26
+ }
27
+ });
28
+ const Bubble = /*#__PURE__*/ forwardRef(({ variant = 'default', align = 'start', className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
29
+ ref: ref,
30
+ "data-slot": "bubble",
31
+ "data-variant": variant,
32
+ "data-align": align,
33
+ className: cn(bubbleVariants({
34
+ variant
35
+ }), className),
36
+ ...props
37
+ }));
38
+ Bubble.displayName = 'Bubble';
39
+ const BubbleContent = /*#__PURE__*/ forwardRef(({ asChild = false, className, ...props }, ref)=>{
40
+ const Comp = asChild ? Slot : 'div';
41
+ return /*#__PURE__*/ jsx(Comp, {
42
+ ref: ref,
43
+ "data-slot": "bubble-content",
44
+ className: cn('w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed break-words group-data-[align=end]/bubble:self-end', className),
45
+ ...props
46
+ });
47
+ });
48
+ BubbleContent.displayName = 'BubbleContent';
49
+ const bubbleReactionsVariants = cva('absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-surface-overlay px-1.5 py-0.5 text-sm ring-2 ring-card', {
50
+ variants: {
51
+ side: {
52
+ top: 'top-0 -translate-y-3/4',
53
+ bottom: 'bottom-0 translate-y-3/4'
54
+ },
55
+ align: {
56
+ start: 'left-3',
57
+ end: 'right-3'
58
+ }
59
+ },
60
+ defaultVariants: {
61
+ side: 'bottom',
62
+ align: 'end'
63
+ }
64
+ });
65
+ const BubbleReactions = /*#__PURE__*/ forwardRef(({ side = 'bottom', align = 'end', className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
66
+ ref: ref,
67
+ "data-slot": "bubble-reactions",
68
+ "data-align": align,
69
+ "data-side": side,
70
+ className: cn(bubbleReactionsVariants({
71
+ side,
72
+ align
73
+ }), className),
74
+ ...props
75
+ }));
76
+ BubbleReactions.displayName = 'BubbleReactions';
77
+ export { Bubble, BubbleContent, BubbleGroup, BubbleReactions, bubbleVariants };