@atlaskit/editor-core 161.0.0 → 162.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/dist/cjs/actions/index.js +76 -48
- package/dist/cjs/extensibility.js +2 -2
- package/dist/cjs/labs/next/full-page.js +2 -2
- package/dist/cjs/plugins/block-type/styles.js +5 -2
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +13 -11
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +11 -7
- package/dist/cjs/plugins/card/messages.js +4 -4
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +29 -11
- package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +66 -7
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +166 -7
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +9 -6
- package/dist/cjs/plugins/card/ui/assets/card.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/embed.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/inline.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/url.js +1 -1
- package/dist/cjs/plugins/card/ui/link-toolbar-button-group-options.js +60 -0
- package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +66 -0
- package/dist/cjs/plugins/card/ui/styled.js +5 -13
- package/dist/cjs/plugins/card/ui/types.js +5 -0
- package/dist/cjs/plugins/clipboard/pm-plugins/main.js +99 -3
- package/dist/cjs/plugins/code-block/styles.js +45 -38
- package/dist/cjs/plugins/extension/plugin-factory.js +4 -1
- package/dist/cjs/plugins/extension/pm-plugins/main.js +34 -11
- package/dist/cjs/plugins/extension/utils.js +57 -12
- package/dist/cjs/plugins/find-replace/ui/Find.js +12 -12
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +5 -5
- package/dist/cjs/plugins/find-replace/ui/Replace.js +5 -5
- package/dist/cjs/plugins/find-replace/ui/styles.js +12 -15
- package/dist/cjs/plugins/layout/styles.js +2 -2
- package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +180 -0
- package/dist/cjs/plugins/list/commands/index.js +35 -38
- package/dist/cjs/plugins/list/utils/replace-content.js +31 -0
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/cjs/plugins/media/styles.js +2 -2
- package/dist/cjs/plugins/media/utils/media-single.js +15 -2
- package/dist/cjs/plugins/paste/handlers.js +19 -5
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/cjs/plugins/placeholder-text/index.js +45 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +66 -22
- package/dist/cjs/plugins/placeholder-text/selection-utils.js +19 -0
- package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
- package/dist/cjs/plugins/table/commands/index.js +0 -6
- package/dist/cjs/plugins/table/commands/insert.js +1 -1
- package/dist/cjs/plugins/table/commands/misc.js +5 -18
- package/dist/cjs/plugins/table/commands-with-analytics.js +1 -1
- package/dist/cjs/plugins/table/handlers.js +6 -2
- package/dist/cjs/plugins/table/index.js +7 -13
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/cjs/plugins/table/nodeviews/table.js +7 -38
- package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/main.js +3 -1
- package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +4 -7
- package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +11 -0
- package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -3
- package/dist/cjs/plugins/table/reducer.js +0 -7
- package/dist/cjs/plugins/table/toolbar.js +5 -15
- package/dist/cjs/plugins/table/transforms/metadata.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +1 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +0 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +4 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +0 -0
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/cjs/plugins/table/ui/common-styles.js +53 -0
- package/dist/cjs/plugins/table/ui/ui-styles.js +109 -0
- package/dist/cjs/plugins/table/utils/nodes.js +15 -15
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +15 -1
- package/dist/cjs/plugins/text-formatting/styles.js +5 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +71 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/cjs/plugins/text-formatting/utils.js +30 -2
- package/dist/cjs/plugins/type-ahead/api.js +32 -1
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -5
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/cjs/plugins/type-ahead/utils.js +22 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +33 -10
- package/dist/cjs/utils/index.js +1 -8
- package/dist/cjs/utils/insert.js +1 -9
- package/dist/cjs/utils/selection.js +2 -9
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +20 -23
- package/dist/es2019/extensibility.js +1 -1
- package/dist/es2019/labs/next/full-page.js +2 -2
- package/dist/es2019/plugins/block-type/styles.js +3 -3
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +15 -12
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +19 -14
- package/dist/es2019/plugins/card/messages.js +4 -4
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +21 -9
- package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +54 -3
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +145 -3
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +10 -6
- package/dist/es2019/plugins/card/ui/assets/card.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/embed.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/inline.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/url.js +1 -1
- package/dist/es2019/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
- package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
- package/dist/es2019/plugins/card/ui/styled.js +2 -2
- package/dist/es2019/plugins/card/ui/types.js +1 -0
- package/dist/es2019/plugins/clipboard/pm-plugins/main.js +91 -9
- package/dist/es2019/plugins/code-block/styles.js +14 -14
- package/dist/es2019/plugins/extension/plugin-factory.js +3 -1
- package/dist/es2019/plugins/extension/pm-plugins/main.js +38 -12
- package/dist/es2019/plugins/extension/utils.js +37 -2
- package/dist/es2019/plugins/find-replace/ui/Find.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/styles.js +14 -9
- package/dist/es2019/plugins/layout/styles.js +5 -1
- package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +163 -0
- package/dist/es2019/plugins/list/commands/index.js +29 -28
- package/dist/es2019/plugins/list/utils/replace-content.js +22 -0
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/es2019/plugins/media/styles.js +1 -1
- package/dist/es2019/plugins/media/utils/media-single.js +14 -1
- package/dist/es2019/plugins/paste/handlers.js +19 -5
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/placeholder-text/index.js +46 -1
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +66 -20
- package/dist/es2019/plugins/placeholder-text/selection-utils.js +9 -0
- package/dist/es2019/plugins/placeholder-text/styles.js +22 -0
- package/dist/es2019/plugins/table/commands/index.js +1 -1
- package/dist/es2019/plugins/table/commands/insert.js +1 -1
- package/dist/es2019/plugins/table/commands/misc.js +5 -11
- package/dist/es2019/plugins/table/commands-with-analytics.js +1 -1
- package/dist/es2019/plugins/table/handlers.js +6 -2
- package/dist/es2019/plugins/table/index.js +4 -8
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/es2019/plugins/table/nodeviews/table.js +2 -16
- package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/main.js +2 -1
- package/dist/es2019/plugins/table/pm-plugins/plugin-factory.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
- package/dist/es2019/plugins/table/reducer.js +0 -9
- package/dist/es2019/plugins/table/toolbar.js +1 -4
- package/dist/es2019/plugins/table/transforms/metadata.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +0 -0
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +3 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +0 -0
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/es2019/plugins/table/ui/{common-styles.css.js → common-styles.js} +57 -27
- package/dist/es2019/plugins/table/ui/{ui-styles.css.js → ui-styles.js} +99 -78
- package/dist/es2019/plugins/table/utils/nodes.js +11 -11
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +13 -1
- package/dist/es2019/plugins/text-formatting/styles.js +3 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +61 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/es2019/plugins/text-formatting/utils.js +13 -1
- package/dist/es2019/plugins/type-ahead/api.js +31 -2
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +17 -5
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/es2019/plugins/type-ahead/utils.js +15 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/index.js +46 -24
- package/dist/es2019/utils/index.js +1 -1
- package/dist/es2019/utils/insert.js +2 -10
- package/dist/es2019/utils/selection.js +1 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +76 -48
- package/dist/esm/extensibility.js +1 -1
- package/dist/esm/labs/next/full-page.js +2 -2
- package/dist/esm/plugins/block-type/styles.js +4 -2
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +14 -12
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +9 -5
- package/dist/esm/plugins/card/messages.js +4 -4
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +25 -9
- package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +57 -5
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +154 -5
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +9 -6
- package/dist/esm/plugins/card/ui/assets/card.js +1 -1
- package/dist/esm/plugins/card/ui/assets/embed.js +1 -1
- package/dist/esm/plugins/card/ui/assets/inline.js +1 -1
- package/dist/esm/plugins/card/ui/assets/url.js +1 -1
- package/dist/esm/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
- package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
- package/dist/esm/plugins/card/ui/styled.js +2 -2
- package/dist/esm/plugins/card/ui/types.js +1 -0
- package/dist/esm/plugins/clipboard/pm-plugins/main.js +91 -2
- package/dist/esm/plugins/code-block/styles.js +42 -38
- package/dist/esm/plugins/extension/plugin-factory.js +3 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +34 -11
- package/dist/esm/plugins/extension/utils.js +51 -9
- package/dist/esm/plugins/find-replace/ui/Find.js +1 -1
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/esm/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/esm/plugins/find-replace/ui/styles.js +6 -10
- package/dist/esm/plugins/layout/styles.js +2 -2
- package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +168 -0
- package/dist/esm/plugins/list/commands/index.js +33 -34
- package/dist/esm/plugins/list/utils/replace-content.js +21 -0
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/utils/media-single.js +12 -1
- package/dist/esm/plugins/paste/handlers.js +19 -5
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/placeholder-text/index.js +44 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +67 -20
- package/dist/esm/plugins/placeholder-text/selection-utils.js +9 -0
- package/dist/esm/plugins/placeholder-text/styles.js +2 -1
- package/dist/esm/plugins/table/commands/index.js +1 -1
- package/dist/esm/plugins/table/commands/insert.js +1 -1
- package/dist/esm/plugins/table/commands/misc.js +5 -15
- package/dist/esm/plugins/table/commands-with-analytics.js +1 -1
- package/dist/esm/plugins/table/handlers.js +6 -2
- package/dist/esm/plugins/table/index.js +6 -11
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/esm/plugins/table/nodeviews/table.js +6 -37
- package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/main.js +2 -1
- package/dist/esm/plugins/table/pm-plugins/plugin-factory.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
- package/dist/esm/plugins/table/reducer.js +0 -7
- package/dist/esm/plugins/table/toolbar.js +1 -10
- package/dist/esm/plugins/table/transforms/metadata.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +0 -0
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +3 -2
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +0 -0
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/esm/plugins/table/ui/common-styles.js +27 -0
- package/dist/esm/plugins/table/ui/ui-styles.js +68 -0
- package/dist/esm/plugins/table/utils/nodes.js +14 -14
- package/dist/esm/plugins/tasks-and-decisions/commands.js +13 -1
- package/dist/esm/plugins/text-formatting/styles.js +4 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +69 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/esm/plugins/text-formatting/utils.js +18 -0
- package/dist/esm/plugins/type-ahead/api.js +30 -2
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +16 -4
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +12 -0
- package/dist/esm/plugins/type-ahead/utils.js +17 -3
- package/dist/esm/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/index.js +28 -10
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/insert.js +2 -10
- package/dist/esm/utils/selection.js +1 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +2 -2
- package/dist/types/extensibility.d.ts +1 -1
- package/dist/types/plugins/analytics/types/list-events.d.ts +0 -1
- package/dist/types/plugins/block-type/styles.d.ts +2 -1
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +2 -7
- package/dist/types/plugins/card/messages.d.ts +2 -2
- package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +18 -2
- package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +23 -3
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +3 -1
- package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +5 -0
- package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +5 -0
- package/dist/types/plugins/card/ui/styled.d.ts +2 -3
- package/dist/types/plugins/card/ui/types.d.ts +12 -0
- package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +10 -1
- package/dist/types/plugins/code-block/styles.d.ts +3 -2
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/utils.d.ts +3 -1
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +2 -1
- package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -5
- package/dist/types/plugins/layout/styles.d.ts +1 -1
- package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +25 -0
- package/dist/types/plugins/list/commands/index.d.ts +0 -1
- package/dist/types/plugins/list/utils/replace-content.d.ts +8 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -2
- package/dist/types/plugins/media/styles.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-single.d.ts +1 -0
- package/dist/types/plugins/panel/styles.d.ts +1 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -1
- package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +3 -2
- package/dist/types/plugins/placeholder-text/selection-utils.d.ts +2 -0
- package/dist/types/plugins/rule/styles.d.ts +1 -1
- package/dist/types/plugins/table/commands/index.d.ts +1 -1
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/table.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -4
- package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
- package/dist/types/plugins/table/types.d.ts +1 -8
- package/dist/types/plugins/table/ui/FloatingContextualButton/{styles.css.d.ts → styles.d.ts} +0 -0
- package/dist/types/plugins/table/ui/FloatingContextualMenu/{styles.css.d.ts → styles.d.ts} +0 -0
- package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +0 -1
- package/dist/types/plugins/table/ui/common-styles.d.ts +6 -0
- package/dist/types/plugins/table/ui/ui-styles.d.ts +15 -0
- package/dist/types/plugins/table/utils/nodes.d.ts +6 -6
- package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
- package/dist/types/plugins/text-formatting/styles.d.ts +2 -1
- package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +30 -0
- package/dist/types/plugins/text-formatting/utils.d.ts +4 -0
- package/dist/types/plugins/type-ahead/api.d.ts +11 -1
- package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +4 -0
- package/dist/types/ui/ContentStyles/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/selection.d.ts +0 -1
- package/package.json +28 -26
- package/dist/cjs/plugins/table/ui/common-styles.css.js +0 -44
- package/dist/cjs/plugins/table/ui/ui-styles.css.js +0 -95
- package/dist/esm/plugins/table/ui/common-styles.css.js +0 -23
- package/dist/esm/plugins/table/ui/ui-styles.css.js +0 -59
- package/dist/types/plugins/table/ui/common-styles.css.d.ts +0 -3
- package/dist/types/plugins/table/ui/ui-styles.css.d.ts +0 -14
|
@@ -181,6 +181,18 @@ export const InputQuery = /*#__PURE__*/React.memo(({
|
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
const onFocusOut = event => {
|
|
184
|
+
var _window$getSelection;
|
|
185
|
+
|
|
186
|
+
// See ED-14909: Chrome may emit focusout events where an input
|
|
187
|
+
// device was not directly responsible. (This rears in react v17+ consumers
|
|
188
|
+
// where react-managed node removal now appears to propagate focusout events to
|
|
189
|
+
// our event listener). As this path is strictly for click or other typeahead
|
|
190
|
+
// dismissals that don't involve typeahead item selection, we carve out an
|
|
191
|
+
// exception for Chrome-specific events where an input device was not the initiator.
|
|
192
|
+
if (browser.chrome && !(((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.type) === 'Range') && !(event !== null && event !== void 0 && event.sourceCapabilities)) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
|
|
184
196
|
cancel({
|
|
185
197
|
addPrefixTrigger: true,
|
|
186
198
|
text: cleanedInputContent(),
|
|
@@ -64,6 +64,21 @@ export const findHandler = (id, state) => {
|
|
|
64
64
|
} = pluginState;
|
|
65
65
|
return typeAheadHandlers.find(h => h.id === id) || null;
|
|
66
66
|
};
|
|
67
|
+
export const findHandlerByTrigger = ({
|
|
68
|
+
trigger,
|
|
69
|
+
editorState
|
|
70
|
+
}) => {
|
|
71
|
+
const pluginState = typeAheadPluginKey.getState(editorState);
|
|
72
|
+
|
|
73
|
+
if (!pluginState || !pluginState.typeAheadHandlers || pluginState.typeAheadHandlers.length === 0) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const {
|
|
78
|
+
typeAheadHandlers
|
|
79
|
+
} = pluginState;
|
|
80
|
+
return typeAheadHandlers.find(h => h.trigger === trigger) || null;
|
|
81
|
+
};
|
|
67
82
|
export const moveSelectedIndex = ({
|
|
68
83
|
editorView,
|
|
69
84
|
direction
|
|
@@ -12,7 +12,7 @@ import ContentStyles from '../../ContentStyles';
|
|
|
12
12
|
import { pluginKey as maxContentSizePluginKey } from '../../../plugins/max-content-size';
|
|
13
13
|
import { stateKey as mediaPluginKey } from '../../../plugins/media/pm-plugins/plugin-key';
|
|
14
14
|
import { ClickAreaBlock } from '../../Addon';
|
|
15
|
-
import {
|
|
15
|
+
import { deprecatedTableCommentEditorStyles } from '../../../plugins/table/ui/common-styles';
|
|
16
16
|
import WithFlash from '../../WithFlash';
|
|
17
17
|
import { WidthConsumer } from '@atlaskit/editor-common/ui';
|
|
18
18
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
@@ -67,7 +67,7 @@ const ContentArea = styled(ContentStyles)`
|
|
|
67
67
|
|
|
68
68
|
padding: ${TableControlsPadding}px;
|
|
69
69
|
|
|
70
|
-
${
|
|
70
|
+
${deprecatedTableCommentEditorStyles};
|
|
71
71
|
`;
|
|
72
72
|
ContentArea.displayName = 'ContentArea';
|
|
73
73
|
const SecondaryToolbar = styled.div`
|
|
@@ -2,7 +2,7 @@ import styled from 'styled-components';
|
|
|
2
2
|
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorSwoopCubicBezier, akLayoutGutterOffset, ATLASSIAN_NAVIGATION_HEIGHT, akEditorContextPanelWidth } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { taskListSelector, decisionListSelector } from '@atlaskit/adf-schema';
|
|
4
4
|
import ContentStyles from '../../ContentStyles';
|
|
5
|
-
import {
|
|
5
|
+
import { deprecatedTableFullPageEditorStyles } from '../../../plugins/table/ui/common-styles';
|
|
6
6
|
import { tableMarginFullWidthMode } from '../../../plugins/table/ui/consts';
|
|
7
7
|
import { scrollbarStyles } from '../../styles';
|
|
8
8
|
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
@@ -93,7 +93,7 @@ export const EditorContentArea = styled.div`
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
${
|
|
96
|
+
${deprecatedTableFullPageEditorStyles};
|
|
97
97
|
|
|
98
98
|
.fabric-editor--full-width-mode {
|
|
99
99
|
/* Full Width Mode styles for ignoring breakout sizes */
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
|
+
import { jsx, css, useTheme } from '@emotion/react';
|
|
3
6
|
import styled from 'styled-components';
|
|
4
7
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
5
8
|
import { editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
6
9
|
import { unsupportedStyles } from '../../plugins/unsupported-content/styles';
|
|
7
10
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
8
11
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
9
|
-
import { tableStyles } from '../../plugins/table/ui/common-styles
|
|
12
|
+
import { tableStyles } from '../../plugins/table/ui/common-styles';
|
|
10
13
|
import { placeholderStyles } from '../../plugins/placeholder/styles';
|
|
11
14
|
import { blocktypeStyles } from '../../plugins/block-type/styles';
|
|
12
15
|
import { codeBlockStyles, highlightingCodeBlockStyles } from '../../plugins/code-block/styles';
|
|
@@ -32,10 +35,16 @@ import { smartCardStyles } from '../../plugins/card/styles';
|
|
|
32
35
|
import { dateStyles } from '../../plugins/date/styles';
|
|
33
36
|
import { embedCardStyles } from '../../plugins/card/ui/styled';
|
|
34
37
|
import { useFeatureFlags } from '../../plugins/feature-flags-context';
|
|
35
|
-
|
|
38
|
+
|
|
39
|
+
const contentStyles = props => {
|
|
40
|
+
var _props$featureFlags;
|
|
41
|
+
|
|
42
|
+
return css`
|
|
36
43
|
.ProseMirror {
|
|
37
44
|
outline: none;
|
|
38
|
-
font-size: ${editorFontSize
|
|
45
|
+
font-size: ${editorFontSize({
|
|
46
|
+
theme: props.theme
|
|
47
|
+
})}px;
|
|
39
48
|
${whitespaceSharedStyles};
|
|
40
49
|
${paragraphSharedStyles};
|
|
41
50
|
${listsSharedStyles};
|
|
@@ -43,6 +52,27 @@ const ContentStyles = styled.div`
|
|
|
43
52
|
${shadowSharedStyle};
|
|
44
53
|
}
|
|
45
54
|
|
|
55
|
+
${tableStyles(props)}
|
|
56
|
+
${(_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockStyles(props) : codeBlockStyles(props)}
|
|
57
|
+
|
|
58
|
+
${blocktypeStyles(props)}
|
|
59
|
+
${textFormattingStyles(props)}
|
|
60
|
+
${textColorStyles}
|
|
61
|
+
${mediaStyles}
|
|
62
|
+
${layoutStyles}
|
|
63
|
+
${tasksAndDecisionsStyles}
|
|
64
|
+
${blockMarksSharedStyles}
|
|
65
|
+
${dateSharedStyle}
|
|
66
|
+
${annotationSharedStyles(props)}
|
|
67
|
+
${embedCardStyles}
|
|
68
|
+
|
|
69
|
+
.mediaGroupView-content-wrap ul {
|
|
70
|
+
padding: 0;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const DeprecatedContentStyles = styled.div`
|
|
46
76
|
.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {
|
|
47
77
|
pointer-events: none;
|
|
48
78
|
opacity: 0.7;
|
|
@@ -64,52 +94,34 @@ const ContentStyles = styled.div`
|
|
|
64
94
|
outline: 2px solid #8cf;
|
|
65
95
|
}
|
|
66
96
|
|
|
67
|
-
${blocktypeStyles}
|
|
68
|
-
${textFormattingStyles}
|
|
69
97
|
${placeholderTextStyles}
|
|
70
98
|
${placeholderStyles}
|
|
71
|
-
${({
|
|
72
|
-
featureFlags
|
|
73
|
-
}) => featureFlags !== null && featureFlags !== void 0 && featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockStyles : codeBlockStyles}
|
|
74
|
-
${textColorStyles}
|
|
75
99
|
${listsStyles}
|
|
76
100
|
${ruleStyles}
|
|
77
|
-
${mediaStyles}
|
|
78
|
-
${layoutStyles}
|
|
79
101
|
${telepointerStyle}
|
|
80
102
|
${gapCursorStyles};
|
|
81
|
-
${tableStyles}
|
|
82
103
|
${panelStyles}
|
|
83
104
|
${fakeCursorStyles}
|
|
84
105
|
${mentionsStyles}
|
|
85
106
|
${({
|
|
86
107
|
featureFlags
|
|
87
108
|
}) => featureFlags !== null && featureFlags !== void 0 && featureFlags.nextEmojiNodeView ? emojiStylesNext : emojiStyles}
|
|
88
|
-
${tasksAndDecisionsStyles}
|
|
89
109
|
${gridStyles}
|
|
90
110
|
${linkStyles}
|
|
91
|
-
${blockMarksSharedStyles}
|
|
92
|
-
${dateSharedStyle}
|
|
93
111
|
${extensionStyles}
|
|
94
112
|
${expandStyles}
|
|
95
113
|
${findReplaceStyles}
|
|
96
114
|
${taskDecisionStyles}
|
|
97
115
|
${statusStyles}
|
|
98
|
-
${annotationSharedStyles}
|
|
99
116
|
${smartCardStyles}
|
|
100
117
|
${smartCardSharedStyles}
|
|
101
118
|
${dateStyles}
|
|
102
|
-
${embedCardStyles}
|
|
103
119
|
${unsupportedStyles}
|
|
104
120
|
|
|
105
121
|
.panelView-content-wrap {
|
|
106
122
|
box-sizing: border-box;
|
|
107
123
|
}
|
|
108
124
|
|
|
109
|
-
.mediaGroupView-content-wrap ul {
|
|
110
|
-
padding: 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
125
|
/** Needed to override any cleared floats, e.g. image wrapping */
|
|
114
126
|
|
|
115
127
|
div.fabric-editor-block-mark[class^='fabric-editor-align'] {
|
|
@@ -154,8 +166,18 @@ const ContentStyles = styled.div`
|
|
|
154
166
|
`;
|
|
155
167
|
export default /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
156
168
|
const featureFlags = useFeatureFlags();
|
|
157
|
-
|
|
169
|
+
const {
|
|
170
|
+
allowAnnotation
|
|
171
|
+
} = props;
|
|
172
|
+
const theme = useTheme();
|
|
173
|
+
const memoizedStyle = useMemo(() => contentStyles({
|
|
174
|
+
theme,
|
|
175
|
+
allowAnnotation,
|
|
176
|
+
featureFlags
|
|
177
|
+
}), [theme, featureFlags, allowAnnotation]);
|
|
178
|
+
return jsx(DeprecatedContentStyles, _extends({}, props, {
|
|
158
179
|
innerRef: ref,
|
|
159
|
-
featureFlags: featureFlags
|
|
180
|
+
featureFlags: featureFlags,
|
|
181
|
+
css: memoizedStyle
|
|
160
182
|
}));
|
|
161
183
|
});
|
|
@@ -12,7 +12,7 @@ export { isEmptyParagraph, hasVisibleContent, isNodeEmpty, isEmptyDocument, proc
|
|
|
12
12
|
export { cascadeCommands, getEditorValueWithMedia } from './action';
|
|
13
13
|
export { isMarkAllowedInRange, isMarkExcluded, removeBlockMarks, sanitiseSelectionMarksForWrapping, sanitiseMarksInSelection } from './mark';
|
|
14
14
|
export { isParagraph, isText, isLinkMark, validateNodes } from './nodes';
|
|
15
|
-
export {
|
|
15
|
+
export { normaliseNestedLayout, setNodeSelection, setAllSelection, setGapCursorSelection, setCellSelection, setTextSelection, isValidPosition } from './selection';
|
|
16
16
|
export { containsClassName } from './dom';
|
|
17
17
|
export { default as measurements } from './performance/measure-enum';
|
|
18
18
|
|
|
@@ -4,7 +4,7 @@ import { NodeSelection, Selection } from 'prosemirror-state';
|
|
|
4
4
|
import { ReplaceStep, ReplaceAroundStep } from 'prosemirror-transform';
|
|
5
5
|
import { isEmptyParagraph } from './document';
|
|
6
6
|
import { GapCursorSelection, Side } from '../plugins/selection/gap-cursor-selection';
|
|
7
|
-
import {
|
|
7
|
+
import { normaliseNestedLayout } from './selection';
|
|
8
8
|
export let LookDirection;
|
|
9
9
|
|
|
10
10
|
(function (LookDirection) {
|
|
@@ -165,15 +165,7 @@ export const insertSelectedItem = (maybeNode, opts = {}) => (state, tr, start) =
|
|
|
165
165
|
*/
|
|
166
166
|
} else if (node.isInline || isInputFragment) {
|
|
167
167
|
const fragment = isInputFragment ? node : Fragment.fromArray([node, state.schema.text(' ')]);
|
|
168
|
-
tr = tr.replaceWith(start, start, fragment);
|
|
169
|
-
|
|
170
|
-
if (isChromeWithSelectionBug) {
|
|
171
|
-
const selection = document.getSelection();
|
|
172
|
-
|
|
173
|
-
if (selection) {
|
|
174
|
-
selection.empty();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
168
|
+
tr = tr.replaceWith(start, start, fragment);
|
|
177
169
|
|
|
178
170
|
if (opts.selectInlineNode) {
|
|
179
171
|
// Select inserted node
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
2
|
import { NodeSelection, TextSelection, AllSelection } from 'prosemirror-state';
|
|
3
|
-
import { browser } from '@atlaskit/editor-common/utils';
|
|
4
3
|
import { GapCursorSelection } from '../plugins/selection/gap-cursor/selection';
|
|
5
4
|
export const setNodeSelection = (view, pos) => {
|
|
6
5
|
const {
|
|
@@ -66,11 +65,7 @@ export const normaliseNestedLayout = ({
|
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
return node;
|
|
69
|
-
};
|
|
70
|
-
// @see: https://bugs.chromium.org/p/chromium/issues/detail?id=740085
|
|
71
|
-
// Chrome >= 58 (desktop only)
|
|
72
|
-
|
|
73
|
-
export const isChromeWithSelectionBug = browser.chrome && !browser.android && browser.chrome_version >= 58;
|
|
68
|
+
};
|
|
74
69
|
export const isSelectionAtStartOfNode = ($pos, parentNode) => {
|
|
75
70
|
if (!parentNode) {
|
|
76
71
|
return false;
|
package/dist/es2019/version.json
CHANGED
|
@@ -32,36 +32,64 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
_defineProperty(this, "getResolvedEditorState", function () {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
35
|
+
_defineProperty(this, "getResolvedEditorState", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
36
|
+
var _getCollabProvider;
|
|
37
|
+
|
|
38
|
+
var featureFlags, editorValue, editorView;
|
|
39
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
40
|
+
while (1) {
|
|
41
|
+
switch (_context.prev = _context.next) {
|
|
42
|
+
case 0:
|
|
43
|
+
if (_this.editorView) {
|
|
44
|
+
_context.next = 2;
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
throw new Error('Called getResolvedEditorState before editorView is ready');
|
|
49
|
+
|
|
50
|
+
case 2:
|
|
51
|
+
featureFlags = getFeatureFlags(_this.editorView.state);
|
|
52
|
+
|
|
53
|
+
if (featureFlags.useNativeCollabPlugin) {
|
|
54
|
+
_context.next = 10;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_context.next = 6;
|
|
59
|
+
return _this.getValue();
|
|
60
|
+
|
|
61
|
+
case 6:
|
|
62
|
+
editorValue = _context.sent;
|
|
63
|
+
|
|
64
|
+
if (editorValue) {
|
|
65
|
+
_context.next = 9;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
throw new Error('editorValue is undefined');
|
|
70
|
+
|
|
71
|
+
case 9:
|
|
72
|
+
return _context.abrupt("return", {
|
|
73
|
+
content: editorValue,
|
|
74
|
+
title: null,
|
|
75
|
+
stepVersion: -1
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
case 10:
|
|
79
|
+
editorView = _this.editorView;
|
|
80
|
+
_context.next = 13;
|
|
81
|
+
return getEditorValueWithMedia(editorView);
|
|
82
|
+
|
|
83
|
+
case 13:
|
|
84
|
+
return _context.abrupt("return", (_getCollabProvider = getCollabProvider(editorView.state)) === null || _getCollabProvider === void 0 ? void 0 : _getCollabProvider.getFinalAcknowledgedState());
|
|
85
|
+
|
|
86
|
+
case 14:
|
|
87
|
+
case "end":
|
|
88
|
+
return _context.stop();
|
|
89
|
+
}
|
|
56
90
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
resolver(resolvedEditorState);
|
|
60
|
-
}).catch(function (error) {
|
|
61
|
-
reject(error);
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
});
|
|
91
|
+
}, _callee);
|
|
92
|
+
})));
|
|
65
93
|
}
|
|
66
94
|
|
|
67
95
|
_createClass(EditorActions, [{
|
|
@@ -161,30 +189,30 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
161
189
|
}, {
|
|
162
190
|
key: "__temporaryFixForConfigPanel",
|
|
163
191
|
value: function () {
|
|
164
|
-
var _temporaryFixForConfigPanel2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
192
|
+
var _temporaryFixForConfigPanel2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
165
193
|
var editorView;
|
|
166
|
-
return _regeneratorRuntime.wrap(function
|
|
194
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
167
195
|
while (1) {
|
|
168
|
-
switch (
|
|
196
|
+
switch (_context2.prev = _context2.next) {
|
|
169
197
|
case 0:
|
|
170
198
|
editorView = this.editorView;
|
|
171
199
|
|
|
172
200
|
if (editorView) {
|
|
173
|
-
|
|
201
|
+
_context2.next = 3;
|
|
174
202
|
break;
|
|
175
203
|
}
|
|
176
204
|
|
|
177
|
-
return
|
|
205
|
+
return _context2.abrupt("return");
|
|
178
206
|
|
|
179
207
|
case 3:
|
|
180
208
|
_temporaryFixForConfigPanel(editorView);
|
|
181
209
|
|
|
182
210
|
case 4:
|
|
183
211
|
case "end":
|
|
184
|
-
return
|
|
212
|
+
return _context2.stop();
|
|
185
213
|
}
|
|
186
214
|
}
|
|
187
|
-
},
|
|
215
|
+
}, _callee2, this);
|
|
188
216
|
}));
|
|
189
217
|
|
|
190
218
|
function __temporaryFixForConfigPanel() {
|
|
@@ -197,46 +225,46 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
197
225
|
}, {
|
|
198
226
|
key: "getValue",
|
|
199
227
|
value: function () {
|
|
200
|
-
var _getValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
228
|
+
var _getValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
201
229
|
var editorView, doc, json, nodeSanitized;
|
|
202
|
-
return _regeneratorRuntime.wrap(function
|
|
230
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
203
231
|
while (1) {
|
|
204
|
-
switch (
|
|
232
|
+
switch (_context3.prev = _context3.next) {
|
|
205
233
|
case 0:
|
|
206
234
|
editorView = this.editorView;
|
|
207
235
|
|
|
208
236
|
if (editorView) {
|
|
209
|
-
|
|
237
|
+
_context3.next = 3;
|
|
210
238
|
break;
|
|
211
239
|
}
|
|
212
240
|
|
|
213
|
-
return
|
|
241
|
+
return _context3.abrupt("return");
|
|
214
242
|
|
|
215
243
|
case 3:
|
|
216
|
-
|
|
244
|
+
_context3.next = 5;
|
|
217
245
|
return getEditorValueWithMedia(editorView);
|
|
218
246
|
|
|
219
247
|
case 5:
|
|
220
|
-
doc =
|
|
248
|
+
doc = _context3.sent;
|
|
221
249
|
json = toJSON(doc);
|
|
222
250
|
|
|
223
251
|
if (this.contentEncode) {
|
|
224
|
-
|
|
252
|
+
_context3.next = 9;
|
|
225
253
|
break;
|
|
226
254
|
}
|
|
227
255
|
|
|
228
|
-
return
|
|
256
|
+
return _context3.abrupt("return", json);
|
|
229
257
|
|
|
230
258
|
case 9:
|
|
231
259
|
nodeSanitized = Node.fromJSON(this.editorView.state.schema, json);
|
|
232
|
-
return
|
|
260
|
+
return _context3.abrupt("return", this.contentEncode(nodeSanitized));
|
|
233
261
|
|
|
234
262
|
case 11:
|
|
235
263
|
case "end":
|
|
236
|
-
return
|
|
264
|
+
return _context3.stop();
|
|
237
265
|
}
|
|
238
266
|
}
|
|
239
|
-
},
|
|
267
|
+
}, _callee3, this);
|
|
240
268
|
}));
|
|
241
269
|
|
|
242
270
|
function getValue() {
|
|
@@ -4,7 +4,7 @@ export { toJSON } from './utils';
|
|
|
4
4
|
export { default as Extension } from './plugins/extension/ui/Extension';
|
|
5
5
|
export { default as ExtensionNodeWrapper } from './plugins/extension/ui/Extension/ExtensionNodeWrapper';
|
|
6
6
|
export { ExtensionNode } from './plugins/extension/nodeviews/extension';
|
|
7
|
-
export { pluginKey as tablePluginKey } from './plugins/table/pm-plugins/plugin-
|
|
7
|
+
export { pluginKey as tablePluginKey } from './plugins/table/pm-plugins/plugin-key';
|
|
8
8
|
export var EmitterEvents = {
|
|
9
9
|
TABLE_DELETED: 'TABLE_DELETED'
|
|
10
10
|
};
|
|
@@ -15,7 +15,7 @@ import ContentStyles from '../../ui/ContentStyles';
|
|
|
15
15
|
import WidthEmitter from '../../ui/WidthEmitter';
|
|
16
16
|
import { ClickAreaBlock } from '../../ui/Addon';
|
|
17
17
|
import { scrollbarStyles } from '../../ui/styles';
|
|
18
|
-
import {
|
|
18
|
+
import { deprecatedTableFullPageEditorStyles } from '../../plugins/table/ui/common-styles';
|
|
19
19
|
import AvatarsWithPluginState from '../../plugins/collab-edit/ui';
|
|
20
20
|
import { Editor, EditorContent, useEditorSharedConfig } from './Editor';
|
|
21
21
|
import { Toolbar } from './Toolbar';
|
|
@@ -35,7 +35,7 @@ ContentArea.displayName = 'ContentArea';
|
|
|
35
35
|
var EditorContentArea = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n line-height: 24px;\n height: 100%;\n width: 100%;\n max-width: ", "px;\n padding-top: 50px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n padding-bottom: 55px;\n\n & .ProseMirror {\n flex-grow: 1;\n box-sizing: border-box;\n }\n\n && .ProseMirror {\n & > * {\n clear: both;\n }\n > p,\n > ul,\n > ol,\n > h1,\n > h2,\n > h3,\n > h4,\n > h5,\n > h6 {\n clear: none;\n }\n }\n ", ";\n"])), function (_ref) {
|
|
36
36
|
var theme = _ref.theme;
|
|
37
37
|
return theme.layoutMaxWidth + GUTTER_PADDING * 2;
|
|
38
|
-
},
|
|
38
|
+
}, deprecatedTableFullPageEditorStyles);
|
|
39
39
|
EditorContentArea.displayName = 'EditorContentArea';
|
|
40
40
|
var MainToolbar = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: ", ";\n transition: box-shadow 200ms;\n z-index: ", ";\n display: flex;\n height: 80px;\n flex-shrink: 0;\n background-color: white;\n\n & object {\n height: 0 !important;\n }\n"])), function (props) {
|
|
41
41
|
return props.showKeyline ? "0 ".concat(akEditorToolbarKeylineHeight, "px 0 0 ").concat(N30) : 'none';
|
|
@@ -2,6 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
-
import { css } from '
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
6
|
import { blockquoteSharedStyles, headingsSharedStyles } from '@atlaskit/editor-common/styles';
|
|
7
|
-
export var blocktypeStyles =
|
|
7
|
+
export var blocktypeStyles = function blocktypeStyles(props) {
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n ", ";\n }\n"])), blockquoteSharedStyles, headingsSharedStyles(props));
|
|
9
|
+
};
|
|
@@ -11,13 +11,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
11
11
|
|
|
12
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
13
|
|
|
14
|
+
/** @jsx jsx */
|
|
14
15
|
import React from 'react';
|
|
16
|
+
import { jsx } from '@emotion/react';
|
|
15
17
|
import { injectIntl } from 'react-intl-next';
|
|
16
18
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
17
19
|
import DropdownMenu from '../../../../ui/DropdownMenu';
|
|
18
20
|
import { Separator, Wrapper, MenuWrapper } from '../../../../ui/styles';
|
|
19
21
|
import { NORMAL_TEXT } from '../../types';
|
|
20
|
-
import {
|
|
22
|
+
import { blockTypeMenuItemStyle, KeyboardShortcut } from './styled';
|
|
21
23
|
import { tooltip, findKeymapByDescription } from '../../../../keymaps';
|
|
22
24
|
import { BlockTypeButton } from './blocktype-button';
|
|
23
25
|
|
|
@@ -60,16 +62,16 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
60
62
|
availableBlockTypes = _this$props$pluginSta.availableBlockTypes;
|
|
61
63
|
var items = availableBlockTypes.map(function (blockType, index) {
|
|
62
64
|
var isActive = currentBlockType === blockType;
|
|
63
|
-
var
|
|
65
|
+
var tagName = blockType.tagName || 'p';
|
|
66
|
+
var Tag = tagName;
|
|
64
67
|
return {
|
|
65
|
-
content:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, /*#__PURE__*/React.createElement(Tag, null, formatMessage(blockType.title))),
|
|
68
|
+
content: jsx("div", {
|
|
69
|
+
css: blockTypeMenuItemStyle(tagName, isActive)
|
|
70
|
+
}, jsx(Tag, null, formatMessage(blockType.title))),
|
|
69
71
|
value: blockType,
|
|
70
72
|
label: formatMessage(blockType.title),
|
|
71
73
|
key: "".concat(blockType.name, "-").concat(index),
|
|
72
|
-
elemAfter:
|
|
74
|
+
elemAfter: jsx(KeyboardShortcut, {
|
|
73
75
|
selected: isActive
|
|
74
76
|
}, tooltip(findKeymapByDescription(blockType.title.defaultMessage))),
|
|
75
77
|
isActive: isActive
|
|
@@ -129,7 +131,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
129
131
|
|
|
130
132
|
if (!this.props.isDisabled && !blockTypesDisabled) {
|
|
131
133
|
var items = this.createItems();
|
|
132
|
-
return
|
|
134
|
+
return jsx(MenuWrapper, null, jsx(DropdownMenu, {
|
|
133
135
|
items: items,
|
|
134
136
|
onOpenChange: this.onOpenChange,
|
|
135
137
|
onItemActivated: this.handleSelectBlockType,
|
|
@@ -141,7 +143,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
141
143
|
fitHeight: 360,
|
|
142
144
|
fitWidth: 106,
|
|
143
145
|
shouldUseDefaultRole: true
|
|
144
|
-
},
|
|
146
|
+
}, jsx(BlockTypeButton, {
|
|
145
147
|
isSmall: isSmall,
|
|
146
148
|
isReducedSpacing: isReducedSpacing,
|
|
147
149
|
selected: active,
|
|
@@ -150,10 +152,10 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
150
152
|
onClick: this.handleTriggerClick,
|
|
151
153
|
formatMessage: formatMessage,
|
|
152
154
|
"aria-expanded": active
|
|
153
|
-
}, longestDropdownMenuItem)),
|
|
155
|
+
}, longestDropdownMenuItem)), jsx(Separator, null));
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
return
|
|
158
|
+
return jsx(Wrapper, null, jsx(BlockTypeButton, {
|
|
157
159
|
isSmall: isSmall,
|
|
158
160
|
isReducedSpacing: isReducedSpacing,
|
|
159
161
|
selected: active,
|
|
@@ -162,7 +164,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
162
164
|
onClick: this.handleTriggerClick,
|
|
163
165
|
formatMessage: formatMessage,
|
|
164
166
|
"aria-expanded": active
|
|
165
|
-
}, longestDropdownMenuItem),
|
|
167
|
+
}, longestDropdownMenuItem), jsx(Separator, null));
|
|
166
168
|
}
|
|
167
169
|
}]);
|
|
168
170
|
|
|
@@ -2,15 +2,19 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
|
+
/** @jsx jsx */
|
|
6
|
+
import { css } from '@emotion/react';
|
|
5
7
|
import { N400 } from '@atlaskit/theme/colors';
|
|
6
8
|
import styled from 'styled-components';
|
|
7
9
|
import { headingsSharedStyles } from '@atlaskit/editor-common/styles';
|
|
8
10
|
import { Shortcut } from '../../../../ui/styles';
|
|
9
|
-
export var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
)
|
|
13
|
-
});
|
|
11
|
+
export var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected) {
|
|
12
|
+
// TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
|
|
13
|
+
var selectedStyle = selected ? "".concat(tagName, " { color: white !important; }") : '';
|
|
14
|
+
return function (themeProps) {
|
|
15
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n ", ";\n "])), headingsSharedStyles(themeProps), selectedStyle);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
14
18
|
export var KeyboardShortcut = styled(Shortcut)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n margin-left: 16px;\n"])), function (props) {
|
|
15
19
|
return props.selected ? "color: ".concat(N400, ";") : '';
|
|
16
20
|
});
|
|
@@ -45,8 +45,8 @@ export var messages = defineMessages({
|
|
|
45
45
|
defaultMessage: 'URL',
|
|
46
46
|
description: 'Title for option to convert the card to become a regular text-based hyperlink.'
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
id: 'fabric.editor.
|
|
48
|
+
blockTitle: {
|
|
49
|
+
id: 'fabric.editor.blockTitle',
|
|
50
50
|
defaultMessage: 'Card',
|
|
51
51
|
description: 'Title for option to display link in the card view.'
|
|
52
52
|
},
|
|
@@ -65,8 +65,8 @@ export var messages = defineMessages({
|
|
|
65
65
|
defaultMessage: 'Display link as URL',
|
|
66
66
|
description: 'Description for option to convert the card to become a regular text-based hyperlink.'
|
|
67
67
|
},
|
|
68
|
-
|
|
69
|
-
id: 'fabric.editor.
|
|
68
|
+
blockDescription: {
|
|
69
|
+
id: 'fabric.editor.blockDescription',
|
|
70
70
|
defaultMessage: 'Display more information about a link, including a summary and actions',
|
|
71
71
|
description: 'Description for option to display link in the card view.'
|
|
72
72
|
},
|