@stll/folio-core 0.14.1 → 0.15.1

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 (444) hide show
  1. package/dist/ai-edits/apply.d.ts +2 -2
  2. package/dist/ai-edits/blockRange.d.ts +3 -17
  3. package/dist/ai-edits/clean-text.d.ts +0 -1
  4. package/dist/ai-edits/headless.d.ts +23 -19
  5. package/dist/ai-edits/read.d.ts +8 -5
  6. package/dist/ai-edits/scoped-reading.d.ts +0 -1
  7. package/dist/ai-edits/snapshot.d.ts +1 -7
  8. package/dist/ai-edits/table-cell-mutations.d.ts +4 -31
  9. package/dist/ai-edits/table-row-column-mutations.d.ts +9 -39
  10. package/dist/ai-edits/table-targets.d.ts +0 -1
  11. package/dist/ai-edits/types.d.ts +32 -17
  12. package/dist/ai-suggestions/apply.d.ts +0 -1
  13. package/dist/ai-suggestions/conflict.d.ts +0 -1
  14. package/dist/ai-suggestions/text-positions.d.ts +2 -2
  15. package/dist/ai-suggestions/types.d.ts +27 -13
  16. package/dist/compat/eigenpal.d.ts +2 -1
  17. package/dist/compat/eigenpal.js +2 -1
  18. package/dist/content-controls/errors.d.ts +0 -1
  19. package/dist/content-controls/findContentControls.d.ts +6 -4
  20. package/dist/content-controls/mutateContentControls.d.ts +0 -1
  21. package/dist/controller/activeEditorStory.d.ts +1 -6
  22. package/dist/controller/collaborationModules.d.ts +0 -1
  23. package/dist/controller/contentControlWidgetController.d.ts +0 -1
  24. package/dist/controller/folioEditor.d.ts +2 -2
  25. package/dist/controller/folioEditorEvents.d.ts +5 -3
  26. package/dist/controller/fontReadiness.d.ts +0 -1
  27. package/dist/controller/headerFooterEditorManager.d.ts +1 -5
  28. package/dist/controller/hiddenEditorApi.d.ts +35 -18
  29. package/dist/controller/hiddenEditorManager.d.ts +5 -3
  30. package/dist/controller/latestRequestGate.d.ts +3 -1
  31. package/dist/controller/layoutPipeline.d.ts +1 -1
  32. package/dist/controller/layoutScheduler.d.ts +8 -5
  33. package/dist/controller/layoutSession.d.ts +0 -1
  34. package/dist/controller/noteEditorManager.d.ts +0 -1
  35. package/dist/document-operations.d.ts +5 -12
  36. package/dist/document-stories.d.ts +0 -1
  37. package/dist/docx/blockContentParser.d.ts +0 -1
  38. package/dist/docx/blockContentParser.js +1 -0
  39. package/dist/docx/bookmarkParser.d.ts +5 -3
  40. package/dist/docx/bookmarkPlacement.d.ts +0 -1
  41. package/dist/docx/commentParser.d.ts +0 -1
  42. package/dist/docx/commentRangeIntegrity.d.ts +0 -1
  43. package/dist/docx/commentReferenceNormalization.d.ts +1 -9
  44. package/dist/docx/commentReplyMarkers.d.ts +0 -1
  45. package/dist/docx/compatibility.d.ts +0 -1
  46. package/dist/docx/conformance.d.ts +0 -1
  47. package/dist/docx/corePropertiesParser.d.ts +0 -1
  48. package/dist/docx/documentParser.d.ts +0 -1
  49. package/dist/docx/documentParser.js +3 -1
  50. package/dist/docx/drawingUtils.d.ts +23 -2
  51. package/dist/docx/drawingUtils.js +23 -1
  52. package/dist/docx/encryption/agileDecryption.d.ts +0 -1
  53. package/dist/docx/encryption/cryptoBytes.js +4 -1
  54. package/dist/docx/encryption/openEncryptedDocx.d.ts +5 -2
  55. package/dist/docx/ensureParaIds.d.ts +7 -3
  56. package/dist/docx/fieldParser.d.ts +23 -11
  57. package/dist/docx/fontTableParser.d.ts +0 -1
  58. package/dist/docx/footnoteParser.d.ts +26 -13
  59. package/dist/docx/footnoteParser.js +4 -2
  60. package/dist/docx/groupDrawingParser.d.ts +0 -1
  61. package/dist/docx/headerFooterParser.d.ts +9 -5
  62. package/dist/docx/headerFooterRefParser.d.ts +0 -1
  63. package/dist/docx/headerFooterReferenceNormalization.d.ts +1 -6
  64. package/dist/docx/headerFooterVerbatim.d.ts +2 -2
  65. package/dist/docx/hyperlinkParser.d.ts +0 -1
  66. package/dist/docx/hyperlinkParser.js +1 -9
  67. package/dist/docx/imageParser.d.ts +0 -1
  68. package/dist/docx/imageParser.js +15 -7
  69. package/dist/docx/mathToMathml.d.ts +0 -1
  70. package/dist/docx/metadataPrivacy.d.ts +1 -3
  71. package/dist/docx/modelValidation.d.ts +0 -1
  72. package/dist/docx/newImage.d.ts +11 -0
  73. package/dist/docx/newImage.js +11 -0
  74. package/dist/docx/normalizeBaseDirection.d.ts +0 -1
  75. package/dist/docx/notePropertiesParser.d.ts +0 -1
  76. package/dist/docx/numberingParser.d.ts +10 -6
  77. package/dist/docx/numberingParser.js +4 -2
  78. package/dist/docx/numberingReferenceNormalization.d.ts +1 -9
  79. package/dist/docx/paragraphParser.d.ts +0 -1
  80. package/dist/docx/paragraphParser.js +27 -14
  81. package/dist/docx/paragraphTextBoxEnrichment.d.ts +0 -1
  82. package/dist/docx/paragraphTextBoxEnrichment.js +2 -1
  83. package/dist/docx/paragraphTraversal.d.ts +1 -8
  84. package/dist/docx/parser.d.ts +15 -8
  85. package/dist/docx/parser.js +12 -1
  86. package/dist/docx/parserEnums.d.ts +2 -2
  87. package/dist/docx/parserEnums.js +3 -2
  88. package/dist/docx/relsParser.d.ts +1 -0
  89. package/dist/docx/renderedPageBreakNormalization.d.ts +12 -0
  90. package/dist/docx/renderedPageBreakNormalization.js +59 -0
  91. package/dist/docx/replyToComment.d.ts +2 -2
  92. package/dist/docx/rezip.d.ts +6 -7
  93. package/dist/docx/rezip.js +136 -102
  94. package/dist/docx/runConsolidator.d.ts +0 -1
  95. package/dist/docx/runParser.d.ts +0 -1
  96. package/dist/docx/runParser.js +9 -12
  97. package/dist/docx/sdtProperties.d.ts +0 -1
  98. package/dist/docx/sdtPropertiesPatch.d.ts +0 -1
  99. package/dist/docx/sectionParser.d.ts +0 -1
  100. package/dist/docx/selectiveSave.d.ts +5 -3
  101. package/dist/docx/selectiveSave.js +2 -2
  102. package/dist/docx/selectiveSaveFlags.d.ts +4 -2
  103. package/dist/docx/selectiveXmlPatch.js +20 -8
  104. package/dist/docx/serializer/blockSdtSerializer.d.ts +0 -1
  105. package/dist/docx/serializer/blockSdtSerializer.js +2 -1
  106. package/dist/docx/serializer/borderSerializer.d.ts +0 -1
  107. package/dist/docx/serializer/commentSerializer.d.ts +0 -1
  108. package/dist/docx/serializer/commentSerializer.js +11 -37
  109. package/dist/docx/serializer/documentSerializer.d.ts +0 -1
  110. package/dist/docx/serializer/documentSerializer.js +1 -1
  111. package/dist/docx/serializer/fontTableSerializer.d.ts +0 -1
  112. package/dist/docx/serializer/headerFooterSerializer.d.ts +0 -1
  113. package/dist/docx/serializer/headerFooterSerializer.js +1 -1
  114. package/dist/docx/serializer/noteSerializer.d.ts +0 -1
  115. package/dist/docx/serializer/noteSerializer.js +1 -1
  116. package/dist/docx/serializer/numberingSerializer.d.ts +0 -1
  117. package/dist/docx/serializer/paragraphSerializer.d.ts +0 -1
  118. package/dist/docx/serializer/paragraphSerializer.js +10 -23
  119. package/dist/docx/serializer/runSerializer.d.ts +0 -1
  120. package/dist/docx/serializer/runSerializer.js +37 -22
  121. package/dist/docx/serializer/sectionPropertiesSerializer.d.ts +0 -1
  122. package/dist/docx/serializer/sectionPropertiesSerializer.js +5 -4
  123. package/dist/docx/serializer/settingsSerializer.d.ts +0 -1
  124. package/dist/docx/serializer/stylesSerializer.d.ts +0 -1
  125. package/dist/docx/serializer/tableSerializer.d.ts +0 -1
  126. package/dist/docx/serializer/tableSerializer.js +2 -0
  127. package/dist/docx/serializer/themeSerializer.d.ts +0 -1
  128. package/dist/docx/serializer/xmlUtils.js +10 -1
  129. package/dist/docx/server/applyDocxXmlPatchProposal.d.ts +3 -10
  130. package/dist/docx/server/docxToMarkdown.d.ts +0 -1
  131. package/dist/docx/server/evaluateDocxXmlPatchProposal.d.ts +3 -9
  132. package/dist/docx/server/inspectDocxPackage.d.ts +3 -8
  133. package/dist/docx/server/validateDocxConformance.d.ts +0 -1
  134. package/dist/docx/settingsParser.d.ts +2 -2
  135. package/dist/docx/shapeParser.d.ts +0 -1
  136. package/dist/docx/shapeParser.js +11 -10
  137. package/dist/docx/streamingXmlParser.d.ts +16 -0
  138. package/dist/docx/streamingXmlParser.js +248 -0
  139. package/dist/docx/styleParser.d.ts +0 -1
  140. package/dist/docx/styleParser.js +6 -4
  141. package/dist/docx/tableParser.d.ts +1 -2
  142. package/dist/docx/tableParser.js +3 -6
  143. package/dist/docx/textBoxParser.d.ts +1 -2
  144. package/dist/docx/textBoxParser.js +4 -1
  145. package/dist/docx/textWhitespace.d.ts +4 -0
  146. package/dist/docx/textWhitespace.js +4 -0
  147. package/dist/docx/themeParser.d.ts +0 -1
  148. package/dist/docx/trackedMoveRangeNormalization.d.ts +1 -8
  149. package/dist/docx/unzip.d.ts +6 -3
  150. package/dist/docx/unzip.js +96 -40
  151. package/dist/docx/vmlImageParser.d.ts +0 -1
  152. package/dist/docx/vmlImageParser.js +3 -1
  153. package/dist/docx/watermarkParser.d.ts +0 -1
  154. package/dist/docx/xmlParser.d.ts +21 -8
  155. package/dist/docx/xmlParser.js +126 -43
  156. package/dist/fields/bookmarkPages.d.ts +0 -1
  157. package/dist/fields/bookmarkText.d.ts +0 -1
  158. package/dist/fields/evaluateField.d.ts +5 -3
  159. package/dist/fields/fieldContext.d.ts +11 -5
  160. package/dist/fields/resolveFieldValues.d.ts +4 -3
  161. package/dist/fields/sectionPageCounts.d.ts +0 -1
  162. package/dist/fields/seqValues.d.ts +0 -1
  163. package/dist/fonts/embeddedFontTable.d.ts +5 -2
  164. package/dist/fonts/embeddedFonts.d.ts +15 -7
  165. package/dist/index.d.ts +3 -1
  166. package/dist/index.js +2 -1
  167. package/dist/layout-bridge/cellSelectionHighlight.d.ts +0 -1
  168. package/dist/layout-bridge/convert/footnoteLayout.d.ts +5 -3
  169. package/dist/layout-bridge/convert/headerFooterLayout.d.ts +2 -2
  170. package/dist/layout-bridge/convert/paragraphFrames.d.ts +0 -1
  171. package/dist/layout-bridge/convert/templatePreviewFlow.d.ts +8 -8
  172. package/dist/layout-bridge/convert/toFlowBlocks.d.ts +25 -13
  173. package/dist/layout-bridge/convert/wrapEditorViewAsSurface.d.ts +3 -2
  174. package/dist/layout-bridge/dom/findHfPmSpans.d.ts +2 -1
  175. package/dist/layout-bridge/dom/noteStoryDom.d.ts +0 -1
  176. package/dist/layout-bridge/engine/clickToPosition.d.ts +5 -3
  177. package/dist/layout-bridge/engine/hitTest.d.ts +40 -19
  178. package/dist/layout-bridge/engine/selectionRects.d.ts +16 -8
  179. package/dist/layout-bridge/engine/tableWidthUtils.d.ts +0 -1
  180. package/dist/layout-bridge/headerFooterLayout.d.ts +0 -1
  181. package/dist/layout-bridge/sectionColumns.d.ts +0 -1
  182. package/dist/layout-bridge/tableInsertHover.d.ts +8 -4
  183. package/dist/layout-engine/headerFooterRefs.d.ts +0 -1
  184. package/dist/layout-engine/index.d.ts +0 -1
  185. package/dist/layout-engine/justificationCompatibility.d.ts +0 -1
  186. package/dist/layout-engine/keep-together.d.ts +7 -4
  187. package/dist/layout-engine/layoutInstrumentation.d.ts +0 -1
  188. package/dist/layout-engine/lineFlow.d.ts +0 -1
  189. package/dist/layout-engine/measure/cache.d.ts +0 -1
  190. package/dist/layout-engine/measure/effectiveLineBreakPolicy.d.ts +6 -7
  191. package/dist/layout-engine/measure/floatingTablePosition.d.ts +0 -1
  192. package/dist/layout-engine/measure/floatingZones.d.ts +14 -6
  193. package/dist/layout-engine/measure/font-metrics.worker.d.ts +0 -1
  194. package/dist/layout-engine/measure/lineBreakProvider.d.ts +20 -9
  195. package/dist/layout-engine/measure/lineBreaks.d.ts +0 -1
  196. package/dist/layout-engine/measure/listMarkerWidth.d.ts +0 -1
  197. package/dist/layout-engine/measure/measureBlocks.d.ts +1 -0
  198. package/dist/layout-engine/measure/measureContainer.d.ts +0 -1
  199. package/dist/layout-engine/measure/measureHelpers.d.ts +0 -1
  200. package/dist/layout-engine/measure/measureParagraph.d.ts +3 -2
  201. package/dist/layout-engine/measure/measureParagraph.js +23 -3
  202. package/dist/layout-engine/measure/measureProvider.d.ts +0 -1
  203. package/dist/layout-engine/measure/measureTypes.d.ts +4 -2
  204. package/dist/layout-engine/measure/measureWorker.d.ts +0 -1
  205. package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +0 -1
  206. package/dist/layout-engine/measure/tableCellFloating.d.ts +0 -1
  207. package/dist/layout-engine/measure/tableCellFlow.d.ts +0 -1
  208. package/dist/layout-engine/measure/tableCellGrid.d.ts +0 -1
  209. package/dist/layout-engine/measure/textBoxParagraphLayout.d.ts +0 -1
  210. package/dist/layout-engine/measure/textMeasurementPolicy.d.ts +0 -1
  211. package/dist/layout-engine/paginator.d.ts +66 -33
  212. package/dist/layout-engine/paragraphFragmentRange.d.ts +0 -1
  213. package/dist/layout-engine/paragraphFrame.d.ts +0 -1
  214. package/dist/layout-engine/paragraphSequence.d.ts +0 -1
  215. package/dist/layout-engine/paragraphSpacing.d.ts +1 -5
  216. package/dist/layout-engine/pmPageIndex.d.ts +0 -1
  217. package/dist/layout-engine/renderedBreakReconciliation.d.ts +2 -17
  218. package/dist/layout-engine/section-breaks.d.ts +34 -17
  219. package/dist/layout-engine/tableRowBreak.d.ts +4 -3
  220. package/dist/layout-engine/textBoxFlow.d.ts +0 -1
  221. package/dist/layout-engine/textBoxGroup.d.ts +0 -1
  222. package/dist/layout-engine/types.d.ts +382 -189
  223. package/dist/layout-painter/anchoredImagePosition.d.ts +0 -1
  224. package/dist/layout-painter/borderStroke.d.ts +0 -1
  225. package/dist/layout-painter/imageLayout.d.ts +14 -7
  226. package/dist/layout-painter/index.d.ts +9 -5
  227. package/dist/layout-painter/registry/modules/image.d.ts +0 -1
  228. package/dist/layout-painter/registry/modules/paragraph.d.ts +0 -1
  229. package/dist/layout-painter/registry/modules/table.d.ts +0 -1
  230. package/dist/layout-painter/registry/modules/textBox.d.ts +0 -1
  231. package/dist/layout-painter/registry/modules.d.ts +0 -1
  232. package/dist/layout-painter/registry/registry.d.ts +0 -1
  233. package/dist/layout-painter/registry/types.d.ts +0 -1
  234. package/dist/layout-painter/renderFragment.d.ts +2 -2
  235. package/dist/layout-painter/renderImage.d.ts +0 -1
  236. package/dist/layout-painter/renderPage.d.ts +71 -42
  237. package/dist/layout-painter/renderParagraph.d.ts +28 -14
  238. package/dist/layout-painter/renderParagraph.js +6 -2
  239. package/dist/layout-painter/renderTable.d.ts +0 -1
  240. package/dist/layout-painter/renderTextBox.d.ts +0 -1
  241. package/dist/layout-painter/renderUtils.d.ts +17 -9
  242. package/dist/layout-painter/renderWatermark.d.ts +2 -2
  243. package/dist/layout-painter/sdtBoundary.d.ts +0 -1
  244. package/dist/managers/AutoSaveManager.d.ts +22 -11
  245. package/dist/managers/ClipboardManager.d.ts +0 -1
  246. package/dist/managers/ContextMenuManager.d.ts +5 -8
  247. package/dist/managers/DocumentLoaderManager.d.ts +12 -6
  248. package/dist/managers/EditorModeManager.d.ts +3 -2
  249. package/dist/managers/ErrorManager.d.ts +0 -1
  250. package/dist/managers/FindReplaceManager.d.ts +0 -1
  251. package/dist/managers/HistoryManager.d.ts +19 -9
  252. package/dist/managers/TableSelectionManager.d.ts +0 -1
  253. package/dist/managers/editorShortcuts.d.ts +4 -6
  254. package/dist/markdown/annotations.d.ts +0 -1
  255. package/dist/markdown/fromMarkdown.d.ts +0 -1
  256. package/dist/markdown/fromMarkdown.js +55 -5
  257. package/dist/markdown/images.d.ts +0 -1
  258. package/dist/markdown/index.d.ts +0 -1
  259. package/dist/markdown/internals.d.ts +0 -1
  260. package/dist/markdown/renderBlock.d.ts +0 -1
  261. package/dist/markdown/renderParagraph.d.ts +0 -1
  262. package/dist/markdown/renderRuns.d.ts +0 -1
  263. package/dist/markdown/renderTable.d.ts +0 -1
  264. package/dist/markdown/trailers.d.ts +0 -1
  265. package/dist/markdown/types.d.ts +39 -18
  266. package/dist/model.d.ts +3 -5
  267. package/dist/model.js +2 -2
  268. package/dist/paged-layout/incrementalMeasure.d.ts +1 -10
  269. package/dist/paged-layout/pageText.d.ts +1 -1
  270. package/dist/paged-layout/paragraphFlash.d.ts +0 -1
  271. package/dist/paged-layout/paragraphFlashTypes.d.ts +5 -2
  272. package/dist/paged-layout/rangeProjection.d.ts +10 -5
  273. package/dist/paged-layout/scrollNavigation.d.ts +0 -1
  274. package/dist/paged-layout/scrollPageInfo.d.ts +12 -13
  275. package/dist/paged-layout/scrollToPmPosition.d.ts +0 -1
  276. package/dist/paged-layout/sectionBlockWidths.d.ts +2 -11
  277. package/dist/paged-layout/sectionGeometry.d.ts +0 -1
  278. package/dist/paged-layout/selectionViewportRect.d.ts +0 -1
  279. package/dist/paged-layout/transactionDirtyRange.d.ts +0 -1
  280. package/dist/paged-layout/zoomScrollAnchor.d.ts +2 -12
  281. package/dist/prosemirror/attrs/index.d.ts +2 -2
  282. package/dist/prosemirror/attrs/index.js +5 -0
  283. package/dist/prosemirror/autospacingBase.d.ts +0 -1
  284. package/dist/prosemirror/cellDragSelection.d.ts +6 -4
  285. package/dist/prosemirror/commands/comments.d.ts +6 -4
  286. package/dist/prosemirror/commands/contentControls.d.ts +5 -3
  287. package/dist/prosemirror/commands/contentControlsBlockFill.d.ts +1 -1
  288. package/dist/prosemirror/commands/formatPainter.d.ts +0 -1
  289. package/dist/prosemirror/commands/formatting.d.ts +1 -1
  290. package/dist/prosemirror/commands/hyperlink.d.ts +4 -9
  291. package/dist/prosemirror/commands/image.d.ts +0 -1
  292. package/dist/prosemirror/commands/pageBreak.d.ts +0 -1
  293. package/dist/prosemirror/commands/paragraph.d.ts +0 -1
  294. package/dist/prosemirror/commands/pastePlainText.d.ts +0 -1
  295. package/dist/prosemirror/commands/propertyChangeScope.d.ts +0 -1
  296. package/dist/prosemirror/commands/sectionBreak.d.ts +0 -1
  297. package/dist/prosemirror/commands/table.d.ts +0 -1
  298. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -1
  299. package/dist/prosemirror/commentIdAllocator.d.ts +2 -2
  300. package/dist/prosemirror/commentOps.d.ts +0 -1
  301. package/dist/prosemirror/conversion/effectiveTableCellFormatting.d.ts +1 -10
  302. package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -1
  303. package/dist/prosemirror/conversion/fromProseDoc.js +7 -4
  304. package/dist/prosemirror/conversion/runShadingMark.d.ts +0 -1
  305. package/dist/prosemirror/conversion/sdtAttrs.d.ts +0 -1
  306. package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -2
  307. package/dist/prosemirror/conversion/toProseDoc.js +16 -2
  308. package/dist/prosemirror/extensions/ExtensionManager.d.ts +0 -1
  309. package/dist/prosemirror/extensions/StarterKit.d.ts +7 -4
  310. package/dist/prosemirror/extensions/core/DocExtension.d.ts +0 -1
  311. package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -1
  312. package/dist/prosemirror/extensions/core/ParagraphExtension.d.ts +0 -1
  313. package/dist/prosemirror/extensions/core/TextExtension.d.ts +0 -1
  314. package/dist/prosemirror/extensions/create.d.ts +0 -1
  315. package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.d.ts +0 -1
  316. package/dist/prosemirror/extensions/features/BaseKeymapExtension.d.ts +0 -1
  317. package/dist/prosemirror/extensions/features/BidiShortcutExtension.d.ts +0 -1
  318. package/dist/prosemirror/extensions/features/ContentControlWidgetsExtension.d.ts +0 -1
  319. package/dist/prosemirror/extensions/features/DropCursorExtension.d.ts +0 -1
  320. package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.d.ts +0 -1
  321. package/dist/prosemirror/extensions/features/GapCursorExtension.d.ts +0 -1
  322. package/dist/prosemirror/extensions/features/ImageDragExtension.d.ts +0 -1
  323. package/dist/prosemirror/extensions/features/ImagePasteExtension.d.ts +0 -1
  324. package/dist/prosemirror/extensions/features/ListExtension.d.ts +0 -1
  325. package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -1
  326. package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +7 -4
  327. package/dist/prosemirror/extensions/features/PasteCleanupExtension.d.ts +0 -1
  328. package/dist/prosemirror/extensions/features/PasteStyleInlinerExtension.d.ts +0 -1
  329. package/dist/prosemirror/extensions/features/SelectionTrackerExtension.d.ts +0 -1
  330. package/dist/prosemirror/extensions/features/bidiShortcutController.d.ts +3 -1
  331. package/dist/prosemirror/extensions/marks/AllCapsExtension.d.ts +0 -1
  332. package/dist/prosemirror/extensions/marks/BoldExtension.d.ts +0 -1
  333. package/dist/prosemirror/extensions/marks/CharacterSpacingExtension.d.ts +0 -1
  334. package/dist/prosemirror/extensions/marks/CharacterStyleExtension.d.ts +0 -1
  335. package/dist/prosemirror/extensions/marks/CommentExtension.d.ts +0 -1
  336. package/dist/prosemirror/extensions/marks/FontFamilyExtension.d.ts +0 -1
  337. package/dist/prosemirror/extensions/marks/FontFamilyExtension.js +1 -0
  338. package/dist/prosemirror/extensions/marks/FontSizeExtension.d.ts +0 -1
  339. package/dist/prosemirror/extensions/marks/FootnoteRefExtension.d.ts +0 -1
  340. package/dist/prosemirror/extensions/marks/HiddenTextExtension.d.ts +0 -1
  341. package/dist/prosemirror/extensions/marks/HighlightExtension.d.ts +0 -1
  342. package/dist/prosemirror/extensions/marks/HyperlinkExtension.d.ts +0 -1
  343. package/dist/prosemirror/extensions/marks/ItalicExtension.d.ts +0 -1
  344. package/dist/prosemirror/extensions/marks/LanguageExtension.d.ts +0 -1
  345. package/dist/prosemirror/extensions/marks/RtlExtension.d.ts +0 -1
  346. package/dist/prosemirror/extensions/marks/RunFormattingOverrideExtension.d.ts +0 -1
  347. package/dist/prosemirror/extensions/marks/RunShadingExtension.d.ts +0 -1
  348. package/dist/prosemirror/extensions/marks/SmallCapsExtension.d.ts +0 -1
  349. package/dist/prosemirror/extensions/marks/StrikeExtension.d.ts +0 -1
  350. package/dist/prosemirror/extensions/marks/SubscriptExtension.d.ts +0 -1
  351. package/dist/prosemirror/extensions/marks/SuperscriptExtension.d.ts +0 -1
  352. package/dist/prosemirror/extensions/marks/TextColorExtension.d.ts +0 -1
  353. package/dist/prosemirror/extensions/marks/TextEffectExtension.d.ts +0 -1
  354. package/dist/prosemirror/extensions/marks/TextEffectsExtensions.d.ts +0 -1
  355. package/dist/prosemirror/extensions/marks/TrackedChangeExtensions.d.ts +0 -1
  356. package/dist/prosemirror/extensions/marks/UnderlineExtension.d.ts +0 -1
  357. package/dist/prosemirror/extensions/marks/markUtils.d.ts +0 -1
  358. package/dist/prosemirror/extensions/marks/markUtils.js +4 -1
  359. package/dist/prosemirror/extensions/nodes/BlockSdtExtension.d.ts +0 -1
  360. package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +0 -1
  361. package/dist/prosemirror/extensions/nodes/HardBreakExtension.d.ts +0 -1
  362. package/dist/prosemirror/extensions/nodes/HorizontalRuleExtension.d.ts +0 -1
  363. package/dist/prosemirror/extensions/nodes/ImageExtension.d.ts +0 -1
  364. package/dist/prosemirror/extensions/nodes/ImageExtension.js +2 -0
  365. package/dist/prosemirror/extensions/nodes/MathExtension.d.ts +0 -1
  366. package/dist/prosemirror/extensions/nodes/PageBreakExtension.d.ts +0 -1
  367. package/dist/prosemirror/extensions/nodes/RenderedPageBreakExtension.d.ts +0 -1
  368. package/dist/prosemirror/extensions/nodes/SdtExtension.d.ts +0 -1
  369. package/dist/prosemirror/extensions/nodes/ShapeExtension.d.ts +0 -1
  370. package/dist/prosemirror/extensions/nodes/ShapeExtension.js +2 -0
  371. package/dist/prosemirror/extensions/nodes/TabExtension.d.ts +0 -1
  372. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +4 -3
  373. package/dist/prosemirror/extensions/nodes/TextBoxAnchorExtension.d.ts +0 -1
  374. package/dist/prosemirror/extensions/nodes/TextBoxExtension.d.ts +53 -27
  375. package/dist/prosemirror/extensions/types.d.ts +0 -1
  376. package/dist/prosemirror/findReplaceSelection.d.ts +5 -3
  377. package/dist/prosemirror/imageCommit.d.ts +0 -1
  378. package/dist/prosemirror/index.d.ts +4 -0
  379. package/dist/prosemirror/insertOperations.d.ts +0 -1
  380. package/dist/prosemirror/paraText.d.ts +0 -1
  381. package/dist/prosemirror/plugins/aiCitationDecorations.d.ts +2 -2
  382. package/dist/prosemirror/plugins/aiSuggestionDecorations.d.ts +0 -1
  383. package/dist/prosemirror/plugins/anonymizationDecorations.d.ts +9 -7
  384. package/dist/prosemirror/plugins/autocompleteSuggestion.d.ts +2 -2
  385. package/dist/prosemirror/plugins/contentControlWidgets.d.ts +4 -7
  386. package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +3 -8
  387. package/dist/prosemirror/plugins/documentStyles.d.ts +0 -1
  388. package/dist/prosemirror/plugins/pmTextScan.d.ts +2 -2
  389. package/dist/prosemirror/plugins/revisionIds.d.ts +0 -1
  390. package/dist/prosemirror/plugins/selectionTracker.d.ts +23 -12
  391. package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -1
  392. package/dist/prosemirror/plugins/templateDirectives.d.ts +10 -8
  393. package/dist/prosemirror/plugins/templatePreviewValues.d.ts +10 -5
  394. package/dist/prosemirror/plugins/templateSlashMenu.d.ts +2 -2
  395. package/dist/prosemirror/queries.d.ts +0 -1
  396. package/dist/prosemirror/schema/index.d.ts +0 -1
  397. package/dist/prosemirror/schema/marks.d.ts +8 -5
  398. package/dist/prosemirror/schema/nodes.d.ts +340 -163
  399. package/dist/prosemirror/selectionState.d.ts +13 -7
  400. package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +0 -1
  401. package/dist/prosemirror/styles/styleResolver.d.ts +3 -2
  402. package/dist/prosemirror/tableCellMergeRevision.d.ts +0 -1
  403. package/dist/prosemirror/tableResize.d.ts +0 -1
  404. package/dist/prosemirror/textBoxAnchorAttrs.d.ts +0 -1
  405. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +8 -5
  406. package/dist/prosemirror/utils/findParagraphByParaId.d.ts +0 -1
  407. package/dist/prosemirror/utils/tabCalculator.d.ts +18 -7
  408. package/dist/prosemirror/utils/visualLineNavigation.d.ts +0 -1
  409. package/dist/prosemirror/validation.d.ts +0 -1
  410. package/dist/redline.d.ts +16 -8
  411. package/dist/render-dom/BodySelectionOverlay.d.ts +1 -9
  412. package/dist/render-dom/HeaderFooterSelectionOverlay.d.ts +0 -1
  413. package/dist/render-dom/RemoteSelectionOverlay.d.ts +1 -8
  414. package/dist/render-dom/resolveSidebarItemPositions.d.ts +1 -9
  415. package/dist/style-engine/styleEngine.d.ts +21 -11
  416. package/dist/style-sets/extract.d.ts +4 -3
  417. package/dist/style-sets/stellaStyle.d.ts +0 -1
  418. package/dist/style-sets/types.d.ts +0 -1
  419. package/dist/symbols.d.ts +6 -2
  420. package/dist/types/block-id.d.ts +3 -6
  421. package/dist/types/document.d.ts +0 -3
  422. package/dist/types/documentEnumValues.d.ts +2 -1
  423. package/dist/types/documentEnumValues.js +6 -1
  424. package/dist/utils/clipboard.d.ts +17 -8
  425. package/dist/utils/colorResolver.d.ts +9 -5
  426. package/dist/utils/createDocument.d.ts +19 -10
  427. package/dist/utils/documentLoaderBehavior.d.ts +1 -5
  428. package/dist/utils/docxInput.js +1 -0
  429. package/dist/utils/findReplace.d.ts +0 -1
  430. package/dist/utils/fontFamilyMerge.d.ts +0 -1
  431. package/dist/utils/fontResolver.d.ts +10 -4
  432. package/dist/utils/formatToStyle.d.ts +0 -1
  433. package/dist/utils/headerFooter.d.ts +8 -16
  434. package/dist/utils/headingCollector.d.ts +7 -4
  435. package/dist/utils/mergeDocumentContent.d.ts +28 -0
  436. package/dist/utils/mergeDocumentContent.js +145 -0
  437. package/dist/utils/paragraphFormattingMerge.d.ts +0 -1
  438. package/dist/utils/replaceText.d.ts +0 -1
  439. package/dist/utils/rotationBoundingBox.d.ts +0 -1
  440. package/dist/utils/tableOperations.d.ts +0 -1
  441. package/dist/utils/textFormattingMerge.d.ts +0 -1
  442. package/dist/version-comparison.d.ts +12 -6
  443. package/dist/watermark/index.d.ts +0 -1
  444. package/package.json +3 -3
