oasis-editor 0.0.1 → 0.0.2

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 (363) hide show
  1. package/README.md +388 -1
  2. package/dist/OasisEditorApp-DEnDLTaw.js +45893 -0
  3. package/dist/app/bootstrap/createOasisEditorApp.d.ts +2 -3
  4. package/dist/app/bootstrap/createOasisEditorContainer.d.ts +2 -3
  5. package/dist/app/client/OasisEditorClient.d.ts +97 -0
  6. package/dist/app/controllers/EditorCommandsController.d.ts +1 -1
  7. package/dist/app/controllers/createResizeSession.d.ts +43 -0
  8. package/dist/app/controllers/createRotateSession.d.ts +36 -0
  9. package/dist/app/controllers/documentIO/DocumentImporter.d.ts +1 -1
  10. package/dist/app/controllers/tableResize/tableResizeApply.d.ts +5 -0
  11. package/dist/app/controllers/tableResize/tableResizeConstraints.d.ts +17 -0
  12. package/dist/app/controllers/tableResize/tableResizeDom.d.ts +9 -0
  13. package/dist/app/controllers/tableResize/tableResizeGeometry.d.ts +5 -0
  14. package/dist/app/controllers/tableResize/tableResizeHitTest.d.ts +4 -0
  15. package/dist/app/controllers/tableResize/tableResizeTypes.d.ts +65 -0
  16. package/dist/app/controllers/tableResize/tableResizeUnits.d.ts +6 -0
  17. package/dist/app/controllers/useEditorDocumentIO.d.ts +3 -3
  18. package/dist/app/controllers/useEditorHistoryActions.d.ts +3 -1
  19. package/dist/app/controllers/useEditorImageOperations.d.ts +6 -14
  20. package/dist/app/controllers/useEditorLayout.d.ts +2 -2
  21. package/dist/app/controllers/useEditorStyle.d.ts +1 -1
  22. package/dist/app/controllers/useEditorSurfaceEvents.d.ts +1 -0
  23. package/dist/app/controllers/useEditorTableOperations.d.ts +2 -2
  24. package/dist/app/controllers/useEditorTableResize.d.ts +2 -24
  25. package/dist/app/controllers/useEditorTextBoxOperations.d.ts +24 -0
  26. package/dist/app/services/userPreferences.d.ts +4 -0
  27. package/dist/assets/importDocxWorker-R5rI6JIO.js +12 -0
  28. package/dist/branding/apple-touch-icon.png +0 -0
  29. package/dist/branding/brand-mark.webp +0 -0
  30. package/dist/branding/favicon-16x16.png +0 -0
  31. package/dist/branding/favicon-32x32.png +0 -0
  32. package/dist/branding/favicon.ico +0 -0
  33. package/dist/branding/github-pages-icon.png +0 -0
  34. package/dist/branding/icon-192.png +0 -0
  35. package/dist/branding/icon-512.png +0 -0
  36. package/dist/branding/logo-full.png +0 -0
  37. package/dist/branding/logo-mark-square.png +0 -0
  38. package/dist/branding/social-card.png +0 -0
  39. package/dist/core/Editor.d.ts +4 -5
  40. package/dist/core/cloneState.d.ts +3 -1
  41. package/dist/core/commands/CommandRegistry.d.ts +6 -1
  42. package/dist/core/commands/block.d.ts +1 -1
  43. package/dist/core/commands/builtinCommands.d.ts +2 -0
  44. package/dist/core/commands/floatingLayout.d.ts +29 -0
  45. package/dist/core/commands/image.d.ts +16 -8
  46. package/dist/core/commands/list.d.ts +1 -1
  47. package/dist/core/commands/publicCommandTypes.d.ts +110 -0
  48. package/dist/core/commands/selectedObjectRun.d.ts +20 -0
  49. package/dist/core/commands/table/insertTableCommand.d.ts +3 -0
  50. package/dist/core/commands/table/tableCellStyleCommands.d.ts +5 -0
  51. package/dist/core/commands/table/tableColumnCommands.d.ts +3 -0
  52. package/dist/core/commands/table/tableCommandUtils.d.ts +16 -0
  53. package/dist/core/commands/table/tableRowCommands.d.ts +5 -0
  54. package/dist/core/commands/table/tableStyleCommands.d.ts +4 -0
  55. package/dist/core/commands/table.d.ts +5 -10
  56. package/dist/core/commands/text.d.ts +1 -1
  57. package/dist/core/commands/textBox.d.ts +21 -0
  58. package/dist/core/document/blockReplacement.d.ts +7 -0
  59. package/dist/core/document/bookmarkAnchors.d.ts +8 -0
  60. package/dist/core/document/clone.d.ts +8 -0
  61. package/dist/core/document/paragraphRunBuild.d.ts +14 -0
  62. package/dist/core/document/paragraphRunEdit.d.ts +3 -0
  63. package/dist/core/document/paragraphRunQuery.d.ts +14 -0
  64. package/dist/core/document/paragraphRuns.d.ts +3 -0
  65. package/dist/core/editorCommands.d.ts +2 -0
  66. package/dist/core/editorState.d.ts +5 -3
  67. package/dist/core/endnotes.d.ts +41 -0
  68. package/dist/core/engine.d.ts +18 -3
  69. package/dist/core/html/htmlBlockWalker.d.ts +17 -0
  70. package/dist/core/html/htmlEscape.d.ts +1 -0
  71. package/dist/core/html/htmlStyleParser.d.ts +3 -0
  72. package/dist/core/html/htmlTextSerializer.d.ts +5 -0
  73. package/dist/core/html/inlineImageParser.d.ts +3 -0
  74. package/dist/core/html/inlineStyleParser.d.ts +3 -0
  75. package/dist/core/html/paragraphStyleParser.d.ts +3 -0
  76. package/dist/core/html/styleCss.d.ts +5 -0
  77. package/dist/core/model/assets.d.ts +7 -0
  78. package/dist/core/model/documentIndex.d.ts +58 -0
  79. package/dist/core/model/documentSections.d.ts +4 -0
  80. package/dist/core/model/editingZones.d.ts +26 -0
  81. package/dist/core/model/editorState.d.ts +18 -0
  82. package/dist/core/model/index.d.ts +31 -0
  83. package/dist/core/model/pageGeometry.d.ts +14 -0
  84. package/dist/core/model/paragraphWalker.d.ts +5 -0
  85. package/dist/core/model/queries.d.ts +2 -1
  86. package/dist/core/model/styleDefaults.d.ts +6 -0
  87. package/dist/core/model/styleResolution.d.ts +44 -0
  88. package/dist/core/model/types/document.d.ts +86 -0
  89. package/dist/core/model/types/documentBookmarks.d.ts +49 -0
  90. package/dist/core/model/types/documentEndnotes.d.ts +8 -0
  91. package/dist/core/model/types/documentFootnotes.d.ts +8 -0
  92. package/dist/core/model/types/layout.d.ts +93 -0
  93. package/dist/core/model/types/nodes.d.ts +192 -0
  94. package/dist/core/model/types/primitives.d.ts +140 -0
  95. package/dist/core/model/types/selection.d.ts +14 -0
  96. package/dist/core/model/types/styles.d.ts +149 -0
  97. package/dist/core/model.d.ts +7 -444
  98. package/dist/core/plugin.d.ts +59 -6
  99. package/dist/core/plugins/PluginCollection.d.ts +1 -0
  100. package/dist/core/plugins/PluginUiRegistry.d.ts +20 -0
  101. package/dist/core/selection/navigation.d.ts +5 -0
  102. package/dist/core/selection/rangeEditing.d.ts +13 -0
  103. package/dist/core/textStyle/textStyleKeys.d.ts +6 -0
  104. package/dist/core/textStyle/textStyleMutations.d.ts +8 -0
  105. package/dist/export/docx/bookmarksXml.d.ts +21 -0
  106. package/dist/export/docx/borders.d.ts +25 -0
  107. package/dist/export/docx/docxTypes.d.ts +35 -2
  108. package/dist/export/docx/endnotesXml.d.ts +24 -0
  109. package/dist/export/docx/stylesXml.d.ts +3 -0
  110. package/dist/export/docx/tableXml.d.ts +7 -1
  111. package/dist/export/docx/text/blocksXml.d.ts +7 -0
  112. package/dist/export/docx/text/constants.d.ts +6 -0
  113. package/dist/export/docx/text/drawingContainerXml.d.ts +16 -0
  114. package/dist/export/docx/text/dropCapXml.d.ts +9 -0
  115. package/dist/export/docx/text/endnoteRunXml.d.ts +5 -0
  116. package/dist/export/docx/text/fieldRunXml.d.ts +11 -0
  117. package/dist/export/docx/text/footnoteRunXml.d.ts +5 -0
  118. package/dist/export/docx/text/hyperlinkXml.d.ts +3 -0
  119. package/dist/export/docx/text/imageRunXml.d.ts +3 -0
  120. package/dist/export/docx/text/paragraphPropertiesXml.d.ts +16 -0
  121. package/dist/export/docx/text/runPropertiesXml.d.ts +3 -0
  122. package/dist/export/docx/text/runTextXml.d.ts +1 -0
  123. package/dist/export/docx/text/runXml.d.ts +5 -0
  124. package/dist/export/docx/text/styleMaterialization.d.ts +4 -0
  125. package/dist/export/docx/text/textBoxRunXml.d.ts +4 -0
  126. package/dist/export/docx/textXml.d.ts +1 -6
  127. package/dist/export/pdf/OasisPdfWriter.d.ts +1 -0
  128. package/dist/export/pdf/draw/borderDash.d.ts +11 -0
  129. package/dist/export/pdf/draw/drawFragment.d.ts +1 -0
  130. package/dist/export/pdf/draw/drawParagraph.d.ts +8 -1
  131. package/dist/export/pdf/fonts/TrueTypePdfFontSubsetter.d.ts +5 -0
  132. package/dist/export/pdf/fonts/officeFontAssets.d.ts +24 -0
  133. package/dist/export/pdf/units.d.ts +2 -1
  134. package/dist/i18n/index.d.ts +1 -1
  135. package/dist/i18n/locales/en.d.ts +108 -0
  136. package/dist/i18n/locales/pt-BR.d.ts +108 -0
  137. package/dist/import/DocumentFormatImporter.d.ts +26 -0
  138. package/dist/import/documentImporterRegistry.d.ts +6 -0
  139. package/dist/import/docx/bookmarks.d.ts +8 -0
  140. package/dist/import/docx/borders.d.ts +37 -0
  141. package/dist/import/docx/docxImporter.d.ts +3 -0
  142. package/dist/import/docx/dropCap.d.ts +13 -0
  143. package/dist/import/docx/endnotes.d.ts +17 -0
  144. package/dist/import/docx/footnotes.d.ts +2 -2
  145. package/dist/import/docx/headerFooter.d.ts +2 -2
  146. package/dist/import/docx/nestedBlocks.d.ts +15 -0
  147. package/dist/import/docx/numbering.d.ts +16 -1
  148. package/dist/import/docx/{styles.d.ts → paragraphStyle.d.ts} +2 -8
  149. package/dist/import/docx/paragraphs.d.ts +5 -4
  150. package/dist/import/docx/runStyle.d.ts +6 -0
  151. package/dist/import/docx/runs/drawingImage.d.ts +13 -0
  152. package/dist/import/docx/runs/fields.d.ts +3 -0
  153. package/dist/import/docx/runs/relationships.d.ts +11 -0
  154. package/dist/import/docx/runs/textBox.d.ts +6 -0
  155. package/dist/import/docx/runs/types.d.ts +42 -0
  156. package/dist/import/docx/runs/units.d.ts +11 -0
  157. package/dist/import/docx/runs/vmlImage.d.ts +6 -0
  158. package/dist/import/docx/runs.d.ts +14 -34
  159. package/dist/import/docx/sectionProperties.d.ts +1 -1
  160. package/dist/import/docx/settings.d.ts +1 -0
  161. package/dist/import/docx/styleUtils.d.ts +6 -0
  162. package/dist/import/docx/stylesXml.d.ts +4 -0
  163. package/dist/import/docx/tables.d.ts +2 -2
  164. package/dist/import/docx/theme.d.ts +17 -0
  165. package/dist/import/docx/themeColors.d.ts +37 -0
  166. package/dist/import/docx/themeFonts.d.ts +5 -1
  167. package/dist/import/docx/xmlHelpers.d.ts +3 -1
  168. package/dist/import/html/htmlImporter.d.ts +3 -0
  169. package/dist/import/html/importHtmlToEditorDocument.d.ts +8 -0
  170. package/dist/index-DuS88s1l.js +36810 -0
  171. package/dist/index.d.ts +39 -14
  172. package/dist/layoutProjection/blockHeights.d.ts +1 -1
  173. package/dist/layoutProjection/blocksPagination.d.ts +1 -1
  174. package/dist/layoutProjection/constants.d.ts +9 -1
  175. package/dist/layoutProjection/documentLayout.d.ts +0 -1
  176. package/dist/layoutProjection/dropCapExclusion.d.ts +23 -0
  177. package/dist/layoutProjection/endnotePagination.d.ts +8 -0
  178. package/dist/layoutProjection/floatingObjects.d.ts +45 -0
  179. package/dist/layoutProjection/footnotePagination.d.ts +1 -2
  180. package/dist/layoutProjection/headerFooterFootnotes.d.ts +1 -1
  181. package/dist/layoutProjection/headerFooterProjection.d.ts +3 -3
  182. package/dist/layoutProjection/index.d.ts +9 -7
  183. package/dist/layoutProjection/paragraphBorders.d.ts +14 -0
  184. package/dist/layoutProjection/paragraphPagination.d.ts +23 -9
  185. package/dist/layoutProjection/paragraphProjection.d.ts +1 -1
  186. package/dist/layoutProjection/sectionPagination.d.ts +3 -2
  187. package/dist/layoutProjection/tablePagination.d.ts +3 -2
  188. package/dist/layoutProjection/tableProjection.d.ts +1 -1
  189. package/dist/oasis-editor.css +1 -1
  190. package/dist/oasis-editor.js +52 -80462
  191. package/dist/oasis-editor.umd.cjs +4 -4
  192. package/dist/plugins/internal/createEssentialsPlugin.d.ts +8 -1
  193. package/dist/react.d.ts +12 -0
  194. package/dist/react.js +24 -0
  195. package/dist/testing/wordLayoutParity.d.ts +0 -3
  196. package/dist/text/fonts/FontMetricsProvider.d.ts +38 -0
  197. package/dist/text/fonts/FontProgramFactory.d.ts +6 -0
  198. package/dist/text/fonts/core/types.d.ts +69 -0
  199. package/dist/text/fonts/decoders/Brotli.d.ts +4 -0
  200. package/dist/text/fonts/decoders/FontDecoderRegistry.d.ts +10 -0
  201. package/dist/text/fonts/decoders/TtfDecoder.d.ts +8 -0
  202. package/dist/text/fonts/decoders/Woff2Decoder.d.ts +45 -0
  203. package/dist/text/fonts/layout/SimpleTextLayouter.d.ts +7 -0
  204. package/dist/text/fonts/preciseFontMetrics.d.ts +16 -0
  205. package/dist/text/fonts/preciseFontMode.d.ts +7 -0
  206. package/dist/text/fonts/sfnt/SfntFontProgram.d.ts +29 -0
  207. package/dist/text/fonts/vendor/woff2/buffer.d.ts +24 -0
  208. package/dist/text/fonts/vendor/woff2/glyf-reconstructor.d.ts +55 -0
  209. package/dist/text/fonts/vendor/woff2/hmtx-reconstructor.d.ts +5 -0
  210. package/dist/text/fonts/vendor/woff2/sfnt-builder.d.ts +7 -0
  211. package/dist/text/fonts/vendor/woff2/utils.d.ts +12 -0
  212. package/dist/text/truetype/AdvanceWidthSource.d.ts +19 -0
  213. package/dist/text/truetype/BinaryReader.d.ts +28 -0
  214. package/dist/text/truetype/CmapParser.d.ts +15 -0
  215. package/dist/text/truetype/SfntTableDirectory.d.ts +26 -0
  216. package/dist/text/truetype/TrueTypeFont.d.ts +36 -0
  217. package/dist/text/truetype/TrueTypeParseError.d.ts +11 -0
  218. package/dist/text/truetype/tableParsers.d.ts +45 -0
  219. package/dist/ui/OasisEditorApp.d.ts +1 -1
  220. package/dist/ui/OasisEditorAppLazy.d.ts +16 -0
  221. package/dist/ui/OasisEditorAppProps.d.ts +10 -2
  222. package/dist/ui/OasisEditorEditor.d.ts +17 -8
  223. package/dist/ui/OasisEditorLoading.d.ts +25 -0
  224. package/dist/ui/app/EditorDialogsLayer.d.ts +4 -0
  225. package/dist/ui/app/EditorWorkspace.d.ts +6 -0
  226. package/dist/ui/app/buildEditorViewProps.d.ts +7 -3
  227. package/dist/ui/app/createRuntimeCommandHost.d.ts +2 -1
  228. package/dist/ui/app/localFontAccess.d.ts +33 -0
  229. package/dist/ui/app/useCanvasSurfaceHitResolver.d.ts +2 -2
  230. package/dist/ui/app/useEditorContextMenuClipboard.d.ts +18 -0
  231. package/dist/ui/app/useEditorDialogs.d.ts +18 -0
  232. package/dist/ui/app/useEditorRuntimeBootstrap.d.ts +3 -0
  233. package/dist/ui/app/useEditorRuntimePlugins.d.ts +3 -0
  234. package/dist/ui/app/useEditorUiOptions.d.ts +1 -1
  235. package/dist/ui/app/useParagraphDialogBridge.d.ts +29 -0
  236. package/dist/ui/app/useTablePropertiesDialogBridge.d.ts +30 -0
  237. package/dist/ui/canvas/CanvasHitTestService.d.ts +17 -0
  238. package/dist/ui/canvas/CanvasLayoutSnapshot.d.ts +57 -1
  239. package/dist/ui/canvas/CanvasSelectionGeometry.d.ts +16 -0
  240. package/dist/ui/canvas/CanvasTableLayout.d.ts +3 -1
  241. package/dist/ui/canvas/canvasBlockPainter.d.ts +2 -2
  242. package/dist/ui/canvas/canvasBorders.d.ts +17 -0
  243. package/dist/ui/canvas/canvasDropCapPainter.d.ts +16 -0
  244. package/dist/ui/canvas/canvasParagraphPainter.d.ts +24 -2
  245. package/dist/ui/canvas/canvasTextBoxPainter.d.ts +24 -0
  246. package/dist/ui/canvas/imageContour.d.ts +10 -0
  247. package/dist/ui/canvas/textBoxRenderHeight.d.ts +14 -0
  248. package/dist/ui/canvas/verticalText.d.ts +104 -0
  249. package/dist/ui/components/Dialogs/FontDialog.d.ts +2 -65
  250. package/dist/ui/components/Dialogs/FontDialogModel.d.ts +5 -0
  251. package/dist/ui/components/Dialogs/ParagraphDialog.d.ts +49 -0
  252. package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +80 -0
  253. package/dist/ui/components/Dialogs/font-dialog/AdvancedFontTab.d.ts +6 -0
  254. package/dist/ui/components/Dialogs/font-dialog/FontDialogController.d.ts +21 -0
  255. package/dist/ui/components/Dialogs/font-dialog/FontDialogTypes.d.ts +112 -0
  256. package/dist/ui/components/Dialogs/font-dialog/FontPreview.d.ts +6 -0
  257. package/dist/ui/components/Dialogs/font-dialog/FontTab.d.ts +6 -0
  258. package/dist/ui/components/Dialogs/font-dialog/useFontDialogController.d.ts +4 -0
  259. package/dist/ui/components/FloatingToolbar/FloatingLayoutOptions.d.ts +17 -0
  260. package/dist/ui/components/Menubar/Menubar.d.ts +2 -1
  261. package/dist/ui/components/Menubar/builtinMenuIds.d.ts +36 -0
  262. package/dist/ui/components/OasisBrandMark.d.ts +7 -0
  263. package/dist/ui/components/PluginUi/PluginUiHost.d.ts +8 -0
  264. package/dist/ui/components/Ruler/HorizontalRuler.d.ts +11 -0
  265. package/dist/ui/components/Ruler/rulerGeometry.d.ts +63 -0
  266. package/dist/ui/components/Toolbar/Toolbar.d.ts +2 -0
  267. package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +40 -0
  268. package/dist/ui/components/Toolbar/primitives/ColorPicker.d.ts +1 -1
  269. package/dist/ui/components/Toolbar/primitives/Separator.d.ts +4 -3
  270. package/dist/ui/components/Toolbar/registry/ToolbarRegistry.d.ts +7 -2
  271. package/dist/ui/components/Toolbar/schema/items.d.ts +1 -1
  272. package/dist/ui/components/WelcomeOverlay.d.ts +13 -0
  273. package/dist/ui/editorLayoutConstants.d.ts +12 -0
  274. package/dist/ui/editorUiTypes.d.ts +35 -4
  275. package/dist/ui/fontSizeUnits.d.ts +15 -0
  276. package/dist/ui/mount.d.ts +2 -1
  277. package/dist/ui/overlays/ResizeHandlesOverlay.d.ts +34 -0
  278. package/dist/ui/public/Button.d.ts +10 -0
  279. package/dist/ui/public/Checkbox.d.ts +9 -0
  280. package/dist/ui/public/DialogFooter.d.ts +6 -0
  281. package/dist/ui/public/FloatingActionButton.d.ts +8 -0
  282. package/dist/ui/public/IconButton.d.ts +10 -0
  283. package/dist/ui/public/SelectField.d.ts +15 -0
  284. package/dist/ui/public/SidePanel.d.ts +12 -0
  285. package/dist/ui/public/TextField.d.ts +9 -0
  286. package/dist/ui/public/index.d.ts +36 -0
  287. package/dist/ui/resizeGeometry.d.ts +28 -0
  288. package/dist/ui/shells/DocumentShell.d.ts +6 -0
  289. package/dist/ui/textMeasurement/alignment.d.ts +3 -0
  290. package/dist/ui/textMeasurement/characterWidth.d.ts +9 -0
  291. package/dist/ui/textMeasurement/composer.d.ts +5 -0
  292. package/dist/ui/textMeasurement/constants.d.ts +4 -0
  293. package/dist/ui/textMeasurement/fontMetrics.d.ts +12 -0
  294. package/dist/ui/textMeasurement/indentation.d.ts +12 -0
  295. package/dist/ui/textMeasurement/layoutLine.d.ts +4 -0
  296. package/dist/ui/textMeasurement/paragraphLineHeight.d.ts +22 -0
  297. package/dist/ui/textMeasurement/tabStops.d.ts +4 -0
  298. package/dist/ui/textMeasurement/tokenizer.d.ts +6 -0
  299. package/dist/ui/textMeasurement/types.d.ts +27 -0
  300. package/dist/ui/textMeasurement.d.ts +5 -11
  301. package/dist/ui/toolbarStyleState.d.ts +15 -2
  302. package/dist/ui/utils/customIcons.d.ts +20 -0
  303. package/dist/ui.d.ts +42 -0
  304. package/dist/ui.js +19 -0
  305. package/dist/utils/imageFormats.d.ts +14 -0
  306. package/dist/utils/throttle.d.ts +1 -1
  307. package/dist/vue.d.ts +9 -0
  308. package/dist/vue.js +33 -0
  309. package/package.json +90 -62
  310. package/dist/__tests__/app/PersistenceService.test.d.ts +0 -1
  311. package/dist/__tests__/app/footnoteUiCommands.test.d.ts +0 -1
  312. package/dist/__tests__/commands/text.test.d.ts +0 -1
  313. package/dist/__tests__/core/editorPluginIntegration.test.d.ts +0 -1
  314. package/dist/__tests__/core/editorState.test.d.ts +0 -1
  315. package/dist/__tests__/core/footnotes.test.d.ts +0 -1
  316. package/dist/__tests__/core/model.test.d.ts +0 -1
  317. package/dist/__tests__/core/pluginCollection.test.d.ts +0 -1
  318. package/dist/__tests__/core/tableCommands.test.d.ts +0 -1
  319. package/dist/__tests__/export/docxExport.test.d.ts +0 -1
  320. package/dist/__tests__/export/footnotesExport.test.d.ts +0 -1
  321. package/dist/__tests__/export/pdfWriter.test.d.ts +0 -1
  322. package/dist/__tests__/export/underlineStyle.test.d.ts +0 -1
  323. package/dist/__tests__/import/docxComplexSmoke.test.d.ts +0 -1
  324. package/dist/__tests__/import/docxImport.test.d.ts +0 -1
  325. package/dist/__tests__/import/footnotesImport.test.d.ts +0 -1
  326. package/dist/__tests__/integration/documentFlow.test.d.ts +0 -1
  327. package/dist/__tests__/ui/CanvasTableLayout.test.d.ts +0 -1
  328. package/dist/__tests__/ui/canvasHitTestService.test.d.ts +0 -1
  329. package/dist/__tests__/ui/canvasLayoutSnapshot.test.d.ts +0 -1
  330. package/dist/__tests__/ui/canvasSelectionGeometry.test.d.ts +0 -1
  331. package/dist/__tests__/ui/canvasTextRendering.test.d.ts +0 -1
  332. package/dist/__tests__/ui/composeMeasuredParagraphLines.test.d.ts +0 -1
  333. package/dist/__tests__/ui/dialog.test.d.ts +0 -1
  334. package/dist/__tests__/ui/fontDialog.test.d.ts +0 -1
  335. package/dist/__tests__/ui/footnotesLayout.test.d.ts +0 -1
  336. package/dist/__tests__/ui/layoutIdentity.test.d.ts +0 -1
  337. package/dist/__tests__/ui/layoutProjection.test.d.ts +0 -1
  338. package/dist/__tests__/ui/registry.test.d.ts +0 -1
  339. package/dist/__tests__/ui/tabs.test.d.ts +0 -1
  340. package/dist/__tests__/ui/textMeasurementAlignment.test.d.ts +0 -1
  341. package/dist/__tests__/word-parity/fixtures/corpus.d.ts +0 -10
  342. package/dist/__tests__/word-parity/fixtures/loremFixtures.d.ts +0 -8
  343. package/dist/__tests__/word-parity/wordLayout.word-parity.d.ts +0 -1
  344. package/dist/assets/Arimo-Bold.ttf +0 -0
  345. package/dist/assets/Arimo-BoldItalic.ttf +0 -0
  346. package/dist/assets/Arimo-Italic.ttf +0 -0
  347. package/dist/assets/Arimo-Regular.ttf +0 -0
  348. package/dist/assets/Carlito-Bold.ttf +0 -0
  349. package/dist/assets/Carlito-BoldItalic.ttf +0 -0
  350. package/dist/assets/Carlito-Italic.ttf +0 -0
  351. package/dist/assets/Carlito-Regular.ttf +0 -0
  352. package/dist/assets/Roboto-Italic.ttf +0 -0
  353. package/dist/assets/Roboto-Medium.ttf +0 -0
  354. package/dist/assets/Roboto-MediumItalic.ttf +0 -0
  355. package/dist/assets/Roboto-Regular.ttf +0 -0
  356. package/dist/assets/Tinos-Bold.ttf +0 -0
  357. package/dist/assets/Tinos-BoldItalic.ttf +0 -0
  358. package/dist/assets/Tinos-Italic.ttf +0 -0
  359. package/dist/assets/Tinos-Regular.ttf +0 -0
  360. package/dist/assets/importDocxWorker-DIQ28Lka.js +0 -12
  361. package/dist/core/commands/utils.d.ts +0 -69
  362. package/dist/demo/OasisSiteApp.d.ts +0 -1
  363. package/dist/main.d.ts +0 -1
