@arbidocs/blocks 0.4.62 → 0.4.64

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 (52) hide show
  1. package/dist/{StreamedArtifactEditor-373E5JE7.js → StreamedArtifactEditor-OPL4KXOT.js} +3 -3
  2. package/dist/{StreamedArtifactEditor-373E5JE7.js.map → StreamedArtifactEditor-OPL4KXOT.js.map} +1 -1
  3. package/dist/{StreamedArtifactEditor-DBB7MXM3.cjs → StreamedArtifactEditor-RIKG6CJQ.cjs} +5 -5
  4. package/dist/{StreamedArtifactEditor-DBB7MXM3.cjs.map → StreamedArtifactEditor-RIKG6CJQ.cjs.map} +1 -1
  5. package/dist/agents/index.cjs +218 -218
  6. package/dist/agents/index.js +2 -2
  7. package/dist/artifacts/VersionTimeline.d.ts +4 -0
  8. package/dist/artifacts/index.cjs +21 -21
  9. package/dist/artifacts/index.js +1 -1
  10. package/dist/{chunk-YDVSD2XZ.js → chunk-5EBGRG3X.js} +8 -3
  11. package/dist/{chunk-YDVSD2XZ.js.map → chunk-5EBGRG3X.js.map} +1 -1
  12. package/dist/{chunk-FKIRBH5S.js → chunk-65HZ36MY.js} +13 -2
  13. package/dist/chunk-65HZ36MY.js.map +1 -0
  14. package/dist/{chunk-HAADKDRN.cjs → chunk-FA2QTFCK.cjs} +3 -3
  15. package/dist/{chunk-HAADKDRN.cjs.map → chunk-FA2QTFCK.cjs.map} +1 -1
  16. package/dist/{chunk-V34YFQ5Q.js → chunk-LYE6BPBE.js} +3 -3
  17. package/dist/{chunk-V34YFQ5Q.js.map → chunk-LYE6BPBE.js.map} +1 -1
  18. package/dist/{chunk-QWK7XXBP.cjs → chunk-SVJQWLOF.cjs} +13 -2
  19. package/dist/chunk-SVJQWLOF.cjs.map +1 -0
  20. package/dist/{chunk-KLPHGTQA.cjs → chunk-ZWA7UUZL.cjs} +8 -3
  21. package/dist/chunk-ZWA7UUZL.cjs.map +1 -0
  22. package/dist/connect/docx.cjs +4 -4
  23. package/dist/connect/docx.js +1 -1
  24. package/dist/connect/index.cjs +1 -1
  25. package/dist/connect/index.js +1 -1
  26. package/dist/connection/ai.d.ts +18 -3
  27. package/dist/docx/NativeDocxEditor.d.ts +7 -0
  28. package/dist/docx/index.cjs +24 -16
  29. package/dist/docx/index.cjs.map +1 -1
  30. package/dist/docx/index.js +12 -4
  31. package/dist/docx/index.js.map +1 -1
  32. package/dist/facts/index.cjs +1 -1
  33. package/dist/facts/index.js +1 -1
  34. package/dist/files/ExportParts.d.ts +12 -6
  35. package/dist/files/TransferParts.d.ts +97 -0
  36. package/dist/files/index.cjs +358 -63
  37. package/dist/files/index.cjs.map +1 -1
  38. package/dist/files/index.d.ts +1 -0
  39. package/dist/files/index.js +353 -66
  40. package/dist/files/index.js.map +1 -1
  41. package/dist/home/index.cjs +1 -1
  42. package/dist/home/index.js +1 -1
  43. package/dist/index.cjs +264 -264
  44. package/dist/index.js +3 -3
  45. package/dist/shell/index.cjs +1 -1
  46. package/dist/shell/index.js +1 -1
  47. package/dist/studio/index.cjs +1 -1
  48. package/dist/studio/index.js +1 -1
  49. package/package.json +4 -4
  50. package/dist/chunk-FKIRBH5S.js.map +0 -1
  51. package/dist/chunk-KLPHGTQA.cjs.map +0 -1
  52. package/dist/chunk-QWK7XXBP.cjs.map +0 -1
@@ -8,9 +8,9 @@ var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
8
8
  var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
9
9
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
10
10
  var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
11
+ require('../chunk-C54XEN5T.cjs');
11
12
  require('../chunk-FX3K6LNZ.cjs');