@@ -1,17 +1,23 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { EditorState } from "prosemirror-state";
3
-
4
3
  //#region src/prosemirror/selectionState.d.ts
5
4
  /**
6
5
  * Selection state for toolbar integration
7
6
  */
8
7
  type SelectionState = {
9
- /** Whether there's an active selection (not just cursor) */hasSelection: boolean; /** Whether selection spans multiple paragraphs */
10
- isMultiParagraph: boolean; /** Current text formatting at selection/cursor */
11
- textFormatting: document_d_exports.TextFormatting; /** Current paragraph formatting */
12
- paragraphFormatting: document_d_exports.ParagraphFormatting; /** Current paragraph style ID (e.g., 'Heading1', 'Normal') */
13
- styleId: string | null; /** Start paragraph index */
14
- startParagraphIndex: number; /** End paragraph index */
8
+ /** Whether there's an active selection (not just cursor) */
9
+ hasSelection: boolean;
10
+ /** Whether selection spans multiple paragraphs */
11
+ isMultiParagraph: boolean;
12
+ /** Current text formatting at selection/cursor */
13
+ textFormatting: document_d_exports.TextFormatting;
14
+ /** Current paragraph formatting */
15
+ paragraphFormatting: document_d_exports.ParagraphFormatting;
16
+ /** Current paragraph style ID (e.g., 'Heading1', 'Normal') */
17
+ styleId: string | null;
18
+ /** Start paragraph index */
19
+ startParagraphIndex: number;
20
+ /** End paragraph index */
15
21
  endParagraphIndex: number;
16
22
  };
