roosterjs-content-model-dom 0.10.0
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/LICENSE +25 -0
- package/README.md +307 -0
- package/lib/domToModel/context/createDomToModelContext.d.ts +7 -0
- package/lib/domToModel/context/createDomToModelContext.js +65 -0
- package/lib/domToModel/context/createDomToModelContext.js.map +1 -0
- package/lib/domToModel/context/defaultProcessors.d.ts +5 -0
- package/lib/domToModel/context/defaultProcessors.js +64 -0
- package/lib/domToModel/context/defaultProcessors.js.map +1 -0
- package/lib/domToModel/domToContentModel.d.ts +9 -0
- package/lib/domToModel/domToContentModel.js +32 -0
- package/lib/domToModel/domToContentModel.js.map +1 -0
- package/lib/domToModel/processors/blockProcessor.d.ts +5 -0
- package/lib/domToModel/processors/blockProcessor.js +31 -0
- package/lib/domToModel/processors/blockProcessor.js.map +1 -0
- package/lib/domToModel/processors/brProcessor.d.ts +5 -0
- package/lib/domToModel/processors/brProcessor.js +17 -0
- package/lib/domToModel/processors/brProcessor.js.map +1 -0
- package/lib/domToModel/processors/childProcessor.d.ts +25 -0
- package/lib/domToModel/processors/childProcessor.js +62 -0
- package/lib/domToModel/processors/childProcessor.js.map +1 -0
- package/lib/domToModel/processors/codeProcessor.d.ts +5 -0
- package/lib/domToModel/processors/codeProcessor.js +17 -0
- package/lib/domToModel/processors/codeProcessor.js.map +1 -0
- package/lib/domToModel/processors/delimiterProcessor.d.ts +8 -0
- package/lib/domToModel/processors/delimiterProcessor.js +23 -0
- package/lib/domToModel/processors/delimiterProcessor.js.map +1 -0
- package/lib/domToModel/processors/elementProcessor.d.ts +8 -0
- package/lib/domToModel/processors/elementProcessor.js +30 -0
- package/lib/domToModel/processors/elementProcessor.js.map +1 -0
- package/lib/domToModel/processors/entityProcessor.d.ts +8 -0
- package/lib/domToModel/processors/entityProcessor.js +43 -0
- package/lib/domToModel/processors/entityProcessor.js.map +1 -0
- package/lib/domToModel/processors/fontProcessor.d.ts +5 -0
- package/lib/domToModel/processors/fontProcessor.js +48 -0
- package/lib/domToModel/processors/fontProcessor.js.map +1 -0
- package/lib/domToModel/processors/formatContainerProcessor.d.ts +9 -0
- package/lib/domToModel/processors/formatContainerProcessor.js +71 -0
- package/lib/domToModel/processors/formatContainerProcessor.js.map +1 -0
- package/lib/domToModel/processors/generalProcessor.d.ts +5 -0
- package/lib/domToModel/processors/generalProcessor.js +50 -0
- package/lib/domToModel/processors/generalProcessor.js.map +1 -0
- package/lib/domToModel/processors/headingProcessor.d.ts +5 -0
- package/lib/domToModel/processors/headingProcessor.js +23 -0
- package/lib/domToModel/processors/headingProcessor.js.map +1 -0
- package/lib/domToModel/processors/hrProcessor.d.ts +5 -0
- package/lib/domToModel/processors/hrProcessor.js +27 -0
- package/lib/domToModel/processors/hrProcessor.js.map +1 -0
- package/lib/domToModel/processors/imageProcessor.d.ts +5 -0
- package/lib/domToModel/processors/imageProcessor.js +41 -0
- package/lib/domToModel/processors/imageProcessor.js.map +1 -0
- package/lib/domToModel/processors/knownElementProcessor.d.ts +5 -0
- package/lib/domToModel/processors/knownElementProcessor.js +96 -0
- package/lib/domToModel/processors/knownElementProcessor.js.map +1 -0
- package/lib/domToModel/processors/linkProcessor.d.ts +5 -0
- package/lib/domToModel/processors/linkProcessor.js +24 -0
- package/lib/domToModel/processors/linkProcessor.js.map +1 -0
- package/lib/domToModel/processors/listItemProcessor.d.ts +5 -0
- package/lib/domToModel/processors/listItemProcessor.js +39 -0
- package/lib/domToModel/processors/listItemProcessor.js.map +1 -0
- package/lib/domToModel/processors/listProcessor.d.ts +5 -0
- package/lib/domToModel/processors/listProcessor.js +42 -0
- package/lib/domToModel/processors/listProcessor.js.map +1 -0
- package/lib/domToModel/processors/pProcessor.d.ts +5 -0
- package/lib/domToModel/processors/pProcessor.js +24 -0
- package/lib/domToModel/processors/pProcessor.js.map +1 -0
- package/lib/domToModel/processors/tableProcessor.d.ts +19 -0
- package/lib/domToModel/processors/tableProcessor.js +164 -0
- package/lib/domToModel/processors/tableProcessor.js.map +1 -0
- package/lib/domToModel/processors/textProcessor.d.ts +5 -0
- package/lib/domToModel/processors/textProcessor.js +62 -0
- package/lib/domToModel/processors/textProcessor.js.map +1 -0
- package/lib/domToModel/utils/addSelectionMarker.d.ts +5 -0
- package/lib/domToModel/utils/addSelectionMarker.js +16 -0
- package/lib/domToModel/utils/addSelectionMarker.js.map +1 -0
- package/lib/domToModel/utils/areSameFormats.d.ts +7 -0
- package/lib/domToModel/utils/areSameFormats.js +21 -0
- package/lib/domToModel/utils/areSameFormats.js.map +1 -0
- package/lib/domToModel/utils/getBoundingClientRect.d.ts +4 -0
- package/lib/domToModel/utils/getBoundingClientRect.js +11 -0
- package/lib/domToModel/utils/getBoundingClientRect.js.map +1 -0
- package/lib/domToModel/utils/getDefaultStyle.d.ts +9 -0
- package/lib/domToModel/utils/getDefaultStyle.js +16 -0
- package/lib/domToModel/utils/getDefaultStyle.js.map +1 -0
- package/lib/domToModel/utils/getRegularSelectionOffsets.d.ts +9 -0
- package/lib/domToModel/utils/getRegularSelectionOffsets.js +22 -0
- package/lib/domToModel/utils/getRegularSelectionOffsets.js.map +1 -0
- package/lib/domToModel/utils/isBlockElement.d.ts +8 -0
- package/lib/domToModel/utils/isBlockElement.js +17 -0
- package/lib/domToModel/utils/isBlockElement.js.map +1 -0
- package/lib/domToModel/utils/parseFormat.d.ts +9 -0
- package/lib/domToModel/utils/parseFormat.js +19 -0
- package/lib/domToModel/utils/parseFormat.js.map +1 -0
- package/lib/domToModel/utils/stackFormat.d.ts +15 -0
- package/lib/domToModel/utils/stackFormat.js +112 -0
- package/lib/domToModel/utils/stackFormat.js.map +1 -0
- package/lib/domUtils/isNodeOfType.d.ts +44 -0
- package/lib/domUtils/isNodeOfType.js +13 -0
- package/lib/domUtils/isNodeOfType.js.map +1 -0
- package/lib/domUtils/metadata/updateListMetadata.d.ts +8 -0
- package/lib/domUtils/metadata/updateListMetadata.js +20 -0
- package/lib/domUtils/metadata/updateListMetadata.js.map +1 -0
- package/lib/domUtils/metadata/updateMetadata.d.ts +15 -0
- package/lib/domUtils/metadata/updateMetadata.js +43 -0
- package/lib/domUtils/metadata/updateMetadata.js.map +1 -0
- package/lib/domUtils/stringUtil.d.ts +24 -0
- package/lib/domUtils/stringUtil.js +47 -0
- package/lib/domUtils/stringUtil.js.map +1 -0
- package/lib/formatHandlers/FormatHandler.d.ts +15 -0
- package/lib/formatHandlers/FormatHandler.js +3 -0
- package/lib/formatHandlers/FormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/directionFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/directionFormatHandler.js +20 -0
- package/lib/formatHandlers/block/directionFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/displayFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/displayFormatHandler.js +20 -0
- package/lib/formatHandlers/block/displayFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/htmlAlignFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/htmlAlignFormatHandler.js +26 -0
- package/lib/formatHandlers/block/htmlAlignFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/lineHeightFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/lineHeightFormatHandler.js +20 -0
- package/lib/formatHandlers/block/lineHeightFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/marginFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/marginFormatHandler.js +45 -0
- package/lib/formatHandlers/block/marginFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/paddingFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/paddingFormatHandler.js +31 -0
- package/lib/formatHandlers/block/paddingFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/textAlignFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/textAlignFormatHandler.js +41 -0
- package/lib/formatHandlers/block/textAlignFormatHandler.js.map +1 -0
- package/lib/formatHandlers/block/whiteSpaceFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/block/whiteSpaceFormatHandler.js +21 -0
- package/lib/formatHandlers/block/whiteSpaceFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/backgroundColorFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/backgroundColorFormatHandler.js +21 -0
- package/lib/formatHandlers/common/backgroundColorFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/borderBoxFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/borderBoxFormatHandler.js +20 -0
- package/lib/formatHandlers/common/borderBoxFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/borderFormatHandler.d.ts +10 -0
- package/lib/formatHandlers/common/borderFormatHandler.js +35 -0
- package/lib/formatHandlers/common/borderFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/boxShadowFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/boxShadowFormatHandler.js +20 -0
- package/lib/formatHandlers/common/boxShadowFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/datasetFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/datasetFormatHandler.js +21 -0
- package/lib/formatHandlers/common/datasetFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/idFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/idFormatHandler.js +19 -0
- package/lib/formatHandlers/common/idFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/sizeFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/sizeFormatHandler.js +65 -0
- package/lib/formatHandlers/common/sizeFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/verticalAlignFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/verticalAlignFormatHandler.js +31 -0
- package/lib/formatHandlers/common/verticalAlignFormatHandler.js.map +1 -0
- package/lib/formatHandlers/common/wordBreakFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/common/wordBreakFormatHandler.js +20 -0
- package/lib/formatHandlers/common/wordBreakFormatHandler.js.map +1 -0
- package/lib/formatHandlers/defaultFormatHandlers.d.ts +17 -0
- package/lib/formatHandlers/defaultFormatHandlers.js +224 -0
- package/lib/formatHandlers/defaultFormatHandlers.js.map +1 -0
- package/lib/formatHandlers/list/listItemMetadataFormatHandler.d.ts +11 -0
- package/lib/formatHandlers/list/listItemMetadataFormatHandler.js +102 -0
- package/lib/formatHandlers/list/listItemMetadataFormatHandler.js.map +1 -0
- package/lib/formatHandlers/list/listItemThreadFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/list/listItemThreadFormatHandler.js +46 -0
- package/lib/formatHandlers/list/listItemThreadFormatHandler.js.map +1 -0
- package/lib/formatHandlers/list/listLevelMetadataFormatHandler.d.ts +15 -0
- package/lib/formatHandlers/list/listLevelMetadataFormatHandler.js +88 -0
- package/lib/formatHandlers/list/listLevelMetadataFormatHandler.js.map +1 -0
- package/lib/formatHandlers/list/listLevelThreadFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/list/listLevelThreadFormatHandler.js +37 -0
- package/lib/formatHandlers/list/listLevelThreadFormatHandler.js.map +1 -0
- package/lib/formatHandlers/list/listStylePositionFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/list/listStylePositionFormatHandler.js +20 -0
- package/lib/formatHandlers/list/listStylePositionFormatHandler.js.map +1 -0
- package/lib/formatHandlers/list/listTypeFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/list/listTypeFormatHandler.js +17 -0
- package/lib/formatHandlers/list/listTypeFormatHandler.js.map +1 -0
- package/lib/formatHandlers/root/rootDirectionFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/root/rootDirectionFormatHandler.js +17 -0
- package/lib/formatHandlers/root/rootDirectionFormatHandler.js.map +1 -0
- package/lib/formatHandlers/root/zoomScaleFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/root/zoomScaleFormatHandler.js +18 -0
- package/lib/formatHandlers/root/zoomScaleFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/boldFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/boldFormatHandler.js +33 -0
- package/lib/formatHandlers/segment/boldFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/fontFamilyFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/fontFamilyFormatHandler.js +20 -0
- package/lib/formatHandlers/segment/fontFamilyFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/fontSizeFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/fontSizeFormatHandler.js +24 -0
- package/lib/formatHandlers/segment/fontSizeFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/italicFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/italicFormatHandler.js +35 -0
- package/lib/formatHandlers/segment/italicFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/letterSpacingFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/letterSpacingFormatHandler.js +20 -0
- package/lib/formatHandlers/segment/letterSpacingFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/linkFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/linkFormatHandler.js +65 -0
- package/lib/formatHandlers/segment/linkFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/strikeFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/strikeFormatHandler.js +23 -0
- package/lib/formatHandlers/segment/strikeFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/superOrSubScriptFormatHandler.d.ts +10 -0
- package/lib/formatHandlers/segment/superOrSubScriptFormatHandler.js +43 -0
- package/lib/formatHandlers/segment/superOrSubScriptFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/textColorFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/textColorFormatHandler.js +22 -0
- package/lib/formatHandlers/segment/textColorFormatHandler.js.map +1 -0
- package/lib/formatHandlers/segment/underlineFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/segment/underlineFormatHandler.js +35 -0
- package/lib/formatHandlers/segment/underlineFormatHandler.js.map +1 -0
- package/lib/formatHandlers/table/tableLayoutFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/table/tableLayoutFormatHandler.js +20 -0
- package/lib/formatHandlers/table/tableLayoutFormatHandler.js.map +1 -0
- package/lib/formatHandlers/table/tableSpacingFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/table/tableSpacingFormatHandler.js +22 -0
- package/lib/formatHandlers/table/tableSpacingFormatHandler.js.map +1 -0
- package/lib/formatHandlers/table/textColorOnTableCellFormatHandler.d.ts +6 -0
- package/lib/formatHandlers/table/textColorOnTableCellFormatHandler.js +18 -0
- package/lib/formatHandlers/table/textColorOnTableCellFormatHandler.js.map +1 -0
- package/lib/formatHandlers/utils/color.d.ts +9 -0
- package/lib/formatHandlers/utils/color.js +55 -0
- package/lib/formatHandlers/utils/color.js.map +1 -0
- package/lib/formatHandlers/utils/defaultStyles.d.ts +15 -0
- package/lib/formatHandlers/utils/defaultStyles.js +192 -0
- package/lib/formatHandlers/utils/defaultStyles.js.map +1 -0
- package/lib/formatHandlers/utils/dir.d.ts +29 -0
- package/lib/formatHandlers/utils/dir.js +51 -0
- package/lib/formatHandlers/utils/dir.js.map +1 -0
- package/lib/formatHandlers/utils/parseValueWithUnit.d.ts +7 -0
- package/lib/formatHandlers/utils/parseValueWithUnit.js +60 -0
- package/lib/formatHandlers/utils/parseValueWithUnit.js.map +1 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.js +89 -0
- package/lib/index.js.map +1 -0
- package/lib/modelApi/block/setParagraphNotImplicit.d.ts +6 -0
- package/lib/modelApi/block/setParagraphNotImplicit.js +14 -0
- package/lib/modelApi/block/setParagraphNotImplicit.js.map +1 -0
- package/lib/modelApi/common/addBlock.d.ts +7 -0
- package/lib/modelApi/common/addBlock.js +13 -0
- package/lib/modelApi/common/addBlock.js.map +1 -0
- package/lib/modelApi/common/addDecorators.d.ts +15 -0
- package/lib/modelApi/common/addDecorators.js +38 -0
- package/lib/modelApi/common/addDecorators.js.map +1 -0
- package/lib/modelApi/common/addSegment.d.ts +8 -0
- package/lib/modelApi/common/addSegment.js +36 -0
- package/lib/modelApi/common/addSegment.js.map +1 -0
- package/lib/modelApi/common/isEmpty.d.ts +17 -0
- package/lib/modelApi/common/isEmpty.js +80 -0
- package/lib/modelApi/common/isEmpty.js.map +1 -0
- package/lib/modelApi/common/isGeneralSegment.d.ts +6 -0
- package/lib/modelApi/common/isGeneralSegment.js +13 -0
- package/lib/modelApi/common/isGeneralSegment.js.map +1 -0
- package/lib/modelApi/common/isWhiteSpacePreserved.d.ts +6 -0
- package/lib/modelApi/common/isWhiteSpacePreserved.js +16 -0
- package/lib/modelApi/common/isWhiteSpacePreserved.js.map +1 -0
- package/lib/modelApi/common/normalizeContentModel.d.ts +11 -0
- package/lib/modelApi/common/normalizeContentModel.js +48 -0
- package/lib/modelApi/common/normalizeContentModel.js.map +1 -0
- package/lib/modelApi/common/normalizeParagraph.d.ts +5 -0
- package/lib/modelApi/common/normalizeParagraph.js +43 -0
- package/lib/modelApi/common/normalizeParagraph.js.map +1 -0
- package/lib/modelApi/common/normalizeSegment.d.ts +29 -0
- package/lib/modelApi/common/normalizeSegment.js +110 -0
- package/lib/modelApi/common/normalizeSegment.js.map +1 -0
- package/lib/modelApi/common/unwrapBlock.d.ts +7 -0
- package/lib/modelApi/common/unwrapBlock.js +21 -0
- package/lib/modelApi/common/unwrapBlock.js.map +1 -0
- package/lib/modelApi/creators/createBr.d.ts +6 -0
- package/lib/modelApi/creators/createBr.js +16 -0
- package/lib/modelApi/creators/createBr.js.map +1 -0
- package/lib/modelApi/creators/createContentModelDocument.d.ts +6 -0
- package/lib/modelApi/creators/createContentModelDocument.js +19 -0
- package/lib/modelApi/creators/createContentModelDocument.js.map +1 -0
- package/lib/modelApi/creators/createDivider.d.ts +7 -0
- package/lib/modelApi/creators/createDivider.js +18 -0
- package/lib/modelApi/creators/createDivider.js.map +1 -0
- package/lib/modelApi/creators/createEntity.d.ts +10 -0
- package/lib/modelApi/creators/createEntity.js +25 -0
- package/lib/modelApi/creators/createEntity.js.map +1 -0
- package/lib/modelApi/creators/createFormatContainer.d.ts +7 -0
- package/lib/modelApi/creators/createFormatContainer.js +20 -0
- package/lib/modelApi/creators/createFormatContainer.js.map +1 -0
- package/lib/modelApi/creators/createGeneralBlock.d.ts +6 -0
- package/lib/modelApi/creators/createGeneralBlock.js +18 -0
- package/lib/modelApi/creators/createGeneralBlock.js.map +1 -0
- package/lib/modelApi/creators/createGeneralSegment.d.ts +7 -0
- package/lib/modelApi/creators/createGeneralSegment.js +21 -0
- package/lib/modelApi/creators/createGeneralSegment.js.map +1 -0
- package/lib/modelApi/creators/createImage.d.ts +7 -0
- package/lib/modelApi/creators/createImage.js +19 -0
- package/lib/modelApi/creators/createImage.js.map +1 -0
- package/lib/modelApi/creators/createListItem.d.ts +7 -0
- package/lib/modelApi/creators/createListItem.js +22 -0
- package/lib/modelApi/creators/createListItem.js.map +1 -0
- package/lib/modelApi/creators/createParagraph.d.ts +9 -0
- package/lib/modelApi/creators/createParagraph.js +33 -0
- package/lib/modelApi/creators/createParagraph.js.map +1 -0
- package/lib/modelApi/creators/createParagraphDecorator.d.ts +7 -0
- package/lib/modelApi/creators/createParagraphDecorator.js +17 -0
- package/lib/modelApi/creators/createParagraphDecorator.js.map +1 -0
- package/lib/modelApi/creators/createSelectionMarker.d.ts +6 -0
- package/lib/modelApi/creators/createSelectionMarker.js +17 -0
- package/lib/modelApi/creators/createSelectionMarker.js.map +1 -0
- package/lib/modelApi/creators/createTable.d.ts +7 -0
- package/lib/modelApi/creators/createTable.js +28 -0
- package/lib/modelApi/creators/createTable.js.map +1 -0
- package/lib/modelApi/creators/createTableCell.d.ts +9 -0
- package/lib/modelApi/creators/createTableCell.js +26 -0
- package/lib/modelApi/creators/createTableCell.js.map +1 -0
- package/lib/modelApi/creators/createText.d.ts +7 -0
- package/lib/modelApi/creators/createText.js +18 -0
- package/lib/modelApi/creators/createText.js.map +1 -0
- package/lib/modelToDom/contentModelToDom.d.ts +17 -0
- package/lib/modelToDom/contentModelToDom.js +85 -0
- package/lib/modelToDom/contentModelToDom.js.map +1 -0
- package/lib/modelToDom/context/createModelToDomContext.d.ts +7 -0
- package/lib/modelToDom/context/createModelToDomContext.js +26 -0
- package/lib/modelToDom/context/createModelToDomContext.js.map +1 -0
- package/lib/modelToDom/context/defaultContentModelHandlers.d.ts +5 -0
- package/lib/modelToDom/context/defaultContentModelHandlers.js +39 -0
- package/lib/modelToDom/context/defaultContentModelHandlers.js.map +1 -0
- package/lib/modelToDom/handlers/handleBlock.d.ts +5 -0
- package/lib/modelToDom/handlers/handleBlock.js +39 -0
- package/lib/modelToDom/handlers/handleBlock.js.map +1 -0
- package/lib/modelToDom/handlers/handleBlockGroupChildren.d.ts +5 -0
- package/lib/modelToDom/handlers/handleBlockGroupChildren.js +37 -0
- package/lib/modelToDom/handlers/handleBlockGroupChildren.js.map +1 -0
- package/lib/modelToDom/handlers/handleBr.d.ts +5 -0
- package/lib/modelToDom/handlers/handleBr.js +16 -0
- package/lib/modelToDom/handlers/handleBr.js.map +1 -0
- package/lib/modelToDom/handlers/handleDivider.d.ts +5 -0
- package/lib/modelToDom/handlers/handleDivider.js +28 -0
- package/lib/modelToDom/handlers/handleDivider.js.map +1 -0
- package/lib/modelToDom/handlers/handleEntity.d.ts +5 -0
- package/lib/modelToDom/handlers/handleEntity.js +40 -0
- package/lib/modelToDom/handlers/handleEntity.js.map +1 -0
- package/lib/modelToDom/handlers/handleFormatContainer.d.ts +5 -0
- package/lib/modelToDom/handlers/handleFormatContainer.js +43 -0
- package/lib/modelToDom/handlers/handleFormatContainer.js.map +1 -0
- package/lib/modelToDom/handlers/handleGeneralModel.d.ts +5 -0
- package/lib/modelToDom/handlers/handleGeneralModel.js +34 -0
- package/lib/modelToDom/handlers/handleGeneralModel.js.map +1 -0
- package/lib/modelToDom/handlers/handleImage.d.ts +5 -0
- package/lib/modelToDom/handlers/handleImage.js +41 -0
- package/lib/modelToDom/handlers/handleImage.js.map +1 -0
- package/lib/modelToDom/handlers/handleList.d.ts +5 -0
- package/lib/modelToDom/handlers/handleList.js +58 -0
- package/lib/modelToDom/handlers/handleList.js.map +1 -0
- package/lib/modelToDom/handlers/handleListItem.d.ts +5 -0
- package/lib/modelToDom/handlers/handleListItem.js +37 -0
- package/lib/modelToDom/handlers/handleListItem.js.map +1 -0
- package/lib/modelToDom/handlers/handleParagraph.d.ts +5 -0
- package/lib/modelToDom/handlers/handleParagraph.js +81 -0
- package/lib/modelToDom/handlers/handleParagraph.js.map +1 -0
- package/lib/modelToDom/handlers/handleSegment.d.ts +5 -0
- package/lib/modelToDom/handlers/handleSegment.js +38 -0
- package/lib/modelToDom/handlers/handleSegment.js.map +1 -0
- package/lib/modelToDom/handlers/handleSegmentDecorator.d.ts +5 -0
- package/lib/modelToDom/handlers/handleSegmentDecorator.js +35 -0
- package/lib/modelToDom/handlers/handleSegmentDecorator.js.map +1 -0
- package/lib/modelToDom/handlers/handleTable.d.ts +5 -0
- package/lib/modelToDom/handlers/handleTable.js +105 -0
- package/lib/modelToDom/handlers/handleTable.js.map +1 -0
- package/lib/modelToDom/handlers/handleText.d.ts +5 -0
- package/lib/modelToDom/handlers/handleText.js +16 -0
- package/lib/modelToDom/handlers/handleText.js.map +1 -0
- package/lib/modelToDom/optimizers/mergeNode.d.ts +4 -0
- package/lib/modelToDom/optimizers/mergeNode.js +42 -0
- package/lib/modelToDom/optimizers/mergeNode.js.map +1 -0
- package/lib/modelToDom/optimizers/optimize.d.ts +4 -0
- package/lib/modelToDom/optimizers/optimize.js +25 -0
- package/lib/modelToDom/optimizers/optimize.js.map +1 -0
- package/lib/modelToDom/optimizers/removeUnnecessarySpan.d.ts +4 -0
- package/lib/modelToDom/optimizers/removeUnnecessarySpan.js +29 -0
- package/lib/modelToDom/optimizers/removeUnnecessarySpan.js.map +1 -0
- package/lib/modelToDom/utils/applyFormat.d.ts +10 -0
- package/lib/modelToDom/utils/applyFormat.js +18 -0
- package/lib/modelToDom/utils/applyFormat.js.map +1 -0
- package/lib/modelToDom/utils/handleSegmentCommon.d.ts +5 -0
- package/lib/modelToDom/utils/handleSegmentCommon.js +19 -0
- package/lib/modelToDom/utils/handleSegmentCommon.js.map +1 -0
- package/lib/modelToDom/utils/reuseCachedElement.d.ts +8 -0
- package/lib/modelToDom/utils/reuseCachedElement.js +46 -0
- package/lib/modelToDom/utils/reuseCachedElement.js.map +1 -0
- package/lib/modelToDom/utils/stackFormat.d.ts +5 -0
- package/lib/modelToDom/utils/stackFormat.js +27 -0
- package/lib/modelToDom/utils/stackFormat.js.map +1 -0
- package/lib-amd/domToModel/context/createDomToModelContext.d.ts +7 -0
- package/lib-amd/domToModel/context/createDomToModelContext.js +63 -0
- package/lib-amd/domToModel/context/createDomToModelContext.js.map +1 -0
- package/lib-amd/domToModel/context/defaultProcessors.d.ts +5 -0
- package/lib-amd/domToModel/context/defaultProcessors.js +47 -0
- package/lib-amd/domToModel/context/defaultProcessors.js.map +1 -0
- package/lib-amd/domToModel/domToContentModel.d.ts +9 -0
- package/lib-amd/domToModel/domToContentModel.js +27 -0
- package/lib-amd/domToModel/domToContentModel.js.map +1 -0
- package/lib-amd/domToModel/processors/blockProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/blockProcessor.js +28 -0
- package/lib-amd/domToModel/processors/blockProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/brProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/brProcessor.js +17 -0
- package/lib-amd/domToModel/processors/brProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/childProcessor.d.ts +25 -0
- package/lib-amd/domToModel/processors/childProcessor.js +60 -0
- package/lib-amd/domToModel/processors/childProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/codeProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/codeProcessor.js +16 -0
- package/lib-amd/domToModel/processors/codeProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/delimiterProcessor.d.ts +8 -0
- package/lib-amd/domToModel/processors/delimiterProcessor.js +22 -0
- package/lib-amd/domToModel/processors/delimiterProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/elementProcessor.d.ts +8 -0
- package/lib-amd/domToModel/processors/elementProcessor.js +31 -0
- package/lib-amd/domToModel/processors/elementProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/entityProcessor.d.ts +8 -0
- package/lib-amd/domToModel/processors/entityProcessor.js +39 -0
- package/lib-amd/domToModel/processors/entityProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/fontProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/fontProcessor.js +47 -0
- package/lib-amd/domToModel/processors/fontProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/formatContainerProcessor.d.ts +9 -0
- package/lib-amd/domToModel/processors/formatContainerProcessor.js +65 -0
- package/lib-amd/domToModel/processors/formatContainerProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/generalProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/generalProcessor.js +45 -0
- package/lib-amd/domToModel/processors/generalProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/headingProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/headingProcessor.js +19 -0
- package/lib-amd/domToModel/processors/headingProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/hrProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/hrProcessor.js +25 -0
- package/lib-amd/domToModel/processors/hrProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/imageProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/imageProcessor.js +38 -0
- package/lib-amd/domToModel/processors/imageProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/knownElementProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/knownElementProcessor.js +90 -0
- package/lib-amd/domToModel/processors/knownElementProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/linkProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/linkProcessor.js +23 -0
- package/lib-amd/domToModel/processors/linkProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/listItemProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/listItemProcessor.js +38 -0
- package/lib-amd/domToModel/processors/listItemProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/listProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/listProcessor.js +40 -0
- package/lib-amd/domToModel/processors/listProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/pProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/pProcessor.js +20 -0
- package/lib-amd/domToModel/processors/pProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/tableProcessor.d.ts +19 -0
- package/lib-amd/domToModel/processors/tableProcessor.js +159 -0
- package/lib-amd/domToModel/processors/tableProcessor.js.map +1 -0
- package/lib-amd/domToModel/processors/textProcessor.d.ts +5 -0
- package/lib-amd/domToModel/processors/textProcessor.js +56 -0
- package/lib-amd/domToModel/processors/textProcessor.js.map +1 -0
- package/lib-amd/domToModel/utils/addSelectionMarker.d.ts +5 -0
- package/lib-amd/domToModel/utils/addSelectionMarker.js +15 -0
- package/lib-amd/domToModel/utils/addSelectionMarker.js.map +1 -0
- package/lib-amd/domToModel/utils/areSameFormats.d.ts +7 -0
- package/lib-amd/domToModel/utils/areSameFormats.js +22 -0
- package/lib-amd/domToModel/utils/areSameFormats.js.map +1 -0
- package/lib-amd/domToModel/utils/getBoundingClientRect.d.ts +4 -0
- package/lib-amd/domToModel/utils/getBoundingClientRect.js +13 -0
- package/lib-amd/domToModel/utils/getBoundingClientRect.js.map +1 -0
- package/lib-amd/domToModel/utils/getDefaultStyle.d.ts +9 -0
- package/lib-amd/domToModel/utils/getDefaultStyle.js +18 -0
- package/lib-amd/domToModel/utils/getDefaultStyle.js.map +1 -0
- package/lib-amd/domToModel/utils/getRegularSelectionOffsets.d.ts +9 -0
- package/lib-amd/domToModel/utils/getRegularSelectionOffsets.js +24 -0
- package/lib-amd/domToModel/utils/getRegularSelectionOffsets.js.map +1 -0
- package/lib-amd/domToModel/utils/isBlockElement.d.ts +8 -0
- package/lib-amd/domToModel/utils/isBlockElement.js +18 -0
- package/lib-amd/domToModel/utils/isBlockElement.js.map +1 -0
- package/lib-amd/domToModel/utils/parseFormat.d.ts +9 -0
- package/lib-amd/domToModel/utils/parseFormat.js +20 -0
- package/lib-amd/domToModel/utils/parseFormat.js.map +1 -0
- package/lib-amd/domToModel/utils/stackFormat.d.ts +15 -0
- package/lib-amd/domToModel/utils/stackFormat.js +112 -0
- package/lib-amd/domToModel/utils/stackFormat.js.map +1 -0
- package/lib-amd/domUtils/isNodeOfType.d.ts +44 -0
- package/lib-amd/domUtils/isNodeOfType.js +15 -0
- package/lib-amd/domUtils/isNodeOfType.js.map +1 -0
- package/lib-amd/domUtils/metadata/updateListMetadata.d.ts +8 -0
- package/lib-amd/domUtils/metadata/updateListMetadata.js +20 -0
- package/lib-amd/domUtils/metadata/updateListMetadata.js.map +1 -0
- package/lib-amd/domUtils/metadata/updateMetadata.d.ts +15 -0
- package/lib-amd/domUtils/metadata/updateMetadata.js +44 -0
- package/lib-amd/domUtils/metadata/updateMetadata.js.map +1 -0
- package/lib-amd/domUtils/stringUtil.d.ts +24 -0
- package/lib-amd/domUtils/stringUtil.js +49 -0
- package/lib-amd/domUtils/stringUtil.js.map +1 -0
- package/lib-amd/formatHandlers/FormatHandler.d.ts +15 -0
- package/lib-amd/formatHandlers/FormatHandler.js +5 -0
- package/lib-amd/formatHandlers/FormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/directionFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/directionFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/block/directionFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/displayFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/displayFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/block/displayFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/htmlAlignFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/htmlAlignFormatHandler.js +26 -0
- package/lib-amd/formatHandlers/block/htmlAlignFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/lineHeightFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/lineHeightFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/block/lineHeightFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/marginFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/marginFormatHandler.js +46 -0
- package/lib-amd/formatHandlers/block/marginFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/paddingFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/paddingFormatHandler.js +33 -0
- package/lib-amd/formatHandlers/block/paddingFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/textAlignFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/textAlignFormatHandler.js +41 -0
- package/lib-amd/formatHandlers/block/textAlignFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/block/whiteSpaceFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/block/whiteSpaceFormatHandler.js +23 -0
- package/lib-amd/formatHandlers/block/whiteSpaceFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/backgroundColorFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/backgroundColorFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/common/backgroundColorFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/borderBoxFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/borderBoxFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/common/borderBoxFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/borderFormatHandler.d.ts +10 -0
- package/lib-amd/formatHandlers/common/borderFormatHandler.js +37 -0
- package/lib-amd/formatHandlers/common/borderFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/boxShadowFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/boxShadowFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/common/boxShadowFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/datasetFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/datasetFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/common/datasetFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/idFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/idFormatHandler.js +21 -0
- package/lib-amd/formatHandlers/common/idFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/sizeFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/sizeFormatHandler.js +67 -0
- package/lib-amd/formatHandlers/common/sizeFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/verticalAlignFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/verticalAlignFormatHandler.js +33 -0
- package/lib-amd/formatHandlers/common/verticalAlignFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/common/wordBreakFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/common/wordBreakFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/common/wordBreakFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/defaultFormatHandlers.d.ts +17 -0
- package/lib-amd/formatHandlers/defaultFormatHandlers.js +188 -0
- package/lib-amd/formatHandlers/defaultFormatHandlers.js.map +1 -0
- package/lib-amd/formatHandlers/list/listItemMetadataFormatHandler.d.ts +11 -0
- package/lib-amd/formatHandlers/list/listItemMetadataFormatHandler.js +100 -0
- package/lib-amd/formatHandlers/list/listItemMetadataFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/list/listItemThreadFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/list/listItemThreadFormatHandler.js +47 -0
- package/lib-amd/formatHandlers/list/listItemThreadFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/list/listLevelMetadataFormatHandler.d.ts +15 -0
- package/lib-amd/formatHandlers/list/listLevelMetadataFormatHandler.js +89 -0
- package/lib-amd/formatHandlers/list/listLevelMetadataFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/list/listLevelThreadFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/list/listLevelThreadFormatHandler.js +38 -0
- package/lib-amd/formatHandlers/list/listLevelThreadFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/list/listStylePositionFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/list/listStylePositionFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/list/listStylePositionFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/list/listTypeFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/list/listTypeFormatHandler.js +18 -0
- package/lib-amd/formatHandlers/list/listTypeFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/root/rootDirectionFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/root/rootDirectionFormatHandler.js +19 -0
- package/lib-amd/formatHandlers/root/rootDirectionFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/root/zoomScaleFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/root/zoomScaleFormatHandler.js +20 -0
- package/lib-amd/formatHandlers/root/zoomScaleFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/boldFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/boldFormatHandler.js +34 -0
- package/lib-amd/formatHandlers/segment/boldFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/fontFamilyFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/fontFamilyFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/segment/fontFamilyFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/fontSizeFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/fontSizeFormatHandler.js +25 -0
- package/lib-amd/formatHandlers/segment/fontSizeFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/italicFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/italicFormatHandler.js +36 -0
- package/lib-amd/formatHandlers/segment/italicFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/letterSpacingFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/letterSpacingFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/segment/letterSpacingFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/linkFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/linkFormatHandler.js +66 -0
- package/lib-amd/formatHandlers/segment/linkFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/strikeFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/strikeFormatHandler.js +24 -0
- package/lib-amd/formatHandlers/segment/strikeFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/superOrSubScriptFormatHandler.d.ts +10 -0
- package/lib-amd/formatHandlers/segment/superOrSubScriptFormatHandler.js +44 -0
- package/lib-amd/formatHandlers/segment/superOrSubScriptFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/textColorFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/textColorFormatHandler.js +23 -0
- package/lib-amd/formatHandlers/segment/textColorFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/segment/underlineFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/segment/underlineFormatHandler.js +36 -0
- package/lib-amd/formatHandlers/segment/underlineFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/table/tableLayoutFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/table/tableLayoutFormatHandler.js +22 -0
- package/lib-amd/formatHandlers/table/tableLayoutFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/table/tableSpacingFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/table/tableSpacingFormatHandler.js +24 -0
- package/lib-amd/formatHandlers/table/tableSpacingFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/table/textColorOnTableCellFormatHandler.d.ts +6 -0
- package/lib-amd/formatHandlers/table/textColorOnTableCellFormatHandler.js +20 -0
- package/lib-amd/formatHandlers/table/textColorOnTableCellFormatHandler.js.map +1 -0
- package/lib-amd/formatHandlers/utils/color.d.ts +9 -0
- package/lib-amd/formatHandlers/utils/color.js +56 -0
- package/lib-amd/formatHandlers/utils/color.js.map +1 -0
- package/lib-amd/formatHandlers/utils/defaultStyles.d.ts +15 -0
- package/lib-amd/formatHandlers/utils/defaultStyles.js +194 -0
- package/lib-amd/formatHandlers/utils/defaultStyles.js.map +1 -0
- package/lib-amd/formatHandlers/utils/dir.d.ts +29 -0
- package/lib-amd/formatHandlers/utils/dir.js +53 -0
- package/lib-amd/formatHandlers/utils/dir.js.map +1 -0
- package/lib-amd/formatHandlers/utils/parseValueWithUnit.d.ts +7 -0
- package/lib-amd/formatHandlers/utils/parseValueWithUnit.js +60 -0
- package/lib-amd/formatHandlers/utils/parseValueWithUnit.js.map +1 -0
- package/lib-amd/index.d.ts +40 -0
- package/lib-amd/index.js +51 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/modelApi/block/setParagraphNotImplicit.d.ts +6 -0
- package/lib-amd/modelApi/block/setParagraphNotImplicit.js +16 -0
- package/lib-amd/modelApi/block/setParagraphNotImplicit.js.map +1 -0
- package/lib-amd/modelApi/common/addBlock.d.ts +7 -0
- package/lib-amd/modelApi/common/addBlock.js +15 -0
- package/lib-amd/modelApi/common/addBlock.js.map +1 -0
- package/lib-amd/modelApi/common/addDecorators.d.ts +15 -0
- package/lib-amd/modelApi/common/addDecorators.js +39 -0
- package/lib-amd/modelApi/common/addDecorators.js.map +1 -0
- package/lib-amd/modelApi/common/addSegment.d.ts +8 -0
- package/lib-amd/modelApi/common/addSegment.js +36 -0
- package/lib-amd/modelApi/common/addSegment.js.map +1 -0
- package/lib-amd/modelApi/common/isEmpty.d.ts +17 -0
- package/lib-amd/modelApi/common/isEmpty.js +82 -0
- package/lib-amd/modelApi/common/isEmpty.js.map +1 -0
- package/lib-amd/modelApi/common/isGeneralSegment.d.ts +6 -0
- package/lib-amd/modelApi/common/isGeneralSegment.js +15 -0
- package/lib-amd/modelApi/common/isGeneralSegment.js.map +1 -0
- package/lib-amd/modelApi/common/isWhiteSpacePreserved.d.ts +6 -0
- package/lib-amd/modelApi/common/isWhiteSpacePreserved.js +18 -0
- package/lib-amd/modelApi/common/isWhiteSpacePreserved.js.map +1 -0
- package/lib-amd/modelApi/common/normalizeContentModel.d.ts +11 -0
- package/lib-amd/modelApi/common/normalizeContentModel.js +47 -0
- package/lib-amd/modelApi/common/normalizeContentModel.js.map +1 -0
- package/lib-amd/modelApi/common/normalizeParagraph.d.ts +5 -0
- package/lib-amd/modelApi/common/normalizeParagraph.js +41 -0
- package/lib-amd/modelApi/common/normalizeParagraph.js.map +1 -0
- package/lib-amd/modelApi/common/normalizeSegment.d.ts +29 -0
- package/lib-amd/modelApi/common/normalizeSegment.js +111 -0
- package/lib-amd/modelApi/common/normalizeSegment.js.map +1 -0
- package/lib-amd/modelApi/common/unwrapBlock.d.ts +7 -0
- package/lib-amd/modelApi/common/unwrapBlock.js +21 -0
- package/lib-amd/modelApi/common/unwrapBlock.js.map +1 -0
- package/lib-amd/modelApi/creators/createBr.d.ts +6 -0
- package/lib-amd/modelApi/creators/createBr.js +17 -0
- package/lib-amd/modelApi/creators/createBr.js.map +1 -0
- package/lib-amd/modelApi/creators/createContentModelDocument.d.ts +6 -0
- package/lib-amd/modelApi/creators/createContentModelDocument.js +21 -0
- package/lib-amd/modelApi/creators/createContentModelDocument.js.map +1 -0
- package/lib-amd/modelApi/creators/createDivider.d.ts +7 -0
- package/lib-amd/modelApi/creators/createDivider.js +19 -0
- package/lib-amd/modelApi/creators/createDivider.js.map +1 -0
- package/lib-amd/modelApi/creators/createEntity.d.ts +10 -0
- package/lib-amd/modelApi/creators/createEntity.js +26 -0
- package/lib-amd/modelApi/creators/createEntity.js.map +1 -0
- package/lib-amd/modelApi/creators/createFormatContainer.d.ts +7 -0
- package/lib-amd/modelApi/creators/createFormatContainer.js +21 -0
- package/lib-amd/modelApi/creators/createFormatContainer.js.map +1 -0
- package/lib-amd/modelApi/creators/createGeneralBlock.d.ts +6 -0
- package/lib-amd/modelApi/creators/createGeneralBlock.js +20 -0
- package/lib-amd/modelApi/creators/createGeneralBlock.js.map +1 -0
- package/lib-amd/modelApi/creators/createGeneralSegment.d.ts +7 -0
- package/lib-amd/modelApi/creators/createGeneralSegment.js +22 -0
- package/lib-amd/modelApi/creators/createGeneralSegment.js.map +1 -0
- package/lib-amd/modelApi/creators/createImage.d.ts +7 -0
- package/lib-amd/modelApi/creators/createImage.js +20 -0
- package/lib-amd/modelApi/creators/createImage.js.map +1 -0
- package/lib-amd/modelApi/creators/createListItem.d.ts +7 -0
- package/lib-amd/modelApi/creators/createListItem.js +22 -0
- package/lib-amd/modelApi/creators/createListItem.js.map +1 -0
- package/lib-amd/modelApi/creators/createParagraph.d.ts +9 -0
- package/lib-amd/modelApi/creators/createParagraph.js +34 -0
- package/lib-amd/modelApi/creators/createParagraph.js.map +1 -0
- package/lib-amd/modelApi/creators/createParagraphDecorator.d.ts +7 -0
- package/lib-amd/modelApi/creators/createParagraphDecorator.js +18 -0
- package/lib-amd/modelApi/creators/createParagraphDecorator.js.map +1 -0
- package/lib-amd/modelApi/creators/createSelectionMarker.d.ts +6 -0
- package/lib-amd/modelApi/creators/createSelectionMarker.js +18 -0
- package/lib-amd/modelApi/creators/createSelectionMarker.js.map +1 -0
- package/lib-amd/modelApi/creators/createTable.d.ts +7 -0
- package/lib-amd/modelApi/creators/createTable.js +29 -0
- package/lib-amd/modelApi/creators/createTable.js.map +1 -0
- package/lib-amd/modelApi/creators/createTableCell.d.ts +9 -0
- package/lib-amd/modelApi/creators/createTableCell.js +27 -0
- package/lib-amd/modelApi/creators/createTableCell.js.map +1 -0
- package/lib-amd/modelApi/creators/createText.d.ts +7 -0
- package/lib-amd/modelApi/creators/createText.js +19 -0
- package/lib-amd/modelApi/creators/createText.js.map +1 -0
- package/lib-amd/modelToDom/contentModelToDom.d.ts +17 -0
- package/lib-amd/modelToDom/contentModelToDom.js +84 -0
- package/lib-amd/modelToDom/contentModelToDom.js.map +1 -0
- package/lib-amd/modelToDom/context/createModelToDomContext.d.ts +7 -0
- package/lib-amd/modelToDom/context/createModelToDomContext.js +24 -0
- package/lib-amd/modelToDom/context/createModelToDomContext.js.map +1 -0
- package/lib-amd/modelToDom/context/defaultContentModelHandlers.d.ts +5 -0
- package/lib-amd/modelToDom/context/defaultContentModelHandlers.js +26 -0
- package/lib-amd/modelToDom/context/defaultContentModelHandlers.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleBlock.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleBlock.js +41 -0
- package/lib-amd/modelToDom/handlers/handleBlock.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleBlockGroupChildren.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleBlockGroupChildren.js +39 -0
- package/lib-amd/modelToDom/handlers/handleBlockGroupChildren.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleBr.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleBr.js +17 -0
- package/lib-amd/modelToDom/handlers/handleBr.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleDivider.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleDivider.js +28 -0
- package/lib-amd/modelToDom/handlers/handleDivider.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleEntity.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleEntity.js +38 -0
- package/lib-amd/modelToDom/handlers/handleEntity.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleFormatContainer.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleFormatContainer.js +41 -0
- package/lib-amd/modelToDom/handlers/handleFormatContainer.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleGeneralModel.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleGeneralModel.js +31 -0
- package/lib-amd/modelToDom/handlers/handleGeneralModel.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleImage.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleImage.js +40 -0
- package/lib-amd/modelToDom/handlers/handleImage.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleList.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleList.js +57 -0
- package/lib-amd/modelToDom/handlers/handleList.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleListItem.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleListItem.js +36 -0
- package/lib-amd/modelToDom/handlers/handleListItem.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleParagraph.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleParagraph.js +77 -0
- package/lib-amd/modelToDom/handlers/handleParagraph.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleSegment.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleSegment.js +39 -0
- package/lib-amd/modelToDom/handlers/handleSegment.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleSegmentDecorator.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleSegmentDecorator.js +34 -0
- package/lib-amd/modelToDom/handlers/handleSegmentDecorator.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleTable.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleTable.js +102 -0
- package/lib-amd/modelToDom/handlers/handleTable.js.map +1 -0
- package/lib-amd/modelToDom/handlers/handleText.d.ts +5 -0
- package/lib-amd/modelToDom/handlers/handleText.js +17 -0
- package/lib-amd/modelToDom/handlers/handleText.js.map +1 -0
- package/lib-amd/modelToDom/optimizers/mergeNode.d.ts +4 -0
- package/lib-amd/modelToDom/optimizers/mergeNode.js +43 -0
- package/lib-amd/modelToDom/optimizers/mergeNode.js.map +1 -0
- package/lib-amd/modelToDom/optimizers/optimize.d.ts +4 -0
- package/lib-amd/modelToDom/optimizers/optimize.js +24 -0
- package/lib-amd/modelToDom/optimizers/optimize.js.map +1 -0
- package/lib-amd/modelToDom/optimizers/removeUnnecessarySpan.d.ts +4 -0
- package/lib-amd/modelToDom/optimizers/removeUnnecessarySpan.js +30 -0
- package/lib-amd/modelToDom/optimizers/removeUnnecessarySpan.js.map +1 -0
- package/lib-amd/modelToDom/utils/applyFormat.d.ts +10 -0
- package/lib-amd/modelToDom/utils/applyFormat.js +20 -0
- package/lib-amd/modelToDom/utils/applyFormat.js.map +1 -0
- package/lib-amd/modelToDom/utils/handleSegmentCommon.d.ts +5 -0
- package/lib-amd/modelToDom/utils/handleSegmentCommon.js +20 -0
- package/lib-amd/modelToDom/utils/handleSegmentCommon.js.map +1 -0
- package/lib-amd/modelToDom/utils/reuseCachedElement.d.ts +8 -0
- package/lib-amd/modelToDom/utils/reuseCachedElement.js +46 -0
- package/lib-amd/modelToDom/utils/reuseCachedElement.js.map +1 -0
- package/lib-amd/modelToDom/utils/stackFormat.d.ts +5 -0
- package/lib-amd/modelToDom/utils/stackFormat.js +28 -0
- package/lib-amd/modelToDom/utils/stackFormat.js.map +1 -0
- package/lib-mjs/domToModel/context/createDomToModelContext.d.ts +7 -0
- package/lib-mjs/domToModel/context/createDomToModelContext.js +61 -0
- package/lib-mjs/domToModel/context/createDomToModelContext.js.map +1 -0
- package/lib-mjs/domToModel/context/defaultProcessors.d.ts +5 -0
- package/lib-mjs/domToModel/context/defaultProcessors.js +61 -0
- package/lib-mjs/domToModel/context/defaultProcessors.js.map +1 -0
- package/lib-mjs/domToModel/domToContentModel.d.ts +9 -0
- package/lib-mjs/domToModel/domToContentModel.js +28 -0
- package/lib-mjs/domToModel/domToContentModel.js.map +1 -0
- package/lib-mjs/domToModel/processors/blockProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/blockProcessor.js +27 -0
- package/lib-mjs/domToModel/processors/blockProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/brProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/brProcessor.js +13 -0
- package/lib-mjs/domToModel/processors/brProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/childProcessor.d.ts +25 -0
- package/lib-mjs/domToModel/processors/childProcessor.js +56 -0
- package/lib-mjs/domToModel/processors/childProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/codeProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/codeProcessor.js +13 -0
- package/lib-mjs/domToModel/processors/codeProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/delimiterProcessor.d.ts +8 -0
- package/lib-mjs/domToModel/processors/delimiterProcessor.js +19 -0
- package/lib-mjs/domToModel/processors/delimiterProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/elementProcessor.d.ts +8 -0
- package/lib-mjs/domToModel/processors/elementProcessor.js +26 -0
- package/lib-mjs/domToModel/processors/elementProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/entityProcessor.d.ts +8 -0
- package/lib-mjs/domToModel/processors/entityProcessor.js +39 -0
- package/lib-mjs/domToModel/processors/entityProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/fontProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/fontProcessor.js +44 -0
- package/lib-mjs/domToModel/processors/fontProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/formatContainerProcessor.d.ts +9 -0
- package/lib-mjs/domToModel/processors/formatContainerProcessor.js +67 -0
- package/lib-mjs/domToModel/processors/formatContainerProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/generalProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/generalProcessor.js +46 -0
- package/lib-mjs/domToModel/processors/generalProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/headingProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/headingProcessor.js +19 -0
- package/lib-mjs/domToModel/processors/headingProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/hrProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/hrProcessor.js +23 -0
- package/lib-mjs/domToModel/processors/hrProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/imageProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/imageProcessor.js +37 -0
- package/lib-mjs/domToModel/processors/imageProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/knownElementProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/knownElementProcessor.js +92 -0
- package/lib-mjs/domToModel/processors/knownElementProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/linkProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/linkProcessor.js +20 -0
- package/lib-mjs/domToModel/processors/linkProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/listItemProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/listItemProcessor.js +35 -0
- package/lib-mjs/domToModel/processors/listItemProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/listProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/listProcessor.js +38 -0
- package/lib-mjs/domToModel/processors/listProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/pProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/pProcessor.js +20 -0
- package/lib-mjs/domToModel/processors/pProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/tableProcessor.d.ts +19 -0
- package/lib-mjs/domToModel/processors/tableProcessor.js +160 -0
- package/lib-mjs/domToModel/processors/tableProcessor.js.map +1 -0
- package/lib-mjs/domToModel/processors/textProcessor.d.ts +5 -0
- package/lib-mjs/domToModel/processors/textProcessor.js +58 -0
- package/lib-mjs/domToModel/processors/textProcessor.js.map +1 -0
- package/lib-mjs/domToModel/utils/addSelectionMarker.d.ts +5 -0
- package/lib-mjs/domToModel/utils/addSelectionMarker.js +12 -0
- package/lib-mjs/domToModel/utils/addSelectionMarker.js.map +1 -0
- package/lib-mjs/domToModel/utils/areSameFormats.d.ts +7 -0
- package/lib-mjs/domToModel/utils/areSameFormats.js +17 -0
- package/lib-mjs/domToModel/utils/areSameFormats.js.map +1 -0
- package/lib-mjs/domToModel/utils/getBoundingClientRect.d.ts +4 -0
- package/lib-mjs/domToModel/utils/getBoundingClientRect.js +7 -0
- package/lib-mjs/domToModel/utils/getBoundingClientRect.js.map +1 -0
- package/lib-mjs/domToModel/utils/getDefaultStyle.d.ts +9 -0
- package/lib-mjs/domToModel/utils/getDefaultStyle.js +12 -0
- package/lib-mjs/domToModel/utils/getDefaultStyle.js.map +1 -0
- package/lib-mjs/domToModel/utils/getRegularSelectionOffsets.d.ts +9 -0
- package/lib-mjs/domToModel/utils/getRegularSelectionOffsets.js +18 -0
- package/lib-mjs/domToModel/utils/getRegularSelectionOffsets.js.map +1 -0
- package/lib-mjs/domToModel/utils/isBlockElement.d.ts +8 -0
- package/lib-mjs/domToModel/utils/isBlockElement.js +13 -0
- package/lib-mjs/domToModel/utils/isBlockElement.js.map +1 -0
- package/lib-mjs/domToModel/utils/parseFormat.d.ts +9 -0
- package/lib-mjs/domToModel/utils/parseFormat.js +15 -0
- package/lib-mjs/domToModel/utils/parseFormat.js.map +1 -0
- package/lib-mjs/domToModel/utils/stackFormat.d.ts +15 -0
- package/lib-mjs/domToModel/utils/stackFormat.js +108 -0
- package/lib-mjs/domToModel/utils/stackFormat.js.map +1 -0
- package/lib-mjs/domUtils/isNodeOfType.d.ts +44 -0
- package/lib-mjs/domUtils/isNodeOfType.js +9 -0
- package/lib-mjs/domUtils/isNodeOfType.js.map +1 -0
- package/lib-mjs/domUtils/metadata/updateListMetadata.d.ts +8 -0
- package/lib-mjs/domUtils/metadata/updateListMetadata.js +16 -0
- package/lib-mjs/domUtils/metadata/updateListMetadata.js.map +1 -0
- package/lib-mjs/domUtils/metadata/updateMetadata.d.ts +15 -0
- package/lib-mjs/domUtils/metadata/updateMetadata.js +38 -0
- package/lib-mjs/domUtils/metadata/updateMetadata.js.map +1 -0
- package/lib-mjs/domUtils/stringUtil.d.ts +24 -0
- package/lib-mjs/domUtils/stringUtil.js +40 -0
- package/lib-mjs/domUtils/stringUtil.js.map +1 -0
- package/lib-mjs/formatHandlers/FormatHandler.d.ts +15 -0
- package/lib-mjs/formatHandlers/FormatHandler.js +2 -0
- package/lib-mjs/formatHandlers/FormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/directionFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/directionFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/block/directionFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/displayFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/displayFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/block/displayFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/htmlAlignFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/htmlAlignFormatHandler.js +23 -0
- package/lib-mjs/formatHandlers/block/htmlAlignFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/lineHeightFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/lineHeightFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/block/lineHeightFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/marginFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/marginFormatHandler.js +42 -0
- package/lib-mjs/formatHandlers/block/marginFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/paddingFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/paddingFormatHandler.js +28 -0
- package/lib-mjs/formatHandlers/block/paddingFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/textAlignFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/textAlignFormatHandler.js +38 -0
- package/lib-mjs/formatHandlers/block/textAlignFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/block/whiteSpaceFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/block/whiteSpaceFormatHandler.js +18 -0
- package/lib-mjs/formatHandlers/block/whiteSpaceFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/backgroundColorFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/backgroundColorFormatHandler.js +18 -0
- package/lib-mjs/formatHandlers/common/backgroundColorFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/borderBoxFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/borderBoxFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/common/borderBoxFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/borderFormatHandler.d.ts +10 -0
- package/lib-mjs/formatHandlers/common/borderFormatHandler.js +32 -0
- package/lib-mjs/formatHandlers/common/borderFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/boxShadowFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/boxShadowFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/common/boxShadowFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/datasetFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/datasetFormatHandler.js +18 -0
- package/lib-mjs/formatHandlers/common/datasetFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/idFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/idFormatHandler.js +16 -0
- package/lib-mjs/formatHandlers/common/idFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/sizeFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/sizeFormatHandler.js +62 -0
- package/lib-mjs/formatHandlers/common/sizeFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/verticalAlignFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/verticalAlignFormatHandler.js +28 -0
- package/lib-mjs/formatHandlers/common/verticalAlignFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/common/wordBreakFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/common/wordBreakFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/common/wordBreakFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/defaultFormatHandlers.d.ts +17 -0
- package/lib-mjs/formatHandlers/defaultFormatHandlers.js +219 -0
- package/lib-mjs/formatHandlers/defaultFormatHandlers.js.map +1 -0
- package/lib-mjs/formatHandlers/list/listItemMetadataFormatHandler.d.ts +11 -0
- package/lib-mjs/formatHandlers/list/listItemMetadataFormatHandler.js +98 -0
- package/lib-mjs/formatHandlers/list/listItemMetadataFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/list/listItemThreadFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/list/listItemThreadFormatHandler.js +43 -0
- package/lib-mjs/formatHandlers/list/listItemThreadFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/list/listLevelMetadataFormatHandler.d.ts +15 -0
- package/lib-mjs/formatHandlers/list/listLevelMetadataFormatHandler.js +85 -0
- package/lib-mjs/formatHandlers/list/listLevelMetadataFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/list/listLevelThreadFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/list/listLevelThreadFormatHandler.js +34 -0
- package/lib-mjs/formatHandlers/list/listLevelThreadFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/list/listStylePositionFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/list/listStylePositionFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/list/listStylePositionFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/list/listTypeFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/list/listTypeFormatHandler.js +14 -0
- package/lib-mjs/formatHandlers/list/listTypeFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/root/rootDirectionFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/root/rootDirectionFormatHandler.js +14 -0
- package/lib-mjs/formatHandlers/root/rootDirectionFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/root/zoomScaleFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/root/zoomScaleFormatHandler.js +15 -0
- package/lib-mjs/formatHandlers/root/zoomScaleFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/boldFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/boldFormatHandler.js +30 -0
- package/lib-mjs/formatHandlers/segment/boldFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/fontFamilyFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/fontFamilyFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/segment/fontFamilyFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/fontSizeFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/fontSizeFormatHandler.js +21 -0
- package/lib-mjs/formatHandlers/segment/fontSizeFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/italicFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/italicFormatHandler.js +32 -0
- package/lib-mjs/formatHandlers/segment/italicFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/letterSpacingFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/letterSpacingFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/segment/letterSpacingFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/linkFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/linkFormatHandler.js +62 -0
- package/lib-mjs/formatHandlers/segment/linkFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/strikeFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/strikeFormatHandler.js +20 -0
- package/lib-mjs/formatHandlers/segment/strikeFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/superOrSubScriptFormatHandler.d.ts +10 -0
- package/lib-mjs/formatHandlers/segment/superOrSubScriptFormatHandler.js +39 -0
- package/lib-mjs/formatHandlers/segment/superOrSubScriptFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/textColorFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/textColorFormatHandler.js +19 -0
- package/lib-mjs/formatHandlers/segment/textColorFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/segment/underlineFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/segment/underlineFormatHandler.js +32 -0
- package/lib-mjs/formatHandlers/segment/underlineFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/table/tableLayoutFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/table/tableLayoutFormatHandler.js +17 -0
- package/lib-mjs/formatHandlers/table/tableLayoutFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/table/tableSpacingFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/table/tableSpacingFormatHandler.js +19 -0
- package/lib-mjs/formatHandlers/table/tableSpacingFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/table/textColorOnTableCellFormatHandler.d.ts +6 -0
- package/lib-mjs/formatHandlers/table/textColorOnTableCellFormatHandler.js +15 -0
- package/lib-mjs/formatHandlers/table/textColorOnTableCellFormatHandler.js.map +1 -0
- package/lib-mjs/formatHandlers/utils/color.d.ts +9 -0
- package/lib-mjs/formatHandlers/utils/color.js +50 -0
- package/lib-mjs/formatHandlers/utils/color.js.map +1 -0
- package/lib-mjs/formatHandlers/utils/defaultStyles.d.ts +15 -0
- package/lib-mjs/formatHandlers/utils/defaultStyles.js +189 -0
- package/lib-mjs/formatHandlers/utils/defaultStyles.js.map +1 -0
- package/lib-mjs/formatHandlers/utils/dir.d.ts +29 -0
- package/lib-mjs/formatHandlers/utils/dir.js +47 -0
- package/lib-mjs/formatHandlers/utils/dir.js.map +1 -0
- package/lib-mjs/formatHandlers/utils/parseValueWithUnit.d.ts +7 -0
- package/lib-mjs/formatHandlers/utils/parseValueWithUnit.js +56 -0
- package/lib-mjs/formatHandlers/utils/parseValueWithUnit.js.map +1 -0
- package/lib-mjs/index.d.ts +40 -0
- package/lib-mjs/index.js +41 -0
- package/lib-mjs/index.js.map +1 -0
- package/lib-mjs/modelApi/block/setParagraphNotImplicit.d.ts +6 -0
- package/lib-mjs/modelApi/block/setParagraphNotImplicit.js +10 -0
- package/lib-mjs/modelApi/block/setParagraphNotImplicit.js.map +1 -0
- package/lib-mjs/modelApi/common/addBlock.d.ts +7 -0
- package/lib-mjs/modelApi/common/addBlock.js +9 -0
- package/lib-mjs/modelApi/common/addBlock.js.map +1 -0
- package/lib-mjs/modelApi/common/addDecorators.d.ts +15 -0
- package/lib-mjs/modelApi/common/addDecorators.js +32 -0
- package/lib-mjs/modelApi/common/addDecorators.js.map +1 -0
- package/lib-mjs/modelApi/common/addSegment.d.ts +8 -0
- package/lib-mjs/modelApi/common/addSegment.js +32 -0
- package/lib-mjs/modelApi/common/addSegment.js.map +1 -0
- package/lib-mjs/modelApi/common/isEmpty.d.ts +17 -0
- package/lib-mjs/modelApi/common/isEmpty.js +73 -0
- package/lib-mjs/modelApi/common/isEmpty.js.map +1 -0
- package/lib-mjs/modelApi/common/isGeneralSegment.d.ts +6 -0
- package/lib-mjs/modelApi/common/isGeneralSegment.js +9 -0
- package/lib-mjs/modelApi/common/isGeneralSegment.js.map +1 -0
- package/lib-mjs/modelApi/common/isWhiteSpacePreserved.d.ts +6 -0
- package/lib-mjs/modelApi/common/isWhiteSpacePreserved.js +12 -0
- package/lib-mjs/modelApi/common/isWhiteSpacePreserved.js.map +1 -0
- package/lib-mjs/modelApi/common/normalizeContentModel.d.ts +11 -0
- package/lib-mjs/modelApi/common/normalizeContentModel.js +44 -0
- package/lib-mjs/modelApi/common/normalizeContentModel.js.map +1 -0
- package/lib-mjs/modelApi/common/normalizeParagraph.d.ts +5 -0
- package/lib-mjs/modelApi/common/normalizeParagraph.js +39 -0
- package/lib-mjs/modelApi/common/normalizeParagraph.js.map +1 -0
- package/lib-mjs/modelApi/common/normalizeSegment.d.ts +29 -0
- package/lib-mjs/modelApi/common/normalizeSegment.js +103 -0
- package/lib-mjs/modelApi/common/normalizeSegment.js.map +1 -0
- package/lib-mjs/modelApi/common/unwrapBlock.d.ts +7 -0
- package/lib-mjs/modelApi/common/unwrapBlock.js +17 -0
- package/lib-mjs/modelApi/common/unwrapBlock.js.map +1 -0
- package/lib-mjs/modelApi/creators/createBr.d.ts +6 -0
- package/lib-mjs/modelApi/creators/createBr.js +12 -0
- package/lib-mjs/modelApi/creators/createBr.js.map +1 -0
- package/lib-mjs/modelApi/creators/createContentModelDocument.d.ts +6 -0
- package/lib-mjs/modelApi/creators/createContentModelDocument.js +15 -0
- package/lib-mjs/modelApi/creators/createContentModelDocument.js.map +1 -0
- package/lib-mjs/modelApi/creators/createDivider.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createDivider.js +14 -0
- package/lib-mjs/modelApi/creators/createDivider.js.map +1 -0
- package/lib-mjs/modelApi/creators/createEntity.d.ts +10 -0
- package/lib-mjs/modelApi/creators/createEntity.js +21 -0
- package/lib-mjs/modelApi/creators/createEntity.js.map +1 -0
- package/lib-mjs/modelApi/creators/createFormatContainer.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createFormatContainer.js +16 -0
- package/lib-mjs/modelApi/creators/createFormatContainer.js.map +1 -0
- package/lib-mjs/modelApi/creators/createGeneralBlock.d.ts +6 -0
- package/lib-mjs/modelApi/creators/createGeneralBlock.js +14 -0
- package/lib-mjs/modelApi/creators/createGeneralBlock.js.map +1 -0
- package/lib-mjs/modelApi/creators/createGeneralSegment.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createGeneralSegment.js +17 -0
- package/lib-mjs/modelApi/creators/createGeneralSegment.js.map +1 -0
- package/lib-mjs/modelApi/creators/createImage.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createImage.js +15 -0
- package/lib-mjs/modelApi/creators/createImage.js.map +1 -0
- package/lib-mjs/modelApi/creators/createListItem.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createListItem.js +18 -0
- package/lib-mjs/modelApi/creators/createListItem.js.map +1 -0
- package/lib-mjs/modelApi/creators/createParagraph.d.ts +9 -0
- package/lib-mjs/modelApi/creators/createParagraph.js +29 -0
- package/lib-mjs/modelApi/creators/createParagraph.js.map +1 -0
- package/lib-mjs/modelApi/creators/createParagraphDecorator.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createParagraphDecorator.js +13 -0
- package/lib-mjs/modelApi/creators/createParagraphDecorator.js.map +1 -0
- package/lib-mjs/modelApi/creators/createSelectionMarker.d.ts +6 -0
- package/lib-mjs/modelApi/creators/createSelectionMarker.js +13 -0
- package/lib-mjs/modelApi/creators/createSelectionMarker.js.map +1 -0
- package/lib-mjs/modelApi/creators/createTable.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createTable.js +24 -0
- package/lib-mjs/modelApi/creators/createTable.js.map +1 -0
- package/lib-mjs/modelApi/creators/createTableCell.d.ts +9 -0
- package/lib-mjs/modelApi/creators/createTableCell.js +22 -0
- package/lib-mjs/modelApi/creators/createTableCell.js.map +1 -0
- package/lib-mjs/modelApi/creators/createText.d.ts +7 -0
- package/lib-mjs/modelApi/creators/createText.js +14 -0
- package/lib-mjs/modelApi/creators/createText.js.map +1 -0
- package/lib-mjs/modelToDom/contentModelToDom.d.ts +17 -0
- package/lib-mjs/modelToDom/contentModelToDom.js +81 -0
- package/lib-mjs/modelToDom/contentModelToDom.js.map +1 -0
- package/lib-mjs/modelToDom/context/createModelToDomContext.d.ts +7 -0
- package/lib-mjs/modelToDom/context/createModelToDomContext.js +22 -0
- package/lib-mjs/modelToDom/context/createModelToDomContext.js.map +1 -0
- package/lib-mjs/modelToDom/context/defaultContentModelHandlers.d.ts +5 -0
- package/lib-mjs/modelToDom/context/defaultContentModelHandlers.js +36 -0
- package/lib-mjs/modelToDom/context/defaultContentModelHandlers.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleBlock.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleBlock.js +35 -0
- package/lib-mjs/modelToDom/handlers/handleBlock.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleBlockGroupChildren.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleBlockGroupChildren.js +33 -0
- package/lib-mjs/modelToDom/handlers/handleBlockGroupChildren.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleBr.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleBr.js +12 -0
- package/lib-mjs/modelToDom/handlers/handleBr.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleDivider.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleDivider.js +24 -0
- package/lib-mjs/modelToDom/handlers/handleDivider.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleEntity.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleEntity.js +36 -0
- package/lib-mjs/modelToDom/handlers/handleEntity.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleFormatContainer.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleFormatContainer.js +39 -0
- package/lib-mjs/modelToDom/handlers/handleFormatContainer.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleGeneralModel.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleGeneralModel.js +30 -0
- package/lib-mjs/modelToDom/handlers/handleGeneralModel.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleImage.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleImage.js +37 -0
- package/lib-mjs/modelToDom/handlers/handleImage.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleList.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleList.js +54 -0
- package/lib-mjs/modelToDom/handlers/handleList.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleListItem.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleListItem.js +33 -0
- package/lib-mjs/modelToDom/handlers/handleListItem.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleParagraph.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleParagraph.js +77 -0
- package/lib-mjs/modelToDom/handlers/handleParagraph.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleSegment.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleSegment.js +34 -0
- package/lib-mjs/modelToDom/handlers/handleSegment.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleSegmentDecorator.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleSegmentDecorator.js +31 -0
- package/lib-mjs/modelToDom/handlers/handleSegmentDecorator.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleTable.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleTable.js +101 -0
- package/lib-mjs/modelToDom/handlers/handleTable.js.map +1 -0
- package/lib-mjs/modelToDom/handlers/handleText.d.ts +5 -0
- package/lib-mjs/modelToDom/handlers/handleText.js +12 -0
- package/lib-mjs/modelToDom/handlers/handleText.js.map +1 -0
- package/lib-mjs/modelToDom/optimizers/mergeNode.d.ts +4 -0
- package/lib-mjs/modelToDom/optimizers/mergeNode.js +38 -0
- package/lib-mjs/modelToDom/optimizers/mergeNode.js.map +1 -0
- package/lib-mjs/modelToDom/optimizers/optimize.d.ts +4 -0
- package/lib-mjs/modelToDom/optimizers/optimize.js +21 -0
- package/lib-mjs/modelToDom/optimizers/optimize.js.map +1 -0
- package/lib-mjs/modelToDom/optimizers/removeUnnecessarySpan.d.ts +4 -0
- package/lib-mjs/modelToDom/optimizers/removeUnnecessarySpan.js +25 -0
- package/lib-mjs/modelToDom/optimizers/removeUnnecessarySpan.js.map +1 -0
- package/lib-mjs/modelToDom/utils/applyFormat.d.ts +10 -0
- package/lib-mjs/modelToDom/utils/applyFormat.js +14 -0
- package/lib-mjs/modelToDom/utils/applyFormat.js.map +1 -0
- package/lib-mjs/modelToDom/utils/handleSegmentCommon.d.ts +5 -0
- package/lib-mjs/modelToDom/utils/handleSegmentCommon.js +15 -0
- package/lib-mjs/modelToDom/utils/handleSegmentCommon.js.map +1 -0
- package/lib-mjs/modelToDom/utils/reuseCachedElement.d.ts +8 -0
- package/lib-mjs/modelToDom/utils/reuseCachedElement.js +41 -0
- package/lib-mjs/modelToDom/utils/reuseCachedElement.js.map +1 -0
- package/lib-mjs/modelToDom/utils/stackFormat.d.ts +5 -0
- package/lib-mjs/modelToDom/utils/stackFormat.js +23 -0
- package/lib-mjs/modelToDom/utils/stackFormat.js.map +1 -0
- package/package.json +18 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { validate } from 'roosterjs-editor-dom';
|
|
2
|
+
var EditingInfoDatasetName = 'editingInfo';
|
|
3
|
+
/**
|
|
4
|
+
* Update metadata of the given model
|
|
5
|
+
* @param model The model to update metadata to
|
|
6
|
+
* @param callback A callback function to update metadata
|
|
7
|
+
* @param definition @optional Metadata definition used for verify the metadata object
|
|
8
|
+
* @returns The metadata object if any, or null
|
|
9
|
+
*/
|
|
10
|
+
export function updateMetadata(model, callback, definition) {
|
|
11
|
+
var metadataString = model.dataset[EditingInfoDatasetName];
|
|
12
|
+
var obj = null;
|
|
13
|
+
try {
|
|
14
|
+
obj = JSON.parse(metadataString);
|
|
15
|
+
}
|
|
16
|
+
catch (_a) { }
|
|
17
|
+
if (definition && !validate(obj, definition)) {
|
|
18
|
+
obj = null;
|
|
19
|
+
}
|
|
20
|
+
if (callback) {
|
|
21
|
+
obj = callback(obj);
|
|
22
|
+
if (!obj) {
|
|
23
|
+
delete model.dataset[EditingInfoDatasetName];
|
|
24
|
+
}
|
|
25
|
+
else if (!definition || validate(obj, definition)) {
|
|
26
|
+
model.dataset[EditingInfoDatasetName] = JSON.stringify(obj);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return obj;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if the given model has metadata
|
|
33
|
+
* @param model The content model to check
|
|
34
|
+
*/
|
|
35
|
+
export function hasMetadata(model) {
|
|
36
|
+
return !!model.dataset[EditingInfoDatasetName];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=updateMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateMetadata.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/domUtils/metadata/updateMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,IAAM,sBAAsB,GAAG,aAAa,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC1B,KAAiC,EACjC,QAA2C,EAC3C,UAA0B;IAE1B,IAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC7D,IAAI,GAAG,GAAa,IAAI,CAAC;IAEzB,IAAI;QACA,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAM,CAAC;KACzC;IAAC,WAAM,GAAE;IAEV,IAAI,UAAU,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;QAC1C,GAAG,GAAG,IAAI,CAAC;KACd;IAED,IAAI,QAAQ,EAAE;QACV,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,CAAC,GAAG,EAAE;YACN,OAAO,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;SAChD;aAAM,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;YACjD,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SAC/D;KACJ;IAED,OAAO,GAAG,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,KAA+C;IAC1E,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;AACnD,CAAC","sourcesContent":["import { ContentModelWithDataset } from 'roosterjs-content-model-types';\nimport { Definition } from 'roosterjs-editor-types';\nimport { validate } from 'roosterjs-editor-dom';\n\nconst EditingInfoDatasetName = 'editingInfo';\n\n/**\n * Update metadata of the given model\n * @param model The model to update metadata to\n * @param callback A callback function to update metadata\n * @param definition @optional Metadata definition used for verify the metadata object\n * @returns The metadata object if any, or null\n */\nexport function updateMetadata<T>(\n model: ContentModelWithDataset<T>,\n callback?: (metadata: T | null) => T | null,\n definition?: Definition<T>\n): T | null {\n const metadataString = model.dataset[EditingInfoDatasetName];\n let obj: T | null = null;\n\n try {\n obj = JSON.parse(metadataString) as T;\n } catch {}\n\n if (definition && !validate(obj, definition)) {\n obj = null;\n }\n\n if (callback) {\n obj = callback(obj);\n\n if (!obj) {\n delete model.dataset[EditingInfoDatasetName];\n } else if (!definition || validate(obj, definition)) {\n model.dataset[EditingInfoDatasetName] = JSON.stringify(obj);\n }\n }\n\n return obj;\n}\n\n/**\n * Check if the given model has metadata\n * @param model The content model to check\n */\nexport function hasMetadata<T>(model: ContentModelWithDataset<T> | HTMLElement): boolean {\n return !!model.dataset[EditingInfoDatasetName];\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the given character is punctuation
|
|
3
|
+
* @param char The character to check
|
|
4
|
+
*/
|
|
5
|
+
export declare function isPunctuation(char: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Check if the give character is a space. A space can be normal ASCII pace (32) or non-break space (160) or other kinds of spaces
|
|
8
|
+
* such as ZeroWidthSpace, ...
|
|
9
|
+
* @param char The character to check
|
|
10
|
+
*/
|
|
11
|
+
export declare function isSpace(char: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
* Check if the given string only has space, including line breaks.
|
|
15
|
+
* @param txt The string to check
|
|
16
|
+
*/
|
|
17
|
+
export declare function hasSpacesOnly(txt: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Normalize spaces of the given string. After normalization, all leading (for forward) or trailing (for backward) spaces
|
|
20
|
+
* will be replaces with non-break space (160)
|
|
21
|
+
* @param txt The string to normalize
|
|
22
|
+
* @param isForward Whether normalize forward or backward
|
|
23
|
+
*/
|
|
24
|
+
export declare function normalizeText(txt: string, isForward: boolean): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// A regex to match text that only has space and CR
|
|
2
|
+
// We use real space char " " (\u0020) here but not "\s" since "\s" will also match " " (\u00A0) which is something we need to keep
|
|
3
|
+
var SPACE_TEXT_REGEX = /^[\r\n\t ]*$/;
|
|
4
|
+
var SPACES_REGEX = /[\u2000\u2009\u200a\u200b\u202f\u205f\u3000\s\t\r\n]/gm;
|
|
5
|
+
var PUNCTUATIONS = '.,?!:"()[]\\/';
|
|
6
|
+
/**
|
|
7
|
+
* Check if the given character is punctuation
|
|
8
|
+
* @param char The character to check
|
|
9
|
+
*/
|
|
10
|
+
export function isPunctuation(char) {
|
|
11
|
+
return PUNCTUATIONS.indexOf(char) >= 0;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Check if the give character is a space. A space can be normal ASCII pace (32) or non-break space (160) or other kinds of spaces
|
|
15
|
+
* such as ZeroWidthSpace, ...
|
|
16
|
+
* @param char The character to check
|
|
17
|
+
*/
|
|
18
|
+
export function isSpace(char) {
|
|
19
|
+
var _a;
|
|
20
|
+
var code = (_a = char === null || char === void 0 ? void 0 : char.charCodeAt(0)) !== null && _a !== void 0 ? _a : 0;
|
|
21
|
+
return code == 160 || code == 32 || SPACES_REGEX.test(char);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* Check if the given string only has space, including line breaks.
|
|
26
|
+
* @param txt The string to check
|
|
27
|
+
*/
|
|
28
|
+
export function hasSpacesOnly(txt) {
|
|
29
|
+
return SPACE_TEXT_REGEX.test(txt);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Normalize spaces of the given string. After normalization, all leading (for forward) or trailing (for backward) spaces
|
|
33
|
+
* will be replaces with non-break space (160)
|
|
34
|
+
* @param txt The string to normalize
|
|
35
|
+
* @param isForward Whether normalize forward or backward
|
|
36
|
+
*/
|
|
37
|
+
export function normalizeText(txt, isForward) {
|
|
38
|
+
return txt.replace(isForward ? /^\u0020+/ : /\u0020+$/, '\u00A0');
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=stringUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringUtil.js","sourceRoot":"","sources":["../../../../packages-content-model/roosterjs-content-model-dom/lib/domUtils/stringUtil.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,wIAAwI;AACxI,IAAM,gBAAgB,GAAG,cAAc,CAAC;AAExC,IAAM,YAAY,GAAG,2DAA2D,CAAC;AACjF,IAAM,YAAY,GAAG,eAAe,CAAC;AAErC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACtC,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY;;IAChC,IAAM,IAAI,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,CAAC,CAAC,CAAC,mCAAI,CAAC,CAAC;IACtC,OAAO,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACrC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,SAAkB;IACzD,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACtE,CAAC","sourcesContent":["// A regex to match text that only has space and CR\n// We use real space char \" \" (\\u0020) here but not \"\\s\" since \"\\s\" will also match \" \" (\\u00A0) which is something we need to keep\nconst SPACE_TEXT_REGEX = /^[\\r\\n\\t ]*$/;\n\nconst SPACES_REGEX = /[\\u2000\\u2009\\u200a\\u200b\\u202f\\u205f\\u3000\\s\\t\\r\\n]/gm;\nconst PUNCTUATIONS = '.,?!:\"()[]\\\\/';\n\n/**\n * Check if the given character is punctuation\n * @param char The character to check\n */\nexport function isPunctuation(char: string) {\n return PUNCTUATIONS.indexOf(char) >= 0;\n}\n\n/**\n * Check if the give character is a space. A space can be normal ASCII pace (32) or non-break space (160) or other kinds of spaces\n * such as ZeroWidthSpace, ...\n * @param char The character to check\n */\nexport function isSpace(char: string) {\n const code = char?.charCodeAt(0) ?? 0;\n return code == 160 || code == 32 || SPACES_REGEX.test(char);\n}\n\n/**\n * @internal\n * Check if the given string only has space, including line breaks.\n * @param txt The string to check\n */\nexport function hasSpacesOnly(txt: string): boolean {\n return SPACE_TEXT_REGEX.test(txt);\n}\n\n/**\n * Normalize spaces of the given string. After normalization, all leading (for forward) or trailing (for backward) spaces\n * will be replaces with non-break space (160)\n * @param txt The string to normalize\n * @param isForward Whether normalize forward or backward\n */\nexport function normalizeText(txt: string, isForward: boolean): string {\n return txt.replace(isForward ? /^\\u0020+/ : /\\u0020+$/, '\\u00A0');\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ContentModelFormatBase, FormatApplier, FormatParser } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Represents an object that will handle a given format
|
|
5
|
+
*/
|
|
6
|
+
export interface FormatHandler<TFormat extends ContentModelFormatBase> {
|
|
7
|
+
/**
|
|
8
|
+
* Parse format from the given HTML element and default style
|
|
9
|
+
*/
|
|
10
|
+
parse: FormatParser<TFormat>;
|
|
11
|
+
/**
|
|
12
|
+
* Apply format to the given HTML element
|
|
13
|
+
*/
|
|
14
|
+
apply: FormatApplier<TFormat>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormatHandler.js","sourceRoot":"","sources":["../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/FormatHandler.ts"],"names":[],"mappings":"","sourcesContent":["import { ContentModelFormatBase, FormatApplier, FormatParser } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n * Represents an object that will handle a given format\n */\nexport interface FormatHandler<TFormat extends ContentModelFormatBase> {\n /**\n * Parse format from the given HTML element and default style\n */\n parse: FormatParser<TFormat>;\n\n /**\n * Apply format to the given HTML element\n */\n apply: FormatApplier<TFormat>;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var directionFormatHandler = {
|
|
5
|
+
parse: function (format, element, _, defaultStyle) {
|
|
6
|
+
var dir = element.style.direction || element.dir || defaultStyle.direction;
|
|
7
|
+
if (dir) {
|
|
8
|
+
format.direction = dir == 'rtl' ? 'rtl' : 'ltr';
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
apply: function (format, element) {
|
|
12
|
+
if (format.direction) {
|
|
13
|
+
element.style.direction = format.direction;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=directionFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directionFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/directionFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAmC;IAClE,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY;QACpC,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,IAAI,YAAY,CAAC,SAAS,CAAC;QAE7E,IAAI,GAAG,EAAE;YACL,MAAM,CAAC,SAAS,GAAG,GAAG,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;SACnD;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAI,MAAM,CAAC,SAAS,EAAE;YAClB,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;SAC9C;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { DirectionFormat } from 'roosterjs-content-model-types';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * @internal\n */\nexport const directionFormatHandler: FormatHandler<DirectionFormat> = {\n parse: (format, element, _, defaultStyle) => {\n const dir = element.style.direction || element.dir || defaultStyle.direction;\n\n if (dir) {\n format.direction = dir == 'rtl' ? 'rtl' : 'ltr';\n }\n },\n apply: (format, element) => {\n if (format.direction) {\n element.style.direction = format.direction;\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var displayFormatHandler = {
|
|
5
|
+
parse: function (format, element) {
|
|
6
|
+
var display = element.style.display;
|
|
7
|
+
if (display) {
|
|
8
|
+
format.display = display;
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
apply: function (format, element) {
|
|
12
|
+
if (format.display) {
|
|
13
|
+
element.style.display = format.display;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=displayFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"displayFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/displayFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAiC;IAC9D,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;QAEtC,IAAI,OAAO,EAAE;YACT,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;SAC5B;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAI,MAAM,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;SAC1C;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { DisplayFormat } from 'roosterjs-content-model-types';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * @internal\n */\nexport const displayFormatHandler: FormatHandler<DisplayFormat> = {\n parse: (format, element) => {\n const display = element.style.display;\n\n if (display) {\n format.display = display;\n }\n },\n apply: (format, element) => {\n if (format.display) {\n element.style.display = format.display;\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DirectionFormat, HtmlAlignFormat, TextAlignFormat } from 'roosterjs-content-model-types';
|
|
2
|
+
import { FormatHandler } from '../FormatHandler';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const htmlAlignFormatHandler: FormatHandler<DirectionFormat & HtmlAlignFormat & TextAlignFormat>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { calcAlign, ResultMap } from '../utils/dir';
|
|
2
|
+
import { directionFormatHandler } from './directionFormatHandler';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export var htmlAlignFormatHandler = {
|
|
7
|
+
parse: function (format, element, context, defaultStyle) {
|
|
8
|
+
directionFormatHandler.parse(format, element, context, defaultStyle);
|
|
9
|
+
var htmlAlign = element.getAttribute('align');
|
|
10
|
+
if (htmlAlign) {
|
|
11
|
+
format.htmlAlign = calcAlign(htmlAlign, format.direction);
|
|
12
|
+
delete format.textAlign;
|
|
13
|
+
delete context.blockFormat.textAlign;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
apply: function (format, element) {
|
|
17
|
+
var dir = format.direction == 'rtl' ? 'rtl' : 'ltr';
|
|
18
|
+
if (format.htmlAlign) {
|
|
19
|
+
element.setAttribute('align', ResultMap[format.htmlAlign][dir]);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=htmlAlignFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"htmlAlignFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/htmlAlignFormatHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;GAEG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAE/B;IACA,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY;QAC1C,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QAErE,IAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAEhD,IAAI,SAAS,EAAE;YACX,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;YAC1D,OAAO,MAAM,CAAC,SAAS,CAAC;YACxB,OAAO,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC;SACxC;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAM,GAAG,GAAkB,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAErE,IAAI,MAAM,CAAC,SAAS,EAAE;YAClB,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SACnE;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { calcAlign, ResultMap } from '../utils/dir';\nimport { DirectionFormat, HtmlAlignFormat, TextAlignFormat } from 'roosterjs-content-model-types';\nimport { directionFormatHandler } from './directionFormatHandler';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * @internal\n */\nexport const htmlAlignFormatHandler: FormatHandler<\n DirectionFormat & HtmlAlignFormat & TextAlignFormat\n> = {\n parse: (format, element, context, defaultStyle) => {\n directionFormatHandler.parse(format, element, context, defaultStyle);\n\n const htmlAlign = element.getAttribute('align');\n\n if (htmlAlign) {\n format.htmlAlign = calcAlign(htmlAlign, format.direction);\n delete format.textAlign;\n delete context.blockFormat.textAlign;\n }\n },\n apply: (format, element) => {\n const dir: 'ltr' | 'rtl' = format.direction == 'rtl' ? 'rtl' : 'ltr';\n\n if (format.htmlAlign) {\n element.setAttribute('align', ResultMap[format.htmlAlign][dir]);\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var lineHeightFormatHandler = {
|
|
5
|
+
parse: function (format, element, context, defaultStyle) {
|
|
6
|
+
var lineHeight = element.style.lineHeight || defaultStyle.lineHeight;
|
|
7
|
+
if (lineHeight && lineHeight != 'inherit') {
|
|
8
|
+
format.lineHeight = lineHeight;
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
apply: function (format, element) {
|
|
12
|
+
if (format.lineHeight) {
|
|
13
|
+
element.style.lineHeight = format.lineHeight;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=lineHeightFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineHeightFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/lineHeightFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAoC;IACpE,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY;QAC1C,IAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,YAAY,CAAC,UAAU,CAAC;QAEvE,IAAI,UAAU,IAAI,UAAU,IAAI,SAAS,EAAE;YACvC,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;SAClC;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAI,MAAM,CAAC,UAAU,EAAE;YACnB,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;SAChD;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { FormatHandler } from '../FormatHandler';\nimport { LineHeightFormat } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport const lineHeightFormatHandler: FormatHandler<LineHeightFormat> = {\n parse: (format, element, context, defaultStyle) => {\n const lineHeight = element.style.lineHeight || defaultStyle.lineHeight;\n\n if (lineHeight && lineHeight != 'inherit') {\n format.lineHeight = lineHeight;\n }\n },\n apply: (format, element) => {\n if (format.lineHeight) {\n element.style.lineHeight = format.lineHeight;\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { parseValueWithUnit } from '../utils/parseValueWithUnit';
|
|
2
|
+
var MarginKeys = [
|
|
3
|
+
'marginTop',
|
|
4
|
+
'marginRight',
|
|
5
|
+
'marginBottom',
|
|
6
|
+
'marginLeft',
|
|
7
|
+
];
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export var marginFormatHandler = {
|
|
12
|
+
parse: function (format, element, _, defaultStyle) {
|
|
13
|
+
MarginKeys.forEach(function (key) {
|
|
14
|
+
var value = element.style[key] || defaultStyle[key];
|
|
15
|
+
if (value) {
|
|
16
|
+
switch (key) {
|
|
17
|
+
case 'marginTop':
|
|
18
|
+
case 'marginBottom':
|
|
19
|
+
format[key] = value;
|
|
20
|
+
break;
|
|
21
|
+
case 'marginLeft':
|
|
22
|
+
case 'marginRight':
|
|
23
|
+
format[key] = format[key]
|
|
24
|
+
? parseValueWithUnit(format[key] || '', element) +
|
|
25
|
+
parseValueWithUnit(value, element) +
|
|
26
|
+
'px'
|
|
27
|
+
: value;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
apply: function (format, element, context) {
|
|
34
|
+
MarginKeys.forEach(function (key) {
|
|
35
|
+
var value = format[key];
|
|
36
|
+
if (value != context.implicitFormat[key]) {
|
|
37
|
+
element.style[key] = value || '0';
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=marginFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marginFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/marginFormatHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,IAAM,UAAU,GAAuD;IACnE,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAgC;IAC5D,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY;QACpC,UAAU,CAAC,OAAO,CAAC,UAAA,GAAG;YAClB,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;YAEtD,IAAI,KAAK,EAAE;gBACP,QAAQ,GAAG,EAAE;oBACT,KAAK,WAAW,CAAC;oBACjB,KAAK,cAAc;wBACf,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;wBACpB,MAAM;oBAEV,KAAK,YAAY,CAAC;oBAClB,KAAK,aAAa;wBACd,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC;4BACrB,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC;gCAC9C,kBAAkB,CAAC,KAAK,EAAE,OAAO,CAAC;gCAClC,IAAI;4BACN,CAAC,CAAC,KAAK,CAAC;wBACZ,MAAM;iBACb;aACJ;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO;QAC5B,UAAU,CAAC,OAAO,CAAC,UAAA,GAAG;YAClB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAE1B,IAAI,KAAK,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBACtC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,GAAG,CAAC;aACrC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC","sourcesContent":["import { FormatHandler } from '../FormatHandler';\nimport { MarginFormat } from 'roosterjs-content-model-types';\nimport { parseValueWithUnit } from '../utils/parseValueWithUnit';\n\nconst MarginKeys: (keyof MarginFormat & keyof CSSStyleDeclaration)[] = [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n];\n\n/**\n * @internal\n */\nexport const marginFormatHandler: FormatHandler<MarginFormat> = {\n parse: (format, element, _, defaultStyle) => {\n MarginKeys.forEach(key => {\n const value = element.style[key] || defaultStyle[key];\n\n if (value) {\n switch (key) {\n case 'marginTop':\n case 'marginBottom':\n format[key] = value;\n break;\n\n case 'marginLeft':\n case 'marginRight':\n format[key] = format[key]\n ? parseValueWithUnit(format[key] || '', element) +\n parseValueWithUnit(value, element) +\n 'px'\n : value;\n break;\n }\n }\n });\n },\n apply: (format, element, context) => {\n MarginKeys.forEach(key => {\n const value = format[key];\n\n if (value != context.implicitFormat[key]) {\n element.style[key] = value || '0';\n }\n });\n },\n};\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var PaddingKeys = [
|
|
2
|
+
'paddingTop',
|
|
3
|
+
'paddingRight',
|
|
4
|
+
'paddingBottom',
|
|
5
|
+
'paddingLeft',
|
|
6
|
+
];
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export var paddingFormatHandler = {
|
|
11
|
+
parse: function (format, element) {
|
|
12
|
+
PaddingKeys.forEach(function (key) {
|
|
13
|
+
var value = element.style[key];
|
|
14
|
+
if (value) {
|
|
15
|
+
format[key] = value;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
apply: function (format, element) {
|
|
20
|
+
PaddingKeys.forEach(function (key) {
|
|
21
|
+
var value = format[key];
|
|
22
|
+
if (value) {
|
|
23
|
+
element.style[key] = value;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=paddingFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paddingFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/paddingFormatHandler.ts"],"names":[],"mappings":"AAGA,IAAM,WAAW,GAAwD;IACrE,YAAY;IACZ,cAAc;IACd,eAAe;IACf,aAAa;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAiC;IAC9D,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,WAAW,CAAC,OAAO,CAAC,UAAA,GAAG;YACnB,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAEjC,IAAI,KAAK,EAAE;gBACP,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aACvB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,WAAW,CAAC,OAAO,CAAC,UAAA,GAAG;YACnB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,IAAI,KAAK,EAAE;gBACP,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aAC9B;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC","sourcesContent":["import { FormatHandler } from '../FormatHandler';\nimport { PaddingFormat } from 'roosterjs-content-model-types';\n\nconst PaddingKeys: (keyof PaddingFormat & keyof CSSStyleDeclaration)[] = [\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n];\n\n/**\n * @internal\n */\nexport const paddingFormatHandler: FormatHandler<PaddingFormat> = {\n parse: (format, element) => {\n PaddingKeys.forEach(key => {\n const value = element.style[key];\n\n if (value) {\n format[key] = value;\n }\n });\n },\n apply: (format, element) => {\n PaddingKeys.forEach(key => {\n const value = format[key];\n if (value) {\n element.style[key] = value;\n }\n });\n },\n};\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { calcAlign, ResultMap } from '../utils/dir';
|
|
2
|
+
import { directionFormatHandler } from './directionFormatHandler';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export var textAlignFormatHandler = {
|
|
7
|
+
parse: function (format, element, context, defaultStyle) {
|
|
8
|
+
var _a;
|
|
9
|
+
directionFormatHandler.parse(format, element, context, defaultStyle);
|
|
10
|
+
var textAlign = element.style.textAlign || defaultStyle.textAlign;
|
|
11
|
+
if (element.tagName == 'LI' &&
|
|
12
|
+
((_a = element.parentElement) === null || _a === void 0 ? void 0 : _a.style.display) === 'flex' &&
|
|
13
|
+
element.parentElement.style.flexDirection === 'column' &&
|
|
14
|
+
element.style.alignSelf) {
|
|
15
|
+
// For LI element with flex style applied, we use its "align-self" style value instead since LI has a different implementation for align
|
|
16
|
+
textAlign = element.style.alignSelf;
|
|
17
|
+
}
|
|
18
|
+
if (textAlign) {
|
|
19
|
+
format.textAlign = calcAlign(textAlign, format.direction);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
apply: function (format, element) {
|
|
23
|
+
var dir = format.direction == 'rtl' ? 'rtl' : 'ltr';
|
|
24
|
+
if (format.textAlign) {
|
|
25
|
+
var parent_1 = element.parentElement;
|
|
26
|
+
var parentTag = parent_1 === null || parent_1 === void 0 ? void 0 : parent_1.tagName;
|
|
27
|
+
if (element.tagName == 'LI' && parent_1 && (parentTag == 'OL' || parentTag == 'UL')) {
|
|
28
|
+
element.style.alignSelf = format.textAlign;
|
|
29
|
+
element.parentElement.style.flexDirection = 'column';
|
|
30
|
+
element.parentElement.style.display = 'flex';
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
element.style.textAlign = ResultMap[format.textAlign][dir];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=textAlignFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textAlignFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/textAlignFormatHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;GAEG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAqD;IACpF,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY;;QAC1C,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QAErE,IAAI,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,YAAY,CAAC,SAAS,CAAC;QAElE,IACI,OAAO,CAAC,OAAO,IAAI,IAAI;YACvB,CAAA,MAAA,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,OAAO,MAAK,MAAM;YAC/C,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ;YACtD,OAAO,CAAC,KAAK,CAAC,SAAS,EACzB;YACE,wIAAwI;YACxI,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;SACvC;QAED,IAAI,SAAS,EAAE;YACX,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;SAC7D;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAM,GAAG,GAAkB,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAErE,IAAI,MAAM,CAAC,SAAS,EAAE;YAClB,IAAM,QAAM,GAAG,OAAO,CAAC,aAAa,CAAC;YACrC,IAAM,SAAS,GAAG,QAAM,aAAN,QAAM,uBAAN,QAAM,CAAE,OAAO,CAAC;YAElC,IAAI,OAAO,CAAC,OAAO,IAAI,IAAI,IAAI,QAAM,IAAI,CAAC,SAAS,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,CAAC,EAAE;gBAC/E,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;gBAC3C,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC;gBACrD,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;aAChD;iBAAM;gBACH,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC;aAC9D;SACJ;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { calcAlign, ResultMap } from '../utils/dir';\nimport { DirectionFormat, TextAlignFormat } from 'roosterjs-content-model-types';\nimport { directionFormatHandler } from './directionFormatHandler';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * @internal\n */\nexport const textAlignFormatHandler: FormatHandler<DirectionFormat & TextAlignFormat> = {\n parse: (format, element, context, defaultStyle) => {\n directionFormatHandler.parse(format, element, context, defaultStyle);\n\n let textAlign = element.style.textAlign || defaultStyle.textAlign;\n\n if (\n element.tagName == 'LI' &&\n element.parentElement?.style.display === 'flex' &&\n element.parentElement.style.flexDirection === 'column' &&\n element.style.alignSelf\n ) {\n // For LI element with flex style applied, we use its \"align-self\" style value instead since LI has a different implementation for align\n textAlign = element.style.alignSelf;\n }\n\n if (textAlign) {\n format.textAlign = calcAlign(textAlign, format.direction);\n }\n },\n apply: (format, element) => {\n const dir: 'ltr' | 'rtl' = format.direction == 'rtl' ? 'rtl' : 'ltr';\n\n if (format.textAlign) {\n const parent = element.parentElement;\n const parentTag = parent?.tagName;\n\n if (element.tagName == 'LI' && parent && (parentTag == 'OL' || parentTag == 'UL')) {\n element.style.alignSelf = format.textAlign;\n element.parentElement.style.flexDirection = 'column';\n element.parentElement.style.display = 'flex';\n } else {\n element.style.textAlign = ResultMap[format.textAlign][dir];\n }\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var whiteSpaceFormatHandler = {
|
|
5
|
+
parse: function (format, element, _, defaultStyle) {
|
|
6
|
+
var whiteSpace = element.style.whiteSpace || defaultStyle.whiteSpace;
|
|
7
|
+
if (whiteSpace) {
|
|
8
|
+
format.whiteSpace = whiteSpace;
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
apply: function (format, element, context) {
|
|
12
|
+
var whiteSpace = context.implicitFormat.whiteSpace;
|
|
13
|
+
if (format.whiteSpace != whiteSpace) {
|
|
14
|
+
element.style.whiteSpace = format.whiteSpace || 'normal';
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=whiteSpaceFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whiteSpaceFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/block/whiteSpaceFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAAoC;IACpE,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY;QACpC,IAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,YAAY,CAAC,UAAU,CAAC;QAEvE,IAAI,UAAU,EAAE;YACZ,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;SAClC;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO;QAC5B,IAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC;QACrD,IAAI,MAAM,CAAC,UAAU,IAAI,UAAU,EAAE;YACjC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC;SAC5D;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { FormatHandler } from '../FormatHandler';\nimport { WhiteSpaceFormat } from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport const whiteSpaceFormatHandler: FormatHandler<WhiteSpaceFormat> = {\n parse: (format, element, _, defaultStyle) => {\n const whiteSpace = element.style.whiteSpace || defaultStyle.whiteSpace;\n\n if (whiteSpace) {\n format.whiteSpace = whiteSpace;\n }\n },\n apply: (format, element, context) => {\n const whiteSpace = context.implicitFormat.whiteSpace;\n if (format.whiteSpace != whiteSpace) {\n element.style.whiteSpace = format.whiteSpace || 'normal';\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getColor, setColor } from '../utils/color';
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export var backgroundColorFormatHandler = {
|
|
6
|
+
parse: function (format, element, context, defaultStyle) {
|
|
7
|
+
var backgroundColor = getColor(element, true /*isBackground*/, context.darkColorHandler, !!context.isDarkMode) || defaultStyle.backgroundColor;
|
|
8
|
+
if (backgroundColor) {
|
|
9
|
+
format.backgroundColor = backgroundColor;
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
apply: function (format, element, context) {
|
|
13
|
+
if (format.backgroundColor) {
|
|
14
|
+
setColor(element, format.backgroundColor, true /*isBackground*/, context.darkColorHandler, !!context.isDarkMode);
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=backgroundColorFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backgroundColorFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/backgroundColorFormatHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,IAAM,4BAA4B,GAAyC;IAC9E,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY;QAC1C,IAAM,eAAe,GACjB,QAAQ,CACJ,OAAO,EACP,IAAI,CAAC,gBAAgB,EACrB,OAAO,CAAC,gBAAgB,EACxB,CAAC,CAAC,OAAO,CAAC,UAAU,CACvB,IAAI,YAAY,CAAC,eAAe,CAAC;QAEtC,IAAI,eAAe,EAAE;YACjB,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;SAC5C;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO,EAAE,OAAO;QAC5B,IAAI,MAAM,CAAC,eAAe,EAAE;YACxB,QAAQ,CACJ,OAAO,EACP,MAAM,CAAC,eAAe,EACtB,IAAI,CAAC,gBAAgB,EACrB,OAAO,CAAC,gBAAgB,EACxB,CAAC,CAAC,OAAO,CAAC,UAAU,CACvB,CAAC;SACL;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { BackgroundColorFormat } from 'roosterjs-content-model-types';\nimport { FormatHandler } from '../FormatHandler';\nimport { getColor, setColor } from '../utils/color';\n\n/**\n * @internal\n */\nexport const backgroundColorFormatHandler: FormatHandler<BackgroundColorFormat> = {\n parse: (format, element, context, defaultStyle) => {\n const backgroundColor =\n getColor(\n element,\n true /*isBackground*/,\n context.darkColorHandler,\n !!context.isDarkMode\n ) || defaultStyle.backgroundColor;\n\n if (backgroundColor) {\n format.backgroundColor = backgroundColor;\n }\n },\n apply: (format, element, context) => {\n if (format.backgroundColor) {\n setColor(\n element,\n format.backgroundColor,\n true /*isBackground*/,\n context.darkColorHandler,\n !!context.isDarkMode\n );\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var borderBoxFormatHandler = {
|
|
5
|
+
parse: function (format, element) {
|
|
6
|
+
var _a;
|
|
7
|
+
if (((_a = element.style) === null || _a === void 0 ? void 0 : _a.boxSizing) == 'border-box') {
|
|
8
|
+
format.useBorderBox = true;
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
apply: function (format, element) {
|
|
12
|
+
if (format.useBorderBox) {
|
|
13
|
+
element.style.boxSizing = 'border-box';
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=borderBoxFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borderBoxFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderBoxFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAmC;IAClE,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;;QACnB,IAAI,CAAA,MAAA,OAAO,CAAC,KAAK,0CAAE,SAAS,KAAI,YAAY,EAAE;YAC1C,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;SAC9B;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAI,MAAM,CAAC,YAAY,EAAE;YACrB,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC;SAC1C;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { BorderBoxFormat } from 'roosterjs-content-model-types';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * @internal\n */\nexport const borderBoxFormatHandler: FormatHandler<BorderBoxFormat> = {\n parse: (format, element) => {\n if (element.style?.boxSizing == 'border-box') {\n format.useBorderBox = true;\n }\n },\n apply: (format, element) => {\n if (format.useBorderBox) {\n element.style.boxSizing = 'border-box';\n }\n },\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BorderFormat } from 'roosterjs-content-model-types';
|
|
2
|
+
import { FormatHandler } from '../FormatHandler';
|
|
3
|
+
/**
|
|
4
|
+
* Keys of border items
|
|
5
|
+
*/
|
|
6
|
+
export declare const BorderKeys: (keyof BorderFormat & keyof CSSStyleDeclaration)[];
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const borderFormatHandler: FormatHandler<BorderFormat>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keys of border items
|
|
3
|
+
*/
|
|
4
|
+
export var BorderKeys = [
|
|
5
|
+
'borderTop',
|
|
6
|
+
'borderRight',
|
|
7
|
+
'borderBottom',
|
|
8
|
+
'borderLeft',
|
|
9
|
+
'borderRadius',
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export var borderFormatHandler = {
|
|
15
|
+
parse: function (format, element) {
|
|
16
|
+
BorderKeys.forEach(function (key) {
|
|
17
|
+
var value = element.style[key];
|
|
18
|
+
if (value) {
|
|
19
|
+
format[key] = value == 'none' ? '' : value;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
apply: function (format, element) {
|
|
24
|
+
BorderKeys.forEach(function (key) {
|
|
25
|
+
var value = format[key];
|
|
26
|
+
if (value) {
|
|
27
|
+
element.style[key] = value;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=borderFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borderFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/borderFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,UAAU,GAAuD;IAC1E,WAAW;IACX,aAAa;IACb,cAAc;IACd,YAAY;IACZ,cAAc;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAgC;IAC5D,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,UAAU,CAAC,OAAO,CAAC,UAAA,GAAG;YAClB,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAEjC,IAAI,KAAK,EAAE;gBACP,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;aAC9C;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,UAAU,CAAC,OAAO,CAAC,UAAA,GAAG;YAClB,IAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAE1B,IAAI,KAAK,EAAE;gBACP,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aAC9B;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC","sourcesContent":["import { BorderFormat } from 'roosterjs-content-model-types';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * Keys of border items\n */\nexport const BorderKeys: (keyof BorderFormat & keyof CSSStyleDeclaration)[] = [\n 'borderTop',\n 'borderRight',\n 'borderBottom',\n 'borderLeft',\n 'borderRadius',\n];\n\n/**\n * @internal\n */\nexport const borderFormatHandler: FormatHandler<BorderFormat> = {\n parse: (format, element) => {\n BorderKeys.forEach(key => {\n const value = element.style[key];\n\n if (value) {\n format[key] = value == 'none' ? '' : value;\n }\n });\n },\n apply: (format, element) => {\n BorderKeys.forEach(key => {\n const value = format[key];\n\n if (value) {\n element.style[key] = value;\n }\n });\n },\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export var boxShadowFormatHandler = {
|
|
5
|
+
parse: function (format, element) {
|
|
6
|
+
var _a;
|
|
7
|
+
if ((_a = element.style) === null || _a === void 0 ? void 0 : _a.boxShadow) {
|
|
8
|
+
format.boxShadow = element.style.boxShadow;
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
apply: function (format, element) {
|
|
12
|
+
if (format.boxShadow) {
|
|
13
|
+
element.style.boxShadow = format.boxShadow;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=boxShadowFormatHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boxShadowFormatHandler.js","sourceRoot":"","sources":["../../../../../packages-content-model/roosterjs-content-model-dom/lib/formatHandlers/common/boxShadowFormatHandler.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,CAAC,IAAM,sBAAsB,GAAmC;IAClE,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;;QACnB,IAAI,MAAA,OAAO,CAAC,KAAK,0CAAE,SAAS,EAAE;YAC1B,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC;SAC9C;IACL,CAAC;IACD,KAAK,EAAE,UAAC,MAAM,EAAE,OAAO;QACnB,IAAI,MAAM,CAAC,SAAS,EAAE;YAClB,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;SAC9C;IACL,CAAC;CACJ,CAAC","sourcesContent":["import { BoxShadowFormat } from 'roosterjs-content-model-types';\nimport { FormatHandler } from '../FormatHandler';\n\n/**\n * @internal\n */\nexport const boxShadowFormatHandler: FormatHandler<BoxShadowFormat> = {\n parse: (format, element) => {\n if (element.style?.boxShadow) {\n format.boxShadow = element.style.boxShadow;\n }\n },\n apply: (format, element) => {\n if (format.boxShadow) {\n element.style.boxShadow = format.boxShadow;\n }\n },\n};\n"]}
|