@atlaskit/editor-core 166.0.4 → 167.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/.eslintrc.js +46 -1
- package/CHANGELOG.md +99 -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/insert-block/index.js +1 -1
- 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/quick-insert/search.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/text-formatting/pm-plugins/input-rule.js +1 -1
- 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/insert-block/index.js +1 -1
- 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/quick-insert/search.js +1 -1
- 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/text-formatting/pm-plugins/input-rule.js +1 -1
- 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/insert-block/index.js +1 -1
- 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/quick-insert/search.js +3 -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/text-formatting/pm-plugins/input-rule.js +1 -1
- 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 +23 -23
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B200, B300,
|
|
1
|
+
import { B200, B300, N0, N20, R400, R75, DN400, N200, DN30 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { token } from '@atlaskit/tokens';
|
|
@@ -7,30 +7,33 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
7
7
|
/**
|
|
8
8
|
* Basic colors added to prevent content overflow in table cells.
|
|
9
9
|
*/
|
|
10
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4135
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
10
12
|
|
|
11
13
|
export var tableCellBackgroundColor = themed({
|
|
12
14
|
light: N0,
|
|
13
15
|
dark: DN30
|
|
14
16
|
});
|
|
15
17
|
export var tableToolbarColor = themed({
|
|
16
|
-
light:
|
|
17
|
-
dark:
|
|
18
|
+
light: akEditorTableToolbar,
|
|
19
|
+
dark: akEditorTableToolbarDark
|
|
18
20
|
});
|
|
19
21
|
export var tableTextColor = themed({
|
|
20
|
-
light: N200,
|
|
21
|
-
dark: DN400
|
|
22
|
+
light: token('color.text.subtlest', N200),
|
|
23
|
+
dark: token('color.text.subtlest', DN400)
|
|
22
24
|
});
|
|
23
25
|
export var tableBorderColor = themed({
|
|
24
26
|
light: token('color.border', akEditorTableBorder),
|
|
25
27
|
dark: token('color.border', akEditorTableBorderDark)
|
|
26
28
|
});
|
|
27
|
-
export var tableFloatingControlsColor = N20;
|
|
28
|
-
|
|
29
|
-
export var
|
|
30
|
-
export var
|
|
31
|
-
export var
|
|
32
|
-
export var
|
|
33
|
-
export var
|
|
29
|
+
export var tableFloatingControlsColor = token('color.background.neutral', N20); // TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
30
|
+
|
|
31
|
+
export var tableCellSelectedColor = token('color.blanket.selected', 'rgba(179, 212, 255, 0.3)');
|
|
32
|
+
export var tableToolbarSelectedColor = token('color.background.selected.bold', B200);
|
|
33
|
+
export var tableBorderSelectedColor = token('color.border.selected', B300);
|
|
34
|
+
export var tableCellDeleteColor = token('color.blanket.danger', 'rgba(255, 235, 230, 0.3)');
|
|
35
|
+
export var tableBorderDeleteColor = token('color.border.danger', R400);
|
|
36
|
+
export var tableToolbarDeleteColor = token('color.background.danger.bold', R75);
|
|
34
37
|
export var tableBorderRadiusSize = 3;
|
|
35
38
|
export var tablePadding = 8;
|
|
36
39
|
export var tableScrollbarOffset = 15;
|
|
@@ -9,6 +9,7 @@ import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/the
|
|
|
9
9
|
import { tableToolbarColor, tableBorderColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerOffsetFromColumnControls, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize, tableControlsSpacing } from './consts';
|
|
10
10
|
import { TableCssClassName as ClassName } from '../types';
|
|
11
11
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
12
|
+
import { token } from '@atlaskit/tokens';
|
|
12
13
|
|
|
13
14
|
var InsertLine = function InsertLine(cssString) {
|
|
14
15
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n display: none;\n position: absolute;\n z-index: ", ";\n ", "\n }\n"])), ClassName.CONTROLS_INSERT_LINE, tableBorderSelectedColor, akEditorUnitZIndex, cssString);
|
|
@@ -27,42 +28,46 @@ var Button = function Button(cssString) {
|
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
export var HeaderButton = function HeaderButton(props, cssString) {
|
|
30
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n ", "\n }\n\n .", "::after {\n content: ' ';\n background-color: transparent;\n left: -15px;\n top: 0;\n position: absolute;\n width: 15px;\n height: 100%;\n z-index: 1;\n }\n\n .active .", " {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n }\n"])), ClassName.CONTROLS_BUTTON, tableToolbarColor(props), tableBorderColor(props), cssString, ClassName.ROW_CONTROLS_BUTTON, ClassName.CONTROLS_BUTTON, N0, tableToolbarSelectedColor, tableBorderSelectedColor);
|
|
31
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n ", "\n }\n\n .", "::after {\n content: ' ';\n background-color: transparent;\n left: -15px;\n top: 0;\n position: absolute;\n width: 15px;\n height: 100%;\n z-index: 1;\n }\n\n .active .", " {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n }\n"])), ClassName.CONTROLS_BUTTON, tableToolbarColor(props), tableBorderColor(props), cssString, ClassName.ROW_CONTROLS_BUTTON, ClassName.CONTROLS_BUTTON, token('color.icon.inverse', N0), tableToolbarSelectedColor, tableBorderSelectedColor);
|
|
31
32
|
};
|
|
32
33
|
export var HeaderButtonHover = function HeaderButtonHover() {
|
|
33
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", ":hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_BUTTON, N0, tableToolbarSelectedColor, tableBorderSelectedColor);
|
|
34
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", ":hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_BUTTON, token('color.icon.inverse', N0), tableToolbarSelectedColor, tableBorderSelectedColor);
|
|
34
35
|
};
|
|
35
36
|
export var HeaderButtonDanger = function HeaderButtonDanger() {
|
|
36
37
|
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n .", " .", " {\n background-color: ", ";\n border-color: ", ";\n position: relative;\n z-index: ", ";\n }\n"])), ClassName.HOVERED_CELL_IN_DANGER, ClassName.CONTROLS_BUTTON, tableToolbarDeleteColor, tableBorderDeleteColor, akEditorUnitZIndex);
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
var InsertButton = function InsertButton() {
|
|
40
|
-
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n .", " {\n position: absolute;\n z-index: ", ";\n bottom: 0;\n }\n .", ",\n .", " {\n height: ", "px;\n width: ", "px;\n }\n .", " {\n ", "\n }\n .", " {\n display: none;\n }\n &:hover .", " {\n display: flex;\n }\n"])), ClassName.CONTROLS_INSERT_BUTTON_INNER, akEditorUnitZIndex + 10, ClassName.CONTROLS_INSERT_BUTTON_INNER, ClassName.CONTROLS_INSERT_BUTTON, tableInsertColumnButtonSize, tableInsertColumnButtonSize, ClassName.CONTROLS_INSERT_BUTTON, Button("\n background: white;\n box-shadow: 0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A, ";\n color: ").concat(N300, ";\n ")), ClassName.CONTROLS_INSERT_LINE, ClassName.CONTROLS_INSERT_LINE);
|
|
41
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n .", " {\n position: absolute;\n z-index: ", ";\n bottom: 0;\n }\n .", ",\n .", " {\n height: ", "px;\n width: ", "px;\n }\n .", " {\n ", "\n }\n .", " {\n display: none;\n }\n &:hover .", " {\n display: flex;\n }\n"])), ClassName.CONTROLS_INSERT_BUTTON_INNER, akEditorUnitZIndex + 10, ClassName.CONTROLS_INSERT_BUTTON_INNER, ClassName.CONTROLS_INSERT_BUTTON, tableInsertColumnButtonSize, tableInsertColumnButtonSize, ClassName.CONTROLS_INSERT_BUTTON, Button("\n background: ".concat(token('elevation.surface.overlay', 'white'), ";\n box-shadow: ").concat(token('elevation.shadow.overlay', "0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A)), ";\n color: ").concat(token('color.icon', N300), ";\n ")), ClassName.CONTROLS_INSERT_LINE, ClassName.CONTROLS_INSERT_LINE);
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
var InsertButtonHover = function InsertButtonHover() {
|
|
44
|
-
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n .", ":hover {\n background: ", ";\n color:
|
|
45
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n .", ":hover {\n background: ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_INSERT_BUTTON, token('color.background.brand.bold', B300), token('color.icon.inverse', 'white'));
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
export var insertColumnButtonWrapper = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), InsertButton(), InsertButtonHover(), InsertLine("\n width: 2px;\n left: 9px;\n "));
|
|
48
49
|
export var insertRowButtonWrapper = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n"])), InsertButton(), InsertButtonHover(), InsertLine("\n height: 2px;\n top: -11px;\n left: ".concat(tableInsertColumnButtonSize - 1, "px;\n ")));
|
|
49
50
|
export var columnControlsLineMarker = function columnControlsLineMarker(props) {
|
|
50
|
-
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n .", ".", "\n table\n tr:first-
|
|
51
|
+
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n .", ".", "\n table\n tr:first-of-type\n td,\n .", ".", "\n table\n tr:first-of-type\n th {\n position: relative;\n\n &::before {\n content: ' ';\n ", ";\n top: -", "px;\n right: -", "px;\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, ClassName.TABLE_CONTAINER, ClassName.WITH_CONTROLS, Marker(props), tableToolbarSize + lineMarkerOffsetFromColumnControls, lineMarkerSize / 2);
|
|
51
52
|
};
|
|
52
|
-
export var DeleteButton = css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n .", ",\n .", " {\n height: ", "px;\n width: ", "px;\n }\n .", " {\n .", " {\n ", "\n }\n }\n\n .", ":hover {\n background: ", ";\n color:
|
|
53
|
+
export var DeleteButton = css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n .", ",\n .", " {\n height: ", "px;\n width: ", "px;\n }\n .", " {\n .", " {\n ", "\n }\n }\n\n .", ":hover {\n background: ", ";\n color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_DELETE_BUTTON_WRAP, ClassName.CONTROLS_DELETE_BUTTON, tableDeleteButtonSize, tableDeleteButtonSize, ClassName.CONTROLS_DELETE_BUTTON_WRAP, ClassName.CONTROLS_DELETE_BUTTON, Button("\n background: ".concat(token('color.background.neutral', N20A), ";\n color: ").concat(token('color.icon', N300), ";\n ")), ClassName.CONTROLS_DELETE_BUTTON, token('color.background.danger.bold', R300), token('color.icon.inverse', 'white')); // TODO: https://product-fabric.atlassian.net/browse/DSP-4451
|
|
54
|
+
|
|
55
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
56
|
+
|
|
53
57
|
export var OverflowShadow = function OverflowShadow(props) {
|
|
54
58
|
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n .", ", .", " {\n display: block;\n height: calc(\n 100% - ", "px\n );\n position: absolute;\n pointer-events: none;\n top: ", "px;\n z-index: ", ";\n width: 8px;\n }\n .", " {\n background: linear-gradient(to left, rgba(99, 114, 130, 0) 0, ", " 100%);\n left: 0px;\n }\n .", "[data-number-column='true'] > :not(.", ").", " {\n left: ", "px;\n }\n .", " {\n background: linear-gradient(\n to right,\n rgba(99, 114, 130, 0) 0,\n ", " 100%\n );\n left: calc(100% + 2px);\n }\n .", " {\n .", ", .", " {\n height: calc(100% - ", "px);\n top: ", "px;\n }\n .", " {\n border-left: 1px solid ", ";\n }\n }\n .", ".", " {\n .", ", .", " {\n top: ", "px;\n }\n }\n"])), ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTop + tableMarginBottom + tableToolbarSize - 2, tableMarginTop + tableToolbarSize - 1, akEditorShadowZIndex, ClassName.TABLE_LEFT_SHADOW, N40A, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY_SHADOW, ClassName.TABLE_LEFT_SHADOW, akEditorTableNumberColumnWidth - 1, ClassName.TABLE_RIGHT_SHADOW, N40A, ClassName.WITH_CONTROLS, ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTop + tableMarginBottom - 2, tableMarginTop - 1, ClassName.TABLE_LEFT_SHADOW, tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableControlsSpacing);
|
|
55
59
|
};
|
|
60
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
56
61
|
|
|
57
62
|
var columnHeaderButton = function columnHeaderButton(props, cssString) {
|
|
58
63
|
return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n"])), tableToolbarColor(props), tableBorderColor(props), cssString);
|
|
59
64
|
};
|
|
60
65
|
|
|
61
|
-
var columnHeaderButtonSelected = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), N0, tableToolbarSelectedColor, tableBorderSelectedColor, columnControlsSelectedZIndex);
|
|
66
|
+
var columnHeaderButtonSelected = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), token('color.text.inverse', N0), tableToolbarSelectedColor, tableBorderSelectedColor, columnControlsSelectedZIndex);
|
|
62
67
|
export var columnControlsDecoration = function columnControlsDecoration(props) {
|
|
63
|
-
return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: calc(100% + ", "px);\n left: -1px;\n top: -", "px;\n height: ", "px;\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n .", " .", " {\n display: block;\n }\n\n table\n tr:first-
|
|
68
|
+
return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n .", " {\n display: none;\n cursor: pointer;\n position: absolute;\n width: calc(100% + ", "px);\n left: -1px;\n top: -", "px;\n height: ", "px;\n\n &::after {\n content: ' ';\n\n ", "\n }\n }\n\n .", " .", " {\n display: block;\n }\n\n table\n tr:first-of-type\n td.", ",\n table\n tr:first-of-type\n th.", " {\n &.", ",\n &.", ",\n &.", " {\n .", "::after {\n ", ";\n }\n\n &.", "\n .", "::after {\n background-color: ", ";\n border: 1px solid ", ";\n border-bottom: none;\n z-index: ", ";\n }\n }\n }\n\n .", "\n table\n tr:first-of-type\n td.", ",\n .", "\n table\n tr:first-of-type\n th.", " {\n .", "::after {\n ", ";\n }\n }\n"])), ClassName.COLUMN_CONTROLS_DECORATIONS, tableCellBorderWidth * 2, columnControlsDecorationHeight + tableCellBorderWidth, columnControlsDecorationHeight, columnHeaderButton(props, "\n border-right: ".concat(tableCellBorderWidth, "px solid ").concat(tableBorderColor(props), ";\n border-bottom: none;\n height: ").concat(tableToolbarSize, "px;\n width: 100%;\n position: absolute;\n top: ").concat(columnControlsDecorationHeight - tableToolbarSize, "px;\n left: 0px;\n z-index: ").concat(columnControlsZIndex, ";\n ")), ClassName.WITH_CONTROLS, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_COLUMN, ClassName.HOVERED_TABLE, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected, ClassName.HOVERED_CELL_IN_DANGER, ClassName.COLUMN_CONTROLS_DECORATIONS, tableToolbarDeleteColor, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.TABLE_SELECTED, ClassName.TABLE_CELL, ClassName.TABLE_SELECTED, ClassName.TABLE_HEADER_CELL, ClassName.COLUMN_CONTROLS_DECORATIONS, columnHeaderButtonSelected);
|
|
64
69
|
};
|
|
65
70
|
export var hoveredDeleteButton = css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n .", ".", " {\n .", ",\n .", ",\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.SELECTED_CELL, ClassName.COLUMN_SELECTED, ClassName.HOVERED_CELL, tableBorderDeleteColor, ClassName.SELECTED_CELL, tableCellDeleteColor);
|
|
66
71
|
export var hoveredCell = css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n .", " {\n position: relative;\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL, tableBorderSelectedColor);
|
|
67
|
-
export var hoveredWarningCell = css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n td.", " {\n background-color: ", " !important; // We need to override the background-color added to the cell\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL_WARNING, Y50, Y200);
|
|
68
|
-
export var resizeHandle = css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n td.", ", th.", " {\n .", "::after {\n content: ' ';\n right: ", "px;\n position: absolute;\n width: ", "px;\n height: calc(100% + 1px);\n background-color: ", ";\n z-index: ", ";\n top: 0;\n }\n }\n\n table\n tr:first-
|
|
72
|
+
export var hoveredWarningCell = css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n :not(.", ")\n .", ":not(.", ") {\n td.", " {\n background-color: ", " !important; // We need to override the background-color added to the cell\n border: 1px solid ", ";\n }\n }\n"])), ClassName.IS_RESIZING, ClassName.TABLE_CONTAINER, ClassName.HOVERED_DELETE_BUTTON, ClassName.HOVERED_CELL_WARNING, token('color.background.warning', Y50), token('color.border.warning', Y200));
|
|
73
|
+
export var resizeHandle = css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n .", " {\n .", " {\n background-color: transparent;\n position: absolute;\n width: ", "px;\n height: 100%;\n top: 0;\n right: -", "px;\n cursor: col-resize;\n z-index: ", ";\n }\n\n td.", ", th.", " {\n .", "::after {\n content: ' ';\n right: ", "px;\n position: absolute;\n width: ", "px;\n height: calc(100% + 1px);\n background-color: ", ";\n z-index: ", ";\n top: 0;\n }\n }\n\n table\n tr:first-of-type\n th.", "\n .", "::after,\n table\n tr:first-of-type\n td.", "\n .", "::after {\n top: -", "px;\n height: calc(100% + ", "px);\n }\n }\n"])), ClassName.TABLE_CONTAINER, ClassName.RESIZE_HANDLE_DECORATION, resizeHandlerAreaWidth, resizeHandlerAreaWidth / 2, resizeHandlerZIndex, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, resizeLineWidth, tableBorderSelectedColor, columnControlsZIndex * 2, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, tableToolbarSize + tableCellBorderWidth, tableToolbarSize + tableCellBorderWidth);
|
|
@@ -88,10 +88,9 @@ export var createColumnControlsDecoration = function createColumnControlsDecorat
|
|
|
88
88
|
element.dataset.startIndex = "".concat(index);
|
|
89
89
|
index += colspan;
|
|
90
90
|
element.dataset.endIndex = "".concat(index);
|
|
91
|
-
return Decoration.widget(cell.pos + 1,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
element, {
|
|
91
|
+
return Decoration.widget(cell.pos + 1, function () {
|
|
92
|
+
return element;
|
|
93
|
+
}, {
|
|
95
94
|
key: "".concat(TableDecorations.COLUMN_CONTROLS_DECORATIONS, "_").concat(index),
|
|
96
95
|
// this decoration should be the first one, even before gap cursor.
|
|
97
96
|
side: -100
|
|
@@ -61,6 +61,8 @@ export var transformSliceToFixHardBreakProblemOnCopyFromCell = function transfor
|
|
|
61
61
|
return slice;
|
|
62
62
|
};
|
|
63
63
|
export var transformSliceToRemoveOpenTable = function transformSliceToRemoveOpenTable(slice, schema) {
|
|
64
|
+
var _slice$content$firstC;
|
|
65
|
+
|
|
64
66
|
// we're removing the table, tableRow and tableCell reducing the open depth by 3
|
|
65
67
|
var depthDecrement = 3; // Case 1: A slice entirely within a single CELL
|
|
66
68
|
|
|
@@ -68,17 +70,15 @@ export var transformSliceToRemoveOpenTable = function transformSliceToRemoveOpen
|
|
|
68
70
|
slice.openStart >= 4 && slice.openEnd >= 4 && // slice is a table node
|
|
69
71
|
slice.content.childCount === 1 && slice.content.firstChild.type === schema.nodes.table) {
|
|
70
72
|
return new Slice(flatmap(slice.content, unwrapContentFromTable), slice.openStart - depthDecrement, slice.openEnd - depthDecrement);
|
|
71
|
-
} // Case 2: A slice starting
|
|
72
|
-
// slice.openStart can only be >= 4 if its a TextSelection. CellSelection would give openStart = 1
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (slice.openStart >= 4 && slice.content.firstChild.type === schema.nodes.table) {
|
|
76
|
-
return new Slice(flatmap(slice.content, removeTableFromFirstChild), slice.openStart - depthDecrement, slice.openEnd);
|
|
77
|
-
} // Case 3: A slice starting outside a table and finishing inside
|
|
73
|
+
} // Case 2: A slice starting within a CELL and ending outside the table
|
|
78
74
|
|
|
79
75
|
|
|
80
|
-
if (
|
|
81
|
-
|
|
76
|
+
if ( // starts inside of a cell but ends outside of the starting table
|
|
77
|
+
slice.openStart >= 4 && // slice starts from a table node (and spans across more than one node)
|
|
78
|
+
slice.content.childCount > 1 && ((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.table) {
|
|
79
|
+
// repoint the slice's cutting depth so that cell content where the slice starts
|
|
80
|
+
// does not get lifted out of the cell on paste
|
|
81
|
+
return new Slice(slice.content, 1, slice.openEnd);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
return slice;
|
|
@@ -175,7 +175,7 @@ var buildRegex = function buildRegex(char) {
|
|
|
175
175
|
// Double X - https://regex101.com/r/pQUgjx/1/
|
|
176
176
|
|
|
177
177
|
var baseRegex = '^X(?=[^X\\s]).*?[^\\sX]X(?=[\\sOBJECT_REPLACEMENT_CHARACTER]COMBINATIONS|$)'.replace('OBJECT_REPLACEMENT_CHARACTER', leafNodeReplacementCharacter).replace('COMBINATIONS', combinations ? "|".concat(combinations) : '');
|
|
178
|
-
var replacedRegex =
|
|
178
|
+
var replacedRegex = String.prototype.hasOwnProperty('replaceAll') ? baseRegex.replaceAll('X', escapedChar) : baseRegex.replace(/X/g, escapedChar);
|
|
179
179
|
return new ReverseRegexExp(replacedRegex);
|
|
180
180
|
};
|
|
181
181
|
|
|
@@ -156,11 +156,12 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
|
|
|
156
156
|
containerElement = _ref5.containerElement,
|
|
157
157
|
popupsMountPoint = _ref5.popupsMountPoint,
|
|
158
158
|
popupsBoundariesElement = _ref5.popupsBoundariesElement,
|
|
159
|
-
popupsScrollableElement = _ref5.popupsScrollableElement
|
|
159
|
+
popupsScrollableElement = _ref5.popupsScrollableElement,
|
|
160
|
+
wrapperElement = _ref5.wrapperElement;
|
|
160
161
|
popupMountRef.current = {
|
|
161
|
-
popupsMountPoint: popupsMountPoint ||
|
|
162
|
+
popupsMountPoint: popupsMountPoint || wrapperElement || undefined,
|
|
162
163
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
163
|
-
popupsScrollableElement: popupsScrollableElement
|
|
164
|
+
popupsScrollableElement: popupsScrollableElement || containerElement || undefined
|
|
164
165
|
};
|
|
165
166
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
166
167
|
plugins: {
|
|
@@ -12,6 +12,7 @@ import { WrapperTypeAhead } from '../ui/WrapperTypeAhead';
|
|
|
12
12
|
import { StatsModifier } from '../stats-modifier';
|
|
13
13
|
import { getTypeAheadQuery } from '../utils';
|
|
14
14
|
import { closeTypeAhead } from '../transforms/close-type-ahead';
|
|
15
|
+
import { token } from '@atlaskit/tokens';
|
|
15
16
|
export var factoryDecorations = function factoryDecorations(_ref) {
|
|
16
17
|
var intl = _ref.intl,
|
|
17
18
|
popupMountRef = _ref.popupMountRef,
|
|
@@ -51,7 +52,7 @@ export var factoryDecorations = function factoryDecorations(_ref) {
|
|
|
51
52
|
|
|
52
53
|
typeaheadComponent.dataset.editorPopup = 'true';
|
|
53
54
|
typeaheadComponent.dataset.typeAhead = TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE;
|
|
54
|
-
typeaheadComponent.style.color = B400;
|
|
55
|
+
typeaheadComponent.style.color = token('color.text.accent.blue', B400);
|
|
55
56
|
typeaheadComponent.style.backgroundColor = 'transparent';
|
|
56
57
|
|
|
57
58
|
var onUndoRedo = function onUndoRedo(inputType) {
|
|
@@ -15,14 +15,14 @@ import { DynamicHeightListItem, SelectedIndexContext, ListItemActionsContext, Up
|
|
|
15
15
|
import { injectIntl } from 'react-intl-next';
|
|
16
16
|
import { typeAheadListMessages } from '../messages';
|
|
17
17
|
var LIST_ITEM_ESTIMATED_HEIGHT = ICON_HEIGHT + ITEM_PADDING * 2;
|
|
18
|
-
var LIST_MAX_HEIGHT = 380;
|
|
19
18
|
var LIST_WIDTH = 320;
|
|
20
19
|
var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref) {
|
|
21
20
|
var items = _ref.items,
|
|
22
21
|
selectedIndex = _ref.selectedIndex,
|
|
23
22
|
onItemHover = _ref.onItemHover,
|
|
24
23
|
onItemClick = _ref.onItemClick,
|
|
25
|
-
intl = _ref.intl
|
|
24
|
+
intl = _ref.intl,
|
|
25
|
+
fitHeight = _ref.fitHeight;
|
|
26
26
|
var listRef = useRef();
|
|
27
27
|
var redrawListAtIndex = useCallback(function (index) {
|
|
28
28
|
listRef.current.resetAfterIndex(index);
|
|
@@ -41,7 +41,7 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
41
41
|
redrawListAtIndex: redrawListAtIndex,
|
|
42
42
|
getFirstVisibleIndex: getFirstVisibleIndex,
|
|
43
43
|
listLength: items.length,
|
|
44
|
-
listMaxHeight:
|
|
44
|
+
listMaxHeight: fitHeight,
|
|
45
45
|
listItemEstimatedHeight: LIST_ITEM_ESTIMATED_HEIGHT
|
|
46
46
|
}),
|
|
47
47
|
getListItemHeight = _useDynamicListHeight.getListItemHeight,
|
|
@@ -103,7 +103,7 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
var estimatedHeight = items.length * LIST_ITEM_ESTIMATED_HEIGHT;
|
|
106
|
-
var height = Math.min(typeof renderedListHeight === 'number' ? renderedListHeight : estimatedHeight,
|
|
106
|
+
var height = Math.min(typeof renderedListHeight === 'number' ? renderedListHeight : estimatedHeight, fitHeight);
|
|
107
107
|
return jsx(ItemGroup, {
|
|
108
108
|
role: "listbox",
|
|
109
109
|
"aria-live": "polite",
|
|
@@ -15,6 +15,7 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
|
15
15
|
import IconFallback from '../../quick-insert/assets/fallback';
|
|
16
16
|
import { shortcutStyle } from '../../../ui/styles';
|
|
17
17
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
18
|
+
import { token } from '@atlaskit/tokens';
|
|
18
19
|
export var ICON_HEIGHT = 40;
|
|
19
20
|
export var ICON_WIDTH = 40;
|
|
20
21
|
export var ITEM_PADDING = 12;
|
|
@@ -38,26 +39,26 @@ export var itemTheme = _defineProperty({}, itemThemeNamespace, {
|
|
|
38
39
|
hover: {
|
|
39
40
|
// background: colors.transparent, transparent is not a thing
|
|
40
41
|
text: colorsText,
|
|
41
|
-
secondaryText: N200
|
|
42
|
+
secondaryText: token('color.text.subtlest', N200)
|
|
42
43
|
},
|
|
43
44
|
selected: {
|
|
44
45
|
background: themed({
|
|
45
|
-
light: N20,
|
|
46
|
-
dark: DN70
|
|
46
|
+
light: token('color.background.neutral.subtle.hovered', N20),
|
|
47
|
+
dark: token('color.background.neutral.subtle.hovered', DN70)
|
|
47
48
|
}),
|
|
48
49
|
text: themed({
|
|
49
|
-
light: N800,
|
|
50
|
-
dark: DN600
|
|
50
|
+
light: token('color.text', N800),
|
|
51
|
+
dark: token('color.text', DN600)
|
|
51
52
|
}),
|
|
52
53
|
secondaryText: themed({
|
|
53
|
-
light: N200,
|
|
54
|
-
dark: DN300
|
|
54
|
+
light: token('color.text.subtlest', N200),
|
|
55
|
+
dark: token('color.text.subtlest', DN300)
|
|
55
56
|
})
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
|
-
export var itemIcon = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid
|
|
59
|
+
export var itemIcon = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, token('color.border', 'rgba(223, 225, 229, 0.5)'), borderRadius(), ICON_WIDTH, ICON_HEIGHT);
|
|
59
60
|
var itemBody = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n"])));
|
|
60
|
-
var itemText = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: initial;\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 4px;\n }\n"])), relativeFontSizeToBase16(11.67), N200);
|
|
61
|
+
var itemText = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: initial;\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 4px;\n }\n"])), relativeFontSizeToBase16(11.67), token('color.text.subtlest', N200));
|
|
61
62
|
var itemAfter = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
|
|
62
63
|
var hidden = {
|
|
63
64
|
overflow: 'hidden'
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
1
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
3
|
|
|
3
4
|
var _templateObject;
|
|
4
5
|
|
|
5
6
|
/** @jsx jsx */
|
|
6
|
-
import React, { useEffect, useMemo } from 'react';
|
|
7
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
7
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
+
import rafSchedule from 'raf-schd';
|
|
8
10
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
import { Popup } from '@atlaskit/editor-common/ui';
|
|
11
|
+
import { findOverflowScrollParent, Popup } from '@atlaskit/editor-common/ui';
|
|
10
12
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
11
13
|
import { N0, N60A, N50A } from '@atlaskit/theme/colors';
|
|
12
14
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
|
|
13
15
|
import { TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
|
|
14
16
|
import { TypeAheadList } from './TypeAheadList';
|
|
15
|
-
|
|
17
|
+
import { ITEM_PADDING } from './TypeAheadListItem';
|
|
18
|
+
import { token } from '@atlaskit/tokens';
|
|
19
|
+
var DEFAULT_TYPEAHEAD_MENU_HEIGHT = 380;
|
|
20
|
+
var typeAheadContent = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n padding: ", "px 0;\n width: 320px;\n max-height: 380px; /* ~5.5 visibile items */\n overflow-y: auto;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n position: relative;\n"])), token('elevation.surface.overlay', N0), borderRadius(), token('elevation.shadow.overlay', "0 0 1px ".concat(N60A, ", 0 4px 8px -2px ").concat(N50A)), gridSize() / 2);
|
|
16
21
|
|
|
17
22
|
var Highlight = function Highlight(_ref) {
|
|
18
23
|
var state = _ref.state,
|
|
@@ -91,13 +96,73 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
|
|
|
91
96
|
// we need to send the event again
|
|
92
97
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
98
|
triggerHandler]);
|
|
99
|
+
|
|
100
|
+
var _useState = useState(DEFAULT_TYPEAHEAD_MENU_HEIGHT),
|
|
101
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
102
|
+
fitHeight = _useState2[0],
|
|
103
|
+
setFitHeight = _useState2[1];
|
|
104
|
+
|
|
105
|
+
var getFitHeight = useCallback(function () {
|
|
106
|
+
if (!anchorElement || !popupsMountPoint) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var target = anchorElement;
|
|
111
|
+
|
|
112
|
+
var _target$getBoundingCl = target.getBoundingClientRect(),
|
|
113
|
+
targetTop = _target$getBoundingCl.top,
|
|
114
|
+
targetHeight = _target$getBoundingCl.height;
|
|
115
|
+
|
|
116
|
+
var boundariesElement = document.body;
|
|
117
|
+
|
|
118
|
+
var _boundariesElement$ge = boundariesElement.getBoundingClientRect(),
|
|
119
|
+
boundariesHeight = _boundariesElement$ge.height,
|
|
120
|
+
boundariesTop = _boundariesElement$ge.top; // Calculating the space above and space below our decoration
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
var spaceAbove = targetTop - (boundariesTop - boundariesElement.scrollTop);
|
|
124
|
+
var spaceBelow = boundariesTop + boundariesHeight - (targetTop + targetHeight); // Keep default height if more than enough space
|
|
125
|
+
|
|
126
|
+
if (spaceBelow >= DEFAULT_TYPEAHEAD_MENU_HEIGHT) {
|
|
127
|
+
return setFitHeight(DEFAULT_TYPEAHEAD_MENU_HEIGHT);
|
|
128
|
+
} // Determines whether typeahead will fit above or below decoration
|
|
129
|
+
// and return the space available.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
var newFitHeight = spaceBelow >= spaceAbove ? spaceBelow : spaceAbove; // Each typeahead item has some padding
|
|
133
|
+
// We want to leave some space at the top so first item
|
|
134
|
+
// is not partially cropped
|
|
135
|
+
|
|
136
|
+
var fitHeightWithSpace = newFitHeight - ITEM_PADDING * 2; // Ensure typeahead height is max its default height
|
|
137
|
+
|
|
138
|
+
var minFitHeight = Math.min(DEFAULT_TYPEAHEAD_MENU_HEIGHT, fitHeightWithSpace);
|
|
139
|
+
return setFitHeight(minFitHeight);
|
|
140
|
+
}, [anchorElement, popupsMountPoint]);
|
|
141
|
+
var getFitHeightDebounced = rafSchedule(getFitHeight);
|
|
142
|
+
useEffect(function () {
|
|
143
|
+
var scrollableElement = popupsScrollableElement || findOverflowScrollParent(anchorElement);
|
|
144
|
+
getFitHeight();
|
|
145
|
+
window.addEventListener('resize', getFitHeightDebounced);
|
|
146
|
+
|
|
147
|
+
if (scrollableElement) {
|
|
148
|
+
scrollableElement.addEventListener('scroll', getFitHeightDebounced);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return function () {
|
|
152
|
+
window.removeEventListener('resize', getFitHeightDebounced);
|
|
153
|
+
|
|
154
|
+
if (scrollableElement) {
|
|
155
|
+
scrollableElement.removeEventListener('scroll', getFitHeightDebounced);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}, [anchorElement, popupsScrollableElement, getFitHeightDebounced, getFitHeight]);
|
|
94
159
|
return jsx(Popup, {
|
|
95
160
|
zIndex: akEditorFloatingDialogZIndex,
|
|
96
161
|
target: anchorElement,
|
|
97
162
|
mountTo: popupsMountPoint,
|
|
98
163
|
boundariesElement: popupsBoundariesElement,
|
|
99
164
|
scrollableElement: popupsScrollableElement,
|
|
100
|
-
fitHeight:
|
|
165
|
+
fitHeight: fitHeight,
|
|
101
166
|
fitWidth: 340,
|
|
102
167
|
offset: OFFSET
|
|
103
168
|
}, jsx("div", {
|
|
@@ -111,7 +176,8 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
|
|
|
111
176
|
items: items,
|
|
112
177
|
selectedIndex: selectedIndex,
|
|
113
178
|
onItemHover: setSelectedItem,
|
|
114
|
-
onItemClick: onItemInsert
|
|
179
|
+
onItemClick: onItemInsert,
|
|
180
|
+
fitHeight: fitHeight
|
|
115
181
|
})));
|
|
116
182
|
});
|
|
117
183
|
TypeAheadPopup.displayName = 'TypeAheadPopup';
|
|
@@ -9,6 +9,6 @@ export var UnsupportedSharedCssClassName = {
|
|
|
9
9
|
BLOCK_CONTAINER: 'unsupportedBlockView-content-wrap',
|
|
10
10
|
INLINE_CONTAINER: 'unsupportedInlineView-content-wrap'
|
|
11
11
|
};
|
|
12
|
-
var inlineUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-
|
|
12
|
+
var inlineUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.INLINE_CONTAINER, " > span:nth-of-type(2)");
|
|
13
13
|
var blockUnsupportedSelector = ".".concat(UnsupportedSharedCssClassName.BLOCK_CONTAINER, " > div");
|
|
14
14
|
export var unsupportedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ", ", " {\n cursor: pointer;\n }\n\n .", "", ",\n .", "", " {\n ", "\n }\n\n .danger {\n .", "", ",\n .", "", " {\n border: ", "px solid\n ", ";\n background-color: ", ";\n }\n }\n"])), blockUnsupportedSelector, inlineUnsupportedSelector, akEditorSelectedNodeClassName, blockUnsupportedSelector, akEditorSelectedNodeClassName, inlineUnsupportedSelector, getSelectionStyles([SelectionStyle.Background, SelectionStyle.Border]), akEditorSelectedNodeClassName, blockUnsupportedSelector, akEditorSelectedNodeClassName, inlineUnsupportedSelector, akEditorSelectedBorderSize, token('color.border.danger', akEditorDeleteBorder), token('color.blanket.danger', akEditorDeleteBackgroundWithOpacity));
|
|
@@ -5,4 +5,5 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
7
|
import { N60A } from '@atlaskit/theme/colors';
|
|
8
|
-
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
9
|
+
export var dropdown = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n padding: 4px 0;\n"])), token('elevation.surface.overlay', 'white'), borderRadius(), token('elevation.shadow.overlay', "0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A)));
|
|
@@ -4,4 +4,5 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { N800, N20 } from '@atlaskit/theme/colors';
|
|
7
|
-
|
|
7
|
+
import { token } from '@atlaskit/tokens';
|
|
8
|
+
export var dropdownItem = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n cursor: pointer;\n text-decoration: none;\n padding: 8px 32px 8px 12px;\n color: ", ";\n > span {\n display: flex;\n margin-right: 8px;\n }\n &:hover {\n background-color: ", ";\n }\n"])), token('color.text', N800), token('color.background.neutral.subtle.hovered', N20));
|
|
@@ -85,7 +85,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
85
85
|
popupsScrollableElement: popupsScrollableElement,
|
|
86
86
|
containerElement: _this.containerElement,
|
|
87
87
|
disabled: !!disabled,
|
|
88
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
88
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
89
|
+
wrapperElement: _this.containerElement
|
|
89
90
|
}), editorDOMElement)));
|
|
90
91
|
});
|
|
91
92
|
|
|
@@ -20,6 +20,7 @@ import ButtonGroup from '@atlaskit/button/button-group';
|
|
|
20
20
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
21
21
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
22
22
|
import { N40 } from '@atlaskit/theme/colors';
|
|
23
|
+
import { token } from '@atlaskit/tokens';
|
|
23
24
|
import Toolbar from '../../Toolbar';
|
|
24
25
|
import PluginSlot from '../../PluginSlot';
|
|
25
26
|
import WithPluginState from '../../WithPluginState';
|
|
@@ -39,7 +40,7 @@ import { TableControlsPadding, MainToolbar, mainToolbarCustomComponentsSlotStyle
|
|
|
39
40
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
40
41
|
var CommentEditorMargin = 14;
|
|
41
42
|
var CommentEditorSmallerMargin = 8;
|
|
42
|
-
var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color:
|
|
43
|
+
var commentEditorStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n\n .less-margin .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n min-width: 272px;\n /* Border + Toolbar + Footer + (Paragraph + ((Parahraph + Margin) * (DefaultLines - 1)) */\n /* calc(2px + 40px + 24px + ( 20px + (32px * 2))) */\n\n height: auto;\n background-color: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n border-radius: ", "px;\n\n max-width: inherit;\n word-wrap: break-word;\n"])), CommentEditorSmallerMargin, CommentEditorSmallerMargin, token('color.background.input', 'white'), token('color.border', N40), borderRadius());
|
|
43
44
|
var ContentArea = createEditorContentStyle(css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex-grow: 1;\n overflow-x: hidden;\n overflow-y: auto;\n line-height: 24px;\n\n /** Hack for Bitbucket to ensure entire editorView gets drop event; see ED-3294 **/\n /** Hack for tables controlls. Otherwise marging collapse and controlls are misplaced. **/\n .ProseMirror {\n margin: 12px ", "px ", "px;\n }\n\n .gridParent {\n margin-left: ", "px;\n margin-right: ", "px;\n width: calc(100% + ", "px);\n }\n\n padding: ", "px;\n\n ", ";\n"])), CommentEditorMargin, CommentEditorMargin, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, CommentEditorMargin - GRID_GUTTER, TableControlsPadding, tableCommentEditorStyles));
|
|
44
45
|
ContentArea.displayName = 'ContentArea';
|
|
45
46
|
var secondaryToolbarStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n justify-content: flex-end;\n align-items: center;\n display: flex;\n padding: 12px 1px;\n"])));
|
|
@@ -64,6 +65,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
64
65
|
|
|
65
66
|
_defineProperty(_assertThisInitialized(_this), "containerElement", null);
|
|
66
67
|
|
|
68
|
+
_defineProperty(_assertThisInitialized(_this), "wrapperElement", null);
|
|
69
|
+
|
|
67
70
|
_defineProperty(_assertThisInitialized(_this), "handleSave", function () {
|
|
68
71
|
if (_this.props.editorView && _this.props.onSave) {
|
|
69
72
|
_this.props.onSave(_this.props.editorView);
|
|
@@ -108,7 +111,10 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
108
111
|
animate: maxContentSizeReached
|
|
109
112
|
}, jsx("div", {
|
|
110
113
|
css: [commentEditorStyle, css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n min-height: ", "px;\n "])), minHeight)],
|
|
111
|
-
className: "akEditor"
|
|
114
|
+
className: "akEditor",
|
|
115
|
+
ref: function ref(_ref4) {
|
|
116
|
+
return _this.wrapperElement = _ref4;
|
|
117
|
+
}
|
|
112
118
|
}, jsx(MainToolbar, {
|
|
113
119
|
useStickyToolbar: useStickyToolbar
|
|
114
120
|
}, jsx(Toolbar, {
|
|
@@ -150,7 +156,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
150
156
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
151
157
|
popupsScrollableElement: popupsScrollableElement,
|
|
152
158
|
containerElement: _this.containerElement,
|
|
153
|
-
disabled: !!disabled
|
|
159
|
+
disabled: !!disabled,
|
|
160
|
+
wrapperElement: _this.wrapperElement
|
|
154
161
|
}), editorDOMElement);
|
|
155
162
|
})), jsx(WidthEmitter, {
|
|
156
163
|
editorView: editorView
|
|
@@ -8,10 +8,11 @@ import React, { useEffect, useState } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
10
|
import { N30 } from '@atlaskit/theme/colors';
|
|
11
|
+
import { token } from '@atlaskit/tokens';
|
|
11
12
|
import { akEditorToolbarKeylineHeight, akEditorGridLineZIndex, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
13
|
export var TableControlsPadding = 20;
|
|
13
|
-
var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color:
|
|
14
|
-
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", "px;\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0
|
|
14
|
+
var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div > *:first-child {\n margin-left: 0;\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), gridSize(), gridSize(), token('elevation.surface', 'white'), TableControlsPadding);
|
|
15
|
+
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", "px;\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), gridSize(), akEditorGridLineZIndex + akEditorMenuZIndex, akEditorToolbarKeylineHeight, token('color.border', N30));
|
|
15
16
|
|
|
16
17
|
var StickyToolbar = function StickyToolbar(props) {
|
|
17
18
|
var _useState = useState(0),
|
|
@@ -42,6 +42,8 @@ export var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
42
42
|
|
|
43
43
|
_defineProperty(_assertThisInitialized(_this), "scrollContainer", null);
|
|
44
44
|
|
|
45
|
+
_defineProperty(_assertThisInitialized(_this), "wrapperElementRef", /*#__PURE__*/React.createRef());
|
|
46
|
+
|
|
45
47
|
_defineProperty(_assertThisInitialized(_this), "contentAreaRef", function (contentArea) {
|
|
46
48
|
_this.contentArea = contentArea;
|
|
47
49
|
});
|
|
@@ -107,7 +109,8 @@ export var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
107
109
|
var featureFlags = (_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.state ? getFeatureFlags(props.editorView.state) : undefined;
|
|
108
110
|
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
109
111
|
css: fullPageEditorWrapper,
|
|
110
|
-
className: "akEditor"
|
|
112
|
+
className: "akEditor",
|
|
113
|
+
ref: this.wrapperElementRef
|
|
111
114
|
}, jsx(FullPageToolbar, {
|
|
112
115
|
appearance: props.appearance,
|
|
113
116
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
@@ -146,7 +149,8 @@ export var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
146
149
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
147
150
|
providerFactory: props.providerFactory,
|
|
148
151
|
scrollContainer: this.scrollContainer,
|
|
149
|
-
scrollContainerRef: this.scrollContainerRef
|
|
152
|
+
scrollContainerRef: this.scrollContainerRef,
|
|
153
|
+
wrapperElement: this.wrapperElementRef.current
|
|
150
154
|
})));
|
|
151
155
|
}
|
|
152
156
|
}]);
|
|
@@ -51,7 +51,8 @@ var Content = /*#__PURE__*/React.memo(function (props) {
|
|
|
51
51
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
52
52
|
disabled: !!props.disabled,
|
|
53
53
|
containerElement: props.scrollContainer,
|
|
54
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
|
|
54
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
55
|
+
wrapperElement: props.wrapperElement
|
|
55
56
|
}), props.editorDOMElement)))), jsx("div", {
|
|
56
57
|
css: sidebarArea
|
|
57
58
|
}, props.contextPanel || jsx(ContextPanel, {
|