@arbidocs/blocks 0.4.154 → 0.4.156

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 (141) hide show
  1. package/dist/{ConnectedNativeDocxComparison-OLWRQSRS.js → ConnectedNativeDocxComparison-2PLOOXSH.js} +7 -7
  2. package/dist/{ConnectedNativeDocxComparison-OLWRQSRS.js.map → ConnectedNativeDocxComparison-2PLOOXSH.js.map} +1 -1
  3. package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs → ConnectedNativeDocxComparison-S25BPUH5.cjs} +8 -8
  4. package/dist/{ConnectedNativeDocxComparison-YORMOPPN.cjs.map → ConnectedNativeDocxComparison-S25BPUH5.cjs.map} +1 -1
  5. package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js → ConnectedNativeDocxEditor-JJAGMHZC.js} +5 -5
  6. package/dist/{ConnectedNativeDocxEditor-34EBIIFS.js.map → ConnectedNativeDocxEditor-JJAGMHZC.js.map} +1 -1
  7. package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs → ConnectedNativeDocxEditor-YA4HWLY4.cjs} +7 -7
  8. package/dist/{ConnectedNativeDocxEditor-EHTWGGX3.cjs.map → ConnectedNativeDocxEditor-YA4HWLY4.cjs.map} +1 -1
  9. package/dist/{ConnectedStreamedWordArtifact-5DK6QGYN.cjs → ConnectedStreamedWordArtifact-EXYZAU4Y.cjs} +8 -8
  10. package/dist/ConnectedStreamedWordArtifact-EXYZAU4Y.cjs.map +1 -0
  11. package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js → ConnectedStreamedWordArtifact-YAAXY5KY.js} +7 -7
  12. package/dist/{ConnectedStreamedWordArtifact-GLIDLSAS.js.map → ConnectedStreamedWordArtifact-YAAXY5KY.js.map} +1 -1
  13. package/dist/{NativeDocxEditor-XT5ZLFGU.js → NativeDocxEditor-JBQMH3MP.js} +3 -3
  14. package/dist/{NativeDocxEditor-XT5ZLFGU.js.map → NativeDocxEditor-JBQMH3MP.js.map} +1 -1
  15. package/dist/{NativeDocxEditor-5VBNM5I7.cjs → NativeDocxEditor-M3I776GD.cjs} +7 -7
  16. package/dist/{NativeDocxEditor-5VBNM5I7.cjs.map → NativeDocxEditor-M3I776GD.cjs.map} +1 -1
  17. package/dist/agents/index.cjs +238 -238
  18. package/dist/agents/index.js +4 -4
  19. package/dist/chat/index.cjs +1 -1
  20. package/dist/chat/index.js +1 -1
  21. package/dist/{chunk-MF5KQ4PS.js → chunk-2CWM2CFZ.js} +4 -4
  22. package/dist/{chunk-MF5KQ4PS.js.map → chunk-2CWM2CFZ.js.map} +1 -1
  23. package/dist/{chunk-QKR5LWDO.js → chunk-6HG56GCT.js} +4 -4
  24. package/dist/{chunk-QKR5LWDO.js.map → chunk-6HG56GCT.js.map} +1 -1
  25. package/dist/chunk-6HMCF4AJ.js +1720 -0
  26. package/dist/chunk-6HMCF4AJ.js.map +1 -0
  27. package/dist/{chunk-KHXEIEXN.js → chunk-7IRSCMNK.js} +3 -3
  28. package/dist/{chunk-KHXEIEXN.js.map → chunk-7IRSCMNK.js.map} +1 -1
  29. package/dist/{chunk-TZOQKV64.js → chunk-EWCJXUBP.js} +3 -3
  30. package/dist/{chunk-TZOQKV64.js.map → chunk-EWCJXUBP.js.map} +1 -1
  31. package/dist/{chunk-CU6LDQ57.js → chunk-F3EZDBDJ.js} +4 -4
  32. package/dist/{chunk-CU6LDQ57.js.map → chunk-F3EZDBDJ.js.map} +1 -1
  33. package/dist/{chunk-YF3QUHKN.cjs → chunk-FEGXFABZ.cjs} +3 -3
  34. package/dist/{chunk-YF3QUHKN.cjs.map → chunk-FEGXFABZ.cjs.map} +1 -1
  35. package/dist/{chunk-GC2FSPSQ.cjs → chunk-HDJRSCRE.cjs} +6 -6
  36. package/dist/{chunk-GC2FSPSQ.cjs.map → chunk-HDJRSCRE.cjs.map} +1 -1
  37. package/dist/{chunk-CQCNU5KT.cjs → chunk-IJEISII2.cjs} +6 -6
  38. package/dist/{chunk-CQCNU5KT.cjs.map → chunk-IJEISII2.cjs.map} +1 -1
  39. package/dist/{chunk-NPR5BGFF.cjs → chunk-JSQEAPTC.cjs} +26 -14
  40. package/dist/chunk-JSQEAPTC.cjs.map +1 -0
  41. package/dist/{chunk-BDA3RHYD.cjs → chunk-MUDEL7UL.cjs} +25 -884
  42. package/dist/chunk-MUDEL7UL.cjs.map +1 -0
  43. package/dist/{chunk-6QAAIDQQ.cjs → chunk-O3FB62T5.cjs} +47 -47
  44. package/dist/{chunk-6QAAIDQQ.cjs.map → chunk-O3FB62T5.cjs.map} +1 -1
  45. package/dist/{chunk-265GOG4W.js → chunk-ONTUMV74.js} +26 -14
  46. package/dist/chunk-ONTUMV74.js.map +1 -0
  47. package/dist/chunk-OTU5KGQ6.cjs +18 -0
  48. package/dist/{chunk-HUATKA3M.cjs.map → chunk-OTU5KGQ6.cjs.map} +1 -1
  49. package/dist/{chunk-GO3BN76C.js → chunk-PGOSIJ2I.js} +3 -3
  50. package/dist/{chunk-GO3BN76C.js.map → chunk-PGOSIJ2I.js.map} +1 -1
  51. package/dist/chunk-S74QMZVZ.cjs +18 -0
  52. package/dist/{chunk-C3SMTA3C.cjs.map → chunk-S74QMZVZ.cjs.map} +1 -1
  53. package/dist/{chunk-KUT2Y7JF.cjs → chunk-TQIY2SVY.cjs} +5 -5
  54. package/dist/{chunk-KUT2Y7JF.cjs.map → chunk-TQIY2SVY.cjs.map} +1 -1
  55. package/dist/{chunk-MNG7N6M2.js → chunk-UKCCV63X.js} +4 -4
  56. package/dist/{chunk-MNG7N6M2.js.map → chunk-UKCCV63X.js.map} +1 -1
  57. package/dist/{chunk-B3FMUFAW.cjs → chunk-UKT3WH5Z.cjs} +3 -3
  58. package/dist/{chunk-B3FMUFAW.cjs.map → chunk-UKT3WH5Z.cjs.map} +1 -1
  59. package/dist/{chunk-P6RIBIVN.js → chunk-UPMADXDU.js} +3 -3
  60. package/dist/{chunk-P6RIBIVN.js.map → chunk-UPMADXDU.js.map} +1 -1
  61. package/dist/{chunk-757OYF6G.cjs → chunk-VY4UFXTM.cjs} +4 -4
  62. package/dist/{chunk-757OYF6G.cjs.map → chunk-VY4UFXTM.cjs.map} +1 -1
  63. package/dist/{chunk-RE7NULEY.js → chunk-W7CWGURO.js} +28 -873
  64. package/dist/chunk-W7CWGURO.js.map +1 -0
  65. package/dist/chunk-WV4TD2HZ.cjs +1785 -0
  66. package/dist/chunk-WV4TD2HZ.cjs.map +1 -0
  67. package/dist/{chunk-WU34CHU5.js → chunk-YMQDDUKW.js} +3 -3
  68. package/dist/{chunk-WU34CHU5.js.map → chunk-YMQDDUKW.js.map} +1 -1
  69. package/dist/connect/docx.cjs +11 -11
  70. package/dist/connect/docx.js +7 -7
  71. package/dist/connect/index.cjs +1313 -151
  72. package/dist/connect/index.cjs.map +1 -1
  73. package/dist/connect/index.d.ts +1 -0
  74. package/dist/connect/index.js +1175 -27
  75. package/dist/connect/index.js.map +1 -1
  76. package/dist/connect/viewer.cjs +48 -52
  77. package/dist/connect/viewer.cjs.map +1 -1
  78. package/dist/connect/viewer.js +10 -14
  79. package/dist/connect/viewer.js.map +1 -1
  80. package/dist/connection/files/DocumentSyncGlyph.d.ts +28 -0
  81. package/dist/connection/files/explorer/ConnectedFilesExplorer.d.ts +56 -0
  82. package/dist/connection/files/explorer/FileTiles.d.ts +87 -0
  83. package/dist/connection/files/index.d.ts +5 -0
  84. package/dist/connection/files/store.d.ts +27 -0
  85. package/dist/connection/files/support.d.ts +38 -0
  86. package/dist/document-tools/index.cjs +1 -1
  87. package/dist/document-tools/index.js +1 -1
  88. package/dist/docx/index.cjs +47 -47
  89. package/dist/docx/index.js +3 -3
  90. package/dist/facts/index.cjs +54 -54
  91. package/dist/facts/index.js +4 -4
  92. package/dist/files/DocStatusIcon.d.ts +5 -4
  93. package/dist/files/FailedStageIcon.d.ts +26 -0
  94. package/dist/files/folders/FolderProviderIcon.d.ts +29 -0
  95. package/dist/files/folders/folderPaths.d.ts +86 -0
  96. package/dist/files/folders/index.d.ts +2 -0
  97. package/dist/files/index.cjs +326 -238
  98. package/dist/files/index.d.ts +5 -0
  99. package/dist/files/index.js +2 -2
  100. package/dist/files/permissions.d.ts +28 -0
  101. package/dist/files/recently-deleted.d.ts +7 -0
  102. package/dist/files/visibility.d.ts +31 -0
  103. package/dist/index.cjs +371 -371
  104. package/dist/index.js +10 -10
  105. package/dist/studio/index.cjs +1 -1
  106. package/dist/studio/index.js +1 -1
  107. package/dist/workflow-canvas/index.cjs +16 -16
  108. package/dist/workflow-canvas/index.js +4 -4
  109. package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs +96 -29
  110. package/node_modules/@arbidocs/coedit/dist/hocuspocus.cjs.map +1 -1
  111. package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.cts +1 -1
  112. package/node_modules/@arbidocs/coedit/dist/hocuspocus.d.ts +1 -1
  113. package/node_modules/@arbidocs/coedit/dist/hocuspocus.js +98 -31
  114. package/node_modules/@arbidocs/coedit/dist/hocuspocus.js.map +1 -1
  115. package/node_modules/@arbidocs/coedit/dist/index.cjs +96 -29
  116. package/node_modules/@arbidocs/coedit/dist/index.cjs.map +1 -1
  117. package/node_modules/@arbidocs/coedit/dist/index.d.cts +1 -1
  118. package/node_modules/@arbidocs/coedit/dist/index.d.ts +1 -1
  119. package/node_modules/@arbidocs/coedit/dist/index.js +98 -31
  120. package/node_modules/@arbidocs/coedit/dist/index.js.map +1 -1
  121. package/node_modules/@arbidocs/coedit/dist/server.cjs +98 -33
  122. package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
  123. package/node_modules/@arbidocs/coedit/dist/server.d.cts +1 -1
  124. package/node_modules/@arbidocs/coedit/dist/server.d.ts +1 -1
  125. package/node_modules/@arbidocs/coedit/dist/server.js +99 -34
  126. package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
  127. package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.cts → session-WGvWs6yO.d.cts} +22 -4
  128. package/node_modules/@arbidocs/coedit/dist/{session-Cf9iu1Vt.d.ts → session-WGvWs6yO.d.ts} +22 -4
  129. package/node_modules/@arbidocs/coedit/package.json +1 -1
  130. package/package.json +6 -5
  131. package/dist/ConnectedStreamedWordArtifact-5DK6QGYN.cjs.map +0 -1
  132. package/dist/chunk-265GOG4W.js.map +0 -1
  133. package/dist/chunk-BDA3RHYD.cjs.map +0 -1
  134. package/dist/chunk-C3SMTA3C.cjs +0 -18
  135. package/dist/chunk-HUATKA3M.cjs +0 -18
  136. package/dist/chunk-JGOST4IL.js +0 -648
  137. package/dist/chunk-JGOST4IL.js.map +0 -1
  138. package/dist/chunk-NPR5BGFF.cjs.map +0 -1
  139. package/dist/chunk-RE7NULEY.js.map +0 -1
  140. package/dist/chunk-YAEXSCUW.cjs +0 -677
  141. package/dist/chunk-YAEXSCUW.cjs.map +0 -1
