@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
|
@@ -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
|
}
|
|
@@ -2,10 +2,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
6
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4290
|
|
5
7
|
import { css } from '@emotion/react';
|
|
6
8
|
import { B75, B200 } from '@atlaskit/theme/colors';
|
|
7
|
-
export var searchMatchBgColour = B75;
|
|
8
|
-
export var selectedSearchMatchBgColour = B200;
|
|
9
9
|
export var searchMatchClass = 'search-match';
|
|
10
10
|
export var selectedSearchMatchClass = 'selected-search-match';
|
|
11
|
-
export var findReplaceStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n color: white;\n }\n"])), searchMatchClass,
|
|
11
|
+
export var findReplaceStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n color: white;\n }\n"])), searchMatchClass, B75, selectedSearchMatchClass, B200);
|
|
@@ -5,6 +5,7 @@ var _templateObject;
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { css } from '@emotion/react';
|
|
7
7
|
import { N60, N30A } from '@atlaskit/theme/colors';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
export var replaceSectionButtonStyles = css({
|
|
10
11
|
marginLeft: '4px'
|
|
@@ -12,7 +13,7 @@ export var replaceSectionButtonStyles = css({
|
|
|
12
13
|
export var ruleStyles = css({
|
|
13
14
|
width: '100%',
|
|
14
15
|
border: 'none',
|
|
15
|
-
backgroundColor: "".concat(N30A),
|
|
16
|
+
backgroundColor: "".concat(token('color.border', N30A)),
|
|
16
17
|
margin: '4px 0px',
|
|
17
18
|
height: '1px',
|
|
18
19
|
borderRadius: '1px'
|
|
@@ -26,7 +27,7 @@ export var wrapperStyles = css({
|
|
|
26
27
|
});
|
|
27
28
|
export var sectionWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n\n & > * {\n display: inline-flex;\n height: 32px;\n flex: 0 0 auto;\n }\n\n & > [data-ds--text-field--container] {\n display: flex;\n flex: 1 1 auto;\n }\n"])));
|
|
28
29
|
export var countStyles = css({
|
|
29
|
-
color: "".concat(N60),
|
|
30
|
+
color: "".concat(token('color.text.subtlest', N60)),
|
|
30
31
|
fontSize: "".concat(relativeFontSizeToBase16(12)),
|
|
31
32
|
flex: '0 0 auto',
|
|
32
33
|
justifyContent: 'center',
|
|
@@ -23,6 +23,7 @@ import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
|
23
23
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
24
|
import { injectIntl } from 'react-intl-next';
|
|
25
25
|
import messages from './messages';
|
|
26
|
+
import { token } from '@atlaskit/tokens';
|
|
26
27
|
export var menuItemDimensions = {
|
|
27
28
|
width: 175,
|
|
28
29
|
height: 32
|
|
@@ -111,7 +112,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
111
112
|
|
|
112
113
|
if (selected !== undefined) {
|
|
113
114
|
return selected ? jsx(EditorDoneIcon, {
|
|
114
|
-
primaryColor: B400,
|
|
115
|
+
primaryColor: token('color.icon.selected', B400),
|
|
115
116
|
size: "small",
|
|
116
117
|
label: intl.formatMessage(messages.confirmModalOK)
|
|
117
118
|
}) : jsx("span", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
export default function EditorEmojiAddIcon() {
|
|
3
4
|
return /*#__PURE__*/React.createElement("svg", {
|
|
4
5
|
width: 24,
|
|
@@ -9,7 +10,7 @@ export default function EditorEmojiAddIcon() {
|
|
|
9
10
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
10
11
|
width: 24,
|
|
11
12
|
height: 24,
|
|
12
|
-
fill:
|
|
13
|
+
fill: token('color.background.neutral.subtle', 'white'),
|
|
13
14
|
fillOpacity: "0.01"
|
|
14
15
|
}), /*#__PURE__*/React.createElement("path", {
|
|
15
16
|
fillRule: "evenodd",
|
|
@@ -5,7 +5,8 @@ var _templateObject;
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { N30 } from '@atlaskit/theme/colors';
|
|
8
|
-
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
9
|
+
var separator = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 20px;\n margin: 0 4px;\n align-self: center;\n"])), token('color.border', N30));
|
|
9
10
|
export default (function () {
|
|
10
11
|
return jsx("div", {
|
|
11
12
|
css: separator,
|
|
@@ -33,13 +33,14 @@ import { EmojiPickerButton } from './EmojiPickerButton';
|
|
|
33
33
|
import Announcer from '../../../utils/announcer/announcer';
|
|
34
34
|
import { injectIntl } from 'react-intl-next';
|
|
35
35
|
import messages from './messages';
|
|
36
|
+
import { token } from '@atlaskit/tokens';
|
|
36
37
|
var akGridSize = gridSize();
|
|
37
38
|
|
|
38
39
|
var toolbarContainer = function toolbarContainer(theme) {
|
|
39
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow:
|
|
40
|
-
light: 'white',
|
|
41
|
-
dark: DN70
|
|
42
|
-
})(theme), borderRadius(), akGridSize / 2, akGridSize);
|
|
40
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n padding: ", "px ", "px;\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div {\n align-items: center;\n }\n"])), themed({
|
|
41
|
+
light: token('elevation.surface.overlay', 'white'),
|
|
42
|
+
dark: token('elevation.surface.overlay', DN70)
|
|
43
|
+
})(theme), borderRadius(), token('elevation.shadow.overlay', "0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)"), akGridSize / 2, akGridSize);
|
|
43
44
|
};
|
|
44
45
|
|
|
45
46
|
var toolbarContainerLeftPadding = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-left: ", "px;\n"])), akGridSize / 2);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as colors from '@atlaskit/theme/colors';
|
|
2
2
|
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
var background = {
|
|
4
5
|
danger: {
|
|
5
6
|
default: {
|
|
@@ -7,28 +8,28 @@ var background = {
|
|
|
7
8
|
dark: 'inherit'
|
|
8
9
|
},
|
|
9
10
|
hover: {
|
|
10
|
-
light: colors.N30A,
|
|
11
|
-
dark: colors.N30A
|
|
11
|
+
light: token('color.background.neutral.subtle.hovered', colors.N30A),
|
|
12
|
+
dark: token('color.background.neutral.subtle.hovered', colors.N30A)
|
|
12
13
|
},
|
|
13
14
|
active: {
|
|
14
|
-
light: hexToRgba(colors.B75, 0.6),
|
|
15
|
-
dark: hexToRgba(colors.B75, 0.6)
|
|
15
|
+
light: token('color.background.neutral.pressed', "".concat(hexToRgba(colors.B75, 0.6))),
|
|
16
|
+
dark: token('color.background.neutral.pressed', "".concat(hexToRgba(colors.B75, 0.6)))
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
var color = {
|
|
20
21
|
danger: {
|
|
21
22
|
default: {
|
|
22
|
-
light: colors.N400,
|
|
23
|
-
dark: colors.DN400
|
|
23
|
+
light: token('color.icon', colors.N400),
|
|
24
|
+
dark: token('color.icon', colors.DN400)
|
|
24
25
|
},
|
|
25
26
|
hover: {
|
|
26
|
-
light: colors.R400,
|
|
27
|
-
dark: colors.R400
|
|
27
|
+
light: token('color.icon.danger', colors.R400),
|
|
28
|
+
dark: token('color.icon.danger', colors.R400)
|
|
28
29
|
},
|
|
29
30
|
active: {
|
|
30
|
-
light: colors.R400,
|
|
31
|
-
dark: colors.R400
|
|
31
|
+
light: token('color.icon.danger', colors.R400),
|
|
32
|
+
dark: token('color.icon.danger', colors.R400)
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
};
|
|
@@ -5,5 +5,6 @@ var _templateObject;
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { N30A, B200 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { akEditorGridLineZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
export var GRID_GUTTER = 12;
|
|
9
|
-
export var gridStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .gridParent {\n width: calc(100% + ", "px);\n margin-left: -", "px;\n margin-right: -", "px;\n transform: scale(1);\n z-index: ", ";\n }\n\n .gridContainer {\n position: fixed;\n height: 100vh;\n width: 100%;\n pointer-events: none;\n }\n\n .gridLine {\n border-left: 1px solid ", ";\n display: inline-block;\n box-sizing: border-box;\n height: 100%;\n margin-left: -1px;\n\n transition: border-color 0.15s linear;\n z-index: 0;\n }\n\n .highlight {\n border-left: 1px solid ", ";\n }\n"])), GRID_GUTTER * 2, GRID_GUTTER, GRID_GUTTER, akEditorGridLineZIndex, N30A, B200);
|
|
10
|
+
export var gridStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .gridParent {\n width: calc(100% + ", "px);\n margin-left: -", "px;\n margin-right: -", "px;\n transform: scale(1);\n z-index: ", ";\n }\n\n .gridContainer {\n position: fixed;\n height: 100vh;\n width: 100%;\n pointer-events: none;\n }\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4352\n .gridLine {\n border-left: 1px solid ", ";\n display: inline-block;\n box-sizing: border-box;\n height: 100%;\n margin-left: -1px;\n\n transition: border-color 0.15s linear;\n z-index: 0;\n }\n\n .highlight {\n border-left: 1px solid ", ";\n }\n"])), GRID_GUTTER * 2, GRID_GUTTER, GRID_GUTTER, akEditorGridLineZIndex, token('color.border', N30A), token('color.border.focused', B200));
|
|
@@ -6,15 +6,16 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
7
|
import * as colors from '@atlaskit/theme/colors';
|
|
8
8
|
import { akEditorUnitZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
|
|
10
|
-
export var
|
|
11
|
-
export var
|
|
12
|
-
export var
|
|
9
|
+
import { token } from '@atlaskit/tokens';
|
|
10
|
+
export var header = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n z-index: ", ";\n min-height: 24px;\n padding: 20px 40px;\n font-size: ", ";\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 'none';\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n"])), akEditorUnitZIndex, relativeFontSizeToBase16(24), token('color.text', colors.N400), token('color.background.neutral.subtle', colors.N0), borderRadius());
|
|
11
|
+
export var footer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n z-index: ", ";\n font-size: ", ";\n line-height: 20px;\n color: ", ";\n padding: 24px;\n text-align: right;\n box-shadow: 'none';\n"])), akEditorUnitZIndex, relativeFontSizeToBase16(14), token('color.text.subtlest', colors.N300));
|
|
12
|
+
export var contentWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 18px 20px;\n border-bottom-right-radius: ", "px;\n overflow: auto;\n position: relative;\n color: ", ";\n background-color: ", ";\n"])), borderRadius(), token('color.text.subtle', colors.N400), token('color.background.neutral.subtle', colors.N0));
|
|
13
|
+
export var line = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n background: ", ";\n content: '';\n display: block;\n height: 2px;\n left: 0;\n position: absolute;\n top: 0;\n right: 0;\n width: 100%;\n min-width: 604px;\n"])), token('color.background.neutral.subtle', '#fff'));
|
|
13
14
|
export var content = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n min-width: 524px;\n width: 100%;\n position: relative;\n display: flex;\n justify-content: space-between;\n"])));
|
|
14
15
|
export var columnLeft = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 44%;\n"])));
|
|
15
16
|
export var columnRight = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 44%;\n"])));
|
|
16
17
|
export var row = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: 20px 0;\n display: flex;\n justify-content: space-between;\n"])));
|
|
17
18
|
export var title = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-size: ", ";\n font-weight: 400;\n"])), relativeFontSizeToBase16(18));
|
|
18
|
-
export var codeSm = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: 24px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n text-align: center;\n"])), colors.N20, borderRadius());
|
|
19
|
-
export var codeMd = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n width: 50px;\n text-align: center;\n"])), colors.N20, borderRadius());
|
|
20
|
-
export var codeLg = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n padding: 0 10px;\n text-align: center;\n"])), colors.N20, borderRadius());
|
|
19
|
+
export var codeSm = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n width: 24px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n text-align: center;\n"])), token('color.background.neutral', colors.N20), borderRadius());
|
|
20
|
+
export var codeMd = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n width: 50px;\n text-align: center;\n"])), token('color.background.neutral', colors.N20), borderRadius());
|
|
21
|
+
export var codeLg = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n display: inline-block;\n height: 24px;\n line-height: 24px;\n padding: 0 10px;\n text-align: center;\n"])), token('color.background.neutral', colors.N20), borderRadius());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { createRule, createPlugin } from '../../../utils/input-rules';
|
|
3
|
-
import { LinkMatcher, normalizeUrl } from '../utils';
|
|
3
|
+
import { findFilepaths, isLinkInMatches, LinkMatcher, normalizeUrl } from '../utils';
|
|
4
4
|
import { INPUT_METHOD, addAnalytics } from '../../analytics';
|
|
5
5
|
import { getLinkCreationAnalyticsEvent } from '../analytics';
|
|
6
6
|
export function createLinkInputRule(regexp) {
|
|
@@ -18,7 +18,29 @@ export function createLinkInputRule(regexp) {
|
|
|
18
18
|
var url = normalizeUrl(link.url);
|
|
19
19
|
var markType = schema.mark('link', {
|
|
20
20
|
href: url
|
|
21
|
-
});
|
|
21
|
+
}); // Need access to complete text to check if last URL is part of a filepath before linkifying
|
|
22
|
+
|
|
23
|
+
var nodeBefore = state.selection.$from.nodeBefore;
|
|
24
|
+
|
|
25
|
+
if (!nodeBefore || !nodeBefore.isText || !nodeBefore.text) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var filepaths = findFilepaths(nodeBefore.text, // The position referenced by 'start' is relative to the start of the document, findFilepaths deals with index in a node only.
|
|
30
|
+
start - (nodeBefore.text.length - link.text.length) // (start of link match) - (whole node text length - link length) gets start of text node, which is used as offset
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
if (isLinkInMatches(start, filepaths)) {
|
|
34
|
+
var _tr = state.tr;
|
|
35
|
+
|
|
36
|
+
if (useUnpredictableInputRule) {
|
|
37
|
+
_tr.insertText(' ');
|
|
38
|
+
} // To keep consistent with original behaviour.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
return _tr;
|
|
42
|
+
}
|
|
43
|
+
|
|
22
44
|
var from = start;
|
|
23
45
|
var to = Math.min(start + link.text.length, state.doc.content.size);
|
|
24
46
|
var tr = state.tr.addMark(from, to, markType); // Keep old behavior that will delete the space after the link
|
|
@@ -5,6 +5,7 @@ import { stateKey } from '../pm-plugins/main';
|
|
|
5
5
|
import { showLinkToolbar, hideLinkToolbar } from '../commands';
|
|
6
6
|
import { INPUT_METHOD, addAnalytics } from '../../analytics';
|
|
7
7
|
import { getLinkCreationAnalyticsEvent } from '../analytics';
|
|
8
|
+
import { findFilepaths, isLinkInMatches } from '../utils';
|
|
8
9
|
export function createKeymapPlugin() {
|
|
9
10
|
var skipAnalytics = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
10
11
|
var list = {};
|
|
@@ -33,7 +34,7 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
|
|
|
33
34
|
return function (state, dispatch) {
|
|
34
35
|
var nodeBefore = state.selection.$from.nodeBefore;
|
|
35
36
|
|
|
36
|
-
if (!nodeBefore || !nodeBefore.isText) {
|
|
37
|
+
if (!nodeBefore || !nodeBefore.isText || !nodeBefore.text) {
|
|
37
38
|
return false;
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -54,6 +55,13 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
|
|
|
54
55
|
var markType = state.schema.mark('link', {
|
|
55
56
|
href: url
|
|
56
57
|
});
|
|
58
|
+
var filepaths = findFilepaths(nodeBefore.text, start - (nodeBefore.text.length - hyperlinkedText.length) // The position referenced by 'start' is relative to the start of the document, findFilepaths deals with index in a node only.
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
if (isLinkInMatches(start, filepaths)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
57
65
|
var tr = state.tr.addMark(start, end, markType);
|
|
58
66
|
|
|
59
67
|
if (dispatch) {
|
|
@@ -25,6 +25,7 @@ import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
|
25
25
|
import EditorAlignLeftIcon from '@atlaskit/icon/glyph/editor/align-left';
|
|
26
26
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
27
27
|
import { N90, N80, N30 } from '@atlaskit/theme/colors';
|
|
28
|
+
import { token } from '@atlaskit/tokens';
|
|
28
29
|
import Page16Icon from '@atlaskit/icon-object/glyph/page/16';
|
|
29
30
|
import Tooltip from '@atlaskit/tooltip';
|
|
30
31
|
import { PureComponent } from 'react';
|
|
@@ -46,9 +47,9 @@ import { browser } from '@atlaskit/editor-common/utils';
|
|
|
46
47
|
import { transformTimeStamp } from '../../../../ui/LinkSearch/transformTimeStamp';
|
|
47
48
|
import Announcer from '../../../../utils/announcer/announcer';
|
|
48
49
|
export var RECENT_SEARCH_LIST_SIZE = 5;
|
|
49
|
-
var clearText = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n padding: 0;\n margin-right: 8px;\n color: ", ";\n background: transparent;\n border: none;\n"])), N90);
|
|
50
|
-
var textInputWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n"])), inputWrapper, N30, N30);
|
|
51
|
-
var iconWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n padding: 4px 8px;\n width: 18px;\n"])), N80);
|
|
50
|
+
var clearText = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n padding: 0;\n margin-right: 8px;\n color: ", ";\n background: transparent;\n border: none;\n"])), token('color.icon.subtle', N90));
|
|
51
|
+
var textInputWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n"])), inputWrapper, token('color.border', N30), token('color.border', N30));
|
|
52
|
+
var iconWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n padding: 4px 8px;\n width: 18px;\n"])), token('color.icon.subtle', N80));
|
|
52
53
|
export var messages = defineMessages({
|
|
53
54
|
displayText: {
|
|
54
55
|
id: 'fabric.editor.displayText',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import { mapSlice } from '../../utils/slice';
|
|
4
|
-
import { isSafeUrl, linkify, normalizeUrl as normaliseLinkHref } from '@atlaskit/adf-schema';
|
|
4
|
+
import { isSafeUrl, linkify, normalizeUrl as normaliseLinkHref } from '@atlaskit/adf-schema'; // Regular expression for a windows filepath in the format <DRIVE LETTER>:\<folder name>\
|
|
5
|
+
|
|
6
|
+
export var FILEPATH_REGEXP = /([a-zA-Z]:|\\)([^\/:*?<>"|]+\\)?([^\/:*?<>"| ]+(?=\s?))?/gim;
|
|
5
7
|
/**
|
|
6
8
|
* Instance of class LinkMatcher are used in autoformatting in place of Regex.
|
|
7
9
|
* Hence it has been made similar to regex with an exec method.
|
|
@@ -95,7 +97,12 @@ export function linkifyContent(schema) {
|
|
|
95
97
|
var text = node.text;
|
|
96
98
|
var matches = findLinkMatches(text);
|
|
97
99
|
var pos = 0;
|
|
100
|
+
var filepaths = findFilepaths(text);
|
|
98
101
|
matches.forEach(function (match) {
|
|
102
|
+
if (isLinkInMatches(match.start, filepaths)) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
if (match.start > 0) {
|
|
100
107
|
linkified.push(node.cut(pos, match.start));
|
|
101
108
|
}
|
|
@@ -150,4 +157,39 @@ function findLinkMatches(text) {
|
|
|
150
157
|
}
|
|
151
158
|
|
|
152
159
|
return matches;
|
|
153
|
-
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export var findFilepaths = function findFilepaths(text) {
|
|
163
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
164
|
+
// Creation of a copy of the RegExp is necessary as lastIndex is stored on it when we run .exec()
|
|
165
|
+
var localRegExp = new RegExp(FILEPATH_REGEXP);
|
|
166
|
+
var match;
|
|
167
|
+
var matchesList = [];
|
|
168
|
+
var maxFilepathSize = 260;
|
|
169
|
+
|
|
170
|
+
while ((match = localRegExp.exec(text)) !== null) {
|
|
171
|
+
var start = match.index + offset;
|
|
172
|
+
var end = localRegExp.lastIndex + offset;
|
|
173
|
+
|
|
174
|
+
if (end - start > maxFilepathSize) {
|
|
175
|
+
end = start + maxFilepathSize;
|
|
176
|
+
} // We don't care about big strings of text that are pretending to be filepaths!!
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
matchesList.push({
|
|
180
|
+
startIndex: start,
|
|
181
|
+
endIndex: end
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return matchesList;
|
|
186
|
+
};
|
|
187
|
+
export var isLinkInMatches = function isLinkInMatches(linkStart, matchesList) {
|
|
188
|
+
for (var i = 0; i < matchesList.length; i++) {
|
|
189
|
+
if (linkStart >= matchesList[i].startIndex && linkStart < matchesList[i].endIndex) {
|
|
190
|
+
return true;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return false;
|
|
195
|
+
};
|