@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
|
@@ -61,6 +61,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
61
61
|
|
|
62
62
|
var _messages = _interopRequireDefault(require("./messages"));
|
|
63
63
|
|
|
64
|
+
var _tokens = require("@atlaskit/tokens");
|
|
65
|
+
|
|
64
66
|
var _templateObject, _templateObject2;
|
|
65
67
|
|
|
66
68
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -74,10 +76,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
74
76
|
var akGridSize = (0, _constants.gridSize)();
|
|
75
77
|
|
|
76
78
|
var toolbarContainer = function toolbarContainer(theme) {
|
|
77
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow:
|
|
78
|
-
light: 'white',
|
|
79
|
-
dark: _colors.DN70
|
|
80
|
-
})(theme), (0, _constants.borderRadius)(), akGridSize / 2, akGridSize);
|
|
79
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _components.themed)({
|
|
80
|
+
light: (0, _tokens.token)('elevation.surface.overlay', 'white'),
|
|
81
|
+
dark: (0, _tokens.token)('elevation.surface.overlay', _colors.DN70)
|
|
82
|
+
})(theme), (0, _constants.borderRadius)(), (0, _tokens.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);
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
var toolbarContainerLeftPadding = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: ", "px;\n"])), akGridSize / 2);
|
|
@@ -11,6 +11,8 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
11
11
|
|
|
12
12
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
13
13
|
|
|
14
|
+
var _tokens = require("@atlaskit/tokens");
|
|
15
|
+
|
|
14
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
17
|
|
|
16
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -22,28 +24,28 @@ var background = {
|
|
|
22
24
|
dark: 'inherit'
|
|
23
25
|
},
|
|
24
26
|
hover: {
|
|
25
|
-
light: colors.N30A,
|
|
26
|
-
dark: colors.N30A
|
|
27
|
+
light: (0, _tokens.token)('color.background.neutral.subtle.hovered', colors.N30A),
|
|
28
|
+
dark: (0, _tokens.token)('color.background.neutral.subtle.hovered', colors.N30A)
|
|
27
29
|
},
|
|
28
30
|
active: {
|
|
29
|
-
light: (0, _adfSchema.hexToRgba)(colors.B75, 0.6),
|
|
30
|
-
dark: (0, _adfSchema.hexToRgba)(colors.B75, 0.6)
|
|
31
|
+
light: (0, _tokens.token)('color.background.neutral.pressed', "".concat((0, _adfSchema.hexToRgba)(colors.B75, 0.6))),
|
|
32
|
+
dark: (0, _tokens.token)('color.background.neutral.pressed', "".concat((0, _adfSchema.hexToRgba)(colors.B75, 0.6)))
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
36
|
var color = {
|
|
35
37
|
danger: {
|
|
36
38
|
default: {
|
|
37
|
-
light: colors.N400,
|
|
38
|
-
dark: colors.DN400
|
|
39
|
+
light: (0, _tokens.token)('color.icon', colors.N400),
|
|
40
|
+
dark: (0, _tokens.token)('color.icon', colors.DN400)
|
|
39
41
|
},
|
|
40
42
|
hover: {
|
|
41
|
-
light: colors.R400,
|
|
42
|
-
dark: colors.R400
|
|
43
|
+
light: (0, _tokens.token)('color.icon.danger', colors.R400),
|
|
44
|
+
dark: (0, _tokens.token)('color.icon.danger', colors.R400)
|
|
43
45
|
},
|
|
44
46
|
active: {
|
|
45
|
-
light: colors.R400,
|
|
46
|
-
dark: colors.R400
|
|
47
|
+
light: (0, _tokens.token)('color.icon.danger', colors.R400),
|
|
48
|
+
dark: (0, _tokens.token)('color.icon.danger', colors.R400)
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
};
|
|
@@ -15,9 +15,11 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _templateObject;
|
|
19
21
|
|
|
20
22
|
var GRID_GUTTER = 12;
|
|
21
23
|
exports.GRID_GUTTER = GRID_GUTTER;
|
|
22
|
-
var gridStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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, _editorSharedStyles.akEditorGridLineZIndex, _colors.N30A, _colors.B200);
|
|
24
|
+
var gridStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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, _editorSharedStyles.akEditorGridLineZIndex, (0, _tokens.token)('color.border', _colors.N30A), (0, _tokens.token)('color.border.focused', _colors.B200));
|
|
23
25
|
exports.gridStyles = gridStyles;
|
|
@@ -19,19 +19,21 @@ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
|
19
19
|
|
|
20
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
21
|
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
23
|
+
|
|
22
24
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
23
25
|
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
27
|
|
|
26
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
29
|
|
|
28
|
-
var header = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(24), colors.N400, colors.N0, (0, _constants.borderRadius)());
|
|
30
|
+
var header = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(24), (0, _tokens.token)('color.text', colors.N400), (0, _tokens.token)('color.background.neutral.subtle', colors.N0), (0, _constants.borderRadius)());
|
|
29
31
|
exports.header = header;
|
|
30
|
-
var footer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n font-size: ", ";\n line-height: 20px;\n color: ", ";\n padding: 24px;\n text-align: right;\n box-shadow: 'none';\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), colors.N300);
|
|
32
|
+
var footer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n z-index: ", ";\n font-size: ", ";\n line-height: 20px;\n color: ", ";\n padding: 24px;\n text-align: right;\n box-shadow: 'none';\n"])), _editorSharedStyles.akEditorUnitZIndex, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), (0, _tokens.token)('color.text.subtlest', colors.N300));
|
|
31
33
|
exports.footer = footer;
|
|
32
|
-
var contentWrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 18px 20px;\n border-bottom-right-radius: ", "px;\n overflow: auto;\n position: relative;\n color: ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), colors.N400, colors.N0);
|
|
34
|
+
var contentWrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n padding: 18px 20px;\n border-bottom-right-radius: ", "px;\n overflow: auto;\n position: relative;\n color: ", ";\n background-color: ", ";\n"])), (0, _constants.borderRadius)(), (0, _tokens.token)('color.text.subtle', colors.N400), (0, _tokens.token)('color.background.neutral.subtle', colors.N0));
|
|
33
35
|
exports.contentWrapper = contentWrapper;
|
|
34
|
-
var line = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n background:
|
|
36
|
+
var line = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _tokens.token)('color.background.neutral.subtle', '#fff'));
|
|
35
37
|
exports.line = line;
|
|
36
38
|
var content = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n min-width: 524px;\n width: 100%;\n position: relative;\n display: flex;\n justify-content: space-between;\n"])));
|
|
37
39
|
exports.content = content;
|
|
@@ -43,9 +45,9 @@ var row = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTem
|
|
|
43
45
|
exports.row = row;
|
|
44
46
|
var title = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", ";\n font-weight: 400;\n"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(18));
|
|
45
47
|
exports.title = title;
|
|
46
|
-
var codeSm = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\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, (0, _constants.borderRadius)());
|
|
48
|
+
var codeSm = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _tokens.token)('color.background.neutral', colors.N20), (0, _constants.borderRadius)());
|
|
47
49
|
exports.codeSm = codeSm;
|
|
48
|
-
var codeMd = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\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, (0, _constants.borderRadius)());
|
|
50
|
+
var codeMd = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _tokens.token)('color.background.neutral', colors.N20), (0, _constants.borderRadius)());
|
|
49
51
|
exports.codeMd = codeMd;
|
|
50
|
-
var codeLg = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\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, (0, _constants.borderRadius)());
|
|
52
|
+
var codeLg = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _tokens.token)('color.background.neutral', colors.N20), (0, _constants.borderRadius)());
|
|
51
53
|
exports.codeLg = codeLg;
|
|
@@ -34,7 +34,29 @@ function createLinkInputRule(regexp) {
|
|
|
34
34
|
var url = (0, _utils.normalizeUrl)(link.url);
|
|
35
35
|
var markType = schema.mark('link', {
|
|
36
36
|
href: url
|
|
37
|
-
});
|
|
37
|
+
}); // Need access to complete text to check if last URL is part of a filepath before linkifying
|
|
38
|
+
|
|
39
|
+
var nodeBefore = state.selection.$from.nodeBefore;
|
|
40
|
+
|
|
41
|
+
if (!nodeBefore || !nodeBefore.isText || !nodeBefore.text) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var filepaths = (0, _utils.findFilepaths)(nodeBefore.text, // The position referenced by 'start' is relative to the start of the document, findFilepaths deals with index in a node only.
|
|
46
|
+
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
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
if ((0, _utils.isLinkInMatches)(start, filepaths)) {
|
|
50
|
+
var _tr = state.tr;
|
|
51
|
+
|
|
52
|
+
if (useUnpredictableInputRule) {
|
|
53
|
+
_tr.insertText(' ');
|
|
54
|
+
} // To keep consistent with original behaviour.
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
return _tr;
|
|
58
|
+
}
|
|
59
|
+
|
|
38
60
|
var from = start;
|
|
39
61
|
var to = Math.min(start + link.text.length, state.doc.content.size);
|
|
40
62
|
var tr = state.tr.addMark(from, to, markType); // Keep old behavior that will delete the space after the link
|
|
@@ -22,6 +22,8 @@ var _analytics = require("../../analytics");
|
|
|
22
22
|
|
|
23
23
|
var _analytics2 = require("../analytics");
|
|
24
24
|
|
|
25
|
+
var _utils = require("../utils");
|
|
26
|
+
|
|
25
27
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
28
|
|
|
27
29
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -54,7 +56,7 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
|
|
|
54
56
|
return function (state, dispatch) {
|
|
55
57
|
var nodeBefore = state.selection.$from.nodeBefore;
|
|
56
58
|
|
|
57
|
-
if (!nodeBefore || !nodeBefore.isText) {
|
|
59
|
+
if (!nodeBefore || !nodeBefore.isText || !nodeBefore.text) {
|
|
58
60
|
return false;
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -75,6 +77,13 @@ var mayConvertLastWordToHyperlink = function mayConvertLastWordToHyperlink(skipA
|
|
|
75
77
|
var markType = state.schema.mark('link', {
|
|
76
78
|
href: url
|
|
77
79
|
});
|
|
80
|
+
var filepaths = (0, _utils.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.
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
if ((0, _utils.isLinkInMatches)(start, filepaths)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
|
|
78
87
|
var tr = state.tr.addMark(start, end, markType);
|
|
79
88
|
|
|
80
89
|
if (dispatch) {
|
|
@@ -47,6 +47,8 @@ var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
|
|
|
47
47
|
|
|
48
48
|
var _colors = require("@atlaskit/theme/colors");
|
|
49
49
|
|
|
50
|
+
var _tokens = require("@atlaskit/tokens");
|
|
51
|
+
|
|
50
52
|
var _ = _interopRequireDefault(require("@atlaskit/icon-object/glyph/page/16"));
|
|
51
53
|
|
|
52
54
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -97,9 +99,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
97
99
|
|
|
98
100
|
var RECENT_SEARCH_LIST_SIZE = 5;
|
|
99
101
|
exports.RECENT_SEARCH_LIST_SIZE = RECENT_SEARCH_LIST_SIZE;
|
|
100
|
-
var clearText = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n padding: 0;\n margin-right: 8px;\n color: ", ";\n background: transparent;\n border: none;\n"])), _colors.N90);
|
|
101
|
-
var textInputWrapper = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n"])), _ToolbarComponents.inputWrapper, _colors.N30, _colors.N30);
|
|
102
|
-
var iconWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n padding: 4px 8px;\n width: 18px;\n"])), _colors.N80);
|
|
102
|
+
var clearText = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n padding: 0;\n margin-right: 8px;\n color: ", ";\n background: transparent;\n border: none;\n"])), (0, _tokens.token)('color.icon.subtle', _colors.N90));
|
|
103
|
+
var textInputWrapper = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n"])), _ToolbarComponents.inputWrapper, (0, _tokens.token)('color.border', _colors.N30), (0, _tokens.token)('color.border', _colors.N30));
|
|
104
|
+
var iconWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n padding: 4px 8px;\n width: 18px;\n"])), (0, _tokens.token)('color.icon.subtle', _colors.N80));
|
|
103
105
|
var messages = (0, _reactIntlNext.defineMessages)({
|
|
104
106
|
displayText: {
|
|
105
107
|
id: 'fabric.editor.displayText',
|
|
@@ -5,9 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.LinkMatcher = void 0;
|
|
8
|
+
exports.findFilepaths = exports.LinkMatcher = exports.FILEPATH_REGEXP = void 0;
|
|
9
9
|
exports.getLinkDomain = getLinkDomain;
|
|
10
10
|
exports.isFromCurrentDomain = isFromCurrentDomain;
|
|
11
|
+
exports.isLinkInMatches = void 0;
|
|
11
12
|
exports.linkifyContent = linkifyContent;
|
|
12
13
|
exports.normalizeUrl = normalizeUrl;
|
|
13
14
|
|
|
@@ -19,11 +20,16 @@ var _slice = require("../../utils/slice");
|
|
|
19
20
|
|
|
20
21
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
21
22
|
|
|
23
|
+
// Regular expression for a windows filepath in the format <DRIVE LETTER>:\<folder name>\
|
|
24
|
+
var FILEPATH_REGEXP = /([a-zA-Z]:|\\)([^\/:*?<>"|]+\\)?([^\/:*?<>"| ]+(?=\s?))?/gim;
|
|
22
25
|
/**
|
|
23
26
|
* Instance of class LinkMatcher are used in autoformatting in place of Regex.
|
|
24
27
|
* Hence it has been made similar to regex with an exec method.
|
|
25
28
|
* Extending it directly from class Regex was introducing some issues, thus that has been avoided.
|
|
26
29
|
*/
|
|
30
|
+
|
|
31
|
+
exports.FILEPATH_REGEXP = FILEPATH_REGEXP;
|
|
32
|
+
|
|
27
33
|
var LinkMatcher = /*#__PURE__*/function () {
|
|
28
34
|
function LinkMatcher() {
|
|
29
35
|
(0, _classCallCheck2.default)(this, LinkMatcher);
|
|
@@ -113,7 +119,12 @@ function linkifyContent(schema) {
|
|
|
113
119
|
var text = node.text;
|
|
114
120
|
var matches = findLinkMatches(text);
|
|
115
121
|
var pos = 0;
|
|
122
|
+
var filepaths = findFilepaths(text);
|
|
116
123
|
matches.forEach(function (match) {
|
|
124
|
+
if (isLinkInMatches(match.start, filepaths)) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
117
128
|
if (match.start > 0) {
|
|
118
129
|
linkified.push(node.cut(pos, match.start));
|
|
119
130
|
}
|
|
@@ -171,4 +182,44 @@ function findLinkMatches(text) {
|
|
|
171
182
|
}
|
|
172
183
|
|
|
173
184
|
return matches;
|
|
174
|
-
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
var findFilepaths = function findFilepaths(text) {
|
|
188
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
189
|
+
// Creation of a copy of the RegExp is necessary as lastIndex is stored on it when we run .exec()
|
|
190
|
+
var localRegExp = new RegExp(FILEPATH_REGEXP);
|
|
191
|
+
var match;
|
|
192
|
+
var matchesList = [];
|
|
193
|
+
var maxFilepathSize = 260;
|
|
194
|
+
|
|
195
|
+
while ((match = localRegExp.exec(text)) !== null) {
|
|
196
|
+
var start = match.index + offset;
|
|
197
|
+
var end = localRegExp.lastIndex + offset;
|
|
198
|
+
|
|
199
|
+
if (end - start > maxFilepathSize) {
|
|
200
|
+
end = start + maxFilepathSize;
|
|
201
|
+
} // We don't care about big strings of text that are pretending to be filepaths!!
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
matchesList.push({
|
|
205
|
+
startIndex: start,
|
|
206
|
+
endIndex: end
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return matchesList;
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
exports.findFilepaths = findFilepaths;
|
|
214
|
+
|
|
215
|
+
var isLinkInMatches = function isLinkInMatches(linkStart, matchesList) {
|
|
216
|
+
for (var i = 0; i < matchesList.length; i++) {
|
|
217
|
+
if (linkStart >= matchesList[i].startIndex && linkStart < matchesList[i].endIndex) {
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
return false;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
exports.isLinkInMatches = isLinkInMatches;
|
|
@@ -124,7 +124,7 @@ var insertBlockPlugin = function insertBlockPlugin() {
|
|
|
124
124
|
isDisabled: disabled,
|
|
125
125
|
isTypeAheadAllowed: (0, _utils.isTypeAheadAllowed)(editorView.state),
|
|
126
126
|
editorView: editorView,
|
|
127
|
-
tableSupported:
|
|
127
|
+
tableSupported: !!editorView.state.schema.nodes.table,
|
|
128
128
|
actionSupported: !!editorView.state.schema.nodes.taskItem,
|
|
129
129
|
mentionsSupported: !!(mentionState && mentionState.mentionProvider),
|
|
130
130
|
decisionSupported: !!editorView.state.schema.nodes.decisionItem,
|
|
@@ -19,10 +19,12 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
19
19
|
|
|
20
20
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
21
|
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
23
|
+
|
|
22
24
|
var _templateObject, _templateObject2, _templateObject3;
|
|
23
25
|
|
|
24
|
-
var wrapperNode = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 4px;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n .ProseMirror-selectednode & {\n background: ", ";\n outline: none;\n }\n"])), _colors.N30, _colors.N50, (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(13), _colors.N50);
|
|
25
|
-
var jiraChildNode = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n color:
|
|
26
|
+
var wrapperNode = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n background: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 4px;\n user-select: none;\n vertical-align: middle;\n white-space: nowrap;\n\n .ProseMirror-selectednode & {\n background: ", ";\n outline: none;\n }\n"])), (0, _tokens.token)('color.background.neutral', _colors.N30), (0, _tokens.token)('color.border', _colors.N50), (0, _constants.borderRadius)(), (0, _editorSharedStyles.relativeFontSizeToBase16)(13), (0, _tokens.token)('color.background.selected', _colors.N50));
|
|
27
|
+
var jiraChildNode = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n color: ", ";\n line-height: 24px;\n vertical-align: top;\n\n &::before {\n color: ", ";\n content: 'JIRA | ';\n }\n"])), (0, _tokens.token)('color.text.subtlest', '#707070'), (0, _tokens.token)('color.text', 'black'));
|
|
26
28
|
var svgChildNode = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n\n & > div {\n height: 24px;\n width: 24px;\n }\n"])));
|
|
27
29
|
|
|
28
30
|
function JIRAIssueNode(props) {
|
|
@@ -31,5 +31,5 @@ var LAYOUT_SECTION_MARGIN = (0, _constants.gridSize)();
|
|
|
31
31
|
exports.LAYOUT_SECTION_MARGIN = LAYOUT_SECTION_MARGIN;
|
|
32
32
|
var LAYOUT_COLUMN_PADDING = (0, _constants.gridSize)() * 1.5;
|
|
33
33
|
exports.LAYOUT_COLUMN_PADDING = LAYOUT_COLUMN_PADDING;
|
|
34
|
-
var layoutStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid
|
|
34
|
+
var layoutStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " [data-layout-section] {\n margin: ", "px -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4353\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > *:first-child {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursord:first-of-type + span + * {\n margin-top: 0;\n }\n\n .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4441\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border-color: ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), _styles.columnLayoutSharedStyle, (0, _constants.gridSize)() - 1, _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorSelectedBorderSize, (0, _tokens.token)('color.border', _colors.N40A), LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN, _editorSharedStyles.gridMediumMaxWidth, (0, _tokens.token)('color.border', _colors.N50A), (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground), (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Border, _editorSharedStyles.SelectionStyle.Blanket]), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode);
|
|
35
35
|
exports.layoutStyles = layoutStyles;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.updateMediaNodeAttrs = exports.updateAllMediaNodesAttrs = exports.replaceExternalMedia = exports.isMobileUploadCompleted = exports.findMediaSingleNode = exports.findMediaNode = exports.findMediaInlineNode = exports.findAllMediaSingleNodes = void 0;
|
|
8
|
+
exports.updateMediaNodeAttrs = exports.updateAllMediaNodesAttrs = exports.replaceExternalMedia = exports.isMobileUploadCompleted = exports.isMediaNode = exports.findMediaSingleNode = exports.findMediaNode = exports.findMediaInlineNode = exports.findAllMediaSingleNodes = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -86,6 +86,13 @@ var isMobileUploadCompleted = function isMobileUploadCompleted(mediaPluginState,
|
|
|
86
86
|
|
|
87
87
|
exports.isMobileUploadCompleted = isMobileUploadCompleted;
|
|
88
88
|
|
|
89
|
+
var isMediaNode = function isMediaNode(pos, state) {
|
|
90
|
+
var node = state.doc.nodeAt(pos);
|
|
91
|
+
return node && ['media', 'mediaInline'].includes(node.type.name);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
exports.isMediaNode = isMediaNode;
|
|
95
|
+
|
|
89
96
|
var updateAllMediaNodesAttrs = function updateAllMediaNodesAttrs(id, attrs, isMediaSingle) {
|
|
90
97
|
return function (state, dispatch) {
|
|
91
98
|
var mediaPluginState = _pluginKey.stateKey.getState(state);
|
|
@@ -99,16 +106,11 @@ var updateAllMediaNodesAttrs = function updateAllMediaNodesAttrs(id, attrs, isMe
|
|
|
99
106
|
mediaNodes = mediaGroupNode ? [mediaGroupNode] : [];
|
|
100
107
|
}
|
|
101
108
|
|
|
102
|
-
var isMediaNode = function isMediaNode(pos) {
|
|
103
|
-
var node = state.doc.nodeAt(pos);
|
|
104
|
-
return node && node.type.name === 'media';
|
|
105
|
-
};
|
|
106
|
-
|
|
107
109
|
var validMediaNodePositions = mediaNodes.reduce(function (acc, _ref) {
|
|
108
110
|
var getPos = _ref.getPos;
|
|
109
111
|
var pos = getPos();
|
|
110
112
|
|
|
111
|
-
if (typeof pos === 'number' && !isMediaNode(pos)) {
|
|
113
|
+
if (typeof pos === 'number' && !isMediaNode(pos, state)) {
|
|
112
114
|
return acc;
|
|
113
115
|
}
|
|
114
116
|
|
|
@@ -148,9 +150,8 @@ var updateMediaNodeAttrs = function updateMediaNodeAttrs(id, attrs, isMediaSingl
|
|
|
148
150
|
|
|
149
151
|
var tr = state.tr;
|
|
150
152
|
var pos = mediaNodeWithPos.getPos();
|
|
151
|
-
var node = tr.doc.nodeAt(pos);
|
|
152
153
|
|
|
153
|
-
if (!
|
|
154
|
+
if (!isMediaNode(pos, state)) {
|
|
154
155
|
return false;
|
|
155
156
|
}
|
|
156
157
|
|
|
@@ -45,6 +45,8 @@ var _pluginKey = require("../pm-plugins/plugin-key");
|
|
|
45
45
|
|
|
46
46
|
var _mediaNodeUpdater = require("./mediaNodeUpdater");
|
|
47
47
|
|
|
48
|
+
var _mediaUi = require("@atlaskit/media-ui");
|
|
49
|
+
|
|
48
50
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
49
51
|
|
|
50
52
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -58,11 +60,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
58
60
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
59
61
|
|
|
60
62
|
var createMediaNodeUpdater = function createMediaNodeUpdater(props) {
|
|
61
|
-
var node = props.node
|
|
63
|
+
var node = props.node;
|
|
62
64
|
return new _mediaNodeUpdater.MediaNodeUpdater(_objectSpread(_objectSpread({}, props), {}, {
|
|
63
65
|
isMediaSingle: true,
|
|
64
66
|
node: node ? node : props.node,
|
|
65
|
-
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent
|
|
67
|
+
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
68
|
+
contextIdentifierProvider: props.contextIdentifierProvider
|
|
66
69
|
}));
|
|
67
70
|
};
|
|
68
71
|
/**
|
|
@@ -132,6 +135,10 @@ var updateMediaNodeAttributes = /*#__PURE__*/function () {
|
|
|
132
135
|
return _context.abrupt("return");
|
|
133
136
|
|
|
134
137
|
case 23:
|
|
138
|
+
_context.next = 25;
|
|
139
|
+
return mediaNodeUpdater.updateFileAttrs();
|
|
140
|
+
|
|
141
|
+
case 25:
|
|
135
142
|
case "end":
|
|
136
143
|
return _context.stop();
|
|
137
144
|
}
|
|
@@ -158,7 +165,7 @@ var handleNewNode = function handleNewNode(props) {
|
|
|
158
165
|
exports.handleNewNode = handleNewNode;
|
|
159
166
|
|
|
160
167
|
var MediaInline = function MediaInline(props) {
|
|
161
|
-
var _useState = (0, _react.useState)(
|
|
168
|
+
var _useState = (0, _react.useState)(),
|
|
162
169
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
163
170
|
viewMediaClientConfig = _useState2[0],
|
|
164
171
|
setViewMediaClientConfig = _useState2[1];
|
|
@@ -213,6 +220,18 @@ var MediaInline = function MediaInline(props) {
|
|
|
213
220
|
mediaItemType: 'file',
|
|
214
221
|
collectionName: collection
|
|
215
222
|
};
|
|
223
|
+
/*
|
|
224
|
+
* Only show the loading view if the media provider is not ready
|
|
225
|
+
* prevents calling the media API before the provider is ready
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
if (!viewMediaClientConfig) {
|
|
229
|
+
return /*#__PURE__*/_react.default.createElement(_mediaUi.MediaInlineCardLoadingView, {
|
|
230
|
+
message: "",
|
|
231
|
+
isSelected: false
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
216
235
|
return /*#__PURE__*/_react.default.createElement(_mediaCard.MediaInlineCard, {
|
|
217
236
|
isSelected: props.isSelected,
|
|
218
237
|
identifier: identifier,
|
|
@@ -237,13 +256,13 @@ var MediaInlineNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
237
256
|
value: function createDomRef() {
|
|
238
257
|
var domRef = document.createElement('span');
|
|
239
258
|
domRef.contentEditable = 'false';
|
|
240
|
-
domRef.classList.add(_styles.MediaInlineNodeSelector);
|
|
241
259
|
return domRef;
|
|
242
260
|
}
|
|
243
261
|
}, {
|
|
244
262
|
key: "getContentDOM",
|
|
245
263
|
value: function getContentDOM() {
|
|
246
264
|
var dom = document.createElement('span');
|
|
265
|
+
dom.classList.add(_styles.MediaInlineNodeSelector);
|
|
247
266
|
return {
|
|
248
267
|
dom: dom
|
|
249
268
|
};
|
|
@@ -119,6 +119,11 @@ var MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
119
119
|
(0, _utils2.setNodeSelection)(_this.props.view, propPos - 1);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onFullscreenChange", function (fullscreen) {
|
|
123
|
+
_this.mediaPluginState.updateAndDispatch({
|
|
124
|
+
isFullscreen: fullscreen
|
|
125
|
+
});
|
|
126
|
+
});
|
|
122
127
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleNewNode", function (props) {
|
|
123
128
|
var node = props.node;
|
|
124
129
|
|
|
@@ -256,6 +261,7 @@ var MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
256
261
|
selectable: true,
|
|
257
262
|
selected: selected,
|
|
258
263
|
disableOverlay: true,
|
|
264
|
+
onFullscreenChange: this.onFullscreenChange,
|
|
259
265
|
onClick: this.selectMediaSingleFromCard,
|
|
260
266
|
useInlinePlayer: mediaOptions && mediaOptions.allowLazyLoading,
|
|
261
267
|
isLazy: mediaOptions && mediaOptions.allowLazyLoading,
|
|
@@ -57,6 +57,8 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
57
57
|
|
|
58
58
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
59
59
|
|
|
60
|
+
var _tokens = require("@atlaskit/tokens");
|
|
61
|
+
|
|
60
62
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
61
63
|
|
|
62
64
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -72,12 +74,12 @@ exports.CONTAINER_WIDTH_IN_PX = CONTAINER_WIDTH_IN_PX;
|
|
|
72
74
|
var MAX_ALT_TEXT_LENGTH = 510; // double tweet length
|
|
73
75
|
|
|
74
76
|
exports.MAX_ALT_TEXT_LENGTH = MAX_ALT_TEXT_LENGTH;
|
|
75
|
-
var supportText = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", ";\n padding: 12px 40px;\n line-height: 20px;\n border-top: 1px solid ", ";\n margin: 0;\n"])), _colors.N100, (0, _editorSharedStyles.relativeFontSizeToBase16)(12), _colors.N30);
|
|
77
|
+
var supportText = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: ", ";\n padding: 12px 40px;\n line-height: 20px;\n border-top: 1px solid ", ";\n margin: 0;\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N100), (0, _editorSharedStyles.relativeFontSizeToBase16)(12), (0, _tokens.token)('color.border', _colors.N30));
|
|
76
78
|
var container = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n display: flex;\n flex-direction: column;\n overflow: auto;\n line-height: 2;\n"])), CONTAINER_WIDTH_IN_PX);
|
|
77
79
|
var inputWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 5px 0;\n align-items: center;\n"])));
|
|
78
|
-
var validationWrapper = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 12px 0 40px;\n border-top: 1px solid ", ";\n align-items: start;\n flex-direction: column;\n"])), _colors.R400);
|
|
80
|
+
var validationWrapper = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 12px 0 40px;\n border-top: 1px solid ", ";\n align-items: start;\n flex-direction: column;\n"])), (0, _tokens.token)('color.border.danger', _colors.R400));
|
|
79
81
|
var buttonWrapper = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 4px 8px;\n"])));
|
|
80
|
-
var clearText = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _colors.N80);
|
|
82
|
+
var clearText = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _tokens.token)('color.icon.subtle', _colors.N80));
|
|
81
83
|
|
|
82
84
|
var AltTextEditComponent = /*#__PURE__*/function (_React$Component) {
|
|
83
85
|
(0, _inherits2.default)(AltTextEditComponent, _React$Component);
|
|
@@ -116,6 +116,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
116
116
|
(0, _defineProperty2.default)(this, "waitForMediaUpload", true);
|
|
117
117
|
(0, _defineProperty2.default)(this, "allUploadsFinished", true);
|
|
118
118
|
(0, _defineProperty2.default)(this, "showDropzone", false);
|
|
119
|
+
(0, _defineProperty2.default)(this, "isFullscreen", false);
|
|
119
120
|
(0, _defineProperty2.default)(this, "layout", 'center');
|
|
120
121
|
(0, _defineProperty2.default)(this, "mediaNodes", []);
|
|
121
122
|
(0, _defineProperty2.default)(this, "mediaGroupNodes", {});
|
|
@@ -23,7 +23,7 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
23
23
|
|
|
24
24
|
var _templateObject;
|
|
25
25
|
|
|
26
|
-
var mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n .mediaGroupView-content-wrap.danger {\n /* Media inline */\n .", "::after {\n border: 1px solid ", ";\n }\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color:
|
|
26
|
+
var mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: 12px;\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: 12px;\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n .mediaGroupView-content-wrap.danger {\n /* Media inline */\n .", "::after {\n border: 1px solid ", ";\n }\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: ", "; /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n"])), _styles.mediaSingleSharedStyle, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPadding, _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, (0, _tokens.token)('color.border', _colors.N60), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, (0, _tokens.token)('color.border.focused', _colors.B200), (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackground), _editorSharedStyles.akEditorSelectedBorderBoldSize, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteBorder), _mediaCard.fileCardImageViewSelectedSelector, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteIconColor), _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteIconColor), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteIconColor), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, (0, _tokens.token)('color.border.danger', _editorSharedStyles.akEditorDeleteIconColor), (0, _tokens.token)('color.icon.danger', _editorSharedStyles.akEditorDeleteIconColor), (0, _tokens.token)('color.blanket.danger', 'rgb(255, 189, 173, 0.5)'));
|
|
27
27
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
28
28
|
* that style applied inside a container that has a scroll, causes any svgs on
|
|
29
29
|
* the page, without a border, that are inside a flexbox, to no longer align to
|
|
@@ -15,11 +15,13 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
15
15
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _messages = require("./messages");
|
|
19
21
|
|
|
20
22
|
var _templateObject;
|
|
21
23
|
|
|
22
|
-
var placeholder = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n width: 100%;\n text-align: center;\n margin-top: 8px !important;\n display: block;\n"])), _colors.N200);
|
|
24
|
+
var placeholder = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n width: 100%;\n text-align: center;\n margin-top: 8px !important;\n display: block;\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N200));
|
|
23
25
|
var CAPTION_PLACEHOLDER_ID = 'caption-placeholder';
|
|
24
26
|
exports.CAPTION_PLACEHOLDER_ID = CAPTION_PLACEHOLDER_ID;
|
|
25
27
|
|