@@ -1,102 +1,20 @@
1
1
  "use client";
2
+ import { FailedStageIcon } from './chunk-6HMCF4AJ.js';
2
3
  import { ModalBreadcrumbHeader } from './chunk-RC6VTY2H.js';
3
4
  import { ShareControl } from './chunk-K4BGOPGG.js';
4
5
  import { LabelPickerList } from './chunk-SDOEHEJP.js';
5
6
  import { ToneBadge } from './chunk-5LXQPP2K.js';
6
- import { ActionLink } from './chunk-VF5EUAIV.js';
7
7
  import { SelectionBar, SelectionBarAction } from './chunk-NUNKSZKU.js';
8
8
  import { FilterInput } from './chunk-YU2KUMGE.js';
9
9
  import { GridView } from './chunk-N5YEF3LC.js';
10
- import { TONE_SURFACE } from './chunk-AUS3KBHJ.js';
11
10
  import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
12
11
  import { ModalSection, ModalSectionTitle, ModalHeader } from './chunk-TX2ZICS7.js';
13
12
  import { formatCount } from './chunk-OXF2IFXG.js';
14
- import { cva } from 'class-variance-authority';
15
- import { cn, Tooltip, TooltipTrigger, TooltipContent, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Checkbox, getEntityColor, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Input, Popover, PopoverTrigger, PopoverContent, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DialogHeader, Command, CommandList, CommandGroup, CommandItem, CommandSeparator, getTagTypeIcon, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Switch, CommandInput, CommandEmpty } from '@arbidocs/react/ui';
13
+ import { cn, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Checkbox, getEntityColor, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Input, Popover, PopoverTrigger, PopoverContent, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DialogHeader, Command, CommandList, CommandGroup, CommandItem, CommandSeparator, getTagTypeIcon, Switch, CommandInput, CommandEmpty } from '@arbidocs/react/ui';
16
14
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
17
- import { memo, forwardRef, useState, useMemo, useRef, useEffect, useCallback } from 'react';
18
- import { Check, Folder, LoaderCircle, Sparkles, AlertCircle, X, FolderOpen, Loader2, Upload, FileText, FolderPlus, Globe, Download, Copy, FolderInput, Users, XCircle, AlertTriangle, CheckCircle2, Info, RotateCcw, Share2, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, Tags, StickyNote, CopyX, ChevronDown, ExternalLink, Square, RefreshCw, Settings, Unplug, CheckCircle, CircleSlash, Hourglass, Plus, Mail, CornerDownRight, CornerRightDown, GitFork, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, Pencil, FileDown, Trash2, SquareCheckBig, NotebookPen, MoreHorizontal, ArrowRightFromLine, Hash, ArrowDownToLine, Tag, Bot, Calendar, Search, List, Columns3, Save, Undo2, CheckIcon, ArrowUpDown, PencilLine, FolderUp, BookMarked, FileX, UploadCloud, Table2, ArrowRightLeft, ChevronsUpDown } from 'lucide-react';
15
+ import { Check, AlertCircle, X, FolderOpen, Loader2, Upload, FileText, FolderPlus, Globe, Download, Copy, FolderInput, Users, XCircle, AlertTriangle, CheckCircle2, Info, RotateCcw, Share2, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, Tags, StickyNote, CopyX, Sparkles, ChevronDown, ExternalLink, Square, RefreshCw, Settings, Unplug, CheckCircle, CircleSlash, Hourglass, LoaderCircle, Plus, CornerDownRight, CornerRightDown, GitFork, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, Pencil, FileDown, Trash2, SquareCheckBig, NotebookPen, MoreHorizontal, ArrowRightFromLine, Hash, ArrowDownToLine, Tag, Bot, Calendar, Search, Folder, List, Columns3, Save, Undo2, CheckIcon, ArrowUpDown, PencilLine, FolderUp, BookMarked, FileX, Table2, ArrowRightLeft, ChevronsUpDown } from 'lucide-react';
16
+ import { memo, useMemo, useState, useRef, useEffect, useCallback } from 'react';
19
17
 
