@stll/folio-core 0.15.1 → 0.15.3

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 (156) hide show
  1. package/dist/ai-edits/apply.js +2 -2
  2. package/dist/ai-edits/blockRange.js +1 -1
  3. package/dist/ai-edits/headless.js +9 -9
  4. package/dist/ai-edits/index.js +5 -5
  5. package/dist/ai-edits/read.js +1 -1
  6. package/dist/ai-edits/table-cell-mutations.js +2 -2
  7. package/dist/compat/eigenpal.js +19 -19
  8. package/dist/content-controls/mutateContentControls.js +1 -1
  9. package/dist/controller/contentControlWidgetController.js +1 -1
  10. package/dist/controller/headerFooterEditorManager.js +5 -5
  11. package/dist/controller/hiddenEditorManager.js +5 -5
  12. package/dist/controller/layoutPipeline.js +10 -10
  13. package/dist/controller/noteEditorManager.js +5 -5
  14. package/dist/docx/blockContentParser.js +4 -4
  15. package/dist/docx/commentParser.js +30 -2
  16. package/dist/docx/documentParser.js +27 -3
  17. package/dist/docx/drawingIdNormalization.d.ts +5 -0
  18. package/dist/docx/drawingIdNormalization.js +35 -0
  19. package/dist/docx/drawingUtils.d.ts +1 -1
  20. package/dist/docx/drawingUtils.js +111 -27
  21. package/dist/docx/encryption/agileDecryption.js +1 -1
  22. package/dist/docx/encryption/encryptionInfo.js +1 -1
  23. package/dist/docx/encryption/index.js +1 -1
  24. package/dist/docx/encryption/openEncryptedDocx.js +3 -3
  25. package/dist/docx/fieldParser.js +1 -1
  26. package/dist/docx/footnoteParser.js +2 -2
  27. package/dist/docx/groupDrawingParser.js +1 -1
  28. package/dist/docx/headerFooterParser.js +3 -3
  29. package/dist/docx/headerFooterVerbatim.d.ts +2 -1
  30. package/dist/docx/headerFooterVerbatim.js +6 -1
  31. package/dist/docx/hyperlinkParser.js +1 -1
  32. package/dist/docx/imageParser.js +3 -3
  33. package/dist/docx/index.js +1 -1
  34. package/dist/docx/paragraphParser.js +8 -5
  35. package/dist/docx/paragraphTextBoxEnrichment.js +4 -4
  36. package/dist/docx/paragraphTraversal.d.ts +5 -3
  37. package/dist/docx/paragraphTraversal.js +20 -13
  38. package/dist/docx/parser.js +17 -7
  39. package/dist/docx/parserEnums.d.ts +4 -1
  40. package/dist/docx/parserEnums.js +5 -2
  41. package/dist/docx/rezip.js +9 -9
  42. package/dist/docx/runConsolidator.js +0 -1
  43. package/dist/docx/runParser.js +22 -6
  44. package/dist/docx/sectionParser.js +2 -2
  45. package/dist/docx/selectiveSave.js +7 -7
  46. package/dist/docx/serializer/commentSerializer.js +13 -8
  47. package/dist/docx/serializer/documentSerializer.js +7 -3
  48. package/dist/docx/serializer/headerFooterSerializer.js +3 -3
  49. package/dist/docx/serializer/noteSerializer.js +2 -2
  50. package/dist/docx/serializer/numberingSerializer.js +1 -1
  51. package/dist/docx/serializer/paragraphSerializer.js +2 -2
  52. package/dist/docx/serializer/runSerializer.js +19 -13
  53. package/dist/docx/serializer/sectionPropertiesSerializer.js +4 -3
  54. package/dist/docx/serializer/stylesSerializer.js +3 -3
  55. package/dist/docx/serializer/tableSerializer.js +1 -1
  56. package/dist/docx/server/docxToMarkdown.js +1 -1
  57. package/dist/docx/server/evaluateDocxXmlPatchProposal.js +1 -1
  58. package/dist/docx/server/extractDocxText.js +1 -1
  59. package/dist/docx/server/validateDocxConformance.js +3 -3
  60. package/dist/docx/shapeParser.js +5 -113
  61. package/dist/docx/styleParser.js +3 -3
  62. package/dist/docx/tableParser.js +11 -9
  63. package/dist/docx/textBoxParser.js +2 -2
  64. package/dist/docx/vmlImageParser.js +2 -2
  65. package/dist/fonts/embeddedFonts.js +2 -2
  66. package/dist/index.js +18 -18
  67. package/dist/layout-bridge/convert/footnoteLayout.js +2 -2
  68. package/dist/layout-bridge/convert/headerFooterLayout.js +2 -2
  69. package/dist/layout-bridge/convert/paragraphFrames.js +2 -2
  70. package/dist/layout-bridge/convert/toFlowBlocks.js +10 -10
  71. package/dist/layout-bridge/engine/clickToPosition.js +2 -2
  72. package/dist/layout-bridge/engine/hitTest.js +1 -1
  73. package/dist/layout-bridge/engine/measuring/index.js +6 -6
  74. package/dist/layout-bridge/engine/selectionRects.js +5 -5
  75. package/dist/layout-engine/index.js +6 -6
  76. package/dist/layout-engine/measure/cache.js +2 -2
  77. package/dist/layout-engine/measure/index.js +6 -6
  78. package/dist/layout-engine/measure/lineBreaks.js +1 -1
  79. package/dist/layout-engine/measure/listMarkerWidth.js +1 -1
  80. package/dist/layout-engine/measure/measureBlocks.js +7 -7
  81. package/dist/layout-engine/measure/measureContainer.js +3 -3
  82. package/dist/layout-engine/measure/measureHelpers.js +1 -1
  83. package/dist/layout-engine/measure/measureParagraph.js +7 -7
  84. package/dist/layout-engine/measure/tableCellFlow.js +1 -1
  85. package/dist/layout-engine/paginator.js +1 -1
  86. package/dist/layout-engine/tableRowBreak.js +2 -2
  87. package/dist/layout-painter/index.js +5 -5
  88. package/dist/layout-painter/registry/modules/textBox.js +1 -1
  89. package/dist/layout-painter/renderImage.js +1 -1
  90. package/dist/layout-painter/renderPage.js +7 -7
  91. package/dist/layout-painter/renderParagraph.js +13 -13
  92. package/dist/layout-painter/renderTable.js +6 -6
  93. package/dist/layout-painter/renderTextBox.js +1 -1
  94. package/dist/managers/DocumentLoaderManager.js +3 -3
  95. package/dist/managers/TableSelectionManager.js +1 -1
  96. package/dist/managers/editorShortcuts.js +1 -1
  97. package/dist/markdown/fromMarkdown.js +1 -1
  98. package/dist/markdown/index.js +1 -1
  99. package/dist/markdown/renderRuns.js +1 -1
  100. package/dist/markdown/renderTable.js +1 -1
  101. package/dist/model.d.ts +3 -3
  102. package/dist/model.js +3 -3
  103. package/dist/prosemirror/attrs/index.d.ts +4 -2
  104. package/dist/prosemirror/attrs/index.js +17 -2
  105. package/dist/prosemirror/commands/comments.js +3 -3
  106. package/dist/prosemirror/commands/contentControls.js +1 -1
  107. package/dist/prosemirror/commands/contentControlsBlockFill.js +1 -1
  108. package/dist/prosemirror/commands/formatting.js +1 -1
  109. package/dist/prosemirror/commands/hyperlink.js +1 -1
  110. package/dist/prosemirror/commands/image.js +2 -2
  111. package/dist/prosemirror/commands/index.js +6 -6
  112. package/dist/prosemirror/commands/propertyChangeScope.js +1 -1
  113. package/dist/prosemirror/commands/tableCellMergeResolution.js +1 -1
  114. package/dist/prosemirror/commentOps.js +1 -1
  115. package/dist/prosemirror/conversion/fromProseDoc.js +13 -9
  116. package/dist/prosemirror/conversion/index.js +1 -1
  117. package/dist/prosemirror/conversion/toProseDoc.js +9 -9
  118. package/dist/prosemirror/extensions/StarterKit.js +4 -4
  119. package/dist/prosemirror/extensions/core/ParagraphExtension.js +4 -4
  120. package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.js +2 -2
  121. package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +3 -3
  122. package/dist/prosemirror/extensions/features/BidiShortcutExtension.js +2 -2
  123. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.js +1 -1
  124. package/dist/prosemirror/extensions/features/ImagePasteExtension.js +2 -2
  125. package/dist/prosemirror/extensions/features/ListExtension.js +3 -3
  126. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +1 -1
  127. package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +2 -2
  128. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.js +1 -1
  129. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.js +1 -1
  130. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.js +1 -1
  131. package/dist/prosemirror/extensions/marks/HighlightExtension.js +1 -1
  132. package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +1 -1
  133. package/dist/prosemirror/extensions/marks/RunShadingExtension.js +1 -1
  134. package/dist/prosemirror/extensions/marks/TextColorExtension.js +1 -1
  135. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.js +1 -1
  136. package/dist/prosemirror/extensions/nodes/FieldExtension.js +1 -1
  137. package/dist/prosemirror/extensions/nodes/TabExtension.js +32 -9
  138. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  139. package/dist/prosemirror/index.js +15 -15
  140. package/dist/prosemirror/insertOperations.js +3 -3
  141. package/dist/prosemirror/plugins/templateDirectives.js +1 -1
  142. package/dist/prosemirror/schema/index.d.ts +2 -2
  143. package/dist/prosemirror/schema/nodes.d.ts +4 -1
  144. package/dist/prosemirror/styles/styleResolver.js +1 -1
  145. package/dist/prosemirror/validation.js +5 -3
  146. package/dist/redline.js +1 -1
  147. package/dist/render-dom/BodySelectionOverlay.js +2 -2
  148. package/dist/server.js +15 -15
  149. package/dist/style-sets/extract.js +1 -1
  150. package/dist/types/content.d.ts +2 -2
  151. package/dist/types/documentEnumValues.d.ts +4 -1
  152. package/dist/types/documentEnumValues.js +14 -1
  153. package/dist/types/index.d.ts +2 -1
  154. package/dist/utils/formatToStyle.js +1 -1
  155. package/dist/version-comparison.js +2 -2
  156. package/package.json +2 -2
