@arbidocs/blocks 0.4.111 → 0.4.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/{NativeDocxEditor-AQKRZBIU.cjs → NativeDocxEditor-AQZSUGET.cjs} +8 -8
  2. package/dist/{NativeDocxEditor-AQKRZBIU.cjs.map → NativeDocxEditor-AQZSUGET.cjs.map} +1 -1
  3. package/dist/{NativeDocxEditor-IN2HEO5I.js → NativeDocxEditor-MBCBXYDZ.js} +4 -4
  4. package/dist/{NativeDocxEditor-IN2HEO5I.js.map → NativeDocxEditor-MBCBXYDZ.js.map} +1 -1
  5. package/dist/agents/index.cjs +208 -208
  6. package/dist/agents/index.js +3 -3
  7. package/dist/{chunk-2C7TCVQZ.js → chunk-3OT37I24.js} +30 -297
  8. package/dist/chunk-3OT37I24.js.map +1 -0
  9. package/dist/{chunk-XIGWUDOD.cjs → chunk-ETBB5KMN.cjs} +61 -316
  10. package/dist/chunk-ETBB5KMN.cjs.map +1 -0
  11. package/dist/{chunk-Q6B77ZWZ.js → chunk-GIBRZ54P.js} +3 -3
  12. package/dist/{chunk-Q6B77ZWZ.js.map → chunk-GIBRZ54P.js.map} +1 -1
  13. package/dist/{chunk-2WO5L7YT.cjs → chunk-HF4PAYBM.cjs} +5 -5
  14. package/dist/{chunk-2WO5L7YT.cjs.map → chunk-HF4PAYBM.cjs.map} +1 -1
  15. package/dist/chunk-I2QSDQQV.cjs +126 -0
  16. package/dist/chunk-I2QSDQQV.cjs.map +1 -0
  17. package/dist/chunk-QXMR5YHC.js +80 -0
  18. package/dist/chunk-QXMR5YHC.js.map +1 -0
  19. package/dist/{chunk-TF47ATYS.cjs → chunk-RUFNJRLW.cjs} +4 -4
  20. package/dist/{chunk-TF47ATYS.cjs.map → chunk-RUFNJRLW.cjs.map} +1 -1
  21. package/dist/{chunk-WTM65ZNG.js → chunk-TKJSCHSX.js} +3 -3
  22. package/dist/{chunk-WTM65ZNG.js.map → chunk-TKJSCHSX.js.map} +1 -1
  23. package/dist/{chunk-WPVIOGDG.cjs → chunk-US5ASM4G.cjs} +22 -22
  24. package/dist/{chunk-WPVIOGDG.cjs.map → chunk-US5ASM4G.cjs.map} +1 -1
  25. package/dist/{chunk-CECWAIHL.js → chunk-XFZ7HNPG.js} +3 -3
  26. package/dist/{chunk-CECWAIHL.js.map → chunk-XFZ7HNPG.js.map} +1 -1
  27. package/dist/{chunk-FXUQZFAN.cjs → chunk-Z2NSU7D5.cjs} +4 -4
  28. package/dist/{chunk-FXUQZFAN.cjs.map → chunk-Z2NSU7D5.cjs.map} +1 -1
  29. package/dist/{chunk-6Z7DLJU2.js → chunk-ZP4IFW2E.js} +4 -4
  30. package/dist/{chunk-6Z7DLJU2.js.map → chunk-ZP4IFW2E.js.map} +1 -1
  31. package/dist/collaboration/index.cjs +1 -1
  32. package/dist/collaboration/index.js +1 -1
  33. package/dist/connect/docx.cjs +7 -7
  34. package/dist/connect/docx.js +5 -5
  35. package/dist/connect/index.cjs +16 -16
  36. package/dist/connect/index.js +9 -9
  37. package/dist/docx/definitions/commands.d.ts +3 -52
  38. package/dist/docx/definitions/fragment.d.ts +5 -31
  39. package/dist/docx/definitions/port.d.ts +2 -22
  40. package/dist/docx/index.cjs +47 -47
  41. package/dist/docx/index.js +4 -4
  42. package/dist/docx/references/commands.d.ts +3 -89
  43. package/dist/docx/references/port.d.ts +2 -11
  44. package/dist/facts/index.cjs +1 -1
  45. package/dist/facts/index.js +1 -1
  46. package/dist/files/index.cjs +1 -1
  47. package/dist/files/index.js +1 -1
  48. package/dist/index.cjs +388 -388
  49. package/dist/index.js +10 -10
  50. package/dist/settings/index.cjs +1 -1
  51. package/dist/settings/index.js +1 -1
  52. package/dist/shell/index.cjs +9 -9
  53. package/dist/shell/index.js +1 -1
  54. package/dist/tags/definitions.d.ts +4 -25
  55. package/dist/tags/ooxml.d.ts +1 -19
  56. package/dist/workflow-canvas/index.cjs +10 -10
  57. package/dist/workflow-canvas/index.js +3 -3
  58. package/node_modules/@arbidocs/coedit/dist/commands.cjs +687 -0
  59. package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
  60. package/node_modules/@arbidocs/coedit/dist/commands.d.cts +263 -157
  61. package/node_modules/@arbidocs/coedit/dist/commands.d.ts +263 -157
  62. package/node_modules/@arbidocs/coedit/dist/commands.js +646 -2
  63. package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
  64. package/node_modules/@arbidocs/coedit/dist/port-ip7WByvH.d.cts +188 -0
  65. package/node_modules/@arbidocs/coedit/dist/port-ip7WByvH.d.ts +188 -0
  66. package/node_modules/@arbidocs/coedit/dist/server.cjs +675 -65
  67. package/node_modules/@arbidocs/coedit/dist/server.cjs.map +1 -1
  68. package/node_modules/@arbidocs/coedit/dist/server.d.cts +15 -4
  69. package/node_modules/@arbidocs/coedit/dist/server.d.ts +15 -4
  70. package/node_modules/@arbidocs/coedit/dist/server.js +676 -67
  71. package/node_modules/@arbidocs/coedit/dist/server.js.map +1 -1
  72. package/node_modules/@arbidocs/coedit/dist/template.d.cts +3 -17
  73. package/node_modules/@arbidocs/coedit/dist/template.d.ts +3 -17
  74. package/node_modules/@arbidocs/coedit/dist/track-eYC94jTp.d.cts +17 -0
  75. package/node_modules/@arbidocs/coedit/dist/track-eYC94jTp.d.ts +17 -0
  76. package/node_modules/@arbidocs/coedit/package.json +1 -1
  77. package/package.json +4 -4
  78. package/dist/chunk-2A4MDHJR.cjs +0 -198
  79. package/dist/chunk-2A4MDHJR.cjs.map +0 -1
  80. package/dist/chunk-2C7TCVQZ.js.map +0 -1
  81. package/dist/chunk-EPHGD4YV.js +0 -174
  82. package/dist/chunk-EPHGD4YV.js.map +0 -1
  83. package/dist/chunk-XIGWUDOD.cjs.map +0 -1
