@arbidocs/blocks 0.4.3 → 0.4.5

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 (83) hide show
  1. package/README.md +25 -0
  2. package/dist/agents/definitions/AgentCreator.d.ts +11 -2
  3. package/dist/agents/definitions/index.d.ts +1 -0
  4. package/dist/agents/definitions/persona.d.ts +16 -0
  5. package/dist/agents/index.cjs +202 -150
  6. package/dist/agents/index.js +6 -6
  7. package/dist/agents/tasks/TaskRunsDialog.d.ts +15 -3
  8. package/dist/agents/tasks/index.d.ts +1 -0
  9. package/dist/agents/tasks/taskRequest.d.ts +61 -0
  10. package/dist/artifacts/ArtifactCompareBar.d.ts +33 -0
  11. package/dist/artifacts/ArtifactEditor.d.ts +64 -0
  12. package/dist/artifacts/ArtifactEditorBody.d.ts +34 -0
  13. package/dist/artifacts/ArtifactRedlineView.d.ts +57 -0
  14. package/dist/artifacts/ArtifactToolbar.d.ts +53 -0
  15. package/dist/artifacts/ArtifactVersionBar.d.ts +42 -0
  16. package/dist/{files → artifacts}/RedlineParts.d.ts +4 -0
  17. package/dist/artifacts/editor/ArtifactMarkdownEditor.d.ts +39 -0
  18. package/dist/artifacts/editor/index.cjs +89 -0
  19. package/dist/artifacts/editor/index.cjs.map +1 -0
  20. package/dist/artifacts/editor/index.d.ts +1 -0
  21. package/dist/artifacts/editor/index.js +86 -0
  22. package/dist/artifacts/editor/index.js.map +1 -0
  23. package/dist/artifacts/index.cjs +807 -0
  24. package/dist/artifacts/index.cjs.map +1 -0
  25. package/dist/artifacts/index.d.ts +8 -0
  26. package/dist/artifacts/index.js +787 -0
  27. package/dist/artifacts/index.js.map +1 -0
  28. package/dist/chat/index.cjs +54 -54
  29. package/dist/chat/index.js +2 -2
  30. package/dist/{chunk-XKKGGUU2.cjs → chunk-3MIQASHO.cjs} +4 -4
  31. package/dist/{chunk-XKKGGUU2.cjs.map → chunk-3MIQASHO.cjs.map} +1 -1
  32. package/dist/{chunk-B673CCW5.js → chunk-3PJCET7H.js} +3 -3
  33. package/dist/{chunk-B673CCW5.js.map → chunk-3PJCET7H.js.map} +1 -1
  34. package/dist/{chunk-VXOGANFJ.cjs → chunk-3PZPRAAR.cjs} +189 -34
  35. package/dist/chunk-3PZPRAAR.cjs.map +1 -0
  36. package/dist/{chunk-AAY5ASZD.js → chunk-5XTZFH65.js} +170 -28
  37. package/dist/chunk-5XTZFH65.js.map +1 -0
  38. package/dist/{chunk-JPO3F4J7.js → chunk-6YHWXMPQ.js} +3 -3
  39. package/dist/{chunk-JPO3F4J7.js.map → chunk-6YHWXMPQ.js.map} +1 -1
  40. package/dist/{chunk-TYZUCAT7.js → chunk-7YADKWZT.js} +43 -6
  41. package/dist/chunk-7YADKWZT.js.map +1 -0
  42. package/dist/{chunk-SYDHKKRZ.cjs → chunk-IZHWP6WQ.cjs} +47 -5
  43. package/dist/chunk-IZHWP6WQ.cjs.map +1 -0
  44. package/dist/{chunk-ZVPTFTGV.cjs → chunk-MVNCQDDE.cjs} +4 -4
  45. package/dist/{chunk-ZVPTFTGV.cjs.map → chunk-MVNCQDDE.cjs.map} +1 -1
  46. package/dist/{chunk-NJL4LIXX.js → chunk-NPKGUQU5.js} +4 -4
  47. package/dist/{chunk-NJL4LIXX.js.map → chunk-NPKGUQU5.js.map} +1 -1
  48. package/dist/{chunk-ATXPAD6S.cjs → chunk-YLOKCIQJ.cjs} +3 -3
  49. package/dist/{chunk-ATXPAD6S.cjs.map → chunk-YLOKCIQJ.cjs.map} +1 -1
  50. package/dist/collaboration/contacts/AddContactsParts.d.ts +9 -4
  51. package/dist/collaboration/contacts/index.d.ts +1 -0
  52. package/dist/collaboration/contacts/parseEmails.d.ts +26 -0
  53. package/dist/collaboration/index.cjs +51 -31
  54. package/dist/collaboration/index.js +1 -1
  55. package/dist/connect/index.cjs +18 -18
  56. package/dist/connect/index.js +4 -4
  57. package/dist/facts/index.cjs +1 -1
  58. package/dist/facts/index.js +1 -1
  59. package/dist/files/ViewerChrome.d.ts +0 -45
  60. package/dist/files/ViewerParts.d.ts +0 -19
  61. package/dist/files/index.cjs +4 -436
  62. package/dist/files/index.cjs.map +1 -1
  63. package/dist/files/index.d.ts +2 -4
  64. package/dist/files/index.js +8 -428
  65. package/dist/files/index.js.map +1 -1
  66. package/dist/home/index.cjs +19 -19
  67. package/dist/home/index.js +4 -4
  68. package/dist/index.cjs +411 -339
  69. package/dist/index.js +13 -13
  70. package/dist/settings/index.cjs +3 -3
  71. package/dist/settings/index.js +3 -3
  72. package/dist/shell/index.cjs +10 -10
  73. package/dist/shell/index.js +2 -2
  74. package/dist/site/index.cjs +5 -5
  75. package/dist/site/index.js +1 -1
  76. package/dist/studio/index.cjs +8 -8
  77. package/dist/studio/index.js +6 -6
  78. package/package.json +25 -4
  79. package/dist/chunk-AAY5ASZD.js.map +0 -1
  80. package/dist/chunk-SYDHKKRZ.cjs.map +0 -1
  81. package/dist/chunk-TYZUCAT7.js.map +0 -1
  82. package/dist/chunk-VXOGANFJ.cjs.map +0 -1
  83. /package/dist/{files → artifacts}/VersionTimeline.d.ts +0 -0
