@atlaskit/editor-core 188.1.0 → 188.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/media/commands/captions.js +1 -1
- package/dist/cjs/plugins/media/commands/helpers.js +1 -1
- package/dist/cjs/plugins/media/commands/linking.js +5 -5
- package/dist/cjs/plugins/media/index.js +17 -17
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +6 -6
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +4 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +4 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +4 -4
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +29 -29
- package/dist/cjs/plugins/media/pm-plugins/alt-text/commands.js +6 -6
- package/dist/cjs/plugins/media/pm-plugins/alt-text/index.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/keymap.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +7 -7
- package/dist/cjs/plugins/media/pm-plugins/keymap-media-single.js +3 -3
- package/dist/cjs/plugins/media/pm-plugins/keymap.js +3 -3
- package/dist/cjs/plugins/media/pm-plugins/linking/index.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/linking/keymap.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +22 -22
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/alt-text.js +2 -2
- package/dist/cjs/plugins/media/toolbar/commands.js +26 -26
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +3 -3
- package/dist/cjs/plugins/media/toolbar/index.js +27 -27
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +5 -5
- package/dist/cjs/plugins/media/toolbar/linking.js +1 -1
- package/dist/cjs/plugins/media/toolbar/utils.js +2 -2
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +31 -31
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +3 -3
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +6 -6
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +4 -4
- package/dist/cjs/plugins/media/ui/MediaPicker/BrowserWrapper.js +1 -1
- package/dist/cjs/plugins/media/ui/MediaPicker/ClipboardWrapper.js +1 -1
- package/dist/cjs/plugins/media/ui/MediaPicker/DropzoneWrapper.js +1 -1
- package/dist/cjs/plugins/media/ui/MediaPicker/index.js +2 -2
- package/dist/cjs/plugins/media/ui/PixelEntry/index.js +27 -27
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +17 -17
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +10 -10
- package/dist/cjs/plugins/media/ui/ToolbarMedia/index.js +3 -3
- package/dist/cjs/plugins/media/utils/media-files.js +4 -4
- package/dist/cjs/plugins/media/utils/media-single.js +4 -4
- package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +2 -0
- package/dist/cjs/ui/WithHelpTrigger/index.js +3 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/media/commands/captions.js +1 -1
- package/dist/es2019/plugins/media/commands/helpers.js +1 -1
- package/dist/es2019/plugins/media/commands/linking.js +5 -5
- package/dist/es2019/plugins/media/index.js +15 -15
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +6 -6
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +4 -4
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +4 -4
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +5 -5
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +14 -13
- package/dist/es2019/plugins/media/pm-plugins/alt-text/commands.js +3 -3
- package/dist/es2019/plugins/media/pm-plugins/alt-text/index.js +2 -2
- package/dist/es2019/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +10 -10
- package/dist/es2019/plugins/media/pm-plugins/keymap-media-single.js +4 -4
- package/dist/es2019/plugins/media/pm-plugins/keymap.js +3 -3
- package/dist/es2019/plugins/media/pm-plugins/linking/index.js +2 -2
- package/dist/es2019/plugins/media/pm-plugins/linking/keymap.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +14 -14
- package/dist/es2019/plugins/media/styles.js +2 -2
- package/dist/es2019/plugins/media/toolbar/alt-text.js +2 -2
- package/dist/es2019/plugins/media/toolbar/commands.js +2 -2
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +3 -3
- package/dist/es2019/plugins/media/toolbar/index.js +19 -19
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +6 -7
- package/dist/es2019/plugins/media/toolbar/linking.js +1 -1
- package/dist/es2019/plugins/media/toolbar/utils.js +3 -3
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +8 -8
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +4 -6
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +6 -6
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +5 -6
- package/dist/es2019/plugins/media/ui/MediaPicker/BrowserWrapper.js +1 -1
- package/dist/es2019/plugins/media/ui/MediaPicker/ClipboardWrapper.js +1 -1
- package/dist/es2019/plugins/media/ui/MediaPicker/DropzoneWrapper.js +1 -1
- package/dist/es2019/plugins/media/ui/MediaPicker/index.js +2 -2
- package/dist/es2019/plugins/media/ui/PixelEntry/index.js +5 -5
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +12 -12
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +4 -4
- package/dist/es2019/plugins/media/ui/ToolbarMedia/index.js +3 -3
- package/dist/es2019/plugins/media/utils/media-files.js +5 -5
- package/dist/es2019/plugins/media/utils/media-single.js +4 -4
- package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +2 -0
- package/dist/es2019/ui/WithHelpTrigger/index.js +2 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/media/commands/captions.js +1 -1
- package/dist/esm/plugins/media/commands/helpers.js +1 -1
- package/dist/esm/plugins/media/commands/linking.js +5 -5
- package/dist/esm/plugins/media/index.js +15 -15
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +6 -6
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +4 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +4 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +5 -5
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +14 -13
- package/dist/esm/plugins/media/pm-plugins/alt-text/commands.js +3 -3
- package/dist/esm/plugins/media/pm-plugins/alt-text/index.js +2 -2
- package/dist/esm/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +10 -10
- package/dist/esm/plugins/media/pm-plugins/keymap-media-single.js +4 -4
- package/dist/esm/plugins/media/pm-plugins/keymap.js +3 -3
- package/dist/esm/plugins/media/pm-plugins/linking/index.js +2 -2
- package/dist/esm/plugins/media/pm-plugins/linking/keymap.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +14 -14
- package/dist/esm/plugins/media/styles.js +2 -2
- package/dist/esm/plugins/media/toolbar/alt-text.js +2 -2
- package/dist/esm/plugins/media/toolbar/commands.js +2 -2
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +3 -3
- package/dist/esm/plugins/media/toolbar/index.js +19 -19
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +6 -7
- package/dist/esm/plugins/media/toolbar/linking.js +1 -1
- package/dist/esm/plugins/media/toolbar/utils.js +3 -3
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +8 -8
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +4 -6
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +6 -6
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +5 -6
- package/dist/esm/plugins/media/ui/MediaPicker/BrowserWrapper.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/ClipboardWrapper.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/DropzoneWrapper.js +1 -1
- package/dist/esm/plugins/media/ui/MediaPicker/index.js +2 -2
- package/dist/esm/plugins/media/ui/PixelEntry/index.js +5 -5
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +12 -12
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +4 -4
- package/dist/esm/plugins/media/ui/ToolbarMedia/index.js +3 -3
- package/dist/esm/plugins/media/utils/media-files.js +5 -5
- package/dist/esm/plugins/media/utils/media-single.js +4 -4
- package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +2 -0
- package/dist/esm/ui/WithHelpTrigger/index.js +2 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/media/commands/captions.d.ts +2 -2
- package/dist/types/plugins/media/commands/helpers.d.ts +1 -1
- package/dist/types/plugins/media/commands/linking.d.ts +2 -2
- package/dist/types/plugins/media/index.d.ts +1 -1
- package/dist/types/plugins/media/media-plugin-options.d.ts +3 -3
- package/dist/types/plugins/media/next-plugin-type.d.ts +7 -7
- package/dist/types/plugins/media/nodeviews/mediaGroup.d.ts +7 -7
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +8 -8
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +3 -3
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +6 -6
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +4 -4
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +9 -9
- package/dist/types/plugins/media/nodeviews/types.d.ts +6 -6
- package/dist/types/plugins/media/picker-facade.d.ts +3 -3
- package/dist/types/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/keymap.d.ts +2 -2
- package/dist/types/plugins/media/pm-plugins/alt-text/reducer.d.ts +2 -2
- package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/keymap-media-single.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/linking/keymap.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/linking/reducer.d.ts +2 -2
- package/dist/types/plugins/media/pm-plugins/main.d.ts +8 -8
- package/dist/types/plugins/media/pm-plugins/mediaTaskManager.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/types.d.ts +5 -5
- package/dist/types/plugins/media/toolbar/alt-text.d.ts +3 -3
- package/dist/types/plugins/media/toolbar/filePreviewItem.d.ts +3 -3
- package/dist/types/plugins/media/toolbar/index.d.ts +2 -2
- package/dist/types/plugins/media/toolbar/linking-toolbar-appearance.d.ts +1 -0
- package/dist/types/plugins/media/toolbar/linking.d.ts +4 -4
- package/dist/types/plugins/media/toolbar/utils.d.ts +1 -1
- package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +0 -1
- package/dist/types/plugins/media/ui/MediaLinkingToolbar.d.ts +1 -1
- package/dist/types/plugins/media/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
- package/dist/types/plugins/media/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
- package/dist/types/plugins/media/ui/MediaPicker/DropzoneWrapper.d.ts +2 -2
- package/dist/types/plugins/media/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types/plugins/media/ui/MediaPicker/index.d.ts +1 -1
- package/dist/types/plugins/media/ui/PixelEntry/index.d.ts +0 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -2
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -3
- package/dist/types/plugins/media/ui/ToolbarMedia/index.d.ts +1 -1
- package/dist/types/plugins/media/utils/analytics.d.ts +1 -1
- package/dist/types/plugins/media/utils/current-media-node.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-common.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-files.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-single.d.ts +2 -2
- package/dist/types/ui/WithHelpTrigger/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/commands/captions.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/commands/helpers.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/commands/linking.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/media-plugin-options.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/next-plugin-type.d.ts +7 -7
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaGroup.d.ts +7 -7
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +8 -8
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeUpdater.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +6 -6
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/media.d.ts +4 -4
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +9 -9
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +6 -6
- package/dist/types-ts4.5/plugins/media/picker-facade.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/keymap.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/reducer.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/keymap-media-single.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/keymap.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/linking/keymap.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/linking/reducer.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/pm-plugins/main.d.ts +8 -8
- package/dist/types-ts4.5/plugins/media/pm-plugins/mediaTaskManager.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/types.d.ts +5 -5
- package/dist/types-ts4.5/plugins/media/toolbar/alt-text.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/toolbar/filePreviewItem.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/toolbar/linking-toolbar-appearance.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/toolbar/linking.d.ts +4 -4
- package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/ImageBorder/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/ui/MediaLinkingToolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/MediaPicker/DropzoneWrapper.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/MediaPicker/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/ui/ToolbarMedia/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/analytics.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/current-media-node.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/media-common.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/media-files.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/utils/media-single.d.ts +2 -2
- package/dist/types-ts4.5/ui/WithHelpTrigger/index.d.ts +0 -4
- package/package.json +7 -7
- package/report.api.md +1 -1
- package/tmp/api-report-tmp.d.ts +1 -1
- package/dist/cjs/plugins/help-dialog/commands.js +0 -19
- package/dist/cjs/plugins/help-dialog/index.js +0 -138
- package/dist/cjs/plugins/help-dialog/plugin-key.js +0 -8
- package/dist/cjs/plugins/help-dialog/ui/HelpDialogLoader.js +0 -24
- package/dist/cjs/plugins/help-dialog/ui/index.js +0 -563
- package/dist/cjs/plugins/help-dialog/ui/styles.js +0 -50
- package/dist/es2019/plugins/help-dialog/commands.js +0 -13
- package/dist/es2019/plugins/help-dialog/index.js +0 -125
- package/dist/es2019/plugins/help-dialog/plugin-key.js +0 -2
- package/dist/es2019/plugins/help-dialog/ui/HelpDialogLoader.js +0 -6
- package/dist/es2019/plugins/help-dialog/ui/index.js +0 -441
- package/dist/es2019/plugins/help-dialog/ui/styles.js +0 -110
- package/dist/esm/plugins/help-dialog/commands.js +0 -13
- package/dist/esm/plugins/help-dialog/index.js +0 -130
- package/dist/esm/plugins/help-dialog/plugin-key.js +0 -2
- package/dist/esm/plugins/help-dialog/ui/HelpDialogLoader.js +0 -12
- package/dist/esm/plugins/help-dialog/ui/index.js +0 -552
- package/dist/esm/plugins/help-dialog/ui/styles.js +0 -40
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -3
- package/dist/types/plugins/help-dialog/index.d.ts +0 -5
- package/dist/types/plugins/help-dialog/plugin-key.d.ts +0 -2
- package/dist/types/plugins/help-dialog/ui/HelpDialogLoader.d.ts +0 -4
- package/dist/types/plugins/help-dialog/ui/index.d.ts +0 -27
- package/dist/types/plugins/help-dialog/ui/styles.d.ts +0 -33
- package/dist/types-ts4.5/plugins/help-dialog/commands.d.ts +0 -3
- package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +0 -5
- package/dist/types-ts4.5/plugins/help-dialog/plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/plugins/help-dialog/ui/HelpDialogLoader.d.ts +0 -4
- package/dist/types-ts4.5/plugins/help-dialog/ui/index.d.ts +0 -27
- package/dist/types-ts4.5/plugins/help-dialog/ui/styles.d.ts +0 -33
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
5
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import {
|
|
5
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { NodeSelection, PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import reducer from './reducer';
|
|
8
8
|
export var mediaLinkingPluginKey = new PluginKey('mediaLinking');
|
|
9
9
|
var initialState = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { addLink, bindKeymapWithCommand } from '@atlaskit/editor-common/keymaps';
|
|
1
2
|
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
|
|
2
|
-
import { bindKeymapWithCommand, addLink } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { showLinkingToolbarWithMediaTypeCheck } from '../../commands/linking';
|
|
4
4
|
export default function keymapPlugin(schema) {
|
|
5
5
|
var list = {};
|
|
@@ -8,29 +8,29 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
+
import assert from 'assert';
|
|
11
12
|
import React from 'react';
|
|
12
13
|
import ReactDOM from 'react-dom';
|
|
14
|
+
import { RawIntlProvider } from 'react-intl-next';
|
|
15
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import { CAPTION_PLACEHOLDER_ID, getMaxWidthForNestedNodeNext } from '@atlaskit/editor-common/media-single';
|
|
13
17
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
14
|
-
import {
|
|
18
|
+
import { browser, ErrorReporter, isInEmptyLine, isInListItem } from '@atlaskit/editor-common/utils';
|
|
19
|
+
import { AllSelection, NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
15
20
|
import { insertPoint } from '@atlaskit/editor-prosemirror/transform';
|
|
21
|
+
import { findDomRefAtPos, findParentNodeOfType, findSelectedNodeOfType, isNodeSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
16
22
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import { findDomRefAtPos, isNodeSelection, findSelectedNodeOfType, findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
20
|
-
import { insertMediaSingleNode, isMediaSingle } from '../utils/media-single';
|
|
21
|
-
import DropPlaceholder from '../ui/Media/DropPlaceholder';
|
|
22
|
-
import { insertMediaGroupNode, insertMediaInlineNode, canInsertMediaInline } from '../utils/media-files';
|
|
23
|
-
import { isInsidePotentialEmptyParagraph, removeMediaNode, splitMediaGroup } from '../utils/media-common';
|
|
23
|
+
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
24
|
+
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
24
25
|
import * as helpers from '../commands/helpers';
|
|
25
26
|
import { updateMediaSingleNodeAttrs } from '../commands/helpers';
|
|
26
|
-
import { stateKey } from './plugin-key';
|
|
27
27
|
import PickerFacade from '../picker-facade';
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
28
|
+
import DropPlaceholder from '../ui/Media/DropPlaceholder';
|
|
29
|
+
import { isInsidePotentialEmptyParagraph, removeMediaNode, splitMediaGroup } from '../utils/media-common';
|
|
30
|
+
import { canInsertMediaInline, insertMediaGroupNode, insertMediaInlineNode } from '../utils/media-files';
|
|
31
|
+
import { insertMediaSingleNode, isMediaSingle } from '../utils/media-single';
|
|
31
32
|
import { MediaTaskManager } from './mediaTaskManager';
|
|
32
|
-
import {
|
|
33
|
-
import { getMaxWidthForNestedNodeNext, CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
33
|
+
import { stateKey } from './plugin-key';
|
|
34
34
|
export { stateKey } from './plugin-key';
|
|
35
35
|
export var MEDIA_CONTENT_WRAP_CLASS_NAME = 'media-content-wrap';
|
|
36
36
|
export var MEDIA_PLUGIN_IS_RESIZING_KEY = 'mediaSinglePlugin.isResizing';
|
|
@@ -2,9 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
5
|
-
import { akEditorDeleteBorder,
|
|
6
|
-
import { N60, B200, Y500 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorSelectedBorderBoldSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
7
6
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
7
|
+
import { B200, N60, Y500 } from '@atlaskit/theme/colors';
|
|
8
8
|
export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .media-extended-resize-experience[layout^='wrap-'] {\n // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n // to prevent scroll bar\n overflow: visible !important;\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: ", ";\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: ", ";\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 /* 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 legacy handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", " !important;\n }\n /* Media resize new handlers */\n .resizer-handle-thumb {\n background: ", " !important;\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\n .warning {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", " {\n box-shadow: 0 0 0 1px ", " !important;\n }\n\n .resizer-handle-thumb {\n background: ", " !important;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, ".concat(N60, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, ".concat(B200, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", richMediaClassName, fileCardImageViewSelector, "var(--ds-border-warning, ".concat(Y500, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-warning, ".concat(Y500, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-warning, ".concat(Y500, ")"), "var(--ds-icon-warning, ".concat(Y500, ")"));
|
|
9
9
|
|
|
10
10
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -2,12 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { addAltText, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
5
6
|
import { openMediaAltTextMenu } from '../pm-plugins/alt-text/commands';
|
|
6
|
-
import { ToolTipContent, addAltText } from '@atlaskit/editor-common/keymaps';
|
|
7
7
|
import { messages } from '../pm-plugins/alt-text/messages';
|
|
8
|
+
import { ClassNames } from '../pm-plugins/alt-text/style';
|
|
8
9
|
import AltTextEdit, { CONTAINER_WIDTH_IN_PX } from '../pm-plugins/alt-text/ui/AltTextEdit';
|
|
9
10
|
import { getMediaNodeFromSelection } from '../utils/media-common';
|
|
10
|
-
import { ClassNames } from '../pm-plugins/alt-text/style';
|
|
11
11
|
var testId = 'alt-text-edit-button';
|
|
12
12
|
export var altTextButton = function altTextButton(intl, state, editorAnalyticsAPI) {
|
|
13
13
|
var mediaNode = getMediaNodeFromSelection(state);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
5
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
7
|
import { isNodeSelection, removeSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
8
|
import { getMediaInputResizeAnalyticsEvent } from '../utils/analytics';
|
|
8
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
9
|
-
import { removeMediaGroupNode, getSelectedMediaSingle } from './utils';
|
|
10
9
|
import { currentMediaNodeWithPos } from '../utils/current-media-node';
|
|
10
|
+
import { getSelectedMediaSingle, removeMediaGroupNode } from './utils';
|
|
11
11
|
export var DEFAULT_BORDER_COLOR = '#091e4224';
|
|
12
12
|
export var DEFAULT_BORDER_SIZE = 2;
|
|
13
13
|
export var changeInlineToMediaCard = function changeInlineToMediaCard(editorAnalyticsAPI) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom';
|
|
4
|
-
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
5
|
-
import { messages } from '@atlaskit/media-ui';
|
|
6
|
-
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
7
4
|
import { FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
|
|
5
|
+
import FilePreviewIcon from '@atlaskit/icon/glyph/editor/file-preview';
|
|
6
|
+
import { messages } from '@atlaskit/media-ui';
|
|
7
|
+
import { MediaViewer } from '@atlaskit/media-viewer';
|
|
8
8
|
import { getSelectedMediaContainerNodeAttrs } from './utils';
|
|
9
9
|
export var FilePreviewItem = function FilePreviewItem(_ref) {
|
|
10
10
|
var mediaPluginState = _ref.mediaPluginState,
|
|
@@ -3,35 +3,35 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { buildLayoutButtons } from '@atlaskit/editor-common/card';
|
|
8
|
+
import { calcMinWidth, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
9
|
+
import commonMessages from '@atlaskit/editor-common/messages';
|
|
10
|
+
import { cardMessages } from '@atlaskit/editor-common/messages';
|
|
6
11
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
12
|
import { findParentNodeOfType, hasParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
8
|
-
import
|
|
13
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
9
14
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
15
|
+
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
10
16
|
import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
11
|
-
import commonMessages from '@atlaskit/editor-common/messages';
|
|
12
|
-
import { stateKey } from '../pm-plugins/plugin-key';
|
|
13
|
-
import { getLinkingToolbar, shouldShowMediaLinkToolbar } from './linking';
|
|
14
|
-
import { buildLayoutButtons } from '@atlaskit/editor-common/card';
|
|
15
|
-
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
16
|
-
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
17
|
-
import { altTextButton, getAltTextToolbar } from './alt-text';
|
|
18
|
-
import { showLinkingToolbar } from '../commands/linking';
|
|
19
|
-
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
20
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
21
17
|
import { messages } from '@atlaskit/media-ui';
|
|
22
|
-
import { cardMessages } from '@atlaskit/editor-common/messages';
|
|
23
18
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
24
|
-
import {
|
|
25
|
-
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout, getMaxToolbarWidth } from './utils';
|
|
26
|
-
import { isVideo } from '../utils/media-single';
|
|
27
|
-
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark, updateMediaSingleWidth } from './commands';
|
|
19
|
+
import { showLinkingToolbar } from '../commands/linking';
|
|
28
20
|
import { MediaInlineNodeSelector, MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
21
|
+
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
22
|
+
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
23
|
+
import { stateKey } from '../pm-plugins/plugin-key';
|
|
29
24
|
import ImageBorderItem from '../ui/ImageBorder';
|
|
25
|
+
import { FullWidthDisplay, PixelEntry } from '../ui/PixelEntry';
|
|
30
26
|
import { currentMediaNodeBorderMark } from '../utils/current-media-node';
|
|
27
|
+
import { isVideo } from '../utils/media-single';
|
|
28
|
+
import { altTextButton, getAltTextToolbar } from './alt-text';
|
|
29
|
+
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark, updateMediaSingleWidth } from './commands';
|
|
30
|
+
import { FilePreviewItem } from './filePreviewItem';
|
|
31
31
|
import { shouldShowImageBorder } from './imageBorder';
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
32
|
+
import { getLinkingToolbar, shouldShowMediaLinkToolbar } from './linking';
|
|
33
|
+
import { LinkToolbarAppearance } from './linking-toolbar-appearance';
|
|
34
|
+
import { calcNewLayout, downloadMedia, getMaxToolbarWidth, getPixelWidthOfElement, getSelectedMediaSingle, removeMediaGroupNode } from './utils';
|
|
35
35
|
var remove = function remove(state, dispatch) {
|
|
36
36
|
if (dispatch) {
|
|
37
37
|
dispatch(removeSelectedNode(state.tr));
|
|
@@ -2,18 +2,17 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
4
|
/** @jsx jsx */
|
|
5
|
-
|
|
6
|
-
import React, { useState, useEffect, Fragment } from 'react';
|
|
5
|
+
import React, { Fragment, useEffect, useState } from 'react';
|
|
7
6
|
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import LinkIcon from '@atlaskit/icon/glyph/editor/link';
|
|
9
|
-
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
10
7
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
11
|
-
import {
|
|
8
|
+
import { addLink, ToolTipContent } from '@atlaskit/editor-common/keymaps';
|
|
9
|
+
import { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
12
10
|
import { FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
|
|
13
11
|
import { FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
12
|
+
import LinkIcon from '@atlaskit/icon/glyph/editor/link';
|
|
13
|
+
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
16
14
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
15
|
+
import { checkMediaType } from '../utils/check-media-type';
|
|
17
16
|
import { currentMediaNode } from '../utils/current-media-node';
|
|
18
17
|
// need this wrapper, need to have 4px between items.
|
|
19
18
|
var wrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
@@ -2,10 +2,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
5
6
|
import { hideLinkingToolbar, setUrlToMedia, unlink } from '../commands/linking';
|
|
6
7
|
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
7
8
|
import MediaLinkingToolbar from '../ui/MediaLinkingToolbar';
|
|
8
|
-
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
9
9
|
var FORCE_FOCUS_SELECTOR = '[data-testid="add-link-button"],[data-testid="edit-link-button"]';
|
|
10
10
|
export function shouldShowMediaLinkToolbar(editorState) {
|
|
11
11
|
var mediaLinkingState = getMediaLinkingState(editorState);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { getMediaClient } from '@atlaskit/media-client';
|
|
4
|
-
import { findParentNodeOfType, removeParentNodeOfType, removeSelectedNode, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
6
3
|
import { wrappedLayouts } from '@atlaskit/editor-common/media-single';
|
|
4
|
+
import { findParentNodeOfType, findSelectedNodeOfType, removeParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
import { akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { getMediaClient } from '@atlaskit/media-client';
|
|
7
7
|
export var getSelectedMediaContainerNodeAttrs = function getSelectedMediaContainerNodeAttrs(mediaPluginState) {
|
|
8
8
|
var selectedNode = mediaPluginState.selectedMediaContainerNode();
|
|
9
9
|
if (selectedNode && selectedNode.attrs) {
|
|
@@ -4,9 +4,9 @@ var _templateObject;
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
|
+
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
7
8
|
import { N200 } from '@atlaskit/theme/colors';
|
|
8
9
|
import { messages } from './messages';
|
|
9
|
-
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
10
10
|
var placeholder = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n width: 100%;\n text-align: center;\n margin-top: ", " !important;\n display: block;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-100, 8px)");
|
|
11
11
|
export default /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12
12
|
var onClick = _ref.onClick;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
import { useRef, useState } from 'react';
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
5
|
-
import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
6
5
|
import { BorderIcon } from '@atlaskit/editor-common/icons';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { Popup } from '@atlaskit/editor-common/ui';
|
|
8
|
+
import { borderPaletteTooltipMessages, ColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
10
9
|
import { borderColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
11
10
|
import { ArrowKeyNavigationType, DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
12
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
13
|
-
import { Popup } from '@atlaskit/editor-common/ui';
|
|
14
11
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
15
|
-
import {
|
|
12
|
+
import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
|
|
13
|
+
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
14
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
16
15
|
import { messages } from './messages';
|
|
16
|
+
import { buttonStyle, buttonWrapperStyle, contextualMenuArrow, contextualMenuColorIcon, contextualSubMenu, itemSpacing, line, menuItemDimensions, toolbarButtonWrapper } from './styles';
|
|
17
17
|
var ImageBorder = function ImageBorder(_ref) {
|
|
18
18
|
var formatMessage = _ref.intl.formatMessage,
|
|
19
19
|
toggleBorder = _ref.toggleBorder,
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
import * as colors from '@atlaskit/theme/colors';
|
|
5
4
|
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
6
|
-
import
|
|
5
|
+
import * as colors from '@atlaskit/theme/colors';
|
|
6
|
+
import { N0, N20A, N50, N60A, N800, N90 } from '@atlaskit/theme/colors';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
8
8
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
9
|
-
|
|
10
9
|
// menuItemDimensions and itemSpacing are copied from
|
|
11
10
|
// packages/editor/editor-core/src/plugins/floating-toolbar/ui/DropdownMenu.tsx
|
|
12
|
-
|
|
13
11
|
export var menuItemDimensions = {
|
|
14
12
|
width: 175,
|
|
15
13
|
height: 32
|
|
@@ -18,12 +16,12 @@ export var menuItemDimensions = {
|
|
|
18
16
|
// TODO: Migrate away from gridSize
|
|
19
17
|
// Recommendation: Replace directly with 4 due to itemSpacing being used in calculations
|
|
20
18
|
export var itemSpacing = gridSize() / 2;
|
|
21
|
-
export var contextualMenuArrow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n &::after {\n content: '\u203A';\n margin-left:
|
|
19
|
+
export var contextualMenuArrow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n &::after {\n content: '\u203A';\n margin-left: ", ";\n line-height: 20px;\n color: ", ";\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(N90, ")"));
|
|
22
20
|
export var contextualMenuColorIcon = function contextualMenuColorIcon(color) {
|
|
23
21
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", ";\n width: 20px;\n height: 20px;\n ", "\n }\n"])), contextualMenuArrow, DEFAULT_BORDER_COLOR, "var(--ds-border-radius-100, 3px)", color && "background: ".concat(color));
|
|
24
22
|
};
|
|
25
23
|
export var contextualSubMenu = function contextualSubMenu(index) {
|
|
26
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n display: flex;\n position: absolute;\n top: ", "px;\n left: ", "px;\n padding:
|
|
24
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n display: flex;\n position: absolute;\n top: ", "px;\n left: ", "px;\n padding: ", ";\n\n > div {\n padding: 0;\n }\n"])), "var(--ds-border-radius-100, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), index * (menuItemDimensions.height + itemSpacing * 2), menuItemDimensions.width, "var(--ds-space-100, 8px)");
|
|
27
25
|
};
|
|
28
26
|
export var buttonStyle = function buttonStyle(selected) {
|
|
29
27
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 26px;\n width: 26px;\n padding: 0;\n border-radius: 4px;\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n display: block;\n"])), selected ? "var(--ds-text, ".concat(N800, ")") : "var(--ds-background-neutral, ".concat(N20A, ")"), DEFAULT_BORDER_COLOR);
|
|
@@ -2,15 +2,15 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
|
-
import { B400, B300, B200 } from '@atlaskit/theme/colors';
|
|
7
|
-
import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
|
|
8
|
-
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
9
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
+
import { hexToRgba } from '@atlaskit/adf-schema';
|
|
7
|
+
import DocumentFilledIcon from '@atlaskit/icon/glyph/document-filled';
|
|
8
|
+
import { B200, B300, B400 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { borderRadius } from '@atlaskit/theme/constants';
|
|
10
|
+
import { FILE_WIDTH, MEDIA_HEIGHT } from '../../nodeviews/mediaNodeView/media';
|
|
10
11
|
import { dropPlaceholderMessages } from './drop-placeholder-messages';
|
|
11
|
-
import { MEDIA_HEIGHT, FILE_WIDTH } from '../../nodeviews/mediaNodeView/media';
|
|
12
12
|
var iconWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n margin: 5px 3px 25px;\n width: ", "px;\n min-height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), "var(--ds-icon-accent-blue, ".concat(hexToRgba(B400, 0.4) || B400, ")"), "var(--ds-background-accent-blue-subtle, ".concat(hexToRgba(B300, 0.6) || B300, ")"), borderRadius(), FILE_WIDTH, MEDIA_HEIGHT);
|
|
13
|
-
var dropLine = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n margin:
|
|
13
|
+
var dropLine = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n margin: ", " 0;\n width: 100%;\n height: 2px;\n"])), "var(--ds-border-focused, ".concat(B200, ")"), borderRadius(), "var(--ds-space-025, 2px)");
|
|
14
14
|
var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
15
15
|
var intl = props.intl;
|
|
16
16
|
var dropPlaceholderLabel = dropPlaceholderMessages.dropPlaceholderLabel;
|
|
@@ -12,18 +12,17 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
import React, { Fragment } from 'react';
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
|
|
17
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
15
18
|
import { ErrorMessage } from '@atlaskit/editor-common/ui';
|
|
16
|
-
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
17
|
-
import EditorUnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
18
19
|
// Common Translations will live here
|
|
19
|
-
|
|
20
20
|
import { PanelTextInput } from '@atlaskit/editor-common/ui';
|
|
21
21
|
import { FloatingToolbarButton as Button, FloatingToolbarSeparator as Separator } from '@atlaskit/editor-common/ui';
|
|
22
|
-
import { container, containerWithProvider, inputWrapper, RecentSearch } from '@atlaskit/editor-common/link';
|
|
23
|
-
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
24
22
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
23
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/glyph/chevron-left-large';
|
|
24
|
+
import EditorUnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
25
25
|
import { R400 } from '@atlaskit/theme/colors';
|
|
26
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
27
26
|
import { mediaLinkToolbarMessages } from './media-linking-toolbar-messages';
|
|
28
27
|
var validationWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 0;\n padding: ", " ", "\n ", " 0;\n margin: 0 ", " 0 ", ";\n border-top: 1px solid ", ";\n align-items: start;\n display: flex;\n flex-direction: column;\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-300, 24px)", "var(--ds-space-150, 12px)", "var(--ds-space-050, 4px)", "var(--ds-space-400, 32px)", "var(--ds-border-danger, ".concat(R400, ")"));
|
|
29
28
|
var buttonWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: ", " ", "\n ", " 0px;\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", "var(--ds-space-050, 4px)");
|
|
@@ -2,8 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import PickerFacadeProvider from './PickerFacadeProvider';
|
|
6
5
|
import { Browser } from '@atlaskit/media-picker';
|
|
6
|
+
import PickerFacadeProvider from './PickerFacadeProvider';
|
|
7
7
|
export var BrowserWrapper = function BrowserWrapper(_ref) {
|
|
8
8
|
var mediaState = _ref.mediaState,
|
|
9
9
|
isOpen = _ref.isOpen,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import PickerFacadeProvider from './PickerFacadeProvider';
|
|
3
2
|
import { Clipboard } from '@atlaskit/media-picker';
|
|
3
|
+
import PickerFacadeProvider from './PickerFacadeProvider';
|
|
4
4
|
export var ClipboardWrapper = function ClipboardWrapper(_ref) {
|
|
5
5
|
var mediaState = _ref.mediaState,
|
|
6
6
|
featureFlags = _ref.featureFlags,
|
|
@@ -2,9 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
5
6
|
import { Dropzone } from '@atlaskit/media-picker';
|
|
6
7
|
import PickerFacadeProvider from './PickerFacadeProvider';
|
|
7
|
-
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
8
8
|
export var DropzoneWrapper = function DropzoneWrapper(_ref) {
|
|
9
9
|
var mediaState = _ref.mediaState,
|
|
10
10
|
isActive = _ref.isActive,
|
|
@@ -8,10 +8,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
10
|
import React from 'react';
|
|
11
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
12
|
+
import { BrowserWrapper } from './BrowserWrapper';
|
|
11
13
|
import { ClipboardWrapper } from './ClipboardWrapper';
|
|
12
14
|
import { DropzoneWrapper } from './DropzoneWrapper';
|
|
13
|
-
import { BrowserWrapper } from './BrowserWrapper';
|
|
14
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
15
15
|
var MediaPicker = function MediaPicker(_ref) {
|
|
16
16
|
var api = _ref.api,
|
|
17
17
|
isPopupOpened = _ref.isPopupOpened,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
4
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
-
import
|
|
7
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
8
6
|
import Button from '@atlaskit/button';
|
|
9
7
|
import Form, { Field } from '@atlaskit/form';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
import Textfield from '@atlaskit/textfield';
|
|
9
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
12
10
|
import { PIXELENTRY_MIGRATION_BUTTON_TESTID } from './constants';
|
|
11
|
+
import { messages } from './messages';
|
|
12
|
+
import { pixelEntryForm, pixelEntryHiddenSubmit, pixelSizingFullWidthLabelStyles, pixelSizingHeightInput, pixelSizingInput, pixelSizingLabel, pixelSizingWidthInput, pixelSizingWrapper } from './styles';
|
|
13
13
|
export var PixelEntry = function PixelEntry(_ref) {
|
|
14
14
|
var width = _ref.width,
|
|
15
15
|
mediaWidth = _ref.mediaWidth,
|
|
@@ -13,22 +13,22 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { jsx } from '@emotion/react';
|
|
16
|
-
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
17
|
-
import { calcPctFromPx, wrappedLayouts, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
18
|
-
import { nonWrappedLayouts, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
19
|
-
import { akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
20
|
-
import { wrapperStyle } from './styled';
|
|
21
|
-
import { ResizerNext } from '@atlaskit/editor-common/resizer';
|
|
22
16
|
import classnames from 'classnames';
|
|
23
|
-
import { richMediaClassName, resizerStyles } from '@atlaskit/editor-common/styles';
|
|
24
|
-
import { MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, DEFAULT_IMAGE_WIDTH, calcMediaSingleMaxWidth } from '@atlaskit/editor-common/media-single';
|
|
25
|
-
import { findClosestSnap, getGuidelinesWithHighlights, generateDefaultGuidelines, generateDynamicGuidelines, getGuidelineSnaps, getGuidelineTypeFromKey, getRelativeGuideSnaps, getRelativeGuidelines } from '@atlaskit/editor-common/guideline';
|
|
26
|
-
import memoizeOne from 'memoize-one';
|
|
27
|
-
import { getMediaResizeAnalyticsEvent } from '../../utils/analytics';
|
|
28
17
|
import throttle from 'lodash/throttle';
|
|
18
|
+
import memoizeOne from 'memoize-one';
|
|
19
|
+
import { findClosestSnap, generateDefaultGuidelines, generateDynamicGuidelines, getGuidelineSnaps, getGuidelinesWithHighlights, getGuidelineTypeFromKey, getRelativeGuidelines, getRelativeGuideSnaps } from '@atlaskit/editor-common/guideline';
|
|
20
|
+
import { calcMediaSingleMaxWidth, DEFAULT_IMAGE_WIDTH, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_RESIZE_THROTTLE_TIME, MEDIA_SINGLE_SNAP_GAP, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
21
|
+
import { ResizerNext } from '@atlaskit/editor-common/resizer';
|
|
22
|
+
import { resizerStyles, richMediaClassName } from '@atlaskit/editor-common/styles';
|
|
23
|
+
import { calcPctFromPx, handleSides, imageAlignmentMap, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
24
|
+
import { nonWrappedLayouts, setNodeSelection } from '@atlaskit/editor-common/utils';
|
|
25
|
+
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
26
|
+
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding } from '@atlaskit/editor-shared-styles';
|
|
29
27
|
import { MEDIA_PLUGIN_IS_RESIZING_KEY, MEDIA_PLUGIN_RESIZING_WIDTH_KEY } from '../../pm-plugins/main';
|
|
30
|
-
import {
|
|
28
|
+
import { getMediaResizeAnalyticsEvent } from '../../utils/analytics';
|
|
31
29
|
import { checkMediaType } from '../../utils/check-media-type';
|
|
30
|
+
import { ResizableMediaMigrationNotification } from './ResizableMediaMigrationNotification';
|
|
31
|
+
import { wrapperStyle } from './styled';
|
|
32
32
|
export var resizerNextTestId = 'mediaSingle.resizerNext.testid';
|
|
33
33
|
var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
|
|
34
34
|
_inherits(ResizableMediaSingleNext, _React$Component);
|
|
@@ -13,13 +13,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { jsx } from '@emotion/react';
|
|
16
|
-
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
17
|
-
import { calcPctFromPx, calcColumnsFromPx, wrappedLayouts, Resizer, calcMediaPxWidth, snapTo, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
18
|
-
import { akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
19
|
-
import { wrapperStyle } from './styled';
|
|
20
16
|
import { calculateOffsetLeft } from '@atlaskit/editor-common/media-single';
|
|
17
|
+
import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
21
18
|
import { calculateSnapPoints } from '@atlaskit/editor-common/utils';
|
|
19
|
+
import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
20
|
+
import { akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
22
21
|
import { checkMediaType } from '../../utils/check-media-type';
|
|
22
|
+
import { wrapperStyle } from './styled';
|
|
23
23
|
var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
|
|
24
24
|
_inherits(ResizableMediaSingle, _React$Component);
|
|
25
25
|
var _super = _createSuper(ResizableMediaSingle);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { injectIntl } from 'react-intl-next';
|
|
3
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
4
|
+
import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
2
5
|
import AttachmentIcon from '@atlaskit/icon/glyph/editor/attachment';
|
|
3
|
-
import { ToolbarButton, TOOLBAR_BUTTON } from '@atlaskit/editor-common/ui-menu';
|
|
4
6
|
import { toolbarMediaMessages } from './toolbar-media-messages';
|
|
5
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
6
|
-
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
var onClickMediaButton = function onClickMediaButton(pluginState) {
|
|
8
8
|
return function () {
|
|
9
9
|
pluginState.showMediaPicker();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { findFarthestParentNode, insideTableCell, isInLayoutColumn, isInListItem, isSupportedInParent, setNodeSelection, setTextSelection } from '@atlaskit/editor-common/utils';
|
|
3
|
-
import { posOfPrecedingMediaGroup, posOfMediaGroupNearby, posOfParentMediaGroup, isSelectionNonMediaBlockNode, isInsidePotentialEmptyParagraph, copyOptionalAttrsFromMediaState } from './media-common';
|
|
4
|
-
import { canInsert, safeInsert, hasParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import { atTheBeginningOfBlock, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, startPositionOfParent } from '@atlaskit/editor-common/selection';
|
|
6
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { atTheBeginningOfBlock, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, startPositionOfParent } from '@atlaskit/editor-common/selection';
|
|
3
|
+
import { findFarthestParentNode, insideTableCell, isInLayoutColumn, isInListItem, isSupportedInParent, setNodeSelection, setTextSelection } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
import { canInsert, hasParentNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
+
import { copyOptionalAttrsFromMediaState, isInsidePotentialEmptyParagraph, isSelectionNonMediaBlockNode, posOfMediaGroupNearby, posOfParentMediaGroup, posOfPrecedingMediaGroup } from './media-common';
|
|
7
7
|
export var canInsertMediaInline = function canInsertMediaInline(state) {
|
|
8
8
|
var node = state.schema.nodes.mediaInline.create({});
|
|
9
9
|
return canInsert(state.selection.$to, Fragment.from(node));
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { safeInsert, shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
|
|
4
6
|
import { getMaxWidthForNestedNodeNext, getMediaSingleInitialWidth, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH } from '@atlaskit/editor-common/media-single';
|
|
7
|
+
import { atTheBeginningOfBlock } from '@atlaskit/editor-common/selection';
|
|
5
8
|
import { checkNodeDown, isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
6
9
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
7
10
|
import { safeInsert as pmSafeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
8
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
9
|
-
import { safeInsert, shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
|
|
10
|
-
import { copyOptionalAttrsFromMediaState } from '../utils/media-common';
|
|
11
|
-
import { atTheBeginningOfBlock } from '@atlaskit/editor-common/selection';
|
|
12
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { copyOptionalAttrsFromMediaState } from '../utils/media-common';
|
|
13
13
|
import { isImage } from './is-image';
|
|
14
14
|
var getInsertMediaAnalytics = function getInsertMediaAnalytics(inputMethod, fileExtension) {
|
|
15
15
|
return {
|
|
@@ -50,7 +50,9 @@ var measureValue = function measureValue(style, measureValues) {
|
|
|
50
50
|
return result;
|
|
51
51
|
};
|
|
52
52
|
var mutateElementStyle = function mutateElementStyle(element, style, side) {
|
|
53
|
+
element.style.transform = style.getPropertyValue('transform');
|
|
53
54
|
if (isLeftCursor(side)) {
|
|
55
|
+
element.style.width = style.getPropertyValue('width');
|
|
54
56
|
element.style.marginLeft = style.getPropertyValue('margin-left');
|
|
55
57
|
} else {
|
|
56
58
|
var marginRight = parseFloat(style.getPropertyValue('margin-right'));
|