@stll/folio-core 0.73.0 → 0.74.0

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 (135) hide show
  1. package/dist/ai-edits/headless.js +2 -5
  2. package/dist/ai-edits/pendingJoin.js +6 -1
  3. package/dist/ai-edits/result-validation.js +1 -1
  4. package/dist/ai-edits/snapshot.js +1 -1
  5. package/dist/ai-edits/table-cell-mutations.js +1 -1
  6. package/dist/ai-edits/tracked-batch-fidelity.js +1 -1
  7. package/dist/canonical/canonicalInlineGaps.d.ts +56 -0
  8. package/dist/canonical/canonicalInlineGaps.js +118 -0
  9. package/dist/canonical/canonicalInlineProjection.d.ts +4 -13
  10. package/dist/canonical/canonicalInlineProjection.js +6 -28
  11. package/dist/canonical/canonicalProjectionBlocks.d.ts +4 -4
  12. package/dist/canonical/canonicalPublicOperations.js +70 -27
  13. package/dist/canonical/canonicalSelection.js +1 -1
  14. package/dist/canonical/canonicalSession.js +14 -21
  15. package/dist/controller/autocompleteSuggestion.js +1 -1
  16. package/dist/controller/canonicalClipboard.js +2 -2
  17. package/dist/controller/canonicalComposition.js +1 -1
  18. package/dist/controller/canonicalInput.js +1 -1
  19. package/dist/controller/canonicalPresence.js +1 -1
  20. package/dist/controller/canonicalRoomAuthority.js +1 -1
  21. package/dist/controller/canonicalRoomWire.js +1 -1
  22. package/dist/controller/canonicalStructure.js +1 -1
  23. package/dist/controller/canonicalTabRoom.js +1 -1
  24. package/dist/controller/canonicalYjsRoom.js +1 -1
  25. package/dist/controller/hiddenEditorApi.js +2 -17
  26. package/dist/controller/hiddenEditorManager.js +4 -8
  27. package/dist/document-operations.js +1 -1
  28. package/dist/docx/canonicalSave.d.ts +1 -1
  29. package/dist/docx/canonicalSave.js +1 -1
  30. package/dist/docx/canonicalSessionInput.js +1 -1
  31. package/dist/docx/containerChildren.js +1 -1
  32. package/dist/docx/createDocx.d.ts +4 -0
  33. package/dist/docx/createDocx.js +6 -0
  34. package/dist/docx/modelValidation.js +1 -1
  35. package/dist/docx/parser.js +1 -1
  36. package/dist/docx/reviewResolutionProvenance.js +1 -1
  37. package/dist/docx/rezip.d.ts +1 -1
  38. package/dist/docx/rezip.js +2 -2
  39. package/dist/docx/serializer/borderSerializer.js +1 -1
  40. package/dist/docx/serializer/commentSerializer.js +1 -1
  41. package/dist/docx/serializer/documentSerializer.js +1 -1
  42. package/dist/docx/serializer/paragraphSerializer.js +3 -3
  43. package/dist/docx/serializer/runSerializer.js +1 -1
  44. package/dist/docx/serializer/sectionPropertiesSerializer.js +1 -1
  45. package/dist/docx/serializer/tableSerializer.js +1 -1
  46. package/dist/docx/serializer/textFormattingSerializer.js +1 -1
  47. package/dist/docx/serializer/trackedChangeAttributes.js +1 -1
  48. package/dist/docx/server/templatePlan/apply.js +69 -11
  49. package/dist/docx/server/templatePlan/inspect.js +88 -35
  50. package/dist/docx/server/templatePlan/labels.d.ts +10 -1
  51. package/dist/docx/server/templatePlan/labels.js +31 -2
  52. package/dist/docx/server/templatePlan/plan.d.ts +2 -0
  53. package/dist/docx/server/templatePlan/plan.js +41 -7
  54. package/dist/docx/server/templatePlan/planShape.js +22 -3
  55. package/dist/docx/server/templatePlan/types.d.ts +38 -2
  56. package/dist/docx/server/templatePlan/types.js +1 -0
  57. package/dist/docx/server/templatePlan/verify.js +11 -3
  58. package/dist/docx/server/templatePlan/xml.d.ts +5 -0
  59. package/dist/docx/server/templatePlan/xml.js +7 -1
  60. package/dist/docx/storyBlockReplay.js +1 -1
  61. package/dist/docx/xmlParser.js +1 -1
  62. package/dist/i18n/loadMessages.d.ts +5 -0
  63. package/dist/i18n/loadMessages.js +46 -0
  64. package/dist/i18n/locales.d.ts +3 -0
  65. package/dist/i18n/locales.js +17 -0
  66. package/dist/i18n/messages.d.ts +3 -2
  67. package/dist/i18n/messages.js +4 -16
  68. package/dist/internal/clipboardTransformPlugin.d.ts +3 -0
  69. package/dist/internal/clipboardTransformPlugin.js +13 -0
  70. package/dist/internal/extensionRuntime.d.ts +7 -0
  71. package/dist/internal/extensionRuntime.js +28 -0
  72. package/dist/internal/paragraphFormattingSerialization.js +1 -1
  73. package/dist/internal/starterKitExtensions.d.ts +20 -0
  74. package/dist/internal/starterKitExtensions.js +123 -0
  75. package/dist/internal/wholeStoryRevisionResolution.js +2 -2
  76. package/dist/prosemirror/attrs/index.js +1 -1
  77. package/dist/prosemirror/canonicalSelectionRange.js +1 -1
  78. package/dist/prosemirror/canonicalTableCommands.js +1 -1
  79. package/dist/prosemirror/commands/comments.js +3 -3
  80. package/dist/prosemirror/commands/contentControls.js +1 -1
  81. package/dist/prosemirror/commands/pastePlainText.js +2 -3
  82. package/dist/prosemirror/commands/replaceRangeText.js +1 -1
  83. package/dist/prosemirror/commentRecords.js +2 -2
  84. package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -5
  85. package/dist/prosemirror/conversion/fromProseDoc.js +2 -9
  86. package/dist/prosemirror/conversion/index.d.ts +2 -2
  87. package/dist/prosemirror/conversion/index.js +2 -2
  88. package/dist/prosemirror/extensions/ExtensionManager.js +4 -22
  89. package/dist/prosemirror/extensions/StarterKit.d.ts +4 -27
  90. package/dist/prosemirror/extensions/StarterKit.js +29 -115
  91. package/dist/prosemirror/extensions/core/ParagraphExtension.js +2 -2
  92. package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +1 -1
  93. package/dist/prosemirror/extensions/features/ListExtension.js +7 -2
  94. package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +1 -1
  95. package/dist/prosemirror/extensions/index.d.ts +2 -1
  96. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +8 -3
  97. package/dist/prosemirror/extensions/nodes/TableExtension.js +7 -40
  98. package/dist/prosemirror/hyperlinkRemoval.js +7 -2
  99. package/dist/prosemirror/index.d.ts +2 -2
  100. package/dist/prosemirror/index.js +2 -2
  101. package/dist/prosemirror/keptRangeBoundaries.js +1 -1
  102. package/dist/prosemirror/listNumbering.js +1 -1
  103. package/dist/prosemirror/noteReferenceOccurrences.js +1 -1
  104. package/dist/prosemirror/noteReferenceReview.d.ts +2 -56
  105. package/dist/prosemirror/noteReferenceReview.js +2 -243
  106. package/dist/prosemirror/pastedCommentCopies.js +1 -1
  107. package/dist/prosemirror/plugins/documentNumbering.js +1 -1
  108. package/dist/prosemirror/plugins/documentStyles.js +1 -1
  109. package/dist/prosemirror/replacedAnnotations.js +1 -1
  110. package/dist/prosemirror/suggestionCommands.d.ts +47 -0
  111. package/dist/prosemirror/suggestionCommands.js +31 -0
  112. package/dist/prosemirror/tableCellPaste.js +1 -1
  113. package/dist/prosemirror/tableRunIn.js +1 -1
  114. package/dist/prosemirror/textInput.js +1 -1
  115. package/dist/types/canonicalCapabilities.d.ts +6 -52
  116. package/dist/types/canonicalCapabilities.js +6 -52
  117. package/package.json +2 -2
  118. package/dist/ai-edits/apply.d.ts +0 -94
  119. package/dist/ai-edits/apply.js +0 -6637
  120. package/dist/ai-edits/note-story-inventory.d.ts +0 -5
  121. package/dist/ai-edits/note-story-inventory.js +0 -10
  122. package/dist/ai-edits/revisionStretches.d.ts +0 -32
  123. package/dist/ai-edits/revisionStretches.js +0 -147
  124. package/dist/document-operations-apply.d.ts +0 -15
  125. package/dist/document-operations-apply.js +0 -280
  126. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -12
  127. package/dist/prosemirror/extensions/core/HistoryExtension.js +0 -114
  128. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -23
  129. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +0 -270
  130. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +0 -51
  131. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +0 -411
  132. package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -92
  133. package/dist/prosemirror/plugins/suggestionMode.js +0 -1515
  134. package/dist/prosemirror/tablePositionedBookmarks.d.ts +0 -8
  135. package/dist/prosemirror/tablePositionedBookmarks.js +0 -80
