@arbidocs/blocks 0.4.4 → 0.4.6

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 (149) hide show
  1. package/README.md +71 -6
  2. package/dist/agents/index.cjs +163 -162
  3. package/dist/agents/index.js +6 -5
  4. package/dist/artifacts/ArtifactCompareBar.d.ts +33 -0
  5. package/dist/artifacts/ArtifactEditor.d.ts +64 -0
  6. package/dist/artifacts/ArtifactEditorBody.d.ts +34 -0
  7. package/dist/artifacts/ArtifactRedlineView.d.ts +57 -0
  8. package/dist/artifacts/ArtifactToolbar.d.ts +53 -0
  9. package/dist/artifacts/ArtifactVersionBar.d.ts +42 -0
  10. package/dist/{files → artifacts}/RedlineParts.d.ts +4 -0
  11. package/dist/artifacts/editor/ArtifactMarkdownEditor.d.ts +39 -0
  12. package/dist/artifacts/editor/index.cjs +89 -0
  13. package/dist/artifacts/editor/index.cjs.map +1 -0
  14. package/dist/artifacts/editor/index.d.ts +1 -0
  15. package/dist/artifacts/editor/index.js +86 -0
  16. package/dist/artifacts/editor/index.js.map +1 -0
  17. package/dist/artifacts/index.cjs +807 -0
  18. package/dist/artifacts/index.cjs.map +1 -0
  19. package/dist/artifacts/index.d.ts +8 -0
  20. package/dist/artifacts/index.js +787 -0
  21. package/dist/artifacts/index.js.map +1 -0
  22. package/dist/chat/ChatMessageContent.d.ts +16 -0
  23. package/dist/chat/ChatPage.d.ts +11 -8
  24. package/dist/chat/ChatThreads.d.ts +3 -1
  25. package/dist/chat/CitationMark.d.ts +18 -0
  26. package/dist/chat/chat-page-types.d.ts +75 -1
  27. package/dist/chat/index.cjs +125 -116
  28. package/dist/chat/index.d.ts +3 -1
  29. package/dist/chat/index.js +4 -3
  30. package/dist/{chunk-XKKGGUU2.cjs → chunk-23XL6SVZ.cjs} +39 -19
  31. package/dist/chunk-23XL6SVZ.cjs.map +1 -0
  32. package/dist/{chunk-ULWRNGGE.cjs → chunk-2ZTONLT5.cjs} +4 -25
  33. package/dist/chunk-2ZTONLT5.cjs.map +1 -0
  34. package/dist/{chunk-O637DUKS.cjs → chunk-56BUD74K.cjs} +28 -28
  35. package/dist/{chunk-O637DUKS.cjs.map → chunk-56BUD74K.cjs.map} +1 -1
  36. package/dist/{chunk-ATXPAD6S.cjs → chunk-5SLLMK5K.cjs} +420 -114
  37. package/dist/chunk-5SLLMK5K.cjs.map +1 -0
  38. package/dist/{chunk-SS23F63U.cjs → chunk-5ZBP7TCD.cjs} +55 -3
  39. package/dist/chunk-5ZBP7TCD.cjs.map +1 -0
  40. package/dist/{chunk-DGVKBOY5.cjs → chunk-67HGXV4I.cjs} +6 -6
  41. package/dist/{chunk-DGVKBOY5.cjs.map → chunk-67HGXV4I.cjs.map} +1 -1
  42. package/dist/{chunk-RCP6THBS.js → chunk-7OCFHEE6.js} +3 -3
  43. package/dist/{chunk-RCP6THBS.js.map → chunk-7OCFHEE6.js.map} +1 -1
  44. package/dist/{chunk-TX2ZICS7.js → chunk-CPMNAJLF.js} +4 -24
  45. package/dist/chunk-CPMNAJLF.js.map +1 -0
  46. package/dist/{chunk-BBEMPS6C.js → chunk-CVFBSUXL.js} +5 -5
  47. package/dist/{chunk-BBEMPS6C.js.map → chunk-CVFBSUXL.js.map} +1 -1
  48. package/dist/chunk-DCDVWPMB.cjs +29 -0
  49. package/dist/chunk-DCDVWPMB.cjs.map +1 -0
  50. package/dist/{chunk-TI4UTYRL.js → chunk-EY2RJW27.js} +258 -10
  51. package/dist/chunk-EY2RJW27.js.map +1 -0
  52. package/dist/{chunk-7YADKWZT.js → chunk-G2E3O3HI.js} +3 -3
  53. package/dist/{chunk-7YADKWZT.js.map → chunk-G2E3O3HI.js.map} +1 -1
  54. package/dist/{chunk-JPO3F4J7.js → chunk-G2T3KTZ3.js} +418 -114
  55. package/dist/chunk-G2T3KTZ3.js.map +1 -0
  56. package/dist/{chunk-2NNTQLBY.js → chunk-IAKUTBPX.js} +4 -4
  57. package/dist/{chunk-2NNTQLBY.js.map → chunk-IAKUTBPX.js.map} +1 -1
  58. package/dist/{chunk-IZHWP6WQ.cjs → chunk-JG4TFS3Z.cjs} +6 -6
  59. package/dist/{chunk-IZHWP6WQ.cjs.map → chunk-JG4TFS3Z.cjs.map} +1 -1
  60. package/dist/chunk-JLOYWXRB.js +1156 -0
  61. package/dist/chunk-JLOYWXRB.js.map +1 -0
  62. package/dist/{chunk-WJZBJUPX.js → chunk-KXMDOTGW.js} +56 -4
  63. package/dist/chunk-KXMDOTGW.js.map +1 -0
  64. package/dist/{chunk-2VBJ763Y.js → chunk-KZJAG7T3.js} +37 -7
  65. package/dist/chunk-KZJAG7T3.js.map +1 -0
  66. package/dist/{chunk-RIL7G7AS.cjs → chunk-MGUHR3JI.cjs} +4 -4
  67. package/dist/{chunk-RIL7G7AS.cjs.map → chunk-MGUHR3JI.cjs.map} +1 -1
  68. package/dist/{chunk-DN3NFNIA.cjs → chunk-QMDLPO3M.cjs} +266 -10
  69. package/dist/chunk-QMDLPO3M.cjs.map +1 -0
  70. package/dist/chunk-TJMKFY5P.js +27 -0
  71. package/dist/chunk-TJMKFY5P.js.map +1 -0
  72. package/dist/{chunk-B673CCW5.js → chunk-UHVNYKV2.js} +38 -18
  73. package/dist/chunk-UHVNYKV2.js.map +1 -0
  74. package/dist/{chunk-6CHMNKXC.cjs → chunk-UTYQPVIW.cjs} +11 -11
  75. package/dist/chunk-UTYQPVIW.cjs.map +1 -0
  76. package/dist/{chunk-KHX2BX3S.cjs → chunk-VGOFFCMT.cjs} +37 -5
  77. package/dist/chunk-VGOFFCMT.cjs.map +1 -0
  78. package/dist/{chunk-67MKU5U7.js → chunk-YMHGF6R5.js} +8 -8
  79. package/dist/chunk-YMHGF6R5.js.map +1 -0
  80. package/dist/chunk-YVIOCITQ.cjs +1186 -0
  81. package/dist/chunk-YVIOCITQ.cjs.map +1 -0
  82. package/dist/collaboration/index.cjs +38 -37
  83. package/dist/collaboration/index.js +3 -2
  84. package/dist/connect/index.cjs +358 -19
  85. package/dist/connect/index.cjs.map +1 -1
  86. package/dist/connect/index.d.ts +1 -0
  87. package/dist/connect/index.js +341 -9
  88. package/dist/connect/index.js.map +1 -1
  89. package/dist/connection/ConnectedSettings.d.ts +64 -0
  90. package/dist/facts/index.cjs +1 -1
  91. package/dist/facts/index.js +1 -1
  92. package/dist/files/ViewerChrome.d.ts +0 -45
  93. package/dist/files/ViewerParts.d.ts +0 -19
  94. package/dist/files/index.cjs +15 -446
  95. package/dist/files/index.cjs.map +1 -1
  96. package/dist/files/index.d.ts +2 -4
  97. package/dist/files/index.js +9 -428
  98. package/dist/files/index.js.map +1 -1
  99. package/dist/home/index.cjs +1 -1
  100. package/dist/home/index.js +1 -1
  101. package/dist/index.cjs +634 -585
  102. package/dist/index.cjs.map +1 -1
  103. package/dist/index.js +19 -18
  104. package/dist/index.js.map +1 -1
  105. package/dist/lib/bottom-inset.d.ts +16 -0
  106. package/dist/lib/useElementSize.d.ts +13 -0
  107. package/dist/lib/useFillHeight.d.ts +10 -0
  108. package/dist/settings/account-views.d.ts +55 -0
  109. package/dist/settings/index.cjs +178 -1147
  110. package/dist/settings/index.cjs.map +1 -1
  111. package/dist/settings/index.d.ts +1 -0
  112. package/dist/settings/index.js +9 -1072
  113. package/dist/settings/index.js.map +1 -1
  114. package/dist/shell/InstallPrompt.d.ts +28 -0
  115. package/dist/shell/MobileBars.d.ts +1 -1
  116. package/dist/shell/index.cjs +92 -52
  117. package/dist/shell/index.d.ts +4 -0
  118. package/dist/shell/index.js +4 -4
  119. package/dist/shell/install-instructions.d.ts +19 -0
  120. package/dist/shell/types.d.ts +6 -0
  121. package/dist/shell/use-install-prompt.d.ts +49 -0
  122. package/dist/site/index.cjs +67 -67
  123. package/dist/site/index.js +3 -3
  124. package/dist/studio/index.cjs +79 -78
  125. package/dist/studio/index.cjs.map +1 -1
  126. package/dist/studio/index.js +9 -8
  127. package/dist/studio/index.js.map +1 -1
  128. package/dist/theme/ThemeEditor.d.ts +4 -2
  129. package/dist/workspaces/index.cjs +4 -3
  130. package/dist/workspaces/index.cjs.map +1 -1
  131. package/dist/workspaces/index.js +3 -2
  132. package/dist/workspaces/index.js.map +1 -1
  133. package/package.json +30 -5
  134. package/src/blocks.css +30 -0
  135. package/dist/chunk-2VBJ763Y.js.map +0 -1
  136. package/dist/chunk-67MKU5U7.js.map +0 -1
  137. package/dist/chunk-6CHMNKXC.cjs.map +0 -1
  138. package/dist/chunk-ATXPAD6S.cjs.map +0 -1
  139. package/dist/chunk-B673CCW5.js.map +0 -1
  140. package/dist/chunk-DN3NFNIA.cjs.map +0 -1
  141. package/dist/chunk-JPO3F4J7.js.map +0 -1
  142. package/dist/chunk-KHX2BX3S.cjs.map +0 -1
  143. package/dist/chunk-SS23F63U.cjs.map +0 -1
  144. package/dist/chunk-TI4UTYRL.js.map +0 -1
  145. package/dist/chunk-TX2ZICS7.js.map +0 -1
  146. package/dist/chunk-ULWRNGGE.cjs.map +0 -1
  147. package/dist/chunk-WJZBJUPX.js.map +0 -1
  148. package/dist/chunk-XKKGGUU2.cjs.map +0 -1
  149. /package/dist/{files → artifacts}/VersionTimeline.d.ts +0 -0
