@arbidocs/blocks 0.4.84 → 0.4.85

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 (114) hide show
  1. package/dist/MailBodyEditor-5PIQLYVY.js +217 -0
  2. package/dist/MailBodyEditor-5PIQLYVY.js.map +1 -0
  3. package/dist/MailBodyEditor-D7MGJMLH.cjs +223 -0
  4. package/dist/MailBodyEditor-D7MGJMLH.cjs.map +1 -0
  5. package/dist/agents/index.cjs +281 -280
  6. package/dist/agents/index.js +6 -5
  7. package/dist/agents/workflows/StepBarFrame.d.ts +3 -1
  8. package/dist/agents/workflows/WorkflowRunner.d.ts +10 -1
  9. package/dist/agents/workflows/run.d.ts +24 -3
  10. package/dist/agents/workflows/stepWindow.d.ts +4 -2
  11. package/dist/agents/workflows/types.d.ts +5 -0
  12. package/dist/agents/workflows/useWorkflowView.d.ts +16 -1
  13. package/dist/chat/index.cjs +1 -1
  14. package/dist/chat/index.js +1 -1
  15. package/dist/chunk-3R6XBYL7.cjs +576 -0
  16. package/dist/chunk-3R6XBYL7.cjs.map +1 -0
  17. package/dist/{chunk-CKB64Z4R.js → chunk-4XJZ6AAY.js} +6 -245
  18. package/dist/chunk-4XJZ6AAY.js.map +1 -0
  19. package/dist/{chunk-SB5ZKOYN.js → chunk-7C35WXYB.js} +4 -63
  20. package/dist/chunk-7C35WXYB.js.map +1 -0
  21. package/dist/chunk-7RJTEWYM.js +362 -0
  22. package/dist/chunk-7RJTEWYM.js.map +1 -0
  23. package/dist/chunk-AFSOUS5X.cjs +253 -0
  24. package/dist/chunk-AFSOUS5X.cjs.map +1 -0
  25. package/dist/{chunk-F4RUCUXF.cjs → chunk-C2HRZSAT.cjs} +2 -63
  26. package/dist/chunk-C2HRZSAT.cjs.map +1 -0
  27. package/dist/{chunk-RX35SMPR.js → chunk-FHOZMT5P.js} +7 -6
  28. package/dist/chunk-FHOZMT5P.js.map +1 -0
  29. package/dist/{chunk-CONIA2ZA.js → chunk-KHY4PYU7.js} +246 -146
  30. package/dist/chunk-KHY4PYU7.js.map +1 -0
  31. package/dist/chunk-LGX6UFYG.js +557 -0
  32. package/dist/chunk-LGX6UFYG.js.map +1 -0
  33. package/dist/chunk-O4YPVYPO.cjs +373 -0
  34. package/dist/chunk-O4YPVYPO.cjs.map +1 -0
  35. package/dist/chunk-R26OHONI.js +250 -0
  36. package/dist/chunk-R26OHONI.js.map +1 -0
  37. package/dist/{chunk-RYYYHPFU.cjs → chunk-RZUMQM7W.cjs} +246 -146
  38. package/dist/chunk-RZUMQM7W.cjs.map +1 -0
  39. package/dist/{chunk-YJQVLVBJ.cjs → chunk-S5HZBXZA.cjs} +2 -243
  40. package/dist/chunk-S5HZBXZA.cjs.map +1 -0
  41. package/dist/{chunk-ZQYE7J3J.cjs → chunk-WRSBM6QN.cjs} +332 -94
  42. package/dist/chunk-WRSBM6QN.cjs.map +1 -0
  43. package/dist/{chunk-RSKSXEPW.js → chunk-X23U6QEJ.js} +324 -88
  44. package/dist/chunk-X23U6QEJ.js.map +1 -0
  45. package/dist/{chunk-XA5S4776.cjs → chunk-Z7YUCYI6.cjs} +51 -50
  46. package/dist/chunk-Z7YUCYI6.cjs.map +1 -0
  47. package/dist/collaboration/index.cjs +100 -49
  48. package/dist/collaboration/index.js +4 -1
  49. package/dist/collaboration/mail/MailBodyEditor.d.ts +7 -0
  50. package/dist/collaboration/mail/MailDeliveryList.d.ts +8 -0
  51. package/dist/collaboration/mail/MailDocumentPicker.d.ts +15 -0
  52. package/dist/collaboration/mail/MailGrid.d.ts +17 -0
  53. package/dist/collaboration/mail/MailMessageView.d.ts +27 -0
  54. package/dist/collaboration/mail/PlainMailBodyEditor.d.ts +12 -0
  55. package/dist/collaboration/mail/index.d.ts +6 -0
  56. package/dist/collaboration/mail/mailCompose.d.ts +24 -0
  57. package/dist/connect/index.cjs +1647 -65
  58. package/dist/connect/index.cjs.map +1 -1
  59. package/dist/connect/index.d.ts +2 -1
  60. package/dist/connect/index.js +1631 -55
  61. package/dist/connect/index.js.map +1 -1
  62. package/dist/connection/ConnectedTagTable.d.ts +32 -0
  63. package/dist/connection/mail/ConnectedMailAccounts.d.ts +21 -0
  64. package/dist/connection/mail/ConnectedMailComposer.d.ts +40 -0
  65. package/dist/connection/mail/ConnectedMailSetup.d.ts +16 -0
  66. package/dist/connection/mail/ConnectedMailbox.d.ts +65 -0
  67. package/dist/connection/mail/MailComposerForm.d.ts +25 -0
  68. package/dist/connection/mail/attachments.d.ts +13 -0
  69. package/dist/connection/mail/index.d.ts +6 -0
  70. package/dist/connection/mail/mailbox.d.ts +6 -0
  71. package/dist/connection/mail/types.d.ts +92 -0
  72. package/dist/connection/useConnectedWorkNotifications.d.ts +6 -0
  73. package/dist/connection/useWorkflowThread.d.ts +7 -2
  74. package/dist/facts/index.cjs +2 -2
  75. package/dist/facts/index.js +2 -2
  76. package/dist/files/index.cjs +47 -367
  77. package/dist/files/index.cjs.map +1 -1
  78. package/dist/files/index.js +10 -360
  79. package/dist/files/index.js.map +1 -1
  80. package/dist/index.cjs +450 -391
  81. package/dist/index.cjs.map +1 -1
  82. package/dist/index.js +21 -18
  83. package/dist/index.js.map +1 -1
  84. package/dist/settings/index.cjs +10 -9
  85. package/dist/settings/index.cjs.map +1 -1
  86. package/dist/settings/index.js +2 -1
  87. package/dist/settings/index.js.map +1 -1
  88. package/dist/shell/index.cjs +1 -1
  89. package/dist/shell/index.js +1 -1
  90. package/dist/tags/TagColumnsEditor.d.ts +34 -0
  91. package/dist/tags/TagDetail.d.ts +13 -11
  92. package/dist/tags/TagTable.d.ts +99 -0
  93. package/dist/tags/TagsNav.d.ts +2 -2
  94. package/dist/tags/index.d.ts +7 -5
  95. package/dist/tags/{tagMatrixDocx.d.ts → tagTableDocx.d.ts} +12 -12
  96. package/dist/tags/tagTableModel.d.ts +47 -0
  97. package/dist/workflow-canvas/index.cjs +49 -48
  98. package/dist/workflow-canvas/index.cjs.map +1 -1
  99. package/dist/workflow-canvas/index.js +6 -5
  100. package/dist/workflow-canvas/index.js.map +1 -1
  101. package/package.json +29 -4
  102. package/dist/chunk-CKB64Z4R.js.map +0 -1
  103. package/dist/chunk-CONIA2ZA.js.map +0 -1
  104. package/dist/chunk-F4RUCUXF.cjs.map +0 -1
  105. package/dist/chunk-RSKSXEPW.js.map +0 -1
  106. package/dist/chunk-RX35SMPR.js.map +0 -1
  107. package/dist/chunk-RYYYHPFU.cjs.map +0 -1
  108. package/dist/chunk-SB5ZKOYN.js.map +0 -1
  109. package/dist/chunk-XA5S4776.cjs.map +0 -1
  110. package/dist/chunk-YJQVLVBJ.cjs.map +0 -1
  111. package/dist/chunk-ZQYE7J3J.cjs.map +0 -1
  112. package/dist/connection/ConnectedTagMatrix.d.ts +0 -23
  113. package/dist/tags/TagMatrix.d.ts +0 -87
  114. package/dist/tags/tagMatrixModel.d.ts +0 -43
