oasis-editor 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -0,0 +1,36 @@
1
+ export declare const OASIS_MENU_ITEMS: {
2
+ readonly fileNew: "file_new";
3
+ readonly fileImport: "file_import";
4
+ readonly fileSave: "file_save";
5
+ readonly fileExport: "file_export";
6
+ readonly fileExportPdf: "file_export_pdf";
7
+ readonly fileExportDocx: "file_export_docx";
8
+ readonly filePrint: "file_print";
9
+ readonly editUndo: "edit_undo";
10
+ readonly editRedo: "edit_redo";
11
+ readonly editCopy: "edit_copy";
12
+ readonly editFind: "edit_find";
13
+ readonly editSelectAll: "edit_selectAll";
14
+ readonly viewMargins: "view_margins";
15
+ readonly viewParagraphMarks: "view_paragraph_marks";
16
+ readonly viewPreciseFonts: "view_precise_fonts";
17
+ readonly insertImage: "insert_image";
18
+ readonly insertTable: "insert_table";
19
+ readonly insertLink: "insert_link";
20
+ readonly insertFootnote: "insert_footnote";
21
+ readonly insertPageBreak: "insert_pageBreak";
22
+ readonly formatText: "format_text";
23
+ readonly formatTextBold: "format_text_bold";
24
+ readonly formatTextItalic: "format_text_italic";
25
+ readonly formatTextUnderline: "format_text_underline";
26
+ readonly formatTextStrike: "format_text_strike";
27
+ readonly formatAlign: "format_align";
28
+ readonly formatAlignLeft: "format_align_left";
29
+ readonly formatAlignCenter: "format_align_center";
30
+ readonly formatAlignRight: "format_align_right";
31
+ readonly formatAlignJustify: "format_align_justify";
32
+ readonly formatLists: "format_lists";
33
+ readonly formatListsBullet: "format_lists_bullet";
34
+ readonly formatListsNumbered: "format_lists_numbered";
35
+ };
36
+ export type OasisMenuItemId = (typeof OASIS_MENU_ITEMS)[keyof typeof OASIS_MENU_ITEMS];
@@ -0,0 +1,7 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export declare function OasisBrandMark(props: {
4
+ /** Rendered height in px; width follows the 3:4 aspect ratio. */
5
+ height?: number;
6
+ class?: string;
7
+ }): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Accessor, JSX } from '../../../solid-js';
2
+ import { OasisEditor } from '../../../../../../core/plugin.js';
3
+
4
+ export interface PluginUiHostProps {
5
+ editor: Accessor<OasisEditor>;
6
+ children: JSX.Element;
7
+ }
8
+ export declare function PluginUiHost(props: PluginUiHostProps): JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Accessor } from '../../../solid-js';
2
+ import { EditorState } from '../../../../../../core/model.js';
3
+ import { ToolbarHost } from '../../../../Toolbar/state/createToolbarApi.js';
4
+
5
+ export interface HorizontalRulerProps {
6
+ state: Accessor<EditorState>;
7
+ toolbarHost: () => ToolbarHost;
8
+ viewportRef: Accessor<HTMLDivElement | undefined>;
9
+ readOnly: Accessor<boolean>;
10
+ }
11
+ export declare function HorizontalRuler(props: HorizontalRulerProps): import("solid-js").JSX.Element;
@@ -0,0 +1,63 @@
1
+ import { EditorPageSettings } from '../../../../../../core/model.js';
2
+
3
+ /**
4
+ * Horizontal ruler geometry. The editor stores page dimensions, margins and
5
+ * paragraph indents all in CSS pixels (96 dpi), so the ruler works purely in
6
+ * pixels too — no point/twip conversion is needed for positioning. Only the
7
+ * tick labels convert pixels to inches/centimeters for display.
8
+ */
9
+ export declare const PX_PER_INCH = 96;
10
+ export declare const PX_PER_CM: number;
11
+ /** Minimum content width (px) the editor guarantees; mirrors getPageContentWidth. */
12
+ export declare const MIN_CONTENT_WIDTH_PX = 24;
13
+ export interface RulerIndents {
14
+ /** Left indent (padding-left), px. */
15
+ indentLeft: number;
16
+ /** Right indent, px. */
17
+ indentRight: number;
18
+ /** First-line indent (text-indent), px. Mutually exclusive with hanging. */
19
+ indentFirstLine: number;
20
+ /** Hanging indent, px. Mutually exclusive with first line. */
21
+ indentHanging: number;
22
+ }
23
+ export interface RulerGeometry {
24
+ pageWidth: number;
25
+ /** Left edge of the white (content) zone, px from page left. */
26
+ contentLeft: number;
27
+ /** Right edge of the white (content) zone, px from page left. */
28
+ contentRight: number;
29
+ /** Gutter width folded into the left margin, px. */
30
+ gutter: number;
31
+ /** X of the left-indent box / hanging marker, px from page left. */
32
+ leftIndentX: number;
33
+ /** X of the first-line marker (top triangle), px from page left. */
34
+ firstLineX: number;
35
+ /** X of the right-indent marker, px from page left. */
36
+ rightIndentX: number;
37
+ }
38
+ /** Signed offset of the first line relative to the left indent (px). */
39
+ export declare function resolveFirstLineOffset(indents: RulerIndents): number;
40
+ export declare function computeRulerGeometry(pageSettings: EditorPageSettings, indents: RulerIndents): RulerGeometry;
41
+ export declare function clamp(value: number, min: number, max: number): number;
42
+ /**
43
+ * Left offset of the first rendered page (`.oasis-editor-paper`) within the
44
+ * scrollable viewport's content space, i.e. independent of the current scroll
45
+ * position. Returns `null` when no page has been rendered/measured yet.
46
+ *
47
+ * The page's horizontal position is owned by CSS (scroll-content gutter +
48
+ * centering) and differs subtly between UI variants, so the ruler measures it
49
+ * from the DOM rather than assuming a constant. This is the single place that
50
+ * formula lives.
51
+ */
52
+ export declare function measurePageLeft(viewport: HTMLElement): number | null;
53
+ export interface RulerTick {
54
+ x: number;
55
+ kind: "major" | "medium" | "minor";
56
+ label?: string;
57
+ }
58
+ /**
59
+ * Generates ruler ticks across the page width. Word shows numbered major ticks
60
+ * at each whole unit and smaller subdivisions in between. The origin (0) is the
61
+ * left content edge; numbers grow outward in both directions, like Word.
62
+ */
63
+ export declare function computeRulerTicks(pageWidth: number, contentLeft: number, unit: "in" | "cm"): RulerTick[];
@@ -1,11 +1,13 @@
1
1
  import { JSX } from '../../../solid-js';