@@ -48,8 +48,10 @@ export declare const ptBR: {
48
48
  "toolbar.size": string;
49
49
  "toolbar.color": string;
50
50
  "toolbar.highlight": string;
51
+ "toolbar.textShading": string;
51
52
  "toolbar.colorAutomatic": string;
52
53
  "toolbar.noHighlight": string;
54
+ "toolbar.noTextShading": string;
53
55
  "toolbar.themeColors": string;
54
56
  "toolbar.standardColors": string;
55
57
  "toolbar.moreColors": string;
@@ -83,6 +85,41 @@ export declare const ptBR: {
83
85
  "lineSpacing.spacingAfterLabel": string;
84
86
  "lineSpacing.preview": string;
85
87
  "lineSpacing.previewText": string;
88
+ "paragraph.title": string;
89
+ "paragraph.generalSection": string;
90
+ "paragraph.alignLabel": string;
91
+ "paragraph.alignLeft": string;
92
+ "paragraph.alignCenter": string;
93
+ "paragraph.alignRight": string;
94
+ "paragraph.alignJustify": string;
95
+ "paragraph.indentSection": string;
96
+ "paragraph.indentLeftLabel": string;
97
+ "paragraph.indentRightLabel": string;
98
+ "paragraph.specialLabel": string;
99
+ "paragraph.specialNone": string;
100
+ "paragraph.specialFirstLine": string;
101
+ "paragraph.specialHanging": string;
102
+ "paragraph.specialByLabel": string;
103
+ "paragraph.spacingSection": string;
104
+ "paragraph.spacingBeforeLabel": string;
105
+ "paragraph.spacingAfterLabel": string;
106
+ "paragraph.lineSpacingLabel": string;
107
+ "paragraph.bordersSection": string;
108
+ "paragraph.borderStyleLabel": string;
109
+ "paragraph.borderWidthLabel": string;
110
+ "paragraph.borderColorLabel": string;
111
+ "paragraph.shadingLabel": string;
112
+ "paragraph.borderNone": string;
113
+ "paragraph.borderSolid": string;
114
+ "paragraph.borderDashed": string;
115
+ "paragraph.borderDotted": string;
116
+ "paragraph.borderSidesLabel": string;
117
+ "paragraph.borderSideTop": string;
118
+ "paragraph.borderSideRight": string;
119
+ "paragraph.borderSideBottom": string;
120
+ "paragraph.borderSideLeft": string;
121
+ "paragraph.preview": string;
122
+ "paragraph.previewText": string;
86
123
  "section.orient": string;
87
124
  "section.pageSetup": string;
88
125
  "section.toggleOrientation": string;
@@ -114,6 +151,59 @@ export declare const ptBR: {
114
151
  "table.cellWidth": string;
115
152
  "table.cellBgColorPrompt": string;
116
153
  "table.cellWidthPrompt": string;
154
+ "table.propertiesTitle": string;
155
+ "table.tabTable": string;
156
+ "table.tabRow": string;
157
+ "table.tabColumn": string;
158
+ "table.tabCell": string;
159
+ "table.tabAltText": string;
160
+ "table.sizeSection": string;
161
+ "table.preferredWidth": string;
162
+ "table.measureIn": string;
163
+ "table.points": string;
164
+ "table.percent": string;
165
+ "table.alignmentSection": string;
166
+ "table.indentFromLeft": string;
167
+ "table.textWrappingSection": string;
168
+ "table.wrapNone": string;
169
+ "table.wrapAround": string;
170
+ "table.positioning": string;
171
+ "table.positioningReadOnly": string;
172
+ "table.rowHeight": string;
173
+ "table.rowHeightRule": string;
174
+ "table.rowAuto": string;
175
+ "table.rowAtLeast": string;
176
+ "table.rowExactly": string;
177
+ "table.repeatHeader": string;
178
+ "table.allowBreakAcrossPages": string;
179
+ "table.hiddenRow": string;
180
+ "table.columnWidth": string;
181
+ "table.verticalAlignment": string;
182
+ "table.inherit": string;
183
+ "table.valignTop": string;
184
+ "table.valignMiddle": string;
185
+ "table.valignBottom": string;
186
+ "table.textDirection": string;
187
+ "table.options": string;
188
+ "table.noWrap": string;
189
+ "table.fitText": string;
190
+ "table.hideMark": string;
191
+ "table.cellMargins": string;
192
+ "table.altTitle": string;
193
+ "table.altDescription": string;
194
+ "layoutOptions.title": string;
195
+ "layoutOptions.inLineGroup": string;
196
+ "layoutOptions.wrapGroup": string;
197
+ "layoutOptions.inline": string;
198
+ "layoutOptions.square": string;
199
+ "layoutOptions.tight": string;
200
+ "layoutOptions.through": string;
201
+ "layoutOptions.topAndBottom": string;
202
+ "layoutOptions.behind": string;
203
+ "layoutOptions.front": string;
204
+ "layoutOptions.moveWithText": string;
205
+ "layoutOptions.fixPosition": string;
206
+ "layoutOptions.behindHint": string;
117
207
  "generic.close": string;
118
208
  "generic.cancel": string;
119
209
  "generic.save": string;
@@ -137,6 +227,7 @@ export declare const ptBR: {
137
227
  "dialog.font.color": string;
138
228
  "dialog.font.customColor": string;
139
229
  "dialog.font.highlight": string;
230
+ "dialog.font.shading": string;
140
231
  "dialog.font.familyFilter": string;
141
232
  "dialog.font.customSize": string;
142
233
  "dialog.font.sizeInvalid": string;
@@ -194,6 +285,9 @@ export declare const ptBR: {
194
285
  "contextmenu.paste": string;
195
286
  "contextmenu.link": string;
196
287
  "contextmenu.font": string;
288
+ "contextmenu.paragraph": string;
289
+ "contextmenu.tableProperties": string;
290
+ "contextmenu.bordersAndShading": string;
197
291
  "status.words": string;
198
292
  "status.characters": string;
199
293
  "status.page": string;
@@ -234,6 +328,7 @@ export declare const ptBR: {
234
328
  "menu.view": string;
235
329
  "menu.view.margins": string;
236
330
  "menu.view.paragraphMarks": string;
331
+ "menu.view.preciseFonts": string;
237
332
  "menu.view.outline": string;
238
333
  "menu.view.fullscreen": string;
239
334
  "menu.insert": string;
@@ -246,6 +341,19 @@ export declare const ptBR: {
246
341
  "menu.help": string;
247
342
  "menu.help.shortcuts": string;
248
343
  "menu.help.about": string;
344
+ "loading.title": string;
345
+ "welcome.title": string;
346
+ "welcome.body": string;
347
+ "welcome.note": string;
348
+ "welcome.enable": string;
349
+ "welcome.skip": string;
249
350
  "outline.toggle": string;
250
351
  "outline.empty": string;
352
+ "ruler.horizontal": string;
353
+ "ruler.firstLineIndent": string;
354
+ "ruler.hangingIndent": string;
355
+ "ruler.leftIndent": string;
356
+ "ruler.rightIndent": string;
357
+ "ruler.leftMargin": string;
358
+ "ruler.rightMargin": string;
251
359
  };
@@ -0,0 +1,26 @@
1
+ import { EditorDocument } from '../../core/model.js';
2
+
3
+ /**
4
+ * Coarse, format-agnostic import stages. Each concrete importer maps its own
5
+ * internal phases onto these so the progress UI does not need to know about any
6
+ * specific file format.
7
+ */
8
+ export type ImportStage = "opening" | "parsing" | "finishing";
9
+ export type ImportProgressReporter = (stage: ImportStage, progress?: number) => void;
10
+ /**
11
+ * A pluggable document format importer. Adding support for a new format means
12
+ * implementing this interface and registering it — no consumer of the import
13
+ * pipeline (controller, UI) needs to change (Open/Closed, Dependency Inversion).
14
+ */
15
+ export interface DocumentFormatImporter {
16
+ /** Stable identifier, e.g. "docx" or "html". */
17
+ readonly id: string;
18
+ /** File extensions handled, lowercase and dot-prefixed, e.g. [".html", ".htm"]. */
19
+ readonly accept: readonly string[];
20
+ /** Whether this importer can handle the given file (by extension). */
21
+ matches(file: File): boolean;
22
+ /** Parse the raw bytes into an editor document. */
23
+ import(buffer: ArrayBuffer, onProgress?: ImportProgressReporter): Promise<EditorDocument>;
24
+ }
25
+ /** Returns the lowercase dot-extension of a file name, e.g. ".html". */
26
+ export declare function fileExtension(fileName: string): string;
@@ -0,0 +1,6 @@
1
+ import { DocumentFormatImporter } from '../DocumentFormatImporter.js';
2
+
3
+ /** Finds the importer that can handle the given file, if any. */
4
+ export declare function resolveImporterForFile(file: File): DocumentFormatImporter | undefined;
5
+ /** Comma-separated extension list for an `<input type="file" accept>`. */
6
+ export declare function importFileAccept(): string;
@@ -0,0 +1,8 @@
1
+ import { EditorBookmarks, EditorSection } from '../../../../core/model.js';
2
+
3
+ /**
4
+ * Walk all stories in the imported sections, collect bookmark boundaries, pair
5
+ * them by DOCX id and return the registry (or `undefined` when there are none).
6
+ * Mutates the paragraphs in place to remove the transient marker runs.
7
+ */
8
+ export declare function extractBookmarksFromSections(sections: EditorSection[]): EditorBookmarks | undefined;
@@ -0,0 +1,37 @@
1
+ import { Element as XmlElement } from '../../@xmldom/xmldom';
2
+ import { EditorBorderStyle } from '../../../../core/model.js';
3
+
4
+ /**
5
+ * Parses a single OOXML border element (`<w:top>`, `<w:left>`, ...) into the
6
+ * editor's `EditorBorderStyle`. Shared by table-cell borders (`w:tcBorders`) and
7
+ * paragraph borders (`w:pBdr`) so both stay in sync.
8
+ *
9
+ * `w:sz` is in eighths of a point; an explicit `nil`/`none` value yields a
10
+ * zero-width "none" border so callers can distinguish "no border" from "absent".
11
+ */
12
+ export declare function parseDocxBorder(borderNode: XmlElement | null): EditorBorderStyle | undefined;
13
+ export interface EditorBoxBorders {
14
+ borderTop?: EditorBorderStyle;
15
+ borderRight?: EditorBorderStyle;
16
+ borderBottom?: EditorBorderStyle;
17
+ borderLeft?: EditorBorderStyle;
18
+ borderStart?: EditorBorderStyle;
19
+ borderEnd?: EditorBorderStyle;
20
+ borderTopLeftToBottomRight?: EditorBorderStyle;
21
+ borderTopRightToBottomLeft?: EditorBorderStyle;
22
+ }
23
+ export interface EditorTableBorders extends EditorBoxBorders {
24
+ borderInsideH?: EditorBorderStyle;
25
+ borderInsideV?: EditorBorderStyle;
26
+ }
27
+ /**
28
+ * Parses the four edges of a border container (`w:tcBorders` for cells or
29
+ * `w:pBdr` for paragraphs) into the editor's four `border*` fields.
30
+ */
31
+ export declare function parseDocxBoxBorders(container: XmlElement | null): EditorBoxBorders;
32
+ /**
33
+ * Parses `w:tblBorders` (6 edges: top/right/bottom/left + insideH/insideV)
34
+ * into `EditorTableBorders`. Used to propagate table-level border defaults to
35
+ * cells that have no explicit `w:tcBorders` override for that edge.
36
+ */
37
+ export declare function parseDocxTableBorders(container: XmlElement | null): EditorTableBorders;
@@ -0,0 +1,3 @@
1
+ import { DocumentFormatImporter } from '../../../DocumentFormatImporter.js';
2
+
3
+ export declare const docxImporter: DocumentFormatImporter;
@@ -0,0 +1,13 @@
1
+ import { Element as XmlElement } from '../../@xmldom/xmldom';
2
+ import { EditorDropCap } from '../../../../core/model.js';
3
+ import { ImportedRun } from '../../runs.js';
4
+
5
+ /**
6
+ * Detect a Word drop cap frame (`w:pPr/w:framePr/@dropCap`). Word stores the
7
+ * large initial letter in its own frame paragraph that precedes the wrapping
8
+ * body paragraph; the import driver merges the returned descriptor onto that
9
+ * following paragraph so the per-paragraph layout owns the cap.
10
+ *
11
+ * Returns null for any paragraph that is not a drop cap frame.
12
+ */
13
+ export declare function parseDropCapFrame(paragraphProperties: XmlElement | null, runs: ImportedRun[]): EditorDropCap | null;
@@ -0,0 +1,17 @@
1
+ import { default as JSZip } from '../../jszip';
2
+ import { EditorBlockNode, EditorEndnotes, EditorEndnote, EditorNamedStyle } from '../../../../core/model.js';
3
+ import { AssetRegistry } from '../../assetRegistry.js';
4
+ import { DocxImportTheme } from '../../theme.js';
5
+ import { NumberingMaps } from '../../numbering.js';
6
+
7
+ export interface ParsedEndnotes {
8
+ /** Map from DOCX `w:id` (string) to the parsed endnote. */
9
+ byDocxId: Map<string, EditorEndnote>;
10
+ /** Final shape ready to be assigned to `EditorDocument.endnotes`. */
11
+ endnotes: EditorEndnotes;
12
+ /** Imported "separator" part, if any. */
13
+ separator?: EditorBlockNode[];
14
+ /** Imported "continuationSeparator" part, if any. */
15
+ continuationSeparator?: EditorBlockNode[];
16
+ }
17
+ export declare function parseEndnotesXml(xmlContent: string | null, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, styles?: Record<string, EditorNamedStyle>): Promise<ParsedEndnotes>;
@@ -1,7 +1,7 @@
1
1
  import { default as JSZip } from '../../jszip';
2
2
  import { EditorBlockNode, EditorFootnotes, EditorFootnote, EditorNamedStyle } from '../../../../core/model.js';
3
3
  import { AssetRegistry } from '../../assetRegistry.js';
4
- import { ThemeFontMap } from '../../themeFonts.js';
4
+ import { DocxImportTheme } from '../../theme.js';
5
5
  import { NumberingMaps } from '../../numbering.js';
6
6
 
7
7
  export interface ParsedFootnotes {
@@ -14,4 +14,4 @@ export interface ParsedFootnotes {
14
14
  /** Imported "continuationSeparator" part, if any. */
15
15
  continuationSeparator?: EditorBlockNode[];
16
16
  }
17
- export declare function parseFootnotesXml(xmlContent: string | null, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, themeFonts: ThemeFontMap, styles?: Record<string, EditorNamedStyle>): Promise<ParsedFootnotes>;
17
+ export declare function parseFootnotesXml(xmlContent: string | null, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, styles?: Record<string, EditorNamedStyle>): Promise<ParsedFootnotes>;
@@ -1,7 +1,7 @@
1
1
  import { default as JSZip } from '../../jszip';
2
2
  import { EditorBlockNode, EditorNamedStyle } from '../../../../core/model.js';
3
3
  import { AssetRegistry } from '../../assetRegistry.js';
4
- import { ThemeFontMap } from '../../themeFonts.js';
4
+ import { DocxImportTheme } from '../../theme.js';
5
5
  import { NumberingMaps } from '../../numbering.js';
6
6
 
7
- export declare function parseHeaderFooterXml(xmlContent: string | null, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, themeFonts: ThemeFontMap, styles?: Record<string, EditorNamedStyle>): Promise<EditorBlockNode[]>;
7
+ export declare function parseHeaderFooterXml(xmlContent: string | null, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, styles?: Record<string, EditorNamedStyle>): Promise<EditorBlockNode[]>;
@@ -0,0 +1,15 @@
1
+ import { default as JSZip } from '../../jszip';
2
+ import { Element as XmlElement } from '../../@xmldom/xmldom';
3
+ import { EditorBlockNode } from '../../../../core/model.js';
4
+ import { AssetRegistry } from '../../assetRegistry.js';
5
+ import { DocxImportTheme } from '../../theme.js';
6
+ import { NumberingMaps } from '../../numbering.js';
7
+
8
+ /**
9
+ * Parse the block-level content of a `w:txbxContent` (text box body) into the
10
+ * editor block model. Handles `w:p` (paragraphs) and `w:tbl` (tables), mirroring
11
+ * the top-level body walker. Defined in its own module so `runs.ts` can request
12
+ * nested-block parsing via a callback without creating an import cycle
13
+ * (`runs.ts` -> `paragraphs.ts`/`tables.ts` -> `runs.ts`).
14
+ */
15
+ export declare function parseTxbxContentBlocks(container: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme): Promise<EditorBlockNode[]>;
@@ -4,6 +4,21 @@ import { EditorParagraphListStyle } from '../../../../core/model.js';
4
4
  export interface NumberingMaps {
5
5
  abstractKinds: Map<string, EditorParagraphListStyle["kind"]>;
6
6
  numKinds: Map<string, EditorParagraphListStyle["kind"]>;
7
+ /** Indent per level, keyed by "abstractNumId:ilvl". Values in points. */
8
+ abstractIndents: Map<string, {
9
+ left?: number;
10
+ hanging?: number;
11
+ }>;
12
+ /** Suffix (`w:suff`) per level, keyed by "abstractNumId:ilvl". */
13
+ abstractSuffixes: Map<string, EditorParagraphListStyle["suffix"]>;
14
+ /** numId → abstractNumId */
15
+ numToAbstractId: Map<string, string>;
7
16
  }
8
17
  export declare function parseNumbering(numberingXml: string | null): NumberingMaps;
9
- export declare function parseParagraphList(paragraphProperties: XmlElement | null, numberingMaps: NumberingMaps): EditorParagraphListStyle | undefined;
18
+ export declare function parseParagraphList(paragraphProperties: XmlElement | null, numberingMaps: NumberingMaps): {
19
+ list: EditorParagraphListStyle;
20
+ indent?: {
21
+ left?: number;
22
+ hanging?: number;
23
+ };
24
+ } | undefined;
@@ -1,12 +1,8 @@
1
1
  import { Element as XmlElement } from '../../@xmldom/xmldom';
2
- import { EditorNamedStyle, EditorParagraphStyle, EditorTextStyle } from '../../../../core/model.js';
3
- import { ThemeFontMap } from '../../themeFonts.js';
2
+ import { EditorParagraphStyle } from '../../../../core/model.js';
4
3
 
5
4
  export declare function normalizeImportedParagraphStyle(style: EditorParagraphStyle | undefined): EditorParagraphStyle | undefined;
6
5
  export declare function withDocxImplicitSingleLineHeight(style: EditorParagraphStyle | undefined): EditorParagraphStyle;
7
- export declare function normalizeImportedRunStyle(style: EditorTextStyle | undefined, paragraphStyleId: string | undefined): EditorTextStyle | undefined;
8
- export declare function parseRunStyle(runProperties: XmlElement | null, themeFonts: ThemeFontMap): EditorTextStyle | undefined;
9
- export declare function parseParagraphStyle(paragraphProperties: XmlElement | null): EditorParagraphStyle | undefined;
10
6
  export interface ParagraphAutospacingFlags {
11
7
  before: boolean;
12
8
  after: boolean;
@@ -19,6 +15,4 @@ export interface ParagraphAutospacingFlags {
19
15
  * reproduce that collapsing; see `collapseCellAutospacing` in tables.ts.
20
16
  */
21
17
  export declare function parseAutospacingFlags(paragraphProperties: XmlElement | null): ParagraphAutospacingFlags;
22
- export declare function mergeImportedParagraphStyles(base: EditorParagraphStyle | undefined, local: EditorParagraphStyle | undefined): EditorParagraphStyle | undefined;
23
- export declare function mergeImportedTextStyles(base: EditorTextStyle | undefined, local: EditorTextStyle | undefined): EditorTextStyle | undefined;
24
- export declare function parseImportedStyles(stylesXml: string | null, themeFonts: ThemeFontMap): Record<string, EditorNamedStyle> | undefined;
18
+ export declare function parseParagraphStyle(paragraphProperties: XmlElement | null): EditorParagraphStyle | undefined;
@@ -1,12 +1,13 @@
1
1
  import { default as JSZip } from '../../jszip';
2
2
  import { Element as XmlElement } from '../../@xmldom/xmldom';
3
- import { EditorParagraphNode, EditorParagraphStyle } from '../../../../core/model.js';
3
+ import { EditorDropCap, EditorParagraphNode, EditorParagraphStyle } from '../../../../core/model.js';
4
4
  import { AssetRegistry } from '../../assetRegistry.js';
5
- import { ThemeFontMap } from '../../themeFonts.js';
5
+ import { DocxImportTheme } from '../../theme.js';
6
6
  import { NumberingMaps } from '../../numbering.js';
7
7
 
8
- export declare function parseParagraphNodes(paragraphNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, themeFonts: ThemeFontMap, inheritedStyle?: EditorParagraphStyle): Promise<{
8
+ export declare function parseParagraphNodes(paragraphNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, inheritedStyle?: EditorParagraphStyle): Promise<{
9
9
  paragraphs: EditorParagraphNode[];
10
10
  pageBreakAfter: boolean;
11
+ dropCapFrame?: EditorDropCap;
11
12
  }>;
12
- export declare function parseParagraphNode(paragraphNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, themeFonts: ThemeFontMap, inheritedStyle?: EditorParagraphStyle): Promise<EditorParagraphNode>;
13
+ export declare function parseParagraphNode(paragraphNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, inheritedStyle?: EditorParagraphStyle): Promise<EditorParagraphNode>;
@@ -0,0 +1,6 @@
1
+ import { Element as XmlElement } from '../../@xmldom/xmldom';
2
+ import { EditorTextStyle } from '../../../../core/model.js';
3
+ import { DocxImportTheme } from '../../theme.js';
4
+
5
+ export declare function normalizeImportedRunStyle(style: EditorTextStyle | undefined, paragraphStyleId: string | undefined): EditorTextStyle | undefined;
6
+ export declare function parseRunStyle(runProperties: XmlElement | null, theme: DocxImportTheme): EditorTextStyle | undefined;
@@ -0,0 +1,13 @@
1
+ import { default as JSZip } from '../../../jszip';
2
+ import { Element as XmlElement } from '../../../@xmldom/xmldom';
3
+ import { EditorImageRunData } from '../../../../../../core/model.js';
4
+ import { AssetRegistry } from '../../../../assetRegistry.js';
5
+
6
+ export declare function parseDrawingImage(drawing: XmlElement, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry): Promise<{
7
+ image: EditorImageRunData;
8
+ text: string;
9
+ } | {
10
+ image: undefined;
11
+ text: string;
12
+ textBox?: undefined;
13
+ }>;
@@ -0,0 +1,3 @@
1
+ import { Element as XmlElement } from '../../../@xmldom/xmldom';
2
+
3
+ export declare function getRunInstructionText(runElement: XmlElement): string;
@@ -0,0 +1,11 @@
1
+ import { default as JSZip } from '../../../jszip';
2
+ import { Element as XmlElement } from '../../../@xmldom/xmldom';
3
+ import { AssetRegistry } from '../../../../assetRegistry.js';
4
+
5
+ export declare function isAbsoluteUri(target: string): boolean;
6
+ export declare function parseRelationshipId(element: XmlElement): string | undefined;
7
+ export declare function parseBlipRels(blip: XmlElement): {
8
+ embed?: string;
9
+ link?: string;
10
+ };
11
+ export declare function loadEmbeddedImage(zip: JSZip, assets: AssetRegistry, target: string): Promise<string | undefined>;
@@ -0,0 +1,6 @@
1
+ import { Element as XmlElement } from '../../../@xmldom/xmldom';
2
+ import { EditorTextBoxData } from '../../../../../../core/model.js';
3
+ import { ParseNestedBlocks } from '../../../types.js';
4
+
5
+ export declare function parseTextBox(drawing: XmlElement, parseNestedBlocks: ParseNestedBlocks | undefined): Promise<EditorTextBoxData | undefined>;
6
+ export declare function resolveAlternateContentDrawing(alternateContent: XmlElement): XmlElement | undefined;
@@ -0,0 +1,42 @@
1
+ import { Element as XmlElement } from '../../../@xmldom/xmldom';
2
+ import { EditorBlockNode, EditorTextStyle, EditorImageRunData, EditorTextBoxData } from '../../../../../../core/model.js';
3
+
4
+ export type ParseNestedBlocks = (container: XmlElement) => Promise<EditorBlockNode[]>;
5
+ /**
6
+ * A `w:bookmarkStart` / `w:bookmarkEnd` marker carried through the run stream as
7
+ * a zero-length transient run. The import driver extracts these into the
8
+ * document-level bookmark registry once paragraph ids and offsets are known.
9
+ */
10
+ export interface ImportedBookmarkMarker {
11
+ kind: "start" | "end";
12
+ docxId: string;
13
+ name?: string;
14
+ colFirst?: number;
15
+ colLast?: number;
16
+ }
17
+ export interface ImportedRun {
18
+ text: string;
19
+ image?: EditorImageRunData;
20
+ textBox?: EditorTextBoxData;
21
+ styles?: EditorTextStyle;
22
+ field?: {
23
+ type: "PAGE" | "NUMPAGES";
24
+ };
25
+ /** Preserved `w:fldChar` control char (complex fields). Zero-length marker. */
26
+ fieldChar?: {
27
+ kind: "begin" | "separate" | "end";
28
+ fieldLock?: boolean;
29
+ dirty?: boolean;
30
+ };
31
+ /** Preserved `w:instrText`. Zero-length marker. */
32
+ fieldInstruction?: string;
33
+ footnoteReference?: {
34
+ docxId: string;
35
+ customMark?: string;
36
+ };
37
+ endnoteReference?: {
38
+ docxId: string;
39
+ customMark?: string;
40
+ };
41
+ bookmark?: ImportedBookmarkMarker;
42
+ }
@@ -0,0 +1,11 @@
1
+ export declare const EMU_PER_PX = 9525;
2
+ export declare const EMU_PER_PT = 12700;
3
+ export declare const OOXML_PERCENT_DENOMINATOR = 100000;
4
+ export declare const OOXML_ROTATION_UNITS = 60000;
5
+ export declare const VML_FRACTION_DENOMINATOR = 65536;
6
+ export declare const PX_PER_INCH = 96;
7
+ export declare const PX_PER_POINT: number;
8
+ export declare function emuToPx(value: string | null | undefined): number | undefined;
9
+ export declare function parseOptionalInt(value: string | null | undefined): number | undefined;
10
+ export declare function parseCssLengthToPx(value: string | null | undefined): number | null;
11
+ export declare function normalizeHexColor(value: string | null | undefined): string | undefined;
@@ -0,0 +1,6 @@
1
+ import { default as JSZip } from '../../../jszip';
2
+ import { Element as XmlElement } from '../../../@xmldom/xmldom';
3
+ import { EditorImageRunData } from '../../../../../../core/model.js';
4
+ import { AssetRegistry } from '../../../../assetRegistry.js';
5
+
6
+ export declare function parseVmlImage(pictElement: XmlElement, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry): Promise<EditorImageRunData | undefined>;
@@ -1,41 +1,21 @@
1
1
  import { default as JSZip } from '../../jszip';
2
2
  import { Element as XmlElement } from '../../@xmldom/xmldom';
3
- import { EditorTextStyle } from '../../../../core/model.js';
3
+ import { EditorImageRunData, EditorTextBoxData } from '../../../../core/model.js';
4
4
  import { AssetRegistry } from '../../assetRegistry.js';
5
- import { ThemeFontMap } from '../../themeFonts.js';
5
+ import { DocxImportTheme } from '../../theme.js';
6
6
  import { NumberingMaps } from '../../numbering.js';
7
+ import { ImportedBookmarkMarker, ImportedRun, ParseNestedBlocks } from '../../runs/types.js';
7
8
 
8
- export interface ImportedRun {
9
+ export type { ImportedRun } from '../../runs/types.js';
10
+ export type { ParseNestedBlocks } from '../../runs/types.js';
11
+ export { getRunInstructionText } from '../../runs/fields.js';
12
+ export declare function parseRunElement(runElement: XmlElement, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, parseNestedBlocks?: ParseNestedBlocks): Promise<{
9
13
  text: string;
10
- image?: {
11
- src: string;
12
- width: number;
13
- height: number;
14
- alt?: string;
15
- };
16
- styles?: EditorTextStyle;
17
- field?: {
18
- type: "PAGE" | "NUMPAGES";
19
- };
20
- /**
21
- * When present, the run is an inline footnote reference. The DOCX `w:id`
22
- * is carried verbatim so a later pass can remap it to a real footnote id.
23
- * `text` is the placeholder marker (numbering is resolved post-parse).
24
- */
25
- footnoteReference?: {
26
- docxId: string;
27
- customMark?: string;
28
- };
29
- }
30
- export declare function parseRunElement(runElement: XmlElement, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry): Promise<{
31
- text: string;
32
- image?: {
33
- src: string;
34
- width: number;
35
- height: number;
36
- alt?: string;
37
- };
14
+ image?: EditorImageRunData;
15
+ textBox?: EditorTextBoxData;
16
+ innerBookmarks?: Array<{
17
+ offset: number;
18
+ marker: ImportedBookmarkMarker;
19
+ }>;
38
20
  }>;
39
- export declare function getRunFieldCharType(runElement: XmlElement): string | null;
40
- export declare function getRunInstructionText(runElement: XmlElement): string;
41
- export declare function parseRunsContainer(container: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, themeFonts: ThemeFontMap, inheritedLink?: string | null): Promise<ImportedRun[]>;
21
+ export declare function parseRunsContainer(container: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, inheritedLink?: string | null, parseNestedBlocks?: ParseNestedBlocks): Promise<ImportedRun[]>;
@@ -7,7 +7,7 @@ export interface SectionProperties {
7
7
  headerRIds: Partial<Record<"default" | "first" | "even", string>>;
8
8
  footerRIds: Partial<Record<"default" | "first" | "even", string>>;
9
9
  docGridLinePitchPx?: number;
10
- docGridMode?: "explicit" | "implicit";
10
+ docGridMode?: "explicit";
11
11
  docGridType?: string | null;
12
12
  }
13
13
  export declare function parseSectionProperties(sectPr: XmlElement): SectionProperties;
@@ -1,4 +1,5 @@
1
1
  export interface DocxSettings {
2
2
  adjustLineHeightInTable: boolean;
3
+ defaultTabStop?: number;
3
4
  }
4
5
  export declare function parseSettings(xml: string | null): DocxSettings;
@@ -0,0 +1,6 @@
1
+ import { Element as XmlElement } from '../../@xmldom/xmldom';
2
+
3
+ export declare function stripUndefined<T extends object>(value: T): Partial<T> | undefined;
4
+ export declare function emptyOrUndefined<T extends object>(obj: T): T | undefined;
5
+ export declare function mergeStyles<T extends object>(base: T | undefined, local: T | undefined): T | undefined;
6
+ export declare function parseShdFill(element: XmlElement | null): string | undefined;
@@ -0,0 +1,4 @@
1
+ import { EditorNamedStyle } from '../../../../core/model.js';
2
+ import { DocxImportTheme } from '../../theme.js';
3
+
4
+ export declare function parseImportedStyles(stylesXml: string | null, theme: DocxImportTheme): Record<string, EditorNamedStyle> | undefined;
@@ -2,7 +2,7 @@ import { default as JSZip } from '../../jszip';
2
2
  import { Element as XmlElement } from '../../@xmldom/xmldom';
3
3
  import { EditorNamedStyle, EditorTableNode } from '../../../../core/model.js';
4
4
  import { AssetRegistry } from '../../assetRegistry.js';
5
- import { ThemeFontMap } from '../../themeFonts.js';
5
+ import { DocxImportTheme } from '../../theme.js';
6
6
  import { NumberingMaps } from '../../numbering.js';
7
7
 
8
- export declare function parseTableNode(tableNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, themeFonts: ThemeFontMap, styles?: Record<string, EditorNamedStyle>): Promise<EditorTableNode>;
8
+ export declare function parseTableNode(tableNode: XmlElement, numberingMaps: NumberingMaps, zip: JSZip, relsMap: Map<string, string>, assets: AssetRegistry, theme: DocxImportTheme, styles?: Record<string, EditorNamedStyle>): Promise<EditorTableNode>;
@@ -0,0 +1,17 @@
1
+ import { ThemeFontMap } from '../../themeFonts.js';
2
+ import { ThemeColorMap } from '../../themeColors.js';
3
+
4
+ /**
5
+ * Resolved `word/theme/theme1.xml` data threaded through the importer: the font
6
+ * scheme (for `*Theme` run fonts) and the color scheme (for `w:themeColor`).
7
+ */
8
+ export interface DocxImportTheme {
9
+ fonts: ThemeFontMap;
10
+ colors: ThemeColorMap;
11
+ }
12
+ /**
13
+ * Parses `word/theme/theme1.xml` once and extracts both font and color scheme
14
+ * data. This is the only place the XML is parsed; the individual extractors
15
+ * ({@link extractThemeFonts}, {@link extractThemeColors}) work on the DOM node.
16
+ */
17
+ export declare function parseDocxTheme(themeXml: string | null): DocxImportTheme;