roosterjs-content-model-api 0.27.0 → 0.28.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/lib/index.d.ts +46 -42
- package/lib/index.js +52 -43
- package/lib/index.js.map +1 -1
- package/lib/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib/modelApi/block/setModelDirection.js.map +1 -1
- package/lib/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib/modelApi/common/wrapBlock.js.map +1 -1
- package/lib/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib/modelApi/image/applyImageBorderFormat.d.ts +1 -1
- package/lib/modelApi/image/applyImageBorderFormat.js +2 -1
- package/lib/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib/modelApi/link/matchLink.d.ts +1 -18
- package/lib/modelApi/link/matchLink.js +0 -1
- package/lib/modelApi/link/matchLink.js.map +1 -1
- package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib/modelApi/list/setListType.js.map +1 -1
- package/lib/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib/modelApi/table/alignTable.js.map +1 -1
- package/lib/modelApi/table/alignTableCell.js.map +1 -1
- package/lib/modelApi/table/canMergeCells.js.map +1 -1
- package/lib/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib/modelApi/table/createTableStructure.js.map +1 -1
- package/lib/modelApi/table/deleteTable.js.map +1 -1
- package/lib/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib/modelApi/table/insertTableRow.js.map +1 -1
- package/lib/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib/publicApi/block/setAlignment.d.ts +1 -1
- package/lib/publicApi/block/setAlignment.js +2 -1
- package/lib/publicApi/block/setAlignment.js.map +1 -1
- package/lib/publicApi/block/setDirection.d.ts +1 -1
- package/lib/publicApi/block/setDirection.js +2 -1
- package/lib/publicApi/block/setDirection.js.map +1 -1
- package/lib/publicApi/block/setHeadingLevel.d.ts +1 -1
- package/lib/publicApi/block/setHeadingLevel.js +2 -1
- package/lib/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib/publicApi/block/setIndentation.d.ts +1 -1
- package/lib/publicApi/block/setIndentation.js +2 -1
- package/lib/publicApi/block/setIndentation.js.map +1 -1
- package/lib/publicApi/block/setParagraphMargin.d.ts +1 -1
- package/lib/publicApi/block/setParagraphMargin.js +2 -1
- package/lib/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib/publicApi/block/setSpacing.d.ts +1 -1
- package/lib/publicApi/block/setSpacing.js +2 -1
- package/lib/publicApi/block/setSpacing.js.map +1 -1
- package/lib/publicApi/block/toggleBlockQuote.d.ts +1 -1
- package/lib/publicApi/block/toggleBlockQuote.js +2 -1
- package/lib/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib/publicApi/entity/insertEntity.d.ts +2 -2
- package/lib/publicApi/entity/insertEntity.js +2 -1
- package/lib/publicApi/entity/insertEntity.js.map +1 -1
- package/lib/publicApi/format/clearFormat.d.ts +1 -1
- package/lib/publicApi/format/clearFormat.js +2 -1
- package/lib/publicApi/format/clearFormat.js.map +1 -1
- package/lib/publicApi/format/getFormatState.d.ts +1 -1
- package/lib/publicApi/format/getFormatState.js +2 -1
- package/lib/publicApi/format/getFormatState.js.map +1 -1
- package/lib/publicApi/image/adjustImageSelection.d.ts +1 -1
- package/lib/publicApi/image/adjustImageSelection.js +2 -1
- package/lib/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib/publicApi/image/changeImage.d.ts +1 -1
- package/lib/publicApi/image/changeImage.js +3 -2
- package/lib/publicApi/image/changeImage.js.map +1 -1
- package/lib/publicApi/image/insertImage.d.ts +1 -1
- package/lib/publicApi/image/insertImage.js +2 -1
- package/lib/publicApi/image/insertImage.js.map +1 -1
- package/lib/publicApi/image/setImageAltText.d.ts +1 -1
- package/lib/publicApi/image/setImageAltText.js +3 -2
- package/lib/publicApi/image/setImageAltText.js.map +1 -1
- package/lib/publicApi/image/setImageBorder.d.ts +1 -1
- package/lib/publicApi/image/setImageBorder.js +4 -3
- package/lib/publicApi/image/setImageBorder.js.map +1 -1
- package/lib/publicApi/image/setImageBoxShadow.d.ts +1 -1
- package/lib/publicApi/image/setImageBoxShadow.js +3 -2
- package/lib/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib/publicApi/link/adjustLinkSelection.d.ts +1 -1
- package/lib/publicApi/link/adjustLinkSelection.js +2 -1
- package/lib/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib/publicApi/link/insertLink.d.ts +1 -1
- package/lib/publicApi/link/insertLink.js +2 -1
- package/lib/publicApi/link/insertLink.js.map +1 -1
- package/lib/publicApi/link/removeLink.d.ts +1 -1
- package/lib/publicApi/link/removeLink.js +2 -1
- package/lib/publicApi/link/removeLink.js.map +1 -1
- package/lib/publicApi/list/setListStartNumber.d.ts +1 -1
- package/lib/publicApi/list/setListStartNumber.js +2 -1
- package/lib/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib/publicApi/list/setListStyle.d.ts +1 -1
- package/lib/publicApi/list/setListStyle.js +2 -1
- package/lib/publicApi/list/setListStyle.js.map +1 -1
- package/lib/publicApi/list/toggleBullet.d.ts +1 -1
- package/lib/publicApi/list/toggleBullet.js +2 -1
- package/lib/publicApi/list/toggleBullet.js.map +1 -1
- package/lib/publicApi/list/toggleNumbering.d.ts +1 -1
- package/lib/publicApi/list/toggleNumbering.js +2 -1
- package/lib/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib/publicApi/segment/applySegmentFormat.d.ts +1 -1
- package/lib/publicApi/segment/applySegmentFormat.js +2 -1
- package/lib/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib/publicApi/segment/changeCapitalization.d.ts +1 -1
- package/lib/publicApi/segment/changeCapitalization.js +2 -1
- package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib/publicApi/segment/changeFontSize.d.ts +1 -1
- package/lib/publicApi/segment/changeFontSize.js +2 -1
- package/lib/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib/publicApi/segment/setBackgroundColor.d.ts +1 -1
- package/lib/publicApi/segment/setBackgroundColor.js +2 -1
- package/lib/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib/publicApi/segment/setFontName.d.ts +1 -1
- package/lib/publicApi/segment/setFontName.js +2 -1
- package/lib/publicApi/segment/setFontName.js.map +1 -1
- package/lib/publicApi/segment/setFontSize.d.ts +1 -1
- package/lib/publicApi/segment/setFontSize.js +2 -2
- package/lib/publicApi/segment/setFontSize.js.map +1 -1
- package/lib/publicApi/segment/setTextColor.d.ts +1 -1
- package/lib/publicApi/segment/setTextColor.js +2 -1
- package/lib/publicApi/segment/setTextColor.js.map +1 -1
- package/lib/publicApi/segment/toggleBold.d.ts +1 -1
- package/lib/publicApi/segment/toggleBold.js +2 -1
- package/lib/publicApi/segment/toggleBold.js.map +1 -1
- package/lib/publicApi/segment/toggleCode.d.ts +1 -1
- package/lib/publicApi/segment/toggleCode.js +2 -1
- package/lib/publicApi/segment/toggleCode.js.map +1 -1
- package/lib/publicApi/segment/toggleItalic.d.ts +1 -1
- package/lib/publicApi/segment/toggleItalic.js +2 -1
- package/lib/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib/publicApi/segment/toggleStrikethrough.d.ts +1 -1
- package/lib/publicApi/segment/toggleStrikethrough.js +2 -1
- package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib/publicApi/segment/toggleSubscript.d.ts +1 -1
- package/lib/publicApi/segment/toggleSubscript.js +2 -1
- package/lib/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib/publicApi/segment/toggleSuperscript.d.ts +1 -1
- package/lib/publicApi/segment/toggleSuperscript.js +2 -1
- package/lib/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib/publicApi/segment/toggleUnderline.d.ts +1 -1
- package/lib/publicApi/segment/toggleUnderline.js +2 -1
- package/lib/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib/publicApi/table/applyTableBorderFormat.d.ts +1 -1
- package/lib/publicApi/table/applyTableBorderFormat.js +2 -1
- package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib/publicApi/table/editTable.d.ts +1 -1
- package/lib/publicApi/table/editTable.js +2 -1
- package/lib/publicApi/table/editTable.js.map +1 -1
- package/lib/publicApi/table/formatTable.d.ts +1 -1
- package/lib/publicApi/table/formatTable.js +2 -1
- package/lib/publicApi/table/formatTable.js.map +1 -1
- package/lib/publicApi/table/insertTable.d.ts +1 -1
- package/lib/publicApi/table/insertTable.js +2 -1
- package/lib/publicApi/table/insertTable.js.map +1 -1
- package/lib/publicApi/table/setTableCellShade.d.ts +1 -1
- package/lib/publicApi/table/setTableCellShade.js +2 -1
- package/lib/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib/publicApi/utils/formatImageWithContentModel.d.ts +5 -2
- package/lib/publicApi/utils/formatImageWithContentModel.js +6 -2
- package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +4 -1
- package/lib/publicApi/utils/formatParagraphWithContentModel.js +4 -1
- package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +7 -1
- package/lib/publicApi/utils/formatSegmentWithContentModel.js +7 -1
- package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-amd/index.d.ts +46 -42
- package/lib-amd/index.js +48 -44
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib-amd/modelApi/block/setModelDirection.js.map +1 -1
- package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-amd/modelApi/common/wrapBlock.js.map +1 -1
- package/lib-amd/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib-amd/modelApi/image/applyImageBorderFormat.d.ts +1 -1
- package/lib-amd/modelApi/image/applyImageBorderFormat.js +2 -1
- package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-amd/modelApi/link/matchLink.d.ts +1 -18
- package/lib-amd/modelApi/link/matchLink.js +0 -1
- package/lib-amd/modelApi/link/matchLink.js.map +1 -1
- package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-amd/modelApi/list/setListType.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib-amd/modelApi/table/alignTable.js.map +1 -1
- package/lib-amd/modelApi/table/alignTableCell.js.map +1 -1
- package/lib-amd/modelApi/table/canMergeCells.js.map +1 -1
- package/lib-amd/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib-amd/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTable.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib-amd/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib-amd/publicApi/block/setAlignment.d.ts +1 -1
- package/lib-amd/publicApi/block/setAlignment.js +2 -1
- package/lib-amd/publicApi/block/setAlignment.js.map +1 -1
- package/lib-amd/publicApi/block/setDirection.d.ts +1 -1
- package/lib-amd/publicApi/block/setDirection.js +2 -1
- package/lib-amd/publicApi/block/setDirection.js.map +1 -1
- package/lib-amd/publicApi/block/setHeadingLevel.d.ts +1 -1
- package/lib-amd/publicApi/block/setHeadingLevel.js +2 -1
- package/lib-amd/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib-amd/publicApi/block/setIndentation.d.ts +1 -1
- package/lib-amd/publicApi/block/setIndentation.js +2 -1
- package/lib-amd/publicApi/block/setIndentation.js.map +1 -1
- package/lib-amd/publicApi/block/setParagraphMargin.d.ts +1 -1
- package/lib-amd/publicApi/block/setParagraphMargin.js +2 -1
- package/lib-amd/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib-amd/publicApi/block/setSpacing.d.ts +1 -1
- package/lib-amd/publicApi/block/setSpacing.js +2 -1
- package/lib-amd/publicApi/block/setSpacing.js.map +1 -1
- package/lib-amd/publicApi/block/toggleBlockQuote.d.ts +1 -1
- package/lib-amd/publicApi/block/toggleBlockQuote.js +2 -1
- package/lib-amd/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib-amd/publicApi/entity/insertEntity.d.ts +2 -2
- package/lib-amd/publicApi/entity/insertEntity.js +2 -1
- package/lib-amd/publicApi/entity/insertEntity.js.map +1 -1
- package/lib-amd/publicApi/format/clearFormat.d.ts +1 -1
- package/lib-amd/publicApi/format/clearFormat.js +2 -1
- package/lib-amd/publicApi/format/clearFormat.js.map +1 -1
- package/lib-amd/publicApi/format/getFormatState.d.ts +1 -1
- package/lib-amd/publicApi/format/getFormatState.js +2 -1
- package/lib-amd/publicApi/format/getFormatState.js.map +1 -1
- package/lib-amd/publicApi/image/adjustImageSelection.d.ts +1 -1
- package/lib-amd/publicApi/image/adjustImageSelection.js +2 -1
- package/lib-amd/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib-amd/publicApi/image/changeImage.d.ts +1 -1
- package/lib-amd/publicApi/image/changeImage.js +3 -2
- package/lib-amd/publicApi/image/changeImage.js.map +1 -1
- package/lib-amd/publicApi/image/insertImage.d.ts +1 -1
- package/lib-amd/publicApi/image/insertImage.js +2 -1
- package/lib-amd/publicApi/image/insertImage.js.map +1 -1
- package/lib-amd/publicApi/image/setImageAltText.d.ts +1 -1
- package/lib-amd/publicApi/image/setImageAltText.js +3 -2
- package/lib-amd/publicApi/image/setImageAltText.js.map +1 -1
- package/lib-amd/publicApi/image/setImageBorder.d.ts +1 -1
- package/lib-amd/publicApi/image/setImageBorder.js +4 -3
- package/lib-amd/publicApi/image/setImageBorder.js.map +1 -1
- package/lib-amd/publicApi/image/setImageBoxShadow.d.ts +1 -1
- package/lib-amd/publicApi/image/setImageBoxShadow.js +3 -2
- package/lib-amd/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib-amd/publicApi/link/adjustLinkSelection.d.ts +1 -1
- package/lib-amd/publicApi/link/adjustLinkSelection.js +2 -1
- package/lib-amd/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib-amd/publicApi/link/insertLink.d.ts +1 -1
- package/lib-amd/publicApi/link/insertLink.js +2 -1
- package/lib-amd/publicApi/link/insertLink.js.map +1 -1
- package/lib-amd/publicApi/link/removeLink.d.ts +1 -1
- package/lib-amd/publicApi/link/removeLink.js +2 -1
- package/lib-amd/publicApi/link/removeLink.js.map +1 -1
- package/lib-amd/publicApi/list/setListStartNumber.d.ts +1 -1
- package/lib-amd/publicApi/list/setListStartNumber.js +2 -1
- package/lib-amd/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib-amd/publicApi/list/setListStyle.d.ts +1 -1
- package/lib-amd/publicApi/list/setListStyle.js +2 -1
- package/lib-amd/publicApi/list/setListStyle.js.map +1 -1
- package/lib-amd/publicApi/list/toggleBullet.d.ts +1 -1
- package/lib-amd/publicApi/list/toggleBullet.js +2 -1
- package/lib-amd/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-amd/publicApi/list/toggleNumbering.d.ts +1 -1
- package/lib-amd/publicApi/list/toggleNumbering.js +2 -1
- package/lib-amd/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib-amd/publicApi/segment/applySegmentFormat.d.ts +1 -1
- package/lib-amd/publicApi/segment/applySegmentFormat.js +2 -1
- package/lib-amd/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib-amd/publicApi/segment/changeCapitalization.d.ts +1 -1
- package/lib-amd/publicApi/segment/changeCapitalization.js +2 -1
- package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-amd/publicApi/segment/changeFontSize.d.ts +1 -1
- package/lib-amd/publicApi/segment/changeFontSize.js +2 -1
- package/lib-amd/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib-amd/publicApi/segment/setBackgroundColor.d.ts +1 -1
- package/lib-amd/publicApi/segment/setBackgroundColor.js +2 -1
- package/lib-amd/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib-amd/publicApi/segment/setFontName.d.ts +1 -1
- package/lib-amd/publicApi/segment/setFontName.js +2 -1
- package/lib-amd/publicApi/segment/setFontName.js.map +1 -1
- package/lib-amd/publicApi/segment/setFontSize.d.ts +1 -1
- package/lib-amd/publicApi/segment/setFontSize.js +2 -2
- package/lib-amd/publicApi/segment/setFontSize.js.map +1 -1
- package/lib-amd/publicApi/segment/setTextColor.d.ts +1 -1
- package/lib-amd/publicApi/segment/setTextColor.js +2 -1
- package/lib-amd/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleBold.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleBold.js +2 -1
- package/lib-amd/publicApi/segment/toggleBold.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleCode.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleCode.js +2 -1
- package/lib-amd/publicApi/segment/toggleCode.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleItalic.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleItalic.js +2 -1
- package/lib-amd/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleStrikethrough.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleStrikethrough.js +2 -1
- package/lib-amd/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleSubscript.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleSubscript.js +2 -1
- package/lib-amd/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleSuperscript.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleSuperscript.js +2 -1
- package/lib-amd/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleUnderline.d.ts +1 -1
- package/lib-amd/publicApi/segment/toggleUnderline.js +2 -1
- package/lib-amd/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib-amd/publicApi/table/applyTableBorderFormat.d.ts +1 -1
- package/lib-amd/publicApi/table/applyTableBorderFormat.js +2 -1
- package/lib-amd/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib-amd/publicApi/table/editTable.d.ts +1 -1
- package/lib-amd/publicApi/table/editTable.js +2 -1
- package/lib-amd/publicApi/table/editTable.js.map +1 -1
- package/lib-amd/publicApi/table/formatTable.d.ts +1 -1
- package/lib-amd/publicApi/table/formatTable.js +2 -1
- package/lib-amd/publicApi/table/formatTable.js.map +1 -1
- package/lib-amd/publicApi/table/insertTable.d.ts +1 -1
- package/lib-amd/publicApi/table/insertTable.js +2 -1
- package/lib-amd/publicApi/table/insertTable.js.map +1 -1
- package/lib-amd/publicApi/table/setTableCellShade.d.ts +1 -1
- package/lib-amd/publicApi/table/setTableCellShade.js +2 -1
- package/lib-amd/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-amd/publicApi/utils/formatImageWithContentModel.d.ts +5 -2
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js +6 -2
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +4 -1
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +4 -1
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +7 -1
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +7 -1
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-mjs/index.d.ts +46 -42
- package/lib-mjs/index.js +46 -42
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelDirection.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-mjs/modelApi/common/wrapBlock.js.map +1 -1
- package/lib-mjs/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib-mjs/modelApi/image/applyImageBorderFormat.d.ts +1 -1
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js +1 -1
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-mjs/modelApi/link/matchLink.d.ts +1 -18
- package/lib-mjs/modelApi/link/matchLink.js +0 -1
- package/lib-mjs/modelApi/link/matchLink.js.map +1 -1
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-mjs/modelApi/list/setListType.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib-mjs/modelApi/table/alignTable.js.map +1 -1
- package/lib-mjs/modelApi/table/alignTableCell.js.map +1 -1
- package/lib-mjs/modelApi/table/canMergeCells.js.map +1 -1
- package/lib-mjs/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTable.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib-mjs/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib-mjs/publicApi/block/setAlignment.d.ts +1 -1
- package/lib-mjs/publicApi/block/setAlignment.js +1 -1
- package/lib-mjs/publicApi/block/setAlignment.js.map +1 -1
- package/lib-mjs/publicApi/block/setDirection.d.ts +1 -1
- package/lib-mjs/publicApi/block/setDirection.js +1 -1
- package/lib-mjs/publicApi/block/setDirection.js.map +1 -1
- package/lib-mjs/publicApi/block/setHeadingLevel.d.ts +1 -1
- package/lib-mjs/publicApi/block/setHeadingLevel.js +1 -1
- package/lib-mjs/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib-mjs/publicApi/block/setIndentation.d.ts +1 -1
- package/lib-mjs/publicApi/block/setIndentation.js +1 -1
- package/lib-mjs/publicApi/block/setIndentation.js.map +1 -1
- package/lib-mjs/publicApi/block/setParagraphMargin.d.ts +1 -1
- package/lib-mjs/publicApi/block/setParagraphMargin.js +1 -1
- package/lib-mjs/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib-mjs/publicApi/block/setSpacing.d.ts +1 -1
- package/lib-mjs/publicApi/block/setSpacing.js +1 -1
- package/lib-mjs/publicApi/block/setSpacing.js.map +1 -1
- package/lib-mjs/publicApi/block/toggleBlockQuote.d.ts +1 -1
- package/lib-mjs/publicApi/block/toggleBlockQuote.js +1 -1
- package/lib-mjs/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib-mjs/publicApi/entity/insertEntity.d.ts +2 -2
- package/lib-mjs/publicApi/entity/insertEntity.js +1 -1
- package/lib-mjs/publicApi/entity/insertEntity.js.map +1 -1
- package/lib-mjs/publicApi/format/clearFormat.d.ts +1 -1
- package/lib-mjs/publicApi/format/clearFormat.js +1 -1
- package/lib-mjs/publicApi/format/clearFormat.js.map +1 -1
- package/lib-mjs/publicApi/format/getFormatState.d.ts +1 -1
- package/lib-mjs/publicApi/format/getFormatState.js +1 -1
- package/lib-mjs/publicApi/format/getFormatState.js.map +1 -1
- package/lib-mjs/publicApi/image/adjustImageSelection.d.ts +1 -1
- package/lib-mjs/publicApi/image/adjustImageSelection.js +1 -1
- package/lib-mjs/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib-mjs/publicApi/image/changeImage.d.ts +1 -1
- package/lib-mjs/publicApi/image/changeImage.js +2 -2
- package/lib-mjs/publicApi/image/changeImage.js.map +1 -1
- package/lib-mjs/publicApi/image/insertImage.d.ts +1 -1
- package/lib-mjs/publicApi/image/insertImage.js +1 -1
- package/lib-mjs/publicApi/image/insertImage.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageAltText.d.ts +1 -1
- package/lib-mjs/publicApi/image/setImageAltText.js +2 -2
- package/lib-mjs/publicApi/image/setImageAltText.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageBorder.d.ts +1 -1
- package/lib-mjs/publicApi/image/setImageBorder.js +3 -3
- package/lib-mjs/publicApi/image/setImageBorder.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageBoxShadow.d.ts +1 -1
- package/lib-mjs/publicApi/image/setImageBoxShadow.js +2 -2
- package/lib-mjs/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib-mjs/publicApi/link/adjustLinkSelection.d.ts +1 -1
- package/lib-mjs/publicApi/link/adjustLinkSelection.js +1 -1
- package/lib-mjs/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib-mjs/publicApi/link/insertLink.d.ts +1 -1
- package/lib-mjs/publicApi/link/insertLink.js +1 -1
- package/lib-mjs/publicApi/link/insertLink.js.map +1 -1
- package/lib-mjs/publicApi/link/removeLink.d.ts +1 -1
- package/lib-mjs/publicApi/link/removeLink.js +1 -1
- package/lib-mjs/publicApi/link/removeLink.js.map +1 -1
- package/lib-mjs/publicApi/list/setListStartNumber.d.ts +1 -1
- package/lib-mjs/publicApi/list/setListStartNumber.js +1 -1
- package/lib-mjs/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib-mjs/publicApi/list/setListStyle.d.ts +1 -1
- package/lib-mjs/publicApi/list/setListStyle.js +1 -1
- package/lib-mjs/publicApi/list/setListStyle.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleBullet.d.ts +1 -1
- package/lib-mjs/publicApi/list/toggleBullet.js +1 -1
- package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleNumbering.d.ts +1 -1
- package/lib-mjs/publicApi/list/toggleNumbering.js +1 -1
- package/lib-mjs/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib-mjs/publicApi/segment/applySegmentFormat.d.ts +1 -1
- package/lib-mjs/publicApi/segment/applySegmentFormat.js +1 -1
- package/lib-mjs/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib-mjs/publicApi/segment/changeCapitalization.d.ts +1 -1
- package/lib-mjs/publicApi/segment/changeCapitalization.js +1 -1
- package/lib-mjs/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-mjs/publicApi/segment/changeFontSize.d.ts +1 -1
- package/lib-mjs/publicApi/segment/changeFontSize.js +1 -1
- package/lib-mjs/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib-mjs/publicApi/segment/setBackgroundColor.d.ts +1 -1
- package/lib-mjs/publicApi/segment/setBackgroundColor.js +1 -1
- package/lib-mjs/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib-mjs/publicApi/segment/setFontName.d.ts +1 -1
- package/lib-mjs/publicApi/segment/setFontName.js +1 -1
- package/lib-mjs/publicApi/segment/setFontName.js.map +1 -1
- package/lib-mjs/publicApi/segment/setFontSize.d.ts +1 -1
- package/lib-mjs/publicApi/segment/setFontSize.js +1 -1
- package/lib-mjs/publicApi/segment/setFontSize.js.map +1 -1
- package/lib-mjs/publicApi/segment/setTextColor.d.ts +1 -1
- package/lib-mjs/publicApi/segment/setTextColor.js +1 -1
- package/lib-mjs/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleBold.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleBold.js +1 -1
- package/lib-mjs/publicApi/segment/toggleBold.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleCode.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleCode.js +1 -1
- package/lib-mjs/publicApi/segment/toggleCode.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleItalic.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleItalic.js +1 -1
- package/lib-mjs/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleStrikethrough.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js +1 -1
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleSubscript.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleSubscript.js +1 -1
- package/lib-mjs/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleSuperscript.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleSuperscript.js +1 -1
- package/lib-mjs/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleUnderline.d.ts +1 -1
- package/lib-mjs/publicApi/segment/toggleUnderline.js +1 -1
- package/lib-mjs/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib-mjs/publicApi/table/applyTableBorderFormat.d.ts +1 -1
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js +1 -1
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib-mjs/publicApi/table/editTable.d.ts +1 -1
- package/lib-mjs/publicApi/table/editTable.js +1 -1
- package/lib-mjs/publicApi/table/editTable.js.map +1 -1
- package/lib-mjs/publicApi/table/formatTable.d.ts +1 -1
- package/lib-mjs/publicApi/table/formatTable.js +1 -1
- package/lib-mjs/publicApi/table/formatTable.js.map +1 -1
- package/lib-mjs/publicApi/table/insertTable.d.ts +1 -1
- package/lib-mjs/publicApi/table/insertTable.js +1 -1
- package/lib-mjs/publicApi/table/insertTable.js.map +1 -1
- package/lib-mjs/publicApi/table/setTableCellShade.d.ts +1 -1
- package/lib-mjs/publicApi/table/setTableCellShade.js +1 -1
- package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +5 -2
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +5 -2
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +4 -1
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +4 -1
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +7 -1
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +7 -1
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insertTable.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"insertTable.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/table/insertTable.ts"],"names":[],"mappings":";;;AAAA,2EAAgG;AAChG,kFAAiF;AACjF,6EAMsC;AAGtC;;;;;;;;GAQG;AACH,SAAgB,WAAW,CACvB,MAAe,EACf,OAAe,EACf,IAAY,EACZ,MAAqC;IAErC,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;;QACX,IAAM,cAAc,GAAG,IAAA,8CAAe,EAAC,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC;QAEvE,IAAI,cAAc,EAAE;YAChB,IAAM,GAAG,GAAG,IAAA,wDAA0B,GAAE,CAAC;YACzC,IAAM,KAAK,GAAG,IAAA,2CAAoB,EAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YAEvD,IAAA,6CAAc,EAAC,KAAK,EAAE,MAAM,CAAC,gBAAgB,EAAE,IAAI,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACjF,gCAAgC;YAChC,MAAM,GAAG,MAAM,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;YAC5C,IAAA,+CAAgB,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAChC,IAAA,yCAAU,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;gBAC5B,cAAc,gBAAA;gBACd,WAAW,EAAE,UAAU;aAC1B,CAAC,CAAC;YAEH,IAAM,UAAU,GAAG,MAAA,MAAA,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC,CAAC,CAAC,CAAC;YAEtD,IAAI,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,KAAI,WAAW,EAAE;gBACtC,IAAM,MAAM,GAAG,IAAA,mDAAqB,EAAC,MAAA,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC,CAAC;gBACrE,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBACpC,IAAA,2CAAY,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;aAC/B;YAED,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,aAAa;KACzB,CACJ,CAAC;AACN,CAAC;AA1CD,kCA0CC","sourcesContent":["import { createContentModelDocument, createSelectionMarker } from 'roosterjs-content-model-dom';\nimport { createTableStructure } from '../../modelApi/table/createTableStructure';\nimport {\n applyTableFormat,\n deleteSelection,\n mergeModel,\n normalizeTable,\n setSelection,\n} from 'roosterjs-content-model-core';\nimport type { IEditor, TableMetadataFormat } from 'roosterjs-content-model-types';\n\n/**\n * Insert table into editor at current selection\n * @param editor The editor instance\n * @param columns Number of columns in table, it also controls the default table cell width:\n * if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px\n * @param rows Number of rows in table\n * @param format (Optional) The table format. If not passed, the default format will be applied:\n * background color: #FFF; border color: #ABABAB\n */\nexport function insertTable(\n editor: IEditor,\n columns: number,\n rows: number,\n format?: Partial<TableMetadataFormat>\n) {\n editor.focus();\n\n editor.formatContentModel(\n (model, context) => {\n const insertPosition = deleteSelection(model, [], context).insertPoint;\n\n if (insertPosition) {\n const doc = createContentModelDocument();\n const table = createTableStructure(doc, columns, rows);\n\n normalizeTable(table, editor.getPendingFormat() || insertPosition.marker.format);\n // Assign default vertical align\n format = format || { verticalAlign: 'top' };\n applyTableFormat(table, format);\n mergeModel(model, doc, context, {\n insertPosition,\n mergeFormat: 'mergeAll',\n });\n\n const firstBlock = table.rows[0]?.cells[0]?.blocks[0];\n\n if (firstBlock?.blockType == 'Paragraph') {\n const marker = createSelectionMarker(firstBlock.segments[0]?.format);\n firstBlock.segments.unshift(marker);\n setSelection(model, marker);\n }\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName: 'insertTable',\n }\n );\n}\n"]}
|
|
@@ -4,4 +4,4 @@ import type { IEditor } from 'roosterjs-content-model-types';
|
|
|
4
4
|
* @param editor The editor instance
|
|
5
5
|
* @param color The color to set. Pass null to remove existing shade color
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export declare function setTableCellShade(editor: IEditor, color: string | null): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setTableCellShade = void 0;
|
|
3
4
|
var tslib_1 = require("tslib");
|
|
4
5
|
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
5
6
|
/**
|
|
@@ -29,5 +30,5 @@ function setTableCellShade(editor, color) {
|
|
|
29
30
|
apiName: 'setTableCellShade',
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
exports.
|
|
33
|
+
exports.setTableCellShade = setTableCellShade;
|
|
33
34
|
//# sourceMappingURL=setTableCellShade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setTableCellShade.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"setTableCellShade.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/table/setTableCellShade.ts"],"names":[],"mappings":";;;;AAAA,6EAKsC;AAGtC;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,MAAe,EAAE,KAAoB;IACnE,MAAM,CAAC,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAU,IAAA,oDAAqB,EAAC,KAAK,CAAC,IAAA,EAArC,KAAK,QAAgC,CAAC;QAE7C,IAAI,KAAK,EAAE;YACP,IAAA,6CAAc,EAAC,KAAK,CAAC,CAAC;YAEtB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;gBAClB,OAAA,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;oBAClB,IAAI,IAAA,uDAAwB,EAAC,IAAI,CAAC,EAAE;wBAChC,IAAA,0DAA2B,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;qBACtE;gBACL,CAAC,CAAC;YAJF,CAIE,CACL,CAAC;YAEF,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,EAAE,mBAAmB;KAC/B,CACJ,CAAC;AACN,CAAC;AA3BD,8CA2BC","sourcesContent":["import {\n hasSelectionInBlockGroup,\n getFirstSelectedTable,\n normalizeTable,\n setTableCellBackgroundColor,\n} from 'roosterjs-content-model-core';\nimport type { IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Set table cell shade color\n * @param editor The editor instance\n * @param color The color to set. Pass null to remove existing shade color\n */\nexport function setTableCellShade(editor: IEditor, color: string | null) {\n editor.focus();\n\n editor.formatContentModel(\n model => {\n const [table] = getFirstSelectedTable(model);\n\n if (table) {\n normalizeTable(table);\n\n table.rows.forEach(row =>\n row.cells.forEach(cell => {\n if (hasSelectionInBlockGroup(cell)) {\n setTableCellBackgroundColor(cell, color, true /*isColorOverride*/);\n }\n })\n );\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName: 'setTableCellShade',\n }\n );\n}\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Invoke a callback to format the selected image using Content Model
|
|
4
|
+
* @param editor The editor object
|
|
5
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
6
|
+
* @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.
|
|
4
7
|
*/
|
|
5
|
-
export
|
|
8
|
+
export declare function formatImageWithContentModel(editor: IEditor, apiName: string, callback: (segment: ContentModelImage) => void): void;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatImageWithContentModel = void 0;
|
|
3
4
|
var formatSegmentWithContentModel_1 = require("./formatSegmentWithContentModel");
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Invoke a callback to format the selected image using Content Model
|
|
7
|
+
* @param editor The editor object
|
|
8
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
9
|
+
* @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.
|
|
6
10
|
*/
|
|
7
11
|
function formatImageWithContentModel(editor, apiName, callback) {
|
|
8
12
|
(0, formatSegmentWithContentModel_1.formatSegmentWithContentModel)(editor, apiName, function (_, __, segment) {
|
|
@@ -11,5 +15,5 @@ function formatImageWithContentModel(editor, apiName, callback) {
|
|
|
11
15
|
}
|
|
12
16
|
}, undefined /** segmentHasStyleCallback **/, undefined /** includingFormatHolder */);
|
|
13
17
|
}
|
|
14
|
-
exports.
|
|
18
|
+
exports.formatImageWithContentModel = formatImageWithContentModel;
|
|
15
19
|
//# sourceMappingURL=formatImageWithContentModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatImageWithContentModel.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"formatImageWithContentModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/formatImageWithContentModel.ts"],"names":[],"mappings":";;;AAAA,iFAAgF;AAGhF;;;;;GAKG;AACH,SAAgB,2BAA2B,CACvC,MAAe,EACf,OAAe,EACf,QAA8C;IAE9C,IAAA,6DAA6B,EACzB,MAAM,EACN,OAAO,EACP,UAAC,CAAC,EAAE,EAAE,EAAE,OAAO;QACX,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,KAAI,OAAO,EAAE;YACjC,QAAQ,CAAC,OAAO,CAAC,CAAC;SACrB;IACL,CAAC,EACD,SAAS,CAAC,+BAA+B,EACzC,SAAS,CAAC,4BAA4B,CACzC,CAAC;AACN,CAAC;AAhBD,kEAgBC","sourcesContent":["import { formatSegmentWithContentModel } from './formatSegmentWithContentModel';\nimport type { ContentModelImage, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Invoke a callback to format the selected image using Content Model\n * @param editor The editor object\n * @param apiName Name of API this calling this function. This is mostly for logging.\n * @param callback The callback to format the image. It will be called with current selected table. If no table is selected, it will not be called.\n */\nexport function formatImageWithContentModel(\n editor: IEditor,\n apiName: string,\n callback: (segment: ContentModelImage) => void\n) {\n formatSegmentWithContentModel(\n editor,\n apiName,\n (_, __, segment) => {\n if (segment?.segmentType == 'Image') {\n callback(segment);\n }\n },\n undefined /** segmentHasStyleCallback **/,\n undefined /** includingFormatHolder */\n );\n}\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ContentModelParagraph, IEditor } from 'roosterjs-content-model-types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Invoke a callback to format the selected paragraph using Content Model
|
|
4
|
+
* @param editor The editor object
|
|
5
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
6
|
+
* @param setStyleCallback The callback to format the paragraph. It will be called with current selected table. If no table is selected, it will not be called.
|
|
4
7
|
*/
|
|
5
8
|
export declare function formatParagraphWithContentModel(editor: IEditor, apiName: string, setStyleCallback: (paragraph: ContentModelParagraph) => void): void;
|
|
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.formatParagraphWithContentModel = void 0;
|
|
4
4
|
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Invoke a callback to format the selected paragraph using Content Model
|
|
7
|
+
* @param editor The editor object
|
|
8
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
9
|
+
* @param setStyleCallback The callback to format the paragraph. It will be called with current selected table. If no table is selected, it will not be called.
|
|
7
10
|
*/
|
|
8
11
|
function formatParagraphWithContentModel(editor, apiName, setStyleCallback) {
|
|
9
12
|
editor.formatContentModel(function (model, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatParagraphWithContentModel.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"formatParagraphWithContentModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/formatParagraphWithContentModel.ts"],"names":[],"mappings":";;;AAAA,6EAAqE;AAGrE;;;;;GAKG;AACH,SAAgB,+BAA+B,CAC3C,MAAe,EACf,OAAe,EACf,gBAA4D;IAE5D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAM,UAAU,GAAG,IAAA,oDAAqB,EAAC,KAAK,CAAC,CAAC;QAEhD,UAAU,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QACrC,OAAO,CAAC,gBAAgB,GAAG,UAAU,CAAC;QAEtC,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,EACD;QACI,OAAO,SAAA;KACV,CACJ,CAAC;AACN,CAAC;AAlBD,0EAkBC","sourcesContent":["import { getSelectedParagraphs } from 'roosterjs-content-model-core';\nimport type { ContentModelParagraph, IEditor } from 'roosterjs-content-model-types';\n\n/**\n * Invoke a callback to format the selected paragraph using Content Model\n * @param editor The editor object\n * @param apiName Name of API this calling this function. This is mostly for logging.\n * @param setStyleCallback The callback to format the paragraph. It will be called with current selected table. If no table is selected, it will not be called.\n */\nexport function formatParagraphWithContentModel(\n editor: IEditor,\n apiName: string,\n setStyleCallback: (paragraph: ContentModelParagraph) => void\n) {\n editor.formatContentModel(\n (model, context) => {\n const paragraphs = getSelectedParagraphs(model);\n\n paragraphs.forEach(setStyleCallback);\n context.newPendingFormat = 'preserve';\n\n return paragraphs.length > 0;\n },\n {\n apiName,\n }\n );\n}\n"]}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { ContentModelDocument, ContentModelParagraph, ContentModelSegment, ContentModelSegmentFormat, IEditor } from 'roosterjs-content-model-types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Invoke a callback to format the selected segment using Content Model
|
|
4
|
+
* @param editor The editor object
|
|
5
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
6
|
+
* @param toggleStyleCallback The callback to format the segment. It will be called with current selected table. If no table is selected, it will not be called.
|
|
7
|
+
* @param segmentHasStyleCallback The callback used for checking if the given segment already has required format
|
|
8
|
+
* @param includingFormatHolder True to also include format holder of list item when search selected segments
|
|
9
|
+
* @param afterFormatCallback A callback to invoke after format is applied to all selected segments and before the change is applied to DOM tree
|
|
4
10
|
*/
|
|
5
11
|
export declare function formatSegmentWithContentModel(editor: IEditor, apiName: string, toggleStyleCallback: (format: ContentModelSegmentFormat, isTuringOn: boolean, segment: ContentModelSegment | null, paragraph: ContentModelParagraph | null) => void, segmentHasStyleCallback?: (format: ContentModelSegmentFormat, segment: ContentModelSegment | null, paragraph: ContentModelParagraph | null) => boolean, includingFormatHolder?: boolean, afterFormatCallback?: (model: ContentModelDocument) => void): void;
|
|
@@ -5,7 +5,13 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var adjustWordSelection_1 = require("../../modelApi/selection/adjustWordSelection");
|
|
6
6
|
var roosterjs_content_model_core_1 = require("roosterjs-content-model-core");
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Invoke a callback to format the selected segment using Content Model
|
|
9
|
+
* @param editor The editor object
|
|
10
|
+
* @param apiName Name of API this calling this function. This is mostly for logging.
|
|
11
|
+
* @param toggleStyleCallback The callback to format the segment. It will be called with current selected table. If no table is selected, it will not be called.
|
|
12
|
+
* @param segmentHasStyleCallback The callback used for checking if the given segment already has required format
|
|
13
|
+
* @param includingFormatHolder True to also include format holder of list item when search selected segments
|
|
14
|
+
* @param afterFormatCallback A callback to invoke after format is applied to all selected segments and before the change is applied to DOM tree
|
|
9
15
|
*/
|
|
10
16
|
function formatSegmentWithContentModel(editor, apiName, toggleStyleCallback, segmentHasStyleCallback, includingFormatHolder, afterFormatCallback) {
|
|
11
17
|
editor.formatContentModel(function (model, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatSegmentWithContentModel.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"formatSegmentWithContentModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/formatSegmentWithContentModel.ts"],"names":[],"mappings":";;;;AAAA,oFAAmF;AACnF,6EAAgF;AAShF;;;;;;;;GAQG;AACH,SAAgB,6BAA6B,CACzC,MAAe,EACf,OAAe,EACf,mBAKS,EACT,uBAIY,EACZ,qBAA+B,EAC/B,mBAA2D;IAE3D,MAAM,CAAC,kBAAkB,CACrB,UAAC,KAAK,EAAE,OAAO;QACX,IAAI,oBAAoB,GAAG,IAAA,+DAAgC,EACvD,KAAK,EACL,CAAC,CAAC,qBAAqB,CAC1B,CAAC;QACF,IAAI,oBAAoB,GACpB,oBAAoB,CAAC,MAAM,IAAI,CAAC;YAChC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,iBAAiB,CAAC;QAEhE,IAAI,oBAAoB,EAAE;YACtB,IAAM,MAAI,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAExC,oBAAoB,GAAG,IAAA,yCAAmB,EACtC,KAAK,EACL,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC7B,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,EAAE,MAAI,CAAC,EAAT,CAAS,CAAC,CAAC;YAEtB,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACjC,oBAAoB,GAAG,KAAK,CAAC;aAChC;SACJ;QAED,IAAM,kBAAkB,GAIlB,oBAAoB,CAAC,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAlC,CAAkC,CAAC,CAAC;QAE3E,IAAM,YAAY,GAAG,uBAAuB;YACxC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,UAAC,EAA4B;oBAA5B,KAAA,0BAA4B,EAA3B,MAAM,QAAA,EAAE,OAAO,QAAA,EAAE,SAAS,QAAA;gBACjD,OAAA,uBAAuB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC;YAAnD,CAAmD,CACtD;YACH,CAAC,CAAC,KAAK,CAAC;QAEZ,kBAAkB,CAAC,OAAO,CAAC,UAAC,EAA4B;gBAA5B,KAAA,0BAA4B,EAA3B,MAAM,QAAA,EAAE,OAAO,QAAA,EAAE,SAAS,QAAA;YACnD,OAAA,mBAAmB,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,CAAC;QAA9D,CAA8D,CACjE,CAAC;QAEF,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAG,KAAK,CAAC,CAAC;QAE7B,IAAI,oBAAoB,EAAE;YACtB,OAAO,CAAC,gBAAgB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7D,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;SAChB;aAAM;YACH,OAAO,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC;SACxC;IACL,CAAC,EACD;QACI,OAAO,SAAA;KACV,CACJ,CAAC;AACN,CAAC;AAtED,sEAsEC","sourcesContent":["import { adjustWordSelection } from '../../modelApi/selection/adjustWordSelection';\nimport { getSelectedSegmentsAndParagraphs } from 'roosterjs-content-model-core';\nimport type {\n ContentModelDocument,\n ContentModelParagraph,\n ContentModelSegment,\n ContentModelSegmentFormat,\n IEditor,\n} from 'roosterjs-content-model-types';\n\n/**\n * Invoke a callback to format the selected segment using Content Model\n * @param editor The editor object\n * @param apiName Name of API this calling this function. This is mostly for logging.\n * @param toggleStyleCallback The callback to format the segment. It will be called with current selected table. If no table is selected, it will not be called.\n * @param segmentHasStyleCallback The callback used for checking if the given segment already has required format\n * @param includingFormatHolder True to also include format holder of list item when search selected segments\n * @param afterFormatCallback A callback to invoke after format is applied to all selected segments and before the change is applied to DOM tree\n */\nexport function formatSegmentWithContentModel(\n editor: IEditor,\n apiName: string,\n toggleStyleCallback: (\n format: ContentModelSegmentFormat,\n isTuringOn: boolean,\n segment: ContentModelSegment | null,\n paragraph: ContentModelParagraph | null\n ) => void,\n segmentHasStyleCallback?: (\n format: ContentModelSegmentFormat,\n segment: ContentModelSegment | null,\n paragraph: ContentModelParagraph | null\n ) => boolean,\n includingFormatHolder?: boolean,\n afterFormatCallback?: (model: ContentModelDocument) => void\n) {\n editor.formatContentModel(\n (model, context) => {\n let segmentAndParagraphs = getSelectedSegmentsAndParagraphs(\n model,\n !!includingFormatHolder\n );\n let isCollapsedSelection =\n segmentAndParagraphs.length == 1 &&\n segmentAndParagraphs[0][0].segmentType == 'SelectionMarker';\n\n if (isCollapsedSelection) {\n const para = segmentAndParagraphs[0][1];\n\n segmentAndParagraphs = adjustWordSelection(\n model,\n segmentAndParagraphs[0][0]\n ).map(x => [x, para]);\n\n if (segmentAndParagraphs.length > 1) {\n isCollapsedSelection = false;\n }\n }\n\n const formatsAndSegments: [\n ContentModelSegmentFormat,\n ContentModelSegment | null,\n ContentModelParagraph | null\n ][] = segmentAndParagraphs.map(item => [item[0].format, item[0], item[1]]);\n\n const isTurningOff = segmentHasStyleCallback\n ? formatsAndSegments.every(([format, segment, paragraph]) =>\n segmentHasStyleCallback(format, segment, paragraph)\n )\n : false;\n\n formatsAndSegments.forEach(([format, segment, paragraph]) =>\n toggleStyleCallback(format, !isTurningOff, segment, paragraph)\n );\n\n afterFormatCallback?.(model);\n\n if (isCollapsedSelection) {\n context.newPendingFormat = segmentAndParagraphs[0][0].format;\n editor.focus();\n return false;\n } else {\n return formatsAndSegments.length > 0;\n }\n },\n {\n apiName,\n }\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatTableWithContentModel.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"formatTableWithContentModel.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/publicApi/utils/formatTableWithContentModel.ts"],"names":[],"mappings":";;;;AAAA,0GAAyG;AACzG,2EAIqC;AACrC,6EAMsC;AAGtC;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACvC,MAAe,EACf,OAAe,EACf,QAAiD,EACjD,iBAAkC;IAElC,MAAM,CAAC,kBAAkB,CACrB,UAAA,KAAK;QACK,IAAA,KAAA,oBAAqB,IAAA,oDAAqB,EAAC,KAAK,CAAC,IAAA,EAAhD,UAAU,QAAA,EAAE,IAAI,QAAgC,CAAC;QAExD,IAAI,UAAU,EAAE;YACZ,QAAQ,CAAC,UAAU,CAAC,CAAC;YAErB,IAAI,CAAC,IAAA,kDAAmB,EAAC,UAAU,CAAC,EAAE;gBAClC,IAAM,SAAS,GAAG,IAAA,mEAAgC,EAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;gBAE5E,IAAI,SAAS,EAAE;oBACX,IAAM,MAAM,GAAG,IAAA,mDAAqB,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;oBAEnD,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;oBACnC,IAAA,qDAAuB,EAAC,SAAS,CAAC,CAAC;oBACnC,IAAA,2CAAY,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC;iBAC/B;aACJ;YAED,IAAA,6CAAc,EAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAEzC,IAAI,IAAA,yCAAW,EAAC,UAAU,CAAC,EAAE;gBACzB,IAAA,+CAAgB,EAAC,UAAU,EAAE,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;aACjF;YAED,OAAO,IAAI,CAAC;SACf;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC,EACD;QACI,OAAO,SAAA;QACP,iBAAiB,mBAAA;KACpB,CACJ,CAAC;AACN,CAAC;AAzCD,kEAyCC","sourcesContent":["import { ensureFocusableParagraphForTable } from '../../modelApi/table/ensureFocusableParagraphForTable';\nimport {\n createSelectionMarker,\n hasMetadata,\n setParagraphNotImplicit,\n} from 'roosterjs-content-model-dom';\nimport {\n hasSelectionInBlock,\n applyTableFormat,\n getFirstSelectedTable,\n normalizeTable,\n setSelection,\n} from 'roosterjs-content-model-core';\nimport type { ContentModelTable, IEditor, TableSelection } from 'roosterjs-content-model-types';\n\n/**\n * Invoke a callback to format the selected table using Content Model\n * @param editor The editor object\n * @param apiName Name of API this calling this function. This is mostly for logging.\n * @param callback The callback to format the table. It will be called with current selected table. If no table is selected, it will not be called.\n * @param selectionOverride Override the current selection. If we want to format a table even currently it is not selected, we can use this parameter to override current selection\n */\nexport function formatTableWithContentModel(\n editor: IEditor,\n apiName: string,\n callback: (tableModel: ContentModelTable) => void,\n selectionOverride?: TableSelection\n) {\n editor.formatContentModel(\n model => {\n const [tableModel, path] = getFirstSelectedTable(model);\n\n if (tableModel) {\n callback(tableModel);\n\n if (!hasSelectionInBlock(tableModel)) {\n const paragraph = ensureFocusableParagraphForTable(model, path, tableModel);\n\n if (paragraph) {\n const marker = createSelectionMarker(model.format);\n\n paragraph.segments.unshift(marker);\n setParagraphNotImplicit(paragraph);\n setSelection(model, marker);\n }\n }\n\n normalizeTable(tableModel, model.format);\n\n if (hasMetadata(tableModel)) {\n applyTableFormat(tableModel, undefined /*newFormat*/, true /*keepCellShade*/);\n }\n\n return true;\n } else {\n return false;\n }\n },\n {\n apiName,\n selectionOverride,\n }\n );\n}\n"]}
|
package/lib-amd/index.d.ts
CHANGED
|
@@ -1,48 +1,52 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
1
|
+
export { insertTable } from './publicApi/table/insertTable';
|
|
2
|
+
export { formatTable } from './publicApi/table/formatTable';
|
|
3
|
+
export { setTableCellShade } from './publicApi/table/setTableCellShade';
|
|
4
|
+
export { editTable } from './publicApi/table/editTable';
|
|
5
|
+
export { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';
|
|
6
|
+
export { toggleBullet } from './publicApi/list/toggleBullet';
|
|
7
|
+
export { toggleNumbering } from './publicApi/list/toggleNumbering';
|
|
8
|
+
export { toggleBold } from './publicApi/segment/toggleBold';
|
|
9
|
+
export { toggleItalic } from './publicApi/segment/toggleItalic';
|
|
10
|
+
export { toggleUnderline } from './publicApi/segment/toggleUnderline';
|
|
11
|
+
export { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';
|
|
12
|
+
export { toggleSubscript } from './publicApi/segment/toggleSubscript';
|
|
13
|
+
export { toggleSuperscript } from './publicApi/segment/toggleSuperscript';
|
|
14
|
+
export { setBackgroundColor } from './publicApi/segment/setBackgroundColor';
|
|
15
|
+
export { setFontName } from './publicApi/segment/setFontName';
|
|
16
|
+
export { setFontSize } from './publicApi/segment/setFontSize';
|
|
17
|
+
export { setTextColor } from './publicApi/segment/setTextColor';
|
|
18
|
+
export { changeFontSize } from './publicApi/segment/changeFontSize';
|
|
19
|
+
export { applySegmentFormat } from './publicApi/segment/applySegmentFormat';
|
|
20
|
+
export { changeCapitalization } from './publicApi/segment/changeCapitalization';
|
|
21
|
+
export { insertImage } from './publicApi/image/insertImage';
|
|
22
|
+
export { setListStyle } from './publicApi/list/setListStyle';
|
|
23
|
+
export { setListStartNumber } from './publicApi/list/setListStartNumber';
|
|
24
|
+
export { setIndentation } from './publicApi/block/setIndentation';
|
|
25
|
+
export { setAlignment } from './publicApi/block/setAlignment';
|
|
26
|
+
export { setDirection } from './publicApi/block/setDirection';
|
|
27
|
+
export { setHeadingLevel } from './publicApi/block/setHeadingLevel';
|
|
28
|
+
export { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';
|
|
29
|
+
export { setSpacing } from './publicApi/block/setSpacing';
|
|
30
|
+
export { setImageBorder } from './publicApi/image/setImageBorder';
|
|
31
|
+
export { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';
|
|
32
|
+
export { changeImage } from './publicApi/image/changeImage';
|
|
33
|
+
export { getFormatState } from './publicApi/format/getFormatState';
|
|
34
|
+
export { clearFormat } from './publicApi/format/clearFormat';
|
|
35
|
+
export { insertLink } from './publicApi/link/insertLink';
|
|
36
|
+
export { removeLink } from './publicApi/link/removeLink';
|
|
37
|
+
export { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';
|
|
38
|
+
export { setImageAltText } from './publicApi/image/setImageAltText';
|
|
39
|
+
export { adjustImageSelection } from './publicApi/image/adjustImageSelection';
|
|
40
|
+
export { setParagraphMargin } from './publicApi/block/setParagraphMargin';
|
|
41
|
+
export { toggleCode } from './publicApi/segment/toggleCode';
|
|
42
|
+
export { insertEntity } from './publicApi/entity/insertEntity';
|
|
43
43
|
export { insertTableRow } from './modelApi/table/insertTableRow';
|
|
44
44
|
export { insertTableColumn } from './modelApi/table/insertTableColumn';
|
|
45
45
|
export { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';
|
|
46
|
+
export { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';
|
|
47
|
+
export { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';
|
|
48
|
+
export { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';
|
|
46
49
|
export { setListType } from './modelApi/list/setListType';
|
|
47
50
|
export { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';
|
|
48
51
|
export { setModelIndentation } from './modelApi/block/setModelIndentation';
|
|
52
|
+
export { matchLink } from './modelApi/link/matchLink';
|
package/lib-amd/index.js
CHANGED
|
@@ -1,54 +1,58 @@
|
|
|
1
|
-
define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/table/formatTable", "./publicApi/table/setTableCellShade", "./publicApi/table/editTable", "./publicApi/table/applyTableBorderFormat", "./publicApi/list/toggleBullet", "./publicApi/list/toggleNumbering", "./publicApi/segment/toggleBold", "./publicApi/segment/toggleItalic", "./publicApi/segment/toggleUnderline", "./publicApi/segment/toggleStrikethrough", "./publicApi/segment/toggleSubscript", "./publicApi/segment/toggleSuperscript", "./publicApi/segment/setBackgroundColor", "./publicApi/segment/setFontName", "./publicApi/segment/setFontSize", "./publicApi/segment/setTextColor", "./publicApi/segment/changeFontSize", "./publicApi/segment/applySegmentFormat", "./publicApi/segment/changeCapitalization", "./publicApi/image/insertImage", "./publicApi/list/setListStyle", "./publicApi/list/setListStartNumber", "./publicApi/block/setIndentation", "./publicApi/block/setAlignment", "./publicApi/block/setDirection", "./publicApi/block/setHeadingLevel", "./publicApi/block/toggleBlockQuote", "./publicApi/block/setSpacing", "./publicApi/image/setImageBorder", "./publicApi/image/setImageBoxShadow", "./publicApi/image/changeImage", "./publicApi/format/getFormatState", "./publicApi/format/clearFormat", "./publicApi/link/insertLink", "./publicApi/link/removeLink", "./publicApi/link/adjustLinkSelection", "./publicApi/image/setImageAltText", "./publicApi/image/adjustImageSelection", "./publicApi/block/setParagraphMargin", "./publicApi/segment/toggleCode", "./publicApi/entity/insertEntity", "./modelApi/table/insertTableRow", "./modelApi/table/insertTableColumn", "./publicApi/utils/formatTableWithContentModel", "./modelApi/list/setListType", "./modelApi/list/findListItemsInSameThread", "./modelApi/block/setModelIndentation"], function (require, exports, insertTable_1, formatTable_1, setTableCellShade_1, editTable_1, applyTableBorderFormat_1, toggleBullet_1, toggleNumbering_1, toggleBold_1, toggleItalic_1, toggleUnderline_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, setBackgroundColor_1, setFontName_1, setFontSize_1, setTextColor_1, changeFontSize_1, applySegmentFormat_1, changeCapitalization_1, insertImage_1, setListStyle_1, setListStartNumber_1, setIndentation_1, setAlignment_1, setDirection_1, setHeadingLevel_1, toggleBlockQuote_1, setSpacing_1, setImageBorder_1, setImageBoxShadow_1, changeImage_1, getFormatState_1, clearFormat_1, insertLink_1, removeLink_1, adjustLinkSelection_1, setImageAltText_1, adjustImageSelection_1, setParagraphMargin_1, toggleCode_1, insertEntity_1, insertTableRow_1, insertTableColumn_1, formatTableWithContentModel_1, setListType_1, findListItemsInSameThread_1, setModelIndentation_1) {
|
|
1
|
+
define(["require", "exports", "./publicApi/table/insertTable", "./publicApi/table/formatTable", "./publicApi/table/setTableCellShade", "./publicApi/table/editTable", "./publicApi/table/applyTableBorderFormat", "./publicApi/list/toggleBullet", "./publicApi/list/toggleNumbering", "./publicApi/segment/toggleBold", "./publicApi/segment/toggleItalic", "./publicApi/segment/toggleUnderline", "./publicApi/segment/toggleStrikethrough", "./publicApi/segment/toggleSubscript", "./publicApi/segment/toggleSuperscript", "./publicApi/segment/setBackgroundColor", "./publicApi/segment/setFontName", "./publicApi/segment/setFontSize", "./publicApi/segment/setTextColor", "./publicApi/segment/changeFontSize", "./publicApi/segment/applySegmentFormat", "./publicApi/segment/changeCapitalization", "./publicApi/image/insertImage", "./publicApi/list/setListStyle", "./publicApi/list/setListStartNumber", "./publicApi/block/setIndentation", "./publicApi/block/setAlignment", "./publicApi/block/setDirection", "./publicApi/block/setHeadingLevel", "./publicApi/block/toggleBlockQuote", "./publicApi/block/setSpacing", "./publicApi/image/setImageBorder", "./publicApi/image/setImageBoxShadow", "./publicApi/image/changeImage", "./publicApi/format/getFormatState", "./publicApi/format/clearFormat", "./publicApi/link/insertLink", "./publicApi/link/removeLink", "./publicApi/link/adjustLinkSelection", "./publicApi/image/setImageAltText", "./publicApi/image/adjustImageSelection", "./publicApi/block/setParagraphMargin", "./publicApi/segment/toggleCode", "./publicApi/entity/insertEntity", "./modelApi/table/insertTableRow", "./modelApi/table/insertTableColumn", "./publicApi/utils/formatTableWithContentModel", "./publicApi/utils/formatImageWithContentModel", "./publicApi/utils/formatParagraphWithContentModel", "./publicApi/utils/formatSegmentWithContentModel", "./modelApi/list/setListType", "./modelApi/list/findListItemsInSameThread", "./modelApi/block/setModelIndentation", "./modelApi/link/matchLink"], function (require, exports, insertTable_1, formatTable_1, setTableCellShade_1, editTable_1, applyTableBorderFormat_1, toggleBullet_1, toggleNumbering_1, toggleBold_1, toggleItalic_1, toggleUnderline_1, toggleStrikethrough_1, toggleSubscript_1, toggleSuperscript_1, setBackgroundColor_1, setFontName_1, setFontSize_1, setTextColor_1, changeFontSize_1, applySegmentFormat_1, changeCapitalization_1, insertImage_1, setListStyle_1, setListStartNumber_1, setIndentation_1, setAlignment_1, setDirection_1, setHeadingLevel_1, toggleBlockQuote_1, setSpacing_1, setImageBorder_1, setImageBoxShadow_1, changeImage_1, getFormatState_1, clearFormat_1, insertLink_1, removeLink_1, adjustLinkSelection_1, setImageAltText_1, adjustImageSelection_1, setParagraphMargin_1, toggleCode_1, insertEntity_1, insertTableRow_1, insertTableColumn_1, formatTableWithContentModel_1, formatImageWithContentModel_1, formatParagraphWithContentModel_1, formatSegmentWithContentModel_1, setListType_1, findListItemsInSameThread_1, setModelIndentation_1, matchLink_1) {
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.setModelIndentation = exports.findListItemsInSameThread = exports.setListType = exports.formatTableWithContentModel = exports.insertTableColumn = exports.insertTableRow = exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
|
|
5
|
-
Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.
|
|
6
|
-
Object.defineProperty(exports, "formatTable", { enumerable: true, get: function () { return formatTable_1.
|
|
7
|
-
Object.defineProperty(exports, "setTableCellShade", { enumerable: true, get: function () { return setTableCellShade_1.
|
|
8
|
-
Object.defineProperty(exports, "editTable", { enumerable: true, get: function () { return editTable_1.
|
|
9
|
-
Object.defineProperty(exports, "applyTableBorderFormat", { enumerable: true, get: function () { return applyTableBorderFormat_1.
|
|
10
|
-
Object.defineProperty(exports, "toggleBullet", { enumerable: true, get: function () { return toggleBullet_1.
|
|
11
|
-
Object.defineProperty(exports, "toggleNumbering", { enumerable: true, get: function () { return toggleNumbering_1.
|
|
12
|
-
Object.defineProperty(exports, "toggleBold", { enumerable: true, get: function () { return toggleBold_1.
|
|
13
|
-
Object.defineProperty(exports, "toggleItalic", { enumerable: true, get: function () { return toggleItalic_1.
|
|
14
|
-
Object.defineProperty(exports, "toggleUnderline", { enumerable: true, get: function () { return toggleUnderline_1.
|
|
15
|
-
Object.defineProperty(exports, "toggleStrikethrough", { enumerable: true, get: function () { return toggleStrikethrough_1.
|
|
16
|
-
Object.defineProperty(exports, "toggleSubscript", { enumerable: true, get: function () { return toggleSubscript_1.
|
|
17
|
-
Object.defineProperty(exports, "toggleSuperscript", { enumerable: true, get: function () { return toggleSuperscript_1.
|
|
18
|
-
Object.defineProperty(exports, "setBackgroundColor", { enumerable: true, get: function () { return setBackgroundColor_1.
|
|
19
|
-
Object.defineProperty(exports, "setFontName", { enumerable: true, get: function () { return setFontName_1.
|
|
20
|
-
Object.defineProperty(exports, "setFontSize", { enumerable: true, get: function () { return setFontSize_1.
|
|
21
|
-
Object.defineProperty(exports, "setTextColor", { enumerable: true, get: function () { return setTextColor_1.
|
|
22
|
-
Object.defineProperty(exports, "changeFontSize", { enumerable: true, get: function () { return changeFontSize_1.
|
|
23
|
-
Object.defineProperty(exports, "applySegmentFormat", { enumerable: true, get: function () { return applySegmentFormat_1.
|
|
24
|
-
Object.defineProperty(exports, "changeCapitalization", { enumerable: true, get: function () { return changeCapitalization_1.
|
|
25
|
-
Object.defineProperty(exports, "insertImage", { enumerable: true, get: function () { return insertImage_1.
|
|
26
|
-
Object.defineProperty(exports, "setListStyle", { enumerable: true, get: function () { return setListStyle_1.
|
|
27
|
-
Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.
|
|
28
|
-
Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.
|
|
29
|
-
Object.defineProperty(exports, "setAlignment", { enumerable: true, get: function () { return setAlignment_1.
|
|
30
|
-
Object.defineProperty(exports, "setDirection", { enumerable: true, get: function () { return setDirection_1.
|
|
31
|
-
Object.defineProperty(exports, "setHeadingLevel", { enumerable: true, get: function () { return setHeadingLevel_1.
|
|
32
|
-
Object.defineProperty(exports, "toggleBlockQuote", { enumerable: true, get: function () { return toggleBlockQuote_1.
|
|
33
|
-
Object.defineProperty(exports, "setSpacing", { enumerable: true, get: function () { return setSpacing_1.
|
|
34
|
-
Object.defineProperty(exports, "setImageBorder", { enumerable: true, get: function () { return setImageBorder_1.
|
|
35
|
-
Object.defineProperty(exports, "setImageBoxShadow", { enumerable: true, get: function () { return setImageBoxShadow_1.
|
|
36
|
-
Object.defineProperty(exports, "changeImage", { enumerable: true, get: function () { return changeImage_1.
|
|
37
|
-
Object.defineProperty(exports, "getFormatState", { enumerable: true, get: function () { return getFormatState_1.
|
|
38
|
-
Object.defineProperty(exports, "clearFormat", { enumerable: true, get: function () { return clearFormat_1.
|
|
39
|
-
Object.defineProperty(exports, "insertLink", { enumerable: true, get: function () { return insertLink_1.
|
|
40
|
-
Object.defineProperty(exports, "removeLink", { enumerable: true, get: function () { return removeLink_1.
|
|
41
|
-
Object.defineProperty(exports, "adjustLinkSelection", { enumerable: true, get: function () { return adjustLinkSelection_1.
|
|
42
|
-
Object.defineProperty(exports, "setImageAltText", { enumerable: true, get: function () { return setImageAltText_1.
|
|
43
|
-
Object.defineProperty(exports, "adjustImageSelection", { enumerable: true, get: function () { return adjustImageSelection_1.
|
|
44
|
-
Object.defineProperty(exports, "setParagraphMargin", { enumerable: true, get: function () { return setParagraphMargin_1.
|
|
45
|
-
Object.defineProperty(exports, "toggleCode", { enumerable: true, get: function () { return toggleCode_1.
|
|
46
|
-
Object.defineProperty(exports, "insertEntity", { enumerable: true, get: function () { return insertEntity_1.
|
|
4
|
+
exports.matchLink = exports.setModelIndentation = exports.findListItemsInSameThread = exports.setListType = exports.formatSegmentWithContentModel = exports.formatParagraphWithContentModel = exports.formatImageWithContentModel = exports.formatTableWithContentModel = exports.insertTableColumn = exports.insertTableRow = exports.insertEntity = exports.toggleCode = exports.setParagraphMargin = exports.adjustImageSelection = exports.setImageAltText = exports.adjustLinkSelection = exports.removeLink = exports.insertLink = exports.clearFormat = exports.getFormatState = exports.changeImage = exports.setImageBoxShadow = exports.setImageBorder = exports.setSpacing = exports.toggleBlockQuote = exports.setHeadingLevel = exports.setDirection = exports.setAlignment = exports.setIndentation = exports.setListStartNumber = exports.setListStyle = exports.insertImage = exports.changeCapitalization = exports.applySegmentFormat = exports.changeFontSize = exports.setTextColor = exports.setFontSize = exports.setFontName = exports.setBackgroundColor = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleUnderline = exports.toggleItalic = exports.toggleBold = exports.toggleNumbering = exports.toggleBullet = exports.applyTableBorderFormat = exports.editTable = exports.setTableCellShade = exports.formatTable = exports.insertTable = void 0;
|
|
5
|
+
Object.defineProperty(exports, "insertTable", { enumerable: true, get: function () { return insertTable_1.insertTable; } });
|
|
6
|
+
Object.defineProperty(exports, "formatTable", { enumerable: true, get: function () { return formatTable_1.formatTable; } });
|
|
7
|
+
Object.defineProperty(exports, "setTableCellShade", { enumerable: true, get: function () { return setTableCellShade_1.setTableCellShade; } });
|
|
8
|
+
Object.defineProperty(exports, "editTable", { enumerable: true, get: function () { return editTable_1.editTable; } });
|
|
9
|
+
Object.defineProperty(exports, "applyTableBorderFormat", { enumerable: true, get: function () { return applyTableBorderFormat_1.applyTableBorderFormat; } });
|
|
10
|
+
Object.defineProperty(exports, "toggleBullet", { enumerable: true, get: function () { return toggleBullet_1.toggleBullet; } });
|
|
11
|
+
Object.defineProperty(exports, "toggleNumbering", { enumerable: true, get: function () { return toggleNumbering_1.toggleNumbering; } });
|
|
12
|
+
Object.defineProperty(exports, "toggleBold", { enumerable: true, get: function () { return toggleBold_1.toggleBold; } });
|
|
13
|
+
Object.defineProperty(exports, "toggleItalic", { enumerable: true, get: function () { return toggleItalic_1.toggleItalic; } });
|
|
14
|
+
Object.defineProperty(exports, "toggleUnderline", { enumerable: true, get: function () { return toggleUnderline_1.toggleUnderline; } });
|
|
15
|
+
Object.defineProperty(exports, "toggleStrikethrough", { enumerable: true, get: function () { return toggleStrikethrough_1.toggleStrikethrough; } });
|
|
16
|
+
Object.defineProperty(exports, "toggleSubscript", { enumerable: true, get: function () { return toggleSubscript_1.toggleSubscript; } });
|
|
17
|
+
Object.defineProperty(exports, "toggleSuperscript", { enumerable: true, get: function () { return toggleSuperscript_1.toggleSuperscript; } });
|
|
18
|
+
Object.defineProperty(exports, "setBackgroundColor", { enumerable: true, get: function () { return setBackgroundColor_1.setBackgroundColor; } });
|
|
19
|
+
Object.defineProperty(exports, "setFontName", { enumerable: true, get: function () { return setFontName_1.setFontName; } });
|
|
20
|
+
Object.defineProperty(exports, "setFontSize", { enumerable: true, get: function () { return setFontSize_1.setFontSize; } });
|
|
21
|
+
Object.defineProperty(exports, "setTextColor", { enumerable: true, get: function () { return setTextColor_1.setTextColor; } });
|
|
22
|
+
Object.defineProperty(exports, "changeFontSize", { enumerable: true, get: function () { return changeFontSize_1.changeFontSize; } });
|
|
23
|
+
Object.defineProperty(exports, "applySegmentFormat", { enumerable: true, get: function () { return applySegmentFormat_1.applySegmentFormat; } });
|
|
24
|
+
Object.defineProperty(exports, "changeCapitalization", { enumerable: true, get: function () { return changeCapitalization_1.changeCapitalization; } });
|
|
25
|
+
Object.defineProperty(exports, "insertImage", { enumerable: true, get: function () { return insertImage_1.insertImage; } });
|
|
26
|
+
Object.defineProperty(exports, "setListStyle", { enumerable: true, get: function () { return setListStyle_1.setListStyle; } });
|
|
27
|
+
Object.defineProperty(exports, "setListStartNumber", { enumerable: true, get: function () { return setListStartNumber_1.setListStartNumber; } });
|
|
28
|
+
Object.defineProperty(exports, "setIndentation", { enumerable: true, get: function () { return setIndentation_1.setIndentation; } });
|
|
29
|
+
Object.defineProperty(exports, "setAlignment", { enumerable: true, get: function () { return setAlignment_1.setAlignment; } });
|
|
30
|
+
Object.defineProperty(exports, "setDirection", { enumerable: true, get: function () { return setDirection_1.setDirection; } });
|
|
31
|
+
Object.defineProperty(exports, "setHeadingLevel", { enumerable: true, get: function () { return setHeadingLevel_1.setHeadingLevel; } });
|
|
32
|
+
Object.defineProperty(exports, "toggleBlockQuote", { enumerable: true, get: function () { return toggleBlockQuote_1.toggleBlockQuote; } });
|
|
33
|
+
Object.defineProperty(exports, "setSpacing", { enumerable: true, get: function () { return setSpacing_1.setSpacing; } });
|
|
34
|
+
Object.defineProperty(exports, "setImageBorder", { enumerable: true, get: function () { return setImageBorder_1.setImageBorder; } });
|
|
35
|
+
Object.defineProperty(exports, "setImageBoxShadow", { enumerable: true, get: function () { return setImageBoxShadow_1.setImageBoxShadow; } });
|
|
36
|
+
Object.defineProperty(exports, "changeImage", { enumerable: true, get: function () { return changeImage_1.changeImage; } });
|
|
37
|
+
Object.defineProperty(exports, "getFormatState", { enumerable: true, get: function () { return getFormatState_1.getFormatState; } });
|
|
38
|
+
Object.defineProperty(exports, "clearFormat", { enumerable: true, get: function () { return clearFormat_1.clearFormat; } });
|
|
39
|
+
Object.defineProperty(exports, "insertLink", { enumerable: true, get: function () { return insertLink_1.insertLink; } });
|
|
40
|
+
Object.defineProperty(exports, "removeLink", { enumerable: true, get: function () { return removeLink_1.removeLink; } });
|
|
41
|
+
Object.defineProperty(exports, "adjustLinkSelection", { enumerable: true, get: function () { return adjustLinkSelection_1.adjustLinkSelection; } });
|
|
42
|
+
Object.defineProperty(exports, "setImageAltText", { enumerable: true, get: function () { return setImageAltText_1.setImageAltText; } });
|
|
43
|
+
Object.defineProperty(exports, "adjustImageSelection", { enumerable: true, get: function () { return adjustImageSelection_1.adjustImageSelection; } });
|
|
44
|
+
Object.defineProperty(exports, "setParagraphMargin", { enumerable: true, get: function () { return setParagraphMargin_1.setParagraphMargin; } });
|
|
45
|
+
Object.defineProperty(exports, "toggleCode", { enumerable: true, get: function () { return toggleCode_1.toggleCode; } });
|
|
46
|
+
Object.defineProperty(exports, "insertEntity", { enumerable: true, get: function () { return insertEntity_1.insertEntity; } });
|
|
47
47
|
Object.defineProperty(exports, "insertTableRow", { enumerable: true, get: function () { return insertTableRow_1.insertTableRow; } });
|
|
48
48
|
Object.defineProperty(exports, "insertTableColumn", { enumerable: true, get: function () { return insertTableColumn_1.insertTableColumn; } });
|
|
49
49
|
Object.defineProperty(exports, "formatTableWithContentModel", { enumerable: true, get: function () { return formatTableWithContentModel_1.formatTableWithContentModel; } });
|
|
50
|
+
Object.defineProperty(exports, "formatImageWithContentModel", { enumerable: true, get: function () { return formatImageWithContentModel_1.formatImageWithContentModel; } });
|
|
51
|
+
Object.defineProperty(exports, "formatParagraphWithContentModel", { enumerable: true, get: function () { return formatParagraphWithContentModel_1.formatParagraphWithContentModel; } });
|
|
52
|
+
Object.defineProperty(exports, "formatSegmentWithContentModel", { enumerable: true, get: function () { return formatSegmentWithContentModel_1.formatSegmentWithContentModel; } });
|
|
50
53
|
Object.defineProperty(exports, "setListType", { enumerable: true, get: function () { return setListType_1.setListType; } });
|
|
51
54
|
Object.defineProperty(exports, "findListItemsInSameThread", { enumerable: true, get: function () { return findListItemsInSameThread_1.findListItemsInSameThread; } });
|
|
52
55
|
Object.defineProperty(exports, "setModelIndentation", { enumerable: true, get: function () { return setModelIndentation_1.setModelIndentation; } });
|
|
56
|
+
Object.defineProperty(exports, "matchLink", { enumerable: true, get: function () { return matchLink_1.matchLink; } });
|
|
53
57
|
});
|
|
54
58
|
//# sourceMappingURL=index.js.map
|
package/lib-amd/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../packages/roosterjs-content-model-api/lib/index.ts"],"names":[],"mappings":";;;;IAAS,0GAAA,WAAW,OAAA;IACX,0GAAA,WAAW,OAAA;IACX,sHAAA,iBAAiB,OAAA;IACjB,sGAAA,SAAS,OAAA;IACT,gIAAA,sBAAsB,OAAA;IACtB,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,wGAAA,UAAU,OAAA;IACV,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,0HAAA,mBAAmB,OAAA;IACnB,kHAAA,eAAe,OAAA;IACf,sHAAA,iBAAiB,OAAA;IACjB,wHAAA,kBAAkB,OAAA;IAClB,0GAAA,WAAW,OAAA;IACX,0GAAA,WAAW,OAAA;IACX,4GAAA,YAAY,OAAA;IACZ,gHAAA,cAAc,OAAA;IACd,wHAAA,kBAAkB,OAAA;IAClB,4HAAA,oBAAoB,OAAA;IACpB,0GAAA,WAAW,OAAA;IACX,4GAAA,YAAY,OAAA;IACZ,wHAAA,kBAAkB,OAAA;IAClB,gHAAA,cAAc,OAAA;IACd,4GAAA,YAAY,OAAA;IACZ,4GAAA,YAAY,OAAA;IACZ,kHAAA,eAAe,OAAA;IACf,oHAAA,gBAAgB,OAAA;IAChB,wGAAA,UAAU,OAAA;IACV,gHAAA,cAAc,OAAA;IACd,sHAAA,iBAAiB,OAAA;IACjB,0GAAA,WAAW,OAAA;IACX,gHAAA,cAAc,OAAA;IACd,0GAAA,WAAW,OAAA;IACX,wGAAA,UAAU,OAAA;IACV,wGAAA,UAAU,OAAA;IACV,0HAAA,mBAAmB,OAAA;IACnB,kHAAA,eAAe,OAAA;IACf,4HAAA,oBAAoB,OAAA;IACpB,wHAAA,kBAAkB,OAAA;IAClB,wGAAA,UAAU,OAAA;IACV,4GAAA,YAAY,OAAA;IACZ,gHAAA,cAAc,OAAA;IACd,sHAAA,iBAAiB,OAAA;IAEjB,0IAAA,2BAA2B,OAAA;IAC3B,0IAAA,2BAA2B,OAAA;IAC3B,kJAAA,+BAA+B,OAAA;IAC/B,8IAAA,6BAA6B,OAAA;IAE7B,0GAAA,WAAW,OAAA;IACX,sIAAA,yBAAyB,OAAA;IACzB,0HAAA,mBAAmB,OAAA;IACnB,sGAAA,SAAS,OAAA","sourcesContent":["export { insertTable } from './publicApi/table/insertTable';\nexport { formatTable } from './publicApi/table/formatTable';\nexport { setTableCellShade } from './publicApi/table/setTableCellShade';\nexport { editTable } from './publicApi/table/editTable';\nexport { applyTableBorderFormat } from './publicApi/table/applyTableBorderFormat';\nexport { toggleBullet } from './publicApi/list/toggleBullet';\nexport { toggleNumbering } from './publicApi/list/toggleNumbering';\nexport { toggleBold } from './publicApi/segment/toggleBold';\nexport { toggleItalic } from './publicApi/segment/toggleItalic';\nexport { toggleUnderline } from './publicApi/segment/toggleUnderline';\nexport { toggleStrikethrough } from './publicApi/segment/toggleStrikethrough';\nexport { toggleSubscript } from './publicApi/segment/toggleSubscript';\nexport { toggleSuperscript } from './publicApi/segment/toggleSuperscript';\nexport { setBackgroundColor } from './publicApi/segment/setBackgroundColor';\nexport { setFontName } from './publicApi/segment/setFontName';\nexport { setFontSize } from './publicApi/segment/setFontSize';\nexport { setTextColor } from './publicApi/segment/setTextColor';\nexport { changeFontSize } from './publicApi/segment/changeFontSize';\nexport { applySegmentFormat } from './publicApi/segment/applySegmentFormat';\nexport { changeCapitalization } from './publicApi/segment/changeCapitalization';\nexport { insertImage } from './publicApi/image/insertImage';\nexport { setListStyle } from './publicApi/list/setListStyle';\nexport { setListStartNumber } from './publicApi/list/setListStartNumber';\nexport { setIndentation } from './publicApi/block/setIndentation';\nexport { setAlignment } from './publicApi/block/setAlignment';\nexport { setDirection } from './publicApi/block/setDirection';\nexport { setHeadingLevel } from './publicApi/block/setHeadingLevel';\nexport { toggleBlockQuote } from './publicApi/block/toggleBlockQuote';\nexport { setSpacing } from './publicApi/block/setSpacing';\nexport { setImageBorder } from './publicApi/image/setImageBorder';\nexport { setImageBoxShadow } from './publicApi/image/setImageBoxShadow';\nexport { changeImage } from './publicApi/image/changeImage';\nexport { getFormatState } from './publicApi/format/getFormatState';\nexport { clearFormat } from './publicApi/format/clearFormat';\nexport { insertLink } from './publicApi/link/insertLink';\nexport { removeLink } from './publicApi/link/removeLink';\nexport { adjustLinkSelection } from './publicApi/link/adjustLinkSelection';\nexport { setImageAltText } from './publicApi/image/setImageAltText';\nexport { adjustImageSelection } from './publicApi/image/adjustImageSelection';\nexport { setParagraphMargin } from './publicApi/block/setParagraphMargin';\nexport { toggleCode } from './publicApi/segment/toggleCode';\nexport { insertEntity } from './publicApi/entity/insertEntity';\nexport { insertTableRow } from './modelApi/table/insertTableRow';\nexport { insertTableColumn } from './modelApi/table/insertTableColumn';\n\nexport { formatTableWithContentModel } from './publicApi/utils/formatTableWithContentModel';\nexport { formatImageWithContentModel } from './publicApi/utils/formatImageWithContentModel';\nexport { formatParagraphWithContentModel } from './publicApi/utils/formatParagraphWithContentModel';\nexport { formatSegmentWithContentModel } from './publicApi/utils/formatSegmentWithContentModel';\n\nexport { setListType } from './modelApi/list/setListType';\nexport { findListItemsInSameThread } from './modelApi/list/findListItemsInSameThread';\nexport { setModelIndentation } from './modelApi/block/setModelIndentation';\nexport { matchLink } from './modelApi/link/matchLink';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setModelAlignment.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"setModelAlignment.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/block/setModelAlignment.ts"],"names":[],"mappings":";;;;IAQA,IAAM,SAAS,GAGX;QACA,IAAI,EAAE;YACF,GAAG,EAAE,OAAO;YACZ,GAAG,EAAE,KAAK;SACb;QACD,MAAM,EAAE;YACJ,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;SAChB;QACD,KAAK,EAAE;YACH,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,OAAO;SACf;QACD,OAAO,EAAE;YACL,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;SACjB;KACJ,CAAC;IAEF,IAAM,aAAa,GAGf;QACA,IAAI,EAAE;YACF,GAAG,EAAE,WAAW;YAChB,GAAG,EAAE,YAAY;SACpB;QACD,MAAM,EAAE;YACJ,GAAG,EAAE,aAAa;YAClB,GAAG,EAAE,aAAa;SACrB;QACD,KAAK,EAAE;YACH,GAAG,EAAE,YAAY;YACjB,GAAG,EAAE,WAAW;SACnB;KACJ,CAAC;IAEF;;OAEG;IACH,SAAgB,iBAAiB,CAC7B,KAA2B,EAC3B,SAAkD;QAElD,IAAM,0BAA0B,GAAG,IAAA,mDAAoB,EACnD,KAAK,EACL,CAAC,UAAU,CAAC,EACZ,CAAC,WAAW,CAAC,CAChB,CAAC;QAEF,0BAA0B,CAAC,OAAO,CAAC,UAAC,EAAS;gBAAP,KAAK,WAAA;YACvC,IAAM,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC3F,IAAI,KAAK,CAAC,SAAS,KAAK,OAAO,IAAI,SAAS,KAAK,SAAS,EAAE;gBACxD,IAAA,uBAAU,EACN,KAAK,EACL,aAAa,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAC5E,CAAC;aACL;iBAAM,IAAI,KAAK,EAAE;gBACd,IAAI,KAAK,CAAC,SAAS,KAAK,YAAY,IAAI,KAAK,CAAC,cAAc,KAAK,UAAU,EAAE;oBACzE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,CAAC;wBACV,IAAA,MAAM,GAAK,CAAC,OAAN,CAAO;wBACrB,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC;oBACpC,CAAC,CAAC,CAAC;iBACN;gBACO,IAAA,MAAM,GAAK,KAAK,OAAV,CAAW;gBACzB,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC;aACnC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,0BAA0B,CAAC,MAAM,GAAG,CAAC,CAAC;IACjD,CAAC;IA9BD,8CA8BC","sourcesContent":["import { alignTable } from '../table/alignTable';\nimport { getOperationalBlocks } from 'roosterjs-content-model-core';\nimport type {\n ContentModelDocument,\n ContentModelListItem,\n TableAlignOperation,\n} from 'roosterjs-content-model-types';\n\nconst ResultMap: Record<\n 'left' | 'center' | 'right' | 'justify',\n Record<'ltr' | 'rtl', 'start' | 'center' | 'end' | 'justify'>\n> = {\n left: {\n ltr: 'start',\n rtl: 'end',\n },\n center: {\n ltr: 'center',\n rtl: 'center',\n },\n right: {\n ltr: 'end',\n rtl: 'start',\n },\n justify: {\n ltr: 'justify',\n rtl: 'justify',\n },\n};\n\nconst TableAlignMap: Record<\n 'left' | 'center' | 'right',\n Record<'ltr' | 'rtl', TableAlignOperation>\n> = {\n left: {\n ltr: 'alignLeft',\n rtl: 'alignRight',\n },\n center: {\n ltr: 'alignCenter',\n rtl: 'alignCenter',\n },\n right: {\n ltr: 'alignRight',\n rtl: 'alignLeft',\n },\n};\n\n/**\n * @internal\n */\nexport function setModelAlignment(\n model: ContentModelDocument,\n alignment: 'left' | 'center' | 'right' | 'justify'\n) {\n const paragraphOrListItemOrTable = getOperationalBlocks<ContentModelListItem>(\n model,\n ['ListItem'],\n ['TableCell']\n );\n\n paragraphOrListItemOrTable.forEach(({ block }) => {\n const newAlignment = ResultMap[alignment][block.format.direction == 'rtl' ? 'rtl' : 'ltr'];\n if (block.blockType === 'Table' && alignment !== 'justify') {\n alignTable(\n block,\n TableAlignMap[alignment][block.format.direction == 'rtl' ? 'rtl' : 'ltr']\n );\n } else if (block) {\n if (block.blockType === 'BlockGroup' && block.blockGroupType === 'ListItem') {\n block.blocks.forEach(b => {\n const { format } = b;\n format.textAlign = newAlignment;\n });\n }\n const { format } = block;\n format.textAlign = newAlignment;\n }\n });\n\n return paragraphOrListItemOrTable.length > 0;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setModelDirection.js","sourceRoot":"","sources":["../../../../../packages
|
|
1
|
+
{"version":3,"file":"setModelDirection.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/block/setModelDirection.ts"],"names":[],"mappings":";;;;IAiBA;;OAEG;IACH,SAAgB,iBAAiB,CAAC,KAA2B,EAAE,SAAwB;QACnF,IAAM,0BAA0B,GAAG,IAAA,mDAAoB,EACnD,KAAK,EACL,CAAC,UAAU,CAAC,EACZ,CAAC,WAAW,CAAC,CAChB,CAAC;QAEF,0BAA0B,CAAC,OAAO,CAAC,UAAC,EAAS;gBAAP,KAAK,WAAA;YACvC,IAAI,IAAA,iDAAkB,EAAuB,KAAK,EAAE,UAAU,CAAC,EAAE;gBAC7D,IAAM,KAAK,GAAG,IAAA,qDAAyB,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAEtD,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;oBACd,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK;wBACrB,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;oBACvC,CAAC,CAAC,CAAC;oBAEH,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,UAAA,KAAK,IAAI,OAAA,oBAAoB,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,EAA7C,CAA6C,CAAC,CAAC;gBAChF,CAAC,CAAC,CAAC;aACN;iBAAM,IAAI,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;aACxD;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,0BAA0B,CAAC,MAAM,GAAG,CAAC,CAAC;IACjD,CAAC;IAxBD,8CAwBC;IAED,SAAS,oBAAoB,CACzB,MAA+B,EAC/B,SAAwB,EACxB,KAAyB;QAEzB,IAAM,MAAM,GAAG,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC;QACzC,IAAM,KAAK,GAAG,SAAS,IAAI,KAAK,CAAC;QAEjC,IAAI,MAAM,IAAI,KAAK,EAAE;YACjB,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;YAE7B,sCAAsC;YACtC,IAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;YACrC,IAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;YAEvC,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;YACtD,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;YAC/C,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;YACxD,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;YAEjD,2DAA2D;YAC3D,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,IAAI,OAAO,EAAE;gBACrC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAA,GAAG;oBAClB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,UAAA,IAAI;wBAClB,oDAAoD;wBACpD,IAAA,sDAAuB,EAAC,IAAI,EAAE,UAAA,QAAQ;4BAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,EAAE;gCAC1B,IAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;gCAC/C,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;gCAChE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;6BAC5D;4BACD,OAAO,QAAQ,CAAC;wBACpB,CAAC,CAAC,CAAC;oBACP,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;gBAEH,wBAAwB;gBACxB,IAAA,+CAAgB,EAAC,KAAK,EAAE,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;aAC/E;SACJ;IACL,CAAC;IAED,SAAS,WAAW,CAChB,MAAmD,EACnD,GAAwD,EACxD,KAAyB;QAEzB,IAAI,KAAK,EAAE;YACP,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SACvB;aAAM;YACH,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;SACtB;IACL,CAAC","sourcesContent":["import { findListItemsInSameThread } from '../list/findListItemsInSameThread';\nimport {\n applyTableFormat,\n getOperationalBlocks,\n isBlockGroupOfType,\n updateTableCellMetadata,\n} from 'roosterjs-content-model-core';\nimport type {\n BorderFormat,\n ContentModelBlock,\n ContentModelBlockFormat,\n ContentModelDocument,\n ContentModelListItem,\n MarginFormat,\n PaddingFormat,\n} from 'roosterjs-content-model-types';\n\n/**\n * @internal\n */\nexport function setModelDirection(model: ContentModelDocument, direction: 'ltr' | 'rtl') {\n const paragraphOrListItemOrTable = getOperationalBlocks<ContentModelListItem>(\n model,\n ['ListItem'],\n ['TableCell']\n );\n\n paragraphOrListItemOrTable.forEach(({ block }) => {\n if (isBlockGroupOfType<ContentModelListItem>(block, 'ListItem')) {\n const items = findListItemsInSameThread(model, block);\n\n items.forEach(item => {\n item.levels.forEach(level => {\n level.format.direction = direction;\n });\n\n item.blocks.forEach(block => internalSetDirection(block.format, direction));\n });\n } else if (block) {\n internalSetDirection(block.format, direction, block);\n }\n });\n\n return paragraphOrListItemOrTable.length > 0;\n}\n\nfunction internalSetDirection(\n format: ContentModelBlockFormat,\n direction: 'ltr' | 'rtl',\n block?: ContentModelBlock\n) {\n const wasRtl = format.direction == 'rtl';\n const isRtl = direction == 'rtl';\n\n if (wasRtl != isRtl) {\n format.direction = direction;\n\n // Adjust margin when change direction\n const marginLeft = format.marginLeft;\n const paddingLeft = format.paddingLeft;\n\n setProperty(format, 'marginLeft', format.marginRight);\n setProperty(format, 'marginRight', marginLeft);\n setProperty(format, 'paddingLeft', format.paddingRight);\n setProperty(format, 'paddingRight', paddingLeft);\n\n // If whole Table direction changed, flip cell side borders\n if (block && block.blockType == 'Table') {\n block.rows.forEach(row => {\n row.cells.forEach(cell => {\n // Optimise by skipping cells with unchanged borders\n updateTableCellMetadata(cell, metadata => {\n if (metadata?.borderOverride) {\n const storeBorderLeft = cell.format.borderLeft;\n setProperty(cell.format, 'borderLeft', cell.format.borderRight);\n setProperty(cell.format, 'borderRight', storeBorderLeft);\n }\n return metadata;\n });\n });\n });\n\n // Apply changed borders\n applyTableFormat(block, undefined /* newFormat */, true /* keepCellShade*/);\n }\n }\n}\n\nfunction setProperty(\n format: MarginFormat & PaddingFormat & BorderFormat,\n key: keyof (MarginFormat & PaddingFormat & BorderFormat),\n value: string | undefined\n) {\n if (value) {\n format[key] = value;\n } else {\n delete format[key];\n }\n}\n"]}
|