@@ -7,9 +7,9 @@ var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
7
7
  require('../chunk-OB5F4577.cjs');
8
8
  var chunkXKSFJYOD_cjs = require('../chunk-XKSFJYOD.cjs');
9
9
  var chunkVGOFFCMT_cjs = require('../chunk-VGOFFCMT.cjs');
10
- var chunkFX3K6LNZ_cjs = require('../chunk-FX3K6LNZ.cjs');
11
10
  require('../chunk-PPCATBOY.cjs');
12
11
  require('../chunk-C54XEN5T.cjs');
12
+ var chunkFX3K6LNZ_cjs = require('../chunk-FX3K6LNZ.cjs');
13
13
  require('../chunk-MHVNT4J3.cjs');
14
14
  require('../chunk-DES3K4SD.cjs');
15
15
 
@@ -5,9 +5,9 @@ export { DEFAULT_FILTER_FIELDS, DEFAULT_FILTER_INPUT_LABELS, FilterInput } from
5
5
  import '../chunk-S7PSMMRG.js';
6
6
  export { DEFAULT_DOCK_WIDTH, Toaster } from '../chunk-BV7FEMSI.js';
7
7
  export { DEFAULT_OVERLAY_ZONE_ID, DEFAULT_PAGE_CONTAINER_PADDING, DEFAULT_SIDEBAR_TOGGLE_BUTTON_LABELS, PageContainer, SHELL_BOTTOM_INSET_VAR, Shell, SidebarToggleButton, ToolButton, useDrawerBehavior, useOverlayZoneId, useShellBottomInset } from '../chunk-KZJAG7T3.js';