20
- var pill = cva(
21
- "inline-flex max-w-full items-center justify-center gap-1 rounded-full text-xs font-medium leading-none",
22
- {
23
- variants: {
24
- /** `icon` = glyph-only chip; `label` = text pill. */
25
- shape: { icon: "size-6 p-0 pointer-coarse:size-8", label: "h-6 px-2 pointer-coarse:h-8" },
26
- interactive: {
27
- true: "relative cursor-pointer 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-[''] hover:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
28
- false: ""
29
- }
30
- },
31
- defaultVariants: { shape: "label", interactive: false }
32
- }
33
- );
34
- function StatusPill({
35
- tone = "neutral",
36
- icon,
37
- label,
38
- progress,
39
- title,
40
- onClick,
41
- testId,
42
- className
43
- }) {
44
- const hasLabel = label !== void 0 && label !== null && label !== "";
45
- const classes = cn(
46
- pill({ shape: hasLabel ? "label" : "icon", interactive: !!onClick }),
47
- TONE_SURFACE[tone],
48
- progress && "h-auto min-h-6 flex-col gap-0 px-2 py-1",
49
- className
50
- );
51
- const body = /* @__PURE__ */ jsxs(Fragment, { children: [
52
- /* @__PURE__ */ jsxs("span", { className: "inline-flex max-w-full items-center gap-1", children: [
53
- icon,
54
- hasLabel && /* @__PURE__ */ jsx("span", { className: "truncate", children: label })
55
- ] }),
56
- progress && /* @__PURE__ */ jsx(
57
- "span",
58
- {
59
- "aria-hidden": true,
60
- "data-slot": "status-pill-progress",
61
- className: cn(
62
- "mt-0.5 block h-1 w-full min-w-10 shrink-0 rounded-sm",
63
- progress === "queued" ? "progress-bar-queued" : "progress-bar-processing"
64
- )
65
- }
66
- )
67
- ] });
68
- if (onClick) {
69
- return /* @__PURE__ */ jsx(
70
- "button",
71
- {
72
- type: "button",
73
- title,
74
- "aria-label": hasLabel ? void 0 : title,
75
- "data-slot": "status-pill",
76
- "data-testid": testId,
77
- className: classes,
78
- onClick: (e) => {
79
- e.stopPropagation();
80
- onClick();
81
- },
82
- onKeyDown: (e) => e.stopPropagation(),
83
- children: body
84
- }
85
- );
86
- }
87
- return /* @__PURE__ */ jsx(
88
- "span",
89
- {
90
- title,
91
- role: hasLabel || !title ? void 0 : "img",
92
- "aria-label": hasLabel ? void 0 : title,
93
- "data-slot": "status-pill",
94
- "data-testid": testId,
95
- className: classes,
96
- children: body
97
- }
98
- );
99
- }
100
18
  function FilesToolbar({
101
19
  leftActions,
102
20
  rightActions,
@@ -156,474 +74,6 @@ function FilesSearchInput(props) {
156
74
  }
157
75
  );
158
76
  }
