@stll/folio-core 0.11.0 → 0.12.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/apply.js +602 -50
- package/dist/ai-edits/block-identity.d.ts +4 -0
- package/dist/ai-edits/block-identity.js +9 -0
- package/dist/ai-edits/blockRange.d.ts +28 -1
- package/dist/ai-edits/blockRange.js +67 -1
- package/dist/ai-edits/headless.d.ts +4 -4
- package/dist/ai-edits/headless.js +9 -9
- package/dist/ai-edits/index.d.ts +2 -2
- package/dist/ai-edits/index.js +2 -2
- package/dist/ai-edits/read.d.ts +7 -7
- package/dist/ai-edits/read.js +110 -3
- package/dist/ai-edits/table-cell-mutations.d.ts +48 -0
- package/dist/ai-edits/table-cell-mutations.js +237 -0
- package/dist/ai-edits/table-mutation-plan.d.ts +38 -0
- package/dist/ai-edits/table-mutation-plan.js +90 -0
- package/dist/ai-edits/table-row-column-mutations.d.ts +100 -0
- package/dist/ai-edits/table-row-column-mutations.js +300 -0
- package/dist/ai-edits/table-targets.d.ts +32 -0
- package/dist/ai-edits/table-targets.js +70 -0
- package/dist/ai-edits/types.d.ts +34 -0
- package/dist/compat/eigenpal.js +1 -1
- package/dist/content-controls/mutateContentControls.js +1 -1
- package/dist/controller/activeEditorStory.d.ts +36 -0
- package/dist/controller/activeEditorStory.js +30 -0
- package/dist/controller/contentControlWidgetController.d.ts +55 -0
- package/dist/controller/contentControlWidgetController.js +141 -0
- package/dist/controller/fontReadiness.js +2 -0
- package/dist/controller/headerFooterEditorManager.js +1 -1
- package/dist/controller/hiddenEditorApi.js +2 -2
- package/dist/controller/hiddenEditorManager.d.ts +12 -1
- package/dist/controller/hiddenEditorManager.js +32 -11
- package/dist/controller/layoutPipeline.d.ts +2 -0
- package/dist/controller/layoutPipeline.js +16 -1
- package/dist/controller/noteEditorManager.d.ts +36 -0
- package/dist/controller/noteEditorManager.js +210 -0
- package/dist/document-operations.d.ts +35 -3
- package/dist/document-operations.js +161 -3
- package/dist/docx/blockContentParser.js +2 -2
- package/dist/docx/commentParser.js +6 -1
- package/dist/docx/conformance.js +8 -1
- package/dist/docx/documentGrid.d.ts +8 -0
- package/dist/docx/documentGrid.js +8 -0
- package/dist/docx/drawingUtils.js +1 -1
- package/dist/docx/ensureParaIds.js +1 -1
- package/dist/docx/fieldParser.js +1 -1
- package/dist/docx/notePropertiesParser.js +1 -1
- package/dist/docx/numberingParser.js +1 -1
- package/dist/docx/paragraphParser.js +63 -58
- package/dist/docx/paragraphTextBoxEnrichment.d.ts +2 -1
- package/dist/docx/paragraphTextBoxEnrichment.js +67 -13
- package/dist/docx/paragraphTraversal.js +1 -1
- package/dist/docx/parser.js +3 -3
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/runParser.js +4 -2
- package/dist/docx/sdtProperties.js +1 -1
- package/dist/docx/sectionParser.js +1 -1
- package/dist/docx/selectiveSave.js +1 -1
- package/dist/docx/serializer/commentSerializer.js +1 -2
- package/dist/docx/serializer/documentSerializer.js +2 -2
- package/dist/docx/serializer/headerFooterSerializer.js +2 -2
- package/dist/docx/serializer/noteSerializer.js +2 -2
- package/dist/docx/serializer/paragraphSerializer.js +7 -1
- package/dist/docx/serializer/runSerializer.js +4 -2
- package/dist/docx/serializer/stylesSerializer.js +1 -1
- package/dist/docx/serializer/tableSerializer.d.ts +5 -4
- package/dist/docx/serializer/tableSerializer.js +17 -13
- package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +87 -0
- package/dist/docx/server/applyDocxXmlPatchProposal.js +204 -0
- package/dist/docx/server/boundedArchive.d.ts +14 -3
- package/dist/docx/server/boundedArchive.js +56 -11
- package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +85 -0
- package/dist/docx/server/evaluateDocxXmlPatchProposal.js +361 -0
- package/dist/docx/server/inspectDocxPackage.d.ts +70 -0
- package/dist/docx/server/inspectDocxPackage.js +217 -0
- package/dist/docx/server/validateDocxConformance.d.ts +41 -0
- package/dist/docx/server/validateDocxConformance.js +336 -0
- package/dist/docx/settingsParser.js +11 -1
- package/dist/docx/shapeParser.js +1 -1
- package/dist/docx/styleParser.js +4 -2
- package/dist/docx/tableParser.js +18 -7
- package/dist/docx/textBoxParser.d.ts +3 -3
- package/dist/docx/textBoxParser.js +16 -12
- package/dist/docx/xmlSafety.d.ts +5 -0
- package/dist/docx/xmlSafety.js +9 -0
- package/dist/fields/resolveFieldValues.js +1 -3
- package/dist/i18n/messages/catalogs.gen.d.ts +17 -0
- package/dist/i18n/messages/catalogs.gen.js +17 -0
- package/dist/i18n/messages/messages.gen.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/layout-bridge/convert/footnoteLayout.d.ts +1 -0
- package/dist/layout-bridge/convert/footnoteLayout.js +47 -40
- package/dist/layout-bridge/convert/headerFooterLayout.d.ts +1 -0
- package/dist/layout-bridge/convert/headerFooterLayout.js +3 -0
- package/dist/layout-bridge/convert/templatePreviewFlow.js +3 -3
- package/dist/layout-bridge/convert/toFlowBlocks.d.ts +4 -2
- package/dist/layout-bridge/convert/toFlowBlocks.js +136 -20
- package/dist/layout-bridge/dom/noteStoryDom.d.ts +6 -0
- package/dist/layout-bridge/dom/noteStoryDom.js +17 -0
- package/dist/layout-bridge/engine/clickToPosition.js +2 -2
- package/dist/layout-engine/index.d.ts +2 -2
- package/dist/layout-engine/index.js +43 -28
- package/dist/layout-engine/justificationCompatibility.d.ts +6 -0
- package/dist/layout-engine/justificationCompatibility.js +8 -0
- package/dist/layout-engine/keep-together.js +11 -1
- package/dist/layout-engine/measure/cache.js +21 -5
- package/dist/layout-engine/measure/lineBreakProvider.js +53 -34
- package/dist/layout-engine/measure/measureBlocks.js +6 -3
- package/dist/layout-engine/measure/measureContainer.js +1 -1
- package/dist/layout-engine/measure/measureHelpers.d.ts +1 -1
- package/dist/layout-engine/measure/measureHelpers.js +3 -3
- package/dist/layout-engine/measure/measureParagraph.js +69 -25
- package/dist/layout-engine/measure/measureProvider.js +4 -3
- package/dist/layout-engine/measure/tableCellFlow.js +5 -2
- package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +9 -7
- package/dist/layout-engine/measure/textBoxParagraphLayout.js +22 -6
- package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +3 -1
- package/dist/layout-engine/measure/textMeasurementPolicy.js +7 -1
- package/dist/layout-engine/paginator.js +5 -1
- package/dist/layout-engine/paragraphSpacing.d.ts +28 -4
- package/dist/layout-engine/paragraphSpacing.js +107 -13
- package/dist/layout-engine/renderedBreakReconciliation.js +1 -1
- package/dist/layout-engine/types.d.ts +26 -13
- package/dist/layout-painter/registry/modules/textBox.js +5 -1
- package/dist/layout-painter/renderPage.d.ts +5 -2
- package/dist/layout-painter/renderPage.js +56 -12
- package/dist/layout-painter/renderParagraph.js +22 -6
- package/dist/layout-painter/renderTable.d.ts +5 -1
- package/dist/layout-painter/renderTable.js +5 -2
- package/dist/layout-painter/renderTextBox.d.ts +2 -1
- package/dist/layout-painter/renderTextBox.js +25 -14
- package/dist/managers/DocumentLoaderManager.js +1 -1
- package/dist/model.js +1 -1
- package/dist/prosemirror/attrs/index.d.ts +4 -2
- package/dist/prosemirror/attrs/index.js +154 -18
- package/dist/prosemirror/commands/comments.d.ts +3 -3
- package/dist/prosemirror/commands/comments.js +248 -12
- package/dist/prosemirror/commands/contentControls.js +1 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/pageBreak.js +1 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +2 -2
- package/dist/prosemirror/commands/propertyChangeScope.js +3 -2
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +9 -0
- package/dist/prosemirror/commands/tableCellMergeResolution.js +181 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +2 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +286 -61
- package/dist/prosemirror/conversion/sdtAttrs.d.ts +9 -0
- package/dist/prosemirror/conversion/sdtAttrs.js +49 -0
- package/dist/prosemirror/conversion/toProseDoc.d.ts +2 -1
- package/dist/prosemirror/conversion/toProseDoc.js +347 -98
- package/dist/prosemirror/extensions/ExtensionManager.js +1 -1
- package/dist/prosemirror/extensions/StarterKit.js +6 -1
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +4 -1
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +1 -0
- package/dist/prosemirror/extensions/features/ListExtension.js +1 -1
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +10 -1
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +93 -2
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +2 -1
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +6 -2
- package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.js +1 -1
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +9 -1
- package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +24 -1
- package/dist/prosemirror/extensions/nodes/FieldExtension.js +1 -1
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +7 -0
- package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.js +22 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.js +9 -3
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +13 -0
- package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.js +41 -0
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +5 -2
- package/dist/prosemirror/extensions/nodes/TextBoxExtension.js +4 -1
- package/dist/prosemirror/plugins/contentControlWidgets.d.ts +34 -8
- package/dist/prosemirror/plugins/contentControlWidgets.js +125 -91
- package/dist/prosemirror/plugins/selectionTracker.js +1 -0
- package/dist/prosemirror/plugins/suggestionMode.js +1 -1
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/marks.d.ts +5 -1
- package/dist/prosemirror/schema/nodes.d.ts +64 -7
- package/dist/prosemirror/selectionState.js +1 -0
- package/dist/prosemirror/styles/resolvedStyleAttrs.js +1 -0
- package/dist/prosemirror/tableCellMergeRevision.d.ts +9 -0
- package/dist/prosemirror/tableCellMergeRevision.js +22 -0
- package/dist/prosemirror/textBoxAnchorAttrs.d.ts +9 -0
- package/dist/prosemirror/textBoxAnchorAttrs.js +33 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.js +62 -14
- package/dist/prosemirror/validation.js +9 -1
- package/dist/server.d.ts +6 -2
- package/dist/server.js +5 -1
- package/dist/utils/fontFamilyMerge.js +9 -11
- package/dist/utils/fontLoader.js +3 -2
- package/dist/utils/fontResolver.js +22 -4
- package/dist/utils/fontWeights.d.ts +1 -1
- package/dist/utils/fontWeights.js +1 -1
- package/dist/utils/paragraphFormattingMerge.js +1 -0
- package/package.json +1 -1
|
@@ -493,6 +493,7 @@ declare const CATALOGS: {
|
|
|
493
493
|
readonly rowDeleted: "Row deleted";
|
|
494
494
|
readonly rowInserted: "Row inserted";
|
|
495
495
|
readonly rowPropertiesChanged: "Row formatting changed";
|
|
496
|
+
readonly runPropertiesChanged: "Text formatting changed";
|
|
496
497
|
readonly tableDeleted: "Table deleted";
|
|
497
498
|
readonly tableInserted: "Table inserted";
|
|
498
499
|
readonly tablePropertiesChanged: "Table formatting changed";
|
|
@@ -1135,6 +1136,7 @@ declare const CATALOGS: {
|
|
|
1135
1136
|
readonly rowDeleted: "Zeile gelöscht";
|
|
1136
1137
|
readonly rowInserted: "Zeile eingefügt";
|
|
1137
1138
|
readonly rowPropertiesChanged: "Zeilenformatierung geändert";
|
|
1139
|
+
readonly runPropertiesChanged: "Textformatierung geändert";
|
|
1138
1140
|
readonly tableDeleted: "Tabelle gelöscht";
|
|
1139
1141
|
readonly tableInserted: "Tabelle eingefügt";
|
|
1140
1142
|
readonly tablePropertiesChanged: "Tabellenformatierung geändert";
|
|
@@ -1777,6 +1779,7 @@ declare const CATALOGS: {
|
|
|
1777
1779
|
readonly rowDeleted: "Ligne supprimée";
|
|
1778
1780
|
readonly rowInserted: "Ligne insérée";
|
|
1779
1781
|
readonly rowPropertiesChanged: "Mise en forme de ligne modifiée";
|
|
1782
|
+
readonly runPropertiesChanged: "Mise en forme du texte modifiée";
|
|
1780
1783
|
readonly tableDeleted: "Tableau supprimé";
|
|
1781
1784
|
readonly tableInserted: "Tableau inséré";
|
|
1782
1785
|
readonly tablePropertiesChanged: "Mise en forme de tableau modifiée";
|
|
@@ -2419,6 +2422,7 @@ declare const CATALOGS: {
|
|
|
2419
2422
|
readonly rowDeleted: "Fila eliminada";
|
|
2420
2423
|
readonly rowInserted: "Fila insertada";
|
|
2421
2424
|
readonly rowPropertiesChanged: "Formato de fila cambiado";
|
|
2425
|
+
readonly runPropertiesChanged: "Formato de texto cambiado";
|
|
2422
2426
|
readonly tableDeleted: "Tabla eliminada";
|
|
2423
2427
|
readonly tableInserted: "Tabla insertada";
|
|
2424
2428
|
readonly tablePropertiesChanged: "Formato de tabla cambiado";
|
|
@@ -3061,6 +3065,7 @@ declare const CATALOGS: {
|
|
|
3061
3065
|
readonly rowDeleted: "Řádek odstraněn";
|
|
3062
3066
|
readonly rowInserted: "Řádek vložen";
|
|
3063
3067
|
readonly rowPropertiesChanged: "Formátování řádku změněno";
|
|
3068
|
+
readonly runPropertiesChanged: "Formátování textu změněno";
|
|
3064
3069
|
readonly tableDeleted: "Tabulka odstraněna";
|
|
3065
3070
|
readonly tableInserted: "Tabulka vložena";
|
|
3066
3071
|
readonly tablePropertiesChanged: "Formátování tabulky změněno";
|
|
@@ -3703,6 +3708,7 @@ declare const CATALOGS: {
|
|
|
3703
3708
|
readonly rowDeleted: "تم حذف الصف";
|
|
3704
3709
|
readonly rowInserted: "تم إدراج الصف";
|
|
3705
3710
|
readonly rowPropertiesChanged: "تم تغيير تنسيق الصف";
|
|
3711
|
+
readonly runPropertiesChanged: "تم تغيير تنسيق النص";
|
|
3706
3712
|
readonly tableDeleted: "تم حذف الجدول";
|
|
3707
3713
|
readonly tableInserted: "تم إدراج الجدول";
|
|
3708
3714
|
readonly tablePropertiesChanged: "تم تغيير تنسيق الجدول";
|
|
@@ -4345,6 +4351,7 @@ declare const CATALOGS: {
|
|
|
4345
4351
|
readonly rowDeleted: "Rida kustutatud";
|
|
4346
4352
|
readonly rowInserted: "Rida lisatud";
|
|
4347
4353
|
readonly rowPropertiesChanged: "Rea vormingut muudeti";
|
|
4354
|
+
readonly runPropertiesChanged: "Teksti vormingut muudeti";
|
|
4348
4355
|
readonly tableDeleted: "Tabel kustutatud";
|
|
4349
4356
|
readonly tableInserted: "Tabel lisatud";
|
|
4350
4357
|
readonly tablePropertiesChanged: "Tabeli vormingut muudeti";
|
|
@@ -4987,6 +4994,7 @@ declare const CATALOGS: {
|
|
|
4987
4994
|
readonly rowDeleted: "השורה נמחקה";
|
|
4988
4995
|
readonly rowInserted: "השורה נוספה";
|
|
4989
4996
|
readonly rowPropertiesChanged: "עיצוב השורה השתנה";
|
|
4997
|
+
readonly runPropertiesChanged: "עיצוב הטקסט השתנה";
|
|
4990
4998
|
readonly tableDeleted: "הטבלה נמחקה";
|
|
4991
4999
|
readonly tableInserted: "הטבלה נוספה";
|
|
4992
5000
|
readonly tablePropertiesChanged: "עיצוב הטבלה השתנה";
|
|
@@ -5629,6 +5637,7 @@ declare const CATALOGS: {
|
|
|
5629
5637
|
readonly rowDeleted: "पंक्ति हटाई गई";
|
|
5630
5638
|
readonly rowInserted: "पंक्ति सम्मिलित की गई";
|
|
5631
5639
|
readonly rowPropertiesChanged: "पंक्ति प्रारूपण बदला गया";
|
|
5640
|
+
readonly runPropertiesChanged: "पाठ स्वरूपण बदला गया";
|
|
5632
5641
|
readonly tableDeleted: "तालिका हटाई गई";
|
|
5633
5642
|
readonly tableInserted: "तालिका सम्मिलित की गई";
|
|
5634
5643
|
readonly tablePropertiesChanged: "तालिका प्रारूपण बदला गया";
|
|
@@ -6271,6 +6280,7 @@ declare const CATALOGS: {
|
|
|
6271
6280
|
readonly rowDeleted: "Sor törölve";
|
|
6272
6281
|
readonly rowInserted: "Sor beszúrva";
|
|
6273
6282
|
readonly rowPropertiesChanged: "Sorformázás megváltozott";
|
|
6283
|
+
readonly runPropertiesChanged: "Szövegformázás megváltozott";
|
|
6274
6284
|
readonly tableDeleted: "Táblázat törölve";
|
|
6275
6285
|
readonly tableInserted: "Táblázat beszúrva";
|
|
6276
6286
|
readonly tablePropertiesChanged: "Táblázatformázás megváltozott";
|
|
@@ -6913,6 +6923,7 @@ declare const CATALOGS: {
|
|
|
6913
6923
|
readonly rowDeleted: "Eilutė panaikinta";
|
|
6914
6924
|
readonly rowInserted: "Eilutė įterpta";
|
|
6915
6925
|
readonly rowPropertiesChanged: "Eilutės formatavimas pakeistas";
|
|
6926
|
+
readonly runPropertiesChanged: "Teksto formatavimas pakeistas";
|
|
6916
6927
|
readonly tableDeleted: "Lentelė panaikinta";
|
|
6917
6928
|
readonly tableInserted: "Lentelė įterpta";
|
|
6918
6929
|
readonly tablePropertiesChanged: "Lentelės formatavimas pakeistas";
|
|
@@ -7555,6 +7566,7 @@ declare const CATALOGS: {
|
|
|
7555
7566
|
readonly rowDeleted: "Rinda izdzēsta";
|
|
7556
7567
|
readonly rowInserted: "Rinda ievietota";
|
|
7557
7568
|
readonly rowPropertiesChanged: "Rindas formatējums mainīts";
|
|
7569
|
+
readonly runPropertiesChanged: "Teksta formatējums mainīts";
|
|
7558
7570
|
readonly tableDeleted: "Tabula izdzēsta";
|
|
7559
7571
|
readonly tableInserted: "Tabula ievietota";
|
|
7560
7572
|
readonly tablePropertiesChanged: "Tabulas formatējums mainīts";
|
|
@@ -8197,6 +8209,7 @@ declare const CATALOGS: {
|
|
|
8197
8209
|
readonly rowDeleted: "Usunięto wiersz";
|
|
8198
8210
|
readonly rowInserted: "Wstawiono wiersz";
|
|
8199
8211
|
readonly rowPropertiesChanged: "Zmieniono formatowanie wiersza";
|
|
8212
|
+
readonly runPropertiesChanged: "Zmieniono formatowanie tekstu";
|
|
8200
8213
|
readonly tableDeleted: "Usunięto tabelę";
|
|
8201
8214
|
readonly tableInserted: "Wstawiono tabelę";
|
|
8202
8215
|
readonly tablePropertiesChanged: "Zmieniono formatowanie tabeli";
|
|
@@ -8839,6 +8852,7 @@ declare const CATALOGS: {
|
|
|
8839
8852
|
readonly rowDeleted: "Linha excluída";
|
|
8840
8853
|
readonly rowInserted: "Linha inserida";
|
|
8841
8854
|
readonly rowPropertiesChanged: "Formatação da linha alterada";
|
|
8855
|
+
readonly runPropertiesChanged: "Formatação do texto alterada";
|
|
8842
8856
|
readonly tableDeleted: "Tabela excluída";
|
|
8843
8857
|
readonly tableInserted: "Tabela inserida";
|
|
8844
8858
|
readonly tablePropertiesChanged: "Formatação da tabela alterada";
|
|
@@ -9481,6 +9495,7 @@ declare const CATALOGS: {
|
|
|
9481
9495
|
readonly rowDeleted: "Riadok odstránený";
|
|
9482
9496
|
readonly rowInserted: "Riadok vložený";
|
|
9483
9497
|
readonly rowPropertiesChanged: "Formátovanie riadka zmenené";
|
|
9498
|
+
readonly runPropertiesChanged: "Formátovanie textu zmenené";
|
|
9484
9499
|
readonly tableDeleted: "Tabuľka odstránená";
|
|
9485
9500
|
readonly tableInserted: "Tabuľka vložená";
|
|
9486
9501
|
readonly tablePropertiesChanged: "Formátovanie tabuľky zmenené";
|
|
@@ -10123,6 +10138,7 @@ declare const CATALOGS: {
|
|
|
10123
10138
|
readonly rowDeleted: "Satır silindi";
|
|
10124
10139
|
readonly rowInserted: "Satır eklendi";
|
|
10125
10140
|
readonly rowPropertiesChanged: "Satır biçimlendirmesi değiştirildi";
|
|
10141
|
+
readonly runPropertiesChanged: "Metin biçimlendirmesi değiştirildi";
|
|
10126
10142
|
readonly tableDeleted: "Tablo silindi";
|
|
10127
10143
|
readonly tableInserted: "Tablo eklendi";
|
|
10128
10144
|
readonly tablePropertiesChanged: "Tablo biçimlendirmesi değiştirildi";
|
|
@@ -10765,6 +10781,7 @@ declare const CATALOGS: {
|
|
|
10765
10781
|
readonly rowDeleted: "已删除行";
|
|
10766
10782
|
readonly rowInserted: "已插入行";
|
|
10767
10783
|
readonly rowPropertiesChanged: "行格式已更改";
|
|
10784
|
+
readonly runPropertiesChanged: "文本格式已更改";
|
|
10768
10785
|
readonly tableDeleted: "已删除表格";
|
|
10769
10786
|
readonly tableInserted: "已插入表格";
|
|
10770
10787
|
readonly tablePropertiesChanged: "表格格式已更改";
|
|
@@ -492,6 +492,7 @@ const CATALOGS = {
|
|
|
492
492
|
"rowDeleted": "Row deleted",
|
|
493
493
|
"rowInserted": "Row inserted",
|
|
494
494
|
"rowPropertiesChanged": "Row formatting changed",
|
|
495
|
+
"runPropertiesChanged": "Text formatting changed",
|
|
495
496
|
"tableDeleted": "Table deleted",
|
|
496
497
|
"tableInserted": "Table inserted",
|
|
497
498
|
"tablePropertiesChanged": "Table formatting changed"
|
|
@@ -1132,6 +1133,7 @@ const CATALOGS = {
|
|
|
1132
1133
|
"rowDeleted": "Zeile gelöscht",
|
|
1133
1134
|
"rowInserted": "Zeile eingefügt",
|
|
1134
1135
|
"rowPropertiesChanged": "Zeilenformatierung geändert",
|
|
1136
|
+
"runPropertiesChanged": "Textformatierung geändert",
|
|
1135
1137
|
"tableDeleted": "Tabelle gelöscht",
|
|
1136
1138
|
"tableInserted": "Tabelle eingefügt",
|
|
1137
1139
|
"tablePropertiesChanged": "Tabellenformatierung geändert"
|
|
@@ -1772,6 +1774,7 @@ const CATALOGS = {
|
|
|
1772
1774
|
"rowDeleted": "Ligne supprimée",
|
|
1773
1775
|
"rowInserted": "Ligne insérée",
|
|
1774
1776
|
"rowPropertiesChanged": "Mise en forme de ligne modifiée",
|
|
1777
|
+
"runPropertiesChanged": "Mise en forme du texte modifiée",
|
|
1775
1778
|
"tableDeleted": "Tableau supprimé",
|
|
1776
1779
|
"tableInserted": "Tableau inséré",
|
|
1777
1780
|
"tablePropertiesChanged": "Mise en forme de tableau modifiée"
|
|
@@ -2412,6 +2415,7 @@ const CATALOGS = {
|
|
|
2412
2415
|
"rowDeleted": "Fila eliminada",
|
|
2413
2416
|
"rowInserted": "Fila insertada",
|
|
2414
2417
|
"rowPropertiesChanged": "Formato de fila cambiado",
|
|
2418
|
+
"runPropertiesChanged": "Formato de texto cambiado",
|
|
2415
2419
|
"tableDeleted": "Tabla eliminada",
|
|
2416
2420
|
"tableInserted": "Tabla insertada",
|
|
2417
2421
|
"tablePropertiesChanged": "Formato de tabla cambiado"
|
|
@@ -3052,6 +3056,7 @@ const CATALOGS = {
|
|
|
3052
3056
|
"rowDeleted": "Řádek odstraněn",
|
|
3053
3057
|
"rowInserted": "Řádek vložen",
|
|
3054
3058
|
"rowPropertiesChanged": "Formátování řádku změněno",
|
|
3059
|
+
"runPropertiesChanged": "Formátování textu změněno",
|
|
3055
3060
|
"tableDeleted": "Tabulka odstraněna",
|
|
3056
3061
|
"tableInserted": "Tabulka vložena",
|
|
3057
3062
|
"tablePropertiesChanged": "Formátování tabulky změněno"
|
|
@@ -3692,6 +3697,7 @@ const CATALOGS = {
|
|
|
3692
3697
|
"rowDeleted": "تم حذف الصف",
|
|
3693
3698
|
"rowInserted": "تم إدراج الصف",
|
|
3694
3699
|
"rowPropertiesChanged": "تم تغيير تنسيق الصف",
|
|
3700
|
+
"runPropertiesChanged": "تم تغيير تنسيق النص",
|
|
3695
3701
|
"tableDeleted": "تم حذف الجدول",
|
|
3696
3702
|
"tableInserted": "تم إدراج الجدول",
|
|
3697
3703
|
"tablePropertiesChanged": "تم تغيير تنسيق الجدول"
|
|
@@ -4332,6 +4338,7 @@ const CATALOGS = {
|
|
|
4332
4338
|
"rowDeleted": "Rida kustutatud",
|
|
4333
4339
|
"rowInserted": "Rida lisatud",
|
|
4334
4340
|
"rowPropertiesChanged": "Rea vormingut muudeti",
|
|
4341
|
+
"runPropertiesChanged": "Teksti vormingut muudeti",
|
|
4335
4342
|
"tableDeleted": "Tabel kustutatud",
|
|
4336
4343
|
"tableInserted": "Tabel lisatud",
|
|
4337
4344
|
"tablePropertiesChanged": "Tabeli vormingut muudeti"
|
|
@@ -4972,6 +4979,7 @@ const CATALOGS = {
|
|
|
4972
4979
|
"rowDeleted": "השורה נמחקה",
|
|
4973
4980
|
"rowInserted": "השורה נוספה",
|
|
4974
4981
|
"rowPropertiesChanged": "עיצוב השורה השתנה",
|
|
4982
|
+
"runPropertiesChanged": "עיצוב הטקסט השתנה",
|
|
4975
4983
|
"tableDeleted": "הטבלה נמחקה",
|
|
4976
4984
|
"tableInserted": "הטבלה נוספה",
|
|
4977
4985
|
"tablePropertiesChanged": "עיצוב הטבלה השתנה"
|
|
@@ -5612,6 +5620,7 @@ const CATALOGS = {
|
|
|
5612
5620
|
"rowDeleted": "पंक्ति हटाई गई",
|
|
5613
5621
|
"rowInserted": "पंक्ति सम्मिलित की गई",
|
|
5614
5622
|
"rowPropertiesChanged": "पंक्ति प्रारूपण बदला गया",
|
|
5623
|
+
"runPropertiesChanged": "पाठ स्वरूपण बदला गया",
|
|
5615
5624
|
"tableDeleted": "तालिका हटाई गई",
|
|
5616
5625
|
"tableInserted": "तालिका सम्मिलित की गई",
|
|
5617
5626
|
"tablePropertiesChanged": "तालिका प्रारूपण बदला गया"
|
|
@@ -6252,6 +6261,7 @@ const CATALOGS = {
|
|
|
6252
6261
|
"rowDeleted": "Sor törölve",
|
|
6253
6262
|
"rowInserted": "Sor beszúrva",
|
|
6254
6263
|
"rowPropertiesChanged": "Sorformázás megváltozott",
|
|
6264
|
+
"runPropertiesChanged": "Szövegformázás megváltozott",
|
|
6255
6265
|
"tableDeleted": "Táblázat törölve",
|
|
6256
6266
|
"tableInserted": "Táblázat beszúrva",
|
|
6257
6267
|
"tablePropertiesChanged": "Táblázatformázás megváltozott"
|
|
@@ -6892,6 +6902,7 @@ const CATALOGS = {
|
|
|
6892
6902
|
"rowDeleted": "Eilutė panaikinta",
|
|
6893
6903
|
"rowInserted": "Eilutė įterpta",
|
|
6894
6904
|
"rowPropertiesChanged": "Eilutės formatavimas pakeistas",
|
|
6905
|
+
"runPropertiesChanged": "Teksto formatavimas pakeistas",
|
|
6895
6906
|
"tableDeleted": "Lentelė panaikinta",
|
|
6896
6907
|
"tableInserted": "Lentelė įterpta",
|
|
6897
6908
|
"tablePropertiesChanged": "Lentelės formatavimas pakeistas"
|
|
@@ -7532,6 +7543,7 @@ const CATALOGS = {
|
|
|
7532
7543
|
"rowDeleted": "Rinda izdzēsta",
|
|
7533
7544
|
"rowInserted": "Rinda ievietota",
|
|
7534
7545
|
"rowPropertiesChanged": "Rindas formatējums mainīts",
|
|
7546
|
+
"runPropertiesChanged": "Teksta formatējums mainīts",
|
|
7535
7547
|
"tableDeleted": "Tabula izdzēsta",
|
|
7536
7548
|
"tableInserted": "Tabula ievietota",
|
|
7537
7549
|
"tablePropertiesChanged": "Tabulas formatējums mainīts"
|
|
@@ -8172,6 +8184,7 @@ const CATALOGS = {
|
|
|
8172
8184
|
"rowDeleted": "Usunięto wiersz",
|
|
8173
8185
|
"rowInserted": "Wstawiono wiersz",
|
|
8174
8186
|
"rowPropertiesChanged": "Zmieniono formatowanie wiersza",
|
|
8187
|
+
"runPropertiesChanged": "Zmieniono formatowanie tekstu",
|
|
8175
8188
|
"tableDeleted": "Usunięto tabelę",
|
|
8176
8189
|
"tableInserted": "Wstawiono tabelę",
|
|
8177
8190
|
"tablePropertiesChanged": "Zmieniono formatowanie tabeli"
|
|
@@ -8812,6 +8825,7 @@ const CATALOGS = {
|
|
|
8812
8825
|
"rowDeleted": "Linha excluída",
|
|
8813
8826
|
"rowInserted": "Linha inserida",
|
|
8814
8827
|
"rowPropertiesChanged": "Formatação da linha alterada",
|
|
8828
|
+
"runPropertiesChanged": "Formatação do texto alterada",
|
|
8815
8829
|
"tableDeleted": "Tabela excluída",
|
|
8816
8830
|
"tableInserted": "Tabela inserida",
|
|
8817
8831
|
"tablePropertiesChanged": "Formatação da tabela alterada"
|
|
@@ -9452,6 +9466,7 @@ const CATALOGS = {
|
|
|
9452
9466
|
"rowDeleted": "Riadok odstránený",
|
|
9453
9467
|
"rowInserted": "Riadok vložený",
|
|
9454
9468
|
"rowPropertiesChanged": "Formátovanie riadka zmenené",
|
|
9469
|
+
"runPropertiesChanged": "Formátovanie textu zmenené",
|
|
9455
9470
|
"tableDeleted": "Tabuľka odstránená",
|
|
9456
9471
|
"tableInserted": "Tabuľka vložená",
|
|
9457
9472
|
"tablePropertiesChanged": "Formátovanie tabuľky zmenené"
|
|
@@ -10092,6 +10107,7 @@ const CATALOGS = {
|
|
|
10092
10107
|
"rowDeleted": "Satır silindi",
|
|
10093
10108
|
"rowInserted": "Satır eklendi",
|
|
10094
10109
|
"rowPropertiesChanged": "Satır biçimlendirmesi değiştirildi",
|
|
10110
|
+
"runPropertiesChanged": "Metin biçimlendirmesi değiştirildi",
|
|
10095
10111
|
"tableDeleted": "Tablo silindi",
|
|
10096
10112
|
"tableInserted": "Tablo eklendi",
|
|
10097
10113
|
"tablePropertiesChanged": "Tablo biçimlendirmesi değiştirildi"
|
|
@@ -10732,6 +10748,7 @@ const CATALOGS = {
|
|
|
10732
10748
|
"rowDeleted": "已删除行",
|
|
10733
10749
|
"rowInserted": "已插入行",
|
|
10734
10750
|
"rowPropertiesChanged": "行格式已更改",
|
|
10751
|
+
"runPropertiesChanged": "文本格式已更改",
|
|
10735
10752
|
"tableDeleted": "已删除表格",
|
|
10736
10753
|
"tableInserted": "已插入表格",
|
|
10737
10754
|
"tablePropertiesChanged": "表格格式已更改"
|
|
@@ -492,6 +492,7 @@ type Messages = {
|
|
|
492
492
|
"rowDeleted": "Row deleted";
|
|
493
493
|
"rowInserted": "Row inserted";
|
|
494
494
|
"rowPropertiesChanged": "Row formatting changed";
|
|
495
|
+
"runPropertiesChanged": "Text formatting changed";
|
|
495
496
|
"tableDeleted": "Table deleted";
|
|
496
497
|
"tableInserted": "Table inserted";
|
|
497
498
|
"tablePropertiesChanged": "Table formatting changed";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
|
|
2
2
|
import { createFolioAIEditSnapshot, hashFolioAIBlockText, normalizeFolioAIBlockText } from "./ai-edits/snapshot.js";
|
|
3
|
+
import { getGoogleFontsEnabled, setGoogleFontsEnabled } from "./utils/fontResolver.js";
|
|
3
4
|
import { diffWordSegments } from "./ai-edits/word-diff.js";
|
|
4
5
|
import { applyFolioAIEditOperations } from "./ai-edits/apply.js";
|
|
5
6
|
import { FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, InvalidFolioDocumentOperationBatchError, UnsupportedFolioDocumentOperationVersionError, applyFolioDocumentOperations, assertSupportedFolioDocumentOperationVersion, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, isFolioDocumentOperationModeSupported, isSupportedFolioDocumentOperationVersion, parseFolioDocumentOperationBatch } from "./document-operations.js";
|
|
@@ -13,7 +14,6 @@ import { DEFAULT_AI_SUGGESTION_PRESETS } from "./ai-suggestions/types.js";
|
|
|
13
14
|
import { buildPositionalText } from "./ai-suggestions/text-positions.js";
|
|
14
15
|
import { isSuggestionStale, resolveSuggestionAnchor } from "./ai-suggestions/conflict.js";
|
|
15
16
|
import { applySuggestions } from "./ai-suggestions/apply.js";
|
|
16
|
-
import { getGoogleFontsEnabled, setGoogleFontsEnabled } from "./utils/fontResolver.js";
|
|
17
17
|
import { setAISuggestionsMeta, setFocusedSuggestionMeta } from "./prosemirror/plugins/aiSuggestionDecorations.js";
|
|
18
18
|
import { scrollFolioPositionIntoView } from "./paged-layout/scrollToPmPosition.js";
|
|
19
19
|
import { getFolioCaretViewportRect, getFolioSelectionViewportRect } from "./paged-layout/selectionViewportRect.js";
|
|
@@ -10,6 +10,7 @@ type ConvertFootnoteOptions = {
|
|
|
10
10
|
measureBlocks?: MeasureBlocksFn; /** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
|
|
11
11
|
defaultTabStopTwips?: number;
|
|
12
12
|
lineBreakRules?: ToFlowBlocksOptions["lineBreakRules"];
|
|
13
|
+
justificationCompatibility?: ToFlowBlocksOptions["justificationCompatibility"];
|
|
13
14
|
automaticHyphenation?: ToFlowBlocksOptions["automaticHyphenation"];
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { footnoteToProseDoc } from "../../prosemirror/conversion/toProseDoc.js";
|
|
2
2
|
import { DEFAULT_TEXTBOX_MARGINS, FOOTNOTE_ENTRY_MARGIN_BOTTOM, FOOTNOTE_FALLBACK_LINE_HEIGHT, FOOTNOTE_SEPARATOR_HEIGHT } from "../../layout-engine/types.js";
|
|
3
3
|
import { measureParagraph } from "../../layout-engine/measure/measureParagraph.js";
|
|
4
|
+
import { layoutTextBoxContent } from "../../layout-engine/measure/textBoxParagraphLayout.js";
|
|
4
5
|
import { toFlowBlocks } from "./toFlowBlocks.js";
|
|
5
6
|
//#region src/layout-bridge/convert/footnoteLayout.ts
|
|
6
7
|
/** Default footnote font size in points */
|
|
@@ -90,39 +91,12 @@ function remapNoteMarkerText(blocks, maps) {
|
|
|
90
91
|
}
|
|
91
92
|
function remapNoteMarkerBlock(block, maps) {
|
|
92
93
|
if (block.kind === "paragraph") return remapNoteMarkerParagraph(block, maps);
|
|
93
|
-
if (block.kind === "table")
|
|
94
|
-
let tableChanged = false;
|
|
95
|
-
const rows = block.rows.map((row) => {
|
|
96
|
-
let rowChanged = false;
|
|
97
|
-
const cells = row.cells.map((cell) => {
|
|
98
|
-
let cellChanged = false;
|
|
99
|
-
const cellBlocks = cell.blocks.map((cellBlock) => {
|
|
100
|
-
const remapped = remapNoteMarkerBlock(cellBlock, maps);
|
|
101
|
-
cellChanged ||= remapped !== cellBlock;
|
|
102
|
-
return remapped;
|
|
103
|
-
});
|
|
104
|
-
return cellChanged ? {
|
|
105
|
-
...cell,
|
|
106
|
-
blocks: cellBlocks
|
|
107
|
-
} : cell;
|
|
108
|
-
});
|
|
109
|
-
rowChanged = cells.some((cell, index) => cell !== row.cells[index]);
|
|
110
|
-
tableChanged ||= rowChanged;
|
|
111
|
-
return rowChanged ? {
|
|
112
|
-
...row,
|
|
113
|
-
cells
|
|
114
|
-
} : row;
|
|
115
|
-
});
|
|
116
|
-
return tableChanged ? {
|
|
117
|
-
...block,
|
|
118
|
-
rows
|
|
119
|
-
} : block;
|
|
120
|
-
}
|
|
94
|
+
if (block.kind === "table") return remapNoteMarkerTable(block, maps);
|
|
121
95
|
if (block.kind === "textBox") {
|
|
122
96
|
let boxChanged = false;
|
|
123
|
-
const content = block.content.map((
|
|
124
|
-
const remapped = remapNoteMarkerParagraph(
|
|
125
|
-
boxChanged ||= remapped !==
|
|
97
|
+
const content = block.content.map((contentBlock) => {
|
|
98
|
+
const remapped = contentBlock.kind === "table" ? remapNoteMarkerTable(contentBlock, maps) : remapNoteMarkerParagraph(contentBlock, maps);
|
|
99
|
+
boxChanged ||= remapped !== contentBlock;
|
|
126
100
|
return remapped;
|
|
127
101
|
});
|
|
128
102
|
return boxChanged ? {
|
|
@@ -132,6 +106,33 @@ function remapNoteMarkerBlock(block, maps) {
|
|
|
132
106
|
}
|
|
133
107
|
return block;
|
|
134
108
|
}
|
|
109
|
+
function remapNoteMarkerTable(block, maps) {
|
|
110
|
+
let tableChanged = false;
|
|
111
|
+
const rows = block.rows.map((row) => {
|
|
112
|
+
const cells = row.cells.map((cell) => {
|
|
113
|
+
let cellChanged = false;
|
|
114
|
+
const cellBlocks = cell.blocks.map((cellBlock) => {
|
|
115
|
+
const remapped = remapNoteMarkerBlock(cellBlock, maps);
|
|
116
|
+
cellChanged ||= remapped !== cellBlock;
|
|
117
|
+
return remapped;
|
|
118
|
+
});
|
|
119
|
+
return cellChanged ? {
|
|
120
|
+
...cell,
|
|
121
|
+
blocks: cellBlocks
|
|
122
|
+
} : cell;
|
|
123
|
+
});
|
|
124
|
+
const rowChanged = cells.some((cell, index) => cell !== row.cells[index]);
|
|
125
|
+
tableChanged ||= rowChanged;
|
|
126
|
+
return rowChanged ? {
|
|
127
|
+
...row,
|
|
128
|
+
cells
|
|
129
|
+
} : row;
|
|
130
|
+
});
|
|
131
|
+
return tableChanged ? {
|
|
132
|
+
...block,
|
|
133
|
+
rows
|
|
134
|
+
} : block;
|
|
135
|
+
}
|
|
135
136
|
function remapNoteMarkerParagraph(block, maps) {
|
|
136
137
|
let changed = false;
|
|
137
138
|
const runs = block.runs.map((run) => {
|
|
@@ -197,6 +198,7 @@ function convertFootnoteToContent(footnote, displayNumber, contentWidth, options
|
|
|
197
198
|
if (options.theme !== void 0) flowOptions.theme = options.theme;
|
|
198
199
|
if (options.defaultTabStopTwips !== void 0) flowOptions.defaultTabStopTwips = options.defaultTabStopTwips;
|
|
199
200
|
if (options.lineBreakRules) flowOptions.lineBreakRules = options.lineBreakRules;
|
|
201
|
+
if (options.justificationCompatibility) flowOptions.justificationCompatibility = options.justificationCompatibility;
|
|
200
202
|
if (options.automaticHyphenation) flowOptions.automaticHyphenation = options.automaticHyphenation;
|
|
201
203
|
const blocks = applyFootnotePresentation(toFlowBlocks(pmDoc, flowOptions), displayNumber);
|
|
202
204
|
const measures = options.measureBlocks ? options.measureBlocks(blocks, contentWidth) : measureFootnoteBlocks(blocks, contentWidth);
|
|
@@ -228,9 +230,11 @@ function measureFootnoteBlock(block, contentWidth) {
|
|
|
228
230
|
const margins = block.margins ?? DEFAULT_TEXTBOX_MARGINS;
|
|
229
231
|
const width = block.width;
|
|
230
232
|
const innerWidth = Math.max(1, width - margins.left - margins.right);
|
|
231
|
-
const innerMeasures = block.content.map((
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
const innerMeasures = block.content.map((contentBlock) => {
|
|
234
|
+
if (contentBlock.kind === "table") return measureFootnoteTable(contentBlock, innerWidth);
|
|
235
|
+
return measureParagraph(contentBlock, innerWidth);
|
|
236
|
+
});
|
|
237
|
+
const contentHeight = layoutTextBoxContent(block.content, innerMeasures).totalHeight;
|
|
234
238
|
return {
|
|
235
239
|
kind: "textBox",
|
|
236
240
|
width,
|
|
@@ -373,7 +377,15 @@ function createFootnoteNumberRun(displayNumber, paragraph) {
|
|
|
373
377
|
}
|
|
374
378
|
function applyFootnoteBlockPresentation(block) {
|
|
375
379
|
if (block.kind === "paragraph") return applyFootnoteParagraphPresentation(block);
|
|
376
|
-
if (block.kind === "table") return
|
|
380
|
+
if (block.kind === "table") return applyFootnoteTablePresentation(block);
|
|
381
|
+
if (block.kind === "textBox") return {
|
|
382
|
+
...block,
|
|
383
|
+
content: block.content.map((contentBlock) => contentBlock.kind === "table" ? applyFootnoteTablePresentation(contentBlock) : applyFootnoteParagraphPresentation(contentBlock))
|
|
384
|
+
};
|
|
385
|
+
return block;
|
|
386
|
+
}
|
|
387
|
+
function applyFootnoteTablePresentation(block) {
|
|
388
|
+
return {
|
|
377
389
|
...block,
|
|
378
390
|
rows: block.rows.map((row) => ({
|
|
379
391
|
...row,
|
|
@@ -383,11 +395,6 @@ function applyFootnoteBlockPresentation(block) {
|
|
|
383
395
|
}))
|
|
384
396
|
}))
|
|
385
397
|
};
|
|
386
|
-
if (block.kind === "textBox") return {
|
|
387
|
-
...block,
|
|
388
|
-
content: block.content.map(applyFootnoteParagraphPresentation)
|
|
389
|
-
};
|
|
390
|
-
return block;
|
|
391
398
|
}
|
|
392
399
|
function applyFootnoteParagraphPresentation(block) {
|
|
393
400
|
return {
|
|
@@ -37,6 +37,7 @@ type ConvertHeaderFooterOptions = {
|
|
|
37
37
|
measureBlocks: MeasureBlocksFn; /** Document-wide `w:defaultTabStop` in twips — forwarded to toFlowBlocks. */
|
|
38
38
|
defaultTabStopTwips?: number;
|
|
39
39
|
lineBreakRules?: ToFlowBlocksOptions["lineBreakRules"];
|
|
40
|
+
justificationCompatibility?: ToFlowBlocksOptions["justificationCompatibility"];
|
|
40
41
|
automaticHyphenation?: ToFlowBlocksOptions["automaticHyphenation"];
|
|
41
42
|
/**
|
|
42
43
|
* Relationship id of the source HF part. Stamped onto the returned
|
|
@@ -312,6 +312,7 @@ function convertHeaderFooterToContent(headerFooter, contentWidth, metrics, optio
|
|
|
312
312
|
if (options.theme !== void 0) flowOptions.theme = options.theme;
|
|
313
313
|
if (options.defaultTabStopTwips !== void 0) flowOptions.defaultTabStopTwips = options.defaultTabStopTwips;
|
|
314
314
|
if (options.lineBreakRules) flowOptions.lineBreakRules = options.lineBreakRules;
|
|
315
|
+
if (options.justificationCompatibility) flowOptions.justificationCompatibility = options.justificationCompatibility;
|
|
315
316
|
if (options.automaticHyphenation) flowOptions.automaticHyphenation = options.automaticHyphenation;
|
|
316
317
|
return finalizeHeaderFooterContent(toFlowBlocks(pmDoc, flowOptions), contentWidth, metrics, options);
|
|
317
318
|
}
|
|
@@ -332,6 +333,7 @@ function convertHeaderFooterPmDocToContent(pmDoc, contentWidth, metrics, options
|
|
|
332
333
|
if (options.theme !== void 0) flowOptions.theme = options.theme;
|
|
333
334
|
if (options.defaultTabStopTwips !== void 0) flowOptions.defaultTabStopTwips = options.defaultTabStopTwips;
|
|
334
335
|
if (options.lineBreakRules) flowOptions.lineBreakRules = options.lineBreakRules;
|
|
336
|
+
if (options.justificationCompatibility) flowOptions.justificationCompatibility = options.justificationCompatibility;
|
|
335
337
|
if (options.automaticHyphenation) flowOptions.automaticHyphenation = options.automaticHyphenation;
|
|
336
338
|
return finalizeHeaderFooterContent(toFlowBlocks(pmDoc, flowOptions), contentWidth, metrics, options);
|
|
337
339
|
}
|
|
@@ -403,6 +405,7 @@ function blockSig(b) {
|
|
|
403
405
|
for (const r of b.runs) if (r.kind === "text") text += `T:${r.text}|${serializeRunFmt(r)};`;
|
|
404
406
|
else if (r.kind === "tab") text += `\\t|${serializeRunFmt(r)};`;
|
|
405
407
|
else if (r.kind === "lineBreak") text += "\\n;";
|
|
408
|
+
else if (r.kind === "renderedPageBreak") text += "R;";
|
|
406
409
|
else if (r.kind === "image") text += `[i${r.width}x${r.height}|${r.src}|${r.transform ?? ""}|${r.wrapType ?? ""}];`;
|
|
407
410
|
else if (r.kind === "math") text += `M:${r.display}|${r.ommlXml};`;
|
|
408
411
|
else text += `F:${r.fieldType}|${serializeRunFmt(r)};`;
|
|
@@ -57,9 +57,9 @@ function transformTable(block, entries, mode) {
|
|
|
57
57
|
function transformTextBox(block, entries, mode) {
|
|
58
58
|
let changed = false;
|
|
59
59
|
const content = [];
|
|
60
|
-
for (const
|
|
61
|
-
const transformed = transformParagraph(
|
|
62
|
-
changed ||= transformed !==
|
|
60
|
+
for (const contentBlock of block.content) {
|
|
61
|
+
const transformed = contentBlock.kind === "table" ? transformTable(contentBlock, entries, mode) : transformParagraph(contentBlock, entries, mode);
|
|
62
|
+
changed ||= transformed !== contentBlock;
|
|
63
63
|
content.push(transformed);
|
|
64
64
|
}
|
|
65
65
|
return changed ? {
|
|
@@ -42,8 +42,10 @@ type ToFlowBlocksOptions = {
|
|
|
42
42
|
characters: string;
|
|
43
43
|
};
|
|
44
44
|
useLegacyEthiopicAmharicRules?: boolean;
|
|
45
|
-
}; /** Document-
|
|
46
|
-
|
|
45
|
+
}; /** Document-generation policy for justified line fitting. */
|
|
46
|
+
justificationCompatibility?: NonNullable<ParagraphAttrs["justificationCompatibility"]>; /** Document-wide automatic hyphenation policy. */
|
|
47
|
+
automaticHyphenation?: NonNullable<ParagraphAttrs["automaticHyphenation"]>; /** Line pitch for the final body section, whose properties live outside the PM body. */
|
|
48
|
+
finalSectionDocumentGridLinePitchTwips?: number;
|
|
47
49
|
};
|
|
48
50
|
declare function formatCounter(value: number, format: document_d_exports.NumberFormat | undefined): string;
|
|
49
51
|
declare function resolveListTemplate(template: string, counters: number[], levelFormats: document_d_exports.NumberFormat[] | undefined, forceDecimal?: boolean): string;
|