8
- export { BREAKPOINT_QUERIES, useIsNarrow, useIsPhone, useIsTouchScreen, useMediaQuery } from '../chunk-SLSBJRWW.js';
9
8
  import '../chunk-NPLYHR2E.js';
10
9
  import '../chunk-76JDDMSP.js';
10
+ export { BREAKPOINT_QUERIES, useIsNarrow, useIsPhone, useIsTouchScreen, useMediaQuery } from '../chunk-SLSBJRWW.js';
11
11
  import '../chunk-7F6CBP3Z.js';
12
12
  import '../chunk-VUNV25KB.js';
13
13
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The columns of a table of tags — the fields of their kind in the workspace (its issue fields …) —
3
+ * edited as one list: rename, reorder by position, add, remove, and a choice field's options. A kept
4
+ * column keeps its id, so its values stay (its type is fixed once created). Saved in full through
5
+ * the host (`onSave`); data-free.
6
+ */
7
+ import type { TagTableField, TagTableFieldType, TagTableFieldWrite } from './tagTableModel';
8
+ export interface TagColumnsEditorLabels {
9
+ title: string;
10
+ addColumn: string;
11
+ name: string;
12
+ type: string;
13
+ options: string;
14
+ optionsPlaceholder: string;
15
+ remove: string;
16
+ moveUp: string;
17
+ moveDown: string;
18
+ save: string;
19
+ saving: string;
20
+ cancel: string;
21
+ empty: string;
22
+ types: Record<TagTableFieldType, string>;
23
+ }
24
+ export declare const DEFAULT_TAG_COLUMNS_EDITOR_LABELS: TagColumnsEditorLabels;
25
+ export interface TagColumnsEditorProps {
26
+ columns: TagTableField[];
27
+ /** Save the columns in full; a rejection (e.g. two columns of one name) stays on screen. */
28
+ onSave: (fields: TagTableFieldWrite[]) => void | Promise<unknown>;
29
+ onCancel: () => void;
30
+ labels?: Partial<TagColumnsEditorLabels>;
31
+ className?: string;
32
+ testId?: string;
33
+ }
34
+ export declare function TagColumnsEditor({ columns, onSave, onCancel, labels, className, testId, }: TagColumnsEditorProps): import("react").JSX.Element;
@@ -1,11 +1,11 @@
1
1
  /**
2
- * One tag in full: its own fields (aliases, role, status, …) editable in place, then everything
3
- * across the workspace that carries it — the documents (with the value or note the tag has on
4
- * each, and how many passages back it), the facts and the threads. The data is one row of the tag matrix
5
- * (`TagMatrixRowData`); every write goes back through the host.
2
+ * One tag in full: its values for its kind's fields (position, role, status, …) editable in place,
3
+ * then everything across the workspace that carries it — the documents (with the value or note the
4
+ * tag has on each, and how many passages back it), the facts and the threads. The data is the tag
5
+ * read with its links (`TagTableRow`) and its kind's fields; every write goes back through the host.
6
6
  */