159
- function ExplorerLoadingTiles({
160
- count = 18,
161
- label = "Loading files",
162
- testId,
163
- className,
164
- ...rest
165
- }) {
166
- return /* @__PURE__ */ jsx(
167
- "div",
168
- {
169
- className: cn(
170
- "grid gap-3 [grid-template-columns:repeat(auto-fill,minmax(150px,1fr))]",
171
- className
172
- ),
173
- "aria-busy": "true",
174
- "aria-label": label,
175
- "data-slot": "explorer-loading-tiles",
176
- ...rest,
177
- "data-testid": testIdOr(testId, { testId: "explorer-loading-skeleton" }),
178
- children: Array.from({ length: count }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "aspect-[4/5] animate-pulse rounded-lg bg-muted" }, i))
179
- }
180
- );
181
- }
182
- var DEFAULT_EXPLORER_LABELS = {
183
- moreActions: "More actions",
184
- name: "Name",
185
- select: "Select",
186
- deselect: "Deselect",
187
- empty: "Empty",
188
- itemCount: (count) => formatCount(count, { one: "item", other: "items" }),
189
- processing: (count) => `${count} processing`,
190
- aiSummary: "AI Summary:",
191
- noSummary: "No AI summary is available for this document yet.",
192
- lastModifiedBy: "Last modified by",
193
- shared: "Shared",
194
- private: "Private"
195
- };
196
- function TileLink({
197
- href,
198
- label,
199
- onSelect
200
- }) {
201
- return /* @__PURE__ */ jsx(
202
- ActionLink,
203
- {
204
- href,
205
- onSelect,
206
- "aria-label": label,
207
- "data-slot": "explorer-tile-link",
208
- className: "absolute inset-0 z-10 rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
209
- }
210
- );
211
- }
212
- function isInsideTileLink(e) {
213
- return e.target instanceof Element && !!e.target.closest('[data-slot="explorer-tile-link"]');
214
- }
215
- function ExplorerMenu({
216
- items,
217
- testId,
218
- label,
219
- align,
220
- triggerClassName
221
- }) {
222
- return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
223
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
224
- "button",
225
- {
226
- type: "button",
227
- "aria-label": label,
228
- "data-testid": testId,
229
- onClick: (e) => e.stopPropagation(),
230
- onPointerDown: (e) => e.stopPropagation(),
231
- className: cn(
232
- "flex size-6 items-center justify-center rounded-md bg-background/90 text-muted-foreground backdrop-blur-sm transition hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-background data-[state=open]:text-foreground pointer-coarse:size-11",
233
- triggerClassName
234
- ),
235
- children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" })
236
- }
237
- ) }),
238
- /* @__PURE__ */ jsx(
239
- DropdownMenuContent,
240
- {
241
- align,
242
- onClick: (e) => e.stopPropagation(),
243
- onPointerDown: (e) => e.stopPropagation(),
244
- className: "w-44",
245
- children: items.map((item) => /* @__PURE__ */ jsxs("div", { children: [
246
- item.separatorBefore && /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
247
- item.submenu ? /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
248
- /* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { "data-testid": item.testId, children: [
249
- /* @__PURE__ */ jsx(item.icon, { className: "mr-2 size-4" }),
250
- item.label
251
- ] }),
252
- /* @__PURE__ */ jsx(DropdownMenuSubContent, { className: "w-52", children: item.submenu.map((sub) => /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: sub.onSelect, "data-testid": sub.testId, children: [
253
- /* @__PURE__ */ jsx(sub.icon, { className: "mr-2 size-4" }),
254
- sub.label
255
- ] }, sub.id)) })
256
- ] }) : /* @__PURE__ */ jsxs(
257
- DropdownMenuItem,
258
- {
259
- onSelect: item.onSelect,
260
- "data-testid": item.testId,
261
- className: cn(item.destructive && "text-destructive focus:text-destructive"),
262
- children: [
263
- /* @__PURE__ */ jsx(item.icon, { className: "mr-2 size-4" }),
264
- item.label
265
- ]
266
- }
267
- )
268
- ] }, item.id))
269
- }
270
- )
271
- ] });
272
- }
273
- function RenameField({
274
- seed,
275
- testId,
276
- label,
277
- onCommit,
278
- onCancel,
279
- className
280
- }) {
281
- const doneRef = useRef(false);
282
- const commit = (value) => {
283
- if (doneRef.current) return;
284
- doneRef.current = true;
285
- const trimmed = value.trim();
286
- if (trimmed && trimmed !== seed) onCommit(trimmed);
287
- else onCancel();
288
- };
289
- return /* @__PURE__ */ jsx(
290
- "input",
291
- {
292
- autoFocus: true,
293
- defaultValue: seed,
294
- "data-testid": testId,
295
- "aria-label": label,
296
- onFocus: (e) => e.currentTarget.select(),
297
- onClick: (e) => e.stopPropagation(),
298
- onPointerDown: (e) => e.stopPropagation(),
299
- onDoubleClick: (e) => e.stopPropagation(),
300
- onKeyDown: (e) => {
301
- if (e.key === "Enter") {
302
- e.preventDefault();
303
- commit(e.currentTarget.value);
304
- } else if (e.key === "Escape") {
305
- e.preventDefault();
306
- doneRef.current = true;
307
- onCancel();
308
- }
309
- },
310
- onBlur: (e) => commit(e.currentTarget.value),
311
- className: cn(
312
- "w-full rounded-md border border-primary bg-background px-1 py-0.5 text-sm text-foreground outline-none",
313
- className
314
- )
315
- }
316
- );
317
- }
318
- function SelectCheckbox({
319
- selected,
320
- onToggle,
321
- labels,
322
- className
323
- }) {
324
- return /* @__PURE__ */ jsx(
325
- Checkbox,
326
- {
327
- checked: selected,
328
- onPointerDown: (e) => e.stopPropagation(),
329
- onClick: onToggle,
330
- "aria-label": selected ? labels.deselect : labels.select,
331
- className: cn(
332
- "size-6 rounded-md border-muted-foreground/60 bg-card transition data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground pointer-coarse:size-9",
333
- selected ? "opacity-100" : "opacity-60 hover:opacity-100",
334
- className
335
- )
336
- }
337
- );
338
- }
339
- function ExplorerFileTile({
340
- id,
341
- title,
342
- density,
343
- selected,
344
- dragging,
345
- renaming,
346
- thumbnailUrl,
347
- renderFileIcon,
348
- progress,
349
- statusMarker,
350
- offlineMarker,
351
- entity,
352
- tooltip,
353
- menuItems,
354
- rootRef,
355
- rootProps,
356
- onOpen,
357
- href,
358
- labels,
359
- testIds,
360
- onSelect,
361
- onToggle,
362
- onCommitRename,
363
- onCancelRename
364
- }) {
365
- const l = { ...DEFAULT_EXPLORER_LABELS, ...labels };
366
- const [thumbFailed, setThumbFailed] = useState(false);
367
- const [thumbLandscape, setThumbLandscape] = useState(false);
368
- const showThumbnail = !!thumbnailUrl && !thumbFailed && !progress;
369
- const tile = /* @__PURE__ */ jsxs(
370
- "div",
371
- {
372
- ref: rootRef,
373
- ...rootProps,
374
- onClick: (e) => {
375
- if (href && isInsideTileLink(e)) {
376
- if (e.shiftKey) {
377
- e.preventDefault();
378
- onSelect(e);
379
- }
380
- return;
381
- }
382
- if (e.shiftKey || e.metaKey || e.ctrlKey) onSelect(e);
383
- else onOpen();
384
- },
385
- onDoubleClick: onOpen,
386
- "data-slot": "explorer-file-tile",
387
- "data-testid": testIdOr(testIds?.root, { testId: "explorer-file" }),
388
- "data-doc-id": id,
389
- className: cn(
390
- "group relative h-full cursor-default select-none overflow-hidden rounded-lg border transition",
391
- dragging && "opacity-40",
392
- selected ? "border-primary/30 bg-accent" : "border-border bg-muted hover:bg-muted/70"
393
- ),
394
- children: [
395
- href && /* @__PURE__ */ jsx(TileLink, { href, label: title, onSelect: onOpen }),
396
- showThumbnail ? /* @__PURE__ */ jsx(
397
- "img",
398
- {
399
- src: thumbnailUrl,
400
- alt: "",
401
- loading: "lazy",
402
- draggable: false,
403
- onError: () => setThumbFailed(true),
404
- onLoad: (e) => setThumbLandscape(e.currentTarget.naturalWidth > e.currentTarget.naturalHeight),
405
- className: cn(
406
- "absolute inset-0 size-full bg-card",
407
- thumbLandscape ? "object-contain" : "object-cover object-top"
408
- )
409
- }
410
- ) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: renderFileIcon(density === "list" ? 30 : 44) }),
411
- progress && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-1.5 bg-background/80 px-3", children: [
412
- /* @__PURE__ */ jsx(
413
- "div",
414
- {
415
- className: cn(
416
- "h-1.5 w-full rounded-sm",
417
- progress.queued ? "progress-bar-queued" : "progress-bar-processing"
418
- )
419
- }
420
- ),
421
- /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-primary", children: progress.label })
422
- ] }),
423
- /* @__PURE__ */ jsx(
424
- SelectCheckbox,
425
- {
426
- selected,
427
- onToggle,
428
- labels: l,
429
- className: "absolute left-1.5 top-1.5 z-20"
430
- }
431
- ),
432
- /* @__PURE__ */ jsx("div", { className: "absolute right-1.5 top-1.5 z-20", children: /* @__PURE__ */ jsx(
433
- ExplorerMenu,
434
- {
435
- items: menuItems,
436
- testId: testIdOr(testIds?.menu, { testId: "explorer-file-menu" }),
437
- label: l.moreActions,
438
- align: "start"
439
- }
440
- ) }),
441
- renaming ? /* @__PURE__ */ jsxs("div", { className: "absolute inset-x-0 bottom-0 z-20 flex items-center gap-1 bg-background/90 px-1.5 py-1 backdrop-blur-sm", children: [
442
- /* @__PURE__ */ jsx("span", { className: "shrink-0", children: renderFileIcon(13) }),
443
- /* @__PURE__ */ jsx(
444
- RenameField,
445
- {
446
- seed: title,
447
- testId: testIdOr(testIds?.renameInput, { testId: "explorer-rename-input" }),
448
- label: l.name,
449
- onCommit: onCommitRename,
450
- onCancel: onCancelRename,
451
- className: "flex-1 text-left"
452
- }
453
- )
454
- ] }) : /* @__PURE__ */ jsxs("div", { className: "absolute inset-x-1.5 bottom-1.5 z-20 flex flex-col gap-1", children: [
455
- (offlineMarker || statusMarker) && /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
456
- offlineMarker,
457
- statusMarker && /* @__PURE__ */ jsx("div", { className: "ml-auto flex", children: statusMarker })
458
- ] }),
459
- entity
460
- ] })
461
- ]
462
- }
463
- );
464
- if (!tooltip) return tile;
465
- return /* @__PURE__ */ jsxs(Tooltip, { delayDuration: 500, children: [
466
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: tile }),
467
- /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", sideOffset: 6, className: "p-2.5", children: tooltip })
468
- ] });
469
- }
470
- function ExplorerFolderTile({
471
- name,
472
- displayName,
473
- path,
474
- count,
475
- density,
476
- editing,
477
- selected,
478
- partiallySelected,
479
- processingCount = 0,
480
- isOver,
481
- icon,
482
- menuItems = [],
483
- rootRef,
484
- rootProps,
485
- onOpen,
486
- href,
487
- labels,
488
- testIds,
489
- onToggleSelect,
490
- onCommitName,
491
- onCancelName
492
- }) {
493
- const l = { ...DEFAULT_EXPLORER_LABELS, ...labels };
494
- const iconSize = density === "list" ? 34 : 48;
495
- const isEmpty = count === 0;
496
- const countLabel = isEmpty ? l.empty : l.itemCount(count);
497
- const joined = path.join("/");
498
- return /* @__PURE__ */ jsxs(
499
- "div",
500
- {
501
- ref: rootRef,
502
- ...rootProps,
503
- onClick: editing || href ? void 0 : onOpen,
504
- "data-slot": "explorer-folder-tile",
505
- "data-testid": testIdOr(testIds?.root, { testId: "explorer-folder" }),
506
- "data-folder-path": joined,
507
- title: name,
508
- className: cn(
509
- "group relative flex h-full cursor-pointer select-none flex-col items-center justify-center gap-1 rounded-lg p-2 text-center transition",
510
- isOver ? "bg-accent ring-2 ring-primary/40" : selected ? "bg-accent ring-1 ring-primary/30" : "bg-muted hover:bg-muted/70",
511
- isEmpty && !isOver && !selected && "opacity-70"
512
- ),
513
- children: [
514
- href && !editing && /* @__PURE__ */ jsx(TileLink, { href, label: displayName || name, onSelect: onOpen }),
515
- onToggleSelect && !isEmpty && /* @__PURE__ */ jsx(
516
- SelectCheckbox,
517
- {
518
- selected: !!selected,
519
- onToggle: onToggleSelect,
520
- labels: l,
521
- className: cn(
522
- "absolute left-1.5 top-1.5 z-20",
523
- partiallySelected && !selected && "opacity-100"
524
- )
525
- }
526
- ),
527
- menuItems.length > 0 && !editing && /* @__PURE__ */ jsx("div", { className: "absolute right-1 top-1 z-20", children: /* @__PURE__ */ jsx(
528
- ExplorerMenu,
529
- {
530
- items: menuItems,
531
- testId: testIdOr(testIds?.menu, { testId: "explorer-folder-menu" }),
532
- label: l.moreActions,
533
- align: "end"
534
- }
535
- ) }),
536
- icon ?? /* @__PURE__ */ jsx(
537
- Folder,
538
- {
539
- className: cn(
540
- "transition",
541
- isEmpty ? "text-yellow-text/50" : "fill-yellow-text/30 text-yellow-text group-hover:fill-yellow-text/40"
542
- ),
543
- size: iconSize
544
- }
545
- ),
546
- editing ? /* @__PURE__ */ jsx(
547
- RenameField,
548
- {
549
- seed: name,
550
- testId: testIdOr(testIds?.renameInput, { testId: "explorer-rename-input" }),
551
- label: l.name,
552
- onCommit: (next) => onCommitName?.(next),
553
- onCancel: () => onCancelName?.(),
554
- className: "text-center"
555
- }
556
- ) : displayName && /* @__PURE__ */ jsx(
557
- "span",
558
- {
559
- className: cn(
560
- "line-clamp-2 w-full break-words text-xs font-semibold leading-tight",
561
- isEmpty ? "text-foreground/60" : "text-foreground/90"
562
- ),
563
- children: displayName
564
- }
565
- ),
566
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: countLabel }),
567
- processingCount > 0 && /* @__PURE__ */ jsxs(
568
- "span",
569
- {
570
- className: "inline-flex items-center gap-1 text-xs font-semibold text-primary",
571
- "data-testid": testIdOr(testIds?.processing, {
572
- testId: `explorer-folder-processing-${joined}`
573
- }),
574
- children: [
575
- /* @__PURE__ */ jsx(LoaderCircle, { className: "size-3 animate-spin" }),
576
- l.processing(processingCount)
577
- ]
578
- }
579
- )
580
- ]
581
- }
582
- );
583
- }
584
- function ExplorerFileTooltip({
585
- title,
586
- summary,
587
- modifiedLabel,
588
- modifiedByAvatar,
589
- shared,
590
- visibilityIcon,
591
- labels,
592
- uiLabels
593
- }) {
594
- const l = { ...DEFAULT_EXPLORER_LABELS, ...uiLabels };
595
- return /* @__PURE__ */ jsxs("div", { className: "max-w-xs space-y-2", children: [
596
- /* @__PURE__ */ jsx("div", { className: "break-words text-xs font-semibold leading-snug text-foreground", children: title }),
597
- /* @__PURE__ */ jsxs("div", { className: "space-y-1 border-t border-border pt-1.5", children: [
598
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs font-semibold text-foreground", children: [
599
- /* @__PURE__ */ jsx(Sparkles, { className: "size-3.5 shrink-0 text-yellow-text" }),
600
- l.aiSummary
601
- ] }),
602
- /* @__PURE__ */ jsx("p", { className: "line-clamp-6 text-xs leading-snug text-foreground/90", children: summary?.trim() || l.noSummary })
603
- ] }),
604
- (modifiedLabel || labels.length > 0) && /* @__PURE__ */ jsxs("div", { className: "space-y-1.5 border-t border-border pt-1.5", children: [
605
- modifiedLabel && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 text-xs text-muted-foreground", children: [
606
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-1", children: [
607
- /* @__PURE__ */ jsx("span", { children: l.lastModifiedBy }),
608
- modifiedByAvatar,
609
- /* @__PURE__ */ jsx("span", { children: modifiedLabel })
610
- ] }),
611
- /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [
612
- visibilityIcon,
613
- /* @__PURE__ */ jsx("span", { children: shared ? l.shared : l.private })
614
- ] })
615
- ] }),
616
- labels.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 pt-0.5", children: labels.map((label) => /* @__PURE__ */ jsx(
617
- "span",
618
- {
619
- className: "rounded bg-muted px-1.5 py-0.5 text-xs font-medium text-foreground/80",
620
- children: label
621
- },
622
- label
623
- )) })
624
- ] })
625
- ] });
626
- }
627
77
 