17
23
  /**
@@ -1,6 +1,5 @@
1
1
  import { NumberingMap } from "../../docx/numberingParser.js";
2
2
  import { ResolvedParagraphStyle } from "./styleResolver.js";
3
-
4
3
  //#region src/prosemirror/styles/resolvedStyleAttrs.d.ts
5
4
  /**
6
5
  * The paragraph attrs a style definition controls. Applying a style resets
@@ -1,11 +1,12 @@
1
1
  import { document_d_exports } from "../../types/document.js";
2
-
3
2
  //#region src/prosemirror/styles/styleResolver.d.ts
4
3
  /**
5
4
  * Resolved style properties ready for rendering
6
5
  */
7
6
  type ResolvedParagraphStyle = {
8
- /** Paragraph formatting (alignment, spacing, indentation, etc.) */paragraphFormatting?: document_d_exports.ParagraphFormatting; /** Default run formatting from the style */
7
+ /** Paragraph formatting (alignment, spacing, indentation, etc.) */
8
+ paragraphFormatting?: document_d_exports.ParagraphFormatting;
9
+ /** Default run formatting from the style */
9
10
  runFormatting?: document_d_exports.TextFormatting;
10
11
  };
11
12
  /**
@@ -1,5 +1,4 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
-
3
2
  //#region src/prosemirror/tableCellMergeRevision.d.ts
4
3
  type TableCellMergeChange = Extract<NonNullable<document_d_exports.TableCell["structuralChange"]>, {
5
4
  type: "tableCellMerge";
@@ -1,5 +1,4 @@
1
1
  import { EditorView } from "prosemirror-view";
2
-
3
2
  //#region src/prosemirror/tableResize.d.ts
4
3
  /** 1px ≈ 15 twips at 96dpi (20 twips/pt × 72pt/in ÷ 96px/in). */
