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.
- package/README.md +388 -1
- package/dist/OasisEditorApp-DEnDLTaw.js +45893 -0
- package/dist/app/bootstrap/createOasisEditorApp.d.ts +2 -3
- package/dist/app/bootstrap/createOasisEditorContainer.d.ts +2 -3
- package/dist/app/client/OasisEditorClient.d.ts +97 -0
- package/dist/app/controllers/EditorCommandsController.d.ts +1 -1
- package/dist/app/controllers/createResizeSession.d.ts +43 -0
- package/dist/app/controllers/createRotateSession.d.ts +36 -0
- package/dist/app/controllers/documentIO/DocumentImporter.d.ts +1 -1
- package/dist/app/controllers/tableResize/tableResizeApply.d.ts +5 -0
- package/dist/app/controllers/tableResize/tableResizeConstraints.d.ts +17 -0
- package/dist/app/controllers/tableResize/tableResizeDom.d.ts +9 -0
- package/dist/app/controllers/tableResize/tableResizeGeometry.d.ts +5 -0
- package/dist/app/controllers/tableResize/tableResizeHitTest.d.ts +4 -0
- package/dist/app/controllers/tableResize/tableResizeTypes.d.ts +65 -0
- package/dist/app/controllers/tableResize/tableResizeUnits.d.ts +6 -0
- package/dist/app/controllers/useEditorDocumentIO.d.ts +3 -3
- package/dist/app/controllers/useEditorHistoryActions.d.ts +3 -1
- package/dist/app/controllers/useEditorImageOperations.d.ts +6 -14
- package/dist/app/controllers/useEditorLayout.d.ts +2 -2
- package/dist/app/controllers/useEditorStyle.d.ts +1 -1
- package/dist/app/controllers/useEditorSurfaceEvents.d.ts +1 -0
- package/dist/app/controllers/useEditorTableOperations.d.ts +2 -2
- package/dist/app/controllers/useEditorTableResize.d.ts +2 -24
- package/dist/app/controllers/useEditorTextBoxOperations.d.ts +24 -0
- package/dist/app/services/userPreferences.d.ts +4 -0
- package/dist/assets/importDocxWorker-R5rI6JIO.js +12 -0
- package/dist/branding/apple-touch-icon.png +0 -0
- package/dist/branding/brand-mark.webp +0 -0
- package/dist/branding/favicon-16x16.png +0 -0
- package/dist/branding/favicon-32x32.png +0 -0
- package/dist/branding/favicon.ico +0 -0
- package/dist/branding/github-pages-icon.png +0 -0
- package/dist/branding/icon-192.png +0 -0
- package/dist/branding/icon-512.png +0 -0
- package/dist/branding/logo-full.png +0 -0
- package/dist/branding/logo-mark-square.png +0 -0
- package/dist/branding/social-card.png +0 -0
- package/dist/core/Editor.d.ts +4 -5
- package/dist/core/cloneState.d.ts +3 -1
- package/dist/core/commands/CommandRegistry.d.ts +6 -1
- package/dist/core/commands/block.d.ts +1 -1
- package/dist/core/commands/builtinCommands.d.ts +2 -0
- package/dist/core/commands/floatingLayout.d.ts +29 -0
- package/dist/core/commands/image.d.ts +16 -8
- package/dist/core/commands/list.d.ts +1 -1
- package/dist/core/commands/publicCommandTypes.d.ts +110 -0
- package/dist/core/commands/selectedObjectRun.d.ts +20 -0
- package/dist/core/commands/table/insertTableCommand.d.ts +3 -0
- package/dist/core/commands/table/tableCellStyleCommands.d.ts +5 -0
- package/dist/core/commands/table/tableColumnCommands.d.ts +3 -0
- package/dist/core/commands/table/tableCommandUtils.d.ts +16 -0
- package/dist/core/commands/table/tableRowCommands.d.ts +5 -0
- package/dist/core/commands/table/tableStyleCommands.d.ts +4 -0
- package/dist/core/commands/table.d.ts +5 -10
- package/dist/core/commands/text.d.ts +1 -1
- package/dist/core/commands/textBox.d.ts +21 -0
- package/dist/core/document/blockReplacement.d.ts +7 -0
- package/dist/core/document/bookmarkAnchors.d.ts +8 -0
- package/dist/core/document/clone.d.ts +8 -0
- package/dist/core/document/paragraphRunBuild.d.ts +14 -0
- package/dist/core/document/paragraphRunEdit.d.ts +3 -0
- package/dist/core/document/paragraphRunQuery.d.ts +14 -0
- package/dist/core/document/paragraphRuns.d.ts +3 -0
- package/dist/core/editorCommands.d.ts +2 -0
- package/dist/core/editorState.d.ts +5 -3
- package/dist/core/endnotes.d.ts +41 -0
- package/dist/core/engine.d.ts +18 -3
- package/dist/core/html/htmlBlockWalker.d.ts +17 -0
- package/dist/core/html/htmlEscape.d.ts +1 -0
- package/dist/core/html/htmlStyleParser.d.ts +3 -0
- package/dist/core/html/htmlTextSerializer.d.ts +5 -0
- package/dist/core/html/inlineImageParser.d.ts +3 -0
- package/dist/core/html/inlineStyleParser.d.ts +3 -0
- package/dist/core/html/paragraphStyleParser.d.ts +3 -0
- package/dist/core/html/styleCss.d.ts +5 -0
- package/dist/core/model/assets.d.ts +7 -0
- package/dist/core/model/documentIndex.d.ts +58 -0
- package/dist/core/model/documentSections.d.ts +4 -0
- package/dist/core/model/editingZones.d.ts +26 -0
- package/dist/core/model/editorState.d.ts +18 -0
- package/dist/core/model/index.d.ts +31 -0
- package/dist/core/model/pageGeometry.d.ts +14 -0
- package/dist/core/model/paragraphWalker.d.ts +5 -0
- package/dist/core/model/queries.d.ts +2 -1
- package/dist/core/model/styleDefaults.d.ts +6 -0
- package/dist/core/model/styleResolution.d.ts +44 -0
- package/dist/core/model/types/document.d.ts +86 -0
- package/dist/core/model/types/documentBookmarks.d.ts +49 -0
- package/dist/core/model/types/documentEndnotes.d.ts +8 -0
- package/dist/core/model/types/documentFootnotes.d.ts +8 -0
- package/dist/core/model/types/layout.d.ts +93 -0
- package/dist/core/model/types/nodes.d.ts +192 -0
- package/dist/core/model/types/primitives.d.ts +140 -0
- package/dist/core/model/types/selection.d.ts +14 -0
- package/dist/core/model/types/styles.d.ts +149 -0
- package/dist/core/model.d.ts +7 -444
- package/dist/core/plugin.d.ts +59 -6
- package/dist/core/plugins/PluginCollection.d.ts +1 -0
- package/dist/core/plugins/PluginUiRegistry.d.ts +20 -0
- package/dist/core/selection/navigation.d.ts +5 -0
- package/dist/core/selection/rangeEditing.d.ts +13 -0
- package/dist/core/textStyle/textStyleKeys.d.ts +6 -0
- package/dist/core/textStyle/textStyleMutations.d.ts +8 -0
- package/dist/export/docx/bookmarksXml.d.ts +21 -0
- package/dist/export/docx/borders.d.ts +25 -0
- package/dist/export/docx/docxTypes.d.ts +35 -2
- package/dist/export/docx/endnotesXml.d.ts +24 -0
- package/dist/export/docx/stylesXml.d.ts +3 -0
- package/dist/export/docx/tableXml.d.ts +7 -1
- package/dist/export/docx/text/blocksXml.d.ts +7 -0
- package/dist/export/docx/text/constants.d.ts +6 -0
- package/dist/export/docx/text/drawingContainerXml.d.ts +16 -0
- package/dist/export/docx/text/dropCapXml.d.ts +9 -0
- package/dist/export/docx/text/endnoteRunXml.d.ts +5 -0
- package/dist/export/docx/text/fieldRunXml.d.ts +11 -0
- package/dist/export/docx/text/footnoteRunXml.d.ts +5 -0
- package/dist/export/docx/text/hyperlinkXml.d.ts +3 -0
- package/dist/export/docx/text/imageRunXml.d.ts +3 -0
- package/dist/export/docx/text/paragraphPropertiesXml.d.ts +16 -0
- package/dist/export/docx/text/runPropertiesXml.d.ts +3 -0
- package/dist/export/docx/text/runTextXml.d.ts +1 -0
- package/dist/export/docx/text/runXml.d.ts +5 -0
- package/dist/export/docx/text/styleMaterialization.d.ts +4 -0
- package/dist/export/docx/text/textBoxRunXml.d.ts +4 -0
- package/dist/export/docx/textXml.d.ts +1 -6
- package/dist/export/pdf/OasisPdfWriter.d.ts +1 -0
- package/dist/export/pdf/draw/borderDash.d.ts +11 -0
- package/dist/export/pdf/draw/drawFragment.d.ts +1 -0
- package/dist/export/pdf/draw/drawParagraph.d.ts +8 -1
- package/dist/export/pdf/fonts/TrueTypePdfFontSubsetter.d.ts +5 -0
- package/dist/export/pdf/fonts/officeFontAssets.d.ts +24 -0
- package/dist/export/pdf/units.d.ts +2 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/en.d.ts +108 -0
- package/dist/i18n/locales/pt-BR.d.ts +108 -0
- package/dist/import/DocumentFormatImporter.d.ts +26 -0
- package/dist/import/documentImporterRegistry.d.ts +6 -0
- package/dist/import/docx/bookmarks.d.ts +8 -0
- package/dist/import/docx/borders.d.ts +37 -0
- package/dist/import/docx/docxImporter.d.ts +3 -0
- package/dist/import/docx/dropCap.d.ts +13 -0
- package/dist/import/docx/endnotes.d.ts +17 -0
- package/dist/import/docx/footnotes.d.ts +2 -2
- package/dist/import/docx/headerFooter.d.ts +2 -2
- package/dist/import/docx/nestedBlocks.d.ts +15 -0
- package/dist/import/docx/numbering.d.ts +16 -1
- package/dist/import/docx/{styles.d.ts → paragraphStyle.d.ts} +2 -8
- package/dist/import/docx/paragraphs.d.ts +5 -4
- package/dist/import/docx/runStyle.d.ts +6 -0
- package/dist/import/docx/runs/drawingImage.d.ts +13 -0
- package/dist/import/docx/runs/fields.d.ts +3 -0
- package/dist/import/docx/runs/relationships.d.ts +11 -0
- package/dist/import/docx/runs/textBox.d.ts +6 -0
- package/dist/import/docx/runs/types.d.ts +42 -0
- package/dist/import/docx/runs/units.d.ts +11 -0
- package/dist/import/docx/runs/vmlImage.d.ts +6 -0
- package/dist/import/docx/runs.d.ts +14 -34
- package/dist/import/docx/sectionProperties.d.ts +1 -1
- package/dist/import/docx/settings.d.ts +1 -0
- package/dist/import/docx/styleUtils.d.ts +6 -0
- package/dist/import/docx/stylesXml.d.ts +4 -0
- package/dist/import/docx/tables.d.ts +2 -2
- package/dist/import/docx/theme.d.ts +17 -0
- package/dist/import/docx/themeColors.d.ts +37 -0
- package/dist/import/docx/themeFonts.d.ts +5 -1
- package/dist/import/docx/xmlHelpers.d.ts +3 -1
- package/dist/import/html/htmlImporter.d.ts +3 -0
- package/dist/import/html/importHtmlToEditorDocument.d.ts +8 -0
- package/dist/index-DuS88s1l.js +36810 -0
- package/dist/index.d.ts +39 -14
- package/dist/layoutProjection/blockHeights.d.ts +1 -1
- package/dist/layoutProjection/blocksPagination.d.ts +1 -1
- package/dist/layoutProjection/constants.d.ts +9 -1
- package/dist/layoutProjection/documentLayout.d.ts +0 -1
- package/dist/layoutProjection/dropCapExclusion.d.ts +23 -0
- package/dist/layoutProjection/endnotePagination.d.ts +8 -0
- package/dist/layoutProjection/floatingObjects.d.ts +45 -0
- package/dist/layoutProjection/footnotePagination.d.ts +1 -2
- package/dist/layoutProjection/headerFooterFootnotes.d.ts +1 -1
- package/dist/layoutProjection/headerFooterProjection.d.ts +3 -3
- package/dist/layoutProjection/index.d.ts +9 -7
- package/dist/layoutProjection/paragraphBorders.d.ts +14 -0
- package/dist/layoutProjection/paragraphPagination.d.ts +23 -9
- package/dist/layoutProjection/paragraphProjection.d.ts +1 -1
- package/dist/layoutProjection/sectionPagination.d.ts +3 -2
- package/dist/layoutProjection/tablePagination.d.ts +3 -2
- package/dist/layoutProjection/tableProjection.d.ts +1 -1
- package/dist/oasis-editor.css +1 -1
- package/dist/oasis-editor.js +52 -80462
- package/dist/oasis-editor.umd.cjs +4 -4
- package/dist/plugins/internal/createEssentialsPlugin.d.ts +8 -1
- package/dist/react.d.ts +12 -0
- package/dist/react.js +24 -0
- package/dist/testing/wordLayoutParity.d.ts +0 -3
- package/dist/text/fonts/FontMetricsProvider.d.ts +38 -0
- package/dist/text/fonts/FontProgramFactory.d.ts +6 -0
- package/dist/text/fonts/core/types.d.ts +69 -0
- package/dist/text/fonts/decoders/Brotli.d.ts +4 -0
- package/dist/text/fonts/decoders/FontDecoderRegistry.d.ts +10 -0
- package/dist/text/fonts/decoders/TtfDecoder.d.ts +8 -0
- package/dist/text/fonts/decoders/Woff2Decoder.d.ts +45 -0
- package/dist/text/fonts/layout/SimpleTextLayouter.d.ts +7 -0
- package/dist/text/fonts/preciseFontMetrics.d.ts +16 -0
- package/dist/text/fonts/preciseFontMode.d.ts +7 -0
- package/dist/text/fonts/sfnt/SfntFontProgram.d.ts +29 -0
- package/dist/text/fonts/vendor/woff2/buffer.d.ts +24 -0
- package/dist/text/fonts/vendor/woff2/glyf-reconstructor.d.ts +55 -0
- package/dist/text/fonts/vendor/woff2/hmtx-reconstructor.d.ts +5 -0
- package/dist/text/fonts/vendor/woff2/sfnt-builder.d.ts +7 -0
- package/dist/text/fonts/vendor/woff2/utils.d.ts +12 -0
- package/dist/text/truetype/AdvanceWidthSource.d.ts +19 -0
- package/dist/text/truetype/BinaryReader.d.ts +28 -0
- package/dist/text/truetype/CmapParser.d.ts +15 -0
- package/dist/text/truetype/SfntTableDirectory.d.ts +26 -0
- package/dist/text/truetype/TrueTypeFont.d.ts +36 -0
- package/dist/text/truetype/TrueTypeParseError.d.ts +11 -0
- package/dist/text/truetype/tableParsers.d.ts +45 -0
- package/dist/ui/OasisEditorApp.d.ts +1 -1
- package/dist/ui/OasisEditorAppLazy.d.ts +16 -0
- package/dist/ui/OasisEditorAppProps.d.ts +10 -2
- package/dist/ui/OasisEditorEditor.d.ts +17 -8
- package/dist/ui/OasisEditorLoading.d.ts +25 -0
- package/dist/ui/app/EditorDialogsLayer.d.ts +4 -0
- package/dist/ui/app/EditorWorkspace.d.ts +6 -0
- package/dist/ui/app/buildEditorViewProps.d.ts +7 -3
- package/dist/ui/app/createRuntimeCommandHost.d.ts +2 -1
- package/dist/ui/app/localFontAccess.d.ts +33 -0
- package/dist/ui/app/useCanvasSurfaceHitResolver.d.ts +2 -2
- package/dist/ui/app/useEditorContextMenuClipboard.d.ts +18 -0
- package/dist/ui/app/useEditorDialogs.d.ts +18 -0
- package/dist/ui/app/useEditorRuntimeBootstrap.d.ts +3 -0
- package/dist/ui/app/useEditorRuntimePlugins.d.ts +3 -0
- package/dist/ui/app/useEditorUiOptions.d.ts +1 -1
- package/dist/ui/app/useParagraphDialogBridge.d.ts +29 -0
- package/dist/ui/app/useTablePropertiesDialogBridge.d.ts +30 -0
- package/dist/ui/canvas/CanvasHitTestService.d.ts +17 -0
- package/dist/ui/canvas/CanvasLayoutSnapshot.d.ts +57 -1
- package/dist/ui/canvas/CanvasSelectionGeometry.d.ts +16 -0
- package/dist/ui/canvas/CanvasTableLayout.d.ts +3 -1
- package/dist/ui/canvas/canvasBlockPainter.d.ts +2 -2
- package/dist/ui/canvas/canvasBorders.d.ts +17 -0
- package/dist/ui/canvas/canvasDropCapPainter.d.ts +16 -0
- package/dist/ui/canvas/canvasParagraphPainter.d.ts +24 -2
- package/dist/ui/canvas/canvasTextBoxPainter.d.ts +24 -0
- package/dist/ui/canvas/imageContour.d.ts +10 -0
- package/dist/ui/canvas/textBoxRenderHeight.d.ts +14 -0
- package/dist/ui/canvas/verticalText.d.ts +104 -0
- package/dist/ui/components/Dialogs/FontDialog.d.ts +2 -65
- package/dist/ui/components/Dialogs/FontDialogModel.d.ts +5 -0
- package/dist/ui/components/Dialogs/ParagraphDialog.d.ts +49 -0
- package/dist/ui/components/Dialogs/TablePropertiesDialog.d.ts +80 -0
- package/dist/ui/components/Dialogs/font-dialog/AdvancedFontTab.d.ts +6 -0
- package/dist/ui/components/Dialogs/font-dialog/FontDialogController.d.ts +21 -0
- package/dist/ui/components/Dialogs/font-dialog/FontDialogTypes.d.ts +112 -0
- package/dist/ui/components/Dialogs/font-dialog/FontPreview.d.ts +6 -0
- package/dist/ui/components/Dialogs/font-dialog/FontTab.d.ts +6 -0
- package/dist/ui/components/Dialogs/font-dialog/useFontDialogController.d.ts +4 -0
- package/dist/ui/components/FloatingToolbar/FloatingLayoutOptions.d.ts +17 -0
- package/dist/ui/components/Menubar/Menubar.d.ts +2 -1
- package/dist/ui/components/Menubar/builtinMenuIds.d.ts +36 -0
- package/dist/ui/components/OasisBrandMark.d.ts +7 -0
- package/dist/ui/components/PluginUi/PluginUiHost.d.ts +8 -0
- package/dist/ui/components/Ruler/HorizontalRuler.d.ts +11 -0
- package/dist/ui/components/Ruler/rulerGeometry.d.ts +63 -0
- package/dist/ui/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/ui/components/Toolbar/presets/builtinToolbarIds.d.ts +40 -0
- package/dist/ui/components/Toolbar/primitives/ColorPicker.d.ts +1 -1
- package/dist/ui/components/Toolbar/primitives/Separator.d.ts +4 -3
- package/dist/ui/components/Toolbar/registry/ToolbarRegistry.d.ts +7 -2
- package/dist/ui/components/Toolbar/schema/items.d.ts +1 -1
- package/dist/ui/components/WelcomeOverlay.d.ts +13 -0
- package/dist/ui/editorLayoutConstants.d.ts +12 -0
- package/dist/ui/editorUiTypes.d.ts +35 -4
- package/dist/ui/fontSizeUnits.d.ts +15 -0
- package/dist/ui/mount.d.ts +2 -1
- package/dist/ui/overlays/ResizeHandlesOverlay.d.ts +34 -0
- package/dist/ui/public/Button.d.ts +10 -0
- package/dist/ui/public/Checkbox.d.ts +9 -0
- package/dist/ui/public/DialogFooter.d.ts +6 -0
- package/dist/ui/public/FloatingActionButton.d.ts +8 -0
- package/dist/ui/public/IconButton.d.ts +10 -0
- package/dist/ui/public/SelectField.d.ts +15 -0
- package/dist/ui/public/SidePanel.d.ts +12 -0
- package/dist/ui/public/TextField.d.ts +9 -0
- package/dist/ui/public/index.d.ts +36 -0
- package/dist/ui/resizeGeometry.d.ts +28 -0
- package/dist/ui/shells/DocumentShell.d.ts +6 -0
- package/dist/ui/textMeasurement/alignment.d.ts +3 -0
- package/dist/ui/textMeasurement/characterWidth.d.ts +9 -0
- package/dist/ui/textMeasurement/composer.d.ts +5 -0
- package/dist/ui/textMeasurement/constants.d.ts +4 -0
- package/dist/ui/textMeasurement/fontMetrics.d.ts +12 -0
- package/dist/ui/textMeasurement/indentation.d.ts +12 -0
- package/dist/ui/textMeasurement/layoutLine.d.ts +4 -0
- package/dist/ui/textMeasurement/paragraphLineHeight.d.ts +22 -0
- package/dist/ui/textMeasurement/tabStops.d.ts +4 -0
- package/dist/ui/textMeasurement/tokenizer.d.ts +6 -0
- package/dist/ui/textMeasurement/types.d.ts +27 -0
- package/dist/ui/textMeasurement.d.ts +5 -11
- package/dist/ui/toolbarStyleState.d.ts +15 -2
- package/dist/ui/utils/customIcons.d.ts +20 -0
- package/dist/ui.d.ts +42 -0
- package/dist/ui.js +19 -0
- package/dist/utils/imageFormats.d.ts +14 -0
- package/dist/utils/throttle.d.ts +1 -1
- package/dist/vue.d.ts +9 -0
- package/dist/vue.js +33 -0
- package/package.json +90 -62
- package/dist/__tests__/app/PersistenceService.test.d.ts +0 -1
- package/dist/__tests__/app/footnoteUiCommands.test.d.ts +0 -1
- package/dist/__tests__/commands/text.test.d.ts +0 -1
- package/dist/__tests__/core/editorPluginIntegration.test.d.ts +0 -1
- package/dist/__tests__/core/editorState.test.d.ts +0 -1
- package/dist/__tests__/core/footnotes.test.d.ts +0 -1
- package/dist/__tests__/core/model.test.d.ts +0 -1
- package/dist/__tests__/core/pluginCollection.test.d.ts +0 -1
- package/dist/__tests__/core/tableCommands.test.d.ts +0 -1
- package/dist/__tests__/export/docxExport.test.d.ts +0 -1
- package/dist/__tests__/export/footnotesExport.test.d.ts +0 -1
- package/dist/__tests__/export/pdfWriter.test.d.ts +0 -1
- package/dist/__tests__/export/underlineStyle.test.d.ts +0 -1
- package/dist/__tests__/import/docxComplexSmoke.test.d.ts +0 -1
- package/dist/__tests__/import/docxImport.test.d.ts +0 -1
- package/dist/__tests__/import/footnotesImport.test.d.ts +0 -1
- package/dist/__tests__/integration/documentFlow.test.d.ts +0 -1
- package/dist/__tests__/ui/CanvasTableLayout.test.d.ts +0 -1
- package/dist/__tests__/ui/canvasHitTestService.test.d.ts +0 -1
- package/dist/__tests__/ui/canvasLayoutSnapshot.test.d.ts +0 -1
- package/dist/__tests__/ui/canvasSelectionGeometry.test.d.ts +0 -1
- package/dist/__tests__/ui/canvasTextRendering.test.d.ts +0 -1
- package/dist/__tests__/ui/composeMeasuredParagraphLines.test.d.ts +0 -1
- package/dist/__tests__/ui/dialog.test.d.ts +0 -1
- package/dist/__tests__/ui/fontDialog.test.d.ts +0 -1
- package/dist/__tests__/ui/footnotesLayout.test.d.ts +0 -1
- package/dist/__tests__/ui/layoutIdentity.test.d.ts +0 -1
- package/dist/__tests__/ui/layoutProjection.test.d.ts +0 -1
- package/dist/__tests__/ui/registry.test.d.ts +0 -1
- package/dist/__tests__/ui/tabs.test.d.ts +0 -1
- package/dist/__tests__/ui/textMeasurementAlignment.test.d.ts +0 -1
- package/dist/__tests__/word-parity/fixtures/corpus.d.ts +0 -10
- package/dist/__tests__/word-parity/fixtures/loremFixtures.d.ts +0 -8
- package/dist/__tests__/word-parity/wordLayout.word-parity.d.ts +0 -1
- package/dist/assets/Arimo-Bold.ttf +0 -0
- package/dist/assets/Arimo-BoldItalic.ttf +0 -0
- package/dist/assets/Arimo-Italic.ttf +0 -0
- package/dist/assets/Arimo-Regular.ttf +0 -0
- package/dist/assets/Carlito-Bold.ttf +0 -0
- package/dist/assets/Carlito-BoldItalic.ttf +0 -0
- package/dist/assets/Carlito-Italic.ttf +0 -0
- package/dist/assets/Carlito-Regular.ttf +0 -0
- package/dist/assets/Roboto-Italic.ttf +0 -0
- package/dist/assets/Roboto-Medium.ttf +0 -0
- package/dist/assets/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/Roboto-Regular.ttf +0 -0
- package/dist/assets/Tinos-Bold.ttf +0 -0
- package/dist/assets/Tinos-BoldItalic.ttf +0 -0
- package/dist/assets/Tinos-Italic.ttf +0 -0
- package/dist/assets/Tinos-Regular.ttf +0 -0
- package/dist/assets/importDocxWorker-DIQ28Lka.js +0 -12
- package/dist/core/commands/utils.d.ts +0 -69
- package/dist/demo/OasisSiteApp.d.ts +0 -1
- package/dist/main.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { OasisEditorAppProps } from '../OasisEditorAppProps.js';
|
|
2
2
|
|
|
3
|
-
export type { OasisEditorLoadingOptions, OasisEditorAppUiProps, OasisEditorAppDocumentProps, OasisEditorAppRuntimeProps, OasisEditorAppProps, } from '../OasisEditorAppProps.js';
|
|
3
|
+
export type { OasisEditorLoadingOptions, OasisEditorAppUiProps, OasisEditorAppDocumentProps, OasisEditorAppRuntimeProps, OasisEditorAppProps, ToolbarLayoutMode, } from '../OasisEditorAppProps.js';
|
|
4
4
|
export declare function OasisEditorApp(props?: OasisEditorAppProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OasisEditorAppProps } from '../OasisEditorAppProps.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Code-splitting boundary for the editor. Loads `OasisEditorApp` (and the
|
|
5
|
+
* ~10MB of bundled fonts it drags in) via a single dynamic `import()`, keeping
|
|
6
|
+
* that weight in a lazy chunk. While the chunk downloads, renders an
|
|
7
|
+
* `OasisEditorLoading` card with a simulated-progress bar: the bar animates
|
|
8
|
+
* exponentially toward 90% (fast at first, then slowing), then snaps to 100%
|
|
9
|
+
* when the import resolves. Real byte-level progress isn't available for
|
|
10
|
+
* dynamic ES module imports without knowing the hashed chunk URL ahead of time,
|
|
11
|
+
* so this approach gives the best honest UX — it looks and feels like progress
|
|
12
|
+
* without lying about bytes received.
|
|
13
|
+
*
|
|
14
|
+
* Must not statically import anything that pulls the editor/font graph.
|
|
15
|
+
*/
|
|
16
|
+
export declare function OasisEditorAppLazy(props?: OasisEditorAppProps): import("solid-js").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { JSX } from '../solid-js';
|
|
2
2
|
import { EditorDocument, EditorState } from '../../core/model.js';
|
|
3
3
|
import { ToolbarRegistry } from '../components/Toolbar/registry/ToolbarRegistry.js';
|
|
4
|
+
import { MenuRegistry } from '../components/Menubar/menuRegistry.js';
|
|
4
5
|
import { DocumentPersistence } from '../../app/controllers/useEditorPersistence.js';
|
|
5
6
|
import { OasisPlugin } from '../../core/plugin.js';
|
|
7
|
+
import { OasisEditorClient, OasisEditorClientController } from '../../app/client/OasisEditorClient.js';
|
|
6
8
|
|
|
9
|
+
export type ToolbarLayoutMode = "overflow" | "wrap";
|
|
7
10
|
export interface OasisEditorLoadingOptions {
|
|
8
11
|
label?: string;
|
|
9
12
|
class?: string;
|
|
@@ -13,6 +16,9 @@ export interface OasisEditorAppUiProps {
|
|
|
13
16
|
showChrome?: boolean;
|
|
14
17
|
shell?: "document" | "inline" | "balloon";
|
|
15
18
|
uiVariant?: "classic" | "docs";
|
|
19
|
+
toolbar?: {
|
|
20
|
+
layout?: ToolbarLayoutMode;
|
|
21
|
+
};
|
|
16
22
|
showTitleBar?: boolean;
|
|
17
23
|
showMenubar?: boolean;
|
|
18
24
|
showToolbar?: boolean;
|
|
@@ -30,17 +36,19 @@ export interface OasisEditorAppDocumentProps {
|
|
|
30
36
|
readOnly?: boolean;
|
|
31
37
|
persistenceEnabled?: boolean;
|
|
32
38
|
persistence?: DocumentPersistence;
|
|
33
|
-
layoutMode?: "fast" | "wordParity";
|
|
34
39
|
}
|
|
35
40
|
export interface OasisEditorAppRuntimeProps {
|
|
36
|
-
onReady?: () => void;
|
|
41
|
+
onReady?: (client: OasisEditorClient) => void;
|
|
37
42
|
plugins?: OasisPlugin[];
|
|
43
|
+
/** @internal Used by createOasisEditor()/mount() to bind the public client. */
|
|
44
|
+
client?: OasisEditorClientController;
|
|
38
45
|
/**
|
|
39
46
|
* Customize the toolbar after the built-in preset and plugin contributions
|
|
40
47
|
* load. Use the registry to add/insert/replace/remove/move items. Clients can
|
|
41
48
|
* tailor the toolbar without forking.
|
|
42
49
|
*/
|
|
43
50
|
customizeToolbar?: (registry: ToolbarRegistry) => void;
|
|
51
|
+
customizeMenubar?: (registry: MenuRegistry) => void;
|
|
44
52
|
}
|
|
45
53
|
export interface OasisEditorAppProps {
|
|
46
54
|
ui?: OasisEditorAppUiProps;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { Accessor, JSX } from '../solid-js';
|
|
2
2
|
import { ToolbarHost } from '../components/Toolbar/state/createToolbarApi.js';
|
|
3
3
|
import { EditorLayoutParagraph, EditorState } from '../../core/model.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ImportProgressState } from '../../app/controllers/useEditorDocumentIO.js';
|
|
5
|
+
import { CaretBox, InputBox, LayoutOptionsOverlay, RevisionBox, SelectedImageBox, SelectedTextBoxBox, SelectionBox } from '../editorUiTypes.js';
|
|
6
|
+
import { ResizeHandleDirection } from '../resizeGeometry.js';
|
|
5
7
|
|
|
6
|
-
type ImportProgress =
|
|
7
|
-
phase: "reading-file" | "opening-docx" | "parsing-document" | "parsing-headers-footers" | "applying-editor-state" | "stabilizing-layout" | "done" | "error";
|
|
8
|
-
progress: number;
|
|
9
|
-
subProgress?: number;
|
|
10
|
-
};
|
|
8
|
+
type ImportProgress = ImportProgressState;
|
|
11
9
|
export interface OasisEditorEditorLayoutProps {
|
|
12
10
|
measuredBlockHeights?: Accessor<Record<string, number>>;
|
|
13
11
|
measuredParagraphLayouts?: Accessor<Record<string, EditorLayoutParagraph>>;
|
|
14
|
-
layoutMode?: "fast" | "wordParity";
|
|
15
12
|
viewportHeight?: number | string;
|
|
16
13
|
class?: string;
|
|
17
14
|
style?: JSX.CSSProperties;
|
|
18
15
|
readOnly?: boolean;
|
|
16
|
+
showHorizontalRuler?: boolean;
|
|
19
17
|
}
|
|
20
18
|
export interface OasisEditorEditorOverlayProps {
|
|
21
19
|
selectionBoxes: Accessor<SelectionBox[]>;
|
|
22
20
|
selectedImageBox: Accessor<SelectedImageBox | null>;
|
|
21
|
+
selectedTextBoxBox: Accessor<SelectedTextBoxBox | null>;
|
|
23
22
|
caretBox: Accessor<CaretBox>;
|
|
24
23
|
inputBox: Accessor<InputBox>;
|
|
25
24
|
hoveredRevision: Accessor<RevisionBox | null>;
|
|
@@ -29,6 +28,7 @@ export interface OasisEditorEditorOverlayProps {
|
|
|
29
28
|
toolbarHost?: () => ToolbarHost;
|
|
30
29
|
persistenceStatus?: () => string;
|
|
31
30
|
showFloatingTableToolbar?: Accessor<boolean>;
|
|
31
|
+
layoutOptions?: LayoutOptionsOverlay;
|
|
32
32
|
}
|
|
33
33
|
export interface OasisEditorEditorRefProps {
|
|
34
34
|
onViewportRef?: (element: HTMLDivElement) => void;
|
|
@@ -51,7 +51,16 @@ export interface OasisEditorEditorSurfaceHandlers {
|
|
|
51
51
|
onImageMouseDown: (paragraphId: string, paragraphOffset: number, event: MouseEvent & {
|
|
52
52
|
currentTarget: HTMLElement;
|
|
53
53
|
}) => void;
|
|
54
|
-
onImageResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction:
|
|
54
|
+
onImageResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction: ResizeHandleDirection, event: MouseEvent & {
|
|
55
|
+
currentTarget: HTMLElement;
|
|
56
|
+
}) => void;
|
|
57
|
+
onTextBoxResizeHandleMouseDown: (paragraphId: string, paragraphOffset: number, direction: ResizeHandleDirection, event: MouseEvent & {
|
|
58
|
+
currentTarget: HTMLElement;
|
|
59
|
+
}) => void;
|
|
60
|
+
onImageRotateHandleMouseDown: (paragraphId: string, paragraphOffset: number, event: MouseEvent & {
|
|
61
|
+
currentTarget: HTMLElement;
|
|
62
|
+
}) => void;
|
|
63
|
+
onTextBoxRotateHandleMouseDown: (paragraphId: string, paragraphOffset: number, event: MouseEvent & {
|
|
55
64
|
currentTarget: HTMLElement;
|
|
56
65
|
}) => void;
|
|
57
66
|
onTableDragHandleMouseDown: (tableId: string, event: MouseEvent) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSX } from '../solid-js';
|
|
2
|
+
|
|
3
|
+
export interface OasisEditorLoadingProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
style?: JSX.CSSProperties | string;
|
|
7
|
+
/**
|
|
8
|
+
* `overlay` (default): absolutely fills the already-mounted editor shell.
|
|
9
|
+
* `fill`: occupies its container in normal flow — used as the download-phase
|
|
10
|
+
* fallback when no positioned editor shell exists yet.
|
|
11
|
+
*/
|
|
12
|
+
variant?: "overlay" | "fill";
|
|
13
|
+
/**
|
|
14
|
+
* 0–1 for a real/simulated percentage bar; undefined/null for indeterminate.
|
|
15
|
+
*/
|
|
16
|
+
progress?: number | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Oasis-owned loading state. Lightweight (solid-js plus the inline ~6 KB WebP
|
|
20
|
+
* brand mark) so it lives in the main chunk and paints from the first JS tick
|
|
21
|
+
* without pulling the editor/font graph. Reuses the docx-import card styles for
|
|
22
|
+
* visual consistency. When `progress` is provided, renders a deterministic fill
|
|
23
|
+
* bar; otherwise animates indeterminate.
|
|
24
|
+
*/
|
|
25
|
+
export declare function OasisEditorLoading(props: OasisEditorLoadingProps): JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from '../../solid-js';
|
|
2
2
|
import { FontDialog } from '../../../components/Dialogs/FontDialog.js';
|
|
3
|
+
import { ParagraphDialog } from '../../../components/Dialogs/ParagraphDialog.js';
|
|
4
|
+
import { TablePropertiesDialog } from '../../../components/Dialogs/TablePropertiesDialog.js';
|
|
3
5
|
import { FindReplaceDialog } from '../../../components/FindReplace/FindReplaceDialog.js';
|
|
4
6
|
import { ContextMenu } from '../../../components/ContextMenu/ContextMenu.js';
|
|
5
7
|
import { createEditorDialogs } from '../../useEditorDialogs.js';
|
|
@@ -15,6 +17,8 @@ export interface EditorDialogsLayerProps {
|
|
|
15
17
|
applyLinkCommand: (href: string | null) => void;
|
|
16
18
|
applyImageAltCommand: (alt: string) => void;
|
|
17
19
|
applyFontDialogValues: ComponentProps<typeof FontDialog>["onApply"];
|
|
20
|
+
applyParagraphDialogValues: ComponentProps<typeof ParagraphDialog>["onApply"];
|
|
21
|
+
applyTablePropertiesDialogValues: ComponentProps<typeof TablePropertiesDialog>["onApply"];
|
|
18
22
|
closeContextMenu: () => void;
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
@@ -3,20 +3,26 @@ import { OasisEditorEditor, OasisEditorEditorFileHandlers, OasisEditorEditorInpu
|
|
|
3
3
|
import { ShellProps } from '../../../shells/DocumentShell.js';
|
|
4
4
|
import { ToolbarHost } from '../../../components/Toolbar/state/createToolbarApi.js';
|
|
5
5
|
import { ToolbarRegistry } from '../../../components/Toolbar/registry/ToolbarRegistry.js';
|
|
6
|
+
import { MenuRegistry } from '../../../components/Menubar/menuRegistry.js';
|
|
6
7
|
import { EditorLayoutParagraph, EditorState } from '../../../../core/model.js';
|
|
8
|
+
import { ToolbarLayoutMode } from '../../../OasisEditorAppProps.js';
|
|
9
|
+
import { OasisEditor } from '../../../../core/plugin.js';
|
|
7
10
|
|
|
8
11
|
export interface EditorWorkspaceProps {
|
|
9
12
|
useComposedShell: () => boolean;
|
|
10
13
|
shellComponent: () => (props: ShellProps) => ReturnType<typeof OasisEditorEditor>;
|
|
11
14
|
state: Accessor<EditorState>;
|
|
12
15
|
toolbarHost: () => ToolbarHost;
|
|
16
|
+
runtimeEditor: Accessor<OasisEditor>;
|
|
13
17
|
persistenceStatus: () => string;
|
|
14
18
|
toolbarRegistry: ToolbarRegistry;
|
|
19
|
+
menuRegistry: MenuRegistry;
|
|
15
20
|
showChrome: () => boolean;
|
|
16
21
|
showTitleBar: () => boolean;
|
|
17
22
|
showMenubar: () => boolean;
|
|
18
23
|
showToolbar: () => boolean;
|
|
19
24
|
showOutline: () => boolean;
|
|
25
|
+
toolbarLayout: () => ToolbarLayoutMode;
|
|
20
26
|
isReadOnly: () => boolean;
|
|
21
27
|
viewportHeight: () => number | string | undefined;
|
|
22
28
|
measuredBlockHeights: Accessor<Record<string, number>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Accessor, JSX } from '../../solid-js';
|
|
2
|
-
import { CaretBox, InputBox, RevisionBox, SelectedImageBox, SelectionBox } from '../../../editorUiTypes.js';
|
|
2
|
+
import { CaretBox, InputBox, LayoutOptionsOverlay, RevisionBox, SelectedImageBox, SelectedTextBoxBox, SelectionBox } from '../../../editorUiTypes.js';
|
|
3
3
|
import { OasisEditorEditorFileHandlers, OasisEditorEditorInputHandlers, OasisEditorEditorLayoutProps, OasisEditorEditorOverlayProps, OasisEditorEditorRefProps, OasisEditorEditorSurfaceHandlers } from '../../../OasisEditorEditor.js';
|
|
4
4
|
import { createEditorFocusController } from '../../useEditorFocus.js';
|
|
5
5
|
import { createEditorSurfaceEvents } from '../../../../app/controllers/useEditorSurfaceEvents.js';
|
|
@@ -16,12 +16,13 @@ type ImportProgress = NonNullable<ReturnType<NonNullable<OasisEditorEditorOverla
|
|
|
16
16
|
* by `OasisEditorEditor` and the composed shells.
|
|
17
17
|
*/
|
|
18
18
|
export interface EditorViewPropsContext {
|
|
19
|
-
layoutMode: NonNullable<OasisEditorEditorLayoutProps["layoutMode"]>;
|
|
20
19
|
viewportHeight: number | string | undefined;
|
|
21
20
|
className: string | undefined;
|
|
22
21
|
style: JSX.CSSProperties | undefined;
|
|
23
22
|
selectionBoxes: Accessor<SelectionBox[]>;
|
|
24
23
|
selectedImageBox: Accessor<SelectedImageBox | null>;
|
|
24
|
+
selectedTextBoxBox: Accessor<SelectedTextBoxBox | null>;
|
|
25
|
+
layoutOptions: LayoutOptionsOverlay;
|
|
25
26
|
caretBox: Accessor<CaretBox>;
|
|
26
27
|
inputBox: Accessor<InputBox>;
|
|
27
28
|
hoveredRevision: Accessor<RevisionBox | null>;
|
|
@@ -29,7 +30,7 @@ export interface EditorViewPropsContext {
|
|
|
29
30
|
showCaret: Accessor<boolean>;
|
|
30
31
|
importProgress: Accessor<ImportProgress | null>;
|
|
31
32
|
focusController: ReturnType<typeof createEditorFocusController>;
|
|
32
|
-
|
|
33
|
+
handleImportFile: (file: File | null) => void;
|
|
33
34
|
handleInsertImage: (file: File | null) => void;
|
|
34
35
|
surfaceEvents: ReturnType<typeof createEditorSurfaceEvents>;
|
|
35
36
|
tableResize: ReturnType<typeof createEditorTableResize>;
|
|
@@ -39,6 +40,9 @@ export interface EditorViewPropsContext {
|
|
|
39
40
|
onEditorMouseDown: OasisEditorEditorSurfaceHandlers["onEditorMouseDown"];
|
|
40
41
|
handleImageMouseDown: OasisEditorEditorSurfaceHandlers["onImageMouseDown"];
|
|
41
42
|
handleImageResizeHandleMouseDown: OasisEditorEditorSurfaceHandlers["onImageResizeHandleMouseDown"];
|
|
43
|
+
handleTextBoxResizeHandleMouseDown: OasisEditorEditorSurfaceHandlers["onTextBoxResizeHandleMouseDown"];
|
|
44
|
+
handleImageRotateHandleMouseDown: OasisEditorEditorSurfaceHandlers["onImageRotateHandleMouseDown"];
|
|
45
|
+
handleTextBoxRotateHandleMouseDown: OasisEditorEditorSurfaceHandlers["onTextBoxRotateHandleMouseDown"];
|
|
42
46
|
handleEditorContextMenu: (event: MouseEvent) => void;
|
|
43
47
|
textInput: ReturnType<typeof createEditorTextInput>;
|
|
44
48
|
setFocused: (value: boolean) => void;
|
|
@@ -11,8 +11,9 @@ interface CreateRuntimeCommandHostOptions {
|
|
|
11
11
|
runtimePlugins: OasisPlugin[];
|
|
12
12
|
focusEditor: () => void;
|
|
13
13
|
logger: EditorLogger;
|
|
14
|
-
onReady?: () => void;
|
|
14
|
+
onReady?: (editor: Editor) => void;
|
|
15
15
|
onSettled?: () => void;
|
|
16
|
+
onError?: (error: unknown) => void;
|
|
16
17
|
}
|
|
17
18
|
export declare function createRuntimeCommandHost(options: CreateRuntimeCommandHostOptions): {
|
|
18
19
|
runtimeReady: Accessor<boolean>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare function isLocalFontAccessSupported(): boolean;
|
|
2
|
+
/**
|
|
3
|
+
* Queries the installed font families (deduped, sorted). The first call may
|
|
4
|
+
* trigger the browser permission prompt; results are cached and pushed into the
|
|
5
|
+
* precise-font-mode availability set. Returns `[]` when unsupported or denied.
|
|
6
|
+
*/
|
|
7
|
+
export declare function probeLocalFontFamilies(): Promise<string[]>;
|
|
8
|
+
/**
|
|
9
|
+
* Loads the real, locally-installed font programs for the given document
|
|
10
|
+
* families and registers them for precise-mode measurement. No-op unless precise
|
|
11
|
+
* mode is enabled and the Local Font Access API is available (and previously
|
|
12
|
+
* granted). Returns whether any new face was registered, so the caller can clear
|
|
13
|
+
* layout caches and re-project only when something actually changed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function loadPreciseFontProgramsForFamilies(families: Iterable<string | null | undefined>): Promise<boolean>;
|
|
16
|
+
/** Whether the browser already granted local-fonts permission (never prompts). */
|
|
17
|
+
export declare function isLocalFontPermissionGranted(): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Enable precise font mode in response to an explicit user gesture (welcome
|
|
20
|
+
* dialog / menu). Probes installed fonts — prompting for permission if needed —
|
|
21
|
+
* and only enables when at least one family is readable. Persists the result.
|
|
22
|
+
* Returns whether precise mode is now active.
|
|
23
|
+
*/
|
|
24
|
+
export declare function enablePreciseFontMode(): Promise<boolean>;
|
|
25
|
+
/** Disable precise font mode and persist the preference. */
|
|
26
|
+
export declare function disablePreciseFontMode(): void;
|
|
27
|
+
/** Toggle precise font mode; enabling prompts/probes, disabling is immediate. */
|
|
28
|
+
export declare function togglePreciseFontMode(): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Re-apply a previously stored "on" preference on startup without ever showing
|
|
31
|
+
* a permission prompt: only proceeds when the browser already granted access.
|
|
32
|
+
*/
|
|
33
|
+
export declare function applyStoredPreciseFontPreference(): Promise<void>;
|
|
@@ -8,9 +8,9 @@ export declare function createCanvasSurfaceHitResolver(deps: {
|
|
|
8
8
|
viewportRef: Accessor<HTMLElement | null>;
|
|
9
9
|
measuredBlockHeights: Accessor<Record<string, number>>;
|
|
10
10
|
measuredParagraphLayouts: Accessor<Record<string, EditorLayoutParagraph>>;
|
|
11
|
-
layoutMode: Accessor<"fast" | "wordParity">;
|
|
12
11
|
}): {
|
|
13
|
-
resolveSurfaceHitAtPoint: (clientX: number, clientY: number,
|
|
12
|
+
resolveSurfaceHitAtPoint: (clientX: number, clientY: number, context?: {
|
|
14
13
|
forDrag?: boolean;
|
|
14
|
+
pierce?: boolean;
|
|
15
15
|
}) => SurfaceHit | null;
|
|
16
16
|
};
|
|
@@ -21,6 +21,24 @@ export interface EditorContextMenuClipboardDeps {
|
|
|
21
21
|
focusInput: () => void;
|
|
22
22
|
promptForLink: () => void;
|
|
23
23
|
openFontDialog: () => void;
|
|
24
|
+
openParagraphDialog: () => void;
|
|
25
|
+
table?: {
|
|
26
|
+
isInsideTable: () => boolean;
|
|
27
|
+
canMerge: () => boolean;
|
|
28
|
+
canSplit: () => boolean;
|
|
29
|
+
canEditColumn: () => boolean;
|
|
30
|
+
canEditRow: () => boolean;
|
|
31
|
+
openProperties: () => void;
|
|
32
|
+
openBordersAndShading: () => void;
|
|
33
|
+
merge: () => void;
|
|
34
|
+
split: () => void;
|
|
35
|
+
insertColumnBefore: () => void;
|
|
36
|
+
insertColumnAfter: () => void;
|
|
37
|
+
deleteColumn: () => void;
|
|
38
|
+
insertRowBefore: () => void;
|
|
39
|
+
insertRowAfter: () => void;
|
|
40
|
+
deleteRow: () => void;
|
|
41
|
+
};
|
|
24
42
|
}
|
|
25
43
|
export declare function createEditorContextMenuClipboard(deps: EditorContextMenuClipboardDeps): {
|
|
26
44
|
buildContextMenuItems: () => ContextMenuItem[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FontDialogInitialValues } from '../../../components/Dialogs/FontDialog.js';
|
|
2
|
+
import { ParagraphDialogInitialValues } from '../../../components/Dialogs/ParagraphDialog.js';
|
|
3
|
+
import { TablePropertiesDialogInitialValues } from '../../../components/Dialogs/TablePropertiesDialog.js';
|
|
2
4
|
|
|
3
5
|
export declare function createEditorDialogs(): {
|
|
4
6
|
linkDialog: import('../../solid-js').Accessor<{
|
|
@@ -35,4 +37,20 @@ export declare function createEditorDialogs(): {
|
|
|
35
37
|
isOpen: boolean;
|
|
36
38
|
initial: FontDialogInitialValues;
|
|
37
39
|
}>;
|
|
40
|
+
paragraphDialog: import('../../solid-js').Accessor<{
|
|
41
|
+
isOpen: boolean;
|
|
42
|
+
initial: ParagraphDialogInitialValues;
|
|
43
|
+
}>;
|
|
44
|
+
setParagraphDialog: import('../../solid-js').Setter<{
|
|
45
|
+
isOpen: boolean;
|
|
46
|
+
initial: ParagraphDialogInitialValues;
|
|
47
|
+
}>;
|
|
48
|
+
tablePropertiesDialog: import('../../solid-js').Accessor<{
|
|
49
|
+
isOpen: boolean;
|
|
50
|
+
initial: TablePropertiesDialogInitialValues;
|
|
51
|
+
}>;
|
|
52
|
+
setTablePropertiesDialog: import('../../solid-js').Setter<{
|
|
53
|
+
isOpen: boolean;
|
|
54
|
+
initial: TablePropertiesDialogInitialValues;
|
|
55
|
+
}>;
|
|
38
56
|
};
|
|
@@ -16,14 +16,17 @@ export interface EditorRuntimeBootstrapContext {
|
|
|
16
16
|
essentials: EssentialsPluginDeps;
|
|
17
17
|
externalPlugins: RuntimePluginsConfig["externalPlugins"];
|
|
18
18
|
customizeToolbar: RuntimePluginsConfig["customizeToolbar"];
|
|
19
|
+
customizeMenubar: RuntimePluginsConfig["customizeMenubar"];
|
|
19
20
|
initialDocument: RuntimeCommandHostConfig["initialDocument"];
|
|
20
21
|
focusEditor: RuntimeCommandHostConfig["focusEditor"];
|
|
21
22
|
logger: RuntimeCommandHostConfig["logger"];
|
|
22
23
|
onReady: RuntimeCommandHostConfig["onReady"];
|
|
23
24
|
onSettled: RuntimeCommandHostConfig["onSettled"];
|
|
25
|
+
onError?: RuntimeCommandHostConfig["onError"];
|
|
24
26
|
}
|
|
25
27
|
export interface EditorRuntimeBootstrap {
|
|
26
28
|
toolbarRegistry: ReturnType<typeof useEditorRuntimePlugins>["toolbarRegistry"];
|
|
29
|
+
menuRegistry: ReturnType<typeof useEditorRuntimePlugins>["menuRegistry"];
|
|
27
30
|
runtimeReady: RuntimeCommandHost["runtimeReady"];
|
|
28
31
|
runtimeEditor: RuntimeCommandHost["runtimeEditor"];
|
|
29
32
|
commandStateOf: RuntimeCommandHost["commandStateOf"];
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { OasisPlugin } from '../../../../core/plugin.js';
|
|
2
|
+
import { MenuRegistry } from '../../../components/Menubar/menuRegistry.js';
|
|
2
3
|
import { ToolbarRegistry } from '../../../components/Toolbar/registry/ToolbarRegistry.js';
|
|
3
4
|
|
|
4
5
|
export interface EditorRuntimePluginsOptions {
|
|
5
6
|
essentialsPlugin: OasisPlugin;
|
|
6
7
|
externalPlugins?: OasisPlugin[];
|
|
7
8
|
customizeToolbar?: (registry: ToolbarRegistry) => void;
|
|
9
|
+
customizeMenubar?: (registry: MenuRegistry) => void;
|
|
8
10
|
}
|
|
9
11
|
export interface EditorRuntimePlugins {
|
|
10
12
|
runtimePlugins: OasisPlugin[];
|
|
11
13
|
toolbarRegistry: ToolbarRegistry;
|
|
14
|
+
menuRegistry: MenuRegistry;
|
|
12
15
|
dispose: () => void;
|
|
13
16
|
}
|
|
14
17
|
export declare function useEditorRuntimePlugins(options: EditorRuntimePluginsOptions): EditorRuntimePlugins;
|
|
@@ -15,7 +15,7 @@ export declare function createEditorUiOptions(ctx: EditorUiOptionsContext): {
|
|
|
15
15
|
showMenubar: () => boolean;
|
|
16
16
|
showToolbar: () => boolean;
|
|
17
17
|
showOutline: () => boolean;
|
|
18
|
-
|
|
18
|
+
toolbarLayout: () => import('../../../OasisEditorAppProps.js').ToolbarLayoutMode;
|
|
19
19
|
isReadOnly: () => boolean;
|
|
20
20
|
useComposedShell: () => boolean;
|
|
21
21
|
loadingOptions: () => OasisEditorLoadingOptions | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EditorState } from '../../../../core/model.js';
|
|
2
|
+
import { ParagraphDialogApplyValues, ParagraphDialogInitialValues } from '../../../components/Dialogs/ParagraphDialog.js';
|
|
3
|
+
import { ToolbarStyleState } from '../../../toolbarStyleState.js';
|
|
4
|
+
|
|
5
|
+
interface ParagraphDialogState {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
initial: ParagraphDialogInitialValues;
|
|
8
|
+
}
|
|
9
|
+
export interface ParagraphDialogBridgeDeps {
|
|
10
|
+
toolbarStyleState: () => ToolbarStyleState;
|
|
11
|
+
isReadOnly: () => boolean;
|
|
12
|
+
setParagraphDialog: (state: ParagraphDialogState) => void;
|
|
13
|
+
setContextMenu: (state: {
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}) => void;
|
|
18
|
+
clearPreferredColumn: () => void;
|
|
19
|
+
resetTransactionGrouping: () => void;
|
|
20
|
+
applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
|
|
21
|
+
mergeKey?: string;
|
|
22
|
+
}) => void;
|
|
23
|
+
focusInput: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function createParagraphDialogBridge(deps: ParagraphDialogBridgeDeps): {
|
|
26
|
+
openParagraphDialog: () => void;
|
|
27
|
+
applyParagraphDialogValues: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EditorState } from '../../../../core/model.js';
|
|
2
|
+
import { TablePropertiesDialogApplyValues, TablePropertiesDialogInitialValues } from '../../../components/Dialogs/TablePropertiesDialog.js';
|
|
3
|
+
|
|
4
|
+
interface TablePropertiesDialogState {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
initial: TablePropertiesDialogInitialValues;
|
|
7
|
+
}
|
|
8
|
+
interface ContextMenuState {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TablePropertiesDialogBridgeDeps {
|
|
14
|
+
state: () => EditorState;
|
|
15
|
+
isReadOnly: () => boolean;
|
|
16
|
+
setTablePropertiesDialog: (state: TablePropertiesDialogState) => void;
|
|
17
|
+
setContextMenu: (state: ContextMenuState) => void;
|
|
18
|
+
clearPreferredColumn: () => void;
|
|
19
|
+
resetTransactionGrouping: () => void;
|
|
20
|
+
applyTransactionalState: (producer: (current: EditorState) => EditorState, options?: {
|
|
21
|
+
mergeKey?: string;
|
|
22
|
+
}) => void;
|
|
23
|
+
focusInput: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function createTablePropertiesDialogBridge(deps: TablePropertiesDialogBridgeDeps): {
|
|
26
|
+
isInsideTable: () => boolean;
|
|
27
|
+
openTablePropertiesDialog: (activeTab?: TablePropertiesDialogInitialValues["activeTab"]) => void;
|
|
28
|
+
applyTablePropertiesDialogValues: (values: TablePropertiesDialogApplyValues) => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -11,6 +11,16 @@ export interface SurfaceHitImage {
|
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
13
|
}
|
|
14
|
+
export interface SurfaceHitTextBox {
|
|
15
|
+
paragraphId: string;
|
|
16
|
+
paragraphOffset: number;
|
|
17
|
+
startOffset: number;
|
|
18
|
+
endOffset: number;
|
|
19
|
+
left: number;
|
|
20
|
+
top: number;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
14
24
|
export interface SurfaceHit {
|
|
15
25
|
zone: EditorEditingZone;
|
|
16
26
|
footnoteId?: string;
|
|
@@ -27,11 +37,18 @@ export interface SurfaceHit {
|
|
|
27
37
|
height: number;
|
|
28
38
|
};
|
|
29
39
|
image?: SurfaceHitImage;
|
|
40
|
+
textBox?: SurfaceHitTextBox;
|
|
30
41
|
}
|
|
31
42
|
export interface ResolveCanvasHitOptions {
|
|
32
43
|
snapshot: CanvasLayoutSnapshot;
|
|
33
44
|
state: EditorState;
|
|
34
45
|
clientX: number;
|
|
35
46
|
clientY: number;
|
|
47
|
+
/**
|
|
48
|
+
* "Pierce" mode (Alt+click): select the floating object directly under the
|
|
49
|
+
* cursor even when it is painted behind the text (behindDoc). When false,
|
|
50
|
+
* behind-text objects are skipped so clicks fall through to the text on top.
|
|
51
|
+
*/
|
|
52
|
+
pierce?: boolean;
|
|
36
53
|
}
|
|
37
54
|
export declare function resolveCanvasSurfaceHitAtPoint(options: ResolveCanvasHitOptions): SurfaceHit | null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorEditingZone, EditorLayoutParagraph, EditorParagraphNode, EditorPosition, EditorState } from '../../../../core/model.js';
|
|
2
2
|
import { CanvasUnsupportedReason } from '../../CanvasTableLayout.js';
|
|
3
|
+
import { VerticalRenderMode } from '../../verticalText.js';
|
|
3
4
|
|
|
4
5
|
export interface CanvasSnapshotSlot {
|
|
5
6
|
offset: number;
|
|
@@ -40,6 +41,8 @@ export interface CanvasSnapshotParagraph {
|
|
|
40
41
|
height: number;
|
|
41
42
|
lines: CanvasSnapshotLine[];
|
|
42
43
|
tableCell?: CanvasSnapshotTableCellInfo;
|
|
44
|
+
/** Set when the paragraph is painted with a vertical-text transform. */
|
|
45
|
+
verticalMode?: VerticalRenderMode;
|
|
43
46
|
}
|
|
44
47
|
export interface CanvasSnapshotInlineImage {
|
|
45
48
|
paragraphId: string;
|
|
@@ -53,6 +56,57 @@ export interface CanvasSnapshotInlineImage {
|
|
|
53
56
|
top: number;
|
|
54
57
|
width: number;
|
|
55
58
|
height: number;
|
|
59
|
+
/** Shape rotation in degrees, when rotated. */
|
|
60
|
+
rotation?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface CanvasSnapshotFloatingTextBox {
|
|
63
|
+
paragraphId: string;
|
|
64
|
+
paragraphIndex: number;
|
|
65
|
+
zone: EditorEditingZone;
|
|
66
|
+
footnoteId?: string;
|
|
67
|
+
pageIndex: number;
|
|
68
|
+
startOffset: number;
|
|
69
|
+
endOffset: number;
|
|
70
|
+
left: number;
|
|
71
|
+
top: number;
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
/** Shape rotation in degrees, when rotated. */
|
|
75
|
+
rotation?: number;
|
|
76
|
+
/** True when the object is painted behind the text (`behindDoc`). */
|
|
77
|
+
behindDoc?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface CanvasSnapshotFloatingImage {
|
|
80
|
+
paragraphId: string;
|
|
81
|
+
paragraphIndex: number;
|
|
82
|
+
zone: EditorEditingZone;
|
|
83
|
+
footnoteId?: string;
|
|
84
|
+
pageIndex: number;
|
|
85
|
+
startOffset: number;
|
|
86
|
+
endOffset: number;
|
|
87
|
+
left: number;
|
|
88
|
+
top: number;
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
/** Shape rotation in degrees, when rotated. */
|
|
92
|
+
rotation?: number;
|
|
93
|
+
/** True when the object is painted behind the text (`behindDoc`). */
|
|
94
|
+
behindDoc?: boolean;
|
|
95
|
+
}
|
|
96
|
+
export interface CanvasSnapshotInlineTextBox {
|
|
97
|
+
paragraphId: string;
|
|
98
|
+
paragraphIndex: number;
|
|
99
|
+
zone: EditorEditingZone;
|
|
100
|
+
footnoteId?: string;
|
|
101
|
+
pageIndex: number;
|
|
102
|
+
startOffset: number;
|
|
103
|
+
endOffset: number;
|
|
104
|
+
left: number;
|
|
105
|
+
top: number;
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
/** Shape rotation in degrees, when rotated. */
|
|
109
|
+
rotation?: number;
|
|
56
110
|
}
|
|
57
111
|
export interface CanvasSnapshotPage {
|
|
58
112
|
index: number;
|
|
@@ -72,6 +126,9 @@ export interface CanvasLayoutSnapshot {
|
|
|
72
126
|
paragraphs: CanvasSnapshotParagraph[];
|
|
73
127
|
paragraphsById: Map<string, CanvasSnapshotParagraph[]>;
|
|
74
128
|
inlineImages: CanvasSnapshotInlineImage[];
|
|
129
|
+
floatingImages: CanvasSnapshotFloatingImage[];
|
|
130
|
+
inlineTextBoxes: CanvasSnapshotInlineTextBox[];
|
|
131
|
+
floatingTextBoxes: CanvasSnapshotFloatingTextBox[];
|
|
75
132
|
unsupportedRegions: Array<{
|
|
76
133
|
pageIndex: number;
|
|
77
134
|
zone: EditorEditingZone;
|
|
@@ -88,6 +145,5 @@ export interface BuildCanvasLayoutSnapshotOptions {
|
|
|
88
145
|
state: EditorState;
|
|
89
146
|
measuredBlockHeights?: Record<string, number>;
|
|
90
147
|
measuredParagraphLayouts?: Record<string, EditorLayoutParagraph>;
|
|
91
|
-
layoutMode?: "fast" | "wordParity";
|
|
92
148
|
}
|
|
93
149
|
export declare function buildCanvasLayoutSnapshot(options: BuildCanvasLayoutSnapshotOptions): CanvasLayoutSnapshot | null;
|
|
@@ -10,11 +10,27 @@ export interface SelectedImageSelectionBox {
|
|
|
10
10
|
top: number;
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
|
+
/** Shape rotation in degrees (0 when not rotated). */
|
|
14
|
+
rotation: number;
|
|
15
|
+
}
|
|
16
|
+
export interface SelectedTextBoxSelectionBox {
|
|
17
|
+
paragraphId: string;
|
|
18
|
+
startOffset: number;
|
|
19
|
+
endOffset: number;
|
|
20
|
+
left: number;
|
|
21
|
+
top: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
/** Shape rotation in degrees (0 when not rotated). */
|
|
25
|
+
rotation: number;
|
|
26
|
+
/** True when the selected text box is a floating (anchored) drawing. */
|
|
27
|
+
floating: boolean;
|
|
13
28
|
}
|
|
14
29
|
export interface CanvasSelectionGeometryResult {
|
|
15
30
|
selectionBoxes: SelectionBox[];
|
|
16
31
|
caretBox: CaretBox;
|
|
17
32
|
inputBox: InputBox;
|
|
18
33
|
selectedImageBox: SelectedImageSelectionBox | null;
|
|
34
|
+
selectedTextBoxBox: SelectedTextBoxSelectionBox | null;
|
|
19
35
|
}
|
|
20
36
|
export declare function computeCanvasSelectionGeometry(snapshot: CanvasLayoutSnapshot, state: EditorState): CanvasSelectionGeometryResult;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EditorParagraphNode, EditorPosition, EditorState, EditorTableNode } from '../../../../core/model.js';
|
|
2
2
|
import { projectParagraphLayout } from '../../../../layoutProjection/index.js';
|
|
3
|
+
import { VerticalRenderMode } from '../../verticalText.js';
|
|
3
4
|
|
|
4
5
|
export type CanvasUnsupportedReason = "unsupported:v-span" | "unsupported:v-merge" | "unsupported:nested-table";
|
|
5
6
|
export interface CanvasTableBorderSpec {
|
|
@@ -42,6 +43,8 @@ export interface CanvasTableCellLayoutEntry {
|
|
|
42
43
|
left: CanvasTableBorderSpec;
|
|
43
44
|
};
|
|
44
45
|
paragraphs: CanvasTableParagraphLayoutEntry[];
|
|
46
|
+
/** Vertical text flow inside this cell (`horizontal` when not rotated). */
|
|
47
|
+
verticalMode: VerticalRenderMode;
|
|
45
48
|
}
|
|
46
49
|
export interface CanvasTableLayoutResult {
|
|
47
50
|
tableId: string;
|
|
@@ -57,7 +60,6 @@ export declare function buildCanvasTableLayout(options: {
|
|
|
57
60
|
table: EditorTableNode;
|
|
58
61
|
state: EditorState;
|
|
59
62
|
pageIndex: number;
|
|
60
|
-
layoutMode: "fast" | "wordParity";
|
|
61
63
|
originX: number;
|
|
62
64
|
originY: number;
|
|
63
65
|
contentWidth: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorLayoutBlock, EditorState } from '../../../../core/model.js';
|
|
1
|
+
import { EditorLayoutBlock, EditorPageSettings, EditorState } from '../../../../core/model.js';
|
|
2
2
|
|
|
3
|
-
export declare function renderBlockList(ctx: CanvasRenderingContext2D, state: EditorState, blocks: EditorLayoutBlock[], originX: number, originY: number, contentWidth: number, pageIndex: number, onUpdate: () => void): void;
|
|
3
|
+
export declare function renderBlockList(ctx: CanvasRenderingContext2D, state: EditorState, blocks: EditorLayoutBlock[], originX: number, originY: number, contentWidth: number, pageIndex: number, onUpdate: () => void, pageSettings?: EditorPageSettings): void;
|
|
4
4
|
export declare function renderFootnoteBlockList(ctx: CanvasRenderingContext2D, state: EditorState, blocks: EditorLayoutBlock[], footnoteReferenceIds: string[], originX: number, originY: number, contentWidth: number, pageIndex: number, onUpdate: () => void): void;
|