roosterjs-content-model-api 9.43.0 → 9.45.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 +63 -63
- package/lib/index.js +131 -131
- package/lib/index.js.map +1 -1
- package/lib/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib/modelApi/block/setModelAlignment.js +65 -65
- package/lib/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib/modelApi/block/setModelDirection.js +113 -109
- package/lib/modelApi/block/setModelDirection.js.map +1 -1
- package/lib/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib/modelApi/block/setModelIndentation.js +158 -152
- package/lib/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib/modelApi/block/splitSelectedParagraphByBr.d.ts +7 -7
- package/lib/modelApi/block/splitSelectedParagraphByBr.js +71 -71
- package/lib/modelApi/block/splitSelectedParagraphByBr.js.map +1 -1
- package/lib/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib/modelApi/block/toggleModelBlockQuote.js +53 -53
- package/lib/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib/modelApi/common/adjustIndentation.d.ts +13 -13
- package/lib/modelApi/common/adjustIndentation.js +114 -114
- package/lib/modelApi/common/adjustIndentation.js.map +1 -1
- package/lib/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib/modelApi/common/clearModelFormat.js +143 -143
- package/lib/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib/modelApi/common/queryContentModelBlocks.d.ts +10 -10
- package/lib/modelApi/common/queryContentModelBlocks.js +87 -87
- package/lib/modelApi/common/queryContentModelBlocks.js.map +1 -1
- package/lib/modelApi/common/reducedModelChildProcessor.d.ts +20 -20
- package/lib/modelApi/common/reducedModelChildProcessor.js +63 -63
- package/lib/modelApi/common/reducedModelChildProcessor.js.map +1 -1
- package/lib/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib/modelApi/common/wrapBlock.js +52 -52
- package/lib/modelApi/common/wrapBlock.js.map +1 -1
- package/lib/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib/modelApi/entity/insertEntityModel.js +105 -105
- package/lib/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib/modelApi/image/applyImageBorderFormat.d.ts +5 -5
- package/lib/modelApi/image/applyImageBorderFormat.js +57 -57
- package/lib/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib/modelApi/link/getLinkUrl.d.ts +5 -5
- package/lib/modelApi/link/getLinkUrl.js +28 -28
- package/lib/modelApi/link/getLinkUrl.js.map +1 -1
- package/lib/modelApi/link/matchLink.d.ts +12 -12
- package/lib/modelApi/link/matchLink.js +93 -93
- package/lib/modelApi/link/matchLink.js.map +1 -1
- package/lib/modelApi/link/promoteLink.d.ts +20 -20
- package/lib/modelApi/link/promoteLink.js +54 -54
- package/lib/modelApi/link/promoteLink.js.map +1 -1
- package/lib/modelApi/list/findListItemsInSameThread.d.ts +13 -13
- package/lib/modelApi/list/findListItemsInSameThread.js +113 -113
- package/lib/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib/modelApi/list/getListAnnounceData.d.ts +7 -7
- package/lib/modelApi/list/getListAnnounceData.js +68 -68
- package/lib/modelApi/list/getListAnnounceData.js.map +1 -1
- package/lib/modelApi/list/setListType.d.ts +8 -8
- package/lib/modelApi/list/setListType.js +117 -116
- package/lib/modelApi/list/setListType.js.map +1 -1
- package/lib/modelApi/list/setModelListStartNumber.d.ts +7 -7
- package/lib/modelApi/list/setModelListStartNumber.js +21 -21
- package/lib/modelApi/list/setModelListStartNumber.js.map +1 -1
- package/lib/modelApi/list/setModelListStyle.d.ts +7 -7
- package/lib/modelApi/list/setModelListStyle.js +25 -25
- package/lib/modelApi/list/setModelListStyle.js.map +1 -1
- package/lib/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
- package/lib/modelApi/selection/adjustSegmentSelection.js +47 -47
- package/lib/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.js +56 -56
- package/lib/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib/modelApi/selection/adjustWordSelection.d.ts +8 -8
- package/lib/modelApi/selection/adjustWordSelection.js +123 -123
- package/lib/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib/modelApi/selection/collapseTableSelection.d.ts +5 -5
- package/lib/modelApi/selection/collapseTableSelection.js +16 -16
- package/lib/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib/modelApi/table/alignTable.d.ts +5 -5
- package/lib/modelApi/table/alignTable.js +11 -11
- package/lib/modelApi/table/alignTable.js.map +1 -1
- package/lib/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib/modelApi/table/alignTableCell.js +57 -57
- package/lib/modelApi/table/alignTableCell.js.map +1 -1
- package/lib/modelApi/table/canMergeCells.d.ts +5 -5
- package/lib/modelApi/table/canMergeCells.js +56 -56
- package/lib/modelApi/table/canMergeCells.js.map +1 -1
- package/lib/modelApi/table/clearSelectedCells.d.ts +7 -7
- package/lib/modelApi/table/clearSelectedCells.js +29 -29
- package/lib/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib/modelApi/table/createTableStructure.js +19 -19
- package/lib/modelApi/table/createTableStructure.js.map +1 -1
- package/lib/modelApi/table/deleteTable.d.ts +5 -5
- package/lib/modelApi/table/deleteTable.js +10 -10
- package/lib/modelApi/table/deleteTable.js.map +1 -1
- package/lib/modelApi/table/deleteTableColumn.d.ts +5 -5
- package/lib/modelApi/table/deleteTableColumn.js +24 -24
- package/lib/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib/modelApi/table/deleteTableRow.d.ts +5 -5
- package/lib/modelApi/table/deleteTableRow.js +23 -23
- package/lib/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js +56 -56
- package/lib/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib/modelApi/table/insertTableColumn.d.ts +7 -7
- package/lib/modelApi/table/insertTableColumn.js +27 -27
- package/lib/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib/modelApi/table/insertTableRow.js +31 -31
- package/lib/modelApi/table/insertTableRow.js.map +1 -1
- package/lib/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib/modelApi/table/mergeTableCells.js +25 -25
- package/lib/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib/modelApi/table/mergeTableColumn.js +35 -35
- package/lib/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib/modelApi/table/mergeTableRow.js +35 -35
- package/lib/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
- package/lib/modelApi/table/splitTableCellHorizontally.js +54 -54
- package/lib/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib/modelApi/table/splitTableCellVertically.d.ts +5 -5
- package/lib/modelApi/table/splitTableCellVertically.js +53 -53
- package/lib/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib/publicApi/block/setAlignment.d.ts +7 -7
- package/lib/publicApi/block/setAlignment.js +16 -16
- package/lib/publicApi/block/setAlignment.js.map +1 -1
- package/lib/publicApi/block/setDirection.d.ts +7 -7
- package/lib/publicApi/block/setDirection.js +16 -16
- package/lib/publicApi/block/setDirection.js.map +1 -1
- package/lib/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib/publicApi/block/setHeadingLevel.js +50 -50
- package/lib/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib/publicApi/block/setIndentation.d.ts +8 -8
- package/lib/publicApi/block/setIndentation.js +21 -25
- package/lib/publicApi/block/setIndentation.js.map +1 -1
- package/lib/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib/publicApi/block/setParagraphMargin.js +33 -33
- package/lib/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib/publicApi/block/setSpacing.d.ts +7 -7
- package/lib/publicApi/block/setSpacing.js +21 -21
- package/lib/publicApi/block/setSpacing.js.map +1 -1
- package/lib/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib/publicApi/block/toggleBlockQuote.js +39 -39
- package/lib/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib/publicApi/entity/insertEntity.js +67 -67
- package/lib/publicApi/entity/insertEntity.js.map +1 -1
- package/lib/publicApi/format/clearFormat.d.ts +6 -6
- package/lib/publicApi/format/clearFormat.js +34 -34
- package/lib/publicApi/format/clearFormat.js.map +1 -1
- package/lib/publicApi/format/getFormatState.d.ts +7 -7
- package/lib/publicApi/format/getFormatState.js +31 -31
- package/lib/publicApi/format/getFormatState.js.map +1 -1
- package/lib/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib/publicApi/image/adjustImageSelection.js +29 -29
- package/lib/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib/publicApi/image/changeImage.d.ts +7 -7
- package/lib/publicApi/image/changeImage.js +35 -35
- package/lib/publicApi/image/changeImage.js.map +1 -1
- package/lib/publicApi/image/insertImage.d.ts +7 -7
- package/lib/publicApi/image/insertImage.js +38 -38
- package/lib/publicApi/image/insertImage.js.map +1 -1
- package/lib/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib/publicApi/image/setImageAltText.js +17 -17
- package/lib/publicApi/image/setImageAltText.js.map +1 -1
- package/lib/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib/publicApi/image/setImageBorder.js +19 -19
- package/lib/publicApi/image/setImageBorder.js.map +1 -1
- package/lib/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib/publicApi/image/setImageBoxShadow.js +29 -29
- package/lib/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib/publicApi/link/adjustLinkSelection.js +34 -34
- package/lib/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib/publicApi/link/insertLink.d.ts +15 -15
- package/lib/publicApi/link/insertLink.js +120 -120
- package/lib/publicApi/link/insertLink.js.map +1 -1
- package/lib/publicApi/link/removeLink.d.ts +8 -8
- package/lib/publicApi/link/removeLink.js +32 -32
- package/lib/publicApi/link/removeLink.js.map +1 -1
- package/lib/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib/publicApi/list/setListStartNumber.js +18 -18
- package/lib/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib/publicApi/list/setListStyle.d.ts +7 -7
- package/lib/publicApi/list/setListStyle.js +18 -18
- package/lib/publicApi/list/setListStyle.js.map +1 -1
- package/lib/publicApi/list/toggleBullet.d.ts +9 -9
- package/lib/publicApi/list/toggleBullet.js +22 -22
- package/lib/publicApi/list/toggleBullet.js.map +1 -1
- package/lib/publicApi/list/toggleNumbering.d.ts +9 -9
- package/lib/publicApi/list/toggleNumbering.js +22 -22
- package/lib/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib/publicApi/segment/applySegmentFormat.js +23 -23
- package/lib/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib/publicApi/segment/changeCapitalization.js +49 -49
- package/lib/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib/publicApi/segment/changeFontSize.js +63 -63
- package/lib/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib/publicApi/segment/setBackgroundColor.d.ts +7 -7
- package/lib/publicApi/segment/setBackgroundColor.js +35 -35
- package/lib/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib/publicApi/segment/setFontName.d.ts +7 -7
- package/lib/publicApi/segment/setFontName.js +19 -19
- package/lib/publicApi/segment/setFontName.js.map +1 -1
- package/lib/publicApi/segment/setFontSize.d.ts +12 -12
- package/lib/publicApi/segment/setFontSize.js +33 -33
- package/lib/publicApi/segment/setFontSize.js.map +1 -1
- package/lib/publicApi/segment/setTextColor.d.ts +7 -7
- package/lib/publicApi/segment/setTextColor.js +26 -26
- package/lib/publicApi/segment/setTextColor.js.map +1 -1
- package/lib/publicApi/segment/splitTextSegment.d.ts +10 -10
- package/lib/publicApi/segment/splitTextSegment.js +30 -30
- package/lib/publicApi/segment/splitTextSegment.js.map +1 -1
- package/lib/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib/publicApi/segment/toggleBold.js +27 -27
- package/lib/publicApi/segment/toggleBold.js.map +1 -1
- package/lib/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib/publicApi/segment/toggleCode.js +28 -28
- package/lib/publicApi/segment/toggleCode.js.map +1 -1
- package/lib/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib/publicApi/segment/toggleItalic.js +21 -21
- package/lib/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib/publicApi/segment/toggleStrikethrough.js +15 -15
- package/lib/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib/publicApi/segment/toggleSubscript.js +15 -15
- package/lib/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib/publicApi/segment/toggleSuperscript.js +15 -15
- package/lib/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib/publicApi/segment/toggleUnderline.js +24 -24
- package/lib/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib/publicApi/table/applyTableBorderFormat.js +297 -297
- package/lib/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib/publicApi/table/editTable.d.ts +7 -7
- package/lib/publicApi/table/editTable.js +95 -95
- package/lib/publicApi/table/editTable.js.map +1 -1
- package/lib/publicApi/table/formatTable.d.ts +8 -8
- package/lib/publicApi/table/formatTable.js +38 -38
- package/lib/publicApi/table/formatTable.js.map +1 -1
- package/lib/publicApi/table/insertTable.d.ts +12 -11
- package/lib/publicApi/table/insertTable.js +76 -52
- package/lib/publicApi/table/insertTable.js.map +1 -1
- package/lib/publicApi/table/setTableCellShade.d.ts +7 -7
- package/lib/publicApi/table/setTableCellShade.js +32 -32
- package/lib/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib/publicApi/utils/createEditorContextForEntity.d.ts +8 -8
- package/lib/publicApi/utils/createEditorContextForEntity.js +29 -29
- package/lib/publicApi/utils/createEditorContextForEntity.js.map +1 -1
- package/lib/publicApi/utils/formatImageWithContentModel.d.ts +8 -8
- package/lib/publicApi/utils/formatImageWithContentModel.js +18 -18
- package/lib/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatInsertPointWithContentModel.d.ts +9 -9
- package/lib/publicApi/utils/formatInsertPointWithContentModel.js +130 -130
- package/lib/publicApi/utils/formatInsertPointWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatParagraphWithContentModel.d.ts +8 -8
- package/lib/publicApi/utils/formatParagraphWithContentModel.js +23 -23
- package/lib/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatSegmentWithContentModel.d.ts +11 -11
- package/lib/publicApi/utils/formatSegmentWithContentModel.js +117 -114
- package/lib/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib/publicApi/utils/formatTableWithContentModel.js +46 -46
- package/lib/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib/publicApi/utils/formatTextSegmentBeforeSelectionMarker.d.ts +8 -8
- package/lib/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js +34 -34
- package/lib/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js.map +1 -1
- package/lib-amd/index.d.ts +63 -63
- package/lib-amd/index.js +69 -69
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib-amd/modelApi/block/setModelAlignment.js +64 -64
- package/lib-amd/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib-amd/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib-amd/modelApi/block/setModelDirection.js +112 -108
- package/lib-amd/modelApi/block/setModelDirection.js.map +1 -1
- package/lib-amd/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib-amd/modelApi/block/setModelIndentation.js +154 -148
- package/lib-amd/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-amd/modelApi/block/splitSelectedParagraphByBr.d.ts +7 -7
- package/lib-amd/modelApi/block/splitSelectedParagraphByBr.js +71 -71
- package/lib-amd/modelApi/block/splitSelectedParagraphByBr.js.map +1 -1
- package/lib-amd/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js +52 -52
- package/lib-amd/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-amd/modelApi/common/adjustIndentation.d.ts +13 -13
- package/lib-amd/modelApi/common/adjustIndentation.js +114 -114
- package/lib-amd/modelApi/common/adjustIndentation.js.map +1 -1
- package/lib-amd/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib-amd/modelApi/common/clearModelFormat.js +142 -142
- package/lib-amd/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-amd/modelApi/common/queryContentModelBlocks.d.ts +10 -10
- package/lib-amd/modelApi/common/queryContentModelBlocks.js +87 -87
- package/lib-amd/modelApi/common/queryContentModelBlocks.js.map +1 -1
- package/lib-amd/modelApi/common/reducedModelChildProcessor.d.ts +20 -20
- package/lib-amd/modelApi/common/reducedModelChildProcessor.js +63 -63
- package/lib-amd/modelApi/common/reducedModelChildProcessor.js.map +1 -1
- package/lib-amd/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib-amd/modelApi/common/wrapBlock.js +52 -52
- package/lib-amd/modelApi/common/wrapBlock.js.map +1 -1
- package/lib-amd/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib-amd/modelApi/entity/insertEntityModel.js +105 -105
- package/lib-amd/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib-amd/modelApi/image/applyImageBorderFormat.d.ts +5 -5
- package/lib-amd/modelApi/image/applyImageBorderFormat.js +58 -58
- package/lib-amd/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-amd/modelApi/link/getLinkUrl.d.ts +5 -5
- package/lib-amd/modelApi/link/getLinkUrl.js +29 -29
- package/lib-amd/modelApi/link/getLinkUrl.js.map +1 -1
- package/lib-amd/modelApi/link/matchLink.d.ts +12 -12
- package/lib-amd/modelApi/link/matchLink.js +93 -93
- package/lib-amd/modelApi/link/matchLink.js.map +1 -1
- package/lib-amd/modelApi/link/promoteLink.d.ts +20 -20
- package/lib-amd/modelApi/link/promoteLink.js +54 -54
- package/lib-amd/modelApi/link/promoteLink.js.map +1 -1
- package/lib-amd/modelApi/list/findListItemsInSameThread.d.ts +13 -13
- package/lib-amd/modelApi/list/findListItemsInSameThread.js +115 -115
- package/lib-amd/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-amd/modelApi/list/getListAnnounceData.d.ts +7 -7
- package/lib-amd/modelApi/list/getListAnnounceData.js +68 -68
- package/lib-amd/modelApi/list/getListAnnounceData.js.map +1 -1
- package/lib-amd/modelApi/list/setListType.d.ts +8 -8
- package/lib-amd/modelApi/list/setListType.js +116 -115
- package/lib-amd/modelApi/list/setListType.js.map +1 -1
- package/lib-amd/modelApi/list/setModelListStartNumber.d.ts +7 -7
- package/lib-amd/modelApi/list/setModelListStartNumber.js +22 -22
- package/lib-amd/modelApi/list/setModelListStartNumber.js.map +1 -1
- package/lib-amd/modelApi/list/setModelListStyle.d.ts +7 -7
- package/lib-amd/modelApi/list/setModelListStyle.js +25 -25
- package/lib-amd/modelApi/list/setModelListStyle.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js +48 -48
- package/lib-amd/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js +56 -56
- package/lib-amd/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/adjustWordSelection.d.ts +8 -8
- package/lib-amd/modelApi/selection/adjustWordSelection.js +123 -123
- package/lib-amd/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib-amd/modelApi/selection/collapseTableSelection.d.ts +5 -5
- package/lib-amd/modelApi/selection/collapseTableSelection.js +17 -17
- package/lib-amd/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib-amd/modelApi/table/alignTable.d.ts +5 -5
- package/lib-amd/modelApi/table/alignTable.js +13 -13
- package/lib-amd/modelApi/table/alignTable.js.map +1 -1
- package/lib-amd/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib-amd/modelApi/table/alignTableCell.js +58 -58
- package/lib-amd/modelApi/table/alignTableCell.js.map +1 -1
- package/lib-amd/modelApi/table/canMergeCells.d.ts +5 -5
- package/lib-amd/modelApi/table/canMergeCells.js +58 -58
- package/lib-amd/modelApi/table/canMergeCells.js.map +1 -1
- package/lib-amd/modelApi/table/clearSelectedCells.d.ts +7 -7
- package/lib-amd/modelApi/table/clearSelectedCells.js +30 -30
- package/lib-amd/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib-amd/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib-amd/modelApi/table/createTableStructure.js +20 -20
- package/lib-amd/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTable.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTable.js +12 -12
- package/lib-amd/modelApi/table/deleteTable.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTableColumn.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTableColumn.js +24 -24
- package/lib-amd/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/deleteTableRow.d.ts +5 -5
- package/lib-amd/modelApi/table/deleteTableRow.js +23 -23
- package/lib-amd/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js +57 -57
- package/lib-amd/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableColumn.d.ts +7 -7
- package/lib-amd/modelApi/table/insertTableColumn.js +27 -27
- package/lib-amd/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib-amd/modelApi/table/insertTableRow.js +30 -30
- package/lib-amd/modelApi/table/insertTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib-amd/modelApi/table/mergeTableCells.js +25 -25
- package/lib-amd/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib-amd/modelApi/table/mergeTableColumn.js +35 -35
- package/lib-amd/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib-amd/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib-amd/modelApi/table/mergeTableRow.js +35 -35
- package/lib-amd/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib-amd/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js +54 -54
- package/lib-amd/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib-amd/modelApi/table/splitTableCellVertically.d.ts +5 -5
- package/lib-amd/modelApi/table/splitTableCellVertically.js +53 -53
- package/lib-amd/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib-amd/publicApi/block/setAlignment.d.ts +7 -7
- package/lib-amd/publicApi/block/setAlignment.js +17 -17
- package/lib-amd/publicApi/block/setAlignment.js.map +1 -1
- package/lib-amd/publicApi/block/setDirection.d.ts +7 -7
- package/lib-amd/publicApi/block/setDirection.js +17 -17
- package/lib-amd/publicApi/block/setDirection.js.map +1 -1
- package/lib-amd/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib-amd/publicApi/block/setHeadingLevel.js +51 -51
- package/lib-amd/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib-amd/publicApi/block/setIndentation.d.ts +8 -8
- package/lib-amd/publicApi/block/setIndentation.js +22 -25
- package/lib-amd/publicApi/block/setIndentation.js.map +1 -1
- package/lib-amd/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib-amd/publicApi/block/setParagraphMargin.js +33 -33
- package/lib-amd/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib-amd/publicApi/block/setSpacing.d.ts +7 -7
- package/lib-amd/publicApi/block/setSpacing.js +22 -22
- package/lib-amd/publicApi/block/setSpacing.js.map +1 -1
- package/lib-amd/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib-amd/publicApi/block/toggleBlockQuote.js +39 -39
- package/lib-amd/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib-amd/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib-amd/publicApi/entity/insertEntity.js +66 -66
- package/lib-amd/publicApi/entity/insertEntity.js.map +1 -1
- package/lib-amd/publicApi/format/clearFormat.d.ts +6 -6
- package/lib-amd/publicApi/format/clearFormat.js +34 -34
- package/lib-amd/publicApi/format/clearFormat.js.map +1 -1
- package/lib-amd/publicApi/format/getFormatState.d.ts +7 -7
- package/lib-amd/publicApi/format/getFormatState.js +31 -31
- package/lib-amd/publicApi/format/getFormatState.js.map +1 -1
- package/lib-amd/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib-amd/publicApi/image/adjustImageSelection.js +29 -29
- package/lib-amd/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib-amd/publicApi/image/changeImage.d.ts +7 -7
- package/lib-amd/publicApi/image/changeImage.js +35 -35
- package/lib-amd/publicApi/image/changeImage.js.map +1 -1
- package/lib-amd/publicApi/image/insertImage.d.ts +7 -7
- package/lib-amd/publicApi/image/insertImage.js +39 -39
- package/lib-amd/publicApi/image/insertImage.js.map +1 -1
- package/lib-amd/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib-amd/publicApi/image/setImageAltText.js +18 -18
- package/lib-amd/publicApi/image/setImageAltText.js.map +1 -1
- package/lib-amd/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib-amd/publicApi/image/setImageBorder.js +19 -19
- package/lib-amd/publicApi/image/setImageBorder.js.map +1 -1
- package/lib-amd/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib-amd/publicApi/image/setImageBoxShadow.js +30 -30
- package/lib-amd/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib-amd/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib-amd/publicApi/link/adjustLinkSelection.js +33 -33
- package/lib-amd/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib-amd/publicApi/link/insertLink.d.ts +15 -15
- package/lib-amd/publicApi/link/insertLink.js +118 -118
- package/lib-amd/publicApi/link/insertLink.js.map +1 -1
- package/lib-amd/publicApi/link/removeLink.d.ts +8 -8
- package/lib-amd/publicApi/link/removeLink.js +32 -32
- package/lib-amd/publicApi/link/removeLink.js.map +1 -1
- package/lib-amd/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib-amd/publicApi/list/setListStartNumber.js +19 -19
- package/lib-amd/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib-amd/publicApi/list/setListStyle.d.ts +7 -7
- package/lib-amd/publicApi/list/setListStyle.js +19 -19
- package/lib-amd/publicApi/list/setListStyle.js.map +1 -1
- package/lib-amd/publicApi/list/toggleBullet.d.ts +9 -9
- package/lib-amd/publicApi/list/toggleBullet.js +23 -23
- package/lib-amd/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-amd/publicApi/list/toggleNumbering.d.ts +9 -9
- package/lib-amd/publicApi/list/toggleNumbering.js +23 -23
- package/lib-amd/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib-amd/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib-amd/publicApi/segment/applySegmentFormat.js +24 -24
- package/lib-amd/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib-amd/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib-amd/publicApi/segment/changeCapitalization.js +50 -50
- package/lib-amd/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-amd/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib-amd/publicApi/segment/changeFontSize.js +62 -62
- package/lib-amd/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib-amd/publicApi/segment/setBackgroundColor.d.ts +7 -7
- package/lib-amd/publicApi/segment/setBackgroundColor.js +35 -35
- package/lib-amd/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib-amd/publicApi/segment/setFontName.d.ts +7 -7
- package/lib-amd/publicApi/segment/setFontName.js +20 -20
- package/lib-amd/publicApi/segment/setFontName.js.map +1 -1
- package/lib-amd/publicApi/segment/setFontSize.d.ts +12 -12
- package/lib-amd/publicApi/segment/setFontSize.js +34 -34
- package/lib-amd/publicApi/segment/setFontSize.js.map +1 -1
- package/lib-amd/publicApi/segment/setTextColor.d.ts +7 -7
- package/lib-amd/publicApi/segment/setTextColor.js +27 -27
- package/lib-amd/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-amd/publicApi/segment/splitTextSegment.d.ts +10 -10
- package/lib-amd/publicApi/segment/splitTextSegment.js +30 -30
- package/lib-amd/publicApi/segment/splitTextSegment.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleBold.js +27 -27
- package/lib-amd/publicApi/segment/toggleBold.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleCode.js +28 -28
- package/lib-amd/publicApi/segment/toggleCode.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleItalic.js +22 -22
- package/lib-amd/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleStrikethrough.js +16 -16
- package/lib-amd/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleSubscript.js +16 -16
- package/lib-amd/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleSuperscript.js +16 -16
- package/lib-amd/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib-amd/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib-amd/publicApi/segment/toggleUnderline.js +25 -25
- package/lib-amd/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib-amd/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib-amd/publicApi/table/applyTableBorderFormat.js +297 -297
- package/lib-amd/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib-amd/publicApi/table/editTable.d.ts +7 -7
- package/lib-amd/publicApi/table/editTable.js +84 -84
- package/lib-amd/publicApi/table/editTable.js.map +1 -1
- package/lib-amd/publicApi/table/formatTable.d.ts +8 -8
- package/lib-amd/publicApi/table/formatTable.js +38 -38
- package/lib-amd/publicApi/table/formatTable.js.map +1 -1
- package/lib-amd/publicApi/table/insertTable.d.ts +12 -11
- package/lib-amd/publicApi/table/insertTable.js +74 -50
- package/lib-amd/publicApi/table/insertTable.js.map +1 -1
- package/lib-amd/publicApi/table/setTableCellShade.d.ts +7 -7
- package/lib-amd/publicApi/table/setTableCellShade.js +32 -32
- package/lib-amd/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-amd/publicApi/utils/createEditorContextForEntity.d.ts +8 -8
- package/lib-amd/publicApi/utils/createEditorContextForEntity.js +30 -30
- package/lib-amd/publicApi/utils/createEditorContextForEntity.js.map +1 -1
- package/lib-amd/publicApi/utils/formatImageWithContentModel.d.ts +8 -8
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js +19 -19
- package/lib-amd/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatInsertPointWithContentModel.d.ts +9 -9
- package/lib-amd/publicApi/utils/formatInsertPointWithContentModel.js +130 -130
- package/lib-amd/publicApi/utils/formatInsertPointWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.d.ts +8 -8
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js +23 -23
- package/lib-amd/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.d.ts +11 -11
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js +115 -112
- package/lib-amd/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js +45 -45
- package/lib-amd/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-amd/publicApi/utils/formatTextSegmentBeforeSelectionMarker.d.ts +8 -8
- package/lib-amd/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js +35 -35
- package/lib-amd/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js.map +1 -1
- package/lib-mjs/index.d.ts +63 -63
- package/lib-mjs/index.js +63 -63
- package/lib-mjs/index.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelAlignment.d.ts +5 -5
- package/lib-mjs/modelApi/block/setModelAlignment.js +61 -61
- package/lib-mjs/modelApi/block/setModelAlignment.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelDirection.d.ts +5 -5
- package/lib-mjs/modelApi/block/setModelDirection.js +109 -105
- package/lib-mjs/modelApi/block/setModelDirection.js.map +1 -1
- package/lib-mjs/modelApi/block/setModelIndentation.d.ts +8 -8
- package/lib-mjs/modelApi/block/setModelIndentation.js +154 -148
- package/lib-mjs/modelApi/block/setModelIndentation.js.map +1 -1
- package/lib-mjs/modelApi/block/splitSelectedParagraphByBr.d.ts +7 -7
- package/lib-mjs/modelApi/block/splitSelectedParagraphByBr.js +67 -67
- package/lib-mjs/modelApi/block/splitSelectedParagraphByBr.js.map +1 -1
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.d.ts +5 -5
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js +49 -49
- package/lib-mjs/modelApi/block/toggleModelBlockQuote.js.map +1 -1
- package/lib-mjs/modelApi/common/adjustIndentation.d.ts +13 -13
- package/lib-mjs/modelApi/common/adjustIndentation.js +109 -109
- package/lib-mjs/modelApi/common/adjustIndentation.js.map +1 -1
- package/lib-mjs/modelApi/common/clearModelFormat.d.ts +5 -5
- package/lib-mjs/modelApi/common/clearModelFormat.js +139 -139
- package/lib-mjs/modelApi/common/clearModelFormat.js.map +1 -1
- package/lib-mjs/modelApi/common/queryContentModelBlocks.d.ts +10 -10
- package/lib-mjs/modelApi/common/queryContentModelBlocks.js +83 -83
- package/lib-mjs/modelApi/common/queryContentModelBlocks.js.map +1 -1
- package/lib-mjs/modelApi/common/reducedModelChildProcessor.d.ts +20 -20
- package/lib-mjs/modelApi/common/reducedModelChildProcessor.js +59 -59
- package/lib-mjs/modelApi/common/reducedModelChildProcessor.js.map +1 -1
- package/lib-mjs/modelApi/common/wrapBlock.d.ts +16 -16
- package/lib-mjs/modelApi/common/wrapBlock.js +47 -47
- package/lib-mjs/modelApi/common/wrapBlock.js.map +1 -1
- package/lib-mjs/modelApi/entity/insertEntityModel.d.ts +5 -5
- package/lib-mjs/modelApi/entity/insertEntityModel.js +101 -101
- package/lib-mjs/modelApi/entity/insertEntityModel.js.map +1 -1
- package/lib-mjs/modelApi/image/applyImageBorderFormat.d.ts +5 -5
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js +53 -53
- package/lib-mjs/modelApi/image/applyImageBorderFormat.js.map +1 -1
- package/lib-mjs/modelApi/link/getLinkUrl.d.ts +5 -5
- package/lib-mjs/modelApi/link/getLinkUrl.js +24 -24
- package/lib-mjs/modelApi/link/getLinkUrl.js.map +1 -1
- package/lib-mjs/modelApi/link/matchLink.d.ts +12 -12
- package/lib-mjs/modelApi/link/matchLink.js +89 -89
- package/lib-mjs/modelApi/link/matchLink.js.map +1 -1
- package/lib-mjs/modelApi/link/promoteLink.d.ts +20 -20
- package/lib-mjs/modelApi/link/promoteLink.js +49 -49
- package/lib-mjs/modelApi/link/promoteLink.js.map +1 -1
- package/lib-mjs/modelApi/list/findListItemsInSameThread.d.ts +13 -13
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js +109 -109
- package/lib-mjs/modelApi/list/findListItemsInSameThread.js.map +1 -1
- package/lib-mjs/modelApi/list/getListAnnounceData.d.ts +7 -7
- package/lib-mjs/modelApi/list/getListAnnounceData.js +64 -64
- package/lib-mjs/modelApi/list/getListAnnounceData.js.map +1 -1
- package/lib-mjs/modelApi/list/setListType.d.ts +8 -8
- package/lib-mjs/modelApi/list/setListType.js +113 -112
- package/lib-mjs/modelApi/list/setListType.js.map +1 -1
- package/lib-mjs/modelApi/list/setModelListStartNumber.d.ts +7 -7
- package/lib-mjs/modelApi/list/setModelListStartNumber.js +17 -17
- package/lib-mjs/modelApi/list/setModelListStartNumber.js.map +1 -1
- package/lib-mjs/modelApi/list/setModelListStyle.d.ts +7 -7
- package/lib-mjs/modelApi/list/setModelListStyle.js +21 -21
- package/lib-mjs/modelApi/list/setModelListStyle.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.d.ts +5 -5
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js +43 -43
- package/lib-mjs/modelApi/selection/adjustSegmentSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.d.ts +6 -6
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js +52 -52
- package/lib-mjs/modelApi/selection/adjustTrailingSpaceSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/adjustWordSelection.d.ts +8 -8
- package/lib-mjs/modelApi/selection/adjustWordSelection.js +119 -119
- package/lib-mjs/modelApi/selection/adjustWordSelection.js.map +1 -1
- package/lib-mjs/modelApi/selection/collapseTableSelection.d.ts +5 -5
- package/lib-mjs/modelApi/selection/collapseTableSelection.js +12 -12
- package/lib-mjs/modelApi/selection/collapseTableSelection.js.map +1 -1
- package/lib-mjs/modelApi/table/alignTable.d.ts +5 -5
- package/lib-mjs/modelApi/table/alignTable.js +7 -7
- package/lib-mjs/modelApi/table/alignTable.js.map +1 -1
- package/lib-mjs/modelApi/table/alignTableCell.d.ts +9 -9
- package/lib-mjs/modelApi/table/alignTableCell.js +52 -52
- package/lib-mjs/modelApi/table/alignTableCell.js.map +1 -1
- package/lib-mjs/modelApi/table/canMergeCells.d.ts +5 -5
- package/lib-mjs/modelApi/table/canMergeCells.js +52 -52
- package/lib-mjs/modelApi/table/canMergeCells.js.map +1 -1
- package/lib-mjs/modelApi/table/clearSelectedCells.d.ts +7 -7
- package/lib-mjs/modelApi/table/clearSelectedCells.js +25 -25
- package/lib-mjs/modelApi/table/clearSelectedCells.js.map +1 -1
- package/lib-mjs/modelApi/table/createTableStructure.d.ts +5 -5
- package/lib-mjs/modelApi/table/createTableStructure.js +15 -15
- package/lib-mjs/modelApi/table/createTableStructure.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTable.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTable.js +6 -6
- package/lib-mjs/modelApi/table/deleteTable.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTableColumn.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTableColumn.js +20 -20
- package/lib-mjs/modelApi/table/deleteTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/deleteTableRow.d.ts +5 -5
- package/lib-mjs/modelApi/table/deleteTableRow.js +19 -19
- package/lib-mjs/modelApi/table/deleteTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.d.ts +8 -8
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js +52 -52
- package/lib-mjs/modelApi/table/ensureFocusableParagraphForTable.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableColumn.d.ts +7 -7
- package/lib-mjs/modelApi/table/insertTableColumn.js +23 -23
- package/lib-mjs/modelApi/table/insertTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/insertTableRow.d.ts +7 -7
- package/lib-mjs/modelApi/table/insertTableRow.js +27 -27
- package/lib-mjs/modelApi/table/insertTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableCells.d.ts +5 -5
- package/lib-mjs/modelApi/table/mergeTableCells.js +21 -21
- package/lib-mjs/modelApi/table/mergeTableCells.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableColumn.d.ts +5 -5
- package/lib-mjs/modelApi/table/mergeTableColumn.js +31 -31
- package/lib-mjs/modelApi/table/mergeTableColumn.js.map +1 -1
- package/lib-mjs/modelApi/table/mergeTableRow.d.ts +5 -5
- package/lib-mjs/modelApi/table/mergeTableRow.js +31 -31
- package/lib-mjs/modelApi/table/mergeTableRow.js.map +1 -1
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.d.ts +5 -5
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js +50 -50
- package/lib-mjs/modelApi/table/splitTableCellHorizontally.js.map +1 -1
- package/lib-mjs/modelApi/table/splitTableCellVertically.d.ts +5 -5
- package/lib-mjs/modelApi/table/splitTableCellVertically.js +49 -49
- package/lib-mjs/modelApi/table/splitTableCellVertically.js.map +1 -1
- package/lib-mjs/publicApi/block/setAlignment.d.ts +7 -7
- package/lib-mjs/publicApi/block/setAlignment.js +12 -12
- package/lib-mjs/publicApi/block/setAlignment.js.map +1 -1
- package/lib-mjs/publicApi/block/setDirection.d.ts +7 -7
- package/lib-mjs/publicApi/block/setDirection.js +12 -12
- package/lib-mjs/publicApi/block/setDirection.js.map +1 -1
- package/lib-mjs/publicApi/block/setHeadingLevel.d.ts +7 -7
- package/lib-mjs/publicApi/block/setHeadingLevel.js +46 -46
- package/lib-mjs/publicApi/block/setHeadingLevel.js.map +1 -1
- package/lib-mjs/publicApi/block/setIndentation.d.ts +8 -8
- package/lib-mjs/publicApi/block/setIndentation.js +17 -21
- package/lib-mjs/publicApi/block/setIndentation.js.map +1 -1
- package/lib-mjs/publicApi/block/setParagraphMargin.d.ts +9 -9
- package/lib-mjs/publicApi/block/setParagraphMargin.js +29 -29
- package/lib-mjs/publicApi/block/setParagraphMargin.js.map +1 -1
- package/lib-mjs/publicApi/block/setSpacing.d.ts +7 -7
- package/lib-mjs/publicApi/block/setSpacing.js +17 -17
- package/lib-mjs/publicApi/block/setSpacing.js.map +1 -1
- package/lib-mjs/publicApi/block/toggleBlockQuote.d.ts +9 -9
- package/lib-mjs/publicApi/block/toggleBlockQuote.js +35 -35
- package/lib-mjs/publicApi/block/toggleBlockQuote.js.map +1 -1
- package/lib-mjs/publicApi/entity/insertEntity.d.ts +25 -25
- package/lib-mjs/publicApi/entity/insertEntity.js +63 -63
- package/lib-mjs/publicApi/entity/insertEntity.js.map +1 -1
- package/lib-mjs/publicApi/format/clearFormat.d.ts +6 -6
- package/lib-mjs/publicApi/format/clearFormat.js +30 -30
- package/lib-mjs/publicApi/format/clearFormat.js.map +1 -1
- package/lib-mjs/publicApi/format/getFormatState.d.ts +7 -7
- package/lib-mjs/publicApi/format/getFormatState.js +27 -27
- package/lib-mjs/publicApi/format/getFormatState.js.map +1 -1
- package/lib-mjs/publicApi/image/adjustImageSelection.d.ts +6 -6
- package/lib-mjs/publicApi/image/adjustImageSelection.js +25 -25
- package/lib-mjs/publicApi/image/adjustImageSelection.js.map +1 -1
- package/lib-mjs/publicApi/image/changeImage.d.ts +7 -7
- package/lib-mjs/publicApi/image/changeImage.js +31 -31
- package/lib-mjs/publicApi/image/changeImage.js.map +1 -1
- package/lib-mjs/publicApi/image/insertImage.d.ts +7 -7
- package/lib-mjs/publicApi/image/insertImage.js +34 -34
- package/lib-mjs/publicApi/image/insertImage.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageAltText.d.ts +8 -8
- package/lib-mjs/publicApi/image/setImageAltText.js +13 -13
- package/lib-mjs/publicApi/image/setImageAltText.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageBorder.d.ts +9 -9
- package/lib-mjs/publicApi/image/setImageBorder.js +15 -15
- package/lib-mjs/publicApi/image/setImageBorder.js.map +1 -1
- package/lib-mjs/publicApi/image/setImageBoxShadow.d.ts +8 -8
- package/lib-mjs/publicApi/image/setImageBoxShadow.js +25 -25
- package/lib-mjs/publicApi/image/setImageBoxShadow.js.map +1 -1
- package/lib-mjs/publicApi/link/adjustLinkSelection.d.ts +6 -6
- package/lib-mjs/publicApi/link/adjustLinkSelection.js +30 -30
- package/lib-mjs/publicApi/link/adjustLinkSelection.js.map +1 -1
- package/lib-mjs/publicApi/link/insertLink.d.ts +15 -15
- package/lib-mjs/publicApi/link/insertLink.js +116 -116
- package/lib-mjs/publicApi/link/insertLink.js.map +1 -1
- package/lib-mjs/publicApi/link/removeLink.d.ts +8 -8
- package/lib-mjs/publicApi/link/removeLink.js +28 -28
- package/lib-mjs/publicApi/link/removeLink.js.map +1 -1
- package/lib-mjs/publicApi/list/setListStartNumber.d.ts +7 -7
- package/lib-mjs/publicApi/list/setListStartNumber.js +14 -14
- package/lib-mjs/publicApi/list/setListStartNumber.js.map +1 -1
- package/lib-mjs/publicApi/list/setListStyle.d.ts +7 -7
- package/lib-mjs/publicApi/list/setListStyle.js +14 -14
- package/lib-mjs/publicApi/list/setListStyle.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleBullet.d.ts +9 -9
- package/lib-mjs/publicApi/list/toggleBullet.js +18 -18
- package/lib-mjs/publicApi/list/toggleBullet.js.map +1 -1
- package/lib-mjs/publicApi/list/toggleNumbering.d.ts +9 -9
- package/lib-mjs/publicApi/list/toggleNumbering.js +18 -18
- package/lib-mjs/publicApi/list/toggleNumbering.js.map +1 -1
- package/lib-mjs/publicApi/segment/applySegmentFormat.d.ts +7 -7
- package/lib-mjs/publicApi/segment/applySegmentFormat.js +19 -19
- package/lib-mjs/publicApi/segment/applySegmentFormat.js.map +1 -1
- package/lib-mjs/publicApi/segment/changeCapitalization.d.ts +10 -10
- package/lib-mjs/publicApi/segment/changeCapitalization.js +45 -45
- package/lib-mjs/publicApi/segment/changeCapitalization.js.map +1 -1
- package/lib-mjs/publicApi/segment/changeFontSize.d.ts +8 -8
- package/lib-mjs/publicApi/segment/changeFontSize.js +59 -59
- package/lib-mjs/publicApi/segment/changeFontSize.js.map +1 -1
- package/lib-mjs/publicApi/segment/setBackgroundColor.d.ts +7 -7
- package/lib-mjs/publicApi/segment/setBackgroundColor.js +31 -31
- package/lib-mjs/publicApi/segment/setBackgroundColor.js.map +1 -1
- package/lib-mjs/publicApi/segment/setFontName.d.ts +7 -7
- package/lib-mjs/publicApi/segment/setFontName.js +15 -15
- package/lib-mjs/publicApi/segment/setFontName.js.map +1 -1
- package/lib-mjs/publicApi/segment/setFontSize.d.ts +12 -12
- package/lib-mjs/publicApi/segment/setFontSize.js +28 -28
- package/lib-mjs/publicApi/segment/setFontSize.js.map +1 -1
- package/lib-mjs/publicApi/segment/setTextColor.d.ts +7 -7
- package/lib-mjs/publicApi/segment/setTextColor.js +22 -22
- package/lib-mjs/publicApi/segment/setTextColor.js.map +1 -1
- package/lib-mjs/publicApi/segment/splitTextSegment.d.ts +10 -10
- package/lib-mjs/publicApi/segment/splitTextSegment.js +26 -26
- package/lib-mjs/publicApi/segment/splitTextSegment.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleBold.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleBold.js +23 -23
- package/lib-mjs/publicApi/segment/toggleBold.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleCode.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleCode.js +24 -24
- package/lib-mjs/publicApi/segment/toggleCode.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleItalic.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleItalic.js +17 -17
- package/lib-mjs/publicApi/segment/toggleItalic.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleStrikethrough.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js +11 -11
- package/lib-mjs/publicApi/segment/toggleStrikethrough.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleSubscript.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleSubscript.js +11 -11
- package/lib-mjs/publicApi/segment/toggleSubscript.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleSuperscript.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleSuperscript.js +11 -11
- package/lib-mjs/publicApi/segment/toggleSuperscript.js.map +1 -1
- package/lib-mjs/publicApi/segment/toggleUnderline.d.ts +6 -6
- package/lib-mjs/publicApi/segment/toggleUnderline.js +20 -20
- package/lib-mjs/publicApi/segment/toggleUnderline.js.map +1 -1
- package/lib-mjs/publicApi/table/applyTableBorderFormat.d.ts +8 -8
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js +293 -293
- package/lib-mjs/publicApi/table/applyTableBorderFormat.js.map +1 -1
- package/lib-mjs/publicApi/table/editTable.d.ts +7 -7
- package/lib-mjs/publicApi/table/editTable.js +91 -91
- package/lib-mjs/publicApi/table/editTable.js.map +1 -1
- package/lib-mjs/publicApi/table/formatTable.d.ts +8 -8
- package/lib-mjs/publicApi/table/formatTable.js +34 -34
- package/lib-mjs/publicApi/table/formatTable.js.map +1 -1
- package/lib-mjs/publicApi/table/insertTable.d.ts +12 -11
- package/lib-mjs/publicApi/table/insertTable.js +72 -48
- package/lib-mjs/publicApi/table/insertTable.js.map +1 -1
- package/lib-mjs/publicApi/table/setTableCellShade.d.ts +7 -7
- package/lib-mjs/publicApi/table/setTableCellShade.js +28 -28
- package/lib-mjs/publicApi/table/setTableCellShade.js.map +1 -1
- package/lib-mjs/publicApi/utils/createEditorContextForEntity.d.ts +8 -8
- package/lib-mjs/publicApi/utils/createEditorContextForEntity.js +25 -25
- package/lib-mjs/publicApi/utils/createEditorContextForEntity.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.d.ts +8 -8
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js +14 -14
- package/lib-mjs/publicApi/utils/formatImageWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatInsertPointWithContentModel.d.ts +9 -9
- package/lib-mjs/publicApi/utils/formatInsertPointWithContentModel.js +126 -126
- package/lib-mjs/publicApi/utils/formatInsertPointWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.d.ts +8 -8
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js +19 -19
- package/lib-mjs/publicApi/utils/formatParagraphWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.d.ts +11 -11
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js +113 -110
- package/lib-mjs/publicApi/utils/formatSegmentWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.d.ts +9 -9
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js +42 -42
- package/lib-mjs/publicApi/utils/formatTableWithContentModel.js.map +1 -1
- package/lib-mjs/publicApi/utils/formatTextSegmentBeforeSelectionMarker.d.ts +8 -8
- package/lib-mjs/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js +30 -30
- package/lib-mjs/publicApi/utils/formatTextSegmentBeforeSelectionMarker.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "roosterjs-content-model-dom"], function (require, exports, tslib_1, roosterjs_content_model_dom_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.matchLink = void 0;
|
|
5
|
-
// http exclude matching regex
|
|
6
|
-
// invalid URL example (in particular on IE and Edge):
|
|
7
|
-
// - http://www.bing.com%00, %00 before ? (question mark) is considered invalid. IE/Edge throws invalid argument exception
|
|
8
|
-
// - http://www.bing.com%1, %1 is invalid
|
|
9
|
-
// - http://www.bing.com%g, %g is invalid (IE and Edge expects a two hex value after a %)
|
|
10
|
-
// - http://www.bing.com%, % as ending is invalid (IE and Edge expects a two hex value after a %)
|
|
11
|
-
// All above % cases if they're after ? (question mark) is then considered valid again
|
|
12
|
-
// Similar for @, it needs to be after / (forward slash), or ? (question mark). Otherwise IE/Edge will throw security exception
|
|
13
|
-
// - http://www.bing.com@name, @name before ? (question mark) is considered invalid
|
|
14
|
-
// - http://www.bing.com/@name, is valid sine it is after / (forward slash)
|
|
15
|
-
// - http://www.bing.com?@name, is also valid since it is after ? (question mark)
|
|
16
|
-
// The regex below is essentially a break down of:
|
|
17
|
-
// ^[^?]+%[^0-9a-f]+ => to exclude URL like www.bing.com%%
|
|
18
|
-
// ^[^?]+%[0-9a-f][^0-9a-f]+ => to exclude URL like www.bing.com%1
|
|
19
|
-
// ^[^?]+%00 => to exclude URL like www.bing.com%00
|
|
20
|
-
// ^[^?]+%$ => to exclude URL like www.bing.com%
|
|
21
|
-
// ^https?:\/\/[^?\/]+@ => to exclude URL like http://www.bing.com@name
|
|
22
|
-
// ^www\.[^?\/]+@ => to exclude URL like www.bing.com@name
|
|
23
|
-
// , => to exclude url like www.bing,,com
|
|
24
|
-
var httpExcludeRegEx = /^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\/\/[^?\/]+@|^www\.[^?\/]+@/i;
|
|
25
|
-
// via https://tools.ietf.org/html/rfc1035 Page 7
|
|
26
|
-
var labelRegEx = '[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'; // We're using case insensitive regexps below so don't bother including A-Z
|
|
27
|
-
var domainNameRegEx = "(?:" + labelRegEx + "\\.)*" + labelRegEx;
|
|
28
|
-
var domainPortRegEx = domainNameRegEx + "(?:\\:[0-9]+)?";
|
|
29
|
-
var domainPortWithUrlRegEx = domainPortRegEx + "(?:[\\/\\?]\\S*)?";
|
|
30
|
-
var linkMatchRules = {
|
|
31
|
-
http: {
|
|
32
|
-
match: new RegExp("^(?:microsoft-edge:)?http:\\/\\/" + domainPortWithUrlRegEx + "|www\\." + domainPortWithUrlRegEx, 'i'),
|
|
33
|
-
except: httpExcludeRegEx,
|
|
34
|
-
normalizeUrl: function (url) {
|
|
35
|
-
return new RegExp('^(?:microsoft-edge:)?http:\\/\\/', 'i').test(url) ? url : 'http://' + url;
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
https: {
|
|
39
|
-
match: new RegExp("^(?:microsoft-edge:)?https:\\/\\/" + domainPortWithUrlRegEx, 'i'),
|
|
40
|
-
except: httpExcludeRegEx,
|
|
41
|
-
},
|
|
42
|
-
mailto: { match: new RegExp('^mailto:\\S+@\\S+\\.\\S+', 'i') },
|
|
43
|
-
notes: { match: new RegExp('^notes:\\/\\/\\S+', 'i') },
|
|
44
|
-
file: { match: new RegExp('^file:\\/\\/\\/?\\S+', 'i') },
|
|
45
|
-
unc: { match: new RegExp('^\\\\\\\\\\S+', 'i') },
|
|
46
|
-
ftp: {
|
|
47
|
-
match: new RegExp("^ftp:\\/\\/" + domainPortWithUrlRegEx + "|ftp\\." + domainPortWithUrlRegEx, 'i'),
|
|
48
|
-
normalizeUrl: function (url) { return (new RegExp('^ftp:\\/\\/', 'i').test(url) ? url : 'ftp://' + url); },
|
|
49
|
-
},
|
|
50
|
-
news: { match: new RegExp("^news:(\\/\\/)?" + domainPortWithUrlRegEx, 'i') },
|
|
51
|
-
telnet: { match: new RegExp("^telnet:(\\/\\/)?" + domainPortWithUrlRegEx, 'i') },
|
|
52
|
-
gopher: { match: new RegExp("^gopher:\\/\\/" + domainPortWithUrlRegEx, 'i') },
|
|
53
|
-
wais: { match: new RegExp("^wais:(\\/\\/)?" + domainPortWithUrlRegEx, 'i') },
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Try to match a given string with link match rules, return matched link
|
|
57
|
-
* @param url Input url to match
|
|
58
|
-
* @param option Link match option, exact or partial. If it is exact match, we need
|
|
59
|
-
* to check the length of matched link and url
|
|
60
|
-
* @param rules Optional link match rules, if not passed, only the default link match
|
|
61
|
-
* rules will be applied
|
|
62
|
-
* @returns The matched link data, or null if no match found.
|
|
63
|
-
* The link data includes an original url and a normalized url
|
|
64
|
-
*/
|
|
65
|
-
function matchLink(url) {
|
|
66
|
-
var e_1, _a;
|
|
67
|
-
if (url) {
|
|
68
|
-
try {
|
|
69
|
-
for (var _b = (0, tslib_1.__values)((0, roosterjs_content_model_dom_1.getObjectKeys)(linkMatchRules)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
70
|
-
var schema = _c.value;
|
|
71
|
-
var rule = linkMatchRules[schema];
|
|
72
|
-
var matches = url.match(rule.match);
|
|
73
|
-
if (matches && matches[0] == url && (!rule.except || !rule.except.test(url))) {
|
|
74
|
-
return {
|
|
75
|
-
scheme: schema,
|
|
76
|
-
originalUrl: url,
|
|
77
|
-
normalizedUrl: rule.normalizeUrl ? rule.normalizeUrl(url) : url,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
-
finally {
|
|
84
|
-
try {
|
|
85
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
86
|
-
}
|
|
87
|
-
finally { if (e_1) throw e_1.error; }
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
exports.matchLink = matchLink;
|
|
93
|
-
});
|
|
1
|
+
define(["require", "exports", "tslib", "roosterjs-content-model-dom"], function (require, exports, tslib_1, roosterjs_content_model_dom_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.matchLink = void 0;
|
|
5
|
+
// http exclude matching regex
|
|
6
|
+
// invalid URL example (in particular on IE and Edge):
|
|
7
|
+
// - http://www.bing.com%00, %00 before ? (question mark) is considered invalid. IE/Edge throws invalid argument exception
|
|
8
|
+
// - http://www.bing.com%1, %1 is invalid
|
|
9
|
+
// - http://www.bing.com%g, %g is invalid (IE and Edge expects a two hex value after a %)
|
|
10
|
+
// - http://www.bing.com%, % as ending is invalid (IE and Edge expects a two hex value after a %)
|
|
11
|
+
// All above % cases if they're after ? (question mark) is then considered valid again
|
|
12
|
+
// Similar for @, it needs to be after / (forward slash), or ? (question mark). Otherwise IE/Edge will throw security exception
|
|
13
|
+
// - http://www.bing.com@name, @name before ? (question mark) is considered invalid
|
|
14
|
+
// - http://www.bing.com/@name, is valid sine it is after / (forward slash)
|
|
15
|
+
// - http://www.bing.com?@name, is also valid since it is after ? (question mark)
|
|
16
|
+
// The regex below is essentially a break down of:
|
|
17
|
+
// ^[^?]+%[^0-9a-f]+ => to exclude URL like www.bing.com%%
|
|
18
|
+
// ^[^?]+%[0-9a-f][^0-9a-f]+ => to exclude URL like www.bing.com%1
|
|
19
|
+
// ^[^?]+%00 => to exclude URL like www.bing.com%00
|
|
20
|
+
// ^[^?]+%$ => to exclude URL like www.bing.com%
|
|
21
|
+
// ^https?:\/\/[^?\/]+@ => to exclude URL like http://www.bing.com@name
|
|
22
|
+
// ^www\.[^?\/]+@ => to exclude URL like www.bing.com@name
|
|
23
|
+
// , => to exclude url like www.bing,,com
|
|
24
|
+
var httpExcludeRegEx = /^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\/\/[^?\/]+@|^www\.[^?\/]+@/i;
|
|
25
|
+
// via https://tools.ietf.org/html/rfc1035 Page 7
|
|
26
|
+
var labelRegEx = '[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'; // We're using case insensitive regexps below so don't bother including A-Z
|
|
27
|
+
var domainNameRegEx = "(?:" + labelRegEx + "\\.)*" + labelRegEx;
|
|
28
|
+
var domainPortRegEx = domainNameRegEx + "(?:\\:[0-9]+)?";
|
|
29
|
+
var domainPortWithUrlRegEx = domainPortRegEx + "(?:[\\/\\?]\\S*)?";
|
|
30
|
+
var linkMatchRules = {
|
|
31
|
+
http: {
|
|
32
|
+
match: new RegExp("^(?:microsoft-edge:)?http:\\/\\/" + domainPortWithUrlRegEx + "|www\\." + domainPortWithUrlRegEx, 'i'),
|
|
33
|
+
except: httpExcludeRegEx,
|
|
34
|
+
normalizeUrl: function (url) {
|
|
35
|
+
return new RegExp('^(?:microsoft-edge:)?http:\\/\\/', 'i').test(url) ? url : 'http://' + url;
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
https: {
|
|
39
|
+
match: new RegExp("^(?:microsoft-edge:)?https:\\/\\/" + domainPortWithUrlRegEx, 'i'),
|
|
40
|
+
except: httpExcludeRegEx,
|
|
41
|
+
},
|
|
42
|
+
mailto: { match: new RegExp('^mailto:\\S+@\\S+\\.\\S+', 'i') },
|
|
43
|
+
notes: { match: new RegExp('^notes:\\/\\/\\S+', 'i') },
|
|
44
|
+
file: { match: new RegExp('^file:\\/\\/\\/?\\S+', 'i') },
|
|
45
|
+
unc: { match: new RegExp('^\\\\\\\\\\S+', 'i') },
|
|
46
|
+
ftp: {
|
|
47
|
+
match: new RegExp("^ftp:\\/\\/" + domainPortWithUrlRegEx + "|ftp\\." + domainPortWithUrlRegEx, 'i'),
|
|
48
|
+
normalizeUrl: function (url) { return (new RegExp('^ftp:\\/\\/', 'i').test(url) ? url : 'ftp://' + url); },
|
|
49
|
+
},
|
|
50
|
+
news: { match: new RegExp("^news:(\\/\\/)?" + domainPortWithUrlRegEx, 'i') },
|
|
51
|
+
telnet: { match: new RegExp("^telnet:(\\/\\/)?" + domainPortWithUrlRegEx, 'i') },
|
|
52
|
+
gopher: { match: new RegExp("^gopher:\\/\\/" + domainPortWithUrlRegEx, 'i') },
|
|
53
|
+
wais: { match: new RegExp("^wais:(\\/\\/)?" + domainPortWithUrlRegEx, 'i') },
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Try to match a given string with link match rules, return matched link
|
|
57
|
+
* @param url Input url to match
|
|
58
|
+
* @param option Link match option, exact or partial. If it is exact match, we need
|
|
59
|
+
* to check the length of matched link and url
|
|
60
|
+
* @param rules Optional link match rules, if not passed, only the default link match
|
|
61
|
+
* rules will be applied
|
|
62
|
+
* @returns The matched link data, or null if no match found.
|
|
63
|
+
* The link data includes an original url and a normalized url
|
|
64
|
+
*/
|
|
65
|
+
function matchLink(url) {
|
|
66
|
+
var e_1, _a;
|
|
67
|
+
if (url) {
|
|
68
|
+
try {
|
|
69
|
+
for (var _b = (0, tslib_1.__values)((0, roosterjs_content_model_dom_1.getObjectKeys)(linkMatchRules)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
70
|
+
var schema = _c.value;
|
|
71
|
+
var rule = linkMatchRules[schema];
|
|
72
|
+
var matches = url.match(rule.match);
|
|
73
|
+
if (matches && matches[0] == url && (!rule.except || !rule.except.test(url))) {
|
|
74
|
+
return {
|
|
75
|
+
scheme: schema,
|
|
76
|
+
originalUrl: url,
|
|
77
|
+
normalizedUrl: rule.normalizeUrl ? rule.normalizeUrl(url) : url,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
83
|
+
finally {
|
|
84
|
+
try {
|
|
85
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
86
|
+
}
|
|
87
|
+
finally { if (e_1) throw e_1.error; }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
exports.matchLink = matchLink;
|
|
93
|
+
});
|
|
94
94
|
//# sourceMappingURL=matchLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchLink.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/link/matchLink.ts"],"names":[],"mappings":"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","sourcesContent":["import { getObjectKeys } from 'roosterjs-content-model-dom';\nimport type { LinkData } from 'roosterjs-content-model-types';\n\ninterface LinkMatchRule {\n match: RegExp;\n except?: RegExp;\n normalizeUrl?: (url: string) => string;\n}\n\n// http exclude matching regex\n// invalid URL example (in particular on IE and Edge):\n// - http://www.bing.com%00, %00 before ? (question mark) is considered invalid. IE/Edge throws invalid argument exception\n// - http://www.bing.com%1, %1 is invalid\n// - http://www.bing.com%g, %g is invalid (IE and Edge expects a two hex value after a %)\n// - http://www.bing.com%, % as ending is invalid (IE and Edge expects a two hex value after a %)\n// All above % cases if they're after ? (question mark) is then considered valid again\n// Similar for @, it needs to be after / (forward slash), or ? (question mark). Otherwise IE/Edge will throw security exception\n// - http://www.bing.com@name, @name before ? (question mark) is considered invalid\n// - http://www.bing.com/@name, is valid sine it is after / (forward slash)\n// - http://www.bing.com?@name, is also valid since it is after ? (question mark)\n// The regex below is essentially a break down of:\n// ^[^?]+%[^0-9a-f]+ => to exclude URL like www.bing.com%%\n// ^[^?]+%[0-9a-f][^0-9a-f]+ => to exclude URL like www.bing.com%1\n// ^[^?]+%00 => to exclude URL like www.bing.com%00\n// ^[^?]+%$ => to exclude URL like www.bing.com%\n// ^https?:\\/\\/[^?\\/]+@ => to exclude URL like http://www.bing.com@name\n// ^www\\.[^?\\/]+@ => to exclude URL like www.bing.com@name\n// , => to exclude url like www.bing,,com\nconst httpExcludeRegEx = /^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\\/\\/[^?\\/]+@|^www\\.[^?\\/]+@/i;\n\n// via https://tools.ietf.org/html/rfc1035 Page 7\nconst labelRegEx = '[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'; // We're using case insensitive regexps below so don't bother including A-Z\nconst domainNameRegEx = `(?:${labelRegEx}\\\\.)*${labelRegEx}`;\nconst domainPortRegEx = `${domainNameRegEx}(?:\\\\:[0-9]+)?`;\nconst domainPortWithUrlRegEx = `${domainPortRegEx}(?:[\\\\/\\\\?]\\\\S*)?`;\n\nconst linkMatchRules: Record<string, LinkMatchRule> = {\n http: {\n match: new RegExp(\n `^(?:microsoft-edge:)?http:\\\\/\\\\/${domainPortWithUrlRegEx}|www\\\\.${domainPortWithUrlRegEx}`,\n 'i'\n ),\n except: httpExcludeRegEx,\n normalizeUrl: url =>\n new RegExp('^(?:microsoft-edge:)?http:\\\\/\\\\/', 'i').test(url) ? url : 'http://' + url,\n },\n https: {\n match: new RegExp(`^(?:microsoft-edge:)?https:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i'),\n except: httpExcludeRegEx,\n },\n mailto: { match: new RegExp('^mailto:\\\\S+@\\\\S+\\\\.\\\\S+', 'i') },\n notes: { match: new RegExp('^notes:\\\\/\\\\/\\\\S+', 'i') },\n file: { match: new RegExp('^file:\\\\/\\\\/\\\\/?\\\\S+', 'i') },\n unc: { match: new RegExp('^\\\\\\\\\\\\\\\\\\\\S+', 'i') },\n ftp: {\n match: new RegExp(\n `^ftp:\\\\/\\\\/${domainPortWithUrlRegEx}|ftp\\\\.${domainPortWithUrlRegEx}`,\n 'i'\n ),\n normalizeUrl: url => (new RegExp('^ftp:\\\\/\\\\/', 'i').test(url) ? url : 'ftp://' + url),\n },\n news: { match: new RegExp(`^news:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\n telnet: { match: new RegExp(`^telnet:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\n gopher: { match: new RegExp(`^gopher:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i') },\n wais: { match: new RegExp(`^wais:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\n};\n\n/**\n * Try to match a given string with link match rules, return matched link\n * @param url Input url to match\n * @param option Link match option, exact or partial. If it is exact match, we need\n * to check the length of matched link and url\n * @param rules Optional link match rules, if not passed, only the default link match\n * rules will be applied\n * @returns The matched link data, or null if no match found.\n * The link data includes an original url and a normalized url\n */\nexport function matchLink(url: string): LinkData | null {\n if (url) {\n for (const schema of getObjectKeys(linkMatchRules)) {\n const rule = linkMatchRules[schema];\n const matches = url.match(rule.match);\n if (matches && matches[0] == url && (!rule.except || !rule.except.test(url))) {\n return {\n scheme: schema,\n originalUrl: url,\n normalizedUrl: rule.normalizeUrl ? rule.normalizeUrl(url) : url,\n };\n }\n }\n }\n\n return null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"matchLink.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/link/matchLink.ts"],"names":[],"mappings":"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","sourcesContent":["import { getObjectKeys } from 'roosterjs-content-model-dom';\r\nimport type { LinkData } from 'roosterjs-content-model-types';\r\n\r\ninterface LinkMatchRule {\r\n match: RegExp;\r\n except?: RegExp;\r\n normalizeUrl?: (url: string) => string;\r\n}\r\n\r\n// http exclude matching regex\r\n// invalid URL example (in particular on IE and Edge):\r\n// - http://www.bing.com%00, %00 before ? (question mark) is considered invalid. IE/Edge throws invalid argument exception\r\n// - http://www.bing.com%1, %1 is invalid\r\n// - http://www.bing.com%g, %g is invalid (IE and Edge expects a two hex value after a %)\r\n// - http://www.bing.com%, % as ending is invalid (IE and Edge expects a two hex value after a %)\r\n// All above % cases if they're after ? (question mark) is then considered valid again\r\n// Similar for @, it needs to be after / (forward slash), or ? (question mark). Otherwise IE/Edge will throw security exception\r\n// - http://www.bing.com@name, @name before ? (question mark) is considered invalid\r\n// - http://www.bing.com/@name, is valid sine it is after / (forward slash)\r\n// - http://www.bing.com?@name, is also valid since it is after ? (question mark)\r\n// The regex below is essentially a break down of:\r\n// ^[^?]+%[^0-9a-f]+ => to exclude URL like www.bing.com%%\r\n// ^[^?]+%[0-9a-f][^0-9a-f]+ => to exclude URL like www.bing.com%1\r\n// ^[^?]+%00 => to exclude URL like www.bing.com%00\r\n// ^[^?]+%$ => to exclude URL like www.bing.com%\r\n// ^https?:\\/\\/[^?\\/]+@ => to exclude URL like http://www.bing.com@name\r\n// ^www\\.[^?\\/]+@ => to exclude URL like www.bing.com@name\r\n// , => to exclude url like www.bing,,com\r\nconst httpExcludeRegEx = /^[^?]+%[^0-9a-f]+|^[^?]+%[0-9a-f][^0-9a-f]+|^[^?]+%00|^[^?]+%$|^https?:\\/\\/[^?\\/]+@|^www\\.[^?\\/]+@/i;\r\n\r\n// via https://tools.ietf.org/html/rfc1035 Page 7\r\nconst labelRegEx = '[a-z0-9](?:[a-z0-9-]*[a-z0-9])?'; // We're using case insensitive regexps below so don't bother including A-Z\r\nconst domainNameRegEx = `(?:${labelRegEx}\\\\.)*${labelRegEx}`;\r\nconst domainPortRegEx = `${domainNameRegEx}(?:\\\\:[0-9]+)?`;\r\nconst domainPortWithUrlRegEx = `${domainPortRegEx}(?:[\\\\/\\\\?]\\\\S*)?`;\r\n\r\nconst linkMatchRules: Record<string, LinkMatchRule> = {\r\n http: {\r\n match: new RegExp(\r\n `^(?:microsoft-edge:)?http:\\\\/\\\\/${domainPortWithUrlRegEx}|www\\\\.${domainPortWithUrlRegEx}`,\r\n 'i'\r\n ),\r\n except: httpExcludeRegEx,\r\n normalizeUrl: url =>\r\n new RegExp('^(?:microsoft-edge:)?http:\\\\/\\\\/', 'i').test(url) ? url : 'http://' + url,\r\n },\r\n https: {\r\n match: new RegExp(`^(?:microsoft-edge:)?https:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i'),\r\n except: httpExcludeRegEx,\r\n },\r\n mailto: { match: new RegExp('^mailto:\\\\S+@\\\\S+\\\\.\\\\S+', 'i') },\r\n notes: { match: new RegExp('^notes:\\\\/\\\\/\\\\S+', 'i') },\r\n file: { match: new RegExp('^file:\\\\/\\\\/\\\\/?\\\\S+', 'i') },\r\n unc: { match: new RegExp('^\\\\\\\\\\\\\\\\\\\\S+', 'i') },\r\n ftp: {\r\n match: new RegExp(\r\n `^ftp:\\\\/\\\\/${domainPortWithUrlRegEx}|ftp\\\\.${domainPortWithUrlRegEx}`,\r\n 'i'\r\n ),\r\n normalizeUrl: url => (new RegExp('^ftp:\\\\/\\\\/', 'i').test(url) ? url : 'ftp://' + url),\r\n },\r\n news: { match: new RegExp(`^news:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n telnet: { match: new RegExp(`^telnet:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n gopher: { match: new RegExp(`^gopher:\\\\/\\\\/${domainPortWithUrlRegEx}`, 'i') },\r\n wais: { match: new RegExp(`^wais:(\\\\/\\\\/)?${domainPortWithUrlRegEx}`, 'i') },\r\n};\r\n\r\n/**\r\n * Try to match a given string with link match rules, return matched link\r\n * @param url Input url to match\r\n * @param option Link match option, exact or partial. If it is exact match, we need\r\n * to check the length of matched link and url\r\n * @param rules Optional link match rules, if not passed, only the default link match\r\n * rules will be applied\r\n * @returns The matched link data, or null if no match found.\r\n * The link data includes an original url and a normalized url\r\n */\r\nexport function matchLink(url: string): LinkData | null {\r\n if (url) {\r\n for (const schema of getObjectKeys(linkMatchRules)) {\r\n const rule = linkMatchRules[schema];\r\n const matches = url.match(rule.match);\r\n if (matches && matches[0] == url && (!rule.except || !rule.except.test(url))) {\r\n return {\r\n scheme: schema,\r\n originalUrl: url,\r\n normalizedUrl: rule.normalizeUrl ? rule.normalizeUrl(url) : url,\r\n };\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n}\r\n"]}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { AutoLinkOptions, ContentModelText, PromotedLink, ShallowMutableContentModelParagraph } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Promote the given text segment to a hyper link when the segment text is ending with a valid link format.
|
|
4
|
-
* When the whole text segment if of a link, promote the whole segment.
|
|
5
|
-
* When the text segment ends with a link format, split the segment and promote the second part
|
|
6
|
-
* When link is in middle of the text segment, no action.
|
|
7
|
-
* This is mainly used for doing auto link when there is a link before cursor
|
|
8
|
-
* @param segment The text segment to search link text from
|
|
9
|
-
* @param paragraph Parent paragraph of the segment
|
|
10
|
-
* @param options Options of auto link
|
|
11
|
-
* @returns If a link is promoted, return this segment. Otherwise return null
|
|
12
|
-
*/
|
|
13
|
-
export declare function promoteLink(segment: ContentModelText, paragraph: ShallowMutableContentModelParagraph, autoLinkOptions: AutoLinkOptions): ContentModelText | null;
|
|
14
|
-
/**
|
|
15
|
-
* Verify if the link can be promoted
|
|
16
|
-
* @param segment The text segment to search link text from
|
|
17
|
-
* @param options Options of auto link
|
|
18
|
-
* @returns if a link can be promoted
|
|
19
|
-
*/
|
|
20
|
-
export declare function getPromoteLink(segment: ContentModelText, autoLinkOptions: AutoLinkOptions): PromotedLink | undefined;
|
|
1
|
+
import type { AutoLinkOptions, ContentModelText, PromotedLink, ShallowMutableContentModelParagraph } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Promote the given text segment to a hyper link when the segment text is ending with a valid link format.
|
|
4
|
+
* When the whole text segment if of a link, promote the whole segment.
|
|
5
|
+
* When the text segment ends with a link format, split the segment and promote the second part
|
|
6
|
+
* When link is in middle of the text segment, no action.
|
|
7
|
+
* This is mainly used for doing auto link when there is a link before cursor
|
|
8
|
+
* @param segment The text segment to search link text from
|
|
9
|
+
* @param paragraph Parent paragraph of the segment
|
|
10
|
+
* @param options Options of auto link
|
|
11
|
+
* @returns If a link is promoted, return this segment. Otherwise return null
|
|
12
|
+
*/
|
|
13
|
+
export declare function promoteLink(segment: ContentModelText, paragraph: ShallowMutableContentModelParagraph, autoLinkOptions: AutoLinkOptions): ContentModelText | null;
|
|
14
|
+
/**
|
|
15
|
+
* Verify if the link can be promoted
|
|
16
|
+
* @param segment The text segment to search link text from
|
|
17
|
+
* @param options Options of auto link
|
|
18
|
+
* @returns if a link can be promoted
|
|
19
|
+
*/
|
|
20
|
+
export declare function getPromoteLink(segment: ContentModelText, autoLinkOptions: AutoLinkOptions): PromotedLink | undefined;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
define(["require", "exports", "./getLinkUrl", "../../publicApi/segment/splitTextSegment"], function (require, exports, getLinkUrl_1, splitTextSegment_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getPromoteLink = exports.promoteLink = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* Promote the given text segment to a hyper link when the segment text is ending with a valid link format.
|
|
7
|
-
* When the whole text segment if of a link, promote the whole segment.
|
|
8
|
-
* When the text segment ends with a link format, split the segment and promote the second part
|
|
9
|
-
* When link is in middle of the text segment, no action.
|
|
10
|
-
* This is mainly used for doing auto link when there is a link before cursor
|
|
11
|
-
* @param segment The text segment to search link text from
|
|
12
|
-
* @param paragraph Parent paragraph of the segment
|
|
13
|
-
* @param options Options of auto link
|
|
14
|
-
* @returns If a link is promoted, return this segment. Otherwise return null
|
|
15
|
-
*/
|
|
16
|
-
function promoteLink(segment, paragraph, autoLinkOptions) {
|
|
17
|
-
if (segment.link) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
var promotedLink = getPromoteLink(segment, autoLinkOptions);
|
|
21
|
-
if (promotedLink) {
|
|
22
|
-
var linkSegment = (0, splitTextSegment_1.splitTextSegment)(segment, paragraph, segment.text.length - promotedLink.label.trimLeft().length, segment.text.trimRight().length);
|
|
23
|
-
linkSegment.link = {
|
|
24
|
-
format: {
|
|
25
|
-
href: promotedLink.href,
|
|
26
|
-
underline: true,
|
|
27
|
-
},
|
|
28
|
-
dataset: {},
|
|
29
|
-
};
|
|
30
|
-
return linkSegment;
|
|
31
|
-
}
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
exports.promoteLink = promoteLink;
|
|
35
|
-
/**
|
|
36
|
-
* Verify if the link can be promoted
|
|
37
|
-
* @param segment The text segment to search link text from
|
|
38
|
-
* @param options Options of auto link
|
|
39
|
-
* @returns if a link can be promoted
|
|
40
|
-
*/
|
|
41
|
-
function getPromoteLink(segment, autoLinkOptions) {
|
|
42
|
-
var link = segment.text.split(' ').pop();
|
|
43
|
-
var url = link === null || link === void 0 ? void 0 : link.trim();
|
|
44
|
-
var linkUrl = undefined;
|
|
45
|
-
if (url && link && (linkUrl = (0, getLinkUrl_1.getLinkUrl)(url, autoLinkOptions))) {
|
|
46
|
-
return {
|
|
47
|
-
label: link,
|
|
48
|
-
href: linkUrl,
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
exports.getPromoteLink = getPromoteLink;
|
|
54
|
-
});
|
|
1
|
+
define(["require", "exports", "./getLinkUrl", "../../publicApi/segment/splitTextSegment"], function (require, exports, getLinkUrl_1, splitTextSegment_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getPromoteLink = exports.promoteLink = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Promote the given text segment to a hyper link when the segment text is ending with a valid link format.
|
|
7
|
+
* When the whole text segment if of a link, promote the whole segment.
|
|
8
|
+
* When the text segment ends with a link format, split the segment and promote the second part
|
|
9
|
+
* When link is in middle of the text segment, no action.
|
|
10
|
+
* This is mainly used for doing auto link when there is a link before cursor
|
|
11
|
+
* @param segment The text segment to search link text from
|
|
12
|
+
* @param paragraph Parent paragraph of the segment
|
|
13
|
+
* @param options Options of auto link
|
|
14
|
+
* @returns If a link is promoted, return this segment. Otherwise return null
|
|
15
|
+
*/
|
|
16
|
+
function promoteLink(segment, paragraph, autoLinkOptions) {
|
|
17
|
+
if (segment.link) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
var promotedLink = getPromoteLink(segment, autoLinkOptions);
|
|
21
|
+
if (promotedLink) {
|
|
22
|
+
var linkSegment = (0, splitTextSegment_1.splitTextSegment)(segment, paragraph, segment.text.length - promotedLink.label.trimLeft().length, segment.text.trimRight().length);
|
|
23
|
+
linkSegment.link = {
|
|
24
|
+
format: {
|
|
25
|
+
href: promotedLink.href,
|
|
26
|
+
underline: true,
|
|
27
|
+
},
|
|
28
|
+
dataset: {},
|
|
29
|
+
};
|
|
30
|
+
return linkSegment;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
exports.promoteLink = promoteLink;
|
|
35
|
+
/**
|
|
36
|
+
* Verify if the link can be promoted
|
|
37
|
+
* @param segment The text segment to search link text from
|
|
38
|
+
* @param options Options of auto link
|
|
39
|
+
* @returns if a link can be promoted
|
|
40
|
+
*/
|
|
41
|
+
function getPromoteLink(segment, autoLinkOptions) {
|
|
42
|
+
var link = segment.text.split(' ').pop();
|
|
43
|
+
var url = link === null || link === void 0 ? void 0 : link.trim();
|
|
44
|
+
var linkUrl = undefined;
|
|
45
|
+
if (url && link && (linkUrl = (0, getLinkUrl_1.getLinkUrl)(url, autoLinkOptions))) {
|
|
46
|
+
return {
|
|
47
|
+
label: link,
|
|
48
|
+
href: linkUrl,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
exports.getPromoteLink = getPromoteLink;
|
|
54
|
+
});
|
|
55
55
|
//# sourceMappingURL=promoteLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promoteLink.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/link/promoteLink.ts"],"names":[],"mappings":";;;;IASA;;;;;;;;;;OAUG;IACH,SAAgB,WAAW,CACvB,OAAyB,EACzB,SAA8C,EAC9C,eAAgC;QAEhC,IAAI,OAAO,CAAC,IAAI,EAAE;YACd,OAAO,IAAI,CAAC;SACf;QAED,IAAM,YAAY,GAAG,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAE9D,IAAI,YAAY,EAAE;YACd,IAAM,WAAW,GAAG,IAAA,mCAAgB,EAChC,OAAO,EACP,SAAS,EACT,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,EAC1D,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAClC,CAAC;YACF,WAAW,CAAC,IAAI,GAAG;gBACf,MAAM,EAAE;oBACJ,IAAI,EAAE,YAAY,CAAC,IAAI;oBACvB,SAAS,EAAE,IAAI;iBAClB;gBACD,OAAO,EAAE,EAAE;aACd,CAAC;YAEF,OAAO,WAAW,CAAC;SACtB;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IA9BD,kCA8BC;IAED;;;;;OAKG;IACH,SAAgB,cAAc,CAC1B,OAAyB,EACzB,eAAgC;QAEhC,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QAC3C,IAAM,GAAG,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE,CAAC;QACzB,IAAI,OAAO,GAAuB,SAAS,CAAC;QAC5C,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,OAAO,GAAG,IAAA,uBAAU,EAAC,GAAG,EAAE,eAAe,CAAC,CAAC,EAAE;YAC7D,OAAO;gBACH,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,OAAO;aAChB,CAAC;SACL;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAdD,wCAcC","sourcesContent":["import { getLinkUrl } from './getLinkUrl';\nimport { splitTextSegment } from '../../publicApi/segment/splitTextSegment';\nimport type {\n AutoLinkOptions,\n ContentModelText,\n PromotedLink,\n ShallowMutableContentModelParagraph,\n} from 'roosterjs-content-model-types';\n\n/**\n * Promote the given text segment to a hyper link when the segment text is ending with a valid link format.\n * When the whole text segment if of a link, promote the whole segment.\n * When the text segment ends with a link format, split the segment and promote the second part\n * When link is in middle of the text segment, no action.\n * This is mainly used for doing auto link when there is a link before cursor\n * @param segment The text segment to search link text from\n * @param paragraph Parent paragraph of the segment\n * @param options Options of auto link\n * @returns If a link is promoted, return this segment. Otherwise return null\n */\nexport function promoteLink(\n segment: ContentModelText,\n paragraph: ShallowMutableContentModelParagraph,\n autoLinkOptions: AutoLinkOptions\n): ContentModelText | null {\n if (segment.link) {\n return null;\n }\n\n const promotedLink = getPromoteLink(segment, autoLinkOptions);\n\n if (promotedLink) {\n const linkSegment = splitTextSegment(\n segment,\n paragraph,\n segment.text.length - promotedLink.label.trimLeft().length,\n segment.text.trimRight().length\n );\n linkSegment.link = {\n format: {\n href: promotedLink.href,\n underline: true,\n },\n dataset: {},\n };\n\n return linkSegment;\n }\n\n return null;\n}\n\n/**\n * Verify if the link can be promoted\n * @param segment The text segment to search link text from\n * @param options Options of auto link\n * @returns if a link can be promoted\n */\nexport function getPromoteLink(\n segment: ContentModelText,\n autoLinkOptions: AutoLinkOptions\n): PromotedLink | undefined {\n const link = segment.text.split(' ').pop();\n const url = link?.trim();\n let linkUrl: string | undefined = undefined;\n if (url && link && (linkUrl = getLinkUrl(url, autoLinkOptions))) {\n return {\n label: link,\n href: linkUrl,\n };\n }\n return undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"promoteLink.js","sourceRoot":"","sources":["../../../../../packages/roosterjs-content-model-api/lib/modelApi/link/promoteLink.ts"],"names":[],"mappings":";;;;IASA;;;;;;;;;;OAUG;IACH,SAAgB,WAAW,CACvB,OAAyB,EACzB,SAA8C,EAC9C,eAAgC;QAEhC,IAAI,OAAO,CAAC,IAAI,EAAE;YACd,OAAO,IAAI,CAAC;SACf;QAED,IAAM,YAAY,GAAG,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAE9D,IAAI,YAAY,EAAE;YACd,IAAM,WAAW,GAAG,IAAA,mCAAgB,EAChC,OAAO,EACP,SAAS,EACT,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,EAC1D,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,MAAM,CAClC,CAAC;YACF,WAAW,CAAC,IAAI,GAAG;gBACf,MAAM,EAAE;oBACJ,IAAI,EAAE,YAAY,CAAC,IAAI;oBACvB,SAAS,EAAE,IAAI;iBAClB;gBACD,OAAO,EAAE,EAAE;aACd,CAAC;YAEF,OAAO,WAAW,CAAC;SACtB;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IA9BD,kCA8BC;IAED;;;;;OAKG;IACH,SAAgB,cAAc,CAC1B,OAAyB,EACzB,eAAgC;QAEhC,IAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;QAC3C,IAAM,GAAG,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE,CAAC;QACzB,IAAI,OAAO,GAAuB,SAAS,CAAC;QAC5C,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,OAAO,GAAG,IAAA,uBAAU,EAAC,GAAG,EAAE,eAAe,CAAC,CAAC,EAAE;YAC7D,OAAO;gBACH,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,OAAO;aAChB,CAAC;SACL;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAdD,wCAcC","sourcesContent":["import { getLinkUrl } from './getLinkUrl';\r\nimport { splitTextSegment } from '../../publicApi/segment/splitTextSegment';\r\nimport type {\r\n AutoLinkOptions,\r\n ContentModelText,\r\n PromotedLink,\r\n ShallowMutableContentModelParagraph,\r\n} from 'roosterjs-content-model-types';\r\n\r\n/**\r\n * Promote the given text segment to a hyper link when the segment text is ending with a valid link format.\r\n * When the whole text segment if of a link, promote the whole segment.\r\n * When the text segment ends with a link format, split the segment and promote the second part\r\n * When link is in middle of the text segment, no action.\r\n * This is mainly used for doing auto link when there is a link before cursor\r\n * @param segment The text segment to search link text from\r\n * @param paragraph Parent paragraph of the segment\r\n * @param options Options of auto link\r\n * @returns If a link is promoted, return this segment. Otherwise return null\r\n */\r\nexport function promoteLink(\r\n segment: ContentModelText,\r\n paragraph: ShallowMutableContentModelParagraph,\r\n autoLinkOptions: AutoLinkOptions\r\n): ContentModelText | null {\r\n if (segment.link) {\r\n return null;\r\n }\r\n\r\n const promotedLink = getPromoteLink(segment, autoLinkOptions);\r\n\r\n if (promotedLink) {\r\n const linkSegment = splitTextSegment(\r\n segment,\r\n paragraph,\r\n segment.text.length - promotedLink.label.trimLeft().length,\r\n segment.text.trimRight().length\r\n );\r\n linkSegment.link = {\r\n format: {\r\n href: promotedLink.href,\r\n underline: true,\r\n },\r\n dataset: {},\r\n };\r\n\r\n return linkSegment;\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * Verify if the link can be promoted\r\n * @param segment The text segment to search link text from\r\n * @param options Options of auto link\r\n * @returns if a link can be promoted\r\n */\r\nexport function getPromoteLink(\r\n segment: ContentModelText,\r\n autoLinkOptions: AutoLinkOptions\r\n): PromotedLink | undefined {\r\n const link = segment.text.split(' ').pop();\r\n const url = link?.trim();\r\n let linkUrl: string | undefined = undefined;\r\n if (url && link && (linkUrl = getLinkUrl(url, autoLinkOptions))) {\r\n return {\r\n label: link,\r\n href: linkUrl,\r\n };\r\n }\r\n return undefined;\r\n}\r\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { ContentModelBlockGroup, ContentModelListItem, ReadonlyContentModelBlockGroup, ReadonlyContentModelListItem } from 'roosterjs-content-model-types';
|
|
2
|
-
/**
|
|
3
|
-
* Search for all list items in the same thread as the current list item
|
|
4
|
-
* @param model The content model
|
|
5
|
-
* @param currentItem The current list item
|
|
6
|
-
*/
|
|
7
|
-
export declare function findListItemsInSameThread(group: ContentModelBlockGroup, currentItem: ContentModelListItem): ContentModelListItem[];
|
|
8
|
-
/**
|
|
9
|
-
* Search for all list items in the same thread as the current list item (Readonly)
|
|
10
|
-
* @param model The content model
|
|
11
|
-
* @param currentItem The current list item
|
|
12
|
-
*/
|
|
13
|
-
export declare function findListItemsInSameThread(group: ReadonlyContentModelBlockGroup, currentItem: ReadonlyContentModelListItem): ReadonlyContentModelListItem[];
|
|
1
|
+
import type { ContentModelBlockGroup, ContentModelListItem, ReadonlyContentModelBlockGroup, ReadonlyContentModelListItem } from 'roosterjs-content-model-types';
|
|
2
|
+
/**
|
|
3
|
+
* Search for all list items in the same thread as the current list item
|
|
4
|
+
* @param model The content model
|
|
5
|
+
* @param currentItem The current list item
|
|
6
|
+
*/
|
|
7
|
+
export declare function findListItemsInSameThread(group: ContentModelBlockGroup, currentItem: ContentModelListItem): ContentModelListItem[];
|
|
8
|
+
/**
|
|
9
|
+
* Search for all list items in the same thread as the current list item (Readonly)
|
|
10
|
+
* @param model The content model
|
|
11
|
+
* @param currentItem The current list item
|
|
12
|
+
*/
|
|
13
|
+
export declare function findListItemsInSameThread(group: ReadonlyContentModelBlockGroup, currentItem: ReadonlyContentModelListItem): ReadonlyContentModelListItem[];
|