12
13
  require('../chunk-PPCATBOY.cjs');
13
- require('../chunk-C54XEN5T.cjs');
14
14
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
15
15
  var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
16
16
  var chunk2ZTONLT5_cjs = require('../chunk-2ZTONLT5.cjs');
@@ -1138,18 +1138,20 @@ function UploadSourceSection({
1138
1138
  );
1139
1139
  }
1140
1140
  var DEFAULT_EXPORT_LABELS = {
1141
- export: "Export",
1141
+ export: "Export, copy or move",
1142
1142
  selected: (count) => `${count} selected`,
1143
- exportMethod: "Export Method",
1144
- downloadToComputer: "Download to Computer",
1145
- downloadDescription: "Download all selected documents as a ZIP file with metadata CSV",
1146
- exportColumns: "Export Columns",
1143
+ exportMethod: "Where to",
1144
+ downloadToComputer: "Download as files",
1145
+ downloadDescription: "A ZIP with the files (every version), one data file per kind (JSON) and a manifest",
1146
+ copyToWorkspace: "Copy to another workspace",
1147
+ copyDescription: "Re-encrypted for the target workspace; nothing changes here",
1148
+ moveToWorkspace: "Move to another workspace",
1149
+ moveDescription: "Copied first, then removed from here \u2014 only what you may delete here",
1150
+ exportColumns: "Document table (index.csv)",
1147
1151
  columnsVisible: "Visible columns (from current table view)",
1148
1152
  columnsAll: "All columns (including hidden)",
1149
- columnsFiles: "Files only (no metadata CSV)",
1150
- columnsHelp: "Choose which columns to include in the metadata CSV file",
1151
- exportToWorkspace: "Export to Another Workspace",
1152
- exportToWorkspaceDescription: "Copy documents to another workspace in ARBI",
1153
+ columnsFiles: "None (files and data only)",
1154
+ columnsHelp: "Which document columns go into index.csv",
1153
1155
  selectTargetWorkspace: "Select Target Workspace",
1154
1156
  noOtherWorkspaces: "No other workspaces available",
1155
1157
  member: "member",
@@ -1170,7 +1172,7 @@ function ExportModalTitle({
1170
1172
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
1171
1173
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
1172
1174
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: l.export }),
1173
- /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { className: "bg-accent px-2.5 py-0.5 text-accent-foreground hover:bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: l.selected(selectedCount) }) })
1175
+ selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { className: "bg-accent px-2.5 py-0.5 text-accent-foreground hover:bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: l.selected(selectedCount) }) })
1174
1176
  ] }),
1175
1177
  workspace && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-1.5 text-sm font-normal text-muted-foreground", children: [