@@ -1,16 +1,17 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
+ var chunkLRUCMZK6_cjs = require('../chunk-LRUCMZK6.cjs');
4
5
  var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
5
6
  var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
7
+ var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
6
8
  var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
9
+ require('../chunk-C54XEN5T.cjs');
7
10
  var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
8
- var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
9
- var chunkLRUCMZK6_cjs = require('../chunk-LRUCMZK6.cjs');
10
- var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
11
+ var chunk2ZTONLT5_cjs = require('../chunk-2ZTONLT5.cjs');
11
12
  require('../chunk-PPCATBOY.cjs');
12
- require('../chunk-C54XEN5T.cjs');
13
13
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
14
+ require('../chunk-DCDVWPMB.cjs');
14
15
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
15
16
  var react = require('react');
16
17
  var lucideReact = require('lucide-react');
@@ -1259,8 +1260,8 @@ function ExportMethodChooser({
1259
1260
  }) {
1260
1261
  const l = { ...DEFAULT_EXPORT_LABELS, ...labels };
1261
1262
  const card = "flex cursor-pointer items-start space-x-3 rounded-lg bg-muted p-4 transition-colors hover:bg-accent";
1262
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { children: [
1263
- /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalSectionTitle, { children: l.exportMethod }),
1263
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { children: [
1264
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.exportMethod }),
1264
1265
  /* @__PURE__ */ jsxRuntime.jsxs(
1265
1266
  ui.RadioGroup,
1266
1267
  {
@@ -1333,8 +1334,8 @@ function ExportWorkspacePicker({
1333
1334
  testId
1334
1335
  }) {
1335
1336
  const l = { ...DEFAULT_EXPORT_LABELS, ...labels };
1336
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { children: [
1337
- /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalSectionTitle, { children: l.selectTargetWorkspace }),
1337
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { children: [
1338
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.selectTargetWorkspace }),
1338
1339
  /* @__PURE__ */ jsxRuntime.jsx(ui.ScrollArea, { className: "h-[300px] rounded-lg bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 p-2", children: workspaces.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "py-4 text-center text-sm text-muted-foreground", children: l.noOtherWorkspaces }) : workspaces.map((w) => /* @__PURE__ */ jsxRuntime.jsxs(
1339
1340
  "button",
1340
1341
  {
@@ -1385,8 +1386,8 @@ function ExportResultsReport({
1385
1386
  testIds
1386
1387
  }) {
1387
1388
  const l = { ...DEFAULT_EXPORT_LABELS, ...labels };
1388
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.root, { testId: "export-results" }), children: [
1389
- /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalSectionTitle, { children: l.result }),
1389
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.root, { testId: "export-results" }), children: [
1390
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.result }),
1390
1391
  /* @__PURE__ */ jsxRuntime.jsx(
1391
1392
  "p",
1392
1393
  {
@@ -1463,17 +1464,6 @@ function ExportFooter({
1463
1464
  }
1464
1465
  var DEFAULT_VIEWER_LABELS = {
1465
1466
  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
1467
  useAsReference: "Use as reference",
1478
1468
  useAsReferenceTitle: "Use as reference for a new image generation",
1479
1469
  crop: "Crop",
@@ -1484,12 +1474,6 @@ var DEFAULT_VIEWER_LABELS = {
1484
1474
  pageInput: "Page number input",
1485
1475
  pageOfTitle: "Click to go to page",
1486
1476
  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
1477
  previewUnavailable: "Preview not available",
1494
1478
  cannotPreview: (extension) => `${extension} files cannot be previewed in the browser.`,
1495
1479
  downloadToOpen: "Download to open",
@@ -1571,99 +1555,6 @@ function ViewerTitle({
1571
1555
  }
1572
1556
  );
1573
1557
  }
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__ */ jsxRuntime.jsxs(
1591
- ui.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.edit, { testId: "edit-document-button" }),
1599
- className: "pointer-coarse:min-h-11",
1600
- children: [
1601
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-4" }),
1602
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: l.edit })
1603
- ]
1604
- }
1605
- );
1606
- }
1607
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1608
- !isDraft && /* @__PURE__ */ jsxRuntime.jsxs(
1609
- ui.Button,
1610
- {
1611
- onClick: onCancel,
1612
- variant: "outline",
1613
- size: "sm",
1614
- title: l.cancelEditing,
1615
- "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.cancel, { testId: "cancel-edit-button" }),
1616
- className: "pointer-coarse:min-h-11",
1617
- children: [
1618
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" }),
1619
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: l.cancel })
1620
- ]
1621
- }
1622
- ),
1623
- canCompare && /* @__PURE__ */ jsxRuntime.jsxs(
1624
- ui.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.compare, { testId: "compare-button" }),
1632
- className: "pointer-coarse:min-h-11",
1633
- children: [
1634
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GitCompare, { className: "size-4" }),
1635
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: l.compare })
1636
- ]
1637
- }
1638
- ),
1639
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
1640
- /* @__PURE__ */ jsxRuntime.jsxs(
1641
- ui.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.save, { testId: "save-document-button" }),
1649
- className: "pointer-coarse:min-h-11",
1650
- children: [
1651
- isSaving ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4" }),
1652
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: isSaving ? l.saving : isDraft ? l.save : l.saveVersion })
1653
- ]
1654
- }
1655
- ),
1656
- hasChanges && !isSaving && /* @__PURE__ */ jsxRuntime.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.unsavedDot, { testId: "unsaved-changes-dot" })
1662
- }
1663
- )
1664
- ] })
1665
- ] });
1666
- }
1667
1558
  function ViewerImageActions({
1668
1559
  compact,
1669
1560
  onUseAsReference,
@@ -1867,7 +1758,7 @@ function MoveToFolderDialog({
1867
1758
  className: "sm:max-w-2xl",
1868
1759
  "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.modal, { testId: "move-to-folder-modal" }),
1869
1760
  children: [
1870
- /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalHeader, { className: "p-0 pb-3", children: [
1761
+ /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalHeader, { className: "p-0 pb-3", children: [
1871
1762
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogTitle, { className: "flex items-center gap-2", children: [
1872
1763
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderOpen, { className: "size-5 text-yellow-text" }),
1873
1764
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: l.title }),
@@ -2035,71 +1926,6 @@ function ViewerPageCounter({ page, total, onGoTo, labels }) {
2035
1926
  ] })
2036
1927
  ] });
2037
1928
  }
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__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2052
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: l.compareVs }),
2053
- compareTarget,
2054
- versionLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: versionLabel }),
2055
- mode === "track-changes" ? /* @__PURE__ */ jsxRuntime.jsxs(
2056
- "button",
2057
- {
2058
- type: "button",
2059
- onClick: onToggleTrackChanges,
2060
- className: ui.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": chunkMHVNT4J3_cjs.testIdOr(trackChangesTestId, { testId: "track-changes-toggle" }),
2066
- children: [
2067
- showTrackChanges ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { className: "size-3.5" }),
2068
- l.trackChanges
2069
- ]
2070
- }
2071
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2072
- "button",
2073
- {
2074
- type: "button",
2075
- onClick: onFlip,
2076
- className: ui.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__ */ jsxRuntime.jsx(lucideReact.ArrowLeftRight, { className: "size-3.5" })
2083
- }
2084
- ),
2085
- /* @__PURE__ */ jsxRuntime.jsxs(
2086
- "button",
2087
- {
2088
- type: "button",
2089
- onClick: onStop,
2090
- className: ui.cn(
2091
- barButton,
2092
- "ml-auto text-muted-foreground hover:bg-muted hover:text-foreground"
2093
- ),
2094
- title: l.stopComparing,
2095
- children: [
2096
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3" }),
2097
- l.stopComparing
2098
- ]
2099
- }
2100
- )
2101
- ] });
2102
- }
2103
1929
  function ViewerPreviewUnavailable({
2104
1930
  extension,
2105
1931
  onDownload,
@@ -2471,140 +2297,6 @@ function FolderCommandList({
2471
2297
  ] })
2472
2298
  ] });