@@ -10,18 +10,16 @@ export { documentGridLayoutProps, resolveDocumentGridLayout, type DocumentGridLa
10
10
  export { RejectedFilesList, SelectedFilesList, UploadErrorMessage, UploadProgress, DEFAULT_UPLOAD_PARTS_LABELS, type RejectedFilesTestIds, type SelectedFilesTestIds, type UploadPartsLabels, type RejectedFile, type RejectedFilesListProps, type SelectedFilesListProps, type UploadProgressProps, } from './UploadParts';
11
11
  export { UploadFrame, UploadDropArea, UploadBrowseButtons, UploadSourcePicker, UploadUrlButton, UploadSourceSection, DEFAULT_UPLOAD_SOURCES_LABELS, type UploadFrameProps, type UploadDropAreaProps, type UploadBrowseButtonsProps, type UploadSourceOption, type UploadSourcePickerProps, type UploadUrlButtonProps, type UploadSourceSectionProps, type UploadSourcesLabels, } from './UploadSources';
12
12
  export { ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, DEFAULT_EXPORT_LABELS, type ExportLabels, type ExportResultsTestIds, type ExportColumnsMode, type ExportFooterProps, type ExportMethodChooserProps, type ExportMode, type ExportModalTitleProps, type ExportResultRowView, type ExportResultsReportProps, type ExportWorkspaceOption, type ExportWorkspacePickerProps, } from './ExportParts';
13
- export { PdfPageNav, ViewerZoomControl, ViewerEditActions, ViewerFrame, ViewerImageActions, ViewerMessage, ViewerTitle, DEFAULT_VIEWER_LABELS, type PdfPageNavProps, type ViewerZoomControlProps, type ViewerEditActionsTestIds, type ViewerFrameTestIds, type ViewerLabels, type ViewerEditActionsProps, type ViewerFrameProps, type ViewerImageActionsProps, type ViewerTitleProps, } from './ViewerChrome';
13
+ export { PdfPageNav, ViewerZoomControl, ViewerFrame, ViewerImageActions, ViewerMessage, ViewerTitle, DEFAULT_VIEWER_LABELS, type PdfPageNavProps, type ViewerZoomControlProps, type ViewerFrameTestIds, type ViewerLabels, type ViewerFrameProps, type ViewerImageActionsProps, type ViewerTitleProps, } from './ViewerChrome';
14
14
  export { ViewerHeaderStart, ViewerHeaderEnd, ViewerStatusNote, ViewerPane, ViewerRenderedPane, } from './ViewerLayout';
15
15
  export { MoveToFolderDialog, DEFAULT_MOVE_TO_FOLDER_LABELS, type MoveToFolderDialogProps, type MoveToFolderLabels, type MoveToFolderTestIds, } from './MoveToFolderDialog';
16
16
  export { FilesPage, FilesPageHeader, FilesPageMain, type FilesPageProps } from './FilesPage';
17
17
  export { DocumentGrid, type DocumentGridProps } from './DocumentGrid';
18
- export { ViewerCompareBar, ViewerLoadError, ViewerPageCounter, ViewerPreviewUnavailable, ViewerTabBar, type ViewerCompareBarProps, type ViewerPageCounterProps, type ViewerTab, type ViewerTabBarProps, } from './ViewerParts';
18
+ export { ViewerLoadError, ViewerPageCounter, ViewerPreviewUnavailable, ViewerTabBar, type ViewerPageCounterProps, type ViewerTab, type ViewerTabBarProps, } from './ViewerParts';
19
19
  export { UploadContainer, UploadFooterBar, UploadShareNote, DEFAULT_UPLOAD_FOOTER_LABELS, type UploadFooterLabels, type UploadFooterTestIds, type UploadFooterBarProps, type UploadShareNoteProps, } from './UploadFooter';
20
20
  export { FolderCommandList, FolderPickerRow, FolderTree, DEFAULT_FOLDER_PICKER_LABELS, type FolderCommandListTestIds, type FolderPickerLabels, type FolderCommandListProps, type FolderPickerRowProps, type FolderTreeNode, type FolderTreeProps, } from './FolderPicker';
21
- export { VersionTimeline, DEFAULT_VERSION_TIMELINE_LABELS, type VersionTimelineProps, type VersionTimelineLabels, type VersionTimelineTestIds, type VersionEntry, } from './VersionTimeline';
22
21
  export { CitedRunNav, DocTagBar, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, PassageStepper, TranslationBadge, TranslationCompareTable, DEFAULT_HTML_VIEWER_LABELS, type DocTagBarTestIds, type HtmlViewerLabels, type DocTagBarProps, type DocTagChipView, type HtmlPageProps, type HtmlPassageProps, type HtmlViewerRootProps, type HtmlViewerSurfaceProps, type PassageHighlight, type PassageStepperProps, type TranslationBadgeProps, type TranslationRowView, } from './HtmlViewerParts';
23
22
  export { TagPassagePanel, DEFAULT_TAG_PASSAGE_PANEL_LABELS, type TagPassagePanelLabels, type TagPassagePanelTestIds, type PassageTagGroupView, type PassageTagRowView, type TagPassagePanelProps, } from './TagPassagePanel';
24
- export { RedlineComputing, RedlineDocument, RedlineFrame, RedlineHeader, RedlineMark, RedlineRevertGutter, RedlineStatus, DEFAULT_REDLINE_LABELS, type RedlineLabels, type RedlineDocumentProps, type RedlineFrameProps, type RedlineHeaderProps, type RedlineMarkerView, type RedlineRegionKind, type RedlineStatusKind, } from './RedlineParts';
25
23
  export * from './page';
26
24
  export * from './import';
27
25
  export * from './cells';
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { ModalBreadcrumbHeader } from '../chunk-RC6VTY2H.js';
3
- import { TONE_SURFACE, ToneBadge } from '../chunk-DPLRHEJZ.js';
4
- import { ActionLink } from '../chunk-S7PSMMRG.js';
5
- import { ShareControl } from '../chunk-K4BGOPGG.js';
6
- import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-TX2ZICS7.js';
7
2
  import { GridView } from '../chunk-QXEJXIP4.js';
8
3
  export { DEFAULT_DOCUMENT_VIEW_TOGGLE_LABELS, DocumentViewToggle, GridView, ViewToggle } from '../chunk-QXEJXIP4.js';
4
+ import { ModalBreadcrumbHeader } from '../chunk-RC6VTY2H.js';
5
+ import { TONE_SURFACE, ToneBadge } from '../chunk-DPLRHEJZ.js';
9
6
  import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
10
7
  export { DEFAULT_SELECTION_BAR_LABELS, SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
11
8
  import '../chunk-NPLYHR2E.js';
9
+ import { ActionLink } from '../chunk-S7PSMMRG.js';
10
+ import { ShareControl } from '../chunk-K4BGOPGG.js';
11
+ import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-TX2ZICS7.js';
12
12
  import '../chunk-76JDDMSP.js';
13
- import { formatCount } from '../chunk-OXF2IFXG.js';
14
13
  import { testIdOr } from '../chunk-7F6CBP3Z.js';
14
+ import { formatCount } from '../chunk-OXF2IFXG.js';
15
15
  import { memo, useState, useRef, useEffect, forwardRef, useMemo, useCallback } from 'react';
16
- import { Check, Ban, Plus, Pencil, PencilLine, Loader2, UploadCloud, X, SlidersHorizontal, Folder, LoaderCircle, Sparkles, AlertCircle, FolderOpen, Upload, FileText, FolderPlus, Globe, Download, FolderUp, Users, XCircle, AlertTriangle, CheckCircle2, Share2, GitCompare, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, Eye, EyeOff, ArrowLeftRight, CopyX, Minus, History, Tags, StickyNote, Columns2, Copy, Undo2, ChevronDown, BookMarked, ExternalLink, Square, RefreshCw, Settings, Unplug, CalendarDays, CheckCircle, CircleSlash, Hourglass, Mail, CornerDownRight, CornerRightDown, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, FolderInput, Trash2, NotebookPen, MoreHorizontal, ArrowRightFromLine, ArrowDownToLine, Tag, Bot, Calendar, Search, Hash, List, SquareCheckBig, Columns3, Save, CheckIcon, ArrowUpDown, FileX, ChevronsUpDown, Table2, ArrowRightLeft } from 'lucide-react';
16
+ import { Check, Ban, Plus, Pencil, PencilLine, Loader2, UploadCloud, X, SlidersHorizontal, Folder, LoaderCircle, Sparkles, AlertCircle, FolderOpen, Upload, FileText, FolderPlus, Globe, Download, FolderUp, Users, XCircle, AlertTriangle, CheckCircle2, Share2, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, CopyX, Minus, Tags, StickyNote, Columns2, Copy, ChevronDown, BookMarked, ExternalLink, Square, RefreshCw, Settings, Unplug, CalendarDays, CheckCircle, CircleSlash, Hourglass, Mail, CornerDownRight, CornerRightDown, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, FolderInput, Trash2, NotebookPen, MoreHorizontal, ArrowRightFromLine, ArrowDownToLine, Tag, Bot, Calendar, Search, Hash, List, SquareCheckBig, Columns3, Save, Undo2, CheckIcon, ArrowUpDown, FileX, ChevronsUpDown, Table2, ArrowRightLeft } from 'lucide-react';
17
17
  import { cn, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Input, Tooltip, TooltipTrigger, TooltipContent, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Checkbox, DialogHeader, CommandSeparator, getTagTypeIcon, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Switch } from '@arbidocs/react/ui';
18
18
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
19
19
  import { cva } from 'class-variance-authority';
@@ -1463,17 +1463,6 @@ function ExportFooter({
1463
1463
  }
1464
1464
  var DEFAULT_VIEWER_LABELS = {
1465
1465
  shared: "Shared",
1466
- edit: "Edit",
1467
- cancel: "Cancel",
1468
- cancelEditing: "Cancel editing",
1469
- compare: "Compare",
1470
- compareTitle: "Compare against the previous version",
1471
- saveDocument: "Save document",
1472
- saveAsVersion: "Save as a new version",
1473
- noChanges: "No changes to save",
1474
- saving: "Saving\u2026",
1475
- save: "Save",
1476
- saveVersion: "Save version",
1477
1466
  useAsReference: "Use as reference",
1478
1467
  useAsReferenceTitle: "Use as reference for a new image generation",
1479
1468
  crop: "Crop",
@@ -1484,12 +1473,6 @@ var DEFAULT_VIEWER_LABELS = {
1484
1473
  pageInput: "Page number input",
1485
1474
  pageOfTitle: "Click to go to page",
1486
1475
  pageOf: (page, total) => `Page ${page} of ${total}. Click to navigate.`,
1487
- compareVs: "Compare vs.",
1488
- trackChanges: "Track changes",
1489
- trackChangesBack: "Back to editing (your comparison stays active)",
1490
- trackChangesView: "View tracked changes against Compare vs.",
1491
- flipComparison: "Flip comparison direction",
1492
- stopComparing: "Stop comparing",
1493
1476
  previewUnavailable: "Preview not available",
1494
1477
  cannotPreview: (extension) => `${extension} files cannot be previewed in the browser.`,
1495
1478
  downloadToOpen: "Download to open",
@@ -1571,99 +1554,6 @@ function ViewerTitle({
1571
1554
  }
1572
1555
  );
1573
1556
  }
1574
- function ViewerEditActions({
1575
- isEditing,
1576
- isDraft,
1577
- compact,
1578
- hasChanges,
1579
- isSaving,
1580
- canCompare,
1581
- onStartEdit,
1582
- onCancel,
1583
- onCompare,
1584
- onSave,
1585
- labels,
1586
- testIds
1587
- }) {
1588
- const l = { ...DEFAULT_VIEWER_LABELS, ...labels };
1589
- if (!isEditing) {
1590
- return /* @__PURE__ */ jsxs(
1591
- Button,
1592
- {
1593
- onClick: onStartEdit,
1594
- variant: "outline",
1595
- size: compact ? "icon" : "sm",
1596
- title: l.edit,
1597
- "aria-label": l.edit,
1598
- "data-testid": testIdOr(testIds?.edit, { testId: "edit-document-button" }),
1599
- className: "pointer-coarse:min-h-11",
1600
- children: [
1601
- /* @__PURE__ */ jsx(Pencil, { className: "size-4" }),
1602
- !compact && /* @__PURE__ */ jsx("span", { className: "ml-1", children: l.edit })
1603
- ]
1604
- }
1605
- );
1606
- }
1607
- return /* @__PURE__ */ jsxs(Fragment, { children: [
1608
- !isDraft && /* @__PURE__ */ jsxs(
1609
- Button,
1610
- {
1611
- onClick: onCancel,
1612
- variant: "outline",
1613
- size: "sm",
1614
- title: l.cancelEditing,
1615
- "data-testid": testIdOr(testIds?.cancel, { testId: "cancel-edit-button" }),
1616
- className: "pointer-coarse:min-h-11",
1617
- children: [
1618
- /* @__PURE__ */ jsx(X, { className: "size-4" }),
1619
- /* @__PURE__ */ jsx("span", { className: "ml-1", children: l.cancel })
1620
- ]
1621
- }
1622
- ),
1623
- canCompare && /* @__PURE__ */ jsxs(
1624
- Button,
1625
- {
1626
- onClick: onCompare,
1627
- variant: "outline",
1628
- size: compact ? "icon" : "sm",
1629
- title: l.compareTitle,
1630
- "aria-label": l.compare,
1631
- "data-testid": testIdOr(testIds?.compare, { testId: "compare-button" }),
1632
- className: "pointer-coarse:min-h-11",
1633
- children: [
1634
- /* @__PURE__ */ jsx(GitCompare, { className: "size-4" }),
1635
- !compact && /* @__PURE__ */ jsx("span", { className: "ml-1", children: l.compare })
1636
- ]
1637
- }
1638
- ),
1639
- /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1640
- /* @__PURE__ */ jsxs(
1641
- Button,
1642
- {
1643
- onClick: onSave,
1644
- variant: hasChanges ? "default" : "outline",
1645
- size: "sm",
1646
- title: hasChanges ? isDraft ? l.saveDocument : l.saveAsVersion : l.noChanges,
1647
- disabled: !hasChanges || isSaving,
1648
- "data-testid": testIdOr(testIds?.save, { testId: "save-document-button" }),
1649
- className: "pointer-coarse:min-h-11",
1650
- children: [
1651
- isSaving ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsx(Check, { className: "size-4" }),
1652
- /* @__PURE__ */ jsx("span", { className: "ml-1", children: isSaving ? l.saving : isDraft ? l.save : l.saveVersion })
1653
- ]
1654
- }
1655
- ),
1656
- hasChanges && !isSaving && /* @__PURE__ */ jsx(
1657
- "span",
1658
- {
1659
- className: "absolute -right-1 -top-1 size-2.5 rounded-full bg-primary ring-2 ring-background",
1660
- "aria-hidden": true,
1661
- "data-testid": testIdOr(testIds?.unsavedDot, { testId: "unsaved-changes-dot" })
1662
- }
1663
- )
1664
- ] })
1665
- ] });
1666
- }
1667
1557
  function ViewerImageActions({
1668
1558
  compact,
1669
1559
  onUseAsReference,
@@ -2035,71 +1925,6 @@ function ViewerPageCounter({ page, total, onGoTo, labels }) {
2035
1925
  ] })
2036
1926
  ] });
