@atlaskit/editor-core 166.0.4 → 167.0.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/.eslintrc.js +46 -1
- package/CHANGELOG.md +87 -0
- package/dist/cjs/actions/index.js +26 -2
- package/dist/cjs/create-editor/ReactEditorView.js +2 -0
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +5 -2
- package/dist/cjs/keymaps/index.js +5 -1
- package/dist/cjs/labs/next/ContentComponents.js +8 -4
- package/dist/cjs/labs/next/full-page.js +14 -8
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +7 -3
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +3 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -1
- package/dist/cjs/plugins/analytics/types/enums.js +3 -0
- package/dist/cjs/plugins/base/index.js +8 -17
- package/dist/cjs/plugins/base/pm-plugins/better-type-history.js +3 -12
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +71 -16
- package/dist/cjs/plugins/block-type/commands/block-type.js +32 -22
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -2
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -11
- package/dist/cjs/plugins/card/styles.js +1 -1
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/cjs/plugins/code-block/actions.js +36 -2
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +70 -1
- package/dist/cjs/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +46 -8
- package/dist/cjs/plugins/code-block/styles.js +28 -24
- package/dist/cjs/plugins/collab-edit/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/ui/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/utils.js +1 -0
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +3 -1
- package/dist/cjs/plugins/expand/ui/styles.js +16 -14
- package/dist/cjs/plugins/extension/commands.js +3 -2
- package/dist/cjs/plugins/extension/context-panel.js +21 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +6 -4
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -1
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +7 -5
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -2
- package/dist/cjs/plugins/fake-text-cursor/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/cjs/plugins/find-replace/styles.js +2 -6
- package/dist/cjs/plugins/find-replace/ui/styles.js +4 -2
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -4
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +12 -10
- package/dist/cjs/plugins/grid/styles.js +3 -1
- package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -7
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +23 -1
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +10 -1
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -3
- package/dist/cjs/plugins/hyperlink/utils.js +53 -2
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
- package/dist/cjs/plugins/layout/styles.js +1 -1
- package/dist/cjs/plugins/media/commands/helpers.js +10 -9
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
- package/dist/cjs/plugins/mentions/styles.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
- package/dist/cjs/plugins/panel/index.js +1 -0
- package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
- package/dist/cjs/plugins/paste/handlers.js +23 -0
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
- package/dist/cjs/plugins/placeholder/index.js +15 -3
- package/dist/cjs/plugins/placeholder/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
- package/dist/cjs/plugins/table/index.js +14 -4
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
- package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
- package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
- package/dist/cjs/plugins/table/ui/consts.js +14 -11
- package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
- package/dist/cjs/plugins/table/utils/decoration.js +3 -4
- package/dist/cjs/plugins/table/utils/paste.js +9 -9
- package/dist/cjs/plugins/type-ahead/index.js +4 -3
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
- package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
- package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -2
- package/dist/cjs/ui/ContextPanel/index.js +3 -1
- package/dist/cjs/ui/DropdownMenu/index.js +5 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
- package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
- package/dist/cjs/ui/PluginSlot/index.js +7 -4
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
- package/dist/cjs/ui/WithFlash/index.js +4 -2
- package/dist/cjs/ui/styles.js +6 -4
- package/dist/cjs/utils/document.js +62 -6
- package/dist/cjs/utils/filter/privacy-filter.js +2 -2
- package/dist/cjs/utils/step.js +17 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +25 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -0
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +5 -2
- package/dist/es2019/keymaps/index.js +5 -1
- package/dist/es2019/labs/next/ContentComponents.js +7 -2
- package/dist/es2019/labs/next/full-page.js +11 -8
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/es2019/plugins/analytics/types/enums.js +3 -0
- package/dist/es2019/plugins/base/index.js +6 -15
- package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
- package/dist/es2019/plugins/card/styles.js +1 -1
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/es2019/plugins/code-block/actions.js +32 -0
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
- package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
- package/dist/es2019/plugins/code-block/styles.js +30 -27
- package/dist/es2019/plugins/collab-edit/styles.js +3 -2
- package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
- package/dist/es2019/plugins/collab-edit/utils.js +1 -0
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
- package/dist/es2019/plugins/expand/ui/styles.js +15 -14
- package/dist/es2019/plugins/extension/commands.js +3 -2
- package/dist/es2019/plugins/extension/context-panel.js +11 -3
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
- package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/es2019/plugins/find-replace/styles.js +4 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/es2019/plugins/grid/styles.js +4 -2
- package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
- package/dist/es2019/plugins/hyperlink/utils.js +43 -2
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/layout/styles.js +10 -7
- package/dist/es2019/plugins/media/commands/helpers.js +6 -8
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
- package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
- package/dist/es2019/plugins/media/styles.js +3 -3
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/es2019/plugins/mentions/styles.js +5 -4
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/es2019/plugins/panel/index.js +1 -0
- package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/es2019/plugins/paste/handlers.js +23 -0
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/es2019/plugins/placeholder/index.js +12 -1
- package/dist/es2019/plugins/placeholder/styles.js +3 -1
- package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
- package/dist/es2019/plugins/table/index.js +13 -4
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
- package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
- package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
- package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
- package/dist/es2019/plugins/table/ui/consts.js +15 -12
- package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
- package/dist/es2019/plugins/table/utils/decoration.js +1 -4
- package/dist/es2019/plugins/table/utils/paste.js +9 -9
- package/dist/es2019/plugins/type-ahead/index.js +4 -3
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
- package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
- package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +5 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
- package/dist/es2019/ui/PluginSlot/index.js +7 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
- package/dist/es2019/ui/WithFlash/index.js +4 -3
- package/dist/es2019/ui/styles.js +10 -9
- package/dist/es2019/utils/document.js +58 -5
- package/dist/es2019/utils/filter/privacy-filter.js +1 -1
- package/dist/es2019/utils/step.js +12 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +26 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -0
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +5 -2
- package/dist/esm/keymaps/index.js +5 -1
- package/dist/esm/labs/next/ContentComponents.js +8 -4
- package/dist/esm/labs/next/full-page.js +11 -8
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/esm/plugins/analytics/types/enums.js +3 -0
- package/dist/esm/plugins/base/index.js +8 -17
- package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/esm/plugins/code-block/actions.js +28 -0
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
- package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
- package/dist/esm/plugins/code-block/styles.js +27 -23
- package/dist/esm/plugins/collab-edit/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/utils.js +2 -0
- package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
- package/dist/esm/plugins/expand/ui/styles.js +15 -14
- package/dist/esm/plugins/extension/commands.js +3 -2
- package/dist/esm/plugins/extension/context-panel.js +21 -7
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/esm/plugins/find-replace/styles.js +3 -3
- package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/esm/plugins/grid/styles.js +2 -1
- package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
- package/dist/esm/plugins/hyperlink/utils.js +44 -2
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
- package/dist/esm/plugins/layout/styles.js +1 -1
- package/dist/esm/plugins/media/commands/helpers.js +6 -8
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/esm/plugins/mentions/styles.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/esm/plugins/panel/index.js +1 -0
- package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/esm/plugins/paste/handlers.js +21 -0
- package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/esm/plugins/placeholder/index.js +12 -1
- package/dist/esm/plugins/placeholder/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/styles.js +2 -1
- package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
- package/dist/esm/plugins/table/index.js +13 -4
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/esm/plugins/table/nodeviews/table.js +6 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
- package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/esm/plugins/table/transforms/column-width.js +1 -2
- package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
- package/dist/esm/plugins/table/ui/common-styles.js +4 -2
- package/dist/esm/plugins/table/ui/consts.js +15 -12
- package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
- package/dist/esm/plugins/table/utils/decoration.js +3 -4
- package/dist/esm/plugins/table/utils/paste.js +9 -9
- package/dist/esm/plugins/type-ahead/index.js +4 -3
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
- package/dist/esm/plugins/unsupported-content/styles.js +1 -1
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
- package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
- package/dist/esm/ui/Appearance/Chromeless.js +2 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +3 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +5 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/esm/ui/ElementBrowser/constants.js +3 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/esm/ui/PanelTextInput/styles.js +4 -3
- package/dist/esm/ui/PluginSlot/index.js +7 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/ui/styles.js +5 -4
- package/dist/esm/utils/document.js +59 -5
- package/dist/esm/utils/filter/privacy-filter.js +1 -1
- package/dist/esm/utils/step.js +12 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +6 -0
- package/dist/types/labs/next/ContentComponents.d.ts +7 -1
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
- package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +2 -0
- package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
- package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +1 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types/plugins/find-replace/styles.d.ts +0 -2
- package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
- package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -0
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/index.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
- package/dist/types/plugins/table/types.d.ts +0 -1
- package/dist/types/plugins/table/ui/consts.d.ts +9 -9
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/types/editor-props.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/types/ui-components.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
- package/dist/types/ui/PluginSlot/index.d.ts +1 -0
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
- package/dist/types/utils/document.d.ts +1 -0
- package/dist/types/utils/step.d.ts +1 -0
- package/docs/0-intro.tsx +12 -4
- package/package.json +20 -20
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
5
|
import rafSchedule from 'raf-schd';
|
|
6
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
5
7
|
import { DOMSerializer } from 'prosemirror-model';
|
|
6
8
|
import { codeBlockClassNames } from '../ui/class-names';
|
|
9
|
+
import { resetShouldIgnoreFollowingMutations } from '../actions';
|
|
10
|
+
import { getPluginState } from '../pm-plugins/main-state';
|
|
7
11
|
var MATCH_NEWLINES = new RegExp('\n', 'g');
|
|
8
12
|
|
|
9
13
|
var toDOM = function toDOM(node) {
|
|
@@ -61,6 +65,57 @@ export var CodeBlockView = /*#__PURE__*/function () {
|
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
_createClass(CodeBlockView, [{
|
|
68
|
+
key: "updateDOMAndSelection",
|
|
69
|
+
value: function updateDOMAndSelection(savedInnerHTML, newCursorPosition) {
|
|
70
|
+
var _this$dom;
|
|
71
|
+
|
|
72
|
+
if ((_this$dom = this.dom) !== null && _this$dom !== void 0 && _this$dom.childNodes && this.dom.childNodes.length > 1) {
|
|
73
|
+
var _contentView$childNod;
|
|
74
|
+
|
|
75
|
+
var contentView = this.dom.childNodes[1];
|
|
76
|
+
|
|
77
|
+
if ((contentView === null || contentView === void 0 ? void 0 : (_contentView$childNod = contentView.childNodes) === null || _contentView$childNod === void 0 ? void 0 : _contentView$childNod.length) > 0) {
|
|
78
|
+
var codeElement = contentView.firstChild;
|
|
79
|
+
codeElement.innerHTML = savedInnerHTML; // We need to set cursor for the DOM update
|
|
80
|
+
|
|
81
|
+
var textElement = _toConsumableArray(codeElement.childNodes).find(function (child) {
|
|
82
|
+
return child.nodeName === '#text';
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
var sel = window.getSelection();
|
|
86
|
+
var range = document.createRange();
|
|
87
|
+
range.setStart(textElement, newCursorPosition);
|
|
88
|
+
range.collapse(true);
|
|
89
|
+
sel === null || sel === void 0 ? void 0 : sel.removeAllRanges();
|
|
90
|
+
sel === null || sel === void 0 ? void 0 : sel.addRange(range);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "coalesceDOMElements",
|
|
96
|
+
value: function coalesceDOMElements() {
|
|
97
|
+
var _this$dom2;
|
|
98
|
+
|
|
99
|
+
if ((_this$dom2 = this.dom) !== null && _this$dom2 !== void 0 && _this$dom2.childNodes && this.dom.childNodes.length > 1) {
|
|
100
|
+
var contentView = this.dom.childNodes[1];
|
|
101
|
+
|
|
102
|
+
if (contentView !== null && contentView !== void 0 && contentView.childNodes && contentView.childNodes.length > 1) {
|
|
103
|
+
var savedInnerHTML = '';
|
|
104
|
+
|
|
105
|
+
while (contentView.childNodes.length > 1) {
|
|
106
|
+
var lastChild = contentView.lastChild;
|
|
107
|
+
savedInnerHTML = lastChild.innerHTML + savedInnerHTML;
|
|
108
|
+
contentView.removeChild(lastChild);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
var firstChild = contentView.firstChild;
|
|
112
|
+
savedInnerHTML = firstChild.innerHTML + '\n' + savedInnerHTML;
|
|
113
|
+
var newCursorPosition = firstChild.innerHTML.length + 1;
|
|
114
|
+
setTimeout(this.updateDOMAndSelection.bind(this, savedInnerHTML, newCursorPosition), 20);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
64
119
|
key: "update",
|
|
65
120
|
value: function update(node) {
|
|
66
121
|
if (node.type !== this.node.type) {
|
|
@@ -74,6 +129,11 @@ export var CodeBlockView = /*#__PURE__*/function () {
|
|
|
74
129
|
|
|
75
130
|
this.node = node;
|
|
76
131
|
this.ensureLineNumbers();
|
|
132
|
+
|
|
133
|
+
if (browser.android) {
|
|
134
|
+
this.coalesceDOMElements();
|
|
135
|
+
resetShouldIgnoreFollowingMutations(this.view.state, this.view.dispatch);
|
|
136
|
+
}
|
|
77
137
|
}
|
|
78
138
|
|
|
79
139
|
return true;
|
|
@@ -81,7 +141,13 @@ export var CodeBlockView = /*#__PURE__*/function () {
|
|
|
81
141
|
}, {
|
|
82
142
|
key: "ignoreMutation",
|
|
83
143
|
value: function ignoreMutation(record) {
|
|
84
|
-
|
|
144
|
+
var pluginState = getPluginState(this.view.state);
|
|
145
|
+
|
|
146
|
+
if (pluginState !== null && pluginState !== void 0 && pluginState.shouldIgnoreFollowingMutations) {
|
|
147
|
+
return true;
|
|
148
|
+
} // Ensure updating the line-number gutter doesn't trigger reparsing the codeblock
|
|
149
|
+
|
|
150
|
+
|
|
85
151
|
return record.target === this.lineNumberGutter || record.target.parentNode === this.lineNumberGutter;
|
|
86
152
|
}
|
|
87
153
|
}]);
|
|
@@ -5,6 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
8
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
8
9
|
import { NodeSelection } from 'prosemirror-state';
|
|
9
10
|
import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
|
|
10
11
|
import { codeBlockNodeView } from '../nodeviews/code-block';
|
|
@@ -12,6 +13,7 @@ import { highlightingCodeBlockNodeView } from '../nodeviews/highlighting-code-bl
|
|
|
12
13
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
13
14
|
import { pluginKey } from '../plugin-key';
|
|
14
15
|
import { ACTIONS } from './actions';
|
|
16
|
+
import { ignoreFollowingMutations, resetShouldIgnoreFollowingMutations } from '../actions';
|
|
15
17
|
import { findCodeBlock } from '../utils';
|
|
16
18
|
import { codeBlockClassNames } from '../ui/class-names';
|
|
17
19
|
import { getFeatureFlags } from '../../feature-flags-context';
|
|
@@ -29,12 +31,41 @@ export var createPlugin = function createPlugin(_ref) {
|
|
|
29
31
|
|
|
30
32
|
if (allowCompositionInputOverride) {
|
|
31
33
|
handleDOMEvents.beforeinput = function (view, event) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
var keyEvent = event;
|
|
35
|
+
var eventInputType = keyEvent.inputType;
|
|
36
|
+
var eventText = keyEvent.data;
|
|
37
|
+
|
|
38
|
+
if (browser.ios && event.composed && // insertParagraph will be the input type when the enter key is pressed.
|
|
39
|
+
eventInputType === 'insertParagraph' && findCodeBlock(view.state, view.state.selection)) {
|
|
34
40
|
event.preventDefault();
|
|
41
|
+
return true;
|
|
42
|
+
} else if (browser.android && event.composed && eventInputType === 'insertCompositionText' && eventText[(eventText === null || eventText === void 0 ? void 0 : eventText.length) - 1] === '\n' && findCodeBlock(view.state, view.state.selection)) {
|
|
43
|
+
var resultingText = event.target.outerText + '\n';
|
|
44
|
+
|
|
45
|
+
if (resultingText.endsWith(eventText)) {
|
|
46
|
+
// End of paragraph
|
|
47
|
+
setTimeout(function () {
|
|
48
|
+
view.someProp('handleKeyDown', function (f) {
|
|
49
|
+
return f(view, new KeyboardEvent('keydown', {
|
|
50
|
+
bubbles: true,
|
|
51
|
+
cancelable: true,
|
|
52
|
+
key: 'Enter',
|
|
53
|
+
code: 'Enter'
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
}, 0);
|
|
57
|
+
} else {
|
|
58
|
+
// Middle of paragraph, end of line
|
|
59
|
+
ignoreFollowingMutations(view.state, view.dispatch);
|
|
60
|
+
}
|
|
61
|
+
|
|
35
62
|
return true;
|
|
36
63
|
}
|
|
37
64
|
|
|
65
|
+
if (browser.android) {
|
|
66
|
+
resetShouldIgnoreFollowingMutations(view.state, view.dispatch);
|
|
67
|
+
}
|
|
68
|
+
|
|
38
69
|
return false;
|
|
39
70
|
};
|
|
40
71
|
}
|
|
@@ -46,7 +77,8 @@ export var createPlugin = function createPlugin(_ref) {
|
|
|
46
77
|
return {
|
|
47
78
|
pos: node ? node.pos : null,
|
|
48
79
|
contentCopied: false,
|
|
49
|
-
isNodeSelected: false
|
|
80
|
+
isNodeSelected: false,
|
|
81
|
+
shouldIgnoreFollowingMutations: false
|
|
50
82
|
};
|
|
51
83
|
},
|
|
52
84
|
apply: function apply(tr, pluginState, _oldState, newState) {
|
|
@@ -67,6 +99,10 @@ export var createPlugin = function createPlugin(_ref) {
|
|
|
67
99
|
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
68
100
|
contentCopied: meta.data
|
|
69
101
|
});
|
|
102
|
+
} else if ((meta === null || meta === void 0 ? void 0 : meta.type) === ACTIONS.SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS) {
|
|
103
|
+
return _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
104
|
+
shouldIgnoreFollowingMutations: meta.data
|
|
105
|
+
});
|
|
70
106
|
}
|
|
71
107
|
|
|
72
108
|
return pluginState;
|
|
@@ -6,51 +6,55 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { themed } from '@atlaskit/theme/components';
|
|
7
7
|
import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { blockNodesVerticalMargin, akEditorTableCellMinWidth, akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorDeleteIconColor, SelectionStyle, getSelectionStyles, akEditorCodeFontFamily, akEditorSelectedNodeClassName, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
11
11
|
import { codeBlockClassNames } from './ui/class-names';
|
|
12
12
|
export var highlightingCodeBlockStyles = function highlightingCodeBlockStyles(props) {
|
|
13
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n background-repeat: no-repeat;\n background-color: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n color: ", ";\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n overflow: hidden;\n tab-size: 4;\n\n & [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n\n .", " {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n\n > code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n\n &[data-debounce='true'] {\n .", " {\n display: none;\n }\n }\n\n &:not([data-debounce='true']) {\n > code:not([data-language='plaintext']):not([data-language='none']):not([data-language='']) {\n color: transparent;\n caret-color: ", ";\n }\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color:
|
|
13
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n background-repeat: no-repeat;\n background-color: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n color: ", ";\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n overflow: hidden;\n tab-size: 4;\n\n & [data-ds--code--code-block] {\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n\n .", " {\n position: relative;\n z-index: 1;\n display: flex;\n flex: 1;\n\n > code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n\n &[data-debounce='true'] {\n .", " {\n display: none;\n }\n }\n\n &:not([data-debounce='true']) {\n > code:not([data-language='plaintext']):not([data-language='none']):not([data-language='']) {\n color: transparent;\n caret-color: ", ";\n }\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), overflowShadow({
|
|
14
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
15
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
14
16
|
background: themed({
|
|
15
17
|
light: colors.N20,
|
|
16
18
|
dark: colors.DN50
|
|
17
19
|
})(props),
|
|
18
20
|
width: '8px'
|
|
19
21
|
}), themed({
|
|
20
|
-
light: colors.N20,
|
|
21
|
-
dark: colors.DN50
|
|
22
|
+
light: token('color.background.neutral', colors.N20),
|
|
23
|
+
dark: token('color.background.neutral', colors.DN50)
|
|
22
24
|
})(props), akEditorCodeFontFamily, borderRadius(), blockNodesVerticalMargin, akEditorTableCellMinWidth, codeBlockClassNames.gutter, themed({
|
|
23
|
-
light: colors.N30,
|
|
24
|
-
dark: colors.DN20
|
|
25
|
+
light: token('color.background.neutral', colors.N30),
|
|
26
|
+
dark: token('color.background.neutral', colors.DN20)
|
|
25
27
|
})(props), gridSize(), themed({
|
|
26
|
-
light: colors.N90,
|
|
27
|
-
dark: colors.DN90
|
|
28
|
+
light: token('color.text.subtlest', colors.N90),
|
|
29
|
+
dark: token('color.text.subtlest', colors.DN90)
|
|
28
30
|
})(props), relativeFontSizeToBase16(fontSize()), themed({
|
|
29
|
-
light: colors.N400,
|
|
30
|
-
dark: colors.DN400
|
|
31
|
+
light: token('color.text.subtle', colors.N400),
|
|
32
|
+
dark: token('color.text.subtle', colors.DN400)
|
|
31
33
|
})(props), codeBlockClassNames.highlighting, relativeFontSizeToBase16(fontSize()), codeBlockClassNames.content, relativeFontSizeToBase16(fontSize()), borderRadius(), gridSize(), codeBlockClassNames.highlighting, themed({
|
|
32
|
-
light: colors.N800,
|
|
33
|
-
dark: colors.DN500
|
|
34
|
-
})(props), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), codeBlockClassNames.gutter, colors.R75, token('color.text.danger', akEditorDeleteIconColor), codeBlockClassNames.content, token('color.background.danger', akEditorDeleteBackground), codeBlockClassNames.gutter, token('color.text.danger', akEditorDeleteIconColor), codeBlockClassNames.content);
|
|
34
|
+
light: token('color.text', colors.N800),
|
|
35
|
+
dark: token('color.text', colors.DN500)
|
|
36
|
+
})(props), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), codeBlockClassNames.gutter, token('color.blanket.danger', colors.R75), token('color.text.danger', akEditorDeleteIconColor), codeBlockClassNames.content, token('color.background.danger', akEditorDeleteBackground), codeBlockClassNames.gutter, token('color.blanket.danger', 'rgba(255, 143, 115, 0.5)'), token('color.text.danger', akEditorDeleteIconColor), codeBlockClassNames.content, token('color.background.danger', 'rgba(255, 189, 173, 0.5)'));
|
|
35
37
|
};
|
|
36
38
|
export var codeBlockStyles = function codeBlockStyles(props) {
|
|
37
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-repeat: no-repeat;\n background-color: ", ";\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px
|
|
39
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .code-block {\n position: relative;\n background-image: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-repeat: no-repeat;\n background-color: ", ";\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n counter-reset: line;\n display: flex;\n min-width: ", "px;\n cursor: pointer;\n overflow-x: auto;\n\n .", " {\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/develop/packages/design-system/code/src/themes/themeBuilder.ts#packages/design-system/code/src/themes/themeBuilder.ts-19:28 */\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n &::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n /* https://bitbucket.org/atlassian/atlassian-frontend/src/218202daeaf527262c21841e6f88fa058d349ad4/packages/design-system/code/src/themes/themeBuilder.ts#lines-12:17 */\n font-size: ", ";\n line-height: 1.5rem;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n }\n }\n }\n\n .ProseMirror li > .code-block {\n margin: 0;\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), overflowShadow({
|
|
40
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
38
42
|
background: themed({
|
|
39
43
|
light: colors.N20,
|
|
40
44
|
dark: colors.DN50
|
|
41
45
|
})(props),
|
|
42
46
|
width: '8px'
|
|
43
47
|
}), themed({
|
|
44
|
-
light: colors.N20,
|
|
45
|
-
dark: colors.DN50
|
|
48
|
+
light: token('color.background.neutral', colors.N20),
|
|
49
|
+
dark: token('color.background.neutral', colors.DN50)
|
|
46
50
|
})(props), akEditorCodeFontFamily, borderRadius(), blockNodesVerticalMargin, akEditorTableCellMinWidth, codeBlockClassNames.gutter, themed({
|
|
47
|
-
light: colors.N30,
|
|
48
|
-
dark: colors.DN20
|
|
51
|
+
light: token('color.background.neutral', colors.N30),
|
|
52
|
+
dark: token('color.background.neutral', colors.DN20)
|
|
49
53
|
})(props), gridSize(), relativeFontSizeToBase16(fontSize()), themed({
|
|
50
|
-
light: colors.N400,
|
|
51
|
-
dark: colors.DN400
|
|
54
|
+
light: token('color.text', colors.N400),
|
|
55
|
+
dark: token('color.text', colors.DN400)
|
|
52
56
|
})(props), codeBlockClassNames.content, relativeFontSizeToBase16(fontSize()), themed({
|
|
53
|
-
light: colors.N800,
|
|
54
|
-
dark: colors.DN800
|
|
55
|
-
})(props), borderRadius(), gridSize(), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, token('color.
|
|
57
|
+
light: token('color.text', colors.N800),
|
|
58
|
+
dark: token('color.text', colors.DN800)
|
|
59
|
+
})(props), borderRadius(), gridSize(), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), akEditorSelectedBorderSize, akEditorDeleteBorder, codeBlockClassNames.gutter, token('color.blanket.danger', colors.R75), token('color.text.danger', akEditorDeleteIconColor), codeBlockClassNames.content, token('color.background.danger', akEditorDeleteBackground), codeBlockClassNames.gutter, token('color.blanket.danger', 'rgba(255, 143, 115, 0.5)'), token('color.text.danger', akEditorDeleteIconColor), codeBlockClassNames.content, token('color.background.danger', 'rgba(255, 189, 173, 0.5)'));
|
|
56
60
|
};
|
|
@@ -6,11 +6,12 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { TELEPOINTER_DIM_CLASS } from './plugin-state';
|
|
7
7
|
import { colors } from './utils';
|
|
8
8
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
9
10
|
|
|
10
11
|
var telepointerColorStyle = function telepointerColorStyle(color, index) {
|
|
11
|
-
return "\n &.color-".concat(index, " {\n background-color: ").concat(color.selection, ";\n &::after {\n background-color: ").concat(color.solid, ";\n color: #fff;\n border-color: ").concat(color.solid, ";\n }\n }\n");
|
|
12
|
+
return "\n &.color-".concat(index, " {\n background-color: ").concat(color.selection, ";\n &::after {\n background-color: ").concat(color.solid, ";\n color: ").concat(token('color.text.inverse', '#fff'), ";\n border-color: ").concat(color.solid, ";\n }\n }\n");
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
export var telepointerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .telepointer {\n position: relative;\n transition: opacity 200ms;\n\n &.telepointer-selection {\n line-height: 1.2;\n pointer-events: none;\n user-select: none;\n }\n\n &.telepointer-selection-badge::after {\n content: attr(data-initial);\n position: absolute;\n display: block;\n top: -14px;\n font-size: ", ";\n padding: 2px;\n color:
|
|
15
|
+
export var telepointerStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror .telepointer {\n position: relative;\n transition: opacity 200ms;\n\n &.telepointer-selection {\n line-height: 1.2;\n pointer-events: none;\n user-select: none;\n }\n\n &.telepointer-selection-badge::after {\n content: attr(data-initial);\n position: absolute;\n display: block;\n top: -14px;\n font-size: ", ";\n padding: 2px;\n color: ", ";\n left: -1px;\n border-radius: 2px 2px 2px 0;\n line-height: initial;\n }\n\n &.", " {\n opacity: 0.2;\n }\n\n ", ";\n }\n"])), relativeFontSizeToBase16(9), token('color.text.inverse', 'white'), TELEPOINTER_DIM_CLASS, colors.map(function (color, index) {
|
|
15
16
|
return telepointerColorStyle(color, index);
|
|
16
17
|
}));
|
|
@@ -6,8 +6,9 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { N20 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { akEditorSmallZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
10
|
+
export var inviteTeamWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 50%;\n min-width: ", "px;\n margin-left: -", "px;\n"])), token('color.background.neutral', N20), gridSize() * 4, gridSize() / 2);
|
|
10
11
|
export var avatarContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", "px;\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding: 2px;\n }\n"])), gridSize());
|
|
11
12
|
export var badge = function badge(color) {
|
|
12
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color:
|
|
13
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color: ", ";\n font-size: ", ";\n line-height: 0;\n padding-top: 7px;\n text-align: center;\n box-shadow: 0 0 1px ", ";\n box-sizing: border-box;\n"])), akEditorSmallZIndex, color, token('color.text.inverse', '#fff'), relativeFontSizeToBase16(9), token('color.border.inverse', '#fff'));
|
|
13
14
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
4
|
import { Selection, TextSelection } from 'prosemirror-state';
|
|
3
5
|
import { Decoration } from 'prosemirror-view';
|
|
4
6
|
import * as themeColors from '@atlaskit/theme/colors';
|
|
@@ -23,12 +23,13 @@ import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
23
23
|
import Calendar from '@atlaskit/calendar';
|
|
24
24
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
25
25
|
import { N60A, N0 } from '@atlaskit/theme/colors';
|
|
26
|
+
import { token } from '@atlaskit/tokens';
|
|
26
27
|
import withOuterListeners from '../../../../ui/with-outer-listeners';
|
|
27
28
|
var PopupWithListeners = withOuterListeners(Popup);
|
|
28
29
|
import { INPUT_METHOD } from '../../../analytics/types/enums';
|
|
29
30
|
import { injectIntl } from 'react-intl-next';
|
|
30
31
|
import DatePickerInput from './date-picker-input';
|
|
31
|
-
var popupContentWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 2px;\n border-radius: ", "px;\n box-shadow:
|
|
32
|
+
var popupContentWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 2px;\n border-radius: ", "px;\n box-shadow: ", ";\n background-color: ", ";\n"])), borderRadius(), token('elevation.shadow.overlay', "0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A)), token('elevation.surface.overlay', N0));
|
|
32
33
|
|
|
33
34
|
var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
34
35
|
_inherits(DatePicker, _React$Component);
|
|
@@ -6,40 +6,41 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { themed } from '@atlaskit/theme/components';
|
|
7
7
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
8
8
|
import { R50, R300, N40A, N50A, N80A, DN50, R200 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
9
10
|
import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
|
|
10
11
|
import { SelectionStyle, getSelectionStyles, akLayoutGutterOffset, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
11
12
|
import { BreakoutCssClassName } from '../../breakout/constants';
|
|
12
13
|
import { expandClassNames } from './class-names';
|
|
13
14
|
var EXPAND_SELECTED_BACKGROUND = themed({
|
|
14
|
-
light: 'rgba(255, 255, 255, 0.6)',
|
|
15
|
-
dark: 'rgba(9, 10, 11, 0.29)'
|
|
15
|
+
light: token('color.background.neutral.subtle', 'rgba(255, 255, 255, 0.6)'),
|
|
16
|
+
dark: token('color.background.neutral.subtle', 'rgba(9, 10, 11, 0.29)')
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR(props) {
|
|
19
20
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
20
|
-
light: N80A,
|
|
21
|
-
dark: '#d9dde3'
|
|
21
|
+
light: token('color.icon.subtle', N80A),
|
|
22
|
+
dark: token('color.icon.subtle', '#d9dde3')
|
|
22
23
|
})(props));
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
var ACTIVE_STATE_BACKGROUND_COLOR = themed({
|
|
26
|
-
dark: "#0C294F4B"
|
|
27
|
+
dark: token('color.blanket.selected', "#0C294F4B")
|
|
27
28
|
});
|
|
28
29
|
var ACTIVE_STATE_BORDER = themed({
|
|
29
|
-
dark: "1px solid #4794ff4B"
|
|
30
|
+
dark: "1px solid ".concat(token('color.border.selected', "#4794ff4B"))
|
|
30
31
|
});
|
|
31
32
|
var ACTIVE_STATE_BORDER_RADIUS = themed({
|
|
32
33
|
dark: '3px'
|
|
33
34
|
});
|
|
34
35
|
var DANGER_STATE_BACKGROUND_COLOR = themed({
|
|
35
|
-
light: R50,
|
|
36
|
-
dark: '#441C13'
|
|
36
|
+
light: token('color.background.danger', R50),
|
|
37
|
+
dark: token('color.background.danger', '#441C13')
|
|
37
38
|
});
|
|
38
39
|
var DANGER_STATE_BORDER = themed({
|
|
39
|
-
dark: "1px solid ".concat(R200)
|
|
40
|
+
dark: "1px solid ".concat(token('color.border.danger', R200))
|
|
40
41
|
});
|
|
41
42
|
var DANGER_STATE_BORDER_COLOR = themed({
|
|
42
|
-
light: R300
|
|
43
|
+
light: token('color.border.danger', R300)
|
|
43
44
|
});
|
|
44
45
|
var DANGER_STATE_BORDER_RADIUS = themed({
|
|
45
46
|
dark: '3px'
|
|
@@ -52,10 +53,10 @@ export var expandStyles = function expandStyles(props) {
|
|
|
52
53
|
expanded: false,
|
|
53
54
|
focused: false
|
|
54
55
|
})(props), expandClassNames.titleInput, sharedExpandStyles.titleInputStyles(props), expandClassNames.titleContainer, sharedExpandStyles.titleContainerStyles(props), expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND(props), themed({
|
|
55
|
-
light: N40A,
|
|
56
|
-
dark: DN50
|
|
56
|
+
light: token('color.border', N40A),
|
|
57
|
+
dark: token('color.border', DN50)
|
|
57
58
|
})(props), expandClassNames.content, gridSize(), expandClassNames.inputContainer, expandClassNames.prefix, expandClassNames.expanded, expandClassNames.prefix, expandClassNames.expanded, expandClassNames.iconContainer, EXPAND_ICON_COLOR(props), akEditorSelectedNodeClassName, themed({
|
|
58
|
-
light: N50A,
|
|
59
|
-
dark: DN50
|
|
59
|
+
light: token('color.border', N50A),
|
|
60
|
+
dark: token('color.border', DN50)
|
|
60
61
|
})(props), EXPAND_SELECTED_BACKGROUND(props));
|
|
61
62
|
};
|
|
@@ -34,11 +34,12 @@ export var clearEditingContext = createCommand({
|
|
|
34
34
|
processParametersAfter: undefined
|
|
35
35
|
}
|
|
36
36
|
}, applyChange);
|
|
37
|
-
export var forceAutoSave = function forceAutoSave(
|
|
37
|
+
export var forceAutoSave = function forceAutoSave(resolve, reject) {
|
|
38
38
|
return createCommand({
|
|
39
39
|
type: 'UPDATE_STATE',
|
|
40
40
|
data: {
|
|
41
|
-
autoSaveResolve:
|
|
41
|
+
autoSaveResolve: resolve,
|
|
42
|
+
autoSaveReject: reject
|
|
42
43
|
}
|
|
43
44
|
}, applyChange);
|
|
44
45
|
};
|
|
@@ -41,6 +41,7 @@ export var getContextPanel = function getContextPanel(allowAutoSave) {
|
|
|
41
41
|
|
|
42
42
|
var extensionState = getPluginState(state);
|
|
43
43
|
var autoSaveResolve = extensionState.autoSaveResolve,
|
|
44
|
+
autoSaveReject = extensionState.autoSaveReject,
|
|
44
45
|
showContextPanel = extensionState.showContextPanel,
|
|
45
46
|
extensionProvider = extensionState.extensionProvider,
|
|
46
47
|
processParametersBefore = extensionState.processParametersBefore,
|
|
@@ -83,6 +84,7 @@ export var getContextPanel = function getContextPanel(allowAutoSave) {
|
|
|
83
84
|
extensionProvider: extensionProvider,
|
|
84
85
|
autoSave: allowAutoSave,
|
|
85
86
|
autoSaveTrigger: autoSaveResolve,
|
|
87
|
+
autoSaveReject: autoSaveReject,
|
|
86
88
|
onChange: /*#__PURE__*/function () {
|
|
87
89
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(updatedParameters) {
|
|
88
90
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -121,24 +123,36 @@ export var getContextPanel = function getContextPanel(allowAutoSave) {
|
|
|
121
123
|
switch (_context2.prev = _context2.next) {
|
|
122
124
|
case 0:
|
|
123
125
|
if (!allowAutoSave) {
|
|
124
|
-
_context2.next =
|
|
126
|
+
_context2.next = 9;
|
|
125
127
|
break;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
|
-
_context2.
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
_context2.prev = 1;
|
|
131
|
+
_context2.next = 4;
|
|
132
|
+
return new Promise(function (resolve, reject) {
|
|
133
|
+
forceAutoSave(resolve, reject)(editorView.state, editorView.dispatch);
|
|
131
134
|
});
|
|
132
135
|
|
|
133
|
-
case
|
|
136
|
+
case 4:
|
|
137
|
+
_context2.next = 9;
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
case 6:
|
|
141
|
+
_context2.prev = 6;
|
|
142
|
+
_context2.t0 = _context2["catch"](1);
|
|
143
|
+
// Even if the save failed, we should proceed with closing the panel
|
|
144
|
+
// eslint-disable-next-line no-console
|
|
145
|
+
console.error("Autosave failed with error", _context2.t0);
|
|
146
|
+
|
|
147
|
+
case 9:
|
|
134
148
|
clearEditingContext(editorView.state, editorView.dispatch);
|
|
135
149
|
|
|
136
|
-
case
|
|
150
|
+
case 10:
|
|
137
151
|
case "end":
|
|
138
152
|
return _context2.stop();
|
|
139
153
|
}
|
|
140
154
|
}
|
|
141
|
-
}, _callee2);
|
|
155
|
+
}, _callee2, null, [[1, 6]]);
|
|
142
156
|
}))
|
|
143
157
|
});
|
|
144
158
|
}
|
|
@@ -7,6 +7,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
7
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
8
|
import { DN30, DN900, N30 } from '@atlaskit/theme/colors';
|
|
9
9
|
import { wrapperDefault, padding } from '../styles';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
10
11
|
var dataConsumerSelector = '[data-mark-type="dataConsumer"]';
|
|
11
12
|
export var widerLayoutClassName = 'wider-layout';
|
|
12
13
|
export var wrapperStyle = function wrapperStyle(theme, extensionWidth) {
|
|
@@ -15,10 +16,10 @@ export var wrapperStyle = function wrapperStyle(theme, extensionWidth) {
|
|
|
15
16
|
export var header = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", "px ", "px ", "px;\n vertical-align: middle;\n\n &.with-children:not(.without-frame) {\n padding: 4px 8px 8px;\n }\n &.without-frame {\n padding: 0;\n }\n"])), padding / 2, padding / 2, padding / 4);
|
|
16
17
|
export var content = function content(theme) {
|
|
17
18
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: ", "px;\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n cursor: initial;\n"])), padding, themed({
|
|
18
|
-
light: 'white',
|
|
19
|
-
dark: DN30
|
|
19
|
+
light: token('elevation.surface', 'white'),
|
|
20
|
+
dark: token('elevation.surface', DN30)
|
|
20
21
|
})(theme), themed({
|
|
21
|
-
dark: DN900
|
|
22
|
-
})(theme), N30, borderRadius());
|
|
22
|
+
dark: token('color.text', DN900)
|
|
23
|
+
})(theme), token('color.border', N30), borderRadius());
|
|
23
24
|
};
|
|
24
25
|
export var contentWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: 0 ", "px ", "px;\n"])), padding, padding);
|
|
@@ -5,6 +5,7 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
7
|
import { wrapperDefault } from '../styles';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
export var wrapperStyle = function wrapperStyle(theme) {
|
|
9
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px;\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background:
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n\n cursor: pointer;\n display: inline-flex;\n margin: 1px;\n\n > img {\n border-radius: ", "px;\n }\n\n &::after,\n &::before {\n vertical-align: text-top;\n display: inline-block;\n width: 1px;\n content: '';\n }\n\n &.with-children {\n padding: 0;\n background: ", ";\n }\n"])), wrapperDefault(theme), borderRadius(), token('color.background.neutral.subtle', 'white'));
|
|
10
11
|
};
|
|
@@ -8,17 +8,18 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
9
9
|
import { N20, DN50, DN700, B200, N20A, N70 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { token } from '@atlaskit/tokens';
|
|
11
12
|
export var padding = gridSize();
|
|
12
13
|
export var BODIED_EXT_PADDING = padding * 2;
|
|
13
14
|
export var wrapperDefault = function wrapperDefault(theme) {
|
|
14
15
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n position: relative;\n vertical-align: middle;\n font-size: ", ";\n\n .ProseMirror-selectednode > span > & > .extension-overlay {\n box-shadow: inset 0px 0px 0px 2px ", ";\n opacity: 1;\n }\n\n &.with-overlay {\n .extension-overlay {\n background: ", ";\n color: transparent;\n }\n\n &:hover .extension-overlay {\n opacity: 1;\n }\n }\n"])), themed({
|
|
15
|
-
light: N20,
|
|
16
|
-
dark: DN50
|
|
16
|
+
light: token('color.background.neutral', N20),
|
|
17
|
+
dark: token('color.background.neutral', DN50)
|
|
17
18
|
})(theme), borderRadius(), themed({
|
|
18
|
-
dark: DN700
|
|
19
|
-
})(theme), relativeFontSizeToBase16(fontSize()), B200, N20A);
|
|
19
|
+
dark: token('color.text', DN700)
|
|
20
|
+
})(theme), relativeFontSizeToBase16(fontSize()), token('color.border.selected', B200), token('color.background.neutral.hovered', N20A));
|
|
20
21
|
};
|
|
21
22
|
export var overlay = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s;\n"])), borderRadius());
|
|
22
23
|
export var placeholderFallback = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > img {\n margin: 0 4px;\n }\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: placeholder-fallback;\n"])));
|
|
23
|
-
export var placeholderFallbackParams = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n max-width: 200px;\n margin-left: 5px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), N70);
|
|
24
|
+
export var placeholderFallbackParams = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: inline-block;\n max-width: 200px;\n margin-left: 5px;\n color: ", ";\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n"])), token('color.text.subtlest', N70));
|
|
24
25
|
export var styledImage = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: 16px;\n max-width: 16px;\n /* TODO: fix in develop: https://atlassian.slack.com/archives/CFG3PSQ9E/p1647395052443259?thread_ts=1647394572.556029&cid=CFG3PSQ9E */\n /* stylelint-disable-next-line */\n label: lozenge-image;\n"])));
|
|
@@ -10,11 +10,12 @@ import { G300, N0 } from '@atlaskit/theme/colors';
|
|
|
10
10
|
import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
11
11
|
import { FormattedMessage } from 'react-intl-next';
|
|
12
12
|
import { messages } from './messages';
|
|
13
|
+
import { token } from '@atlaskit/tokens';
|
|
13
14
|
|
|
14
15
|
var noop = function noop() {};
|
|
15
16
|
|
|
16
17
|
var saveIndicatorWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n"])));
|
|
17
|
-
var saveIndicatorContent = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n width: 256px;\n bottom: 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 6px 12px;\n\n background: ", ";\n\n /* E300 */\n box-shadow: 0px 8px 12px rgba(9, 30, 66, 0.15)
|
|
18
|
+
var saveIndicatorContent = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n width: 256px;\n bottom: 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 6px 12px;\n\n background: ", ";\n\n /* E300 */\n box-shadow: ", ";\n border-radius: 16px;\n"])), token('elevation.surface.overlay', N0), token('elevation.shadow.overlay', "0px 8px 12px rgba(9, 30, 66, 0.15), 0px 0px 1px rgba(9, 30, 66, 0.31)"));
|
|
18
19
|
var saveIndicatorText = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding-left: 6px;\n"])));
|
|
19
20
|
export var SaveIndicator = function SaveIndicator(_ref) {
|
|
20
21
|
var children = _ref.children,
|
|
@@ -54,7 +55,7 @@ export var SaveIndicator = function SaveIndicator(_ref) {
|
|
|
54
55
|
"data-testid": "save-indicator-content"
|
|
55
56
|
}, jsx(CheckCircleIcon, {
|
|
56
57
|
label: "Saving",
|
|
57
|
-
primaryColor: G300,
|
|
58
|
+
primaryColor: token('color.icon.success', G300),
|
|
58
59
|
size: "small"
|
|
59
60
|
}), jsx("span", {
|
|
60
61
|
css: saveIndicatorText
|
|
@@ -4,4 +4,5 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { B75 } from '@atlaskit/theme/colors';
|
|
7
|
-
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
8
|
+
export var fakeCursorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .ProseMirror-fake-text-cursor {\n display: inline;\n pointer-events: none;\n position: relative;\n }\n\n .ProseMirror-fake-text-cursor::after {\n content: '';\n display: inline;\n top: 0;\n position: absolute;\n border-right: 1px solid ", ";\n }\n\n .ProseMirror-fake-text-selection {\n display: inline;\n pointer-events: none;\n position: relative;\n background-color: ", ";\n }\n }\n"])), token('color.border', 'rgba(0, 0, 0, 0.4)'), token('color.background.selected', B75));
|
|
@@ -19,7 +19,7 @@ var safeNumberFeatureFlag = function safeNumberFeatureFlag(value) {
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
export function createFeatureFlagsFromProps(props) {
|
|
22
|
-
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35;
|
|
22
|
+
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags, _props$featureFlags2, _props$allowTables, _props$featureFlags3, _props$featureFlags4, _props$allowTables2, _props$featureFlags5, _props$featureFlags6, _props$allowTables3, _props$featureFlags7, _props$featureFlags8, _props$allowTables4, _props$featureFlags9, _props$featureFlags10, _props$allowTables5, _props$allowExtension, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$featureFlags32, _props$featureFlags33, _props$collabEdit, _props$collabEdit2, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37;
|
|
23
23
|
|
|
24
24
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
25
25
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
@@ -56,6 +56,7 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
56
56
|
maxUnsafeChromeSpellcheckingVersion: safeNumberFeatureFlag((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33.maxUnsafeChromeSpellcheckingVersion),
|
|
57
57
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
58
58
|
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
59
|
-
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined
|
|
59
|
+
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags35 = props.featureFlags) === null || _props$featureFlags35 === void 0 ? void 0 : _props$featureFlags35['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
|
|
60
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.showHoverPreview) === 'boolean' ? !!((_props$featureFlags37 = props.featureFlags) !== null && _props$featureFlags37 !== void 0 && _props$featureFlags37.showHoverPreview) : false)
|
|
60
61
|
});
|
|
61
62
|
}
|