1176
1178
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: workspace.icon }),
@@ -1186,73 +1188,91 @@ function ExportMethodChooser({
1186
1188
  onModeChange,
1187
1189
  columnsMode,
1188
1190
  onColumnsModeChange,
1191
+ showColumns = true,
1192
+ moveDisabledReason,
1189
1193
  labels,
1190
1194
  columnsTestId
1191
1195
  }) {
1192
1196
  const l = { ...DEFAULT_EXPORT_LABELS, ...labels };
1193
1197
  const card = "flex cursor-pointer items-start space-x-3 rounded-lg bg-muted p-4 transition-colors hover:bg-accent";
1198
+ const options = [
1199
+ {
1200
+ value: "download",
1201
+ icon: lucideReact.Download,
1202
+ title: l.downloadToComputer,
1203
+ description: l.downloadDescription
1204
+ },
1205
+ { value: "copy", icon: lucideReact.Copy, title: l.copyToWorkspace, description: l.copyDescription },
1206
+ {
1207
+ value: "move",
1208
+ icon: lucideReact.FolderInput,
1209
+ title: l.moveToWorkspace,
1210
+ description: moveDisabledReason ?? l.moveDescription,
1211
+ disabledReason: moveDisabledReason
1212
+ }
1213
+ ];
1194
1214
  return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { children: [
1195
1215
  /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.exportMethod }),
1196
- /* @__PURE__ */ jsxRuntime.jsxs(
1216
+ /* @__PURE__ */ jsxRuntime.jsx(
1197
1217
  ui.RadioGroup,
1198
1218
  {
1199
1219
  value: mode,
1200
1220
  onValueChange: (v) => onModeChange(v),
1201
1221
  className: "space-y-3",
1202
- children: [
1203
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: card, children: [
1204
- /* @__PURE__ */ jsxRuntime.jsx(ui.RadioGroupItem, { value: "download", id: "download", className: "mt-1" }),
1205
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", onClick: () => onModeChange("download"), children: [
1206
- /* @__PURE__ */ jsxRuntime.jsxs(
1207
- ui.Label,
1208
- {
1209
- htmlFor: "download",
1210
- className: "flex cursor-pointer items-center gap-2 font-medium",
1211
- children: [
1212
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { className: "size-4" }),
1213
- l.downloadToComputer
1214
- ]
1215
- }
1216
- ),
1217
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: l.downloadDescription }),
1218
- mode === "download" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", onClick: (e) => e.stopPropagation(), children: [
1219
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-foreground", children: l.exportColumns }),
1220
- /* @__PURE__ */ jsxRuntime.jsxs(
1221
- "select",
1222
+ children: options.map((option) => {
1223
+ const Icon = option.icon;
1224
+ const disabled = !!option.disabledReason;
1225
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1226
+ "div",
1227
+ {
1228
+ className: ui.cn(card, disabled && "cursor-not-allowed opacity-60 hover:bg-muted"),
1229
+ children: [
1230
+ /* @__PURE__ */ jsxRuntime.jsx(
1231
+ ui.RadioGroupItem,
1222
1232
  {
1223
- value: columnsMode,
1224
- onChange: (e) => onColumnsModeChange(e.target.value),
1225
- className: "mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm pointer-coarse:min-h-11",
1226
- "data-testid": chunkMHVNT4J3_cjs.testIdOr(columnsTestId, { testId: "export-columns-selector" }),
1227
- children: [
1228
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "visible", children: l.columnsVisible }),
1229
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: l.columnsAll }),
1230
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "files", children: l.columnsFiles })
1231
- ]
1233
+ value: option.value,
1234
+ id: `export-mode-${option.value}`,
1235
+ className: "mt-1",
1236
+ disabled
1232
1237
  }
1233
1238
  ),
1234
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground", children: l.columnsHelp })
1235
- ] })
1236
- ] })
1237
- ] }),
1238
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: card, children: [
1239
- /* @__PURE__ */ jsxRuntime.jsx(ui.RadioGroupItem, { value: "workspace", id: "workspace", className: "mt-1" }),
1240
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", onClick: () => onModeChange("workspace"), children: [
1241
- /* @__PURE__ */ jsxRuntime.jsxs(
1242
- ui.Label,
1243
- {
1244
- htmlFor: "workspace",
1245
- className: "flex cursor-pointer items-center gap-2 font-medium",
1246
- children: [
1247
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderUp, { className: "size-4" }),
1248
- l.exportToWorkspace
1249
- ]
1250
- }
1251
- ),
1252
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: l.exportToWorkspaceDescription })
1253
- ] })
1254
- ] })
1255
- ]
1239
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", onClick: () => !disabled && onModeChange(option.value), children: [
1240
+ /* @__PURE__ */ jsxRuntime.jsxs(
1241
+ ui.Label,
1242
+ {
1243
+ htmlFor: `export-mode-${option.value}`,
1244
+ className: "flex cursor-pointer items-center gap-2 font-medium",
1245
+ children: [
1246
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }),
1247
+ option.title
1248
+ ]
1249
+ }
1250
+ ),
1251
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: option.description }),
1252
+ option.value === "download" && mode === "download" && showColumns && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3", onClick: (e) => e.stopPropagation(), children: [
1253
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-foreground", children: l.exportColumns }),
1254
+ /* @__PURE__ */ jsxRuntime.jsxs(
1255
+ "select",
1256
+ {
1257
+ value: columnsMode,
1258
+ onChange: (e) => onColumnsModeChange(e.target.value),
1259
+ className: "mt-1.5 w-full rounded-md border border-input bg-background px-3 py-2 text-sm pointer-coarse:min-h-11",
1260
+ "data-testid": chunkMHVNT4J3_cjs.testIdOr(columnsTestId, { testId: "export-columns-selector" }),
1261
+ children: [
1262
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "visible", children: l.columnsVisible }),
1263
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "all", children: l.columnsAll }),
1264
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "files", children: l.columnsFiles })
1265
+ ]
1266
+ }
1267
+ ),
1268
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground", children: l.columnsHelp })
1269
+ ] })
1270
+ ] })
1271
+ ]
1272
+ },
1273
+ option.value
1274
+ );
1275
+ })
1256
1276
  }