2037
1927
  }
2038
- var barButton = "inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11";
2039
- function ViewerCompareBar({
2040
- compareTarget,
2041
- versionLabel,
2042
- mode,
2043
- showTrackChanges,
2044
- onToggleTrackChanges,
2045
- onFlip,
2046
- onStop,
2047
- labels,
2048
- trackChangesTestId
2049
- }) {
2050
- const l = { ...DEFAULT_VIEWER_LABELS, ...labels };
2051
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2052
- /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: l.compareVs }),
2053
- compareTarget,
2054
- versionLabel && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: versionLabel }),
2055
- mode === "track-changes" ? /* @__PURE__ */ jsxs(
2056
- "button",
2057
- {
2058
- type: "button",
2059
- onClick: onToggleTrackChanges,
2060
- className: cn(
2061
- barButton,
2062
- showTrackChanges ? "bg-accent text-accent-foreground hover:bg-accent/70" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2063
- ),
2064
- title: showTrackChanges ? l.trackChangesBack : l.trackChangesView,
2065
- "data-testid": testIdOr(trackChangesTestId, { testId: "track-changes-toggle" }),
2066
- children: [
2067
- showTrackChanges ? /* @__PURE__ */ jsx(Eye, { className: "size-3.5" }) : /* @__PURE__ */ jsx(EyeOff, { className: "size-3.5" }),
2068
- l.trackChanges
2069
- ]
2070
- }
2071
- ) : /* @__PURE__ */ jsx(
2072
- "button",
2073
- {
2074
- type: "button",
2075
- onClick: onFlip,
2076
- className: cn(
2077
- barButton,
2078
- "p-1 text-muted-foreground hover:bg-muted hover:text-foreground"
2079
- ),
2080
- title: l.flipComparison,
2081
- "aria-label": l.flipComparison,
2082
- children: /* @__PURE__ */ jsx(ArrowLeftRight, { className: "size-3.5" })
2083
- }
2084
- ),
2085
- /* @__PURE__ */ jsxs(
2086
- "button",
2087
- {
2088
- type: "button",
2089
- onClick: onStop,
2090
- className: cn(
2091
- barButton,
2092
- "ml-auto text-muted-foreground hover:bg-muted hover:text-foreground"
2093
- ),
2094
- title: l.stopComparing,
2095
- children: [
2096
- /* @__PURE__ */ jsx(X, { className: "size-3" }),
2097
- l.stopComparing
2098
- ]
2099
- }
2100
- )
2101
- ] });
2102
- }
2103
1928
  function ViewerPreviewUnavailable({
2104
1929
  extension,
2105
1930
  onDownload,
@@ -2471,140 +2296,6 @@ function FolderCommandList({
2471
2296
  ] })
2472
2297
  ] });