2473
2299
  }
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__ */ jsxRuntime.jsx(
2500
- "div",
2501
- {
2502
- className: ui.cn("p-6 text-sm text-muted-foreground", className),
2503
- "data-testid": chunkMHVNT4J3_cjs.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__ */ jsxRuntime.jsx(
2512
- "div",
2513
- {
2514
- className: ui.cn("h-full overflow-auto p-4", className),
2515
- "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.root, { testId: "version-timeline" }),
2516
- children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsxs(
2524
- "li",
2525
- {
2526
- className: ui.cn(
2527
- "flex items-center gap-3 rounded-md px-3 py-2.5",
2528
- isCurrent && "bg-accent"
2529
- ),
2530
- "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.row?.(v.id), { testId: `version-row-${v.id}` }),
2531
- children: [
2532
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
2533
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
2534
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2535
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground", children: l.version(i + 1) }),
2536
- badge && /* @__PURE__ */ jsxRuntime.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.currentBadge, {
2541
- testId: "version-current-badge"
2542
- }),
2543
- children: badge
2544
- }
2545
- )
2546
- ] }),
2547
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-sm text-muted-foreground", children: [
2548
- name,
2549
- " \xB7 ",
2550
- formatDate(v.createdAt),
2551
- branchedFrom !== null && /* @__PURE__ */ jsxRuntime.jsxs(
2552
- "span",
2553
- {
2554
- "data-testid": chunkMHVNT4J3_cjs.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__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2567
- /* @__PURE__ */ jsxRuntime.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.open?.(v.id), {
2574
- testId: `open-version-${v.id}`
2575
- }),
2576
- children: [
2577
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "size-3.5" }),
2578
- " ",
2579
- l.open
2580
- ]
2581
- }
2582
- ),
2583
- canCompare && /* @__PURE__ */ jsxRuntime.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": chunkMHVNT4J3_cjs.testIdOr(testIds?.compare?.(v.id), {
2590
- testId: `compare-version-${v.id}`
2591
- }),
2592
- children: [
2593
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GitCompare, { className: "size-3.5" }),
2594
- " ",
2595
- l.compare
2596
- ]
2597
- }
2598
- )
2599
- ] })
2600
- ]
2601
- },
2602
- v.id
2603
- );
2604
- }) })
2605
- }
2606
- );
2607
- }
2608
2300
  var DEFAULT_HTML_VIEWER_LABELS = {
2609
2301
  viewerRegion: "Parsed document viewer",
2610
2302
  pageOfTotal: (page, total) => `Page ${page} of ${total}`,
@@ -3130,117 +2822,6 @@ function TagPassagePanel({
3130
2822
  }
3131
2823
  );
3132
2824
  }
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__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", "data-slot": "redline-frame", children: [
3146
- header,
3147
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
3155
- ui.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__ */ jsxRuntime.jsx(lucideReact.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__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children });
3180
- }
3181
- function RedlineDocument({ children, bodyRef, gutter }) {
3182
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3183
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.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__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute right-2 top-0 w-9", "data-slot": "redline-gutter", children: markers.map((m) => /* @__PURE__ */ jsxRuntime.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: ui.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": chunkMHVNT4J3_cjs.testIdOr(testId?.(m.cid), { testId: `redline-revert-${m.cid}` }),
3239
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Undo2, { className: "size-3.5" })
3240
- },
3241
- m.cid
3242
- )) });
3243
- }
3244
2825
  var CLOSE_DELAY_MS = 120;