628
78
  // src/files/documentGridLayout.ts
629
79
  function resolveDocumentGridLayout(isNarrow, isModal, isTablet = false) {
@@ -3241,220 +2691,6 @@ function MediaPreviewView({ kind, src, testId, labels }) {
3241
2691
  kind === "audio" && /* @__PURE__ */ jsx("audio", { className: "w-full p-2", src, controls: true, preload: "metadata" })
3242
2692
  ] });
3243
2693
  }
3244
- function GmailMark({ className }) {
3245
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 256 193", className, "aria-hidden": "true", focusable: "false", children: [
3246
- /* @__PURE__ */ jsx(
3247
- "path",
3248
- {
3249
- fill: "#4285F4",
3250
- d: "M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455z"
3251
- }
3252
- ),
3253
- /* @__PURE__ */ jsx(
3254
- "path",
3255
- {
3256
- fill: "#34A853",
3257
- d: "M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-27.026 25.798z"
3258
- }
3259
- ),
3260
- /* @__PURE__ */ jsx(
3261
- "path",
3262
- {
3263
- fill: "#EA4335",
3264
- d: "m58.182 93.14-4.174-38.647 4.174-36.989L128 69.868l69.818-52.364 4.669 34.992-4.669 40.644L128 145.504z"
3265
- }
3266
- ),
3267
- /* @__PURE__ */ jsx(
3268
- "path",
3269
- {
3270
- fill: "#FBBC04",
3271
- d: "M197.818 17.504V93.14L256 49.504V26.231c0-21.585-24.64-33.89-41.89-20.945z"
3272
- }
3273
- ),
3274
- /* @__PURE__ */ jsx(
3275
- "path",
3276
- {
3277
- fill: "#C5221F",
3278
- d: "M0 49.504 26.759 69.574 58.182 93.14V17.504L41.89 5.286C24.61-7.66 0 4.646 0 26.231z"
3279
- }
3280
- )
3281
- ] });
3282
- }
3283
- function OutlookMark({ className }) {
3284
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 48 48", className, "aria-hidden": "true", focusable: "false", children: [
3285
- /* @__PURE__ */ jsx("path", { fill: "#0F6CBD", d: "M44 13H24v22h18.5A1.5 1.5 0 0 0 44 33.5z" }),
3286
- /* @__PURE__ */ jsx("path", { fill: "#28A8EA", d: "M24 15.5 44 13v3L24 27z" }),
3287
- /* @__PURE__ */ jsx("rect", { x: "4", y: "9", width: "21", height: "30", rx: "2.5", fill: "#0364B8" }),
3288
- /* @__PURE__ */ jsx("ellipse", { cx: "14.5", cy: "24", rx: "6.2", ry: "7", fill: "none", stroke: "#fff", strokeWidth: "3.1" })
3289
- ] });
3290
- }
3291
- function OneDriveMark({ className }) {
3292
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 256 165", className, "aria-hidden": "true", focusable: "false", children: [
3293
- /* @__PURE__ */ jsx(
3294
- "path",
3295
- {
3296
- fill: "#0364B8",
3297
- d: "M154.66056 110.681557 207.502052 60.1479482C196.525811 17.3487078 152.932256-8.44908883 110.132767 2.52715287 90.8589801 7.46999082 74.1187452 19.4179992 63.179535 36.0386895 63.9974594 36.0180612 154.66056 110.681557 154.66056 110.681557Z"
3298
- }
3299
- ),
3300
- /* @__PURE__ */ jsx(
3301
- "path",
3302
- {
3303
- fill: "#0078D4",
3304
- d: "M97.6181022 45.5520619 97.6156169 45.5607606C87.5186874 39.307156 75.8741386 36.001658 63.9972108 36.0177537 63.7228296 36.0177537 63.4531706 36.03521 63.1792865 36.0384409 27.8517142 36.4761088-.432413365 65.4695515.00500592252 100.797124.163570414 113.612018 4.16769663 126.083687 11.4981977 136.595916L90.6631356 126.680913 151.357298 77.7409022 97.6181022 45.5520619Z"
3305
- }
3306
- ),
3307
- /* @__PURE__ */ jsx(
3308
- "path",
3309
- {
3310
- fill: "#1490DF",
3311
- d: "M207.502052 60.1481967C206.340406 60.0706542 205.173043 60.016946 203.992011 60.016946 196.903085 60.010012 189.887973 61.4579693 183.381112 64.271122L183.379621 64.2656543 151.357547 77.7411507 186.65952 121.347877 249.770673 136.689364C263.390071 111.405536 253.93411 79.8683506 228.650281 66.2489531 222.117076 62.7297161 214.906119 60.6497377 207.502301 60.1484453L207.502301 60.1481967 207.502052 60.1481967Z"
3312
- }
3313
- ),
3314
- /* @__PURE__ */ jsx(
3315
- "path",
3316
- {
3317
- fill: "#28A8EA",
3318
- d: "M11.4981977 136.595916C23.4514253 153.781772 43.063467 164.023845 63.9974594 164.012918L203.991762 164.012918C223.115435 164.018377 240.697951 153.524291 249.770425 136.689862L151.357298 77.7409022 11.4981977 136.595916Z"
3319
- }
3320
- )
3321
- ] });
3322
- }
3323
- function SharePointMark({ className }) {
3324
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 48 48", className, "aria-hidden": "true", focusable: "false", children: [
3325
- /* @__PURE__ */ jsx("circle", { cx: "22", cy: "22", r: "20", fill: "#036C70" }),
3326
- /* @__PURE__ */ jsx("circle", { cx: "16", cy: "20", r: "12", fill: "#1A9BA1" }),
3327
- /* @__PURE__ */ jsx("circle", { cx: "26", cy: "30", r: "10", fill: "#37C6D0" }),
3328
- /* @__PURE__ */ jsx("circle", { cx: "33", cy: "22", r: "8", fill: "#fff", opacity: "0.15" })
3329
- ] });
3330
- }
3331
- function GoogleDriveMark({ className }) {
3332
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 87.3 78", className, "aria-hidden": "true", focusable: "false", children: [
3333
- /* @__PURE__ */ jsx(
3334
- "path",
3335
- {
3336
- fill: "#0066da",
3337
- d: "M6.6 66.85l3.85 6.65c.8 1.4 1.95 2.5 3.3 3.3l13.75-23.8H0c0 1.55.4 3.1 1.2 4.5z"
3338
- }
3339
- ),
3340
- /* @__PURE__ */ jsx(
3341
- "path",
3342
- {
3343
- fill: "#00ac47",
3344
- d: "M43.65 25L29.9 1.2c-1.35.8-2.5 1.9-3.3 3.3L1.2 48.5A9.06 9.06 0 0 0 0 53h27.5z"
3345
- }
3346
- ),
3347
- /* @__PURE__ */ jsx(
3348
- "path",
3349
- {
3350
- fill: "#ea4335",
3351
- d: "M73.55 76.8c1.35-.8 2.5-1.9 3.3-3.3l1.6-2.75L86.1 57.4c.8-1.4 1.2-2.95 1.2-4.5H59.798l5.85 11.5z"
3352
- }
3353
- ),
3354
- /* @__PURE__ */ jsx(
3355
- "path",
3356
- {
3357
- fill: "#00832d",
3358
- d: "M43.65 25L57.4 1.2C56.05.4 54.5 0 52.9 0H34.4c-1.6 0-3.15.45-4.5 1.2z"
3359
- }
3360
- ),
3361
- /* @__PURE__ */ jsx(
3362
- "path",
3363
- {
3364
- fill: "#2684fc",
3365
- d: "M59.8 53H27.5L13.75 76.8c1.35.8 2.9 1.2 4.5 1.2h50.8c1.6 0 3.15-.45 4.5-1.2z"
3366
- }
3367
- ),
3368
- /* @__PURE__ */ jsx(
3369
- "path",
3370
- {
3371
- fill: "#ffba00",
3372
- d: "M73.4 26.5L60.65 4.5c-.8-1.4-1.95-2.5-3.3-3.3L43.65 25l16.15 28h27.45c0-1.55-.4-3.1-1.2-4.5z"
3373
- }
3374
- )
3375
- ] });
3376
- }
3377
- function BoxMark({ className }) {
3378
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 48 48", className, "aria-hidden": "true", focusable: "false", children: [
3379
- /* @__PURE__ */ jsx("rect", { width: "48", height: "48", rx: "10", fill: "#0061D5" }),
3380
- /* @__PURE__ */ jsx(
3381
- "path",
3382
- {
3383
- fill: "none",
3384
- stroke: "#fff",
3385
- strokeWidth: "2.5",
3386
- strokeLinejoin: "round",
3387
- strokeLinecap: "round",
3388
- d: "M24 13 36 19 36 29 24 35 12 29 12 19Z"
3389
- }
3390
- ),
3391
- /* @__PURE__ */ jsx(
3392
- "path",
3393
- {
3394
- fill: "none",
3395
- stroke: "#fff",
3396
- strokeWidth: "2.5",
3397
- strokeLinejoin: "round",
3398
- strokeLinecap: "round",
3399
- d: "M12 19 24 25 36 19 M24 25 24 35"
3400
- }
3401
- )
3402
- ] });
3403
- }
3404
- function DropboxMark({ className }) {
3405
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 48 48", className, "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ jsxs("g", { fill: "#0061FF", children: [
3406
- /* @__PURE__ */ jsx("path", { d: "M12 6 0 14l12 8 12-8z" }),
3407
- /* @__PURE__ */ jsx("path", { d: "M36 6 24 14l12 8 12-8z" }),
3408
- /* @__PURE__ */ jsx("path", { d: "M0 30l12 8 12-8-12-8z" }),
3409
- /* @__PURE__ */ jsx("path", { d: "M36 22 24 30l12 8 12-8z" }),
3410
- /* @__PURE__ */ jsx("path", { d: "M12 40.5 24 33l12 7.5L24 48z" })
3411
- ] }) });
3412
- }
3413
- function OneNoteMark({ className }) {
3414
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 48 48", className, "aria-hidden": "true", focusable: "false", children: [
3415
- /* @__PURE__ */ jsx("rect", { width: "48", height: "48", rx: "10", fill: "#7719AA" }),
3416
- /* @__PURE__ */ jsx("rect", { x: "10", y: "10", width: "21", height: "28", rx: "2.5", fill: "#fff", opacity: "0.95" }),
3417
- /* @__PURE__ */ jsx("rect", { x: "31", y: "15", width: "7", height: "5", rx: "1.5", fill: "#fff", opacity: "0.6" }),
3418
- /* @__PURE__ */ jsx("rect", { x: "31", y: "22", width: "7", height: "5", rx: "1.5", fill: "#fff", opacity: "0.6" }),
3419
- /* @__PURE__ */ jsx("rect", { x: "31", y: "29", width: "7", height: "5", rx: "1.5", fill: "#fff", opacity: "0.6" })
3420
- ] });
3421
- }
3422
- function ClioMark({ className }) {
3423
- return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 48 48", className, "aria-hidden": "true", focusable: "false", children: [
3424
- /* @__PURE__ */ jsx("rect", { width: "48", height: "48", rx: "10", fill: "#00263E" }),
3425
- /* @__PURE__ */ jsx(
3426
- "path",
3427
- {
3428
- fill: "none",
3429
- stroke: "#4FC3F7",
3430
- strokeWidth: "4.5",
3431
- strokeLinecap: "round",
3432
- d: "M32 17a10 10 0 1 0 0 14"
3433
- }
3434
- )
3435
- ] });
3436
- }
3437
- function VendorLogo({
3438
- vendorKey,
3439
- className = "h-4 w-4",
3440
- product
3441
- }) {
3442
- if (product === "onedrive") return /* @__PURE__ */ jsx(OneDriveMark, { className });
3443
- if (product === "googledrive") return /* @__PURE__ */ jsx(GoogleDriveMark, { className });
3444
- if (product === "sharepoint") return /* @__PURE__ */ jsx(SharePointMark, { className });
3445
- if (product === "box") return /* @__PURE__ */ jsx(BoxMark, { className });
3446
- if (product === "dropbox") return /* @__PURE__ */ jsx(DropboxMark, { className });
3447
- if (product === "onenote") return /* @__PURE__ */ jsx(OneNoteMark, { className });
3448
- if (product === "clio") return /* @__PURE__ */ jsx(ClioMark, { className });
3449
- if (vendorKey === "gmail") return /* @__PURE__ */ jsx(GmailMark, { className });
3450
- if (vendorKey === "microsoft") return /* @__PURE__ */ jsx(OutlookMark, { className });
3451
- if (vendorKey === "microsoft_sharepoint") return /* @__PURE__ */ jsx(SharePointMark, { className });
3452
- if (vendorKey === "box") return /* @__PURE__ */ jsx(BoxMark, { className });
3453
- if (vendorKey === "dropbox") return /* @__PURE__ */ jsx(DropboxMark, { className });
3454
- if (vendorKey === "onenote") return /* @__PURE__ */ jsx(OneNoteMark, { className });
3455
- if (vendorKey === "clio") return /* @__PURE__ */ jsx(ClioMark, { className });
3456
- return /* @__PURE__ */ jsx(Mail, { className: `${className} text-muted-foreground`, "aria-hidden": "true" });
3457
- }
3458
2694
  function RelatedBadge({
3459
2695
  icon: Icon,
3460
2696
  count,
@@ -6450,10 +5686,29 @@ var STATUS = {
6450
5686
  processing: { Icon: Loader2, title: "Indexing", tone: "text-muted-foreground", spin: true },
6451
5687
  queued: { Icon: Hourglass, title: "Queued", tone: "text-yellow-text" }
6452
5688
  };
6453
- function DocStatusIcon({ status, onClick, failed, className }) {
5689
+ function DocStatusIcon({
5690
+ status,
5691
+ onClick,
5692
+ failedStage,
5693
+ errorMessage,
5694
+ className
5695
+ }) {
6454
5696
  if (!status) return null;
6455
5697
  const key = status.toLowerCase();
6456
- if (key === "failed") return /* @__PURE__ */ jsx(Fragment, { children: failed });
5698
+ if (key === "failed") {
5699
+ return /* @__PURE__ */ jsx(
5700
+ FailedStageIcon,
5701
+ {
5702
+ stage: failedStage,
5703
+ errorMessage,
5704
+ className: cn("size-3 text-red-text", onClick && "cursor-pointer", className),
5705
+ onClick: onClick ? (e) => {
5706
+ e.stopPropagation();
5707
+ onClick();
5708
+ } : void 0
5709
+ }
5710
+ );
5711
+ }
6457
5712
  const entry = STATUS[key];
6458
5713
  if (!entry) return null;
6459
5714
  const { Icon } = entry;
@@ -6478,107 +5733,7 @@ function DocStatusIcon({ status, onClick, failed, className }) {
6478
5733
  }
6479
5734
  );
6480
5735
  }
6481
- function ExplorerFrame({ className, ...props }) {
6482
- return /* @__PURE__ */ jsx("div", { "data-slot": "explorer-frame", className: cn("flex h-full flex-col", className), ...props });
6483
- }
6484
- function ExplorerStage({ className, ...props }) {
6485
- return /* @__PURE__ */ jsx(
6486
- "div",
6487
- {
6488
- "data-slot": "explorer-stage",
6489
- className: cn("relative min-h-0 flex-1", className),
6490
- ...props
6491
- }
6492
- );
6493
- }
6494
- var ExplorerScroller = forwardRef(
6495
- function ExplorerScroller2({ className, ...props }, ref) {
6496
- return /* @__PURE__ */ jsx(
6497
- "div",
6498
- {
6499
- ref,
6500
- "data-slot": "explorer-scroller",
6501
- className: cn(
6502
- "h-full select-none overflow-auto px-4 py-4 [scrollbar-gutter:stable]",
6503
- className
6504
- ),
6505
- ...props
6506
- }
6507
- );
6508
- }
6509
- );
6510
- function ExplorerEmpty({ title, description }) {
6511
- return /* @__PURE__ */ jsxs(
6512
- "div",
6513
- {
6514
- "data-slot": "explorer-empty",
6515
- className: "flex h-full flex-col items-center justify-center gap-1 text-center text-muted-foreground",
6516
- children: [
6517
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: title }),
6518
- /* @__PURE__ */ jsx("p", { className: "text-xs", children: description })
6519
- ]
6520
- }
6521
- );
6522
- }
6523
- var ExplorerMarquee = forwardRef(
6524
- function ExplorerMarquee2({ className, style, ...props }, ref) {
6525
- return /* @__PURE__ */ jsx(
6526
- "div",
6527
- {
6528
- ref,
6529
- "aria-hidden": true,
6530
- "data-slot": "explorer-marquee",
6531
- className: cn(
6532
- "pointer-events-none fixed z-30 border border-primary bg-primary/10",
6533
- className
6534
- ),
6535
- style: { display: "none", ...style },
6536
- ...props
6537
- }
6538
- );
6539
- }
6540
- );
6541
- function ExplorerDropOverlay({ label }) {
6542
- return /* @__PURE__ */ jsxs(
6543
- "div",
6544
- {
6545
- "data-slot": "explorer-drop-overlay",
6546
- className: "pointer-events-none absolute inset-2 z-20 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-primary bg-accent/80 backdrop-blur-sm",
6547
- children: [
6548
- /* @__PURE__ */ jsx(UploadCloud, { className: "size-8 text-primary" }),
6549
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-primary", children: label })
6550
- ]
6551
- }
6552
- );
6553
- }
6554
- function ExplorerDragPreview({ icon, title, count }) {
6555
- const isMulti = count > 1;
6556
- return /* @__PURE__ */ jsxs("div", { "data-slot": "explorer-drag-preview", className: "relative", children: [
6557
- isMulti && /* @__PURE__ */ jsx(
6558
- "div",
6559
- {
6560
- "aria-hidden": true,
6561
- className: "absolute inset-0 translate-x-1.5 translate-y-1.5 rounded-lg border border-primary/30 bg-popover shadow-md"
6562
- }
6563
- ),
6564
- /* @__PURE__ */ jsxs("div", { className: "relative flex items-center gap-2 rounded-lg border border-primary/40 bg-popover px-3 py-2 shadow-lg", children: [
6565
- icon,
6566
- /* @__PURE__ */ jsx("span", { className: "max-w-[12rem] truncate text-sm font-medium", children: title }),
6567
- isMulti && /* @__PURE__ */ jsxs(
6568
- "span",
6569
- {
6570
- "data-slot": "explorer-drag-preview-count",
6571
- className: "whitespace-nowrap rounded-full bg-primary px-2 py-0.5 text-xs font-semibold text-primary-foreground",
6572
- children: [
6573
- count,
6574
- " items"
6575
- ]
6576
- }
6577
- )
6578
- ] })
6579
- ] });
6580
- }
6581
5736
 