@@ -1,94 +0,0 @@
1
- import { NumberingIdsInUse } from "../docx/numberingIds.js";
2
- import { FolioAIEditApplyOutcome, FolioAIEditView, FolioReplacementBackground, FolioRevisionStamp, FolioWordDiffOptions } from "./applyTypes.js";
3
- import { FolioTableTemplates } from "./table-template.js";
4
- import { FolioAIEditApplyMode, FolioAIEditOperation, FolioAIEditSnapshot } from "./types.js";
5
- import { FolioUndefinedReferencePolicy } from "./undefinedReferences.js";
6
- import { Transaction } from "prosemirror-state";
7
- import { Node } from "prosemirror-model";
8
- type ApplyFolioAIEditOperationsOptions = {
9
- view: FolioAIEditView;
10
- snapshot: FolioAIEditSnapshot;
11
- operations: readonly FolioAIEditOperation[];
12
- mode?: FolioAIEditApplyMode;
13
- author?: string;
14
- /** Optional author initials (w:initials) stamped alongside the author. */
15
- initials?: string;
16
- createCommentId?: (text: string) => number;
17
- /** Omit to stamp revisions from the wall clock and the shared id cursor. */
18
- revisionStamp?: FolioRevisionStamp;
19
- /** How a replacement's redline is cut. */
20
- wordDiff?: FolioWordDiffOptions;
21
- /**
22
- * Tables and rows an `insertTable` / `insertTableRow` operation should place
23
- * verbatim, by operation id.
24
- *
25
- * The operations describe their content as cell texts, which is what a
26
- * caller writing a table from nothing has. A caller copying one it already
27
- * holds — a comparison placing the target document's table — has the whole
28
- * thing: `w:tblPr`, the `w:tblGrid` widths, `w:trPr`, `w:tcPr` with its
29
- * spans and merges, and cell paragraphs with their own properties. Rebuilt
30
- * from text, none of that survives. Kept out of the operation payload
31
- * because it is a document node rather than JSON: the serialized contract
32
- * still describes a table by its cell texts.
33
- */
34
- tableTemplates?: FolioTableTemplates;
35
- /** What a replacement does with a background the text it replaces carries. */
36
- replacementBackground?: FolioReplacementBackground;
37
- /** Policy for undefined style and numbering references; see FolioUndefinedReferencePolicy. */
38
- undefinedReferences: FolioUndefinedReferencePolicy;
39
- };
40
- /**
41
- * Options of a caller that holds every story of the package. Numbering ids
42
- * are package-wide while a story's state completes its numbering from its own
43
- * paragraphs, so the caller names the ids the other stories define and a list
44
- * the batch starts takes none of them.
45
- */
46
- type ApplyFolioAIEditOperationsInPackageOptions = ApplyFolioAIEditOperationsOptions & {
47
- numberingIdsElsewhere: NumberingIdsInUse;
48
- refuseCrossAuthorRevisions?: boolean;
49
- };
50
- export declare const applyFolioAIEditOperations: (options: ApplyFolioAIEditOperationsOptions) => FolioAIEditApplyOutcome;
51
- /** {@link applyFolioAIEditOperations} for a caller holding every story. Internal. */
52
- export declare const applyFolioAIEditOperationsInPackage: (options: ApplyFolioAIEditOperationsInPackageOptions) => FolioAIEditApplyOutcome;
53
- export declare const previewFolioAIEditOperations: (options: ApplyFolioAIEditOperationsOptions) => FolioAIEditApplyOutcome;
54
- /**
55
- * A preview together with the document it would leave and the provisional
56
- * comment ids it placed, for a caller that checks the result before reporting
57
- * it. Internal: not re-exported from the package entry points.
58
- */
59
- export declare const previewFolioAIEditOperationsWithResult: (options: ApplyFolioAIEditOperationsInPackageOptions, wordDiffMode?: "coarse" | "bounded") => {
60
- outcome: FolioAIEditApplyOutcome;
61
- doc: Node;
62
- commentIds: readonly number[];
63
- };
64
- type InsertCleanTextOptions = {
65
- tr: Transaction;
66
- from: number;
67
- to: number;
68
- text: string;
69
- /**
70
- * The span this insertion stands in for, when the two together are a
71
- * replacement the tracked-changes path splits into a deletion and an
72
- * insertion. The insertion carries that span's marks, so accepting the
73
- * change leaves the link and the comment on the new text. Its anchors are
74
- * left alone: a tracked deletion removes nothing.
75
- */
76
- standsInFor?: {
77
- from: number;
78
- to: number;
79
- };
80
- /**
81
- * The span stood in for stays, as a tracked deletion: a comment on it then
82
- * goes on the insertion only where the insertion continues its range.
83
- */
84
- keepsReplacedText?: boolean;
85
- };
86
- type InsertedCleanText = {
87
- transaction: Transaction;
88
- /** Start of the inserted text, past any anchor restored before it. */
89
- start: number;
90
- /** End of the inserted text, before any anchor restored after it. */
91
- end: number;
92
- };
93
- export declare const insertCleanText: ({ tr, from, to, text, standsInFor, keepsReplacedText }: InsertCleanTextOptions) => InsertedCleanText;
94
- export {};