oasis-editor 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface CanvasBorderEdge {
|
|
2
|
+
width: number;
|
|
3
|
+
color: string;
|
|
4
|
+
type: "solid" | "dashed" | "dotted" | "none";
|
|
5
|
+
}
|
|
6
|
+
export interface CanvasBorderBox {
|
|
7
|
+
top?: CanvasBorderEdge;
|
|
8
|
+
right?: CanvasBorderEdge;
|
|
9
|
+
bottom?: CanvasBorderEdge;
|
|
10
|
+
left?: CanvasBorderEdge;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Strokes the four edges of a rectangular box. Edges left `undefined` are
|
|
14
|
+
* skipped. Shared by table-cell borders and paragraph borders so both render
|
|
15
|
+
* dashes/dotted/solid identically.
|
|
16
|
+
*/
|
|
17
|
+
export declare function drawBorderBox(ctx: CanvasRenderingContext2D, left: number, top: number, width: number, height: number, borders: CanvasBorderBox): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EditorLayoutLine, EditorParagraphNode } from '../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Draws a paragraph's drop cap (the large initial letter). The wrapping body
|
|
5
|
+
* text has already been shortened by the matching exclusion in
|
|
6
|
+
* `resolveDropCapExclusion`, so the cap occupies the gap to the left of those
|
|
7
|
+
* lines. The cap baseline aligns with the baseline of its last spanned line
|
|
8
|
+
* (mirroring `drawParagraph`'s `line.top + line.height * 0.8`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function drawDropCapForParagraph(options: {
|
|
11
|
+
ctx: CanvasRenderingContext2D;
|
|
12
|
+
paragraph: EditorParagraphNode;
|
|
13
|
+
lines: EditorLayoutLine[];
|
|
14
|
+
originX: number;
|
|
15
|
+
paragraphTop: number;
|
|
16
|
+
}): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EditorLayoutLine, EditorParagraphNode, EditorState } from '../../../../core/model.js';
|
|
1
|
+
import { EditorLayoutLine, EditorPageSettings, EditorParagraphNode, EditorState } from '../../../../core/model.js';
|
|
2
2
|
|
|
3
|
+
export declare function resolveCanvasFontFamily(fontFamily: string | null | undefined): string;
|
|
3
4
|
export declare function resolveCanvasTextRenderMetrics(styles: {
|
|
4
5
|
superscript?: boolean;
|
|
5
6
|
subscript?: boolean;
|
|
@@ -9,4 +10,25 @@ export declare function resolveCanvasTextRenderMetrics(styles: {
|
|
|
9
10
|
fontSize: number;
|
|
10
11
|
baselineOffset: number;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Paints the floating images anchored within a paragraph, mirroring
|
|
15
|
+
* `drawFloatingTextBoxesForParagraph`. Split into `behind`/`front` layers so a
|
|
16
|
+
* `behindDoc` image renders under the text and others render over it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function drawFloatingImagesForParagraph(options: {
|
|
19
|
+
ctx: CanvasRenderingContext2D;
|
|
20
|
+
paragraphLines: EditorLayoutLine[];
|
|
21
|
+
state: EditorState;
|
|
22
|
+
pageSettings: EditorPageSettings;
|
|
23
|
+
contentLeft: number;
|
|
24
|
+
contentTop: number;
|
|
25
|
+
contentWidth: number;
|
|
26
|
+
paragraphTop: number;
|
|
27
|
+
onUpdate: () => void;
|
|
28
|
+
layer: "behind" | "front";
|
|
29
|
+
}): void;
|
|
30
|
+
export declare function drawParagraph(ctx: CanvasRenderingContext2D, paragraph: EditorParagraphNode, lines: EditorLayoutLine[], state: EditorState, originX: number, originY: number, onUpdate: () => void, pageIndex?: number): void;
|
|
31
|
+
export declare function resolveFragmentPaintBounds(line: EditorLayoutLine, fragment: EditorLayoutLine["fragments"][number]): {
|
|
32
|
+
left: number;
|
|
33
|
+
right: number;
|
|
34
|
+
} | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EditorLayoutLine, EditorPageSettings, EditorState, EditorTextBoxData } from '../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
export declare function drawTextBoxShape(ctx: CanvasRenderingContext2D, textBox: EditorTextBoxData, x: number, y: number, width: number, height: number): void;
|
|
4
|
+
export declare function renderTextBoxContent(ctx: CanvasRenderingContext2D, textBox: EditorTextBoxData, state: EditorState, x: number, y: number, width: number, height: number, pageIndex: number, onUpdate: () => void): void;
|
|
5
|
+
/**
|
|
6
|
+
* Paint a text box (shape + content) at the given box, honoring
|
|
7
|
+
* `textBox.rotation`. Rotation pivots around the box center so the painted
|
|
8
|
+
* result lines up with the selection overlay (which rotates the same way).
|
|
9
|
+
* Shared by inline and floating text box rendering.
|
|
10
|
+
*/
|
|
11
|
+
export declare function paintTextBox(ctx: CanvasRenderingContext2D, textBox: EditorTextBoxData, state: EditorState, x: number, y: number, width: number, height: number, pageIndex: number, onUpdate: () => void): void;
|
|
12
|
+
export declare function drawFloatingTextBoxesForParagraph(options: {
|
|
13
|
+
ctx: CanvasRenderingContext2D;
|
|
14
|
+
paragraphLines: EditorLayoutLine[];
|
|
15
|
+
state: EditorState;
|
|
16
|
+
pageSettings: EditorPageSettings;
|
|
17
|
+
contentLeft: number;
|
|
18
|
+
contentTop: number;
|
|
19
|
+
contentWidth: number;
|
|
20
|
+
paragraphTop: number;
|
|
21
|
+
pageIndex: number;
|
|
22
|
+
onUpdate: () => void;
|
|
23
|
+
layer: "behind" | "front";
|
|
24
|
+
}): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EditorWrapPolygonPoint } from '../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pure mask → fractional contour. A mostly-opaque or empty mask, or one whose
|
|
5
|
+
* boundary degenerates, yields the rectangle. Exported for deterministic tests
|
|
6
|
+
* (the canvas rasterization path needs a real browser).
|
|
7
|
+
*/
|
|
8
|
+
export declare function traceAlphaMaskContour(mask: Uint8Array, width: number, height: number): EditorWrapPolygonPoint[];
|
|
9
|
+
/** Traces (and caches) the wrap contour for a decoded, same-origin image. */
|
|
10
|
+
export declare function traceImageAlphaContour(img: HTMLImageElement): EditorWrapPolygonPoint[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EditorState, EditorTextBoxData } from '../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
export declare function getTextBoxPadding(textBox: EditorTextBoxData): {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
right: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The height the text box is actually painted at: its stored height, or the
|
|
11
|
+
* content-measured height when auto-fit is on. Selection overlays must use this
|
|
12
|
+
* so the resize handles match the rendered box rather than the stored height.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveTextBoxRenderHeight(textBox: EditorTextBoxData, state: EditorState, pageIndex: number): number;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { EditorParagraphNode, EditorState } from '../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* How a block of text should be painted given its OOXML flow direction.
|
|
5
|
+
* - `horizontal`: normal left-to-right horizontal text (no transform).
|
|
6
|
+
* - `rotate-cw`: rotated 90° clockwise — text reads top→bottom, columns
|
|
7
|
+
* advance right→left (`w:textDirection` `tbRl`, DrawingML `vert`).
|
|
8
|
+
* - `rotate-ccw`: rotated 90° counter-clockwise — text reads bottom→top,
|
|
9
|
+
* columns advance left→right (`btLr`, `vert270`).
|
|
10
|
+
* - `stack`: upright glyphs stacked top→bottom — DrawingML `wordArtVert` (and
|
|
11
|
+
* East-Asian CJK content).
|
|
12
|
+
*
|
|
13
|
+
* Note on the "V" variants: like Word, Latin `lrTbV` renders horizontally and
|
|
14
|
+
* `tbRlV` renders rotated (≈ `tbRl`); only `wordArtVert` stacks glyphs upright.
|
|
15
|
+
*/
|
|
16
|
+
export type VerticalRenderMode = "horizontal" | "rotate-cw" | "rotate-ccw" | "stack";
|
|
17
|
+
/**
|
|
18
|
+
* Map an OOXML text-direction token (`w:textDirection/@w:val` or
|
|
19
|
+
* `wps:bodyPr/@vert`) to a canvas render mode.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveVerticalMode(direction: string | null | undefined): VerticalRenderMode;
|
|
22
|
+
export interface VerticalBox {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Map a point in a rotated box's local layout space (where `lx` runs along the
|
|
30
|
+
* box's long/vertical axis and `ly` across its short axis) to screen space.
|
|
31
|
+
* This is the point form of the affine transform applied by `withRotatedBox`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function projectRotatedPoint(box: VerticalBox, mode: "rotate-cw" | "rotate-ccw", lx: number, ly: number): {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Project a horizontal-layout caret slot into the screen-space rectangle it
|
|
39
|
+
* occupies once the box is rotated. `flow` is the slot's position along the text
|
|
40
|
+
* flow (its `left`), `cross` is its cross-flow position (`cursorY + slot.top`),
|
|
41
|
+
* `advance` is the glyph advance along the flow, and `crossThickness` is the line
|
|
42
|
+
* height. Returns the axis-aligned `{ left, top, height }` used by the generic
|
|
43
|
+
* slot-based hit-test/selection scorers.
|
|
44
|
+
*/
|
|
45
|
+
export declare function projectRotatedSlot(box: VerticalBox, mode: "rotate-cw" | "rotate-ccw", flow: number, cross: number, advance: number, crossThickness: number): {
|
|
46
|
+
left: number;
|
|
47
|
+
top: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Run `paint` inside a canvas transform so that content laid out horizontally
|
|
52
|
+
* in a width/height-swapped coordinate space appears rotated to fill `box`.
|
|
53
|
+
*
|
|
54
|
+
* The callback paints at local origin (0, 0) into a box whose dimensions are
|
|
55
|
+
* `(layoutWidth = box.height, layoutHeight = box.width)` — i.e. text flows
|
|
56
|
+
* along the box's long (vertical) axis.
|
|
57
|
+
*/
|
|
58
|
+
export declare function withRotatedBox(ctx: CanvasRenderingContext2D, box: VerticalBox, mode: "rotate-cw" | "rotate-ccw", paint: (layoutWidth: number, layoutHeight: number) => void): void;
|
|
59
|
+
/** Estimate the vertical extent (px) of a paragraph painted as stacked glyphs. */
|
|
60
|
+
export declare function estimateStackedParagraphHeight(paragraph: EditorParagraphNode, state: EditorState): number;
|
|
61
|
+
/**
|
|
62
|
+
* Estimate the horizontal extent (px) of a single stacked column — the column
|
|
63
|
+
* width `drawStackedParagraph` reserves for the paragraph's widest glyph.
|
|
64
|
+
*/
|
|
65
|
+
export declare function estimateStackedColumnWidth(paragraph: EditorParagraphNode, state: EditorState): number;
|
|
66
|
+
/** One upright glyph positioned within a stacked column (screen space). */
|
|
67
|
+
export interface StackedGlyph {
|
|
68
|
+
char: string;
|
|
69
|
+
/** Paragraph text offset of this glyph. */
|
|
70
|
+
offset: number;
|
|
71
|
+
/** Column center x. */
|
|
72
|
+
centerX: number;
|
|
73
|
+
/** Glyph top y. */
|
|
74
|
+
top: number;
|
|
75
|
+
/** Column width. */
|
|
76
|
+
width: number;
|
|
77
|
+
/** Glyph height (advance along the column). */
|
|
78
|
+
height: number;
|
|
79
|
+
/** Canvas font string for painting. */
|
|
80
|
+
font: string;
|
|
81
|
+
/** Fill color. */
|
|
82
|
+
color: string;
|
|
83
|
+
}
|
|
84
|
+
export interface StackedLayout {
|
|
85
|
+
glyphs: StackedGlyph[];
|
|
86
|
+
/** The x edge consumed, so callers can chain paragraphs as adjacent columns. */
|
|
87
|
+
endColumnRight: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Compute the upright-glyph layout for a paragraph stacked top→bottom inside
|
|
91
|
+
* `box`. Columns advance right→left when `columnsRtl` (East-Asian CJK default),
|
|
92
|
+
* or left→right for Latin WordArt "Stacked" text (`wordArtVert`). `startColumn`
|
|
93
|
+
* is the right edge of the first column when RTL, or its left edge when LTR.
|
|
94
|
+
* This is the single source of truth shared by `drawStackedParagraph` (paint)
|
|
95
|
+
* and the layout snapshot (caret/selection geometry), so the two cannot drift.
|
|
96
|
+
*/
|
|
97
|
+
export declare function layoutStackedGlyphs(paragraph: EditorParagraphNode, state: EditorState, box: VerticalBox, startColumn: number, columnsRtl?: boolean): StackedLayout;
|
|
98
|
+
/**
|
|
99
|
+
* Paint a paragraph as upright glyphs stacked top→bottom inside `box`.
|
|
100
|
+
* Successive columns (after a hard break or when the box overflows) advance
|
|
101
|
+
* right→left when `columnsRtl`, otherwise left→right. Returns the far edge
|
|
102
|
+
* consumed so callers can chain paragraphs as adjacent columns.
|
|
103
|
+
*/
|
|
104
|
+
export declare function drawStackedParagraph(ctx: CanvasRenderingContext2D, paragraph: EditorParagraphNode, state: EditorState, box: VerticalBox, startColumn: number, columnsRtl?: boolean): number;
|
|
@@ -1,67 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FontDialogProps } from '../../../font-dialog/FontDialogTypes.js';
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
fontFamily: string;
|
|
5
|
-
fontSize: string;
|
|
6
|
-
color: string;
|
|
7
|
-
colorMode: "automatic" | "custom";
|
|
8
|
-
highlight: string;
|
|
9
|
-
bold: boolean;
|
|
10
|
-
italic: boolean;
|
|
11
|
-
underline: boolean;
|
|
12
|
-
underlineStyle: EditorUnderlineStyle | null;
|
|
13
|
-
underlineColor: string;
|
|
14
|
-
strike: boolean;
|
|
15
|
-
doubleStrike: boolean;
|
|
16
|
-
superscript: boolean;
|
|
17
|
-
subscript: boolean;
|
|
18
|
-
smallCaps: boolean;
|
|
19
|
-
allCaps: boolean;
|
|
20
|
-
hidden: boolean;
|
|
21
|
-
characterScale: string;
|
|
22
|
-
characterSpacing: string;
|
|
23
|
-
baselineShift: string;
|
|
24
|
-
kerningThreshold: string;
|
|
25
|
-
ligatures: EditorLigatures | "";
|
|
26
|
-
numberSpacing: EditorNumberSpacing | "";
|
|
27
|
-
numberForm: EditorNumberForm | "";
|
|
28
|
-
stylisticSet: string;
|
|
29
|
-
contextualAlternates: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface FontDialogApplyValues {
|
|
32
|
-
fontFamily: string | null;
|
|
33
|
-
fontSize: number | null;
|
|
34
|
-
color: string | null;
|
|
35
|
-
colorMode: "automatic" | "custom";
|
|
36
|
-
highlight: string | null;
|
|
37
|
-
bold: boolean;
|
|
38
|
-
italic: boolean;
|
|
39
|
-
underline: boolean;
|
|
40
|
-
underlineStyle: EditorUnderlineStyle | null;
|
|
41
|
-
underlineColor: string | null;
|
|
42
|
-
strike: boolean;
|
|
43
|
-
doubleStrike: boolean;
|
|
44
|
-
superscript: boolean;
|
|
45
|
-
subscript: boolean;
|
|
46
|
-
smallCaps: boolean;
|
|
47
|
-
allCaps: boolean;
|
|
48
|
-
hidden: boolean;
|
|
49
|
-
characterScale: number | null;
|
|
50
|
-
characterSpacing: number | null;
|
|
51
|
-
baselineShift: number | null;
|
|
52
|
-
kerningThreshold: number | null;
|
|
53
|
-
ligatures: EditorLigatures | null;
|
|
54
|
-
numberSpacing: EditorNumberSpacing | null;
|
|
55
|
-
numberForm: EditorNumberForm | null;
|
|
56
|
-
stylisticSet: number | null;
|
|
57
|
-
contextualAlternates: boolean;
|
|
58
|
-
}
|
|
59
|
-
export interface FontDialogProps {
|
|
60
|
-
isOpen: boolean;
|
|
61
|
-
initial: FontDialogInitialValues;
|
|
62
|
-
familyOptions: string[];
|
|
63
|
-
sizeOptions: number[];
|
|
64
|
-
onClose: () => void;
|
|
65
|
-
onApply: (values: FontDialogApplyValues, original: FontDialogInitialValues) => void;
|
|
66
|
-
}
|
|
3
|
+
export type { FontDialogInitialValues, FontDialogApplyValues, FontDialogProps, } from '../../../font-dialog/FontDialogTypes.js';
|
|
67
4
|
export declare function FontDialog(props: FontDialogProps): import("solid-js").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EditorLigatures, EditorNumberForm, EditorNumberSpacing } from '../../../../../../core/model.js';
|
|
2
|
+
import { FontTabValues, AdvancedTabValues, FontDialogInitialValues, FontDialogApplyValues } from '../../../font-dialog/FontDialogTypes.js';
|
|
2
3
|
|
|
3
4
|
export type FontDialogSpacingMode = "normal" | "expanded" | "condensed";
|
|
4
5
|
export type FontDialogPositionMode = "normal" | "raised" | "lowered";
|
|
@@ -13,3 +14,7 @@ export declare function ligaturesToCss(value: EditorLigatures | ""): string | un
|
|
|
13
14
|
export declare function numericToCss(numberSpacing: EditorNumberSpacing | "", numberForm: EditorNumberForm | ""): string | undefined;
|
|
14
15
|
export declare function featureSettingsToCss(stylisticSet: string, contextualAlternates: boolean): string | undefined;
|
|
15
16
|
export declare function resolveFontFaceStyle(bold: boolean, italic: boolean): FontFaceStyle;
|
|
17
|
+
export declare function createFontTabValuesFromInitial(initial: FontDialogInitialValues): FontTabValues;
|
|
18
|
+
export declare function createAdvancedTabValuesFromInitial(initial: FontDialogInitialValues): AdvancedTabValues;
|
|
19
|
+
export declare function buildFontDialogPreviewStyle(font: FontTabValues, advanced: AdvancedTabValues): Record<string, string | number | undefined>;
|
|
20
|
+
export declare function buildFontDialogApplyValues(font: FontTabValues, advanced: AdvancedTabValues): FontDialogApplyValues;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { EditorBorderStyle, EditorParagraphStyle } from '../../../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
export interface ParagraphDialogInitialValues {
|
|
4
|
+
align: string;
|
|
5
|
+
indentLeft: string;
|
|
6
|
+
indentRight: string;
|
|
7
|
+
indentFirstLine: string;
|
|
8
|
+
indentHanging: string;
|
|
9
|
+
spacingBefore: string;
|
|
10
|
+
spacingAfter: string;
|
|
11
|
+
lineHeight: string;
|
|
12
|
+
shading: string;
|
|
13
|
+
borderStyle: string;
|
|
14
|
+
borderWidth: string;
|
|
15
|
+
borderColor: string;
|
|
16
|
+
borderSideTop: boolean;
|
|
17
|
+
borderSideRight: boolean;
|
|
18
|
+
borderSideBottom: boolean;
|
|
19
|
+
borderSideLeft: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface ParagraphDialogBorders {
|
|
22
|
+
top: EditorBorderStyle | null;
|
|
23
|
+
right: EditorBorderStyle | null;
|
|
24
|
+
bottom: EditorBorderStyle | null;
|
|
25
|
+
left: EditorBorderStyle | null;
|
|
26
|
+
}
|
|
27
|
+
export interface ParagraphDialogApplyValues {
|
|
28
|
+
align: EditorParagraphStyle["align"] | null;
|
|
29
|
+
indentLeft: number | null;
|
|
30
|
+
indentRight: number | null;
|
|
31
|
+
indentFirstLine: number | null;
|
|
32
|
+
indentHanging: number | null;
|
|
33
|
+
spacingBefore: number | null;
|
|
34
|
+
spacingAfter: number | null;
|
|
35
|
+
lineHeight: number | null;
|
|
36
|
+
shading: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Per-edge paragraph borders. The dialog edits one shared style/width/color
|
|
39
|
+
* and toggles which edges carry it; each edge is the shared border or `null`.
|
|
40
|
+
*/
|
|
41
|
+
borders: ParagraphDialogBorders;
|
|
42
|
+
}
|
|
43
|
+
export interface ParagraphDialogProps {
|
|
44
|
+
isOpen: boolean;
|
|
45
|
+
initial: ParagraphDialogInitialValues;
|
|
46
|
+
onClose: () => void;
|
|
47
|
+
onApply: (values: ParagraphDialogApplyValues, original: ParagraphDialogInitialValues) => void;
|
|
48
|
+
}
|
|
49
|
+
export declare function ParagraphDialog(props: ParagraphDialogProps): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { EditorBorderStyle, EditorDocxWidthValue, EditorTableRowHeightRule } from '../../../../../../core/model.js';
|
|
2
|
+
|
|
3
|
+
type TableWidthUnit = "points" | "percent";
|
|
4
|
+
type BorderStyleValue = "none" | "solid" | "dashed" | "dotted";
|
|
5
|
+
export interface TablePropertiesDialogInitialValues {
|
|
6
|
+
activeTab?: "table" | "row" | "column" | "cell" | "altText";
|
|
7
|
+
tableWidth: string;
|
|
8
|
+
tableWidthUnit: TableWidthUnit;
|
|
9
|
+
tableAlign: "" | "left" | "center" | "right";
|
|
10
|
+
tableIndentLeft: string;
|
|
11
|
+
tableWrapping: "none" | "around";
|
|
12
|
+
floatingSummary: string;
|
|
13
|
+
rowHeight: string;
|
|
14
|
+
rowHeightRule: EditorTableRowHeightRule | "";
|
|
15
|
+
repeatHeader: boolean;
|
|
16
|
+
allowBreakAcrossPages: boolean;
|
|
17
|
+
hiddenRow: boolean;
|
|
18
|
+
columnWidth: string;
|
|
19
|
+
cellWidth: string;
|
|
20
|
+
cellVerticalAlign: "" | "top" | "middle" | "bottom";
|
|
21
|
+
cellTextDirection: "" | "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV";
|
|
22
|
+
cellNoWrap: boolean;
|
|
23
|
+
cellFitText: boolean;
|
|
24
|
+
cellHideMark: boolean;
|
|
25
|
+
marginTop: string;
|
|
26
|
+
marginRight: string;
|
|
27
|
+
marginBottom: string;
|
|
28
|
+
marginLeft: string;
|
|
29
|
+
borderStyle: BorderStyleValue;
|
|
30
|
+
borderWidth: string;
|
|
31
|
+
borderColor: string;
|
|
32
|
+
borderTop: boolean;
|
|
33
|
+
borderRight: boolean;
|
|
34
|
+
borderBottom: boolean;
|
|
35
|
+
borderLeft: boolean;
|
|
36
|
+
shading: string;
|
|
37
|
+
altTitle: string;
|
|
38
|
+
altDescription: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TablePropertiesDialogBorders {
|
|
41
|
+
top: EditorBorderStyle | null;
|
|
42
|
+
right: EditorBorderStyle | null;
|
|
43
|
+
bottom: EditorBorderStyle | null;
|
|
44
|
+
left: EditorBorderStyle | null;
|
|
45
|
+
}
|
|
46
|
+
export interface TablePropertiesDialogApplyValues {
|
|
47
|
+
tableWidth: EditorDocxWidthValue | null;
|
|
48
|
+
tableAlign: "left" | "center" | "right" | null;
|
|
49
|
+
tableIndentLeft: EditorDocxWidthValue | null;
|
|
50
|
+
rowHeight: EditorDocxWidthValue | null;
|
|
51
|
+
rowHeightRule: EditorTableRowHeightRule | null;
|
|
52
|
+
repeatHeader: boolean;
|
|
53
|
+
cantSplit: boolean;
|
|
54
|
+
hiddenRow: boolean;
|
|
55
|
+
columnWidth: EditorDocxWidthValue | null;
|
|
56
|
+
cellWidth: EditorDocxWidthValue | null;
|
|
57
|
+
cellVerticalAlign: "top" | "middle" | "bottom" | null;
|
|
58
|
+
cellTextDirection: "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV" | null;
|
|
59
|
+
cellNoWrap: boolean | null;
|
|
60
|
+
cellFitText: boolean | null;
|
|
61
|
+
cellHideMark: boolean | null;
|
|
62
|
+
margins: {
|
|
63
|
+
top: number | null;
|
|
64
|
+
right: number | null;
|
|
65
|
+
bottom: number | null;
|
|
66
|
+
left: number | null;
|
|
67
|
+
};
|
|
68
|
+
borders: TablePropertiesDialogBorders;
|
|
69
|
+
shading: string | null;
|
|
70
|
+
altTitle: string | null;
|
|
71
|
+
altDescription: string | null;
|
|
72
|
+
}
|
|
73
|
+
export interface TablePropertiesDialogProps {
|
|
74
|
+
isOpen: boolean;
|
|
75
|
+
initial: TablePropertiesDialogInitialValues;
|
|
76
|
+
onClose: () => void;
|
|
77
|
+
onApply: (values: TablePropertiesDialogApplyValues, original: TablePropertiesDialogInitialValues) => void;
|
|
78
|
+
}
|
|
79
|
+
export declare function TablePropertiesDialog(props: TablePropertiesDialogProps): import("solid-js").JSX.Element;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Accessor, Setter } from '../../../../solid-js';
|
|
2
|
+
import { FontDialogTab, FontTabValues, AdvancedTabValues, FontStylePreset } from '../../../../FontDialogTypes.js';
|
|
3
|
+
|
|
4
|
+
export interface FontDialogController {
|
|
5
|
+
activeTab: Accessor<FontDialogTab>;
|
|
6
|
+
setActiveTab: (tab: FontDialogTab) => void;
|
|
7
|
+
fontTabValues: Accessor<FontTabValues>;
|
|
8
|
+
setFontTabValues: Setter<FontTabValues>;
|
|
9
|
+
advancedTabValues: Accessor<AdvancedTabValues>;
|
|
10
|
+
setAdvancedTabValues: Setter<AdvancedTabValues>;
|
|
11
|
+
updateFontTab: <K extends keyof FontTabValues>(key: K, value: FontTabValues[K]) => void;
|
|
12
|
+
updateAdvancedTab: <K extends keyof AdvancedTabValues>(key: K, value: AdvancedTabValues[K]) => void;
|
|
13
|
+
selectedFontStyle: Accessor<FontStylePreset>;
|
|
14
|
+
visibleFamilyOptions: Accessor<string[]>;
|
|
15
|
+
effectiveSizeOptions: Accessor<number[]>;
|
|
16
|
+
customSizeError: Accessor<string>;
|
|
17
|
+
advancedValidationError: Accessor<string>;
|
|
18
|
+
previewStyle: Accessor<Record<string, string | number | undefined>>;
|
|
19
|
+
applyFontStylePreset: (preset: FontStylePreset) => void;
|
|
20
|
+
handleApply: () => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { EditorLigatures, EditorNumberForm, EditorNumberSpacing, EditorUnderlineStyle } from '../../../../../../../../core/model.js';
|
|
2
|
+
import { FontDialogSpacingMode, FontDialogPositionMode } from '../../../../../FontDialogModel.js';
|
|
3
|
+
|
|
4
|
+
export declare const DEFAULT_COLOR = "#111827";
|
|
5
|
+
export declare const DEFAULT_HIGHLIGHT = "#fef08a";
|
|
6
|
+
export declare const DEFAULT_SHADING = "#fef3c7";
|
|
7
|
+
export declare const WORD_FONT_SIZES: number[];
|
|
8
|
+
export declare const WORD_CHARACTER_SCALES: number[];
|
|
9
|
+
export type FontDialogTab = "font" | "advanced";
|
|
10
|
+
export type FontStylePreset = "regular" | "italic" | "bold" | "boldItalic";
|
|
11
|
+
export type UnderlineStyleValue = EditorUnderlineStyle | "none";
|
|
12
|
+
export interface FontTabValues {
|
|
13
|
+
familyFilter: string;
|
|
14
|
+
fontFamily: string;
|
|
15
|
+
fontSize: string;
|
|
16
|
+
colorMode: "automatic" | "custom";
|
|
17
|
+
color: string;
|
|
18
|
+
highlight: string;
|
|
19
|
+
shading: string;
|
|
20
|
+
bold: boolean;
|
|
21
|
+
italic: boolean;
|
|
22
|
+
underline: boolean;
|
|
23
|
+
underlineStyle: UnderlineStyleValue;
|
|
24
|
+
underlineColor: string;
|
|
25
|
+
strike: boolean;
|
|
26
|
+
doubleStrike: boolean;
|
|
27
|
+
superscript: boolean;
|
|
28
|
+
subscript: boolean;
|
|
29
|
+
smallCaps: boolean;
|
|
30
|
+
allCaps: boolean;
|
|
31
|
+
hidden: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface AdvancedTabValues {
|
|
34
|
+
characterScale: string;
|
|
35
|
+
spacingMode: FontDialogSpacingMode;
|
|
36
|
+
spacingAmount: string;
|
|
37
|
+
positionMode: FontDialogPositionMode;
|
|
38
|
+
positionAmount: string;
|
|
39
|
+
kerningEnabled: boolean;
|
|
40
|
+
kerningThreshold: string;
|
|
41
|
+
ligatures: EditorLigatures | "";
|
|
42
|
+
numberSpacing: EditorNumberSpacing | "";
|
|
43
|
+
numberForm: EditorNumberForm | "";
|
|
44
|
+
stylisticSet: string;
|
|
45
|
+
contextualAlternates: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface FontDialogInitialValues {
|
|
48
|
+
fontFamily: string;
|
|
49
|
+
fontSize: string;
|
|
50
|
+
color: string;
|
|
51
|
+
colorMode: "automatic" | "custom";
|
|
52
|
+
highlight: string;
|
|
53
|
+
shading: string;
|
|
54
|
+
bold: boolean;
|
|
55
|
+
italic: boolean;
|
|
56
|
+
underline: boolean;
|
|
57
|
+
underlineStyle: EditorUnderlineStyle | null;
|
|
58
|
+
underlineColor: string;
|
|
59
|
+
strike: boolean;
|
|
60
|
+
doubleStrike: boolean;
|
|
61
|
+
superscript: boolean;
|
|
62
|
+
subscript: boolean;
|
|
63
|
+
smallCaps: boolean;
|
|
64
|
+
allCaps: boolean;
|
|
65
|
+
hidden: boolean;
|
|
66
|
+
characterScale: string;
|
|
67
|
+
characterSpacing: string;
|
|
68
|
+
baselineShift: string;
|
|
69
|
+
kerningThreshold: string;
|
|
70
|
+
ligatures: EditorLigatures | "";
|
|
71
|
+
numberSpacing: EditorNumberSpacing | "";
|
|
72
|
+
numberForm: EditorNumberForm | "";
|
|
73
|
+
stylisticSet: string;
|
|
74
|
+
contextualAlternates: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface FontDialogApplyValues {
|
|
77
|
+
fontFamily: string | null;
|
|
78
|
+
fontSize: number | null;
|
|
79
|
+
color: string | null;
|
|
80
|
+
colorMode: "automatic" | "custom";
|
|
81
|
+
highlight: string | null;
|
|
82
|
+
shading: string | null;
|
|
83
|
+
bold: boolean;
|
|
84
|
+
italic: boolean;
|
|
85
|
+
underline: boolean;
|
|
86
|
+
underlineStyle: EditorUnderlineStyle | null;
|
|
87
|
+
underlineColor: string | null;
|
|
88
|
+
strike: boolean;
|
|
89
|
+
doubleStrike: boolean;
|
|
90
|
+
superscript: boolean;
|
|
91
|
+
subscript: boolean;
|
|
92
|
+
smallCaps: boolean;
|
|
93
|
+
allCaps: boolean;
|
|
94
|
+
hidden: boolean;
|
|
95
|
+
characterScale: number | null;
|
|
96
|
+
characterSpacing: number | null;
|
|
97
|
+
baselineShift: number | null;
|
|
98
|
+
kerningThreshold: number | null;
|
|
99
|
+
ligatures: EditorLigatures | null;
|
|
100
|
+
numberSpacing: EditorNumberSpacing | null;
|
|
101
|
+
numberForm: EditorNumberForm | null;
|
|
102
|
+
stylisticSet: number | null;
|
|
103
|
+
contextualAlternates: boolean;
|
|
104
|
+
}
|
|
105
|
+
export interface FontDialogProps {
|
|
106
|
+
isOpen: boolean;
|
|
107
|
+
initial: FontDialogInitialValues;
|
|
108
|
+
familyOptions: string[];
|
|
109
|
+
sizeOptions: number[];
|
|
110
|
+
onClose: () => void;
|
|
111
|
+
onApply: (values: FontDialogApplyValues, original: FontDialogInitialValues) => void;
|
|
112
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Accessor, JSX } from '../../../solid-js';
|
|
2
|
+
import { LayoutOptionsOverlay } from '../../../../../editorUiTypes.js';
|
|
3
|
+
|
|
4
|
+
/** Minimal box geometry (surface-relative) used to anchor the popup. */
|
|
5
|
+
export interface LayoutOptionsAnchorBox {
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FloatingLayoutOptionsProps {
|
|
12
|
+
box: Accessor<LayoutOptionsAnchorBox | null>;
|
|
13
|
+
layoutOptions: LayoutOptionsOverlay;
|
|
14
|
+
surfaceRef: () => HTMLElement | undefined;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare function FloatingLayoutOptions(props: FloatingLayoutOptionsProps): JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JSX } from '../../../solid-js';
|
|
2
|
-
import { MenubarHost } from '../../../menuRegistry.js';
|
|
2
|
+
import { MenuRegistry, MenubarHost } from '../../../menuRegistry.js';
|
|
3
3
|
|
|
4
4
|
export interface MenubarProps {
|
|
5
5
|
host: () => MenubarHost;
|
|
6
|
+
registry?: MenuRegistry;
|
|
6
7
|
}
|
|
7
8
|
export declare function Menubar(props: MenubarProps): JSX.Element;
|