3245
2826
  function FilesAddMenu({
3246
2827
  items,
@@ -3806,7 +3387,7 @@ function UrlInputDialogView({
3806
3387
  className: "flex flex-col gap-0 overflow-hidden p-0 sm:max-w-[525px]",
3807
3388
  "data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.modal, { testId: "upload-modal-internet" }),
3808
3389
  children: [
3809
- /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: title ?? l.title }) }),
3390
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: title ?? l.title }) }),
3810
3391
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-6 pb-6", children: [
3811
3392
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogDescription, { className: "pt-4 text-sm text-muted-foreground", children: [
3812
3393
  l.description,
@@ -6945,7 +6526,7 @@ function FieldPicker({ ask, l }) {
6945
6526
  );
6946
6527
  }
6947
6528
  function AskPhase({ ask, l }) {
6948
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { className: "space-y-3", children: [
6529
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { className: "space-y-3", children: [
6949
6530
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
6950
6531
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: l.fieldLabel }),
6951
6532
  /* @__PURE__ */ jsxRuntime.jsx(FieldPicker, { ask, l })
@@ -6977,7 +6558,7 @@ function AskPhase({ ask, l }) {
6977
6558
  ] });
6978
6559
  }
6979
6560
  function ResultsPhase({ r, l }) {
6980
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkULWRNGGE_cjs.ModalSection, { className: "space-y-3", children: [
6561
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { className: "space-y-3", children: [
6981
6562
  r.isSingleField ? /* @__PURE__ */ jsxRuntime.jsx(
6982
6563
  "div",
6983
6564
  {
@@ -7388,14 +6969,12 @@ exports.DEFAULT_HTML_VIEWER_LABELS = DEFAULT_HTML_VIEWER_LABELS;
7388
6969
  exports.DEFAULT_IMPORT_LABELS = DEFAULT_IMPORT_LABELS;
7389
6970
  exports.DEFAULT_LABEL_MULTI_SELECT_LABELS = DEFAULT_LABEL_MULTI_SELECT_LABELS;
7390
6971
  exports.DEFAULT_MOVE_TO_FOLDER_LABELS = DEFAULT_MOVE_TO_FOLDER_LABELS;
7391
- exports.DEFAULT_REDLINE_LABELS = DEFAULT_REDLINE_LABELS;
7392
6972
  exports.DEFAULT_TAG_MANAGER_LABELS = DEFAULT_TAG_MANAGER_LABELS;
7393
6973
  exports.DEFAULT_TAG_PASSAGE_PANEL_LABELS = DEFAULT_TAG_PASSAGE_PANEL_LABELS;
7394
6974
  exports.DEFAULT_UPLOAD_FOOTER_LABELS = DEFAULT_UPLOAD_FOOTER_LABELS;
7395
6975
  exports.DEFAULT_UPLOAD_PARTS_LABELS = DEFAULT_UPLOAD_PARTS_LABELS;
7396
6976
  exports.DEFAULT_UPLOAD_SOURCES_LABELS = DEFAULT_UPLOAD_SOURCES_LABELS;
7397
6977
  exports.DEFAULT_URL_INPUT_DIALOG_LABELS = DEFAULT_URL_INPUT_DIALOG_LABELS;
7398
- exports.DEFAULT_VERSION_TIMELINE_LABELS = DEFAULT_VERSION_TIMELINE_LABELS;
7399
6978
  exports.DEFAULT_VIEWER_LABELS = DEFAULT_VIEWER_LABELS;
7400
6979
  exports.DEFAULT_VIEW_SELECTOR_LABELS = DEFAULT_VIEW_SELECTOR_LABELS;
7401
6980
  exports.DocStatusIcon = DocStatusIcon;
@@ -7485,13 +7064,6 @@ exports.MediaPreviewView = MediaPreviewView;
7485
7064
  exports.MoveToFolderDialog = MoveToFolderDialog;
7486
7065
  exports.PassageStepper = PassageStepper;
7487
7066
  exports.PdfPageNav = PdfPageNav;
7488
- exports.RedlineComputing = RedlineComputing;
7489
- exports.RedlineDocument = RedlineDocument;
7490
- exports.RedlineFrame = RedlineFrame;
7491
- exports.RedlineHeader = RedlineHeader;
7492
- exports.RedlineMark = RedlineMark;
7493
- exports.RedlineRevertGutter = RedlineRevertGutter;
7494
- exports.RedlineStatus = RedlineStatus;
7495
7067
  exports.RejectedFilesList = RejectedFilesList;
7496
7068
  exports.RelatedDocsCell = RelatedDocsCell;
7497
7069
  exports.SelectedFilesList = SelectedFilesList;
@@ -7527,10 +7099,7 @@ exports.UploadUrlButton = UploadUrlButton;
7527
7099
  exports.UrlDialogTitle = UrlDialogTitle;
7528
7100
  exports.UrlInputDialogView = UrlInputDialogView;
7529
7101
  exports.VendorLogo = VendorLogo;
7530
- exports.VersionTimeline = VersionTimeline;
7531
7102
  exports.ViewSelectorMenu = ViewSelectorMenu;
7532
- exports.ViewerCompareBar = ViewerCompareBar;
7533
- exports.ViewerEditActions = ViewerEditActions;
7534
7103
  exports.ViewerFrame = ViewerFrame;
7535
7104
  exports.ViewerHeaderEnd = ViewerHeaderEnd;
7536
7105
  exports.ViewerHeaderStart = ViewerHeaderStart;