2
2
  import { ToolbarHost } from '../../../state/createToolbarApi.js';
3
3
  import { ToolbarRegistry } from '../../../registry/ToolbarRegistry.js';
4
+ import { ToolbarLayoutMode } from '../../../../../OasisEditorAppProps.js';
4
5
 
5
6
  export interface ToolbarProps {
6
7
  host: () => ToolbarHost;
7
8
  registry: ToolbarRegistry;
8
9
  showFileGroup?: boolean;
10
+ layout?: ToolbarLayoutMode;
9
11
  }
10
12
  /**
11
13
  * Thin, data-driven toolbar renderer: maps the per-instance registry's ordered
@@ -0,0 +1,40 @@
1
+ export declare const OASIS_TOOLBAR_ITEMS: {
2
+ readonly fileDropdown: "editor-toolbar-file-dropdown";
3
+ readonly exportDocx: "editor-toolbar-export-docx";
4
+ readonly exportPdf: "editor-toolbar-export-pdf";
5
+ readonly importDocument: "editor-toolbar-import-document";
6
+ readonly undo: "editor-toolbar-undo";
7
+ readonly redo: "editor-toolbar-redo";
8
+ readonly style: "editor-toolbar-style";
9
+ readonly fontFamily: "editor-toolbar-font-family";
10
+ readonly fontSize: "editor-toolbar-font-size";
11
+ readonly color: "editor-toolbar-color";
12
+ readonly highlight: "editor-toolbar-highlight";
13
+ readonly textShading: "editor-toolbar-text-shading";
14
+ readonly bold: "editor-toolbar-bold";
15
+ readonly italic: "editor-toolbar-italic";
16
+ readonly underlineControl: "editor-toolbar-underline-control";
17
+ readonly strike: "editor-toolbar-strike";
18
+ readonly superscript: "editor-toolbar-superscript";
19
+ readonly subscript: "editor-toolbar-subscript";
20
+ readonly insertImage: "editor-toolbar-insert-image";
21
+ readonly insertTable: "editor-toolbar-insert-table";
22
+ readonly link: "editor-toolbar-link";
23
+ readonly unlink: "editor-toolbar-unlink";
24
+ readonly footnote: "editor-toolbar-footnote";
25
+ readonly imageAlt: "editor-toolbar-image-alt";
26
+ readonly alignLeft: "editor-toolbar-align-left";
27
+ readonly alignCenter: "editor-toolbar-align-center";
28
+ readonly alignRight: "editor-toolbar-align-right";
29
+ readonly alignJustify: "editor-toolbar-align-justify";
30
+ readonly bulletList: "editor-toolbar-list-bullet";
31
+ readonly orderedList: "editor-toolbar-list-ordered";
32
+ readonly outdent: "editor-toolbar-list-outdent";
33
+ readonly indent: "editor-toolbar-list-indent";
34
+ readonly listOptions: "editor-toolbar-list-options";
35
+ readonly lineSpacing: "editor-toolbar-line-spacing-control";
36
+ readonly metrics: "editor-toolbar-metrics";
37
+ readonly table: "editor-toolbar-table";
38
+ readonly section: "editor-toolbar-section";
39
+ };
40
+ export type OasisToolbarItemId = (typeof OASIS_TOOLBAR_ITEMS)[keyof typeof OASIS_TOOLBAR_ITEMS];
@@ -1,7 +1,7 @@
1
1
  import { JSX } from '../../../../solid-js';
2
2
  import { ColorPalette } from '../../../../../schema/palette.js';
3
3
 
4
- export type ColorPickerKind = "color" | "highlight";
4
+ export type ColorPickerKind = "color" | "highlight" | "shading";
5
5
  export interface ColorPickerProps {
6
6
  kind: ColorPickerKind;
7
7
  icon: string;
@@ -1,6 +1,7 @@
1
1
  import { JSX } from '../../../../solid-js';
2
2
 
3
- /** Vertical divider between toolbar item groups. */
4
- export declare function Separator(props: {
3
+ export interface SeparatorProps {
5
4
  hidden?: boolean;
6
- }): JSX.Element;
5
+ }
6
+ /** Vertical divider between toolbar item groups. */
7
+ export declare function Separator(props: SeparatorProps): JSX.Element;
@@ -1,5 +1,10 @@
1
1
  import { ToolbarItem } from '../../../../../schema/items.js';
