@stll/folio-core 0.73.0 → 0.75.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.
- package/dist/ai-edits/clean-text.d.ts +4 -1
- package/dist/ai-edits/clean-text.js +21 -7
- package/dist/ai-edits/headless.d.ts +5 -2
- package/dist/ai-edits/headless.js +20 -14
- package/dist/ai-edits/note-references.d.ts +1 -1
- package/dist/ai-edits/note-references.js +1 -1
- package/dist/ai-edits/pending-suggestions.d.ts +9 -7
- package/dist/ai-edits/pending-suggestions.js +134 -88
- package/dist/ai-edits/pendingJoin.d.ts +5 -1
- package/dist/ai-edits/pendingJoin.js +12 -3
- package/dist/ai-edits/result-validation.js +1 -1
- package/dist/ai-edits/retired-comment-receipts.d.ts +2 -2
- package/dist/ai-edits/retired-comment-receipts.js +3 -18
- package/dist/ai-edits/snapshot.js +1 -1
- package/dist/ai-edits/table-cell-mutations.js +1 -1
- package/dist/ai-edits/tracked-batch-fidelity.d.ts +6 -10
- package/dist/ai-edits/tracked-batch-fidelity.js +3 -182
- package/dist/canonical/canonicalBatchReview.d.ts +4 -1
- package/dist/canonical/canonicalBatchReview.js +32 -14
- package/dist/canonical/canonicalComments.d.ts +6 -2
- package/dist/canonical/canonicalComments.js +8 -4
- package/dist/canonical/canonicalInlineGaps.d.ts +56 -0
- package/dist/canonical/canonicalInlineGaps.js +118 -0
- package/dist/canonical/canonicalInlineProjection.d.ts +4 -13
- package/dist/canonical/canonicalInlineProjection.js +6 -28
- package/dist/canonical/canonicalProjectionBlocks.d.ts +4 -4
- package/dist/canonical/canonicalPublicOperations.js +99 -36
- package/dist/canonical/canonicalRefusalGrounds.d.ts +4 -0
- package/dist/canonical/canonicalRefusalGrounds.js +56 -0
- package/dist/canonical/canonicalSelection.js +1 -1
- package/dist/canonical/canonicalSession.d.ts +12 -6
- package/dist/canonical/canonicalSession.js +129 -141
- package/dist/canonical/canonicalTrackedBatchFidelity.js +3 -3
- package/dist/compare/inline-atoms.d.ts +35 -41
- package/dist/compare/inline-atoms.js +2 -465
- package/dist/compare/section-boundary-properties.d.ts +3 -30
- package/dist/compare/section-boundary-properties.js +4 -72
- package/dist/controller/autocompleteSuggestion.js +1 -1
- package/dist/controller/canonicalClipboard.js +45 -44
- package/dist/controller/canonicalComposition.d.ts +1 -1
- package/dist/controller/canonicalComposition.js +6 -6
- package/dist/controller/canonicalInput.d.ts +4 -2
- package/dist/controller/canonicalInput.js +34 -17
- package/dist/controller/canonicalPresence.js +1 -1
- package/dist/controller/canonicalRoomAuthority.js +1 -1
- package/dist/controller/canonicalRoomWire.js +1 -1
- package/dist/controller/canonicalStoryEditor.d.ts +2 -3
- package/dist/controller/canonicalStoryEditor.js +43 -25
- package/dist/controller/canonicalStructure.d.ts +19 -2
- package/dist/controller/canonicalStructure.js +140 -43
- package/dist/controller/canonicalTabRoom.js +1 -1
- package/dist/controller/canonicalYjsRoom.js +1 -1
- package/dist/controller/deferredDisplayListPainter.d.ts +8 -0
- package/dist/controller/deferredDisplayListPainter.js +34 -0
- package/dist/controller/folioEditor.js +4 -2
- package/dist/controller/headerFooterEditorManager.js +3 -17
- package/dist/controller/hiddenEditorApi.d.ts +24 -3
- package/dist/controller/hiddenEditorApi.js +4 -17
- package/dist/controller/hiddenEditorManager.js +136 -197
- package/dist/controller/layoutPipeline.d.ts +4 -86
- package/dist/controller/layoutPipeline.js +8 -727
- package/dist/controller/layoutPipelineExecution.d.ts +94 -0
- package/dist/controller/layoutPipelineExecution.js +730 -0
- package/dist/controller/noteEditorManager.js +3 -16
- package/dist/document-operations.js +1 -1
- package/dist/docx/blockContentParser.d.ts +1 -3
- package/dist/docx/blockContentParser.js +3 -10
- package/dist/docx/canonicalSave.d.ts +4 -3
- package/dist/docx/canonicalSave.js +4 -3
- package/dist/docx/canonicalSessionInput.js +1 -1
- package/dist/docx/containerChildren.js +1 -1
- package/dist/docx/createDocx.d.ts +4 -0
- package/dist/docx/createDocx.js +6 -0
- package/dist/docx/listMarkerComputation.d.ts +24 -17
- package/dist/docx/listMarkerComputation.js +31 -60
- package/dist/docx/listModelNormalization.js +8 -15
- package/dist/docx/modelValidation.js +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/reviewResolutionProvenance.js +1 -1
- package/dist/docx/rezip.d.ts +16 -3
- package/dist/docx/rezip.js +36 -10
- package/dist/docx/selectiveSave.js +13 -5
- package/dist/docx/serializer/borderSerializer.js +1 -1
- package/dist/docx/serializer/commentSerializer.js +1 -1
- package/dist/docx/serializer/documentSerializer.js +1 -1
- package/dist/docx/serializer/paragraphSerializer.js +3 -3
- package/dist/docx/serializer/runSerializer.js +1 -1
- package/dist/docx/serializer/sectionPropertiesSerializer.js +1 -1
- package/dist/docx/serializer/tableSerializer.js +1 -1
- package/dist/docx/serializer/textFormattingSerializer.js +1 -1
- package/dist/docx/serializer/trackedChangeAttributes.js +1 -1
- package/dist/docx/server/templatePlan/apply.js +107 -14
- package/dist/docx/server/templatePlan/blocks.d.ts +16 -1
- package/dist/docx/server/templatePlan/blocks.js +93 -7
- package/dist/docx/server/templatePlan/builders.d.ts +37 -2
- package/dist/docx/server/templatePlan/builders.js +196 -5
- package/dist/docx/server/templatePlan/emit.d.ts +2 -0
- package/dist/docx/server/templatePlan/emit.js +2 -0
- package/dist/docx/server/templatePlan/inspect.js +81 -61
- package/dist/docx/server/templatePlan/labels.d.ts +16 -2
- package/dist/docx/server/templatePlan/labels.js +131 -20
- package/dist/docx/server/templatePlan/plan.d.ts +15 -1
- package/dist/docx/server/templatePlan/plan.js +62 -13
- package/dist/docx/server/templatePlan/planShape.js +52 -4
- package/dist/docx/server/templatePlan/story.d.ts +8 -0
- package/dist/docx/server/templatePlan/story.js +11 -1
- package/dist/docx/server/templatePlan/types.d.ts +176 -18
- package/dist/docx/server/templatePlan/types.js +1 -0
- package/dist/docx/server/templatePlan/verify.js +60 -11
- package/dist/docx/server/templatePlan/xml.d.ts +5 -0
- package/dist/docx/server/templatePlan/xml.js +7 -1
- package/dist/docx/storyBlockReplay.js +1 -1
- package/dist/docx/xmlParser.js +1 -1
- package/dist/i18n/loadMessages.d.ts +5 -0
- package/dist/i18n/loadMessages.js +46 -0
- package/dist/i18n/locales.d.ts +3 -0
- package/dist/i18n/locales.js +17 -0
- package/dist/i18n/messages/ar.gen.js +1 -0
- package/dist/i18n/messages/catalogs.gen.d.ts +17 -0
- package/dist/i18n/messages/catalogs.gen.js +17 -0
- package/dist/i18n/messages/cs.gen.js +1 -0
- package/dist/i18n/messages/de.gen.js +1 -0
- package/dist/i18n/messages/en.gen.js +1 -0
- package/dist/i18n/messages/es.gen.js +1 -0
- package/dist/i18n/messages/et.gen.js +1 -0
- package/dist/i18n/messages/fr.gen.js +1 -0
- package/dist/i18n/messages/he.gen.js +1 -0
- package/dist/i18n/messages/hi.gen.js +1 -0
- package/dist/i18n/messages/hu.gen.js +1 -0
- package/dist/i18n/messages/lt.gen.js +1 -0
- package/dist/i18n/messages/lv.gen.js +1 -0
- package/dist/i18n/messages/messages.gen.d.ts +1 -0
- package/dist/i18n/messages/pl.gen.js +1 -0
- package/dist/i18n/messages/pt-BR.gen.js +1 -0
- package/dist/i18n/messages/sk.gen.js +1 -0
- package/dist/i18n/messages/tr.gen.js +1 -0
- package/dist/i18n/messages/zh-CN.gen.js +1 -0
- package/dist/i18n/messages.d.ts +3 -2
- package/dist/i18n/messages.js +4 -16
- package/dist/internal/clipboardTransformPlugin.d.ts +3 -0
- package/dist/internal/clipboardTransformPlugin.js +13 -0
- package/dist/internal/extensionRuntime.d.ts +7 -0
- package/dist/internal/extensionRuntime.js +28 -0
- package/dist/internal/paragraphFormattingSerialization.js +1 -1
- package/dist/internal/starterKitExtensions.d.ts +20 -0
- package/dist/internal/starterKitExtensions.js +123 -0
- package/dist/internal/wholeStoryRevisionResolution.js +2 -2
- package/dist/layout-bridge/convert/toFlowBlocks.js +0 -12
- package/dist/layout-bridge/convert/topLevelConversion.js +1 -10
- package/dist/prosemirror/attrs/index.js +1 -1
- package/dist/prosemirror/canonicalSelectionRange.js +1 -1
- package/dist/prosemirror/canonicalTableCommands.js +1 -1
- package/dist/prosemirror/commands/comments.js +3 -3
- package/dist/prosemirror/commands/contentControls.js +1 -1
- package/dist/prosemirror/commands/pastePlainText.js +2 -3
- package/dist/prosemirror/commands/replaceRangeText.js +1 -1
- package/dist/prosemirror/commentRecords.js +2 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -5
- package/dist/prosemirror/conversion/fromProseDoc.js +2 -9
- package/dist/prosemirror/conversion/index.d.ts +2 -2
- package/dist/prosemirror/conversion/index.js +2 -2
- package/dist/prosemirror/extensions/ExtensionManager.js +4 -22
- package/dist/prosemirror/extensions/StarterKit.d.ts +4 -27
- package/dist/prosemirror/extensions/StarterKit.js +29 -115
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +2 -2
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +1 -1
- package/dist/prosemirror/extensions/features/ImagePasteExtension.js +1 -1
- package/dist/prosemirror/extensions/features/ListExtension.js +7 -2
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +1 -1
- package/dist/prosemirror/extensions/index.d.ts +2 -1
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +8 -3
- package/dist/prosemirror/extensions/nodes/TableExtension.js +7 -40
- package/dist/prosemirror/hyperlinkRemoval.js +7 -2
- package/dist/prosemirror/index.d.ts +2 -2
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/keptRangeBoundaries.js +1 -1
- package/dist/prosemirror/listMarker.d.ts +1 -6
- package/dist/prosemirror/listMarker.js +4 -56
- package/dist/prosemirror/listNumbering.js +1 -1
- package/dist/prosemirror/noteReferenceOccurrences.js +1 -1
- package/dist/prosemirror/noteReferenceReview.d.ts +2 -56
- package/dist/prosemirror/noteReferenceReview.js +2 -243
- package/dist/prosemirror/pastedCommentCopies.js +1 -1
- package/dist/prosemirror/plugins/documentNumbering.js +1 -1
- package/dist/prosemirror/plugins/documentStyles.js +1 -1
- package/dist/prosemirror/replacedAnnotations.js +1 -1
- package/dist/prosemirror/suggestionCommands.d.ts +47 -0
- package/dist/prosemirror/suggestionCommands.js +31 -0
- package/dist/prosemirror/tableCellPaste.js +1 -1
- package/dist/prosemirror/tableRunIn.js +1 -1
- package/dist/prosemirror/textInput.js +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/types/canonicalCapabilities.d.ts +42 -93
- package/dist/types/canonicalCapabilities.js +53 -91
- package/dist/types/canonicalComments.d.ts +2 -2
- package/dist/types/canonicalSections.d.ts +2 -2
- package/dist/utils/clipboard.d.ts +2 -28
- package/dist/utils/clipboard.js +1 -96
- package/dist/utils/clipboardFiles.d.ts +27 -0
- package/dist/utils/clipboardFiles.js +98 -0
- package/dist/utils/rulerControl.d.ts +1 -0
- package/dist/utils/rulerControl.js +2 -1
- package/package.json +2 -2
- package/dist/ai-edits/apply.d.ts +0 -94
- package/dist/ai-edits/apply.js +0 -6637
- package/dist/ai-edits/note-story-inventory.d.ts +0 -5
- package/dist/ai-edits/note-story-inventory.js +0 -10
- package/dist/ai-edits/revisionStretches.d.ts +0 -32
- package/dist/ai-edits/revisionStretches.js +0 -147
- package/dist/document-operations-apply.d.ts +0 -15
- package/dist/document-operations-apply.js +0 -280
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -12
- package/dist/prosemirror/extensions/core/HistoryExtension.js +0 -114
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -23
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +0 -270
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +0 -51
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +0 -411
- package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -92
- package/dist/prosemirror/plugins/suggestionMode.js +0 -1515
- package/dist/prosemirror/tablePositionedBookmarks.d.ts +0 -8
- package/dist/prosemirror/tablePositionedBookmarks.js +0 -80
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A bookmark between a table's rows, or between a row's cells, has nowhere in
|
|
3
|
-
* the schema to stand. The node carries it in `_bookmarks`, addressed by child
|
|
4
|
-
* index, and that index has to follow the children as they come and go. Every
|
|
5
|
-
* change to them passes here, whichever path made it.
|
|
6
|
-
*/
|
|
7
|
-
import { Plugin } from "prosemirror-state";
|
|
8
|
-
export declare const tablePositionedBookmarksPlugin: () => Plugin;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { Mapping } from "prosemirror-transform";
|
|
2
|
-
import { Plugin, PluginKey } from "prosemirror-state";
|
|
3
|
-
// src/prosemirror/tablePositionedBookmarks.ts
|
|
4
|
-
const positionedBookmarksOf = (node) => {
|
|
5
|
-
const role = node.type.spec["tableRole"];
|
|
6
|
-
if (role !== "table" && role !== "row") return null;
|
|
7
|
-
const bookmarks = node.attrs["_bookmarks"];
|
|
8
|
-
return Array.isArray(bookmarks) && bookmarks.length > 0 ? bookmarks : null;
|
|
9
|
-
};
|
|
10
|
-
/** Where a boundary between the source's children falls among the new ones. */
|
|
11
|
-
const childIndexAt = (node, nodePosition, at) => {
|
|
12
|
-
let index = 0;
|
|
13
|
-
let end = nodePosition + 1;
|
|
14
|
-
while (index < node.childCount) {
|
|
15
|
-
end += node.child(index).nodeSize;
|
|
16
|
-
if (end > at) break;
|
|
17
|
-
index += 1;
|
|
18
|
-
}
|
|
19
|
-
return index;
|
|
20
|
-
};
|
|
21
|
-
const followingIndex = ({ source, sourcePosition, node, position, index, mapping }) => {
|
|
22
|
-
if (!source || source.type !== node.type || index > source.childCount) return Math.min(index, node.childCount);
|
|
23
|
-
if (index === source.childCount) return node.childCount;
|
|
24
|
-
let boundary = sourcePosition + 1;
|
|
25
|
-
for (let child = 0; child < index; child += 1) boundary += source.child(child).nodeSize;
|
|
26
|
-
return childIndexAt(node, position, mapping.map(boundary, -1));
|
|
27
|
-
};
|
|
28
|
-
const repairChanged = ({ before, after, offset, mapping, back, sourceDoc, tr }) => {
|
|
29
|
-
after.forEach((child, childOffset, index) => {
|
|
30
|
-
if (child === before.maybeChild(index) || child.isTextblock) return;
|
|
31
|
-
const position = offset + childOffset;
|
|
32
|
-
const bookmarks = positionedBookmarksOf(child);
|
|
33
|
-
if (bookmarks) {
|
|
34
|
-
const sourcePosition = back.map(position, 1);
|
|
35
|
-
const source = sourceDoc.nodeAt(sourcePosition);
|
|
36
|
-
const repaired = bookmarks.map((bookmark) => ({
|
|
37
|
-
...bookmark,
|
|
38
|
-
index: followingIndex({
|
|
39
|
-
source,
|
|
40
|
-
sourcePosition,
|
|
41
|
-
node: child,
|
|
42
|
-
position,
|
|
43
|
-
index: bookmark.index,
|
|
44
|
-
mapping
|
|
45
|
-
})
|
|
46
|
-
}));
|
|
47
|
-
if (repaired.some(({ index: at }, i) => at !== bookmarks[i]?.index)) tr.setNodeAttribute(position, "_bookmarks", repaired);
|
|
48
|
-
}
|
|
49
|
-
repairChanged({
|
|
50
|
-
before: before.maybeChild(index) ?? child.type.create(),
|
|
51
|
-
after: child,
|
|
52
|
-
offset: position + 1,
|
|
53
|
-
mapping,
|
|
54
|
-
back,
|
|
55
|
-
sourceDoc,
|
|
56
|
-
tr
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
const tablePositionedBookmarksPlugin = () => new Plugin({
|
|
61
|
-
key: new PluginKey("tablePositionedBookmarks"),
|
|
62
|
-
appendTransaction(transactions, oldState, newState) {
|
|
63
|
-
if (!transactions.some(({ docChanged }) => docChanged)) return null;
|
|
64
|
-
const mapping = new Mapping();
|
|
65
|
-
for (const { mapping: each } of transactions) mapping.appendMapping(each);
|
|
66
|
-
const tr = newState.tr;
|
|
67
|
-
repairChanged({
|
|
68
|
-
before: oldState.doc,
|
|
69
|
-
after: newState.doc,
|
|
70
|
-
offset: 0,
|
|
71
|
-
mapping,
|
|
72
|
-
back: mapping.invert(),
|
|
73
|
-
sourceDoc: oldState.doc,
|
|
74
|
-
tr
|
|
75
|
-
});
|
|
76
|
-
if (!tr.docChanged) return null;
|
|
77
|
-
return tr.setMeta("addToHistory", false);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
export { tablePositionedBookmarksPlugin };
|