1257
1277
  )
1258
1278
  ] });
@@ -1393,6 +1413,273 @@ function ExportFooter({
1393
1413
  )
1394
1414
  ] });
1395
1415
  }
1416
+ var DEFAULT_TRANSFER_LABELS = {
1417
+ what: "What",
1418
+ scopeSelection: (count) => `The ${count} selected`,
1419
+ scopeLabel: "Everything with a label",
1420
+ scopeAll: "Everything in this workspace",
1421
+ chooseLabel: "Label",
1422
+ include: "Include",
1423
+ references: "Documents they cite",
1424
+ referencesInclude: "Bring them along",
1425
+ referencesLink: "Leave them here (the citation keeps pointing here)",
1426
+ referencesHelp: "Notes, conversations and automations can cite documents outside your selection.",
1427
+ conflicts: "Already in the target",
1428
+ conflictSkip: "Skip it (same-named file or automation, identical note)",
1429
+ conflictKeepBoth: 'Keep both \u2014 the copy is renamed "name (2)"',
1430
+ summary: "This will include",
1431
+ summaryLoading: "Working out what is included\u2026",
1432
+ hide: "Close \u2014 it keeps going",
1433
+ cancelJob: "Stop",
1434
+ resume: "Resume"
1435
+ };
1436
+ function TransferScopeChooser({
1437
+ scope,
1438
+ onScopeChange,
1439
+ selectedCount,
1440
+ labelOptions,
1441
+ labelId,
1442
+ onLabelChange,
1443
+ labels
1444
+ }) {
1445
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1446
+ const choices = [
1447
+ { value: "selection", title: l.scopeSelection(selectedCount), hidden: selectedCount === 0 },
1448
+ { value: "label", title: l.scopeLabel, disabled: labelOptions.length === 0 },
1449
+ { value: "all", title: l.scopeAll }
1450
+ ];
1451
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-scope", children: [
1452
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.what }),
1453
+ /* @__PURE__ */ jsxRuntime.jsx(
1454
+ ui.RadioGroup,
1455
+ {
1456
+ value: scope,
1457
+ onValueChange: (v) => onScopeChange(v),
1458
+ className: "space-y-2",
1459
+ children: choices.filter((c) => !c.hidden).map((c) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1460
+ /* @__PURE__ */ jsxRuntime.jsx(
1461
+ ui.RadioGroupItem,
1462
+ {
1463
+ value: c.value,
1464
+ id: `transfer-scope-${c.value}`,
1465
+ disabled: c.disabled,
1466
+ "data-testid": `transfer-scope-${c.value}`
1467
+ }
1468
+ ),
1469
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `transfer-scope-${c.value}`, className: "cursor-pointer", children: c.title }),
1470
+ c.value === "label" && scope === "label" && /* @__PURE__ */ jsxRuntime.jsx(
1471
+ "select",
1472
+ {
1473
+ "aria-label": l.chooseLabel,
1474
+ value: labelId ?? "",
1475
+ onChange: (e) => onLabelChange(e.target.value),
1476
+ className: "min-w-0 flex-1 rounded-md border border-input bg-background px-2 py-1 text-sm pointer-coarse:min-h-11",
1477
+ "data-testid": "transfer-scope-label-select",
1478
+ children: labelOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.id, children: option.name }, option.id))
1479
+ }
1480
+ )
1481
+ ] }, c.value))
1482
+ }
1483
+ )
1484
+ ] });
1485
+ }
1486
+ function TransferKindsPicker({
1487
+ options,
1488
+ selected,
1489
+ onToggle,
1490
+ labels
1491
+ }) {
1492
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1493
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-kinds", children: [
1494
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.include }),
1495
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: options.map((option) => {
1496
+ const id = `transfer-kind-${option.kind}`;
1497
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1498
+ "div",
1499
+ {
1500
+ className: "flex items-center gap-2 rounded-md bg-muted px-3 py-2",
1501
+ children: [
1502
+ /* @__PURE__ */ jsxRuntime.jsx(
1503
+ ui.Checkbox,
1504
+ {
1505
+ id,
1506
+ checked: selected.includes(option.kind),
1507
+ onCheckedChange: (checked) => onToggle(option.kind, checked === true),
1508
+ "data-testid": id
1509
+ }
1510
+ ),
1511
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: id, className: "flex-1 cursor-pointer", children: option.label }),
1512
+ option.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
1513
+ "span",
1514
+ {
1515
+ className: "text-sm tabular-nums text-muted-foreground",
1516
+ "data-testid": `${id}-count`,
1517
+ children: option.count
1518
+ }
1519
+ )
1520
+ ]
1521
+ },
1522
+ option.kind
1523
+ );
1524
+ }) })
1525
+ ] });
1526
+ }
1527
+ function ChoiceRows({
1528
+ title,
1529
+ value,
1530
+ onChange,
1531
+ choices,
1532
+ help,
1533
+ testId
1534
+ }) {
1535
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": testId, children: [
1536
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: title }),
1537
+ help && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm text-muted-foreground", children: help }),
1538
+ /* @__PURE__ */ jsxRuntime.jsx(ui.RadioGroup, { value, onValueChange: (v) => onChange(v), className: "space-y-2", children: choices.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1539
+ /* @__PURE__ */ jsxRuntime.jsx(
1540
+ ui.RadioGroupItem,
1541
+ {
1542
+ value: c.value,
1543
+ id: `${testId}-${c.value}`,
1544
+ "data-testid": `${testId}-${c.value}`
1545
+ }
1546
+ ),
1547
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `${testId}-${c.value}`, className: "cursor-pointer", children: c.title })
1548
+ ] }, c.value)) })
1549
+ ] });
1550
+ }
1551
+ function TransferReferencesChooser({
1552
+ value,
1553
+ onChange,
1554
+ labels
1555
+ }) {
1556
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1557
+ return /* @__PURE__ */ jsxRuntime.jsx(
1558
+ ChoiceRows,
1559
+ {
1560
+ title: l.references,
1561
+ help: l.referencesHelp,
1562
+ value,
1563
+ onChange,
1564
+ testId: "transfer-references",
1565
+ choices: [
1566
+ { value: "include", title: l.referencesInclude },
1567
+ { value: "link", title: l.referencesLink }
1568
+ ]
1569
+ }
1570
+ );
1571
+ }
1572
+ function TransferConflictChooser({
1573
+ value,
1574
+ onChange,
1575
+ labels
1576
+ }) {
1577
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1578
+ return /* @__PURE__ */ jsxRuntime.jsx(
1579
+ ChoiceRows,
1580
+ {
1581
+ title: l.conflicts,
1582
+ value,
1583
+ onChange,
1584
+ testId: "transfer-conflict",
1585
+ choices: [
1586
+ { value: "skip", title: l.conflictSkip },
1587
+ { value: "keep_both", title: l.conflictKeepBoth }
1588
+ ]
1589
+ }
1590
+ );
1591
+ }
1592
+ function TransferPlanSummary({
1593
+ lines,
1594
+ warnings,
1595
+ isLoading,
1596
+ labels
1597
+ }) {
1598
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1599
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-plan-summary", children: [
1600
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: l.summary }),
1601
+ isLoading && lines.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
1602
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
1603
+ l.summaryLoading
1604
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1 text-sm", children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2", children: [
1605
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, { className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }),
1606
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: line })
1607
+ ] }, line)) }),
1608
+ warnings.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-2 space-y-1 text-sm", "data-testid": "transfer-plan-warnings", children: warnings.map((warning) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2", children: [
1609
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "mt-0.5 size-4 shrink-0 text-yellow-text" }),
1610
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: warning })
1611
+ ] }, warning)) })
1612
+ ] });
1613
+ }
1614
+ function TransferProgressView({
1615
+ title,
1616
+ processed,
1617
+ total,
1618
+ phaseLabel,
1619
+ onHide,
1620
+ onCancel,
1621
+ isCancelling,
1622
+ labels
1623
+ }) {
1624
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1625
+ const percent = total > 0 ? Math.min(100, Math.round(processed / total * 100)) : 0;
1626
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunk2ZTONLT5_cjs.ModalSection, { "data-testid": "transfer-progress", children: [
1627
+ /* @__PURE__ */ jsxRuntime.jsx(chunk2ZTONLT5_cjs.ModalSectionTitle, { children: title }),
1628
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Progress, { value: percent, className: "h-2" }),
1629
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-2 text-sm text-muted-foreground", "data-testid": "transfer-progress-text", children: [
1630
+ phaseLabel,
1631
+ " \xB7 ",
1632
+ processed,
1633
+ " / ",
1634
+ total
1635
+ ] }),
1636
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
1637
+ onCancel && /* @__PURE__ */ jsxRuntime.jsx(
1638
+ ui.Button,
1639
+ {
1640
+ variant: "outline",
1641
+ onClick: onCancel,
1642
+ disabled: isCancelling,
1643
+ "data-testid": "transfer-cancel-button",
1644
+ children: l.cancelJob
1645
+ }
1646
+ ),
1647
+ onHide && /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: onHide, "data-testid": "transfer-hide-button", children: l.hide })
1648
+ ] })
1649
+ ] });
1650
+ }
1651
+ function TransferResumeBanner({
1652
+ message,
1653
+ onResume,
1654
+ isResuming,
1655
+ labels
1656
+ }) {
1657
+ const l = { ...DEFAULT_TRANSFER_LABELS, ...labels };
1658
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1659
+ "div",
1660
+ {
1661
+ className: ui.cn("flex items-center gap-3 rounded-lg bg-muted p-3 text-sm"),
1662
+ "data-testid": "transfer-resume-banner",
1663
+ children: [
1664
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "size-4 shrink-0 text-yellow-text" }),
1665
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children: message }),
1666
+ /* @__PURE__ */ jsxRuntime.jsxs(
1667
+ ui.Button,
1668
+ {
1669
+ size: "sm",
1670
+ onClick: onResume,
1671
+ disabled: isResuming,
1672
+ "data-testid": "transfer-resume-button",
1673
+ children: [
1674
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "size-4" }),
1675
+ l.resume
1676
+ ]
1677
+ }
1678
+ )
1679
+ ]
1680
+ }
1681
+ );
1682
+ }
1396
1683
  var DEFAULT_VIEWER_LABELS = {
1397
1684
  shared: "Shared",
1398
1685
  useAsReference: "Use as reference",
@@ -6992,6 +7279,7 @@ exports.DEFAULT_LABEL_MULTI_SELECT_LABELS = DEFAULT_LABEL_MULTI_SELECT_LABELS;
6992
7279
  exports.DEFAULT_MOVE_TO_FOLDER_LABELS = DEFAULT_MOVE_TO_FOLDER_LABELS;
6993
7280
  exports.DEFAULT_TAG_MANAGER_LABELS = DEFAULT_TAG_MANAGER_LABELS;
6994
7281
  exports.DEFAULT_TAG_PASSAGE_PANEL_LABELS = DEFAULT_TAG_PASSAGE_PANEL_LABELS;
7282
+ exports.DEFAULT_TRANSFER_LABELS = DEFAULT_TRANSFER_LABELS;
6995
7283
  exports.DEFAULT_UPLOAD_FOOTER_LABELS = DEFAULT_UPLOAD_FOOTER_LABELS;
6996
7284
  exports.DEFAULT_UPLOAD_PARTS_LABELS = DEFAULT_UPLOAD_PARTS_LABELS;
6997
7285
  exports.DEFAULT_UPLOAD_SOURCES_LABELS = DEFAULT_UPLOAD_SOURCES_LABELS;
@@ -7102,6 +7390,13 @@ exports.TagFormSharedToggle = TagFormSharedToggle;
7102
7390
  exports.TagManager = TagManager;
7103
7391
  exports.TagPassagePanel = TagPassagePanel;
7104
7392
  exports.TaskSection = TaskSection;
7393
+ exports.TransferConflictChooser = TransferConflictChooser;
7394
+ exports.TransferKindsPicker = TransferKindsPicker;
7395
+ exports.TransferPlanSummary = TransferPlanSummary;
7396
+ exports.TransferProgressView = TransferProgressView;
7397
+ exports.TransferReferencesChooser = TransferReferencesChooser;
7398
+ exports.TransferResumeBanner = TransferResumeBanner;
7399
+ exports.TransferScopeChooser = TransferScopeChooser;
7105
7400
  exports.TranslationBadge = TranslationBadge;
7106
7401
  exports.TranslationCompareTable = TranslationCompareTable;
7107
7402
  exports.UploadBrowseButtons = UploadBrowseButtons;