@@ -1,91 +1,5 @@
1
1
  /**
2
- * Insert cross-references, the way Word does.
3
- *
4
- * Within the document: a hidden `_Ref…` bookmark on the target paragraph and a `REF` field at the
5
- * caret — `REF _Ref123 \r \h` for a numbered paragraph (Word's Cross-reference › Numbered item ›
6
- * Paragraph number), `REF _Ref123 \h` for a heading's text. The field's cached result is the value
7
- * the editor computes, so it updates live when the clauses are renumbered, and Word updates it
8
- * with the document's other fields.
9
- *
10
- * To another document: a hyperlink with the reference text ("SPA, clause 8.2"), aimed at the app
11
- * address of that document's passage (so it works from Word too), with a screen tip saying so.
2
+ * Insert cross-references, the way Word does: shared with the collaboration service, see
3
+ * `@arbidocs/coedit/commands` (`references.ts`).
12
4
  */
13
- import { type DocPoint } from '../definitions/port';
14
- import { type BrokenReference, type CrossReferenceMode } from '@arbidocs/coedit/commands';
15
- import type { CrossReferenceTarget } from './numbering';
16
- import type { ReferencesPort } from './port';
17
- export { REF_BOOKMARK_PREFIX, brokenCrossReferences, staleCrossReferences, type BrokenReference, type CrossReferenceMode, type StaleReference, } from '@arbidocs/coedit/commands';
18
- /** A new `_Ref` bookmark name: Word's shape (`_Ref` and nine digits), not yet in the document. */
19
- export declare function newRefBookmark(taken: ReadonlySet<string>, random?: () => number): string;
20
- /**
21
- * A complex `REF` field with its cached result, every run in the Cross Reference style (Word gives
22
- * an updated result the formatting of the field's first run).
23
- */
24
- export declare function refFieldXml(instruction: string, cached: string): string;
25
- /** The screen tip of a reference to this document: "Cross-reference to clause 2.2". */
26
- export declare const refTooltip: (value: string, mode: CrossReferenceMode) => string;
27
- /**
28
- * A reference to this document: the `REF` field inside a link to the same bookmark, which carries
29
- * the screen tip Word shows on hover ("Cross-reference to clause 2.2").
30
- */
31
- export declare function crossReferenceXml(bookmark: string, mode: CrossReferenceMode, value: string): string;
32
- /** The field instruction for a target: its paragraph number, or its text. */
33
- export declare const refInstruction: (bookmark: string, mode: CrossReferenceMode) => string;
34
- /** What the reference reads in the text. */
35
- export declare const refResult: (target: CrossReferenceTarget, mode: CrossReferenceMode) => string;
36
- /**
37
- * The `_Ref` bookmark a target carries: an existing one at the paragraph, else a new one. For a
38
- * paragraph number it is an empty bookmark at the paragraph's start (the number is the
39
- * paragraph's); for heading text it wraps the heading's runs (REF shows the bookmarked text).
40
- */
41
- export declare function ensureTargetBookmark(port: ReferencesPort, target: CrossReferenceTarget, mode: CrossReferenceMode): string;
42
- /**
43
- * Mark a cross-reference's target (see {@link ensureTargetBookmark}): what the reference will
44
- * address and read. A paragraph number falls back to the heading text when it has none. Done as a
45
- * direct edit even while suggesting — the bookmark is hidden, and a heading's text is put back as
46
- * it was — so rejecting the reference leaves the target as it was.
47
- */
48
- export declare function markCrossReferenceTarget(port: ReferencesPort, target: CrossReferenceTarget, mode: CrossReferenceMode): {
49
- bookmark: string;
50
- mode: CrossReferenceMode;
51
- value: string;
52
- };
53
- /**
54
- * Insert the `REF` field of a marked target at `caret`; the caret ends after it. With a port
55
- * whose pastes are tracked, the reference is one suggestion.
56
- */
57
- export declare function insertCrossReferenceField(port: ReferencesPort, { bookmark, mode, value }: {
58
- bookmark: string;
59
- mode: CrossReferenceMode;
60
- value: string;
61
- }, caret: DocPoint): {
62
- bookmark: string;
63
- };
64
- /** Insert a cross-reference to a target of this document at `caret`; the caret ends after it. */
65
- export declare function insertCrossReference(port: ReferencesPort, target: CrossReferenceTarget, mode: CrossReferenceMode, caret: DocPoint): {
66
- bookmark: string;
67
- };
68
- /** The screen tip of a reference to another document: "Cross-reference: SPA, clause 8.2 — opens in ARBI". */
69
- export declare const documentReferenceTooltip: (text: string, appName?: string) => string;
70
- /**
71
- * Insert a reference to another document's passage: the reference text in the Cross Reference
72
- * style, linked to the passage's (absolute) app address, at `caret`.
73
- */
74
- export declare function insertDocumentReference(port: ReferencesPort, reference: {
75
- text: string;
76
- url: string;
77
- appName?: string;
78
- }, caret: DocPoint): void;
79
- export interface RefreshResult {
80
- /** References rewritten with their current number or text. */
81
- refreshed: number;
82
- /** References whose target is gone, now (or already) marked broken. */
83
- broken: BrokenReference[];
84
- }
85
- /**
86
- * Bring every cross-reference up to date: a stale one is replaced by the same reference with its
87
- * current value (and screen tip); one whose target was deleted becomes its last text in the Cross
88
- * Reference Broken style — never Word's "Error! Reference source not found." A field directly
89
- * after another field is left alone: a paste there would land inside the previous field.
90
- */
91
- export declare function refreshCrossReferences(port: ReferencesPort): RefreshResult;
5
+ export { REF_BOOKMARK_PREFIX, brokenCrossReferences, crossReferenceXml, documentReferenceTooltip, ensureTargetBookmark, insertCrossReference, insertCrossReferenceField, insertDocumentReference, markCrossReferenceTarget, newRefBookmark, refFieldXml, refInstruction, refResult, refTooltip, refreshCrossReferences, staleCrossReferences, type BrokenReference, type CrossReferenceMode, type RefreshResult, type StaleReference, } from '@arbidocs/coedit/commands';
@@ -5,16 +5,7 @@
5
5
  */