@@ -1,27 +1,50 @@
1
+ import { expectTabAttrs } from "../../attrs/index.js";
1
2
  import { createNodeExtension } from "../create.js";
2
3
  //#region src/prosemirror/extensions/nodes/TabExtension.ts
3
- /**
4
- * Tab Extension — inline tab character node
5
- */
6
4
  const TabExtension = createNodeExtension({
7
5
  name: "tab",
8
6
  schemaNodeName: "tab",
9
7
  nodeSpec: {
10
8
  inline: true,
11
9
  group: "inline",
10
+ attrs: { positional: { default: null } },
12
11
  selectable: false,
13
- parseDOM: [{ tag: "span.docx-tab" }],
14
- toDOM() {
12
+ parseDOM: [{
13
+ tag: "span.docx-tab",
14
+ getAttrs(node) {
15
+ if (!(node instanceof HTMLElement) || !node.dataset["docxPositionalTab"]) return null;
16
+ return { positional: parsePositionalTab(node) };
17
+ }
18
+ }],
19
+ toDOM(node) {
20
+ const { positional } = expectTabAttrs(node);
21
+ const attrs = {
22
+ class: "docx-tab",
23
+ style: "display: inline-block; min-width: 16px; white-space: pre;"
24
+ };
25
+ if (positional) {
26
+ attrs["data-docx-positional-tab"] = "true";
27
+ if (positional.relativeTo) attrs["data-docx-tab-relative-to"] = positional.relativeTo;
28
+ if (positional.alignment) attrs["data-docx-tab-alignment"] = positional.alignment;
29
+ if (positional.leader) attrs["data-docx-tab-leader"] = positional.leader;
30
+ }
15
31
  return [
16
32
  "span",
17
- {
18
- class: "docx-tab",
19
- style: "display: inline-block; min-width: 16px; white-space: pre;"
20
- },
33
+ attrs,
21
34
  " "
22
35
  ];
23
36
  }
24
37
  }
25
38
  });
39
+ const parsePositionalTab = (element) => {
40
+ const relativeTo = element.dataset["docxTabRelativeTo"];
41
+ const alignment = element.dataset["docxTabAlignment"];
42
+ const leader = element.dataset["docxTabLeader"];
43
+ return {
44
+ ...relativeTo === "margin" || relativeTo === "indent" ? { relativeTo } : {},
45
+ ...alignment === "left" || alignment === "center" || alignment === "right" ? { alignment } : {},
46
+ ...leader === "none" || leader === "dot" || leader === "hyphen" || leader === "underscore" || leader === "middleDot" ? { leader } : {}
47
+ };
48
+ };
26
49
  //#endregion
27
50
  export { TabExtension };
@@ -1,7 +1,7 @@
1
1
  import { TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_WIDTH_TYPE_VALUES } from "../../../types/documentEnumValues.js";
2
+ import { isValidHexColor, resolveColor } from "../../../utils/colorResolver.js";
2
3
  import { expectTableAttrs, expectTableCellAttrs, expectTableRowAttrs, mergeTableAttrs, mergeTableCellAttrs, mergeTableRowAttrs } from "../../attrs/index.js";
3
4
  import { createExtension, createNodeExtension } from "../create.js";
4
- import { isValidHexColor, resolveColor } from "../../../utils/colorResolver.js";
5
5
  import { panic } from "better-result";
6
6
  import { CellSelection, TableMap, columnResizing, mergeCells, removeRow, selectedRect, splitCell, tableEditing } from "prosemirror-tables";
7
7
  import { Plugin, PluginKey, Selection, TextSelection } from "prosemirror-state";
@@ -1,23 +1,23 @@
1
- import { assertValidProseMirrorDocument, formatProseMirrorDocumentIssues, validateProseMirrorDocument } from "./validation.js";
2
- import { StyleResolver, createStyleResolver } from "./styles/styleResolver.js";
1
+ import { PAINTABLE_MARK_NAMES, applyFormatMarks, captureFormatMarks } from "./commands/formatPainter.js";
2
+ import { clearFontFamily, clearFontSize, clearHighlight, clearTextColor, insertHyperlink, removeHyperlink, setFontFamily, setFontSize, setHighlight, setHyperlink, setTextColor, toggleBold, toggleItalic, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline } from "./commands/formatting.js";
3
+ import { insertImageFromFile } from "./commands/image.js";
4
+ import { insertPageBreak } from "./commands/pageBreak.js";
5
+ import { addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyStyle, clearStyle, decreaseIndent, decreaseListLevel, generateTOC, increaseIndent, increaseListLevel, removeList, removeTabStop, setAlignment, setIndentFirstLine, setIndentLeft, setIndentRight, setLineSpacing, setLtr, setRtl, toggleBidi, toggleBulletList, toggleNumberedList } from "./commands/paragraph.js";
6
+ import { addColumnLeft, addColumnRight, addRowAbove, addRowBelow, applyTableStyle, autoFitContents, deleteColumn, deleteRow, deleteTable, distributeColumns, insertTable, mergeCells, removeTableBorders, selectColumn, selectRow, selectTable, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setInsideTableBorders, setOutsideTableBorders, setRowHeight, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, splitCell, toggleHeaderRow, toggleNoWrap } from "./commands/table.js";
7
+ import { fromProseDoc, updateDocumentContent } from "./conversion/fromProseDoc.js";
8
+ import { createEmptyDoc, toProseDoc } from "./conversion/toProseDoc.js";
3
9
  import { getParagraphAlignment, getParagraphBidi, getStyleId } from "./extensions/core/ParagraphExtension.js";
4
- import { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver } from "./plugins/documentStyles.js";
5
- import { clearFormatting, getMarkAttr, isMarkActive } from "./extensions/marks/markUtils.js";
6
- import { getTableContext, isInTable as isInTableCell } from "./extensions/nodes/TableExtension.js";
7
10
  import { getListInfo, isInList } from "./extensions/features/ListExtension.js";
8
11
  import { ensureParaIdsInState } from "./extensions/features/ParaIdAllocatorExtension.js";
9
- import { createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from "./plugins/selectionTracker.js";
10
12
  import { getHyperlinkAttrs, getSelectedText, isHyperlinkActive } from "./extensions/marks/HyperlinkExtension.js";
13
+ import { clearFormatting, getMarkAttr, isMarkActive } from "./extensions/marks/markUtils.js";
14
+ import { getTableContext, isInTable as isInTableCell } from "./extensions/nodes/TableExtension.js";
15
+ import { insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "./insertOperations.js";
16
+ import { createDocumentStylesPlugin, documentStylesKey, getDocumentStyleResolver } from "./plugins/documentStyles.js";
17
+ import { createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from "./plugins/selectionTracker.js";
11
18
  import { schema, singletonManager } from "./schema/index.js";
12
- import { createEmptyDoc, toProseDoc } from "./conversion/toProseDoc.js";
13
- import { fromProseDoc, updateDocumentContent } from "./conversion/fromProseDoc.js";
14
- import { addColumnLeft, addColumnRight, addRowAbove, addRowBelow, applyTableStyle, autoFitContents, deleteColumn, deleteRow, deleteTable, distributeColumns, insertTable, mergeCells, removeTableBorders, selectColumn, selectRow, selectTable, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setInsideTableBorders, setOutsideTableBorders, setRowHeight, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, splitCell, toggleHeaderRow, toggleNoWrap } from "./commands/table.js";
15
19
  import { extractSelectionState } from "./selectionState.js";
16
- import { clearFontFamily, clearFontSize, clearHighlight, clearTextColor, insertHyperlink, removeHyperlink, setFontFamily, setFontSize, setHighlight, setHyperlink, setTextColor, toggleBold, toggleItalic, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline } from "./commands/formatting.js";
17
- import { addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyStyle, clearStyle, decreaseIndent, decreaseListLevel, generateTOC, increaseIndent, increaseListLevel, removeList, removeTabStop, setAlignment, setIndentFirstLine, setIndentLeft, setIndentRight, setLineSpacing, setLtr, setRtl, toggleBidi, toggleBulletList, toggleNumberedList } from "./commands/paragraph.js";
18
- import { PAINTABLE_MARK_NAMES, applyFormatMarks, captureFormatMarks } from "./commands/formatPainter.js";
19
- import { insertPageBreak } from "./commands/pageBreak.js";
20
- import { insertImageFromFile } from "./commands/image.js";
21
- import { insertPageBreakInView, insertTableInView, insertTableOfContentsInView } from "./insertOperations.js";
20
+ import { StyleResolver, createStyleResolver } from "./styles/styleResolver.js";
21
+ import { assertValidProseMirrorDocument, formatProseMirrorDocumentIssues, validateProseMirrorDocument } from "./validation.js";
22
22
  import { TextSelection } from "prosemirror-state";
23
23
  export { PAINTABLE_MARK_NAMES, StyleResolver, TextSelection, addColumnLeft, addColumnRight, addRowAbove, addRowBelow, addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyFormatMarks, applyStyle, applyTableStyle, assertValidProseMirrorDocument, autoFitContents, captureFormatMarks, clearFontFamily, clearFontSize, clearFormatting, clearHighlight, clearStyle, clearTextColor, createDocumentStylesPlugin, createEmptyDoc, createSelectionTrackerPlugin, createStyleResolver, decreaseIndent, decreaseListLevel, deleteColumn, deleteRow, deleteTable, distributeColumns, documentStylesKey, ensureParaIdsInState, extractSelectionContext, extractSelectionState, formatProseMirrorDocumentIssues, fromProseDoc, generateTOC, getDocumentStyleResolver, getHyperlinkAttrs, getListInfo, getMarkAttr, getParagraphAlignment, getParagraphBidi, getSelectedText, getSelectionContext, getStyleId, getTableContext, increaseIndent, increaseListLevel, insertHyperlink, insertImageFromFile, insertPageBreak, insertPageBreakInView, insertTable, insertTableInView, insertTableOfContentsInView, isHyperlinkActive, isInList, isInTableCell as isInTable, isMarkActive, mergeCells, removeHyperlink, removeList, removeTabStop, removeTableBorders, schema, selectColumn, selectRow, selectTable, selectionTrackerKey, setAlignment, setAllTableBorders, setCellBorder, setCellFillColor, setCellMargins, setCellTextDirection, setCellVerticalAlign, setFontFamily, setFontSize, setHighlight, setHyperlink, setIndentFirstLine, setIndentLeft, setIndentRight, setInsideTableBorders, setLineSpacing, setLtr, setOutsideTableBorders, setRowHeight, setRtl, setTableBorderColor, setTableBorderPreset, setTableBorderWidth, setTableBorders, setTableProperties, setTextColor, singletonManager, splitCell, toProseDoc, toggleBidi, toggleBold, toggleBulletList, toggleHeaderRow, toggleItalic, toggleNoWrap, toggleNumberedList, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline, updateDocumentContent, validateProseMirrorDocument };
@@ -1,7 +1,7 @@
1
- import { insertTable } from "./commands/table.js";
2
- import { generateTOC } from "./commands/paragraph.js";
3
- import { insertPageBreak } from "./commands/pageBreak.js";
4
1
  import { insertImageFromFile } from "./commands/image.js";
2
+ import { insertPageBreak } from "./commands/pageBreak.js";
3
+ import { generateTOC } from "./commands/paragraph.js";
4
+ import { insertTable } from "./commands/table.js";
5
5
  //#region src/prosemirror/insertOperations.ts
6
6
  /** Insert a `rows × columns` table at the current selection. */
7
7
  function insertTableInView(view, rows, columns) {
@@ -1,5 +1,5 @@
1
- import { collectBlockChunks, joinChunks, offsetToDocPos } from "./pmTextScan.js";
2
1
  import { createDocScanPlugin, getDocScanRanges } from "./createDocScanPlugin.js";
2
+ import { collectBlockChunks, joinChunks, offsetToDocPos } from "./pmTextScan.js";
3
3
  import { PluginKey } from "prosemirror-state";
4
4
  import { assertNever, isBlockDirectiveKind, scanMarkers } from "@stll/template-conditions";
5
5
  //#region src/prosemirror/plugins/templateDirectives.ts
@@ -1,6 +1,6 @@
1
1
  import { CharacterSpacingAttrs, CharacterStyleAttrs, CommentAttrs, EmphasisMarkAttrs, FontFamilyAttrs, FontSizeAttrs, FootnoteRefAttrs, HighlightAttrs, HyperlinkAttrs, LanguageAttrs, RunFormattingOverrideAttrs, RunPropertyChangeMarkAttrs, RunShadingAttrs, StrikeAttrs, TextColorAttrs, TextEffectAttrs, TrackedChangeMarkAttrs, UnderlineAttrs } from "./marks.js";
2
2
  import { ExtensionManager } from "../extensions/ExtensionManager.js";
3
- import { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "./nodes.js";
3
+ import { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAttrs } from "./nodes.js";
4
4
  //#region src/prosemirror/schema/index.d.ts
5
5
  declare const singletonManager: ExtensionManager;
6
6
  declare const schema: import("prosemirror-model").Schema<any, any>;
@@ -11,4 +11,4 @@ type DocxSchema = typeof schema;
11
11
  type DocxNode = ReturnType<typeof schema.node>;
12
12
  type DocxMark = ReturnType<typeof schema.mark>;
13
13
  //#endregion
14
- export { type BlockSdtAttrs, type CharacterSpacingAttrs, type CharacterStyleAttrs, type CommentAttrs, DocxMark, DocxNode, DocxSchema, type EmphasisMarkAttrs, type FieldAttrs, type FontFamilyAttrs, type FontSizeAttrs, type FootnoteRefAttrs, type HardBreakAttrs, type HighlightAttrs, type HyperlinkAttrs, type ImageAttrs, type ImagePositionAttrs, type LanguageAttrs, type MathAttrs, type ParagraphAttrs, type RunFormattingOverrideAttrs, type RunPropertyChangeMarkAttrs, type RunShadingAttrs, type SdtAttrs, type ShapeAttrs, type StrikeAttrs, type TableAttrs, type TableCellAttrs, type TableRowAttrs, type TextBoxAttrs, type TextColorAttrs, type TextEffectAttrs, type TrackedChangeMarkAttrs, type UnderlineAttrs, schema, singletonManager };
14
+ export { type BlockSdtAttrs, type CharacterSpacingAttrs, type CharacterStyleAttrs, type CommentAttrs, DocxMark, DocxNode, DocxSchema, type EmphasisMarkAttrs, type FieldAttrs, type FontFamilyAttrs, type FontSizeAttrs, type FootnoteRefAttrs, type HardBreakAttrs, type HighlightAttrs, type HyperlinkAttrs, type ImageAttrs, type ImagePositionAttrs, type LanguageAttrs, type MathAttrs, type ParagraphAttrs, type RunFormattingOverrideAttrs, type RunPropertyChangeMarkAttrs, type RunShadingAttrs, type SdtAttrs, type ShapeAttrs, type StrikeAttrs, type TabAttrs, type TableAttrs, type TableCellAttrs, type TableRowAttrs, type TextBoxAttrs, type TextColorAttrs, type TextEffectAttrs, type TrackedChangeMarkAttrs, type UnderlineAttrs, schema, singletonManager };
@@ -8,6 +8,9 @@ import { ParagraphDirection } from "../paragraphDirection.js";
8
8
  type HardBreakAttrs = {
9
9
  breakType?: "column";
10
10
  };
11
+ type TabAttrs = {
12
+ positional?: document_d_exports.PositionalTab;
13
+ };
11
14
  /**
12
15
  * Paragraph node attributes - maps to ParagraphFormatting
13
16
  */
@@ -681,4 +684,4 @@ type TableCellAttrs = {
681
684
  _docxVMergeContinuationCells?: document_d_exports.TableCell[];
682
685
  };
683
686
  //#endregion
684
- export { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, SuggestedStructuralMarker, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAnchorAttrs, TextBoxAttrs };
687
+ export { BlockSdtAttrs, FieldAttrs, HardBreakAttrs, ImageAttrs, ImagePositionAttrs, MathAttrs, ParagraphAttrs, SdtAttrs, ShapeAttrs, SuggestedStructuralMarker, TabAttrs, TableAttrs, TableCellAttrs, TableRowAttrs, TextBoxAnchorAttrs, TextBoxAttrs };
@@ -1,5 +1,5 @@
1
- import { mergeTextFormatting } from "../../utils/textFormattingMerge.js";
2
1
  import { mergeParagraphFormatting } from "../../utils/paragraphFormattingMerge.js";
2
+ import { mergeTextFormatting } from "../../utils/textFormattingMerge.js";
3
3
  //#region src/prosemirror/styles/styleResolver.ts
4
4
  /**
5
5
  * Word's default-template Normal style, used as a last-resort fallback for a
@@ -1,4 +1,4 @@
1
- import { readBlockSdtAttrs, readCharacterSpacingMarkAttrs, readCharacterStyleMarkAttrs, readCommentMarkAttrs, readEmphasisMarkAttrs, readFieldAttrs, readFontFamilyMarkAttrs, readFontSizeMarkAttrs, readFootnoteRefMarkAttrs, readHardBreakAttrs, readHighlightMarkAttrs, readHyperlinkMarkAttrs, readImageAttrs, readLanguageMarkAttrs, readMathAttrs, readParagraphAttrs, readRunFormattingOverrideMarkAttrs, readRunPropertyChangeMarkAttrs, readRunShadingMarkAttrs, readSdtAttrs, readShapeAttrs, readStrikeMarkAttrs, readTableAttrs, readTableCellAttrs, readTableRowAttrs, readTextBoxAttrs, readTextColorMarkAttrs, readTextEffectMarkAttrs, readTrackedChangeMarkAttrs, readUnderlineMarkAttrs } from "./attrs/index.js";
1
+ import { readBlockSdtAttrs, readCharacterSpacingMarkAttrs, readCharacterStyleMarkAttrs, readCommentMarkAttrs, readEmphasisMarkAttrs, readFieldAttrs, readFontFamilyMarkAttrs, readFontSizeMarkAttrs, readFootnoteRefMarkAttrs, readHardBreakAttrs, readHighlightMarkAttrs, readHyperlinkMarkAttrs, readImageAttrs, readLanguageMarkAttrs, readMathAttrs, readParagraphAttrs, readRunFormattingOverrideMarkAttrs, readRunPropertyChangeMarkAttrs, readRunShadingMarkAttrs, readSdtAttrs, readShapeAttrs, readStrikeMarkAttrs, readTabAttrs, readTableAttrs, readTableCellAttrs, readTableRowAttrs, readTextBoxAttrs, readTextColorMarkAttrs, readTextEffectMarkAttrs, readTrackedChangeMarkAttrs, readUnderlineMarkAttrs } from "./attrs/index.js";
2
2
  import { readTextBoxAnchorAttrs } from "./textBoxAnchorAttrs.js";
3
3
  //#region src/prosemirror/validation.ts
4
4
  var ProseMirrorDocumentValidationError = class extends Error {
@@ -49,8 +49,10 @@ const validateNodeAttrs = (node, path, issues) => {
49
49
  case "text":
50
50
  case "horizontalRule":
51
51
  case "pageBreak":
52
- case "renderedPageBreak":
53
- case "tab": return;
52
+ case "renderedPageBreak": return;
53
+ case "tab":
54
+ appendAttrIssues(path, readTabAttrs(node), issues);
55
+ return;
54
56
  case "hardBreak":
55
57
  appendAttrIssues(path, readHardBreakAttrs(node), issues);
56
58
  return;
package/dist/redline.js CHANGED
@@ -1,6 +1,6 @@
1
+ import { FolioDocxReviewer, isFolioResolvedReviewedView } from "./ai-edits/headless.js";
1
2
  import "./document-operations.js";
2
3
  import { pairFolioDocumentStories } from "./document-stories.js";
3
- import { FolioDocxReviewer, isFolioResolvedReviewedView } from "./ai-edits/headless.js";
4
4
  import { resolveFolioDocumentPrivacyTransforms, rewriteDocxMetadataPrivacy } from "./docx/metadataPrivacy.js";
5
5
  import { alignFolioBlocks } from "./version-comparison.js";
6
6
  import { TaggedError, panic } from "better-result";
@@ -1,7 +1,7 @@
1
- import { findBodyPmAnchor } from "../layout-bridge/dom/findBodyPmSpans.js";
2
1
  import { applyCellSelectionHighlight } from "../layout-bridge/cellSelectionHighlight.js";
3
- import { findImageElement } from "../layout-painter/imageLayout.js";
4
2
  import { getCaretPositionFromDom, getSelectionRectsFromDom } from "../layout-bridge/dom/clickToPositionDom.js";
3
+ import { findBodyPmAnchor } from "../layout-bridge/dom/findBodyPmSpans.js";
4
+ import { findImageElement } from "../layout-painter/imageLayout.js";
5
5
  import { NodeSelection } from "prosemirror-state";
6
6
  //#region src/render-dom/BodySelectionOverlay.ts
7
7
  /**
package/dist/server.js CHANGED
@@ -1,23 +1,23 @@
1
- import { deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
1
+ import { FOLIO_RESOLVED_REVIEWED_VIEWS, FOLIO_REVIEWED_VIEWS, FolioDocumentStoryNotFoundError, FolioDocxReviewer, UnsupportedFolioReviewedViewError, applyFolioAIEditsToBuffer, isFolioResolvedReviewedView, isFolioReviewedView } from "./ai-edits/headless.js";
2
+ import { getFolioDocumentOutline, readFolioDocumentSection } from "./ai-edits/scoped-reading.js";
2
3
  import { createFolioAITextRangeHandle, hashFolioAIBlockText, normalizeFolioAIBlockText } from "./ai-edits/snapshot.js";
3
4
  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, assertSupportedFolioDocumentOperationVersion, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, isFolioDocumentOperationModeSupported, isSupportedFolioDocumentOperationVersion, parseFolioDocumentOperationBatch } from "./document-operations.js";
4
- import { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION } from "./style-sets/types.js";
5
- import { createEmptyDocument } from "./utils/createDocument.js";
6
- import { extractDocumentStyleSet, extractDocumentStyleSetFromDocx, inspectDocumentStyles, inspectDocumentStylesFromDocx } from "./style-sets/extract.js";
7
- import { STELLA_STYLE_SET_NAME, createStellaStyleDocumentPreset, createStellaStyleSet } from "./style-sets/stellaStyle.js";
8
- import { createDocx } from "./docx/rezip.js";
9
- import { getFolioDocumentOutline, readFolioDocumentSection } from "./ai-edits/scoped-reading.js";
10
- import { replyToComment } from "./docx/replyToComment.js";
11
- import { FOLIO_RESOLVED_REVIEWED_VIEWS, FOLIO_REVIEWED_VIEWS, FolioDocumentStoryNotFoundError, FolioDocxReviewer, UnsupportedFolioReviewedViewError, applyFolioAIEditsToBuffer, isFolioResolvedReviewedView, isFolioReviewedView } from "./ai-edits/headless.js";
5
+ import { EnsureParaIdsError, ensureParaIds } from "./docx/ensureParaIds.js";
12
6
  import { FOLIO_DOCUMENT_METADATA_PROPERTIES, FOLIO_DOCUMENT_PRIVACY_TRANSFORMS, FolioDocumentPrivacyArchiveError, InvalidFolioDocumentPrivacyOptionsError, isFolioDocumentPrivacyTransform, rewriteDocxMetadataPrivacy } from "./docx/metadataPrivacy.js";
13
- import { FOLIO_VERSION_COMPARISON_PRIVACY_TRANSFORMS, FOLIO_VERSION_COMPARISON_SCOPES, InvalidFolioVersionComparisonOptionsError, applyFolioVersionDiffPrivacy, compareDocxVersions, isFolioVersionComparisonPrivacyTransform, isFolioVersionComparisonScope } from "./version-comparison.js";
14
- import { InvalidGenerateRedlineDocxOptionsError, generateRedlineDocx } from "./redline.js";
7
+ import { replyToComment } from "./docx/replyToComment.js";
8
+ import { createDocx } from "./docx/rezip.js";
9
+ import { FOLIO_DOCX_XML_PATCH_APPLICATION_PROFILE, FOLIO_DOCX_XML_PATCH_APPLICATION_VERSION, FolioDocxXmlPatchApplicationError, UnsupportedFolioDocxXmlPatchApplicationProfileError, applyDocxXmlPatchProposal } from "./docx/server/applyDocxXmlPatchProposal.js";
15
10
  import { DocxArchiveError } from "./docx/server/boundedArchive.js";
16
- import { EnsureParaIdsError, ensureParaIds } from "./docx/ensureParaIds.js";
17
- import { extractDocxText } from "./docx/server/extractDocxText.js";
18
11
  import { docxToMarkdown } from "./docx/server/docxToMarkdown.js";
19
- import { FOLIO_DOCX_PACKAGE_INSPECTION_DEFAULTS, FOLIO_DOCX_PACKAGE_INSPECTION_ERROR_CODES, FOLIO_DOCX_PACKAGE_INSPECTION_VERSION, FolioDocxPackageInspectionError, inspectDocxPackage } from "./docx/server/inspectDocxPackage.js";
20
12
  import { FOLIO_DOCX_XML_PATCH_PROPOSAL_DEFAULTS, FOLIO_DOCX_XML_PATCH_PROPOSAL_ISSUE_CODES, FOLIO_DOCX_XML_PATCH_PROPOSAL_PROFILE, FOLIO_DOCX_XML_PATCH_PROPOSAL_VERSION, InvalidFolioDocxXmlPatchProposalError, InvalidFolioDocxXmlPatchProposalOptionsError, evaluateDocxXmlPatchProposal, parseFolioDocxXmlPatchProposal } from "./docx/server/evaluateDocxXmlPatchProposal.js";
13
+ import { extractDocxText } from "./docx/server/extractDocxText.js";
14
+ import { FOLIO_DOCX_PACKAGE_INSPECTION_DEFAULTS, FOLIO_DOCX_PACKAGE_INSPECTION_ERROR_CODES, FOLIO_DOCX_PACKAGE_INSPECTION_VERSION, FolioDocxPackageInspectionError, inspectDocxPackage } from "./docx/server/inspectDocxPackage.js";
21
15
  import { FOLIO_DOCX_CONFORMANCE_CHECKS, FOLIO_DOCX_CONFORMANCE_ISSUE_CODES, FOLIO_DOCX_CONFORMANCE_PROFILE, FOLIO_DOCX_CONFORMANCE_REPORT_VERSION, validateDocxConformance } from "./docx/server/validateDocxConformance.js";
22
- import { FOLIO_DOCX_XML_PATCH_APPLICATION_PROFILE, FOLIO_DOCX_XML_PATCH_APPLICATION_VERSION, FolioDocxXmlPatchApplicationError, UnsupportedFolioDocxXmlPatchApplicationProfileError, applyDocxXmlPatchProposal } from "./docx/server/applyDocxXmlPatchProposal.js";
16
+ import { InvalidGenerateRedlineDocxOptionsError, generateRedlineDocx } from "./redline.js";
17
+ import { extractDocumentStyleSet, extractDocumentStyleSetFromDocx, inspectDocumentStyles, inspectDocumentStylesFromDocx } from "./style-sets/extract.js";
18
+ import { STELLA_STYLE_SET_NAME, createStellaStyleDocumentPreset, createStellaStyleSet } from "./style-sets/stellaStyle.js";
19
+ import { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION } from "./style-sets/types.js";
20
+ import { deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
21
+ import { createEmptyDocument } from "./utils/createDocument.js";
22
+ import { FOLIO_VERSION_COMPARISON_PRIVACY_TRANSFORMS, FOLIO_VERSION_COMPARISON_SCOPES, InvalidFolioVersionComparisonOptionsError, applyFolioVersionDiffPrivacy, compareDocxVersions, isFolioVersionComparisonPrivacyTransform, isFolioVersionComparisonScope } from "./version-comparison.js";
23
23
  export { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DocxArchiveError, EnsureParaIdsError, FOLIO_DOCUMENT_METADATA_PROPERTIES, 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, FOLIO_DOCUMENT_PRIVACY_TRANSFORMS, FOLIO_DOCX_CONFORMANCE_CHECKS, FOLIO_DOCX_CONFORMANCE_ISSUE_CODES, FOLIO_DOCX_CONFORMANCE_PROFILE, FOLIO_DOCX_CONFORMANCE_REPORT_VERSION, FOLIO_DOCX_PACKAGE_INSPECTION_DEFAULTS, FOLIO_DOCX_PACKAGE_INSPECTION_ERROR_CODES, FOLIO_DOCX_PACKAGE_INSPECTION_VERSION, FOLIO_DOCX_XML_PATCH_APPLICATION_PROFILE, FOLIO_DOCX_XML_PATCH_APPLICATION_VERSION, FOLIO_DOCX_XML_PATCH_PROPOSAL_DEFAULTS, FOLIO_DOCX_XML_PATCH_PROPOSAL_ISSUE_CODES, FOLIO_DOCX_XML_PATCH_PROPOSAL_PROFILE, FOLIO_DOCX_XML_PATCH_PROPOSAL_VERSION, FOLIO_RESOLVED_REVIEWED_VIEWS, FOLIO_REVIEWED_VIEWS, FOLIO_VERSION_COMPARISON_PRIVACY_TRANSFORMS, FOLIO_VERSION_COMPARISON_SCOPES, FolioDocumentPrivacyArchiveError, FolioDocumentStoryNotFoundError, FolioDocxPackageInspectionError, FolioDocxReviewer, FolioDocxXmlPatchApplicationError, InvalidFolioDocumentOperationBatchError, InvalidFolioDocumentPrivacyOptionsError, InvalidFolioDocxXmlPatchProposalError, InvalidFolioDocxXmlPatchProposalOptionsError, InvalidFolioVersionComparisonOptionsError, InvalidGenerateRedlineDocxOptionsError, STELLA_STYLE_SET_NAME, UnsupportedFolioDocumentOperationVersionError, UnsupportedFolioDocxXmlPatchApplicationProfileError, UnsupportedFolioReviewedViewError, applyDocxXmlPatchProposal, applyFolioAIEditsToBuffer, applyFolioVersionDiffPrivacy, assertSupportedFolioDocumentOperationVersion, compareDocxVersions, createDocx, createEmptyDocument, createFolioAITextRangeHandle, createStellaStyleDocumentPreset, createStellaStyleSet, deriveBlockId, docxToMarkdown, ensureParaIds, evaluateDocxXmlPatchProposal, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractDocxText, generateRedlineDocx, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioDocumentOutline, getFolioParaIdFromBlockId, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxPackage, isFolioBlockId, isFolioDocumentOperationModeSupported, isFolioDocumentPrivacyTransform, isFolioResolvedReviewedView, isFolioReviewedView, isFolioVersionComparisonPrivacyTransform, isFolioVersionComparisonScope, isSequentialFolioBlockId, isSupportedFolioDocumentOperationVersion, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, parseFolioDocxXmlPatchProposal, readFolioDocumentSection, replyToComment, rewriteDocxMetadataPrivacy, validateDocxConformance };
@@ -1,5 +1,5 @@
1
- import "./types.js";
2
1
  import { parseDocx } from "../docx/parser.js";
2
+ import "./types.js";
3
3
  import { panic } from "better-result";
4
4
  //#region src/style-sets/extract.ts
5
5
  const inspectDocumentStyles = (document) => {
@@ -1,2 +1,2 @@
1
- import { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, ComplexField, Deletion, DocumentBody, DrawingContent, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign } from "@stll/docx-core/model";
2
- export type { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, ComplexField, Deletion, DocumentBody, DrawingContent, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign };
1
+ import { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, ComplexField, Deletion, DocumentBody, DrawingContent, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PositionalTab, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign } from "@stll/docx-core/model";
2
+ export type { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, ComplexField, Deletion, DocumentBody, DrawingContent, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PositionalTab, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign };
@@ -11,6 +11,9 @@ declare const PARAGRAPH_ALIGNMENT_VALUES: readonly ["left", "center", "right", "
11
11
  declare const LINE_SPACING_RULE_VALUES: readonly ["auto", "exact", "atLeast"];
12
12
  declare const TAB_STOP_ALIGNMENT_VALUES: readonly ["left", "center", "right", "decimal", "bar", "clear", "num"];
13
13
  declare const TAB_LEADER_VALUES: readonly ["none", "dot", "hyphen", "underscore", "heavy", "middleDot"];
14
+ declare const POSITIONAL_TAB_RELATIVE_TO_VALUES: readonly ["margin", "indent"];
15
+ declare const POSITIONAL_TAB_ALIGNMENT_VALUES: readonly ["left", "center", "right"];
16
+ declare const POSITIONAL_TAB_LEADER_VALUES: readonly ["none", "dot", "hyphen", "underscore", "middleDot"];
14
17
  declare const FRAME_X_ALIGN_VALUES: readonly ["left", "center", "right", "inside", "outside"];
15
18
  declare const FRAME_Y_ALIGN_VALUES: readonly ["top", "center", "bottom", "inside", "outside", "inline"];
16
19
  declare const FRAME_WRAP_VALUES: readonly ["around", "auto", "none", "notBeside", "through", "tight"];
@@ -87,4 +90,4 @@ type OutlineStyleAttr = (typeof OUTLINE_STYLE_ATTR_VALUES)[number];
87
90
  declare const NUMBER_FORMAT_VALUES: readonly ["decimal", "upperRoman", "lowerRoman", "upperLetter", "lowerLetter", "ordinal", "cardinalText", "ordinalText", "hex", "chicago", "ideographDigital", "japaneseCounting", "aiueo", "iroha", "decimalFullWidth", "decimalHalfWidth", "japaneseLegal", "japaneseDigitalTenThousand", "decimalEnclosedCircle", "decimalFullWidth2", "aiueoFullWidth", "irohaFullWidth", "decimalZero", "decimalZero3", "decimalZero4", "decimalZero5", "bullet", "ganada", "chosung", "decimalEnclosedFullstop", "decimalEnclosedParen", "decimalEnclosedCircleChinese", "ideographEnclosedCircle", "ideographTraditional", "ideographZodiac", "ideographZodiacTraditional", "taiwaneseCounting", "ideographLegalTraditional", "taiwaneseCountingThousand", "taiwaneseDigital", "chineseCounting", "chineseLegalSimplified", "chineseCountingThousand", "koreanDigital", "koreanCounting", "koreanLegal", "koreanDigital2", "vietnameseCounting", "russianLower", "russianUpper", "none", "numberInDash", "hebrew1", "hebrew2", "arabicAlpha", "arabicAbjad", "hindiVowels", "hindiConsonants", "hindiNumbers", "hindiCounting", "thaiLetters", "thaiNumbers", "thaiCounting"];
88
91
  declare const LEVEL_SUFFIX_VALUES: readonly ["tab", "space", "nothing"];
89
92
  //#endregion
90
- export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES };
93
+ export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, OutlineStyleAttr, OutlineStyleCssAlias, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES };
@@ -144,6 +144,19 @@ const TAB_LEADER_VALUES = [
144
144
  "heavy",
145
145
  "middleDot"
146
146
  ];
147
+ const POSITIONAL_TAB_RELATIVE_TO_VALUES = ["margin", "indent"];
148
+ const POSITIONAL_TAB_ALIGNMENT_VALUES = [
149
+ "left",
150
+ "center",
151
+ "right"
152
+ ];
153
+ const POSITIONAL_TAB_LEADER_VALUES = [
154
+ "none",
155
+ "dot",
156
+ "hyphen",
157
+ "underscore",
158
+ "middleDot"
159
+ ];
147
160
  const FRAME_X_ALIGN_VALUES = [
148
161
  "left",
149
162
  "center",
@@ -695,4 +708,4 @@ const LEVEL_SUFFIX_VALUES = [
695
708
  "nothing"
696
709
  ];
697
710
  //#endregion
698
- export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES };
711
+ export { BORDER_STYLE_VALUES, CONDITIONAL_STYLE_TYPE_VALUES, EMPHASIS_MARK_VALUES, FIELD_TYPE_VALUES, FLOATING_TABLE_X_SPEC_VALUES, FLOATING_TABLE_Y_SPEC_VALUES, FONT_HINT_VALUES, FONT_THEME_VALUES, FRAME_WRAP_VALUES, FRAME_X_ALIGN_VALUES, FRAME_Y_ALIGN_VALUES, HIGHLIGHT_COLOR_VALUES, IMAGE_HORIZONTAL_ALIGNMENT_VALUES, IMAGE_HORIZONTAL_RELATIVE_TO_VALUES, IMAGE_VERTICAL_ALIGNMENT_VALUES, IMAGE_VERTICAL_RELATIVE_TO_VALUES, IMAGE_WRAP_TEXT_VALUES, IMAGE_WRAP_TYPE_VALUES, LEVEL_SUFFIX_VALUES, LINE_SPACING_RULE_VALUES, NUMBER_FORMAT_VALUES, OUTLINE_STYLE_ATTR_VALUES, OUTLINE_STYLE_CSS_ALIASES, OUTLINE_STYLE_CSS_ALIAS_VALUES, PARAGRAPH_ALIGNMENT_VALUES, POSITIONAL_TAB_ALIGNMENT_VALUES, POSITIONAL_TAB_LEADER_VALUES, POSITIONAL_TAB_RELATIVE_TO_VALUES, SDT_LOCK_VALUES, SDT_TYPE_VALUES, SHADING_PATTERN_VALUES, SHAPE_OUTLINE_STYLE_VALUES, SHAPE_TYPE_VALUES, STYLE_TYPE_VALUES, TABLE_CELL_TEXT_DIRECTION_VALUES, TABLE_CELL_VERTICAL_ALIGNMENT_VALUES, TABLE_JUSTIFICATION_VALUES, TABLE_ROW_HEIGHT_RULE_VALUES, TABLE_WIDTH_TYPE_VALUES, TAB_LEADER_VALUES, TAB_STOP_ALIGNMENT_VALUES, TEXT_EFFECT_VALUES, THEME_COLOR_SLOT_VALUES, UNDERLINE_STYLE_VALUES };
@@ -59,6 +59,7 @@ type Paragraph = document_d_exports.Paragraph;
59
59
  type ParagraphAlignment = document_d_exports.ParagraphAlignment;
60
60
  type ParagraphContent = document_d_exports.ParagraphContent;
61
61
  type ParagraphFormatting = document_d_exports.ParagraphFormatting;
62
+ type PositionalTab = document_d_exports.PositionalTab;
62
63
  type Relationship = document_d_exports.Relationship;
63
64
  type RelationshipMap = document_d_exports.RelationshipMap;
64
65
  type RelationshipType = document_d_exports.RelationshipType;
@@ -105,4 +106,4 @@ type ThemeFont = document_d_exports.ThemeFont;
105
106
  type ThemeFontScheme = document_d_exports.ThemeFontScheme;
106
107
  type UnderlineStyle = document_d_exports.UnderlineStyle;
107
108
  type VerticalAlign = document_d_exports.VerticalAlign;
108
- export type { AbstractNumbering, BlockContent, BookmarkEnd, BookmarkStart, BorderSpec, BreakContent, CellMargins, ColorValue, Column, ComplexField, ConditionalFormatStyle, DocDefaults, Document, DocumentBody, DocxConformanceClass, DocxPackage, DrawingContent, EmphasisMark, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FloatingTableProperties, FontInfo, FontTable, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InstrTextContent, LevelSuffix, LineNumberRestart, LineSpacingRule, ListLevel, ListRendering, MediaFile, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, NumberFormat, NumberingDefinitions, NumberingInstance, PageOrientation, Paragraph, ParagraphAlignment, ParagraphContent, ParagraphFormatting, Relationship, RelationshipMap, RelationshipType, Run, RunContent, Section, SectionProperties, SectionStart, ShadingProperties, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, Style, StyleDefinitions, StyleType, SymbolContent, TabContent, TabLeader, TabStop, TabStopAlignment, Table, TableBorders, TableCell, TableCellFormatting, TableFormatting, TableLook, TableMeasurement, TableRow, TableRowFormatting, TableWidthType, TextBox, TextContent, TextEffect, TextFormatting, Theme, ThemeColorScheme, ThemeColorSlot, ThemeFont, ThemeFontScheme, UnderlineStyle, VerticalAlign };
109
+ export type { AbstractNumbering, BlockContent, BookmarkEnd, BookmarkStart, BorderSpec, BreakContent, CellMargins, ColorValue, Column, ComplexField, ConditionalFormatStyle, DocDefaults, Document, DocumentBody, DocxConformanceClass, DocxPackage, DrawingContent, EmphasisMark, Endnote, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FloatingTableProperties, FontInfo, FontTable, FooterReference, Footnote, FootnotePosition, FootnoteProperties, HeaderFooter, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InstrTextContent, LevelSuffix, LineNumberRestart, LineSpacingRule, ListLevel, ListRendering, MediaFile, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, NumberFormat, NumberingDefinitions, NumberingInstance, PageOrientation, Paragraph, ParagraphAlignment, ParagraphContent, ParagraphFormatting, PositionalTab, Relationship, RelationshipMap, RelationshipType, Run, RunContent, Section, SectionProperties, SectionStart, ShadingProperties, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, Style, StyleDefinitions, StyleType, SymbolContent, TabContent, TabLeader, TabStop, TabStopAlignment, Table, TableBorders, TableCell, TableCellFormatting, TableFormatting, TableLook, TableMeasurement, TableRow, TableRowFormatting, TableWidthType, TextBox, TextContent, TextEffect, TextFormatting, Theme, ThemeColorScheme, ThemeColorSlot, ThemeFont, ThemeFontScheme, UnderlineStyle, VerticalAlign };
@@ -1,6 +1,6 @@
1
- import { AUTO_PARAGRAPH_SPACING_PX, eighthsToPixels, formatPx, halfPointsToPixels, halfPointsToPoints, twipsToPixels } from "./units.js";
2
1
  import { resolveColor, resolveHighlightToCss, resolveShadingColor } from "./colorResolver.js";
3
2
  import { resolveFontFamily, resolveThemeFont } from "./fontResolver.js";
3
+ import { AUTO_PARAGRAPH_SPACING_PX, eighthsToPixels, formatPx, halfPointsToPixels, halfPointsToPoints, twipsToPixels } from "./units.js";
4
4
  //#region src/utils/formatToStyle.ts
5
5
  /**
6
6
  * Convert TextFormatting to CSS properties for a run/span
@@ -1,8 +1,8 @@
1
- import { getFolioParaIdFromBlockId } from "./types/block-id.js";
1
+ import { FolioDocxReviewer } from "./ai-edits/headless.js";
2
2
  import { diffWordSegments } from "./ai-edits/word-diff.js";
3
3
  import { pairFolioDocumentStories } from "./document-stories.js";
4
- import { FolioDocxReviewer } from "./ai-edits/headless.js";
5
4
  import { FOLIO_DOCUMENT_METADATA_PROPERTIES, FOLIO_DOCUMENT_PRIVACY_TRANSFORMS, PRIVATE_METADATA_PROPERTIES_BY_TRANSFORM, isFolioDocumentPrivacyTransform } from "./docx/metadataPrivacy.js";
5
+ import { getFolioParaIdFromBlockId } from "./types/block-id.js";
6
6
  import { TaggedError, panic } from "better-result";
7
7
  //#region src/version-comparison.ts
8
8
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stll/folio-core",
3
- "version": "0.15.1",
3
+ "version": "0.15.3",
4
4
  "description": "Headless, framework-neutral core of folio: the OOXML (.docx) parser, document model, ProseMirror integration, and page-layout engine. No React.",
5
5
  "keywords": [
6
6
  "document-model",
@@ -107,7 +107,7 @@
107
107
  "perf": "bun scripts/profile-editor.ts"
108
108
  },
109
109
  "dependencies": {
110
- "@stll/docx-core": "^0.5.1",
110
+ "@stll/docx-core": "^0.6.0",
111
111
  "@stll/docx-utils": "^0.1.0",
112
112
  "@stll/template-conditions": "^0.1.0",
113
113
  "better-result": "2.10.0",