2
2
 
3
+ export type ToolbarMoveTarget = number | {
4
+ before: string;
5
+ } | {
6
+ after: string;
7
+ };
3
8
  export interface ToolbarRegistry {
4
9
  /** Add or update by id (last-write-wins). New items append, then sort by `order`. */
5
10
  register(item: ToolbarItem): void;
@@ -10,8 +15,8 @@ export interface ToolbarRegistry {
10
15
  /** Replace an existing item in place, preserving its position. */
11
16
  replace(targetId: string, item: ToolbarItem): void;
12
17
  remove(id: string): void;
13
- /** Move an existing item to an absolute index. */
14
- move(id: string, toIndex: number): void;
18
+ /** Move an existing item to an absolute index or relative to another item. */
19
+ move(id: string, target: ToolbarMoveTarget): void;
15
20
  get(id: string): ToolbarItem | undefined;
16
21
  getOrdered(): ToolbarItem[];
17
22
  /** Backward-friendly alias for getOrdered. */
@@ -103,7 +103,7 @@ export interface SelectItem extends ToolbarItemBase {
103
103
  }
104
104
  export interface ColorPickerItem extends ToolbarItemBase {
105
105
  type: "colorPicker";
106
- kind: "color" | "highlight";
106
+ kind: "color" | "highlight" | "shading";
107
107
  /** Command dispatched with the chosen color (or null) as payload. */
108
108
  command: CommandRef;
109
109
  palette?: ColorPalette;
@@ -0,0 +1,13 @@
1
+ interface WelcomeOverlayProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ }
5
+ /**
6
+ * First-use welcome, rendered as an overlay that fills the editor container
7
+ * (reusing the loading-overlay positioning) rather than a viewport modal. Offers
8
+ * opt-in precise font mode; the Enable/Skip handlers drive the Local Font Access
9
+ * orchestration, persist the choice, and close. Shown once (gated by
10
+ * `welcomeSeen` in user preferences).
11
+ */
12
+ export declare function WelcomeOverlay(props: WelcomeOverlayProps): import("solid-js").JSX.Element;
13
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Horizontal gutter (px) between the page (`.oasis-editor-paper`) and the edge
3
+ * of the scrollable editor content (`.oasis-editor-editor-scroll-content`).
4
+ *
5
+ * The single source of truth for the horizontal gutter. TS uses it directly for
6
+ * the editor shell width (`pageWidth + 2 * gutter`) and injects it into CSS as
7
+ * the `--oasis-editor-gutter-x` custom property on `.oasis-editor-app` (see
8
+ * OasisEditorApp.tsx), so the gutter is defined exactly once. Keeping it
9
+ * identical across every UI variant is what keeps the ruler origin aligned with
10
+ * the caret — the ruler still measures the paper from the DOM as a backstop.
11
+ */
12
+ export declare const EDITOR_SCROLL_PADDING_PX = 34;
@@ -1,5 +1,7 @@
1
1
  import { Accessor } from '../solid-js';
2
2
  import { EditorState, EditorLayoutParagraph } from '../../core/model.js';
3
+ import { WrapPreset } from '../../core/commands/floatingLayout.js';
4
+ import { ResizeHandleDirection } from '../resizeGeometry.js';
3
5
  export interface InputBox {
4
6
  left: number;
5
7
  top: number;
@@ -22,6 +24,21 @@ export interface SelectedImageBox {
22
24
  top: number;
23
25
  width: number;
24
26
  height: number;
27
+ /** Shape rotation in degrees (0 when not rotated). */
28
+ rotation: number;
29
+ }
30
+ export interface SelectedTextBoxBox {
31
+ paragraphId: string;
32
+ startOffset: number;
33
+ endOffset: number;
34
+ left: number;
35
+ top: number;
36
+ width: number;
37
+ height: number;
38
+ /** Shape rotation in degrees (0 when not rotated). */
39
+ rotation: number;
40
+ /** True when the text box is a floating (anchored) drawing. */
41
+ floating: boolean;
25
42
  }
26
43
  export interface RevisionBox {
27
44
  revisionId: string;
@@ -31,13 +48,24 @@ export interface RevisionBox {
31
48
  left: number;
32
49
  top: number;
33
50
  }
34
- export type ImageResizeHandleDirection = "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
35
- export declare const IMAGE_RESIZE_HANDLE_DIRECTIONS: ImageResizeHandleDirection[];
51
+ /**
52
+ * State and actions backing the Word-style "Layout Options" popup for the
53
+ * selected image or text box.
54
+ */
55
+ export interface LayoutOptionsOverlay {
56
+ /** Which kind of object is currently selected (`null` when none qualifies). */
57
+ target: Accessor<"image" | "textBox" | null>;
58
+ /** Active wrap preset for the selected object (`null` when none). */
59
+ preset: Accessor<WrapPreset | null>;
60
+ /** True when the selected object is pinned to the page. */
61
+ fixedPosition: Accessor<boolean>;
62
+ setPreset: (preset: WrapPreset) => void;
63
+ setFixedPosition: (fixed: boolean) => void;
64
+ }
36
65
  export interface EditorSurfaceProps {
37
66
  state: Accessor<EditorState>;
38
67
  measuredBlockHeights?: Accessor<Record<string, number>>;
39
68
  measuredParagraphLayouts?: Accessor<Record<string, EditorLayoutParagraph>>;
40
- layoutMode?: "fast" | "wordParity";
41
69
  /**
42
70
  * Phase 4: scroll viewport accessor for page virtualization.
43
71
  * When provided, only pages within (or near) the viewport are rendered with
@@ -56,7 +84,10 @@ export interface EditorSurfaceProps {
56
84
  onImageMouseDown: (paragraphId: string, paragraphOffset: number, event: MouseEvent & {
57
85
  currentTarget: HTMLElement;
58
86
  }) => void;
59
- onImageResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction: ImageResizeHandleDirection, event: MouseEvent & {
87
+ onImageResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction: ResizeHandleDirection, event: MouseEvent & {
88
+ currentTarget: HTMLElement;
89
+ }) => void;
90
+ onTextBoxResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction: ResizeHandleDirection, event: MouseEvent & {
60
91
  currentTarget: HTMLElement;
61
92
  }) => void;
62
93
  onTableDragHandleMouseDown: (tableId: string, event: MouseEvent) => void;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Font sizes are stored in the model — and rendered on the canvas — in pixels,
3
+ * but the toolbar and dialogs present them to the user in points (pt), matching
4
+ * Word. These helpers convert at that UI boundary; the model/render stay in px.
5
+ */
6
+ /** Standard point sizes offered in the toolbar and font dialog dropdowns. */
7
+ export declare const STANDARD_FONT_SIZES_PT: number[];
8
+ /** Convert a model pixel size to a point value, rounded to 2 decimals. */
9
+ export declare function fontSizePxToPt(px: number): number;
10
+ /** Convert a user-facing point size to a model pixel size, rounded to 4 decimals. */
11
+ export declare function fontSizePtToPx(pt: number): number;
12
+ /** Format a model pixel size as a point display string ("" when invalid/≤0). */
13
+ export declare function formatFontSizePt(px: string | number | null | undefined): string;
14
+ /** Parse a user-facing point string into a model pixel size (null when invalid/≤0). */
15
+ export declare function parseFontSizePtToPx(pt: string | number | null | undefined): number | null;
@@ -1,6 +1,7 @@
1
1
  import { OasisEditorAppProps } from '../OasisEditorApp.js';
2
+ import { OasisEditorClient } from '../../app/client/OasisEditorClient.js';
2
3
 
3
- export interface OasisMountInstance {
4
+ export interface OasisMountInstance extends OasisEditorClient {
4
5
  unmount: () => void;
5
6
  }
6
7
  /**
@@ -0,0 +1,34 @@
1
+ import { ResizeHandleDirection } from '../../../resizeGeometry.js';
2
+
3
+ export interface ResizeHandlesOverlayBox {
4
+ left: number;
5
+ top: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface ResizeHandlesOverlayProps {
10
+ /** The selected object's box, or `null` when nothing is selected. */
11
+ box: () => ResizeHandlesOverlayBox | null;
12
+ readOnly: boolean;
13
+ /** Variant class appended to the shared overlay class (image vs text box). */
14
+ variantClass: string;
15
+ /** Current rotation in degrees, applied as a CSS transform on the overlay. */
16
+ rotation?: () => number;
17
+ onResizeStart: (direction: ResizeHandleDirection, event: MouseEvent & {
18
+ currentTarget: HTMLElement;
19
+ }) => void;
20
+ /** Optional handler for pressing the overlay body (e.g. image drag-to-move). */
21
+ onBodyMouseDown?: (event: MouseEvent & {
22
+ currentTarget: HTMLElement;
23
+ }) => void;
24
+ /** Optional handler for pressing the rotation knob. */
25
+ onRotateStart?: (event: MouseEvent & {
26
+ currentTarget: HTMLElement;
27
+ }) => void;
28
+ }
29
+ /**
30
+ * Renders the 8-handle selection overlay used to resize a floating/inline
31
+ * object. Shared by image and text-box selection so the handle geometry,
32
+ * positioning and pointer plumbing live in one place.
33
+ */
34
+ export declare function ResizeHandlesOverlay(props: ResizeHandlesOverlayProps): import("solid-js").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface ButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: "primary" | "secondary" | "ghost" | "danger";
5
+ size?: "sm" | "md";
6
+ icon?: string;
7
+ iconPosition?: "start" | "end";
8
+ fullWidth?: boolean;
9
+ }
10
+ export declare function Button(props: ButtonProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface CheckboxProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
4
+ label: string;
5
+ description?: string;
6
+ error?: string;
7
+ onChange?: (checked: boolean) => void;
8
+ }
9
+ export declare function Checkbox(props: CheckboxProps): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface DialogFooterProps extends JSX.HTMLAttributes<HTMLDivElement> {
4
+ align?: "start" | "end" | "between";
5
+ }
6
+ export declare function DialogFooter(props: DialogFooterProps): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface FloatingActionButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ icon: string;
5
+ label: string;
6
+ active?: boolean;
7
+ }
8
+ export declare function FloatingActionButton(props: FloatingActionButtonProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface IconButtonProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
4
+ icon: string;
5
+ label: string;
6
+ active?: boolean;
7
+ variant?: "ghost" | "secondary";
8
+ size?: "sm" | "md";
9
+ }
10
+ export declare function IconButton(props: IconButtonProps): JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface SelectFieldOption {
4
+ value: string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface SelectFieldProps extends Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, "onChange"> {
9
+ label?: string;
10
+ description?: string;
11
+ error?: string;
12
+ options: SelectFieldOption[];
13
+ onChange?: (value: string) => void;
14
+ }
15
+ export declare function SelectField(props: SelectFieldProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface SidePanelProps extends JSX.HTMLAttributes<HTMLElement> {
4
+ mode?: "dock" | "overlay";
5
+ width?: number | string;
6
+ }
7
+ export declare function SidePanel(props: SidePanelProps): JSX.Element;
8
+ export interface SidePanelSectionProps extends JSX.HTMLAttributes<HTMLDivElement> {
9
+ }
10
+ export declare function SidePanelHeader(props: SidePanelSectionProps): JSX.Element;
11
+ export declare function SidePanelBody(props: SidePanelSectionProps): JSX.Element;
12
+ export declare function SidePanelFooter(props: SidePanelSectionProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { JSX } from '../../solid-js';
2
+
3
+ export interface TextFieldProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
4
+ label?: string;
5
+ description?: string;
6
+ error?: string;
7
+ onChange?: (value: string) => void;
8
+ }
9
+ export declare function TextField(props: TextFieldProps): JSX.Element;
@@ -0,0 +1,36 @@
1
+ export { Dialog } from '../../../components/Dialogs/Dialog.js';
2
+ export type { DialogProps } from '../../../components/Dialogs/Dialog.js';
3
+ export { Tabs } from '../../../components/Tabs/Tabs.js';
4
+ export type { TabsItem, TabsProps } from '../../../components/Tabs/Tabs.js';
5
+ export { Button } from '../../Button.js';
6
+ export type { ButtonProps } from '../../Button.js';
7
+ export { IconButton } from '../../IconButton.js';
8
+ export type { IconButtonProps } from '../../IconButton.js';
9
+ export { TextField } from '../../TextField.js';
10
+ export type { TextFieldProps } from '../../TextField.js';
11
+ export { Checkbox } from '../../Checkbox.js';
12
+ export type { CheckboxProps } from '../../Checkbox.js';
13
+ export { SelectField } from '../../SelectField.js';
14
+ export type { SelectFieldOption, SelectFieldProps } from '../../SelectField.js';
15
+ export { DialogFooter } from '../../DialogFooter.js';
16
+ export type { DialogFooterProps } from '../../DialogFooter.js';
17
+ export { FloatingActionButton } from '../../FloatingActionButton.js';
18
+ export type { FloatingActionButtonProps } from '../../FloatingActionButton.js';
19
+ export { SidePanel, SidePanelBody, SidePanelFooter, SidePanelHeader, } from '../../SidePanel.js';
20
+ export type { SidePanelProps, SidePanelSectionProps } from '../../SidePanel.js';
21
+ export { Popover } from '../../../components/Toolbar/primitives/Popover.js';
22
+ export type { PopoverProps, PopoverTriggerApi, } from '../../../components/Toolbar/primitives/Popover.js';
23
+ export { Menu } from '../../../components/Toolbar/primitives/Menu.js';
24
+ export type { MenuProps } from '../../../components/Toolbar/primitives/Menu.js';
25
+ export { Select } from '../../../components/Toolbar/primitives/Select.js';
26
+ export type { ToolbarSelectProps } from '../../../components/Toolbar/primitives/Select.js';
27
+ export { Separator } from '../../../components/Toolbar/primitives/Separator.js';
28
+ export type { SeparatorProps } from '../../../components/Toolbar/primitives/Separator.js';
29
+ export { SplitButton } from '../../../components/Toolbar/primitives/SplitButton.js';
30
+ export type { SplitButtonProps } from '../../../components/Toolbar/primitives/SplitButton.js';
31
+ export { ColorPicker } from '../../../components/Toolbar/primitives/ColorPicker.js';
32
+ export type { ColorPickerKind, ColorPickerProps, } from '../../../components/Toolbar/primitives/ColorPicker.js';
33
+ export { GridPicker } from '../../../components/Toolbar/primitives/GridPicker.js';
34
+ export type { GridPickerProps } from '../../../components/Toolbar/primitives/GridPicker.js';
35
+ export { Button as ToolbarButton } from '../../../components/Toolbar/primitives/Button.js';
36
+ export type { ToolbarButtonProps } from '../../../components/Toolbar/primitives/Button.js';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Pure, object-type-agnostic geometry for handle-based resizing.
3
+ *
4
+ * Shared by image and text-box resize: given a resize session (the dimensions
5
+ * captured when a handle was grabbed) and the pointer delta, it resolves the
6
+ * next width/height, applying min/max constraints and optional aspect-ratio
7
+ * preservation. Contains no DOM or editor-state coupling.
8
+ */
9
+ export type ResizeHandleDirection = "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
10
+ export declare const RESIZE_HANDLE_DIRECTIONS: ResizeHandleDirection[];
11
+ /** Minimum size (px) any resizable object may shrink to. */
12
+ export declare const MIN_RESIZE_SIZE_PX = 24;
13
+ /**
14
+ * The geometry captured at the start of a resize session. Both
15
+ * `ActiveImageResize` and the text-box resize session satisfy this shape.
16
+ */
17
+ export interface ResizeSessionGeometry {
18
+ handleDirection: ResizeHandleDirection;
19
+ startWidth: number;
20
+ startHeight: number;
21
+ aspectRatio: number;
22
+ }
23
+ export declare function clamp(value: number, min: number, max?: number): number;
24
+ export declare function axisSignForDirection(direction: ResizeHandleDirection, axis: "x" | "y"): -1 | 0 | 1;
25
+ export declare function resolveResizedDimensions(geometry: ResizeSessionGeometry, deltaX: number, deltaY: number, preserveAspectRatio: boolean, maxWidth: number): {
26
+ width: number;
27
+ height: number;
28
+ };
@@ -2,18 +2,24 @@ import { Accessor } from '../../solid-js';
2
2
  import { OasisEditorEditorFileHandlers, OasisEditorEditorInputHandlers, OasisEditorEditorLayoutProps, OasisEditorEditorOverlayProps, OasisEditorEditorRefProps, OasisEditorEditorSurfaceHandlers } from '../../../OasisEditorEditor.js';
3
3
  import { ToolbarHost } from '../../../components/Toolbar/state/createToolbarApi.js';
4
4
  import { ToolbarRegistry } from '../../../components/Toolbar/registry/ToolbarRegistry.js';
5
+ import { MenuRegistry } from '../../../components/Menubar/menuRegistry.js';
5
6
  import { EditorLayoutParagraph, EditorState } from '../../../../core/model.js';
7
+ import { ToolbarLayoutMode } from '../../../OasisEditorAppProps.js';
8
+ import { OasisEditor } from '../../../../core/plugin.js';
6
9
 
7
10
  export interface ShellProps {
8
11
  state: EditorState;
9
12
  toolbarHost: () => ToolbarHost;
13
+ runtimeEditor: Accessor<OasisEditor>;
10
14
  persistenceStatus: () => string;
11
15
  toolbarRegistry: ToolbarRegistry;
16
+ menuRegistry: MenuRegistry;
12
17
  showChrome: boolean;
13
18
  showTitleBar: boolean;
14
19
  showMenubar: boolean;
15
20
  showToolbar: boolean;
16
21
  showOutline: boolean;
22
+ toolbarLayout: ToolbarLayoutMode;
17
23
  isReadOnly: boolean;
18
24
  measuredBlockHeights: Accessor<Record<string, number>>;
19
25
  measuredParagraphLayouts: Accessor<Record<string, EditorLayoutParagraph>>;
@@ -0,0 +1,3 @@
1
+ import { EditorLayoutLine, EditorNamedStyle, EditorParagraphNode } from '../../../../core/model.js';
2
+
3
+ export declare function applyParagraphAlignment(paragraph: EditorParagraphNode, styles: Record<string, EditorNamedStyle> | undefined, contentWidth: number, lines: EditorLayoutLine[], lineHardBreaks: boolean[], charByOffset: Map<number, string>): EditorLayoutLine[];
@@ -0,0 +1,9 @@
1
+ import { EditorTextStyle } from '../../../../core/model.js';
2
+
3
+ /**
4
+ * Clears the per-character width cache. Call this after font metrics become
5
+ * available asynchronously (browser preload), so cached heuristic widths are
6
+ * recomputed from the real TrueType metrics.
7
+ */
8
+ export declare function clearTextMeasureCache(): void;
9
+ export declare function measureCharacterWidth(char: string, styles: EditorTextStyle | undefined, fallbackFontSize: number): number;
@@ -0,0 +1,5 @@
1
+ import { EditorLayoutLine, EditorNamedStyle, EditorParagraphNode } from '../../../../core/model.js';
2
+ import { TextMeasureOptions } from '../../types.js';
3
+
4
+ export declare function measureParagraphMinContentWidthPx(paragraph: EditorParagraphNode, styles?: Record<string, EditorNamedStyle>): number;
5
+ export declare function composeMeasuredParagraphLines(options: TextMeasureOptions): EditorLayoutLine[];
@@ -0,0 +1,4 @@
1
+ /** 11pt expressed in CSS pixels (11 * 96 / 72). */
2
+ export declare const DEFAULT_FONT_SIZE = 14.6667;
3
+ /** CSS pixels per typographic point. */
4
+ export declare const PX_PER_POINT: number;
@@ -0,0 +1,12 @@
1
+ import { EditorTextStyle } from '../../../../core/model.js';
2
+
3
+ export declare function getMeasuredFontSize(styles: EditorTextStyle | undefined, fallbackFontSize: number): number;
4
+ export declare function getRenderedMeasureChar(char: string, styles: EditorTextStyle | undefined): string;
5
+ export declare function buildCanvasFont(styles: EditorTextStyle | undefined, fallbackFontSize: number): string;
6
+ /**
7
+ * Clears the cached natural line heights. Required after the metric source for a
8
+ * family changes (precise font mode toggling, or real metrics arriving), since
9
+ * the cache is keyed only by the CSS font string, not by which face supplied it.
10
+ */
11
+ export declare function clearNormalLineHeightCache(): void;
12
+ export declare function resolveRenderedLineHeightPx(styles: EditorTextStyle | undefined, lineHeightMultiple: number): number;