6
6
  import type { DocxEditorInstance } from '@docx-editor.dev/core';
7
7
  import type { Revision } from '@arbidocs/coedit/template';
8
- import { type DefinitionsPort, type OoxmlNodeLike } from '../definitions/port';
9
- import type { LevelOf, ListItemInfo } from './numbering';
10
- export interface ReferencesPort extends DefinitionsPort {
11
- /** Each numbered paragraph's list item, by paragraph id. */
12
- listItems(): ReadonlyMap<string, ListItemInfo>;
13
- levelOf: LevelOf;
14
- /** The paragraph's runs as WordprocessingML, or null when it holds more than plain runs. */
15
- runsXml(paragraphId: string): string | null;
16
- }
17
- /** A paragraph's runs as XML (formatting kept), or null for anything but plain runs. */
18
- export declare function paragraphRunsXml(paragraph: OoxmlNodeLike): string | null;
8
+ import { type ReferencesPort } from '@arbidocs/coedit/commands';
9
+ export { paragraphRunsXml, type ReferencesPort } from '@arbidocs/coedit/commands';
19
10
  /** The port over a live editor; with a `revision`, what it pastes is a tracked insertion by it. */
20
11
  export declare function referencesPort(editor: DocxEditorInstance, revision?: Revision | null): ReferencesPort;