2473
2298
  }
2474
- var DEFAULT_VERSION_TIMELINE_LABELS = {
2475
- emptyLive: "No earlier versions yet. When you ask the assistant for a change, the previous version is kept here.",
2476
- emptyDocument: "No earlier versions yet. Editing this draft and saving creates a new version here.",
2477
- untitled: "Untitled",
2478
- latest: "Latest",
2479
- viewing: "Viewing",
2480
- current: "Current",
2481
- version: (n) => `Version ${n}`,
2482
- branchedFrom: (n) => `branched from Version ${n}`,
2483
- open: "Open",
2484
- compare: "Compare"
2485
- };
2486
- function VersionTimeline({
2487
- versions,
2488
- currentId,
2489
- live = false,
2490
- formatDate,
2491
- onOpen,
2492
- onCompare,
2493
- className,
2494
- labels,
2495
- testIds
2496
- }) {
2497
- const l = { ...DEFAULT_VERSION_TIMELINE_LABELS, ...labels };
2498
- if (versions.length <= 1) {
2499
- return /* @__PURE__ */ jsx(
2500
- "div",
2501
- {
2502
- className: cn("p-6 text-sm text-muted-foreground", className),
2503
- "data-testid": testIdOr(testIds?.empty, { testId: "version-timeline-empty" }),
2504
- children: live ? l.emptyLive : l.emptyDocument
2505
- }
2506
- );
2507
- }
2508
- const numberById = /* @__PURE__ */ new Map();
2509
- versions.forEach((v, i) => numberById.set(v.id, i + 1));
2510
- const canCompare = !live && !!onCompare;
2511
- return /* @__PURE__ */ jsx(
2512
- "div",
2513
- {
2514
- className: cn("h-full overflow-auto p-4", className),
2515
- "data-testid": testIdOr(testIds?.root, { testId: "version-timeline" }),
2516
- children: /* @__PURE__ */ jsx("ol", { className: "mx-auto max-w-2xl space-y-1", children: versions.map((v, i) => {
2517
- const isCurrent = v.id === currentId;
2518
- const isLatest = i === versions.length - 1;
2519
- const parentNumber = v.parentId ? numberById.get(v.parentId) : void 0;
2520
- const branchedFrom = parentNumber !== void 0 && parentNumber !== i ? parentNumber : null;
2521
- const badge = !isCurrent ? null : live ? isLatest ? l.latest : l.viewing : l.current;
2522
- const name = live ? (v.name || l.untitled).replace(/\.[A-Za-z0-9]+$/, "") : v.name || l.untitled;
2523
- return /* @__PURE__ */ jsxs(
2524
- "li",
2525
- {
2526
- className: cn(
2527
- "flex items-center gap-3 rounded-md px-3 py-2.5",
2528
- isCurrent && "bg-accent"
2529
- ),
2530
- "data-testid": testIdOr(testIds?.row?.(v.id), { testId: `version-row-${v.id}` }),
2531
- children: [
2532
- /* @__PURE__ */ jsx(History, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
2533
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
2534
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2535
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: l.version(i + 1) }),
2536
- badge && /* @__PURE__ */ jsx(
2537
- "span",
2538
- {
2539
- className: "rounded-full bg-background px-2 py-0.5 text-xs font-medium text-accent-foreground",
2540
- "data-testid": testIdOr(testIds?.currentBadge, {
2541
- testId: "version-current-badge"
2542
- }),
2543
- children: badge
2544
- }
2545
- )
2546
- ] }),
2547
- /* @__PURE__ */ jsxs("div", { className: "truncate text-sm text-muted-foreground", children: [
2548
- name,
2549
- " \xB7 ",
2550
- formatDate(v.createdAt),
2551
- branchedFrom !== null && /* @__PURE__ */ jsxs(
2552
- "span",
2553
- {
2554
- "data-testid": testIdOr(testIds?.branch?.(v.id), {
2555
- testId: `version-branch-${v.id}`
2556
- }),
2557
- children: [
2558
- " ",
2559
- "\xB7 ",
2560
- l.branchedFrom(branchedFrom)
2561
- ]
2562
- }
2563
- )
2564
- ] })
2565
- ] }),
2566
- !isCurrent && /* @__PURE__ */ jsxs(Fragment, { children: [
2567
- /* @__PURE__ */ jsxs(
2568
- "button",
2569
- {
2570
- type: "button",
2571
- onClick: () => onOpen(v.id),
2572
- className: "inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
2573
- "data-testid": testIdOr(testIds?.open?.(v.id), {
2574
- testId: `open-version-${v.id}`
2575
- }),
2576
- children: [
2577
- /* @__PURE__ */ jsx(Eye, { className: "size-3.5" }),
2578
- " ",
2579
- l.open
2580
- ]
2581
- }
2582
- ),
2583
- canCompare && /* @__PURE__ */ jsxs(
2584
- "button",
2585
- {
2586
- type: "button",
2587
- onClick: () => onCompare(v.id),
2588
- className: "inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-primary transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
2589
- "data-testid": testIdOr(testIds?.compare?.(v.id), {
2590
- testId: `compare-version-${v.id}`
2591
- }),
2592
- children: [
2593
- /* @__PURE__ */ jsx(GitCompare, { className: "size-3.5" }),
2594
- " ",
2595
- l.compare
2596
- ]
2597
- }
2598
- )
2599
- ] })
2600
- ]
2601
- },
2602
- v.id
2603
- );
2604
- }) })
2605
- }
2606
- );
2607
- }
2608
2299
  var DEFAULT_HTML_VIEWER_LABELS = {
2609
2300
  viewerRegion: "Parsed document viewer",
2610
2301
  pageOfTotal: (page, total) => `Page ${page} of ${total}`,
@@ -3130,117 +2821,6 @@ function TagPassagePanel({
3130
2821
  }
3131
2822
  );
3132
2823
  }
