@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
@@ -1,13 +1,22 @@
1
1
  "use client";
2
- import { NativeDocxEditor } from '../chunk-YDVSD2XZ.js';
3
- export { DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, NativeDocxEditor, StreamedWordArtifact, loadDocxFonts, normalizeDocxExport, reviewModule, useReview, useReviewItem } from '../chunk-YDVSD2XZ.js';
2
+ import { NativeDocxEditor } from '../chunk-5EBGRG3X.js';
3
+ export { DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, NativeDocxEditor, StreamedWordArtifact, loadDocxFonts, normalizeDocxExport, reviewModule, useReview, useReviewItem } from '../chunk-5EBGRG3X.js';
4
4
  import '../chunk-AA3PT6KR.js';
5
5
  import '../chunk-7F6CBP3Z.js';
6
6
  export { DocxEditor, useDocxEditor, useEditorState } from '@docx-editor.dev/react';
7
7
  export { createHocuspocusCollaboration } from '@arbidocs/coedit/hocuspocus';
8
8
  import { useRef, useState, useEffect } from 'react';
9
+ import { parseVersionRef } from '@arbidocs/react/artifacts';
9
10
  import { jsxs, jsx } from 'react/jsx-runtime';
10
11
 
12
+ function redlineQuery(baseId, revisedId) {
13
+ const base = parseVersionRef(baseId);
14
+ const revised = parseVersionRef(revisedId);
15
+ const query = new URLSearchParams({ base_ext_id: base.docId, revised_ext_id: revised.docId });
16
+ if (base.version) query.set("base_version", String(base.version));
17
+ if (revised.version) query.set("revised_version", String(revised.version));
18
+ return query;
19
+ }
11
20
  function NativeDocxComparison({
12
21
  adapter,
13
22
  baseId,
@@ -24,8 +33,7 @@ function NativeDocxComparison({
24
33
  let cancelled = false;
25
34
  setDocumentId("");
26
35
  setError("");
27
- const query = new URLSearchParams({ base_ext_id: baseId, revised_ext_id: revisedId });
28
- void host.current.adapter.request(`/redline?${query}`, { method: "POST" }).then((response) => response.json()).then((result) => {
36
+ void host.current.adapter.request(`/redline?${redlineQuery(baseId, revisedId)}`, { method: "POST" }).then((response) => response.json()).then((result) => {
29
37
  if (!result.document_ext_id) throw new Error("Comparison did not return a Word document.");
30
38
  if (!cancelled) {
31
39
  setDocumentId(result.document_ext_id);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/docx/NativeDocxComparison.tsx"],"names":["error"],"mappings":";;;;;;;;;AAYO,SAAS,oBAAA,CAAqB;AAAA,EACnC,OAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAA8B;AAC5B,EAAA,MAAM,IAAA,GAAO,MAAA,CAAO,EAAE,OAAA,EAAS,YAAY,CAAA;AAC3C,EAAA,IAAA,CAAK,OAAA,GAAU,EAAE,OAAA,EAAS,UAAA,E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AO,MAAM;AACX,MAAA,SAAA,GAAY,IAAA;AAAA,IACd,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAA,EAAQ,SAAA,EAAW,OAAO,CAAC,CAAA;AAC/B,EAAA,IAAI,KAAA;AACF,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,MAAK,OAAA,EACtC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,OAAG,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,sBACV,GAAA,CAAC,QAAA,EAAA,EAAO,OAAA,EAAS,MAAM,UAAA,CAAW,CAAC,KAAA,KAAU,KAAA,GAAQ,CAAC,CAAA,EAAG,QAAA,EAAA,kBAAA,EAAgB;AAAA,KAAA,EAC3E,CAAA;AAEJ,EAAA,IAAI,CAAC,UAAA;AACH,IAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,IAAA,EAAK,UAAS,QAAA,EAAA,gCAAA,EAEjD,CAAA;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MAEC,OAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAO,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,UAAA,EAAY,EAAE,CAAC,CAAA,eAAA;AAAA,KAAA;AAAA,IAHlC;AAAA,GAIP;AAEJ","file":"index.js","sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { NativeDocxEditor, type NativeDocxAdapter } from './NativeDocxEditor'\n\nexport interface NativeDocxComparisonProps {\n adapter: NativeDocxAdapter\n baseId: string\n revisedId: string\n title: string\n onCompared?: (documentId: string) => void | Promise<void>\n}\n\n/** Word comparison through the host's authenticated transport and LibreOffice service. */\nexport function NativeDocxComparison({\n adapter,\n baseId,\n revisedId,\n title,\n onCompared,\n}: NativeDocxComparisonProps) {\n const host = useRef({ adapter, onCompared })\n host.current = { adapter, onCompared }\n const [documentId, setDocumentId] = useState('')\n const [error, setError] = useState('')\n const [attempt, setAttempt] = useState(0)\n useEffect(() => {\n let cancelled = false\n setDocumentId('')\n setError('')\n const query = new URLSearchParams({ base_ext_id: baseId, revised_ext_id: revisedId })\n void host.current.adapter\n .request(`/redline?${query}`, { method: 'POST' })\n .then((response) => response.json())\n .then((result: { document_ext_id: string }) => {\n if (!result.document_ext_id) throw new Error('Comparison did not return a Word document.')\n if (!cancelled) {\n setDocumentId(result.document_ext_id)\n void Promise.resolve(host.current.onCompared?.(result.document_ext_id)).catch(() => {})\n }\n })\n .catch((error) => {\n if (!cancelled) setError(error instanceof Error ? error.message : String(error))\n })\n return () => {\n cancelled = true\n }\n }, [baseId, revisedId, attempt])\n if (error)\n return (\n <div className=\"native-docx-error\" role=\"alert\">\n <p>{error}</p>\n <button onClick={() => setAttempt((value) => value + 1)}>Retry comparison</button>\n </div>\n )\n if (!documentId)\n return (\n <div className=\"native-docx-error\" role=\"status\">\n Comparing Word documents…\n </div>\n )\n return (\n <NativeDocxEditor\n key={documentId}\n adapter={adapter}\n documentId={documentId}\n title={`${title.replace(/\\.[^.]+$/, '')} (redline).docx`}\n />\n )\n}\n"]}
1
+ {"version":3,"sources":["../../src/docx/NativeDocxComparison.tsx"],"names":["error"],"mappings":";;;;;;;;;;AAaA,SAAS,YAAA,CAAa,QAAgB,SAAA,EAAoC;AACxE,EAAA,MAAM,IAAA,GAAO,gBAAgB,MAAM,CAAA;AACnC,EAAA,MAAM,OAAA,GAAU,gBAAgB,SAAS,CAAA;AACzC,EAAA,MAAM,KAAA,GAAQ,IAAI,eAAA,CAAgB,EAAE,WAAA,EAAa,KAAK,KAAA,EAAO,cAAA,EAAgB,OAAA,CAAQ,KAAA,EAAO,CAAA;AAC5F,EAAA,IAAI,IAAA,CAAK,SAAS,KAAA,CAAM,GAAA,CAAI,gBAAgB,MAAA,CAAO,IAAA,CAAK,OAAO,CAAC,CAAA;AAChE,EAAA,IAAI,OAAA,CAAQ,SAAS,KAAA,CAAM,GAAA,CAAI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CAAE,KAAA,CAAM,MAAM;AAAA,QAAC,CAAC,CAAA;AAAA,MACxF;AAAA,IACF,CAAC,CAAA,CACA,KAAA,CAAM,CAACA,MAAAA,KAAU;AAChB,MAAA,IAAI,CAAC,WAAW,QAAA,CAASA,MAAAA,YAAiB,QAAQA,MAAAA,CAAM,OAAA,GAAU,MAAA,CAAOA,MAAK,CAAC,CAAA;AAAA,IACjF,CAAC,CAAA;AACH,IAAA,OAAO,MAAM;AACX,MAAA,SAAA,GAAY,IAAA;AAAA,IACd,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,MAAA,EAAQ,SAAA,EAAW,OAAO,CAAC,CAAA;AAC/B,EAAA,IAAI,KAAA;AACF,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,MAAK,OAAA,EACtC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,OAAG,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,sBACV,GAAA,CAAC,QAAA,EAAA,EAAO,OAAA,EAAS,MAAM,UAAA,CAAW,CAAC,KAAA,KAAU,KAAA,GAAQ,CAAC,CAAA,EAAG,QAAA,EAAA,kBAAA,EAAgB;AAAA,KAAA,EAC3E,CAAA;AAEJ,EAAA,IAAI,CAAC,UAAA;AACH,IAAA,2BACG,KAAA,EAAA,EAAI,SAAA,EAAU,mBAAA,EAAoB,IAAA,EAAK,UAAS,QAAA,EAAA,gCAAA,EAEjD,CAAA;AAEJ,EAAA,uBACE,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MAEC,OAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAO,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,UAAA,EAAY,EAAE,CAAC,CAAA,eAAA;AAAA,KAAA;AAAA,IAHlC;AAAA,GAIP;AAEJ","file":"index.js","sourcesContent":["import { useEffect, useRef, useState } from 'react'\nimport { parseVersionRef } from '@arbidocs/react/artifacts'\nimport { NativeDocxEditor, type NativeDocxAdapter } from './NativeDocxEditor'\n\nexport interface NativeDocxComparisonProps {\n adapter: NativeDocxAdapter\n baseId: string\n revisedId: string\n title: string\n onCompared?: (documentId: string) => void | Promise<void>\n}\n\n/** A `doc-…@v{n}` side names an older version: the endpoint takes its document and version apart. */\nfunction redlineQuery(baseId: string, revisedId: string): URLSearchParams {\n const base = parseVersionRef(baseId)\n const revised = parseVersionRef(revisedId)\n const query = new URLSearchParams({ base_ext_id: base.docId, revised_ext_id: revised.docId })\n if (base.version) query.set('base_version', String(base.version))\n if (revised.version) query.set('revised_version', String(revised.version))\n return query\n}\n\n/** Word comparison through the host's authenticated transport and LibreOffice service. */\nexport function NativeDocxComparison({\n adapter,\n baseId,\n revisedId,\n title,\n onCompared,\n}: NativeDocxComparisonProps) {\n const host = useRef({ adapter, onCompared })\n host.current = { adapter, onCompared }\n const [documentId, setDocumentId] = useState('')\n const [error, setError] = useState('')\n const [attempt, setAttempt] = useState(0)\n useEffect(() => {\n let cancelled = false\n setDocumentId('')\n setError('')\n void host.current.adapter\n .request(`/redline?${redlineQuery(baseId, revisedId)}`, { method: 'POST' })\n .then((response) => response.json())\n .then((result: { document_ext_id: string }) => {\n if (!result.document_ext_id) throw new Error('Comparison did not return a Word document.')\n if (!cancelled) {\n setDocumentId(result.document_ext_id)\n void Promise.resolve(host.current.onCompared?.(result.document_ext_id)).catch(() => {})\n }\n })\n .catch((error) => {\n if (!cancelled) setError(error instanceof Error ? error.message : String(error))\n })\n return () => {\n cancelled = true\n }\n }, [baseId, revisedId, attempt])\n if (error)\n return (\n <div className=\"native-docx-error\" role=\"alert\">\n <p>{error}</p>\n <button onClick={() => setAttempt((value) => value + 1)}>Retry comparison</button>\n </div>\n )\n if (!documentId)\n return (\n <div className=\"native-docx-error\" role=\"status\">\n Comparing Word documents…\n </div>\n )\n return (\n <NativeDocxEditor\n key={documentId}\n adapter={adapter}\n documentId={documentId}\n title={`${title.replace(/\\.[^.]+$/, '')} (redline).docx`}\n />\n )\n}\n"]}
@@ -7,9 +7,9 @@ var chunkOUW6G4O2_cjs = require('../chunk-OUW6G4O2.cjs');
7
7
  var chunkIA7RTPT3_cjs = require('../chunk-IA7RTPT3.cjs');
8
8
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
9
9
  var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
10
+ require('../chunk-C54XEN5T.cjs');
10
11
  require('../chunk-FX3K6LNZ.cjs');
11
12
  var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
12
- require('../chunk-C54XEN5T.cjs');
13
13
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
14
14
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
15
15
  var lucideReact = require('lucide-react');
@@ -6,9 +6,9 @@ import { GridView, SelectionBar, SelectionBarAction } from '../chunk-BUHKUKKB.js
6
6
  import { FilterInput } from '../chunk-YU2KUMGE.js';
7
7
  export { DEFAULT_FILTER_INPUT_LABELS as DEFAULT_FACTS_FILTER_INPUT_LABELS, DEFAULT_FILTER_FIELDS as FACTS_SEARCH_FIELD_OPTIONS, FilterInput as FactsFilterInput } from '../chunk-YU2KUMGE.js';
8
8
  import { TabHeader } from '../chunk-4WWM3GQ5.js';
9
+ import '../chunk-76JDDMSP.js';
9
10
  import '../chunk-SLSBJRWW.js';
10
11
  import { observeResize } from '../chunk-NPLYHR2E.js';
11
- import '../chunk-76JDDMSP.js';
12
12
  import { initials } from '../chunk-OXF2IFXG.js';
13
13
  import { testIdOr } from '../chunk-7F6CBP3Z.js';
14
14
  import { PencilLine, Check, MoreVertical, Pencil, Trash2, CalendarDays, X, Columns3, ChevronDown, RotateCcw, Milestone, CalendarClock, Scale, Lightbulb, ArrowRight, Loader2, Info, PinOff, Pin, Tags, MoreHorizontal, FolderUp, BookMarked, Plus, Search, CheckCircle2, CornerDownLeft, Quote, ChevronLeft, ChevronRight, Table2, CalendarRange, GanttChartSquare } from 'lucide-react';
@@ -6,13 +6,15 @@ export interface ExportLabels {
6
6
  exportMethod: string;
7
7
  downloadToComputer: string;
8
8
  downloadDescription: string;
9
+ copyToWorkspace: string;
10
+ copyDescription: string;
11
+ moveToWorkspace: string;
12
+ moveDescription: string;
9
13
  exportColumns: string;
10
14
  columnsVisible: string;
11
15
  columnsAll: string;
12
16
  columnsFiles: string;
13
17
  columnsHelp: string;
14
- exportToWorkspace: string;
15
- exportToWorkspaceDescription: string;
16
18
  selectTargetWorkspace: string;
17
19
  noOtherWorkspaces: string;
18
20
  member: string;
@@ -29,7 +31,7 @@ export interface ExportModalTitleProps {
29
31
  icon: ReactNode;
30
32
  name: string;
31
33
  };
32
- /** Icon and plural noun of what is exported. */
34
+ /** Icon and plural noun of what is exported (the selection count badge hides at 0). */
33
35
  entityIcon: ReactNode;
34
36
  entityPlural: string;
35
37
  selectedCount: number;
@@ -37,19 +39,23 @@ export interface ExportModalTitleProps {
37
39
  }
38
40
  /** `Workspace / Chats / Export [3 selected]` for the Export dialog title. */
39
41
  export declare function ExportModalTitle({ workspace, entityIcon, entityPlural, selectedCount, labels, }: ExportModalTitleProps): import("react").JSX.Element;
40
- export type ExportMode = 'workspace' | 'download';
42
+ export type ExportMode = 'download' | 'copy' | 'move';
41
43
  export type ExportColumnsMode = 'visible' | 'all' | 'files';
42
44
  export interface ExportMethodChooserProps {
43
45
  mode: ExportMode;
44
46
  onModeChange: (mode: ExportMode) => void;
45
47
  columnsMode: ExportColumnsMode;
46
48
  onColumnsModeChange: (mode: ExportColumnsMode) => void;
49
+ /** Offer the index.csv columns picker under "Download" (when documents are involved). */
50
+ showColumns?: boolean;
51
+ /** Why "Move" is unavailable (e.g. a guest cannot remove anything here); disables it. */
52
+ moveDisabledReason?: string;
47
53
  labels?: Partial<ExportLabels>;
48
54
  /** Overrides the columns select test id (default `export-columns-selector`). */
49
55
  columnsTestId?: string;
50
56
  }
51
- /** "Download to computer" vs "Export to another workspace", with the CSV columns picker. */
52
- export declare function ExportMethodChooser({ mode, onModeChange, columnsMode, onColumnsModeChange, labels, columnsTestId, }: ExportMethodChooserProps): import("react").JSX.Element;
57
+ /** Download as files, copy to another workspace, or move there — with the CSV columns picker. */
58
+ export declare function ExportMethodChooser({ mode, onModeChange, columnsMode, onColumnsModeChange, showColumns, moveDisabledReason, labels, columnsTestId, }: ExportMethodChooserProps): import("react").JSX.Element;
53
59
  export interface ExportWorkspaceOption {
54
60
  id: string;
55
61
  name: string;
@@ -0,0 +1,97 @@
1
+ /**
2
+ * The "what" half of the Export / copy / move dialog: scope, entity types,
3
+ * cited documents, conflicts; plus the plan summary, the job's progress and the
4
+ * resume banner. The "where" half (destination, target workspace, results) is
5
+ * in `ExportParts`. Presentational only — the host resolves scope into counts.
6
+ */
7
+ export interface TransferLabels {
8
+ what: string;
9
+ scopeSelection: (count: number) => string;
10
+ scopeLabel: string;
11
+ scopeAll: string;
12
+ chooseLabel: string;
13
+ include: string;
14
+ references: string;
15
+ referencesInclude: string;
16
+ referencesLink: string;
17
+ referencesHelp: string;
18
+ conflicts: string;
19
+ conflictSkip: string;
20
+ conflictKeepBoth: string;
21
+ summary: string;
22
+ summaryLoading: string;
23
+ hide: string;
24
+ cancelJob: string;
25
+ resume: string;
26
+ }
27
+ export declare const DEFAULT_TRANSFER_LABELS: TransferLabels;
28
+ export type TransferScopeChoice = 'selection' | 'label' | 'all';
29
+ export interface TransferLabelOption {
30
+ id: string;
31
+ name: string;
32
+ }
33
+ export interface TransferScopeChooserProps {
34
+ scope: TransferScopeChoice;
35
+ onScopeChange: (scope: TransferScopeChoice) => void;
36
+ /** How many items the dialog was opened with; 0 hides "selected". */
37
+ selectedCount: number;
38
+ labelOptions: TransferLabelOption[];
39
+ labelId: string | null;
40
+ onLabelChange: (id: string) => void;
41
+ labels?: Partial<TransferLabels>;
42
+ }
43
+ /** Selected items, everything with one label, or everything. */
44
+ export declare function TransferScopeChooser({ scope, onScopeChange, selectedCount, labelOptions, labelId, onLabelChange, labels, }: TransferScopeChooserProps): import("react").JSX.Element;
45
+ export interface TransferKindOption {
46
+ kind: string;
47
+ label: string;
48
+ /** What the current scope holds of this kind; undefined while counting. */
49
+ count?: number;
50
+ }
51
+ export interface TransferKindsPickerProps {
52
+ options: TransferKindOption[];
53
+ selected: string[];
54
+ onToggle: (kind: string, checked: boolean) => void;
55
+ labels?: Partial<TransferLabels>;
56
+ }
57
+ /** One checkbox per entity type, each with what the scope holds of it. */
58
+ export declare function TransferKindsPicker({ options, selected, onToggle, labels, }: TransferKindsPickerProps): import("react").JSX.Element;
59
+ export type TransferReferencesChoice = 'include' | 'link';
60
+ export declare function TransferReferencesChooser({ value, onChange, labels, }: {
61
+ value: TransferReferencesChoice;
62
+ onChange: (value: TransferReferencesChoice) => void;
63
+ labels?: Partial<TransferLabels>;
64
+ }): import("react").JSX.Element;
65
+ export type TransferConflictChoice = 'skip' | 'keep_both';
66
+ export declare function TransferConflictChooser({ value, onChange, labels, }: {
67
+ value: TransferConflictChoice;
68
+ onChange: (value: TransferConflictChoice) => void;
69
+ labels?: Partial<TransferLabels>;
70
+ }): import("react").JSX.Element;
71
+ export interface TransferPlanSummaryProps {
72
+ /** e.g. "12 documents (5 older versions and 3 attachments come with them)". */
73
+ lines: string[];
74
+ /** What will NOT be kept as-is: dropped links, dangling citations, items that stay. */
75
+ warnings: string[];
76
+ isLoading?: boolean;
77
+ labels?: Partial<TransferLabels>;
78
+ }
79
+ export declare function TransferPlanSummary({ lines, warnings, isLoading, labels, }: TransferPlanSummaryProps): import("react").JSX.Element;
80
+ export interface TransferProgressViewProps {
81
+ title: string;
82
+ processed: number;
83
+ total: number;
84
+ /** "Copying", "Linking", "Removing from this workspace" … */
85
+ phaseLabel: string;
86
+ onHide?: () => void;
87
+ onCancel?: () => void;
88
+ isCancelling?: boolean;
89
+ labels?: Partial<TransferLabels>;
90
+ }
91
+ export declare function TransferProgressView({ title, processed, total, phaseLabel, onHide, onCancel, isCancelling, labels, }: TransferProgressViewProps): import("react").JSX.Element;
92
+ export declare function TransferResumeBanner({ message, onResume, isResuming, labels, }: {
93
+ message: string;
94
+ onResume: () => void;
95
+ isResuming?: boolean;
96
+ labels?: Partial<TransferLabels>;
97
+ }): import("react").JSX.Element;