@@ -9,8 +9,8 @@ var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
9
9
  var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
10
10
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
11
11
  var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
12
- var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
13
12
  require('../chunk-FX3K6LNZ.cjs');
13
+ var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
14
14
  var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
15
15
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
16
16
  require('../chunk-C54XEN5T.cjs');
@@ -9,8 +9,8 @@ import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
9
9
  import { FilterInput } from '../chunk-YU2KUMGE.js';
10
10
  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';
11
11
  import { GridView } from '../chunk-N5YEF3LC.js';
12
- import { TabHeader } from '../chunk-4WWM3GQ5.js';
13
12
  import '../chunk-SLSBJRWW.js';
13
+ import { TabHeader } from '../chunk-4WWM3GQ5.js';
14
14
  import { observeResize } from '../chunk-NPLYHR2E.js';
15
15
  import { testIdOr } from '../chunk-7F6CBP3Z.js';
16
16
  import '../chunk-76JDDMSP.js';
@@ -14,8 +14,8 @@ var chunk32HW2Q33_cjs = require('../chunk-32HW2Q33.cjs');
14
14
  var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
15
15
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
16
16
  var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
17
- var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
18
17
  require('../chunk-FX3K6LNZ.cjs');
18
+ var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
19
19
  require('../chunk-PPCATBOY.cjs');
20
20
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
21
21
  require('../chunk-C54XEN5T.cjs');
@@ -15,8 +15,8 @@ export { DEFAULT_SELECTION_BAR_LABELS, SelectionBar, SelectionBarAction } from '
15
15
  import { FilterInput } from '../chunk-YU2KUMGE.js';
16
16
  import { GridView } from '../chunk-N5YEF3LC.js';
17
17
  export { GridView } from '../chunk-N5YEF3LC.js';
18
- import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-TX2ZICS7.js';
19
18
  import '../chunk-SLSBJRWW.js';
19
+ import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-TX2ZICS7.js';
20
20
  import '../chunk-NPLYHR2E.js';
21
21
  import { testIdOr, prefixedTestId } from '../chunk-7F6CBP3Z.js';
22
22
  import '../chunk-76JDDMSP.js';