3133
- var DEFAULT_REDLINE_LABELS = {
3134
- flipComparison: "Flip comparison",
3135
- noDocument: "No document selected for comparison.",
3136
- noChangesYet: "No changes yet \u2014 start editing to see redlined differences here.",
3137
- identical: "Documents are identical.",
3138
- unavailable: "Document text not available for comparison.",
3139
- revertMove: "Undo this move (revert both ends)",
3140
- revertReplace: "Undo this edit",
3141
- revertAdd: "Undo this insertion",
3142
- revertRemove: "Undo this deletion"
3143
- };
3144
- function RedlineFrame({ header, children }) {
3145
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col", "data-slot": "redline-frame", children: [
3146
- header,
3147
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto text-sm leading-relaxed", children })
3148
- ] });
3149
- }
3150
- function RedlineHeader({ base, compare, onFlip, labels }) {
3151
- const l = { ...DEFAULT_REDLINE_LABELS, ...labels };
3152
- return /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-border bg-muted px-3 py-2", children: [
3153
- base,
3154
- /* @__PURE__ */ jsx(
3155
- Button,
3156
- {
3157
- variant: "ghost",
3158
- size: "icon",
3159
- className: "size-6 shrink-0 pointer-coarse:size-11",
3160
- onClick: onFlip,
3161
- title: l.flipComparison,
3162
- "aria-label": l.flipComparison,
3163
- children: /* @__PURE__ */ jsx(ArrowLeftRight, { className: "size-3.5" })
3164
- }
3165
- ),
3166
- compare
3167
- ] });
3168
- }
3169
- function RedlineStatus({
3170
- kind,
3171
- reviewMode,
3172
- labels
3173
- }) {
3174
- const l = { ...DEFAULT_REDLINE_LABELS, ...labels };
3175
- const text = kind === "idle" ? l.noDocument : kind === "identical" ? reviewMode ? l.noChangesYet : l.identical : l.unavailable;
3176
- return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center text-sm text-muted-foreground", children: text });
3177
- }
3178
- function RedlineComputing({ children }) {
3179
- return /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center", children });
3180
- }
3181
- function RedlineDocument({ children, bodyRef, gutter }) {
3182
- return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
3183
- /* @__PURE__ */ jsx("div", { ref: bodyRef, className: "mx-auto max-w-3xl px-6 py-4 pr-14", children }),
3184
- gutter
3185
- ] });
3186
- }
3187
- var MARK_TONE = {
3188
- del: {
3189
- base: "font-semibold text-red-600 line-through decoration-2 dark:text-red-400",
3190
- move: "font-semibold text-emerald-600 line-through decoration-2 dark:text-emerald-400"
3191
- },
3192
- ins: {
3193
- base: "font-semibold text-blue-600 underline decoration-2 dark:text-blue-400",
3194
- move: "font-semibold text-emerald-600 underline decoration-2 dark:text-emerald-400"
3195
- }
3196
- };
3197
- function RedlineMark({
3198
- as: Tag,
3199
- isMove,
3200
- children,
3201
- ...props
3202
- }) {
3203
- const cls = MARK_TONE[Tag][isMove ? "move" : "base"];
3204
- return /* @__PURE__ */ jsx(Tag, { className: cls, ...props, children });
3205
- }
3206
- var REVERT_TONE = {
3207
- move: "border-emerald-600 text-emerald-700 hover:bg-emerald-50 dark:border-emerald-400 dark:text-emerald-300 dark:hover:bg-emerald-950/40",
3208
- add: "border-blue-600 text-blue-700 hover:bg-blue-50 dark:border-blue-400 dark:text-blue-300 dark:hover:bg-blue-950/40",
3209
- replace: "border-blue-600 text-blue-700 hover:bg-blue-50 dark:border-blue-400 dark:text-blue-300 dark:hover:bg-blue-950/40",
3210
- remove: "border-red-600 text-red-700 hover:bg-red-50 dark:border-red-400 dark:text-red-300 dark:hover:bg-red-950/40"
3211
- };
3212
- function RedlineRevertGutter({
3213
- markers,
3214
- onRevert,
3215
- labels,
3216
- testId
3217
- }) {
3218
- if (markers.length === 0) return null;
3219
- const l = { ...DEFAULT_REDLINE_LABELS, ...labels };
3220
- const revertTitle = {
3221
- move: l.revertMove,
3222
- replace: l.revertReplace,
3223
- add: l.revertAdd,
3224
- remove: l.revertRemove
3225
- };
3226
- return /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute right-2 top-0 w-9", "data-slot": "redline-gutter", children: markers.map((m) => /* @__PURE__ */ jsx(
3227
- "button",
3228
- {
3229
- type: "button",
3230
- onClick: () => onRevert(m.cid),
3231
- title: revertTitle[m.kind],
3232
- "aria-label": revertTitle[m.kind],
3233
- style: { top: m.top - 2 },
3234
- className: cn(
3235
- "pointer-events-auto absolute right-0 inline-flex h-6 w-7 items-center justify-center rounded-md border bg-background transition-colors pointer-coarse:h-11 pointer-coarse:w-11",
3236
- REVERT_TONE[m.kind]
3237
- ),
3238
- "data-testid": testIdOr(testId?.(m.cid), { testId: `redline-revert-${m.cid}` }),
3239
- children: /* @__PURE__ */ jsx(Undo2, { className: "size-3.5" })
3240
- },
3241
- m.cid
3242
- )) });
3243
- }
3244
2824
  var CLOSE_DELAY_MS = 120;
