@arbidocs/react 0.4.30 → 0.4.32
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/{chunk-VC2I4NST.cjs → chunk-3AK4QJ62.cjs} +22 -11
- package/dist/chunk-3AK4QJ62.cjs.map +1 -0
- package/dist/{chunk-SDUISFTV.js → chunk-OXUFBF5W.js} +23 -12
- package/dist/chunk-OXUFBF5W.js.map +1 -0
- package/dist/{index-DaTuuykQ.d.cts → index-C99tcxue.d.cts} +6 -3
- package/dist/{index-DaTuuykQ.d.ts → index-C99tcxue.d.ts} +6 -3
- package/dist/index.cjs +284 -284
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +6 -6
- package/dist/ui/index.cjs +148 -148
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-SDUISFTV.js.map +0 -1
- package/dist/chunk-VC2I4NST.cjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MarkdownRenderer } from './chunk-6YSHODMG.js';
|
|
2
1
|
import { getCollisionPadding, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator } from './chunk-N5SVBDLC.js';
|
|
2
|
+
import { MarkdownRenderer } from './chunk-6YSHODMG.js';
|
|
3
3
|
import { cn } from './chunk-SN5YV6FF.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default, { createContext, forwardRef, memo, useContext, useState, useRef, useEffect, useCallback, useId, useMemo, Fragment as Fragment$1 } from 'react';
|
|
6
6
|
import { createPortal } from 'react-dom';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
|
-
import { Circle, Check, X, ChevronDown, ChevronUp, Search, MessageCircleMore, Loader2, Square, Mic, MoreVertical, MessageSquareLock, Info, FileQuestion, BookOpen, Upload, LogOut, LayoutGrid, Bell, MessageSquare, CircleUserRound, Wrench, CreditCard, ClipboardList, UserPlus, UserStar, Settings2, Users, User, NotebookPen, NotebookText, StickyNote, FolderPlus, Hash, EyeOff, Eye, CaptionsOff, FolderOpen, MessageSquareMore, MessageSquarePlus, MessageSquareText, MessageSquareOff, MessagesSquare, Columns3Cog, SquarePlus, SquareM, ChevronsDown, Bot, Calendar, Folder, List, SquareCheckBig,
|
|
8
|
+
import { Circle, Check, X, ChevronDown, ChevronUp, Search, MessageCircleMore, Loader2, Square, Mic, MoreVertical, MessageSquareLock, Info, FileQuestion, BookOpen, Upload, LogOut, LayoutGrid, Bell, MessageSquare, CircleUserRound, Wrench, CreditCard, ClipboardList, UserPlus, UserStar, Settings2, Users, User, NotebookPen, NotebookText, StickyNote, FolderPlus, Hash, EyeOff, Eye, CaptionsOff, FolderOpen, MessageSquareMore, MessageSquarePlus, MessageSquareText, MessageSquareOff, MessagesSquare, Columns3Cog, SquarePlus, SquareM, ChevronsDown, Bot, Calendar, Folder, List, SquareCheckBig, Minus, Plus, Share2, ChevronsUpDown, AlertTriangle, FileX, SkipForward, XCircle, CheckCircle } from 'lucide-react';
|
|
9
9
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
10
10
|
import { cva } from 'class-variance-authority';
|
|
11
11
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -92,14 +92,19 @@ function showsOwnText(el) {
|
|
|
92
92
|
}
|
|
93
93
|
return /\p{L}{2,}/u.test(visible);
|
|
94
94
|
}
|
|
95
|
-
function TooltipTrigger({
|
|
95
|
+
function TooltipTrigger({
|
|
96
|
+
asChild,
|
|
97
|
+
showWithText = false,
|
|
98
|
+
children,
|
|
99
|
+
...props
|
|
100
|
+
}) {
|
|
96
101
|
const ctx = React.useContext(TooltipContext);
|
|
97
102
|
if (!ctx) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
98
103
|
const triggerHandlers = {
|
|
99
104
|
onPointerEnter: (e) => {
|
|
100
105
|
props.onPointerEnter?.(e);
|
|
101
106
|
if (e.pointerType === "touch") return;
|
|
102
|
-
if (showsOwnText(e.currentTarget)) return;
|
|
107
|
+
if (!showWithText && showsOwnText(e.currentTarget)) return;
|
|
103
108
|
ctx.show();
|
|
104
109
|
},
|
|
105
110
|
onPointerLeave: (e) => {
|
|
@@ -114,7 +119,7 @@ function TooltipTrigger({ asChild, children, ...props }) {
|
|
|
114
119
|
},
|
|
115
120
|
onFocus: (e) => {
|
|
116
121
|
props.onFocus?.(e);
|
|
117
|
-
if (isKeyboardFocus(e.target) && !showsOwnText(e.currentTarget)) ctx.show();
|
|
122
|
+
if (isKeyboardFocus(e.target) && (showWithText || !showsOwnText(e.currentTarget))) ctx.show();
|
|
118
123
|
},
|
|
119
124
|
onBlur: (e) => {
|
|
120
125
|
props.onBlur?.(e);
|
|
@@ -224,6 +229,7 @@ function IconToggle({
|
|
|
224
229
|
isActive,
|
|
225
230
|
onToggle,
|
|
226
231
|
colors,
|
|
232
|
+
inactiveColors,
|
|
227
233
|
fillWhenActive = false,
|
|
228
234
|
disabled = false,
|
|
229
235
|
disabledTooltip,
|
|
@@ -257,7 +263,7 @@ function IconToggle({
|
|
|
257
263
|
pointer-coarse:after:absolute pointer-coarse:after:left-1/2 pointer-coarse:after:top-1/2 pointer-coarse:after:size-11 pointer-coarse:after:-translate-x-1/2 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:content-['']
|
|
258
264
|
transition-colors cursor-pointer
|
|
259
265
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
260
|
-
${isActive ? bgColorClass : isMixed ? "bg-
|
|
266
|
+
${isActive ? bgColorClass : isMixed ? "bg-muted-foreground" : inactiveColors?.bg ?? "bg-muted"}
|
|
261
267
|
`,
|
|
262
268
|
children: [
|
|
263
269
|
isActive && !disabled && /* @__PURE__ */ jsx("div", { className: "absolute left-0 w-4 h-4 flex items-center justify-center", children: /* @__PURE__ */ jsx(Minus, { className: "w-2.5 h-2.5 text-white/70 hidden group-hover/toggle:block" }) }),
|
|
@@ -274,7 +280,7 @@ function IconToggle({
|
|
|
274
280
|
children: /* @__PURE__ */ jsx(
|
|
275
281
|
Icon2,
|
|
276
282
|
{
|
|
277
|
-
className: `w-2.5 h-2.5 ${isActive ? textColorClass : "text-muted-foreground"} ${isActive && fillWhenActive ? "fill-current" : ""}`
|
|
283
|
+
className: `w-2.5 h-2.5 ${isActive ? textColorClass : inactiveColors?.text ?? "text-muted-foreground"} ${isActive && fillWhenActive ? "fill-current" : ""}`
|
|
278
284
|
}
|
|
279
285
|
)
|
|
280
286
|
}
|
|
@@ -291,8 +297,8 @@ function IconToggle({
|
|
|
291
297
|
] });
|
|
292
298
|
}
|
|
293
299
|
var COLORS = {
|
|
294
|
-
text: "text-
|
|
295
|
-
bg: "bg-
|
|
300
|
+
text: "text-secondary",
|
|
301
|
+
bg: "bg-secondary"
|
|
296
302
|
};
|
|
297
303
|
function isItemShared(item) {
|
|
298
304
|
return item.shared === true || item.is_shared === true;
|
|
@@ -337,6 +343,7 @@ function VisibilityToggle({
|
|
|
337
343
|
isActive: isAllShared,
|
|
338
344
|
onToggle: handleToggle,
|
|
339
345
|
colors: COLORS,
|
|
346
|
+
inactiveColors: { text: "text-primary", bg: "bg-primary/10" },
|
|
340
347
|
disabled: disabled || itemsArray.length === 0,
|
|
341
348
|
disabledTooltip,
|
|
342
349
|
showLabel,
|
|
@@ -3280,10 +3287,14 @@ var VISIBILITY_ICONS = {
|
|
|
3280
3287
|
};
|
|
3281
3288
|
var VisibilityIcon = ({
|
|
3282
3289
|
isShared,
|
|
3290
|
+
className,
|
|
3283
3291
|
...props
|
|
3284
3292
|
}) => {
|
|
3285
3293
|
const IconComponent = isShared ? VISIBILITY_ICONS.SHARED : VISIBILITY_ICONS.PRIVATE;
|
|
3286
|
-
return React__default.createElement(IconComponent,
|
|
3294
|
+
return React__default.createElement(IconComponent, {
|
|
3295
|
+
...props,
|
|
3296
|
+
className: [isShared ? "text-secondary" : "text-primary", className].filter(Boolean).join(" ")
|
|
3297
|
+
});
|
|
3287
3298
|
};
|
|
3288
3299
|
|
|
3289
3300
|
// src/entities/colors.ts
|
|
@@ -3727,5 +3738,5 @@ function DocumentCard({
|
|
|
3727
3738
|
}
|
|
3728
3739
|
|
|
3729
3740
|
export { AgentBadge, AiMarkdown, ArbiBotHeadIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS2 as BASE_COLORS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateProvider, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY2 as NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VisibilityToggle, badgeVariants, buttonVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, formatElapsed, getDocIcon, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants, useAudioRecorder };
|
|
3730
|
-
//# sourceMappingURL=chunk-
|
|
3731
|
-
//# sourceMappingURL=chunk-
|
|
3741
|
+
//# sourceMappingURL=chunk-OXUFBF5W.js.map
|
|
3742
|
+
//# sourceMappingURL=chunk-OXUFBF5W.js.map
|