5
4
  declare const TWIPS_PER_PIXEL = 15;
@@ -1,7 +1,6 @@
1
1
  import { TextBoxAnchorAttrs } from "./schema/nodes.js";
2
2
  import { ReadProseMirrorAttrsResult } from "./attrs/index.js";
3
3
  import { Node } from "prosemirror-model";
4
-
5
4
  //#region src/prosemirror/textBoxAnchorAttrs.d.ts
6
5
  declare const readTextBoxAnchorAttrs: (node: Node) => ReadProseMirrorAttrsResult<TextBoxAnchorAttrs>;
7
6
  declare const expectTextBoxAnchorAttrs: (node: Node) => TextBoxAnchorAttrs;
@@ -1,5 +1,4 @@
1
1
  import { EditorState } from "prosemirror-state";
2
-
3
2
  //#region src/prosemirror/utils/extractTrackedChanges.d.ts
4
3
  /**
5
4
  * One tracked change surfaced by {@link extractTrackedChanges}. Each entry
@@ -43,8 +42,10 @@ type TrackedChangeEntry = {
43
42
  * Only set when `type === 'replacement'` — the text the user removed.
44
43
  * The inserted text lives in {@link TrackedChangeEntry.text}.
45
44
  */
46
- deletedText?: string | undefined; /** Author that minted the revision (`w:author`). */
47
- author: string; /** ISO timestamp the revision was minted (`w:date`). May be undefined for legacy imports. */
45
+ deletedText?: string | undefined;
46
+ /** Author that minted the revision (`w:author`). */
47
+ author: string;
48
+ /** ISO timestamp the revision was minted (`w:date`). May be undefined for legacy imports. */
48
49
  date?: string | undefined;