3245
2825
  function FilesAddMenu({
3246
2826
  items,
@@ -7336,6 +6916,6 @@ function ExplorerDragPreview({ icon, title, count }) {
7336
6916
  );
7337
6917
  }
7338
6918
 
7339
- export { AiReviewDialogView, BulkActionsBar, BulkReplaceDialog, BulkTagEditorDialog, CalendarImportRow, CellHoverIcon, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_CALENDAR_IMPORT_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPLORER_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_FOLDER_FILTER_LABELS, DEFAULT_FOLDER_PICKER_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_LABEL_MULTI_SELECT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_REDLINE_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_LABELS, DEFAULT_UPLOAD_FOOTER_LABELS, DEFAULT_UPLOAD_PARTS_LABELS, DEFAULT_UPLOAD_SOURCES_LABELS, DEFAULT_URL_INPUT_DIALOG_LABELS, DEFAULT_VERSION_TIMELINE_LABELS, DEFAULT_VIEWER_LABELS, DEFAULT_VIEW_SELECTOR_LABELS, DocStatusIcon, DocTagBar, DocTagBreadcrumb, DocTagCreateLink, DocTagEmpty, DocTagFieldIcon, DocTagFieldRow, DocTagNavigator, DocTagPopover, DocTagToggle, DocTagUnsavedFooter, DocTagValueInput, DocumentGrid, DocumentNameCellFrame, DocumentRowMenu, ExplorerDragPreview, ExplorerDropOverlay, ExplorerEmpty, ExplorerFileTile, ExplorerFileTooltip, ExplorerFolderTile, ExplorerFrame, ExplorerLoadingTiles, ExplorerMarquee, ExplorerScroller, ExplorerStage, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldAttribution, FieldFolderSelect, FieldFolderValue, FieldLabelsSelect, FieldNativeSelect, FieldRow, FieldValue, FieldWithAttribution, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesFilterBar, FilesModalFooter, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesTagsButton, FilesToolbar, FilesViewCenter, FolderBreadcrumb2 as FolderBreadcrumb, FolderCell, FolderCommandList, FolderFilterButton, FolderPickerRow, FolderSummary, FolderTree, HoverIconCell, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, LabelMultiSelectView, LabelPickerList, MediaPreviewView, MoveToFolderDialog, PassageStepper, PdfPageNav, RedlineComputing, RedlineDocument, RedlineFrame, RedlineHeader, RedlineMark, RedlineRevertGutter, RedlineStatus, RejectedFilesList, RelatedDocsCell, SelectedFilesList, StatusPill, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TranslationBadge, TranslationCompareTable, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadDropzone, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialogView, VendorLogo, VersionTimeline, ViewSelectorMenu, ViewerCompareBar, ViewerEditActions, ViewerFrame, ViewerHeaderEnd, ViewerHeaderStart, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPane, ViewerPreviewUnavailable, ViewerRenderedPane, ViewerStatusNote, ViewerTabBar, ViewerTitle, ViewerZoomControl, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, labelChipClampHeight, resolveDocumentGridLayout, sortFields };
6919
+ export { AiReviewDialogView, BulkActionsBar, BulkReplaceDialog, BulkTagEditorDialog, CalendarImportRow, CellHoverIcon, CheckboxCell, CitedRunNav, DEFAULT_AI_REVIEW_DIALOG_LABELS, DEFAULT_BULK_ACTIONS_LABELS, DEFAULT_BULK_REPLACE_LABELS, DEFAULT_BULK_TAG_EDITOR_LABELS, DEFAULT_CALENDAR_IMPORT_LABELS, DEFAULT_DOC_TAG_LABELS, DEFAULT_EXPLORER_LABELS, DEFAULT_EXPORT_LABELS, DEFAULT_FIELDS_EDITOR_LABELS, DEFAULT_FILES_SEARCH_LABELS, DEFAULT_FOLDER_FILTER_LABELS, DEFAULT_FOLDER_PICKER_LABELS, DEFAULT_HTML_VIEWER_LABELS, DEFAULT_IMPORT_LABELS, DEFAULT_LABEL_MULTI_SELECT_LABELS, DEFAULT_MOVE_TO_FOLDER_LABELS, DEFAULT_TAG_MANAGER_LABELS, DEFAULT_TAG_PASSAGE_PANEL_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, DocumentNameCellFrame, DocumentRowMenu, ExplorerDragPreview, ExplorerDropOverlay, ExplorerEmpty, ExplorerFileTile, ExplorerFileTooltip, ExplorerFolderTile, ExplorerFrame, ExplorerLoadingTiles, ExplorerMarquee, ExplorerScroller, ExplorerStage, ExportFooter, ExportMethodChooser, ExportModalTitle, ExportResultsReport, ExportWorkspacePicker, FieldAttribution, FieldFolderSelect, FieldFolderValue, FieldLabelsSelect, FieldNativeSelect, FieldRow, FieldValue, FieldWithAttribution, FieldsApplyBar, FieldsEditorList, FieldsEditorRoot, FieldsEditorToolbar, FieldsEmptyState, FieldsManagerBody, FieldsManagerDefinition, FieldsManagerTitle, FilesAddMenu, FilesFilterBar, FilesModalFooter, FilesPage, FilesPageHeader, FilesPageMain, FilesPageTitle, FilesSearchInput, FilesTagsButton, FilesToolbar, FilesViewCenter, FolderBreadcrumb2 as FolderBreadcrumb, FolderCell, FolderCommandList, FolderFilterButton, FolderPickerRow, FolderSummary, FolderTree, HoverIconCell, HtmlPage, HtmlPassage, HtmlViewerEmpty, HtmlViewerRoot, HtmlViewerSurface, ImportActionButton, ImportAside, ImportFamilySection, ImportHint, ImportList, ImportPanel, ImportProgress, ImportRow, ImportRunActions, ImportSummary, LabelMultiSelectView, LabelPickerList, MediaPreviewView, MoveToFolderDialog, PassageStepper, PdfPageNav, RejectedFilesList, RelatedDocsCell, SelectedFilesList, StatusPill, TagColumnHeader, TagFormField, TagFormFooter, TagFormInstructionField, TagFormMeta, TagFormNameField, TagFormNote, TagFormOptionsEditor, TagFormRoot, TagFormSelectField, TagFormSharedToggle, TagManager, TagPassagePanel, TaskSection, TranslationBadge, TranslationCompareTable, UploadBrowseButtons, UploadContainer, UploadDropArea, UploadDropzone, UploadErrorMessage, UploadFooterBar, UploadFrame, UploadProgress, UploadShareNote, UploadSourcePicker, UploadSourceSection, UploadUrlButton, UrlDialogTitle, UrlInputDialogView, VendorLogo, ViewSelectorMenu, ViewerFrame, ViewerHeaderEnd, ViewerHeaderStart, ViewerImageActions, ViewerLoadError, ViewerMessage, ViewerPageCounter, ViewerPane, ViewerPreviewUnavailable, ViewerRenderedPane, ViewerStatusNote, ViewerTabBar, ViewerTitle, ViewerZoomControl, documentGridLayoutProps, fieldsApplyBarCopy, fieldsEmptyText, filterFieldsByName, labelChipClampHeight, resolveDocumentGridLayout, sortFields };
7340
6920
  //# sourceMappingURL=index.js.map
7341
6921
  //# sourceMappingURL=index.js.map