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,192 @@
|
|
|
1
|
+
import { EditorBorderStyle, EditorDocxWidthValue, EditorEndnoteReferenceData, EditorFieldChar, EditorFieldData, EditorFootnoteReferenceData, EditorImageFloatingLayout, EditorImageRunData, EditorParagraphListStyle, EditorRevision, EditorTableRowHeightRule } from '../../../primitives.js';
|
|
2
|
+
import { EditorParagraphStyle, EditorTableStyle, EditorTextStyle } from '../../../styles.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Geometry/appearance of a text box shape (`wps:spPr`). All values are
|
|
6
|
+
* optional; an unset field means "inherit Word's default / leave as-is".
|
|
7
|
+
*/
|
|
8
|
+
export interface EditorTextBoxShape {
|
|
9
|
+
/** `a:prstGeom/@prst` preset geometry, e.g. "rect". */
|
|
10
|
+
preset?: string;
|
|
11
|
+
/** Solid fill color (`a:solidFill/a:srgbClr`) as `#RRGGBB`. */
|
|
12
|
+
fill?: string;
|
|
13
|
+
/** Outline color (`a:ln/a:solidFill/a:srgbClr`) as `#RRGGBB`. */
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
/** Outline width in points (`a:ln/@w`, originally EMU). */
|
|
16
|
+
borderWidthPt?: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Text body properties of a text box (`wps:bodyPr`): internal padding (insets),
|
|
20
|
+
* vertical anchoring and wrap behaviour.
|
|
21
|
+
*/
|
|
22
|
+
export interface EditorTextBoxBody {
|
|
23
|
+
/** Internal insets in px (`@lIns/@tIns/@rIns/@bIns`, originally EMU). */
|
|
24
|
+
paddingLeft?: number;
|
|
25
|
+
paddingTop?: number;
|
|
26
|
+
paddingRight?: number;
|
|
27
|
+
paddingBottom?: number;
|
|
28
|
+
/** `@anchor`: vertical anchor of the text (t/ctr/b). */
|
|
29
|
+
anchor?: string;
|
|
30
|
+
/** `@wrap`: text wrap mode inside the box (e.g. "square"). */
|
|
31
|
+
wrap?: string;
|
|
32
|
+
/** True when `a:spAutoFit` is present (auto-resize box to text). */
|
|
33
|
+
autoFit?: boolean;
|
|
34
|
+
/** `@vert`: text flow direction inside the box (DrawingML vertical text). */
|
|
35
|
+
vert?: "horz" | "vert" | "vert270" | "wordArtVert" | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A Word text box (`w:drawing` containing a `wps:wsp` WordprocessingShape with
|
|
39
|
+
* `wps:txbx/w:txbxContent`). Modeled as inline run content (analogous to
|
|
40
|
+
* `EditorImageRunData`): the owning run's text is the object replacement
|
|
41
|
+
* character `\uFFFC`. The text box's own content is a list of block nodes.
|
|
42
|
+
*/
|
|
43
|
+
export interface EditorTextBoxData {
|
|
44
|
+
/** Box width in px (`wp:extent/@cx`, originally EMU). */
|
|
45
|
+
width: number;
|
|
46
|
+
/** Box height in px (`wp:extent/@cy`, originally EMU). */
|
|
47
|
+
height: number;
|
|
48
|
+
/** Block content of `w:txbxContent` (paragraphs and/or tables). */
|
|
49
|
+
blocks: EditorBlockNode[];
|
|
50
|
+
/** Floating/anchor layout when the drawing is a `wp:anchor`. */
|
|
51
|
+
floating?: EditorImageFloatingLayout;
|
|
52
|
+
/** Shape rotation in degrees (`wps:spPr/a:xfrm/@rot`, originally 1/60000°). */
|
|
53
|
+
rotation?: number;
|
|
54
|
+
/** `wp:docPr/@name`. */
|
|
55
|
+
name?: string;
|
|
56
|
+
/** `wp:docPr/@descr` or `@title`. */
|
|
57
|
+
alt?: string;
|
|
58
|
+
shape?: EditorTextBoxShape;
|
|
59
|
+
body?: EditorTextBoxBody;
|
|
60
|
+
}
|
|
61
|
+
export interface EditorTextRun {
|
|
62
|
+
id: string;
|
|
63
|
+
text: string;
|
|
64
|
+
styles?: EditorTextStyle;
|
|
65
|
+
image?: EditorImageRunData;
|
|
66
|
+
textBox?: EditorTextBoxData;
|
|
67
|
+
field?: EditorFieldData;
|
|
68
|
+
/**
|
|
69
|
+
* Preserved complex-field control char (`w:fldChar`). Zero-length marker run;
|
|
70
|
+
* see {@link EditorFieldChar}.
|
|
71
|
+
*/
|
|
72
|
+
fieldChar?: EditorFieldChar;
|
|
73
|
+
/** Preserved field instruction text (`w:instrText`). Zero-length marker run. */
|
|
74
|
+
fieldInstruction?: string;
|
|
75
|
+
revision?: EditorRevision;
|
|
76
|
+
/**
|
|
77
|
+
* Inline marker of a footnote whose body lives in
|
|
78
|
+
* `EditorDocument.footnotes.items[footnoteReference.footnoteId]`.
|
|
79
|
+
*/
|
|
80
|
+
footnoteReference?: EditorFootnoteReferenceData;
|
|
81
|
+
/**
|
|
82
|
+
* Inline marker of an endnote whose body lives in
|
|
83
|
+
* `EditorDocument.endnotes.items[endnoteReference.endnoteId]`.
|
|
84
|
+
*/
|
|
85
|
+
endnoteReference?: EditorEndnoteReferenceData;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A drop cap (Word's `w:framePr/@dropCap`): a large initial letter sunk into
|
|
89
|
+
* the first lines of the paragraph, with body text wrapping around it. In OOXML
|
|
90
|
+
* the cap lives in a separate preceding frame paragraph; we attach it to the
|
|
91
|
+
* wrapping paragraph so the per-paragraph layout owns its own exclusion + glyph.
|
|
92
|
+
*/
|
|
93
|
+
export interface EditorDropCap {
|
|
94
|
+
/** Cap letter(s), e.g. "L". */
|
|
95
|
+
text: string;
|
|
96
|
+
/** `w:framePr/@lines` — number of body lines the cap spans (default 3). */
|
|
97
|
+
lines: number;
|
|
98
|
+
/** `w:framePr/@dropCap`: "drop" (in text) or "margin" (in the left margin). */
|
|
99
|
+
type: "drop" | "margin";
|
|
100
|
+
/** Cap run style: fontSize (`w:sz`), font, color, baselineShift (`w:position`). */
|
|
101
|
+
style?: EditorTextStyle;
|
|
102
|
+
}
|
|
103
|
+
export interface EditorParagraphNode {
|
|
104
|
+
id: string;
|
|
105
|
+
type: "paragraph";
|
|
106
|
+
runs: EditorTextRun[];
|
|
107
|
+
style?: EditorParagraphStyle;
|
|
108
|
+
list?: EditorParagraphListStyle;
|
|
109
|
+
/** Drop cap that body text in this paragraph wraps around, when present. */
|
|
110
|
+
dropCap?: EditorDropCap;
|
|
111
|
+
}
|
|
112
|
+
export interface EditorTableCellStyle {
|
|
113
|
+
shading?: string;
|
|
114
|
+
width?: number | string;
|
|
115
|
+
borderTop?: EditorBorderStyle;
|
|
116
|
+
borderRight?: EditorBorderStyle;
|
|
117
|
+
borderBottom?: EditorBorderStyle;
|
|
118
|
+
borderLeft?: EditorBorderStyle;
|
|
119
|
+
/** Bidi-aware leading/trailing borders (`w:start` / `w:end`). */
|
|
120
|
+
borderStart?: EditorBorderStyle;
|
|
121
|
+
borderEnd?: EditorBorderStyle;
|
|
122
|
+
/** Diagonal cell borders (`w:tl2br` / `w:tr2bl`). */
|
|
123
|
+
borderTopLeftToBottomRight?: EditorBorderStyle;
|
|
124
|
+
borderTopRightToBottomLeft?: EditorBorderStyle;
|
|
125
|
+
padding?: number;
|
|
126
|
+
paddingTop?: number;
|
|
127
|
+
paddingRight?: number;
|
|
128
|
+
paddingBottom?: number;
|
|
129
|
+
paddingLeft?: number;
|
|
130
|
+
/** Bidi-aware leading/trailing margins (`w:start` / `w:end`). */
|
|
131
|
+
paddingStart?: number;
|
|
132
|
+
paddingEnd?: number;
|
|
133
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
134
|
+
horizontalAlign?: "left" | "center" | "right" | "justify";
|
|
135
|
+
/** `w:tcPr/w:textDirection/@w:val`: cell text flow direction (vertical text). */
|
|
136
|
+
textDirection?: "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV" | null;
|
|
137
|
+
/** `w:noWrap`: prevent normal wrapping inside the cell. */
|
|
138
|
+
noWrap?: boolean;
|
|
139
|
+
/** `w:tcFitText`: request Word-style text fitting within the cell width. */
|
|
140
|
+
fitText?: boolean;
|
|
141
|
+
/** `w:hideMark`: hide the cell-end marker for layout. */
|
|
142
|
+
hideMark?: boolean;
|
|
143
|
+
/** `w:headers/@w:val`: semantic header cell references. */
|
|
144
|
+
headers?: string;
|
|
145
|
+
/** Preservation-only table-cell revision/property XML children. */
|
|
146
|
+
revisionXml?: string[];
|
|
147
|
+
}
|
|
148
|
+
export interface EditorTableCellNode {
|
|
149
|
+
id: string;
|
|
150
|
+
blocks: EditorParagraphNode[];
|
|
151
|
+
colSpan?: number;
|
|
152
|
+
rowSpan?: number;
|
|
153
|
+
vMerge?: "restart" | "continue";
|
|
154
|
+
style?: EditorTableCellStyle;
|
|
155
|
+
}
|
|
156
|
+
export interface EditorTableRowStyle {
|
|
157
|
+
height?: number | string;
|
|
158
|
+
heightRule?: EditorTableRowHeightRule;
|
|
159
|
+
gridBefore?: number;
|
|
160
|
+
gridAfter?: number;
|
|
161
|
+
widthBefore?: EditorDocxWidthValue;
|
|
162
|
+
widthAfter?: EditorDocxWidthValue;
|
|
163
|
+
/** `w:cantSplit`: keep this row together during pagination. */
|
|
164
|
+
cantSplit?: boolean;
|
|
165
|
+
/** `w:hidden`: do not display this row in normal view. */
|
|
166
|
+
hidden?: boolean;
|
|
167
|
+
/** Row-level cell spacing override (`w:trPr/w:tblCellSpacing`). */
|
|
168
|
+
cellSpacing?: EditorDocxWidthValue;
|
|
169
|
+
/** Preservation-only row revision/property XML children. */
|
|
170
|
+
revisionXml?: string[];
|
|
171
|
+
}
|
|
172
|
+
export interface EditorTableRowNode {
|
|
173
|
+
id: string;
|
|
174
|
+
cells: EditorTableCellNode[];
|
|
175
|
+
isHeader?: boolean;
|
|
176
|
+
style?: EditorTableRowStyle;
|
|
177
|
+
/**
|
|
178
|
+
* Raw w:tblPrEx XML (per-row table property exceptions), serialized verbatim
|
|
179
|
+
* before w:trPr. Preserved for DOCX round-trip fidelity only; not editable.
|
|
180
|
+
*/
|
|
181
|
+
tblPrExXml?: string;
|
|
182
|
+
}
|
|
183
|
+
export interface EditorTableNode {
|
|
184
|
+
id: string;
|
|
185
|
+
type: "table";
|
|
186
|
+
rows: EditorTableRowNode[];
|
|
187
|
+
gridCols?: number[];
|
|
188
|
+
style?: EditorTableStyle;
|
|
189
|
+
/** Preservation-only `w:tblGridChange` XML. */
|
|
190
|
+
tblGridChangeXml?: string;
|
|
191
|
+
}
|
|
192
|
+
export type EditorBlockNode = EditorParagraphNode | EditorTableNode;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Primitive building blocks shared across the editor model: borders, tabs,
|
|
3
|
+
* image run data, footnote references, revisions, fields, list styles.
|
|
4
|
+
* Kept dependency-free so it can be imported by every other model module
|
|
5
|
+
* without risk of circular imports.
|
|
6
|
+
*/
|
|
7
|
+
export type EditorUnderlineStyle = "single" | "double" | "thick" | "dotted" | "dottedHeavy" | "dash" | "dashedHeavy" | "dashLong" | "dashLongHeavy" | "dotDash" | "dashDotHeavy" | "dotDotDash" | "dashDotDotHeavy" | "wave" | "wavyHeavy" | "wavyDouble" | "words";
|
|
8
|
+
export type EditorLigatures = "none" | "standard" | "contextual" | "historical" | "standardContextual";
|
|
9
|
+
export type EditorNumberSpacing = "default" | "proportional" | "tabular";
|
|
10
|
+
export type EditorNumberForm = "default" | "lining" | "oldStyle";
|
|
11
|
+
export interface EditorTextLanguage {
|
|
12
|
+
value?: string | null;
|
|
13
|
+
eastAsia?: string | null;
|
|
14
|
+
bidi?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface EditorBorderStyle {
|
|
17
|
+
width: number;
|
|
18
|
+
type: "solid" | "dashed" | "dotted" | "none";
|
|
19
|
+
color: string;
|
|
20
|
+
}
|
|
21
|
+
export interface EditorTabStop {
|
|
22
|
+
position: number;
|
|
23
|
+
type: "left" | "center" | "right" | "decimal" | "bar" | "clear";
|
|
24
|
+
leader?: "none" | "dot" | "hyphen" | "underscore" | "heavy" | "middleDot";
|
|
25
|
+
}
|
|
26
|
+
export interface EditorParagraphListStyle {
|
|
27
|
+
kind: "bullet" | "ordered";
|
|
28
|
+
level?: number;
|
|
29
|
+
format?: "decimal" | "lowerLetter" | "upperLetter" | "lowerRoman" | "upperRoman" | "bullet";
|
|
30
|
+
startAt?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Separator between the list label and the paragraph text (`w:lvl/w:suff`).
|
|
33
|
+
* OOXML default is "tab"; Word renders the label, then advances to the next
|
|
34
|
+
* tab stop (or a space / nothing). Undefined is treated as "tab".
|
|
35
|
+
*/
|
|
36
|
+
suffix?: "tab" | "space" | "nothing";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Image crop, mapped from DrawingML `a:srcRect`. Values are fractions of the
|
|
40
|
+
* source image (0..1), where OOXML's thousandths-of-a-percent (`100000` = 100%)
|
|
41
|
+
* have already been normalized. Each side is the amount trimmed from that edge.
|
|
42
|
+
*/
|
|
43
|
+
export interface EditorImageCrop {
|
|
44
|
+
left?: number;
|
|
45
|
+
top?: number;
|
|
46
|
+
right?: number;
|
|
47
|
+
bottom?: number;
|
|
48
|
+
}
|
|
49
|
+
export type EditorImageFillMode = "stretch" | "tile";
|
|
50
|
+
export interface EditorImageFloatingPosition {
|
|
51
|
+
relativeFrom?: string;
|
|
52
|
+
align?: string;
|
|
53
|
+
offset?: number;
|
|
54
|
+
}
|
|
55
|
+
export interface EditorImageFloatingLayout {
|
|
56
|
+
type: "floating";
|
|
57
|
+
distT?: number;
|
|
58
|
+
distB?: number;
|
|
59
|
+
distL?: number;
|
|
60
|
+
distR?: number;
|
|
61
|
+
simplePos?: boolean;
|
|
62
|
+
relativeHeight?: number;
|
|
63
|
+
behindDoc?: boolean;
|
|
64
|
+
locked?: boolean;
|
|
65
|
+
layoutInCell?: boolean;
|
|
66
|
+
allowOverlap?: boolean;
|
|
67
|
+
positionH?: EditorImageFloatingPosition;
|
|
68
|
+
positionV?: EditorImageFloatingPosition;
|
|
69
|
+
wrap?: "none" | "square" | "tight" | "through" | "topAndBottom";
|
|
70
|
+
}
|
|
71
|
+
/** A point on the tight/through wrap contour, fractional (0..1) relative to the
|
|
72
|
+
* image bounding box with origin at the top-left corner. */
|
|
73
|
+
export interface EditorWrapPolygonPoint {
|
|
74
|
+
x: number;
|
|
75
|
+
y: number;
|
|
76
|
+
}
|
|
77
|
+
export interface EditorImageRunData {
|
|
78
|
+
src: string;
|
|
79
|
+
width: number;
|
|
80
|
+
height: number;
|
|
81
|
+
alt?: string;
|
|
82
|
+
linkedSrc?: string;
|
|
83
|
+
crop?: EditorImageCrop;
|
|
84
|
+
fillMode?: EditorImageFillMode;
|
|
85
|
+
rotation?: number;
|
|
86
|
+
flipH?: boolean;
|
|
87
|
+
flipV?: boolean;
|
|
88
|
+
floating?: EditorImageFloatingLayout;
|
|
89
|
+
/** Tight/through wrap outline (fractional 0..1). Auto-traced from the image
|
|
90
|
+
* alpha or round-tripped from OOXML <wp:wrapPolygon>. Absent ⇒ rectangular. */
|
|
91
|
+
wrapPolygon?: EditorWrapPolygonPoint[];
|
|
92
|
+
}
|
|
93
|
+
export interface EditorFieldData {
|
|
94
|
+
type: "PAGE" | "NUMPAGES";
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* A preserved complex-field control character (`w:fldChar`). Carried on a
|
|
98
|
+
* zero-length run so that fields the editor does not evaluate (REF, PAGEREF,
|
|
99
|
+
* TOC, and unknown fields) round-trip 1:1. The instruction text between a
|
|
100
|
+
* `begin` and `separate` is carried on sibling runs via
|
|
101
|
+
* {@link EditorTextRun.fieldInstruction}. A field may span multiple paragraphs
|
|
102
|
+
* (e.g. a TOC); document order reconstructs the structure on export.
|
|
103
|
+
*/
|
|
104
|
+
export interface EditorFieldChar {
|
|
105
|
+
kind: "begin" | "separate" | "end";
|
|
106
|
+
/** `w:fldChar/@w:fldLock`. */
|
|
107
|
+
fieldLock?: boolean;
|
|
108
|
+
/** `w:fldChar/@w:dirty`. */
|
|
109
|
+
dirty?: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface EditorFootnoteReferenceData {
|
|
112
|
+
footnoteId: string;
|
|
113
|
+
customMark?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface EditorEndnoteReferenceData {
|
|
116
|
+
endnoteId: string;
|
|
117
|
+
customMark?: string;
|
|
118
|
+
}
|
|
119
|
+
export interface EditorRevision {
|
|
120
|
+
id: string;
|
|
121
|
+
type: "insert" | "delete";
|
|
122
|
+
author: string;
|
|
123
|
+
date: number;
|
|
124
|
+
}
|
|
125
|
+
export interface EditorAsset {
|
|
126
|
+
id: string;
|
|
127
|
+
url: string;
|
|
128
|
+
}
|
|
129
|
+
export declare const EDITOR_ASSET_REF_PREFIX = "asset:";
|
|
130
|
+
export type EditorFootnoteNumberFormat = "decimal" | "lowerRoman" | "upperRoman" | "lowerLetter" | "upperLetter" | "symbol";
|
|
131
|
+
export type EditorFootnoteRestart = "continuous" | "eachSection";
|
|
132
|
+
/**
|
|
133
|
+
* A DOCX width-like value.
|
|
134
|
+
* - number: points, serialized as w:type="dxa"
|
|
135
|
+
* - "NN%": percentage, serialized as w:type="pct"
|
|
136
|
+
* - "auto": serialized as w:type="auto" w:w="0"
|
|
137
|
+
*/
|
|
138
|
+
export type EditorDocxWidthValue = number | string;
|
|
139
|
+
export type EditorTableLayout = "fixed" | "autofit";
|
|
140
|
+
export type EditorTableRowHeightRule = "auto" | "exact" | "atLeast";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Selection and editing-zone types. Kept separate from document data so
|
|
3
|
+
* editor-state modules can depend on them without pulling the whole document.
|
|
4
|
+
*/
|
|
5
|
+
export interface EditorPosition {
|
|
6
|
+
paragraphId: string;
|
|
7
|
+
runId: string;
|
|
8
|
+
offset: number;
|
|
9
|
+
}
|
|
10
|
+
export interface EditorSelection {
|
|
11
|
+
anchor: EditorPosition;
|
|
12
|
+
focus: EditorPosition;
|
|
13
|
+
}
|
|
14
|
+
export type EditorEditingZone = "main" | "header" | "footer" | "footnote";
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { EditorBorderStyle, EditorDocxWidthValue, EditorLigatures, EditorNumberForm, EditorNumberSpacing, EditorTabStop, EditorTextLanguage, EditorUnderlineStyle } from '../../../primitives.js';
|
|
2
|
+
|
|
3
|
+
export interface EditorTextStyle {
|
|
4
|
+
styleId?: string;
|
|
5
|
+
bold?: boolean;
|
|
6
|
+
italic?: boolean;
|
|
7
|
+
underline?: boolean;
|
|
8
|
+
underlineStyle?: EditorUnderlineStyle | null;
|
|
9
|
+
underlineColor?: string | null;
|
|
10
|
+
strike?: boolean;
|
|
11
|
+
doubleStrike?: boolean;
|
|
12
|
+
superscript?: boolean;
|
|
13
|
+
subscript?: boolean;
|
|
14
|
+
smallCaps?: boolean;
|
|
15
|
+
allCaps?: boolean;
|
|
16
|
+
hidden?: boolean;
|
|
17
|
+
noProof?: boolean;
|
|
18
|
+
webHidden?: boolean;
|
|
19
|
+
specVanish?: boolean;
|
|
20
|
+
textEffect?: string | null;
|
|
21
|
+
characterScale?: number | null;
|
|
22
|
+
characterSpacing?: number | null;
|
|
23
|
+
baselineShift?: number | null;
|
|
24
|
+
kerningThreshold?: number | null;
|
|
25
|
+
ligatures?: EditorLigatures | null;
|
|
26
|
+
numberSpacing?: EditorNumberSpacing | null;
|
|
27
|
+
numberForm?: EditorNumberForm | null;
|
|
28
|
+
stylisticSet?: number | null;
|
|
29
|
+
contextualAlternates?: boolean;
|
|
30
|
+
fontFamily?: string | null;
|
|
31
|
+
fontSize?: number | null;
|
|
32
|
+
color?: string | null;
|
|
33
|
+
highlight?: string | null;
|
|
34
|
+
shading?: string | null;
|
|
35
|
+
language?: EditorTextLanguage | null;
|
|
36
|
+
link?: string | null;
|
|
37
|
+
}
|
|
38
|
+
export interface EditorParagraphStyle {
|
|
39
|
+
styleId?: string;
|
|
40
|
+
align?: "left" | "center" | "right" | "justify";
|
|
41
|
+
spacingBefore?: number | null;
|
|
42
|
+
spacingAfter?: number | null;
|
|
43
|
+
contextualSpacing?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Line spacing value. Interpretation depends on `lineRule`:
|
|
46
|
+
* - `auto`/absent: multiplier of single line spacing (e.g. 1.15).
|
|
47
|
+
* - `exact`/`atLeast`: absolute height in px.
|
|
48
|
+
*/
|
|
49
|
+
lineHeight?: number | null;
|
|
50
|
+
/** `w:spacing/@w:lineRule`. Defaults to `auto` (multiplier) when absent. */
|
|
51
|
+
lineRule?: "auto" | "exact" | "atLeast" | null;
|
|
52
|
+
lineGridPitch?: number | null;
|
|
53
|
+
lineGridType?: "lines" | "linesAndChars" | "snapToChars" | null;
|
|
54
|
+
snapToGrid?: boolean;
|
|
55
|
+
indentLeft?: number | null;
|
|
56
|
+
indentRight?: number | null;
|
|
57
|
+
indentFirstLine?: number | null;
|
|
58
|
+
indentHanging?: number | null;
|
|
59
|
+
shading?: string | null;
|
|
60
|
+
borderTop?: EditorBorderStyle | null;
|
|
61
|
+
borderRight?: EditorBorderStyle | null;
|
|
62
|
+
borderBottom?: EditorBorderStyle | null;
|
|
63
|
+
borderLeft?: EditorBorderStyle | null;
|
|
64
|
+
tabs?: EditorTabStop[] | null;
|
|
65
|
+
pageBreakBefore?: boolean;
|
|
66
|
+
keepWithNext?: boolean;
|
|
67
|
+
keepLinesTogether?: boolean;
|
|
68
|
+
widowControl?: boolean;
|
|
69
|
+
/** `w:textDirection/@w:val`: paragraph flow direction (vertical text). */
|
|
70
|
+
textDirection?: "lrTb" | "tbRl" | "btLr" | "lrTbV" | "tbRlV" | null;
|
|
71
|
+
}
|
|
72
|
+
/** Row properties from a conditional format's `w:trPr`. */
|
|
73
|
+
export interface EditorConditionalRowStyle {
|
|
74
|
+
height?: number | string;
|
|
75
|
+
heightRule?: "auto" | "exact" | "atLeast";
|
|
76
|
+
cantSplit?: boolean;
|
|
77
|
+
hidden?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface EditorTableConditionalFormat {
|
|
80
|
+
shading?: string;
|
|
81
|
+
/** Run formatting (bold/color) from the conditional's `w:rPr`. */
|
|
82
|
+
textStyle?: EditorTextStyle;
|
|
83
|
+
/** Cell borders from the conditional's `w:tcPr/w:tcBorders`. */
|
|
84
|
+
borders?: {
|
|
85
|
+
borderTop?: EditorBorderStyle;
|
|
86
|
+
borderRight?: EditorBorderStyle;
|
|
87
|
+
borderBottom?: EditorBorderStyle;
|
|
88
|
+
borderLeft?: EditorBorderStyle;
|
|
89
|
+
};
|
|
90
|
+
/** Paragraph properties from the conditional's `w:pPr`. */
|
|
91
|
+
paragraphStyle?: EditorParagraphStyle;
|
|
92
|
+
/** Row properties from the conditional's `w:trPr`. */
|
|
93
|
+
rowStyle?: EditorConditionalRowStyle;
|
|
94
|
+
}
|
|
95
|
+
export interface EditorTableStyle {
|
|
96
|
+
styleId?: string;
|
|
97
|
+
width?: EditorDocxWidthValue;
|
|
98
|
+
align?: "left" | "center" | "right";
|
|
99
|
+
indentLeft?: EditorDocxWidthValue;
|
|
100
|
+
layout?: "fixed" | "autofit";
|
|
101
|
+
cellSpacing?: EditorDocxWidthValue;
|
|
102
|
+
pageBreakBefore?: boolean;
|
|
103
|
+
/** `w:bidiVisual`: visually order table columns right-to-left. */
|
|
104
|
+
bidiVisual?: boolean;
|
|
105
|
+
/** `w:tblOverlap/@w:val`: floating-table overlap behavior. */
|
|
106
|
+
tblOverlap?: string;
|
|
107
|
+
/** `w:tblCellMar`: default margins for cells unless overridden by `w:tcMar`. */
|
|
108
|
+
defaultCellMargins?: {
|
|
109
|
+
top?: number;
|
|
110
|
+
right?: number;
|
|
111
|
+
bottom?: number;
|
|
112
|
+
left?: number;
|
|
113
|
+
start?: number;
|
|
114
|
+
end?: number;
|
|
115
|
+
};
|
|
116
|
+
/** Raw `w:tblpPr` attributes for floating table round-trip preservation. */
|
|
117
|
+
floating?: Record<string, string>;
|
|
118
|
+
/** Table alt text title, corresponding to Word's table properties Alt Text title. */
|
|
119
|
+
altTitle?: string;
|
|
120
|
+
/** Table alt text description, corresponding to Word's table properties Alt Text description. */
|
|
121
|
+
altDescription?: string;
|
|
122
|
+
/** Preservation-only table revision/property XML children. */
|
|
123
|
+
revisionXml?: string[];
|
|
124
|
+
/** `w:tblStyleRowBandSize` — rows per horizontal band (default 1). */
|
|
125
|
+
rowBandSize?: number;
|
|
126
|
+
/** `w:tblStyleColBandSize` — columns per vertical band (default 1). */
|
|
127
|
+
colBandSize?: number;
|
|
128
|
+
/** Keyed by conditional type ("firstRow", "lastRow", "band1Horz", etc.). */
|
|
129
|
+
conditionalFormats?: Record<string, EditorTableConditionalFormat>;
|
|
130
|
+
/** `w:tblLook` flags from the instance table; preserved for re-export. */
|
|
131
|
+
tblLook?: {
|
|
132
|
+
firstRow: boolean;
|
|
133
|
+
lastRow: boolean;
|
|
134
|
+
firstCol: boolean;
|
|
135
|
+
lastCol: boolean;
|
|
136
|
+
noHBand: boolean;
|
|
137
|
+
noVBand: boolean;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export interface EditorNamedStyle {
|
|
141
|
+
id: string;
|
|
142
|
+
name: string;
|
|
143
|
+
type: "paragraph" | "character" | "table";
|
|
144
|
+
basedOn?: string;
|
|
145
|
+
nextStyle?: string;
|
|
146
|
+
paragraphStyle?: EditorParagraphStyle;
|
|
147
|
+
textStyle?: EditorTextStyle;
|
|
148
|
+
tableStyle?: EditorTableStyle;
|
|
149
|
+
}
|