49
50
  /**
50
51
  * Document position where the revision starts. For inline types this
@@ -58,7 +59,8 @@ type TrackedChangeEntry = {
58
59
  * LAST run in the group; the intervening structural positions are not
59
60
  * preserved.
60
61
  */
61
- to: number; /** The `w:id` of the revision. */
62
+ to: number;
63
+ /** The `w:id` of the revision. */
62
64
  revisionId: number;
63
65
  /**
64
66
  * Only set when `type === 'replacement'` — the insertion half carries
@@ -80,7 +82,8 @@ type TrackedChangeEntry = {
80
82
  * @public
81
83
  */
82
84
  type TrackedChangesResult = {
83
- /** Tracked-change entries, sorted by document position, with adjacent same-revision entries merged. */entries: TrackedChangeEntry[];
85
+ /** Tracked-change entries, sorted by document position, with adjacent same-revision entries merged. */
86
+ entries: TrackedChangeEntry[];
84
87
  /**
85
88
  * Map of `commentId -> revisionId` for comments whose range overlaps a tracked-change mark.
86
89
  * Consumers (DocxEditor's threading effect) use this to thread comments under their tracked change.
@@ -1,5 +1,4 @@
1
1
  import { Node } from "prosemirror-model";
2
-
3
2
  //#region src/prosemirror/utils/findParagraphByParaId.d.ts
4
3
  /**
5
4
  * ProseMirror position range for the paragraph (or any textblock) whose
@@ -22,24 +22,33 @@ type TabLeader = "none" | "dot" | "hyphen" | "underscore" | "middleDot" | "heavy
22
22
  * Tab stop definition
23
23
  */
24
24
  type TabStop = {
25
- /** Tab alignment mode */val: TabAlignment; /** Position in twips from left margin */
26
- pos: number; /** Optional leader character */
25
+ /** Tab alignment mode */
26
+ val: TabAlignment;
27
+ /** Position in twips from left margin */
28
+ pos: number;
29
+ /** Optional leader character */
27
30
  leader?: TabLeader;
28
31
  };
29
32
  /**
30
33
  * Context for tab calculations
31
34
  */
32
35
  type TabContext = {
33
- /** Explicit tab stops from paragraph or style */explicitStops?: TabStop[]; /** Default tab interval in twips (default: 720 = 0.5 inch) */
34
- defaultTabInterval?: number; /** Left indent in twips */
36
+ /** Explicit tab stops from paragraph or style */
37
+ explicitStops?: TabStop[];
38
+ /** Default tab interval in twips (default: 720 = 0.5 inch) */
39
+ defaultTabInterval?: number;
40
+ /** Left indent in twips */
35
41
  leftIndent?: number;
36
42
  };
37
43
  /**
38
44
  * Result of tab width calculation
39
45
  */
40
46
  type TabWidthResult = {
41
- /** Width of the tab in pixels */width: number; /** Leader character to render (if any) */
42
- leader?: TabLeader; /** Alignment that was applied */
47
+ /** Width of the tab in pixels */
48
+ width: number;
49
+ /** Leader character to render (if any) */
50
+ leader?: TabLeader;
51
+ /** Alignment that was applied */
43
52
  alignment: TabAlignment | "default";
44
53
  };
45
54
  /** Default tab interval: 720 twips = 0.5 inch */
@@ -80,7 +89,9 @@ declare function computeTabStops(context: TabContext): TabStop[];
80
89
  * this module owns the stop grid + alignment math without owning measurement.
81
90
  */
82
91
  type TabFollowingContent = {
83
- /** Total width of the runs after the tab. Used for `end` and `center` stops. */followingWidth?: number; /** Width of the content before the decimal separator. Used for `decimal` stops. */
92
+ /** Total width of the runs after the tab. Used for `end` and `center` stops. */
93
+ followingWidth?: number;
94
+ /** Width of the content before the decimal separator. Used for `decimal` stops. */
84
95
  decimalPrefixWidth?: number;
85
96
  };
86
97
  /**
@@ -1,5 +1,4 @@
1
1
  import { EditorView } from "prosemirror-view";
2
-
3
2
  //#region src/prosemirror/utils/visualLineNavigation.d.ts
4
3
  /** @internal */
5
4
  type VisualLineState = {
@@ -1,5 +1,4 @@
1
1
  import { Node } from "prosemirror-model";
2
-
3
2
  //#region src/prosemirror/validation.d.ts
4
3
  type ProseMirrorDocumentValidationIssue = {
5
4
  path: string;
package/dist/redline.d.ts CHANGED
@@ -1,13 +1,16 @@
1
1
  import { FolioAIEditAppliedOperation, FolioAIEditSkippedOperation } from "./ai-edits/types.js";
2
2
  import { FolioDocumentStoryHandle, FolioResolvedReviewedView } from "./ai-edits/headless.js";
3
3
  import { FolioDocumentPrivacyOptions, FolioDocumentPrivacyReport } from "./docx/metadataPrivacy.js";
4
-
5
4
  //#region src/redline.d.ts
6
5
  /** Options for {@link generateRedlineDocx}. */
7
6
  type GenerateRedlineDocxOptions = {
8
- /** Author recorded on the generated tracked changes. (default: `"folio compare"`) */author?: string; /** Resolved base input state. (default: `"final"`) */
9
- baseView?: FolioResolvedReviewedView; /** Resolved revised input state. (default: `"final"`) */
10
- revisedView?: FolioResolvedReviewedView; /** Optional output-only package-metadata privacy transforms. */
7
+ /** Author recorded on the generated tracked changes. (default: `"folio compare"`) */
8
+ author?: string;
9
+ /** Resolved base input state. (default: `"final"`) */
10
+ baseView?: FolioResolvedReviewedView;
11
+ /** Resolved revised input state. (default: `"final"`) */
12
+ revisedView?: FolioResolvedReviewedView;
13
+ /** Optional output-only package-metadata privacy transforms. */
11
14
  privacy?: FolioDocumentPrivacyOptions;
12
15
  };
13
16
  declare const InvalidGenerateRedlineDocxOptionsError_base: import("better-result").TaggedErrorClass<"InvalidGenerateRedlineDocxOptionsError", {
@@ -23,10 +26,15 @@ type GenerateRedlineUnprocessedStory = {
23
26
  };
24
27
  /** Result of {@link generateRedlineDocx}. */
25
28
  type GenerateRedlineDocxResult = {
26
- /** The base package with generated tracked changes. */buffer: ArrayBuffer; /** Operations applied across every matched story. */
27
- applied: FolioAIEditAppliedOperation[]; /** Block operations that could not be applied. */
28
- skipped: FolioAIEditSkippedOperation[]; /** Package parts that could not be represented as story-scoped text edits. */
29
- unprocessedStories: GenerateRedlineUnprocessedStory[]; /** Privacy transforms applied to the generated package. */
29
+ /** The base package with generated tracked changes. */
30
+ buffer: ArrayBuffer;
31
+ /** Operations applied across every matched story. */
32
+ applied: FolioAIEditAppliedOperation[];
33
+ /** Block operations that could not be applied. */
34
+ skipped: FolioAIEditSkippedOperation[];
35
+ /** Package parts that could not be represented as story-scoped text edits. */
36
+ unprocessedStories: GenerateRedlineUnprocessedStory[];
37
+ /** Privacy transforms applied to the generated package. */
30
38
  privacyReport: FolioDocumentPrivacyReport;
31
39
  };
32
40
  /** Compare two buffers and return tracked changes for every matched editable story. */
@@ -1,5 +1,4 @@
1
1
  import { EditorState } from "prosemirror-state";
2
-
3
2
  //#region src/render-dom/BodySelectionOverlay.d.ts
4
3
  type BodySelectionOverlayResult = {
5
4
  type: "text";
@@ -18,14 +17,7 @@ type SyncBodySelectionOverlayOptions = {
18
17
  };
19
18
  declare class BodySelectionOverlay {
20
19
  clear(pagesContainer: HTMLElement): void;
21
- sync({
22
- pagesContainer,
23
- state,
24
- zoom,
25
- zIndex,
26
- caretColor,
27
- selectionColor
28
- }: SyncBodySelectionOverlayOptions): BodySelectionOverlayResult;
20
+ sync({ pagesContainer, state, zoom, zIndex, caretColor, selectionColor }: SyncBodySelectionOverlayOptions): BodySelectionOverlayResult;
29
21
  }
30
22
  //#endregion
31
23
  export { BodySelectionOverlay, BodySelectionOverlayResult, SyncBodySelectionOverlayOptions };
@@ -1,5 +1,4 @@
1
1
  import { HfSlotKind } from "../layout-bridge/dom/findHfPmSpans.js";
2
-
3
2
  //#region src/render-dom/HeaderFooterSelectionOverlay.d.ts
4
3
  type HeaderFooterSelection = {
5
4
  from: number;
@@ -1,6 +1,5 @@
1
1
  import { HiddenProseMirrorRemoteSelection } from "../controller/hiddenEditorManager.js";
2
2
  import { RenderedDomContext, RenderedDomPoint, RenderedDomRect } from "./RenderedDomContext.js";
3
-
4
3
  //#region src/render-dom/RemoteSelectionOverlay.d.ts
5
4
  type SyncRemoteSelectionOverlayOptions = {
6
5
  pagesContainer: HTMLElement;
@@ -18,13 +17,7 @@ declare const resolveRemoteSelectionOverlayGeometry: (renderedDomContext: Render
18
17
  /** Paint collaborative cursors and selections over the rendered page DOM. */
19
18
  declare class RemoteSelectionOverlay {
20
19
  clear(pagesContainer: HTMLElement): void;
21
- sync({
22
- pagesContainer,
23
- selections,
24
- zoom,
25
- zIndex,
26
- renderedDomContext
27
- }: SyncRemoteSelectionOverlayOptions): void;
20
+ sync({ pagesContainer, selections, zoom, zIndex, renderedDomContext }: SyncRemoteSelectionOverlayOptions): void;
28
21
  }
29
22
  //#endregion
30
23
  export { RemoteSelectionOverlay, RemoteSelectionOverlayGeometry, SyncRemoteSelectionOverlayOptions, resolveRemoteSelectionOverlayGeometry };
@@ -1,5 +1,4 @@
1
1
  import { RenderedDomContext } from "./RenderedDomContext.js";
2
-
3
2
  //#region src/render-dom/resolveSidebarItemPositions.d.ts
4
3
  type RenderedSidebarItem = {
5
4
  id: string;
@@ -21,13 +20,6 @@ type ResolveSidebarItemPositionsOptions<T extends RenderedSidebarItem> = {
21
20
  cardHeights: Map<string, number>;
22
21
  lastKnown: Map<string, number>;
23
22
  };
24
- declare const resolveSidebarItemPositions: <T extends RenderedSidebarItem>({
25
- items,
26
- anchorPositions,
27
- renderedDomContext,
28
- zoom,
29
- cardHeights,
30
- lastKnown
31
- }: ResolveSidebarItemPositionsOptions<T>) => ResolvedSidebarItemPosition<T>[];
23
+ declare const resolveSidebarItemPositions: <T extends RenderedSidebarItem>({ items, anchorPositions, renderedDomContext, zoom, cardHeights, lastKnown }: ResolveSidebarItemPositionsOptions<T>) => ResolvedSidebarItemPosition<T>[];
32
24
  //#endregion
33
25
  export { RenderedSidebarItem, ResolveSidebarItemPositionsOptions, ResolvedSidebarItemPosition, resolveSidebarItemPositions };
@@ -1,6 +1,5 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { ResolvedParagraphStyle, TableCellParagraphSpacingOverlay } from "../prosemirror/styles/styleResolver.js";
3
-
4
3
  //#region src/style-engine/styleEngine.d.ts
5
4
  /** Engine construction options. */
6
5
  type StyleEngineOptions = {
@@ -17,7 +16,8 @@ type StyleEngineOptions = {
17
16
  /** Lightweight observability for cache effectiveness. */
18
17
  type StyleEngineCacheStats = {
19
18
  hits: number;
20
- misses: number; /** Total entries across all internal caches. */
19
+ misses: number;
20
+ /** Total entries across all internal caches. */
21
21
  size: number;
22
22
  };
23
23
  /**
@@ -28,13 +28,21 @@ type StyleEngineCacheStats = {
28
28
  * objects are shared between cache hits — treat them as immutable.
29
29
  */
30
30
  type StyleEngine = {
31
- /** Look up a single named style by id. */getStyle: (styleId: string) => document_d_exports.Style | undefined; /** True if a style with the given id is registered. */
32
- hasStyle: (styleId: string) => boolean; /** Return the document-wide defaults (`w:docDefaults`). */
33
- getDocDefaults: () => document_d_exports.DocDefaults | undefined; /** The style flagged `w:default="1"` for paragraphs, else "Normal". */
34
- getDefaultParagraphStyle: () => document_d_exports.Style | undefined; /** The style flagged `w:default="1"` for character styles. */
35
- getDefaultCharacterStyle: () => document_d_exports.Style | undefined; /** The style flagged `w:default="1"` for tables. */
36
- getDefaultTableStyle: () => document_d_exports.Style | undefined; /** All visible paragraph styles, sorted for toolbar use. */
37
- getParagraphStyles: () => document_d_exports.Style[]; /** All visible table styles, sorted for the table-style gallery. */
31
+ /** Look up a single named style by id. */
32
+ getStyle: (styleId: string) => document_d_exports.Style | undefined;
33
+ /** True if a style with the given id is registered. */
34
+ hasStyle: (styleId: string) => boolean;
35
+ /** Return the document-wide defaults (`w:docDefaults`). */
36
+ getDocDefaults: () => document_d_exports.DocDefaults | undefined;
37
+ /** The style flagged `w:default="1"` for paragraphs, else "Normal". */
38
+ getDefaultParagraphStyle: () => document_d_exports.Style | undefined;
39
+ /** The style flagged `w:default="1"` for character styles. */
40
+ getDefaultCharacterStyle: () => document_d_exports.Style | undefined;
41
+ /** The style flagged `w:default="1"` for tables. */
42
+ getDefaultTableStyle: () => document_d_exports.Style | undefined;
43
+ /** All visible paragraph styles, sorted for toolbar use. */
44
+ getParagraphStyles: () => document_d_exports.Style[];
45
+ /** All visible table styles, sorted for the table-style gallery. */
38
46
  getTableStyles: () => document_d_exports.Style[];
39
47
  /**
40
48
  * Resolve the full paragraph cascade for a given styleId.
@@ -64,8 +72,10 @@ type StyleEngine = {
64
72
  * used when the caller has already merged docDefaults via the
65
73
  * paragraph cascade and would otherwise double-apply font defaults.
66
74
  */
67
- getRunStyleOwnProperties: (styleId: string | undefined | null) => document_d_exports.TextFormatting | undefined; /** Drop every memoized cascade result. */
68
- invalidate: () => void; /** Inspect cache effectiveness (hits, misses, current size). */
75
+ getRunStyleOwnProperties: (styleId: string | undefined | null) => document_d_exports.TextFormatting | undefined;
76
+ /** Drop every memoized cascade result. */
77
+ invalidate: () => void;
78
+ /** Inspect cache effectiveness (hits, misses, current size). */
69
79
  stats: () => StyleEngineCacheStats;
70
80
  };
71
81
  /**
@@ -1,11 +1,12 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { DocumentStyleSet } from "./types.js";
3
3
  import { DocxInput } from "../utils/docxInput.js";
4
-
5
4
  //#region src/style-sets/extract.d.ts
6
5
  type ExtractDocumentStyleSetOptions = {
7
- name: string; /** Style IDs selected by the user. Omit to extract every style. */
8
- styleIds?: readonly string[]; /** Defaults to the source document's default paragraph style. */
6
+ name: string;
7
+ /** Style IDs selected by the user. Omit to extract every style. */
8
+ styleIds?: readonly string[];
9
+ /** Defaults to the source document's default paragraph style. */
9
10
  initialParagraphStyleId?: string;
10
11
  };
11
12
  type DocumentStyleCatalogEntry = {
@@ -1,5 +1,4 @@
1
1
  import { DocumentPreset, DocumentStyleSet } from "./types.js";
2
-
3
2
  //#region src/style-sets/stellaStyle.d.ts
4
3
  declare const STELLA_STYLE_SET_NAME = "Stella Style";
5
4
  /**
@@ -1,5 +1,4 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
-
3
2
  //#region src/style-sets/types.d.ts
4
3
  declare const DOCUMENT_STYLE_SET_VERSION: 1;
5
4
  declare const DOCUMENT_PRESET_VERSION: 1;
package/dist/symbols.d.ts CHANGED
@@ -8,13 +8,17 @@
8
8
  * each adapter's own translator; the `char`/`name` pairs are the raw catalog.
9
9
  */
10
10
  type SymbolEntry = {
11
- /** The character to insert. */char: string; /** English descriptive name, used for search matching. */
11
+ /** The character to insert. */
12
+ char: string;
13
+ /** English descriptive name, used for search matching. */
12
14
  name: string;
13
15
  };
14
16
  /** i18n message keys for the symbol-category display labels. */
15
17
  type SymbolCategoryNameKey = "dialogs.insertSymbol.categories.common" | "dialogs.insertSymbol.categories.arrows" | "dialogs.insertSymbol.categories.math" | "dialogs.insertSymbol.categories.greek" | "dialogs.insertSymbol.categories.currency" | "dialogs.insertSymbol.categories.shapes";
16
18
  type SymbolCategory = {
17
- /** Stable category id (also the default active tab). */name: string; /** i18n key for the category's display label. */
19
+ /** Stable category id (also the default active tab). */
20
+ name: string;
21
+ /** i18n key for the category's display label. */
18
22
  nameKey: SymbolCategoryNameKey;
19
23
  symbols: SymbolEntry[];
20
24
  };
@@ -26,7 +26,8 @@ type DeriveBlockIdInput = {
26
26
  * Source paragraph's `w14:paraId` (or any equivalent stable id),
27
27
  * or `null` when the paragraph has none.
28
28
  */
29
- paraId: string | null; /** 1-based document order for the paragraph being derived. */
29
+ paraId: string | null;
30
+ /** 1-based document order for the paragraph being derived. */
30
31
  index: number;
31
32
  /**
32
33
  * Ids already minted in the same derivation pass. Used to bump
@@ -35,11 +36,7 @@ type DeriveBlockIdInput = {
35
36
  */
36
37
  taken: ReadonlySet<string>;
37
38
  };
38
- declare const deriveBlockId: ({
39
- paraId,
40
- index,
41
- taken
42
- }: DeriveBlockIdInput) => FolioBlockId;
39
+ declare const deriveBlockId: ({ paraId, index, taken }: DeriveBlockIdInput) => FolioBlockId;
43
40
  declare const isSequentialFolioBlockId: (id: string) => boolean;
44
41
  /**
45
42
  * Extract the paraId an id was derived from, if any. Returns `null`
@@ -1,7 +1,4 @@
1
1
  export type * from "@stll/docx-core/model";
2
-
3
- //#region src/types/document.d.ts
4
-
5
2
  import * as import__stll_docx_core_model from "@stll/docx-core/model";
6
3
  //#endregion
7
4
  export { import__stll_docx_core_model as document_d_exports };
@@ -6,6 +6,7 @@ declare const HIGHLIGHT_COLOR_VALUES: readonly ["black", "blue", "cyan", "darkBl
6
6
  declare const TEXT_EFFECT_VALUES: readonly ["none", "blinkBackground", "lights", "antsBlack", "antsRed", "shimmer", "sparkle"];
7
7
  declare const EMPHASIS_MARK_VALUES: readonly ["none", "dot", "comma", "circle", "underDot"];
8
8
  declare const FONT_THEME_VALUES: readonly ["majorAscii", "majorHAnsi", "majorEastAsia", "majorBidi", "minorAscii", "minorHAnsi", "minorEastAsia", "minorBidi"];
9
+ declare const FONT_HINT_VALUES: readonly ["default", "eastAsia", "cs"];
9
10
  declare const PARAGRAPH_ALIGNMENT_VALUES: readonly ["left", "center", "right", "both", "distribute", "mediumKashida", "highKashida", "lowKashida", "thaiDistribute"];
10
11
  declare const LINE_SPACING_RULE_VALUES: readonly ["auto", "exact", "atLeast"];
11
12
  declare const TAB_STOP_ALIGNMENT_VALUES: readonly ["left", "center", "right", "decimal", "bar", "clear", "num"];
@@ -86,4 +87,4 @@ type OutlineStyleAttr = (typeof OUTLINE_STYLE_ATTR_VALUES)[number];
86
87
  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"];
87
88
  declare const LEVEL_SUFFIX_VALUES: readonly ["tab", "space", "nothing"];
88
89
  //#endregion
89
- 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_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 };
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 };
@@ -106,6 +106,11 @@ const FONT_THEME_VALUES = [
106
106
  "minorEastAsia",
107
107
  "minorBidi"
108
108
  ];
109
+ const FONT_HINT_VALUES = [
110
+ "default",
111
+ "eastAsia",
112
+ "cs"
113
+ ];
109
114
  const PARAGRAPH_ALIGNMENT_VALUES = [
110
115
  "left",
111
116
  "center",
@@ -690,4 +695,4 @@ const LEVEL_SUFFIX_VALUES = [
690
695
  "nothing"
691
696
  ];
692
697
  //#endregion
693
- 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_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 };
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 };
@@ -1,29 +1,38 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
-
3
2
  //#region src/utils/clipboard.d.ts
4
3
  /**
5
4
  * Clipboard content format
6
5
  */
7
6
  type ClipboardContent = {
8
- /** Plain text representation */plainText: string; /** HTML representation */
9
- html: string; /** Internal format (JSON) for preserving full formatting */
7
+ /** Plain text representation */
8
+ plainText: string;
9
+ /** HTML representation */
10
+ html: string;
11
+ /** Internal format (JSON) for preserving full formatting */
10
12
  internal?: string;
11
13
  };
12
14
  /**
13
15
  * Parsed clipboard content
14
16
  */
15
17
  type ParsedClipboardContent = {
16
- /** Runs parsed from clipboard */runs: document_d_exports.Run[]; /** Whether content came from Word */
17
- fromWord: boolean; /** Whether content came from our editor */
18
- fromEditor: boolean; /** Original plain text */
18
+ /** Runs parsed from clipboard */
19
+ runs: document_d_exports.Run[];
20
+ /** Whether content came from Word */
21
+ fromWord: boolean;
22
+ /** Whether content came from our editor */
23
+ fromEditor: boolean;
24
+ /** Original plain text */
19
25
  plainText: string;
20
26
  };
21
27
  /**
22
28
  * Options for clipboard operations
23
29
  */
24
30
  type ClipboardOptions = {
25
- /** Whether to include formatting in copy */includeFormatting?: boolean; /** Whether to clean Word-specific formatting */
26
- cleanWordFormatting?: boolean; /** Callback for handling errors */
31
+ /** Whether to include formatting in copy */
32
+ includeFormatting?: boolean;
33
+ /** Whether to clean Word-specific formatting */
34
+ cleanWordFormatting?: boolean;
35
+ /** Callback for handling errors */
27
36
  onError?: (error: Error) => void;
28
37
  };
29
38
  /**
@@ -1,5 +1,4 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
-
3
2
  //#region src/utils/colorResolver.d.ts
4
3
  /**
5
4
  * Public form of the same hex-color check, for callers that read a color
@@ -127,10 +126,15 @@ declare function resolveHighlightToCss(value: string): string;
127
126
  * Theme color matrix cell
128
127
  */
129
128
  type ThemeMatrixCell = {
130
- /** Resolved hex color (6 chars, no #) */hex: string; /** Theme color slot */
131
- themeSlot: document_d_exports.ThemeColorSlot; /** Tint hex modifier if applicable (e.g., "CC") */
132
- tint?: string; /** Shade hex modifier if applicable (e.g., "BF") */
133
- shade?: string; /** Human-readable label (e.g., "Accent 1, Lighter 60%") */
129
+ /** Resolved hex color (6 chars, no #) */
130
+ hex: string;
131
+ /** Theme color slot */
132
+ themeSlot: document_d_exports.ThemeColorSlot;
133
+ /** Tint hex modifier if applicable (e.g., "CC") */
134
+ tint?: string;
135
+ /** Shade hex modifier if applicable (e.g., "BF") */
136
+ shade?: string;
137
+ /** Human-readable label (e.g., "Accent 1, Lighter 60%") */
134
138
  label: string;
135
139
  };
136
140
  /**
@@ -1,25 +1,34 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { DocumentPreset, DocumentStyleSet } from "../style-sets/types.js";
3
-
4
3
  //#region src/utils/createDocument.d.ts
5
4
  /**
6
5
  * Options for creating an empty document
7
6
  */
8
7
  type CreateEmptyDocumentBaseOptions = {
9
- /** Page width in twips (default: 12240 = 8.5 inches) */pageWidth?: number; /** Page height in twips (default: 15840 = 11 inches) */
10
- pageHeight?: number; /** Page orientation (default: 'portrait') */
11
- orientation?: "portrait" | "landscape"; /** Top margin in twips (default: 1440 = 1 inch) */
12
- marginTop?: number; /** Bottom margin in twips (default: 1440 = 1 inch) */
13
- marginBottom?: number; /** Left margin in twips (default: 1440 = 1 inch) */
14
- marginLeft?: number; /** Right margin in twips (default: 1440 = 1 inch) */
15
- marginRight?: number; /** Initial text content (default: empty string) */
8
+ /** Page width in twips (default: 12240 = 8.5 inches) */
9
+ pageWidth?: number;
10
+ /** Page height in twips (default: 15840 = 11 inches) */
11
+ pageHeight?: number;
12
+ /** Page orientation (default: 'portrait') */
13
+ orientation?: "portrait" | "landscape";
14
+ /** Top margin in twips (default: 1440 = 1 inch) */
15
+ marginTop?: number;
16
+ /** Bottom margin in twips (default: 1440 = 1 inch) */
17
+ marginBottom?: number;
18
+ /** Left margin in twips (default: 1440 = 1 inch) */
19
+ marginLeft?: number;
20
+ /** Right margin in twips (default: 1440 = 1 inch) */
21
+ marginRight?: number;
22
+ /** Initial text content (default: empty string) */
16
23
  initialText?: string;
17
24
  };
18
25
  type CreateEmptyDocumentStyleOptions = {
19
- /** Reusable formatting resources for the new document. */styleSet?: DocumentStyleSet;
26
+ /** Reusable formatting resources for the new document. */
27
+ styleSet?: DocumentStyleSet;
20
28
  preset?: never;
21
29
  } | {
22
- /** Style resources plus page-level defaults for the new document. */preset: DocumentPreset;
30
+ /** Style resources plus page-level defaults for the new document. */
31
+ preset: DocumentPreset;
23
32
  styleSet?: never;
24
33
  };
25
34
  type CreateEmptyDocumentOptions = CreateEmptyDocumentBaseOptions & CreateEmptyDocumentStyleOptions;