7
- import { type TagMatrixLabels, type TagMatrixProps } from './TagMatrix';
8
- import type { TagMatrixRowData } from './tagMatrixModel';
7
+ import { type TagTableLabels, type TagTableProps } from './TagTable';
8
+ import { type TagTableField, type TagTableRow } from './tagTableModel';
9
9
  export interface TagDetailLabels {
10
10
  fields: string;
11
11
  documents: string;
@@ -25,14 +25,16 @@ export interface TagDetailLabels {
25
25
  loading: string;
26
26
  }
27
27
  export declare const DEFAULT_TAG_DETAIL_LABELS: TagDetailLabels;
28
- export interface TagDetailProps extends Pick<TagMatrixProps, 'onChangeValue' | 'onOpenDocument' | 'onOpenFact' | 'onOpenThread' | 'people'> {
29
- /** The tag's matrix row (its fields, values, documents and facts). */
30
- row: TagMatrixRowData | undefined;
28
+ export interface TagDetailProps extends Pick<TagTableProps, 'onChangeValue' | 'onOpenDocument' | 'onOpenFact' | 'onOpenThread' | 'people'> {
29
+ /** The tag with its values and links (documents, facts, threads). */
30
+ row: TagTableRow | undefined;
31
+ /** Its kind's fields in the workspace (none: no Fields section). */
32
+ fields?: TagTableField[];
31
33
  isLoading?: boolean;
32
34
  labels?: Partial<TagDetailLabels>;
33
35
  /** Labels of the field inputs (the empty choice). */
34
- fieldLabels?: Partial<TagMatrixLabels>;
36
+ fieldLabels?: Partial<TagTableLabels>;
35
37
  className?: string;
36
38
  testId?: string;
37
39
  }
38
- export declare function TagDetail({ row, isLoading, people, onChangeValue, onOpenDocument, onOpenFact, onOpenThread, labels, fieldLabels, className, testId, }: TagDetailProps): import("react").JSX.Element;
40
+ export declare function TagDetail({ row, fields, isLoading, people, onChangeValue, onOpenDocument, onOpenFact, onOpenThread, labels, fieldLabels, className, testId, }: TagDetailProps): import("react").JSX.Element;
@@ -0,0 +1,99 @@
1
+ /**
2
+ * A table of tags (every issue, every person, a label's children): one row per tag, a column per
3
+ * field of their kind in the workspace, editable in place by type (text, number, date, checkbox,
4
+ * choice, person), and the evidence behind each row (its linked documents, facts and threads, with
5
+ * counts). Rows with no evidence are marked as gaps. Rows and columns can be added (the columns are
6
+ * the kind's fields, edited as one list), and the table exported as a Word document snapshot (filed
7
+ * in the workspace) or downloaded.
8
+ * The data and every write come from the host (`ConnectedTagTable` binds them to ARBI).
9
+ */
10
+ import { type ReactNode } from 'react';
11
+ import { type TagTableData, type TagTableField, type TagTableFieldWrite, type TagTableRow } from './tagTableModel';
12
+ import { type TagColumnsEditorLabels } from './TagColumnsEditor';
13
+ export interface TagTableLabels {
14
+ row: string;
15
+ evidence: string;
16
+ /** `{count}` documents linked. */
17
+ documents: string;
18
+ /** `{count}` facts linked. */
19
+ facts: string;
20
+ /** `{count}` threads linked. */
21
+ threads: string;
22
+ /** One document, one fact, one thread. */
23
+ document: string;
24
+ fact: string;
25
+ thread: string;
26
+ /** A thread without a title. */
27
+ untitledThread: string;
28
+ /** `{count}` more links than shown. */
29
+ more: string;
30
+ gap: string;
31
+ gapsOnly: string;
32
+ /** `{count}` rows without evidence. */
33
+ gapCount: string;
34
+ addRow: string;
35
+ addRowPlaceholder: string;
36
+ add: string;
37
+ export: string;
38
+ exporting: string;
39
+ download: string;
40
+ empty: string;
41
+ loading: string;
42
+ noColumns: string;
43
+ choose: string;
44
+ yes: string;
45
+ /** Opens the column editor. */
46
+ editColumns: string;
47
+ /** The column editor's own labels. */
48
+ columns?: Partial<TagColumnsEditorLabels>;
49
+ }
50
+ export declare const DEFAULT_TAG_TABLE_LABELS: TagTableLabels;
51
+ export interface TagTableProps {
52
+ /** The kind's fields (the columns) and its tags (the rows, with their links). */
53
+ table: TagTableData | undefined;
54
+ isLoading?: boolean;
55
+ /** Change one cell (`null` clears it). Absent: read only. */
56
+ onChangeValue?: (tagId: string, fieldId: string, value: unknown) => void | Promise<unknown>;
57
+ /** Add a row (a new tag of the kind). Absent: no "Add row". */
58
+ onAddRow?: (name: string) => void | Promise<unknown>;
59
+ /**
60
+ * Set the columns (the kind's fields) in full: a kept column has its `id`. Absent: the columns
61
+ * are fixed.
62
+ */
63
+ onChangeColumns?: (fields: TagTableFieldWrite[]) => void | Promise<unknown>;
64
+ /** Open a linked document. */
65
+ onOpenDocument?: (documentId: string) => void;
66
+ /** Open a linked fact. */
67
+ onOpenFact?: (factId: string) => void;
68
+ /** Open a linked thread (conversation). */
69
+ onOpenThread?: (conversationId: string) => void;
70
+ /** Open a row's tag (all its evidence). */
71
+ onOpenRow?: (tagId: string) => void;
72
+ /** Export the table as it stands (filed as a document). Absent: no export button. */
73
+ onExport?: () => void | Promise<unknown>;
74
+ /** Download the table as it stands as a file. Absent: no download button. */
75
+ onDownload?: () => void | Promise<unknown>;
76
+ /** Who a person column offers. */
77
+ people?: ReadonlyArray<{
78
+ value: string;
79
+ label: string;
80
+ }>;
81
+ /** Extra controls in the toolbar. */
82
+ actions?: ReactNode;
83
+ labels?: Partial<TagTableLabels>;
84
+ className?: string;
85
+ testId?: string;
86
+ }
87
+ /**
88
+ * One editable field value of a tag, by its type: committed on blur or Enter (a checkbox and a
89
+ * choice at once). A table cell, and a field of a single tag's form (`TagDetail`).
90
+ */
91
+ export declare function TagTableCell({ row, column, people, onChange, l, testId, }: {
92
+ row: TagTableRow;
93
+ column: TagTableField;
94
+ people?: TagTableProps['people'];
95
+ onChange?: TagTableProps['onChangeValue'];
96
+ l: TagTableLabels;
97
+ testId: string;
98
+ }): import("react").JSX.Element;
99
+ export declare function TagTable({ table, isLoading, onChangeValue, onAddRow, onChangeColumns, onOpenDocument, onOpenFact, onOpenThread, onOpenRow, onExport, onDownload, people, actions, labels, className, testId, }: TagTableProps): import("react").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The side navigation of a Tags page: the workspace's tags grouped by kind (labels, annotations,
3
3
  * issues, people, organisations, searches), each group with its count, each tag with how much
4
- * carries it, and nested tags (an issue list's issues) under their parent. A group heading selects
4
+ * carries it, and nested tags (a label's sub-labels) under their parent. A group heading selects
5
5
  * the whole kind; a tag selects that tag. Data-free: the host passes the groups.
6
6
  */
7
7
  import { type ReactNode } from 'react';
@@ -12,7 +12,7 @@ export interface TagsNavItem {
12
12
  count?: number;
13
13
  /** A swatch colour (any CSS colour). */
14
14
  color?: string;
15
- /** Nested tags (e.g. an issue list's issues). */
15
+ /** Nested tags (e.g. a label's sub-labels). */
16
16
  children?: TagsNavItem[];
17
17
  }
18
18
  export interface TagsNavGroup {
@@ -1,9 +1,11 @@
1
1
  /**
2
- * Tags: a set of tags as an editable matrix with their evidence (`TagMatrix`), one tag in full
3
- * (`TagDetail`), and the kind-grouped navigation of a Tags page (`TagsNav`).
2
+ * Tags: a table of tags with their kind's fields as columns and their evidence (`TagTable`, its
3
+ * columns edited with `TagColumnsEditor`), one tag in full (`TagDetail`), and the kind-grouped
4
+ * navigation of a Tags page (`TagsNav`).
4
5
  */
5
- export { TagMatrix, TagMatrixCell, DEFAULT_TAG_MATRIX_LABELS, type TagMatrixProps, type TagMatrixLabels, } from './TagMatrix';
6
+ export { TagTable, TagTableCell, DEFAULT_TAG_TABLE_LABELS, type TagTableProps, type TagTableLabels, } from './TagTable';
7
+ export { TagColumnsEditor, DEFAULT_TAG_COLUMNS_EDITOR_LABELS, type TagColumnsEditorProps, type TagColumnsEditorLabels, } from './TagColumnsEditor';
6
8
  export { TagDetail, DEFAULT_TAG_DETAIL_LABELS, type TagDetailProps, type TagDetailLabels, } from './TagDetail';
7
9
  export { TagsNav, DEFAULT_TAGS_NAV_LABELS, type TagsNavProps, type TagsNavLabels, type TagsNavGroup, type TagsNavItem, type TagsNavSelection, } from './TagsNav';
8
- export { tagMatrixColumns, tagMatrixMarkdown, cellValue, rowFieldId, cellText, parseCell, isGap, type TagMatrixData, type TagMatrixRowData, type TagMatrixField, type TagMatrixFieldType, type TagMatrixMarkdownOptions, } from './tagMatrixModel';
9
- export { tagMatrixDocx, tagMatrixDocumentXml, DEFAULT_TAG_MATRIX_DOCX_LABELS, TAG_MATRIX_DOCX_LANDSCAPE_AFTER, type TagMatrixDocxLabels, type TagMatrixDocxOptions, } from './tagMatrixDocx';
10
+ export { tagTableMarkdown, cellValue, cellText, parseCell, isGap, rowLinks, fieldWrites, type TagTableData, type TagTableRow, type TagTableLinks, type TagTableField, type TagTableFieldType, type TagTableFieldWrite, type TagTableMarkdownOptions, } from './tagTableModel';
11
+ export { tagTableDocx, tagTableDocumentXml, DEFAULT_TAG_TABLE_DOCX_LABELS, TAG_TABLE_DOCX_LANDSCAPE_AFTER, type TagTableDocxLabels, type TagTableDocxOptions, } from './tagTableDocx';
@@ -1,15 +1,15 @@
1
1
  /**
2
- * The tag matrix as a Word document: a title, when the snapshot was taken, then one table with a
3
- * row per item, a column per field, the evidence behind it (linked document names and fact
2
+ * A table of tags as a Word document: a title, when the snapshot was taken, then one table with a
3
+ * row per tag, a column per field of its kind, the evidence behind it (linked document names and fact
4
4
  * excerpts) and its gaps. Written straight as WordprocessingML and zipped with `fflate` (already a
5
5
  * dependency, and what `docx/export.ts` uses), so the result opens in the native Word editor and
6
6
  * in Word without pulling the editor engine into the tags module.
7
7
  */
8
- import { type TagMatrixData } from './tagMatrixModel';
8
+ import { type TagTableData } from './tagTableModel';
9
9
  export declare const DOCX_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
10
10
  /** More table columns than this (item, fields, evidence, gaps) turn the page to landscape. */
11
- export declare const TAG_MATRIX_DOCX_LANDSCAPE_AFTER = 6;
12
- export interface TagMatrixDocxLabels {
11
+ export declare const TAG_TABLE_DOCX_LANDSCAPE_AFTER = 6;
12
+ export interface TagTableDocxLabels {
13
13
  /** The row column's heading. */
14
14
  row: string;
15
15
  evidence: string;
@@ -31,15 +31,15 @@ export interface TagMatrixDocxLabels {
31
31
  untitledThread: string;
32
32
  empty: string;
33
33
  }
34
- export declare const DEFAULT_TAG_MATRIX_DOCX_LABELS: TagMatrixDocxLabels;
35
- export interface TagMatrixDocxOptions {
34
+ export declare const DEFAULT_TAG_TABLE_DOCX_LABELS: TagTableDocxLabels;
35
+ export interface TagTableDocxOptions {
36
36
  title: string;
37
37
  nameOf?: (id: string) => string | undefined;
38
38
  /** When the snapshot was taken (ISO); default now. */
39
39
  at?: string;
40
- labels?: Partial<TagMatrixDocxLabels>;
40
+ labels?: Partial<TagTableDocxLabels>;
41
41
  }
42
- /** `word/document.xml` for the matrix (exposed for tests and for hosts that assemble their own package). */
43
- export declare function tagMatrixDocumentXml(matrix: TagMatrixData, options: TagMatrixDocxOptions): string;
44
- /** The matrix as `.docx` bytes. */
45
- export declare function tagMatrixDocx(matrix: TagMatrixData, options: TagMatrixDocxOptions): Uint8Array;
42
+ /** `word/document.xml` for the table (exposed for tests and for hosts that assemble their own package). */
43
+ export declare function tagTableDocumentXml(table: TagTableData, options: TagTableDocxOptions): string;
44
+ /** The table as `.docx` bytes. */
45
+ export declare function tagTableDocx(table: TagTableData, options: TagTableDocxOptions): Uint8Array;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * A table of tags as data: the rows are tags (every issue, every person, a label's children) with
3
+ * their values and links, the columns their kind's fields in the workspace (its issue fields …),
4
+ * and each row's linked documents, facts and threads its evidence. Pure helpers for `TagTable`: a
5
+ * row's value, the gaps, and the snapshot as a Markdown document.
6
+ */
7
+ import type { components } from '@arbidocs/client';
8
+ /** A column: one of the kind's fields. */
9
+ export type TagTableField = components['schemas']['FieldDefinition'];
10
+ export type TagTableFieldType = TagTableField['type'];
11
+ /** A field as written back to the kind (`id` keeps it and its values). */
12
+ export type TagTableFieldWrite = components['schemas']['FieldDefinitionWrite'];
13
+ /** A row: a tag, with its links (`include=links` on the list). */
14
+ export type TagTableRow = components['schemas']['TagResponse'];
15
+ export type TagTableLinks = components['schemas']['TagLinks'];
16
+ /** What a table shows: the kind's fields as columns, and its tags as rows. */
17
+ export interface TagTableData {
18
+ columns: TagTableField[];
19
+ rows: TagTableRow[];
20
+ }
21
+ /** A row's links (none when the list was read without them). */
22
+ export declare const rowLinks: (row: TagTableRow) => TagTableLinks;
23
+ /** A row's value for a column (values are keyed by field id). */
24
+ export declare const cellValue: (row: TagTableRow, column: TagTableField) => unknown;
25
+ /** A row with nothing behind it: no linked document, fact or thread. */
26
+ export declare const isGap: (row: TagTableRow) => boolean;
27
+ /** A value as text (a person by name, a checkbox as yes or no, blank as empty). */
28
+ export declare function cellText(value: unknown, column: Pick<TagTableField, 'type'>, nameOf?: (id: string) => string | undefined): string;
29
+ /** A typed input's text back as the value to store (`null` clears it). */
30
+ export declare function parseCell(text: string, type: TagTableFieldType): unknown;
31
+ /** The kind's fields as definitions to write back, every one kept by id. */
32
+ export declare const fieldWrites: (columns: readonly TagTableField[]) => TagTableFieldWrite[];
33
+ export interface TagTableMarkdownOptions {
34
+ title: string;
35
+ /** The evidence column's heading. */
36
+ evidence?: string;
37
+ /** The row column's heading. */
38
+ rowHeading?: string;
39
+ nameOf?: (id: string) => string | undefined;
40
+ /** When the snapshot was taken (ISO); default now. */
41
+ at?: string;
42
+ }
43
+ /**
44
+ * The table as a Markdown document: a heading, when it was taken, and one table (a row per tag, a
45
+ * column per field, then the evidence counts). What a host files or has signed.
46
+ */
47
+ export declare function tagTableMarkdown(table: TagTableData, options: TagTableMarkdownOptions): string;