6582
- export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPLORER_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_TRANSFER_LABELS, DEFAULT_UPLOAD_FOOTER_LABELS, DEFAULT_UPLOAD_PARTS_LABELS, DEFAULT_UPLOAD_SOURCES_LABELS, DEFAULT_URL_INPUT_DIALOG_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DocStatusIcon, DocTagBar, DocTagBreadcrumb, DocTagCreateLink, DocTagEmpty, DocTagFieldIcon, DocTagFieldRow, DocTagNavigator, DocTagPopover, DocTagToggle, DocTagUnsavedFooter, DocTagValueInput, DocumentGrid, DocumentLabelBar, DocumentNameCellFrame, DocumentRowMenu, ExplorerDragPreview, ExplorerDropOverlay, ExplorerEmpty, ExplorerFileTile, ExplorerFileTooltip, ExplorerFolderTile, ExplorerFrame, ExplorerLoadingTiles, ExplorerMarquee, ExplorerScroller, ExplorerStage, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldRow, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesToolbar, FolderSummary, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, MediaPreviewView, MoveToFolderDialog, PassageStepper, PdfPageNav, RejectedFilesList, RelatedDocsCell, SELECTION_COL_ID, SelectedFilesList, StatusPill, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TransferConflictChooser, TransferKindsPicker, TransferPlanSummary, TransferProgressView, TransferReferencesChooser, TransferResumeBanner, TransferScopeChooser, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialogView, VendorLogo, ViewSelectorMenu, ViewerControlBar, ViewerFrame, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPreviewUnavailable, ViewerTabBar, ViewerTitle, ViewerZoomControl, applyColumnLayout, applyViewColumns, captureColumnWidths, columnItems, columnsMatch, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, isDocumentLabel, pinnedLeftColumns, resolveDocumentGridLayout, sortFields, summariseDocTags, toggleColumn, upsertView, useGridViews, visibleColumns, widthsMatch };
6583
- //# sourceMappingURL=chunk-RE7NULEY.js.map
6584
- //# sourceMappingURL=chunk-RE7NULEY.js.map
5737
+ export { AiReviewDialogView, BulkActionsBar, BulkLabelSelectView, BulkReplaceDialog, BulkTagEditorDialog, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_TRANSFER_LABELS, DEFAULT_UPLOAD_FOOTER_LABELS, DEFAULT_UPLOAD_PARTS_LABELS, DEFAULT_UPLOAD_SOURCES_LABELS, DEFAULT_URL_INPUT_DIALOG_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DocStatusIcon, DocTagBar, DocTagBreadcrumb, DocTagCreateLink, DocTagEmpty, DocTagFieldIcon, DocTagFieldRow, DocTagNavigator, DocTagPopover, DocTagToggle, DocTagUnsavedFooter, DocTagValueInput, DocumentGrid, DocumentLabelBar, DocumentNameCellFrame, DocumentRowMenu, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldRow, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesToolbar, FolderSummary, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, MediaPreviewView, MoveToFolderDialog, PassageStepper, PdfPageNav, RejectedFilesList, RelatedDocsCell, SELECTION_COL_ID, SelectedFilesList, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TransferConflictChooser, TransferKindsPicker, TransferPlanSummary, TransferProgressView, TransferReferencesChooser, TransferResumeBanner, TransferScopeChooser, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialogView, ViewSelectorMenu, ViewerControlBar, ViewerFrame, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPreviewUnavailable, ViewerTabBar, ViewerTitle, ViewerZoomControl, applyColumnLayout, applyViewColumns, captureColumnWidths, columnItems, columnsMatch, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, isDocumentLabel, pinnedLeftColumns, resolveDocumentGridLayout, sortFields, summariseDocTags, toggleColumn, upsertView, useGridViews, visibleColumns, widthsMatch };
5738
+ //# sourceMappingURL=chunk-W7CWGURO.js.map
5739
+ //# sourceMappingURL=chunk-W7CWGURO.js.map