@atlaskit/editor-core 185.2.0 → 185.2.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/CHANGELOG.md +7 -0
- package/dist/cjs/actions/index.js +2 -2
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -2
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
- package/dist/cjs/messages.js +6 -56
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +2 -2
- package/dist/cjs/plugins/base/pm-plugins/scroll-gutter.js +1 -1
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +2 -2
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +4 -4
- package/dist/cjs/plugins/card/pm-plugins/doc.js +9 -11
- package/dist/cjs/plugins/card/pm-plugins/keymap.js +3 -6
- package/dist/cjs/plugins/card/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/card/toolbar.js +12 -15
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +4 -6
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +7 -10
- package/dist/cjs/plugins/card/utils.js +3 -4
- package/dist/cjs/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
- package/dist/cjs/plugins/custom-autoformat/doc.js +1 -1
- package/dist/cjs/plugins/date/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/emoji/index.js +2 -2
- package/dist/cjs/plugins/floating-toolbar/index.js +1 -1
- package/dist/cjs/plugins/hyperlink/Toolbar.js +8 -8
- package/dist/cjs/plugins/hyperlink/commands.js +2 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
- package/dist/cjs/plugins/layout/actions.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -2
- package/dist/cjs/plugins/media/toolbar/index.js +9 -8
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +4 -3
- package/dist/cjs/plugins/media/toolbar/linking.js +3 -3
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +6 -8
- package/dist/cjs/plugins/media/utils/media-files.js +8 -7
- package/dist/cjs/plugins/mentions/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/placeholder/index.js +2 -3
- package/dist/cjs/plugins/status/plugin.js +2 -2
- package/dist/cjs/plugins/unsupported-content/index.js +3 -3
- package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +4 -11
- package/dist/cjs/utils/document.js +7 -249
- package/dist/cjs/utils/index.js +1 -23
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +2 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
- package/dist/es2019/messages.js +2 -54
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/base/pm-plugins/scroll-gutter.js +1 -1
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +1 -1
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -1
- package/dist/es2019/plugins/card/pm-plugins/doc.js +2 -3
- package/dist/es2019/plugins/card/pm-plugins/keymap.js +3 -3
- package/dist/es2019/plugins/card/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/card/toolbar.js +7 -9
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +3 -4
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +1 -4
- package/dist/es2019/plugins/card/utils.js +1 -2
- package/dist/es2019/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
- package/dist/es2019/plugins/custom-autoformat/doc.js +1 -1
- package/dist/es2019/plugins/date/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/emoji/index.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/index.js +1 -1
- package/dist/es2019/plugins/hyperlink/Toolbar.js +3 -3
- package/dist/es2019/plugins/hyperlink/commands.js +1 -2
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +1 -1
- package/dist/es2019/plugins/layout/actions.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/plugins/media/toolbar/index.js +9 -8
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/es2019/plugins/media/toolbar/linking.js +1 -1
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -4
- package/dist/es2019/plugins/media/utils/media-files.js +4 -3
- package/dist/es2019/plugins/mentions/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/placeholder/index.js +1 -1
- package/dist/es2019/plugins/status/plugin.js +1 -1
- package/dist/es2019/plugins/unsupported-content/index.js +1 -1
- package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -4
- package/dist/es2019/utils/document.js +3 -244
- package/dist/es2019/utils/index.js +1 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +2 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/labs/next/internal/hooks/use-editor/create-editor.js +1 -1
- package/dist/esm/messages.js +2 -54
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/scroll-gutter.js +1 -1
- package/dist/esm/plugins/card/nodeviews/blockCard.js +1 -1
- package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -1
- package/dist/esm/plugins/card/pm-plugins/doc.js +2 -3
- package/dist/esm/plugins/card/pm-plugins/keymap.js +3 -3
- package/dist/esm/plugins/card/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/card/toolbar.js +7 -9
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +3 -4
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +1 -4
- package/dist/esm/plugins/card/utils.js +1 -2
- package/dist/esm/plugins/clear-marks-on-change-to-empty-document/index.js +1 -1
- package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
- package/dist/esm/plugins/date/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/emoji/index.js +1 -1
- package/dist/esm/plugins/floating-toolbar/index.js +1 -1
- package/dist/esm/plugins/hyperlink/Toolbar.js +3 -3
- package/dist/esm/plugins/hyperlink/commands.js +1 -2
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +1 -1
- package/dist/esm/plugins/layout/actions.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/plugins/media/toolbar/index.js +9 -8
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +2 -1
- package/dist/esm/plugins/media/toolbar/linking.js +1 -1
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -4
- package/dist/esm/plugins/media/utils/media-files.js +4 -3
- package/dist/esm/plugins/mentions/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/placeholder/index.js +1 -1
- package/dist/esm/plugins/status/plugin.js +1 -1
- package/dist/esm/plugins/unsupported-content/index.js +1 -1
- package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -4
- package/dist/esm/utils/document.js +6 -240
- package/dist/esm/utils/index.js +1 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/labs/next/presets/cxhtml.d.ts +3 -3
- package/dist/types/labs/next/presets/default.d.ts +1 -1
- package/dist/types/labs/next/presets/mobile.d.ts +3 -3
- package/dist/types/messages.d.ts +2 -53
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +3 -3
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/card/toolbar.d.ts +1 -1
- package/dist/types/plugins/card/types.d.ts +1 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/plugins/date/nodeviews/date.d.ts +1 -1
- package/dist/types/plugins/emoji/nodeviews/emoji.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
- package/dist/types/plugins/hyperlink/Toolbar.d.ts +1 -1
- package/dist/types/plugins/hyperlink/commands.d.ts +2 -3
- package/dist/types/plugins/hyperlink/index.d.ts +1 -1
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +0 -15
- package/dist/types/plugins/media/utils/media-files.d.ts +1 -1
- package/dist/types/plugins/mentions/nodeviews/mention.d.ts +1 -1
- package/dist/types/plugins/status/nodeviews/status.d.ts +1 -1
- package/dist/types/plugins/unsupported-content/unsupported-inline-node-view.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +0 -4
- package/dist/types/utils/document.d.ts +0 -12
- package/dist/types/utils/index.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +1 -2
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +3 -3
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +1 -1
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +3 -3
- package/dist/types-ts4.5/messages.d.ts +2 -53
- package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/nodeviews/genericCard.d.ts +3 -3
- package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types-ts4.5/plugins/date/nodeviews/date.d.ts +1 -1
- package/dist/types-ts4.5/plugins/emoji/nodeviews/emoji.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/Toolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/commands.d.ts +2 -3
- package/dist/types-ts4.5/plugins/hyperlink/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +0 -15
- package/dist/types-ts4.5/plugins/media/utils/media-files.d.ts +1 -1
- package/dist/types-ts4.5/plugins/mentions/nodeviews/mention.d.ts +1 -1
- package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +1 -1
- package/dist/types-ts4.5/plugins/unsupported-content/unsupported-inline-node-view.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/ui/LinkSearch/ToolbarComponents.d.ts +0 -4
- package/dist/types-ts4.5/utils/document.d.ts +0 -12
- package/dist/types-ts4.5/utils/index.d.ts +1 -2
- package/package.json +4 -5
- package/report.api.md +9 -34
- package/tmp/api-report-tmp.d.ts +7 -33
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +0 -227
- package/dist/cjs/plugins/hyperlink/types.js +0 -5
- package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +0 -152
- package/dist/cjs/ui/Resizer/index.js +0 -210
- package/dist/cjs/ui/Resizer/styled.js +0 -15
- package/dist/cjs/ui/Resizer/types.js +0 -5
- package/dist/cjs/ui/Resizer/utils.js +0 -21
- package/dist/cjs/utils/filter/privacy-filter.js +0 -55
- package/dist/cjs/utils/linking-utils.js +0 -84
- package/dist/cjs/utils/rich-media-utils.js +0 -130
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +0 -221
- package/dist/es2019/plugins/hyperlink/types.js +0 -1
- package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +0 -159
- package/dist/es2019/ui/Resizer/index.js +0 -191
- package/dist/es2019/ui/Resizer/styled.js +0 -15
- package/dist/es2019/ui/Resizer/types.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -12
- package/dist/es2019/utils/filter/privacy-filter.js +0 -47
- package/dist/es2019/utils/linking-utils.js +0 -74
- package/dist/es2019/utils/rich-media-utils.js +0 -108
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +0 -217
- package/dist/esm/plugins/hyperlink/types.js +0 -1
- package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +0 -144
- package/dist/esm/ui/Resizer/index.js +0 -203
- package/dist/esm/ui/Resizer/styled.js +0 -7
- package/dist/esm/ui/Resizer/types.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -12
- package/dist/esm/utils/filter/privacy-filter.js +0 -48
- package/dist/esm/utils/linking-utils.js +0 -74
- package/dist/esm/utils/rich-media-utils.js +0 -117
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +0 -24
- package/dist/types/plugins/hyperlink/types.d.ts +0 -35
- package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +0 -9
- package/dist/types/ui/Resizer/index.d.ts +0 -41
- package/dist/types/ui/Resizer/styled.d.ts +0 -2
- package/dist/types/ui/Resizer/types.d.ts +0 -26
- package/dist/types/ui/Resizer/utils.d.ts +0 -6
- package/dist/types/utils/filter/privacy-filter.d.ts +0 -9
- package/dist/types/utils/linking-utils.d.ts +0 -14
- package/dist/types/utils/rich-media-utils.d.ts +0 -8
- package/dist/types-ts4.5/nodeviews/getInlineNodeViewProducer.d.ts +0 -24
- package/dist/types-ts4.5/plugins/hyperlink/types.d.ts +0 -35
- package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +0 -9
- package/dist/types-ts4.5/ui/Resizer/index.d.ts +0 -41
- package/dist/types-ts4.5/ui/Resizer/styled.d.ts +0 -2
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +0 -26
- package/dist/types-ts4.5/ui/Resizer/utils.d.ts +0 -6
- package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +0 -9
- package/dist/types-ts4.5/utils/linking-utils.d.ts +0 -14
- package/dist/types-ts4.5/utils/rich-media-utils.d.ts +0 -8
|
@@ -18,7 +18,7 @@ import { editorMessages } from './messages';
|
|
|
18
18
|
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
19
19
|
import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
20
20
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
21
|
-
import { processRawValue } from '
|
|
21
|
+
import { processRawValue } from '@atlaskit/editor-common/utils';
|
|
22
22
|
import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
|
|
23
23
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
24
24
|
import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
|
package/dist/esm/index.js
CHANGED
|
@@ -44,7 +44,7 @@ export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } f
|
|
|
44
44
|
export { setKeyboardHeight, setMobilePaddingTop, setIsExpanded } from './plugins/mobile-dimensions/commands';
|
|
45
45
|
|
|
46
46
|
// Used in editor-test-helpers and mobile bridge
|
|
47
|
-
export { setTextSelection, dedupe, getNodesCount, measurements, hasVisibleContent
|
|
47
|
+
export { setTextSelection, dedupe, getNodesCount, measurements, hasVisibleContent } from './utils';
|
|
48
48
|
export { getListCommands } from './utils/list-commands';
|
|
49
49
|
export { ReactEditorView, BaseReactEditorView } from './create-editor';
|
|
50
50
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor';
|
|
@@ -2,7 +2,7 @@ import { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import { EditorState } from 'prosemirror-state';
|
|
3
3
|
import { EventDispatcher, createDispatch } from '../../../../../event-dispatcher';
|
|
4
4
|
import { processPluginsList, createPMPlugins } from '../../../../../create-editor/create-editor';
|
|
5
|
-
import { processRawValue } from '
|
|
5
|
+
import { processRawValue } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { createSchema } from '../../../../../create-editor/create-schema';
|
|
7
7
|
export function createEditor(_ref) {
|
|
8
8
|
var context = _ref.context,
|
package/dist/esm/messages.js
CHANGED
|
@@ -1,61 +1,9 @@
|
|
|
1
1
|
// Common Translations will live here
|
|
2
|
-
import {
|
|
3
|
-
import commonMessages, { linkMessages } from '@atlaskit/editor-common/messages';
|
|
2
|
+
import commonMessages, { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
3
|
import { messages as statusMessages } from './plugins/status/nodeviews/messages';
|
|
5
4
|
import { messages as dateMessages } from './plugins/date/nodeviews/messages';
|
|
6
5
|
export { linkMessages };
|
|
7
6
|
export { statusMessages };
|
|
8
7
|
export { dateMessages };
|
|
9
|
-
export
|
|
10
|
-
addLink: {
|
|
11
|
-
id: 'fabric.editor.mediaAddLink',
|
|
12
|
-
defaultMessage: 'Add link',
|
|
13
|
-
description: 'Add link'
|
|
14
|
-
},
|
|
15
|
-
unableToOpenLink: {
|
|
16
|
-
id: 'fabric.editor.unableToOpenLink',
|
|
17
|
-
defaultMessage: 'Unable to open this link',
|
|
18
|
-
description: 'Unable to open this link'
|
|
19
|
-
},
|
|
20
|
-
unlink: {
|
|
21
|
-
id: 'fabric.editor.unlink',
|
|
22
|
-
defaultMessage: 'Unlink',
|
|
23
|
-
description: 'Removes the hyperlink but keeps your text.'
|
|
24
|
-
},
|
|
25
|
-
editLink: {
|
|
26
|
-
id: 'fabric.editor.editLink',
|
|
27
|
-
defaultMessage: 'Edit link',
|
|
28
|
-
description: 'Edit the link, update display text'
|
|
29
|
-
},
|
|
30
|
-
placeholder: {
|
|
31
|
-
id: 'fabric.editor.hyperlinkToolbarPlaceholder',
|
|
32
|
-
defaultMessage: 'Paste or search for link',
|
|
33
|
-
description: 'Paste or search for link'
|
|
34
|
-
},
|
|
35
|
-
linkPlaceholder: {
|
|
36
|
-
id: 'fabric.editor.linkPlaceholder',
|
|
37
|
-
defaultMessage: 'Paste link',
|
|
38
|
-
description: 'Create a new link by pasting a URL.'
|
|
39
|
-
},
|
|
40
|
-
linkAddress: {
|
|
41
|
-
id: 'fabric.editor.linkAddress',
|
|
42
|
-
defaultMessage: 'Link address',
|
|
43
|
-
description: 'Insert the address of the link'
|
|
44
|
-
},
|
|
45
|
-
invalidLink: {
|
|
46
|
-
id: 'fabric.editor.invalidLink',
|
|
47
|
-
defaultMessage: 'Please enter a valid link.',
|
|
48
|
-
description: 'Please enter a valid link.'
|
|
49
|
-
},
|
|
50
|
-
emptyLink: {
|
|
51
|
-
id: 'fabric.editor.emptyLink',
|
|
52
|
-
defaultMessage: 'Please enter a link.',
|
|
53
|
-
description: 'Please enter a link.'
|
|
54
|
-
},
|
|
55
|
-
settingsLink: {
|
|
56
|
-
id: 'fabric.editor.settingsLinks',
|
|
57
|
-
defaultMessage: 'Go to Link Preferences',
|
|
58
|
-
description: 'Go to Link Preferences'
|
|
59
|
-
}
|
|
60
|
-
});
|
|
8
|
+
export { linkToolbarMessages };
|
|
61
9
|
export default commonMessages;
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
5
|
-
import { inlineNodeViewClassname } from '
|
|
5
|
+
import { inlineNodeViewClassname } from '@atlaskit/editor-common/react-node-view';
|
|
6
6
|
|
|
7
7
|
// For reasoning behind styles, see comments in:
|
|
8
8
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { isEmptyDocument } from '
|
|
2
|
+
import { isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { getMobileDimensionsPluginState } from '../../mobile-dimensions/utils';
|
|
4
4
|
export var GUTTER_SIZE_IN_PX = 120; // Default gutter size
|
|
5
5
|
export var GUTTER_SIZE_MOBILE_IN_PX = 36; // Gutter size for Mobile
|
|
@@ -14,7 +14,7 @@ import { browser } from '@atlaskit/editor-common/utils';
|
|
|
14
14
|
import PropTypes from 'prop-types';
|
|
15
15
|
import rafSchedule from 'raf-schd';
|
|
16
16
|
import { Card } from './genericCard';
|
|
17
|
-
import
|
|
17
|
+
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
18
18
|
import { registerCard } from '../pm-plugins/actions';
|
|
19
19
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
20
20
|
export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -21,7 +21,7 @@ import { DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/e
|
|
|
21
21
|
import { SelectionBasedNodeView } from '../../../nodeviews/';
|
|
22
22
|
import { registerCard } from '../pm-plugins/actions';
|
|
23
23
|
import ResizableEmbedCard from '../ui/ResizableEmbedCard';
|
|
24
|
-
import { floatingLayouts, isRichMediaInsideOfBlockNode } from '
|
|
24
|
+
import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
|
|
25
25
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
|
|
26
26
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
27
27
|
var CardInner = function CardInner(_ref) {
|
|
@@ -6,9 +6,8 @@ import { NodeSelection, TextSelection } from 'prosemirror-state';
|
|
|
6
6
|
import { closeHistory } from 'prosemirror-history';
|
|
7
7
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
8
8
|
import { addLinkMetadata } from '@atlaskit/editor-common/card';
|
|
9
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, SMART_LINK_TYPE } from '@atlaskit/editor-common/analytics';
|
|
10
|
-
import { nodesBetweenChanged, processRawValue } from '
|
|
11
|
-
import { unlinkPayload } from '../../../utils/linking-utils';
|
|
9
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD, SMART_LINK_TYPE, unlinkPayload } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import { nodesBetweenChanged, processRawValue } from '@atlaskit/editor-common/utils';
|
|
12
11
|
import { isFromCurrentDomain, getLinkCreationAnalyticsEvent } from '@atlaskit/editor-common/utils';
|
|
13
12
|
import { appearanceForNodeType, selectedCardAppearance } from '../utils';
|
|
14
13
|
import { queueCards, resolveCard } from './actions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { keymap } from 'prosemirror-keymap';
|
|
2
2
|
import { NodeSelection } from 'prosemirror-state';
|
|
3
|
-
import
|
|
3
|
+
import { bindKeymapWithCommand, moveDown, moveUp } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { findChildren, flatten } from 'prosemirror-utils';
|
|
5
5
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
6
6
|
var lookupPixel = 10;
|
|
@@ -51,8 +51,8 @@ export function cardKeymap(featureFlags) {
|
|
|
51
51
|
|
|
52
52
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1227468 introduced since Chrome 91
|
|
53
53
|
if (browser.chrome && browser.chrome_version > 90 && featureFlags.chromeCursorHandlerFixedVersion && browser.chrome_version < featureFlags.chromeCursorHandlerFixedVersion) {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
bindKeymapWithCommand(moveUp.common, selectAboveBelowInlineCard('up'), list);
|
|
55
|
+
bindKeymapWithCommand(moveDown.common, selectAboveBelowInlineCard('down'), list);
|
|
56
56
|
}
|
|
57
57
|
return keymap(list);
|
|
58
58
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import rafSchedule from 'raf-schd';
|
|
4
|
-
import { getInlineNodeViewProducer } from '
|
|
4
|
+
import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
5
5
|
import { BlockCard } from '../nodeviews/blockCard';
|
|
6
6
|
import { EmbedCard } from '../nodeviews/embedCard';
|
|
7
7
|
import { InlineCardNodeView } from '../nodeviews/inlineCard';
|
|
@@ -9,8 +9,8 @@ import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
|
9
9
|
import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
|
|
10
10
|
import CogIcon from '@atlaskit/icon/glyph/editor/settings';
|
|
11
11
|
import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
12
|
-
import {
|
|
13
|
-
import commonMessages, { linkMessages } from '@atlaskit/editor-common/messages';
|
|
12
|
+
import { buildLayoutButtons } from '@atlaskit/editor-common/card';
|
|
13
|
+
import commonMessages, { linkMessages, linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
14
14
|
import { changeSelectedCardToText } from './pm-plugins/doc';
|
|
15
15
|
import { commandWithMetadata } from '@atlaskit/editor-common/card';
|
|
16
16
|
import { pluginKey } from './pm-plugins/main';
|
|
@@ -20,10 +20,8 @@ import { displayInfoForCard, findCardInfo, titleUrlPairFromNode, appearanceForNo
|
|
|
20
20
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
21
21
|
import { LinkToolbarAppearance } from './ui/LinkToolbarAppearance';
|
|
22
22
|
import { messages } from './messages';
|
|
23
|
-
import buildLayoutButtons from '../../ui/MediaAndEmbedsToolbar';
|
|
24
|
-
import { buildOpenedSettingsPayload, buildVisitedLinkPayload } from '../../utils/linking-utils';
|
|
25
23
|
import { FLOATING_TOOLBAR_LINKPICKER_CLASSNAME } from './styles';
|
|
26
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
24
|
+
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE, buildOpenedSettingsPayload, buildVisitedLinkPayload } from '@atlaskit/editor-common/analytics';
|
|
27
25
|
export var removeCard = function removeCard(editorAnalyticsApi) {
|
|
28
26
|
return commandWithMetadata(function (state, dispatch) {
|
|
29
27
|
if (!(state.selection instanceof NodeSelection)) {
|
|
@@ -153,8 +151,8 @@ var unlinkCard = function unlinkCard(node, state, editorAnalyticsApi) {
|
|
|
153
151
|
return false;
|
|
154
152
|
};
|
|
155
153
|
};
|
|
156
|
-
var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, cardOptions) {
|
|
157
|
-
return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
|
|
154
|
+
var buildAlignmentOptions = function buildAlignmentOptions(state, intl, widthPluginDependencyApi, analyticsApi, cardOptions) {
|
|
155
|
+
return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, analyticsApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
|
|
158
156
|
};
|
|
159
157
|
var withToolbarMetadata = function withToolbarMetadata(command) {
|
|
160
158
|
return commandWithMetadata(command, {
|
|
@@ -239,8 +237,8 @@ var generateToolbarItems = function generateToolbarItems(state, featureFlags, in
|
|
|
239
237
|
onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
|
|
240
238
|
}]);
|
|
241
239
|
if (currentAppearance === 'embed') {
|
|
242
|
-
var _pluginInjectionApi$d6;
|
|
243
|
-
var alignmentOptions = buildAlignmentOptions(state, intl, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d6 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.width, cardOptions);
|
|
240
|
+
var _pluginInjectionApi$d6, _pluginInjectionApi$d7, _pluginInjectionApi$d8;
|
|
241
|
+
var alignmentOptions = buildAlignmentOptions(state, intl, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d6 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.width, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d7 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d7 === void 0 ? void 0 : (_pluginInjectionApi$d8 = _pluginInjectionApi$d7.analytics) === null || _pluginInjectionApi$d8 === void 0 ? void 0 : _pluginInjectionApi$d8.actions, cardOptions);
|
|
244
242
|
if (alignmentOptions.length) {
|
|
245
243
|
alignmentOptions.push({
|
|
246
244
|
type: 'separator'
|
|
@@ -12,14 +12,13 @@ import { withOuterListeners } from '@atlaskit/editor-common/ui';
|
|
|
12
12
|
import { commandWithMetadata } from '@atlaskit/editor-common/card';
|
|
13
13
|
import HyperlinkToolbar from '../../hyperlink/ui/HyperlinkAddToolbar';
|
|
14
14
|
import { showLinkToolbar, hideLinkToolbar as _hideLinkToolbar } from '../pm-plugins/actions';
|
|
15
|
-
import { INPUT_METHOD, ACTION } from '@atlaskit/editor-common/analytics';
|
|
16
|
-
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '
|
|
15
|
+
import { INPUT_METHOD, ACTION, buildEditLinkPayload } from '@atlaskit/editor-common/analytics';
|
|
16
|
+
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { changeSelectedCardToLink, updateCard } from '../pm-plugins/doc';
|
|
18
18
|
import { findCardInfo, displayInfoForCard } from '../utils';
|
|
19
19
|
import { NodeSelection } from 'prosemirror-state';
|
|
20
|
-
import { buildEditLinkPayload } from '../../../utils/linking-utils';
|
|
21
20
|
import { forceFocusSelector } from '../../floating-toolbar/pm-plugins/force-focus';
|
|
22
|
-
import { linkToolbarMessages } from '
|
|
21
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
23
22
|
var HyperLinkToolbarWithListeners = withOuterListeners(HyperlinkToolbar);
|
|
24
23
|
export var EditLinkToolbar = /*#__PURE__*/function (_React$Component) {
|
|
25
24
|
_inherits(EditLinkToolbar, _React$Component);
|
|
@@ -17,10 +17,7 @@ import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from 'prosemirr
|
|
|
17
17
|
import { calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
18
18
|
import { akEditorMediaResizeHandlerPaddingWide, akEditorBreakoutPadding, akEditorWideLayoutWidth, breakoutWideScaleRatio, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { embedHeaderHeight } from '@atlaskit/smart-card';
|
|
20
|
-
import { wrapperStyle } from '
|
|
21
|
-
import Resizer from '../../../ui/Resizer';
|
|
22
|
-
import { handleSides, imageAlignmentMap, snapTo } from '../../../ui/Resizer/utils';
|
|
23
|
-
import { calcMediaPxWidth } from '@atlaskit/editor-common/ui';
|
|
20
|
+
import { wrapperStyle, Resizer, handleSides, imageAlignmentMap, snapTo, calcMediaPxWidth } from '@atlaskit/editor-common/ui';
|
|
24
21
|
import { embedSpacingStyles } from './styled';
|
|
25
22
|
var ResizableEmbedCard = /*#__PURE__*/function (_React$Component) {
|
|
26
23
|
_inherits(ResizableEmbedCard, _React$Component);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NodeSelection } from 'prosemirror-state';
|
|
2
2
|
import { Slice, Fragment } from 'prosemirror-model';
|
|
3
3
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
4
|
-
import { mapChildren } from '
|
|
5
|
-
import { isSupportedInParent } from '../../utils/nodes';
|
|
4
|
+
import { isSupportedInParent, mapChildren } from '@atlaskit/editor-common/utils';
|
|
6
5
|
export var appearanceForNodeType = function appearanceForNodeType(spec) {
|
|
7
6
|
if (spec.name === 'inlineCard') {
|
|
8
7
|
return 'inline';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from 'prosemirror-state';
|
|
3
|
-
import { isEmptyDocument } from '
|
|
3
|
+
import { isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
4
4
|
export var pluginKey = new PluginKey('clearMarksOnChangeToEmptyDocumentPlugin');
|
|
5
5
|
export function createPlugin() {
|
|
6
6
|
return new SafePlugin({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
import { closeHistory } from 'prosemirror-history';
|
|
4
|
-
import { processRawValue } from '
|
|
4
|
+
import { processRawValue } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { autoformatAction } from './utils';
|
|
6
6
|
export var buildHandler = function buildHandler(_regex, handler) {
|
|
7
7
|
return /*#__PURE__*/function () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { DateNodeView } from '../nodeviews/date';
|
|
3
|
-
import { getInlineNodeViewProducer } from '
|
|
3
|
+
import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
4
4
|
import { pluginFactory } from '../../../utils/plugin-state-factory';
|
|
5
5
|
import { reducer, mapping, onSelectionChanged } from './utils';
|
|
6
6
|
import { pluginKey } from './plugin-key';
|
|
@@ -8,7 +8,7 @@ import { emoji } from '@atlaskit/adf-schema';
|
|
|
8
8
|
import { Fragment } from 'prosemirror-model';
|
|
9
9
|
import { TypeAheadAvailableNodes } from '@atlaskit/editor-common/type-ahead';
|
|
10
10
|
import { EmojiTypeAheadItem, SearchSort, recordSelectionSucceededSli, recordSelectionFailedSli } from '@atlaskit/emoji';
|
|
11
|
-
import { getInlineNodeViewProducer } from '
|
|
11
|
+
import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
12
12
|
import { inputRulePlugin as asciiInputRulePlugin } from './pm-plugins/ascii-input-rules';
|
|
13
13
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, addAnalytics, EVENT_TYPE, INPUT_METHOD } from '../analytics';
|
|
14
14
|
import { IconEmoji } from '../quick-insert/assets';
|
|
@@ -11,7 +11,7 @@ import { Popup } from '@atlaskit/editor-common/ui';
|
|
|
11
11
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
12
12
|
import WithPluginState from '../../ui/WithPluginState';
|
|
13
13
|
import { CONTENT_COMPONENT } from '../analytics/types';
|
|
14
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
14
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
15
15
|
import { pluginKey as extensionsPluginKey } from '../extension/plugin-key';
|
|
16
16
|
import { pluginKey as editorDisabledPluginKey } from '../editor-disabled';
|
|
17
17
|
import { pluginKey as dataPluginKey } from './pm-plugins/toolbar-data/plugin-key';
|
|
@@ -13,10 +13,10 @@ import OpenIcon from '@atlaskit/icon/glyph/shortcut';
|
|
|
13
13
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import { linkToolbarMessages as linkToolbarCommonMessages, linkMessages } from '../../messages';
|
|
15
15
|
import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
16
|
-
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '
|
|
16
|
+
import { LINKPICKER_HEIGHT_IN_PX, RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { HyperlinkToolbarAppearance } from './HyperlinkToolbarAppearance';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { ACTION_SUBJECT_ID, ACTION, INPUT_METHOD, buildVisitedLinkPayload, buildOpenedSettingsPayload } from '@atlaskit/editor-common/analytics';
|
|
19
|
+
import { addAnalytics } from '../analytics';
|
|
20
20
|
/* type guard for edit links */
|
|
21
21
|
function isEditLink(linkMark) {
|
|
22
22
|
return linkMark.pos !== undefined;
|
|
@@ -7,9 +7,8 @@ import { stateKey, LinkAction } from './pm-plugins/main';
|
|
|
7
7
|
import { Selection } from 'prosemirror-state';
|
|
8
8
|
import { filter } from '../../utils/commands';
|
|
9
9
|
import { addAnalytics, withAnalytics } from '../analytics';
|
|
10
|
-
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, INPUT_METHOD, EVENT_TYPE, ACTION_SUBJECT_ID, buildEditLinkPayload, unlinkPayload } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { queueCardsFromChangedTr } from '../card/pm-plugins/doc';
|
|
12
|
-
import { buildEditLinkPayload, unlinkPayload } from '../../utils/linking-utils';
|
|
13
12
|
export function isTextAtPos(pos) {
|
|
14
13
|
return function (state) {
|
|
15
14
|
var node = state.doc.nodeAt(pos);
|
|
@@ -9,7 +9,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
11
11
|
import HyperlinkAddToolbarComp from './HyperlinkAddToolbar';
|
|
12
|
-
import { INPUT_METHOD } from '
|
|
12
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
13
13
|
import { stateKey as pluginKey } from '../../pm-plugins/main';
|
|
14
14
|
import WithPluginState from '../../../../ui/WithPluginState';
|
|
15
15
|
import { EditorLinkPicker } from '../EditorLinkPicker';
|
|
@@ -5,7 +5,7 @@ import { safeInsert } from 'prosemirror-utils';
|
|
|
5
5
|
import { Fragment, Slice } from 'prosemirror-model';
|
|
6
6
|
import { TextSelection, NodeSelection } from 'prosemirror-state';
|
|
7
7
|
import { flatmap, mapChildren } from '../../utils/slice';
|
|
8
|
-
import { getStepRange, isEmptyDocument } from '
|
|
8
|
+
import { getStepRange, isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../analytics/types/enums';
|
|
10
10
|
import { addAnalytics, withAnalytics } from '../analytics/utils';
|
|
11
11
|
import { LAYOUT_TYPE } from '../analytics/types/node-events';
|
|
@@ -27,7 +27,7 @@ import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
|
27
27
|
import { findParentNodeOfTypeClosestToPos } from 'prosemirror-utils';
|
|
28
28
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
29
29
|
import { figureWrapper, MediaSingleNodeSelector } from './styles';
|
|
30
|
-
import { floatingLayouts, isRichMediaInsideOfBlockNode } from '
|
|
30
|
+
import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
|
|
31
31
|
import { getAttrsFromUrl } from '@atlaskit/media-client';
|
|
32
32
|
import { isMediaBlobUrlFromAttrs } from '../utils/media-common';
|
|
33
33
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
@@ -24,7 +24,7 @@ import { ToolTipContent } from '../../../../../keymaps';
|
|
|
24
24
|
import { closeMediaAltTextMenu, updateAltText } from '../commands';
|
|
25
25
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
26
26
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent, ACTION } from '@atlaskit/editor-common/analytics';
|
|
27
|
-
import { RECENT_SEARCH_WIDTH_IN_PX } from '
|
|
27
|
+
import { RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
28
28
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
29
29
|
import { ErrorMessage } from '@atlaskit/editor-common/ui';
|
|
30
30
|
export var CONTAINER_WIDTH_IN_PX = RECENT_SEARCH_WIDTH_IN_PX;
|
|
@@ -11,7 +11,7 @@ import { mediaFilmstripItemDOMSelector } from '@atlaskit/media-filmstrip';
|
|
|
11
11
|
import commonMessages from '../../../messages';
|
|
12
12
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
13
13
|
import { getLinkingToolbar, shouldShowMediaLinkToolbar } from './linking';
|
|
14
|
-
import buildLayoutButtons from '
|
|
14
|
+
import { buildLayoutButtons } from '@atlaskit/editor-common/card';
|
|
15
15
|
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
16
16
|
import { getPluginState as getMediaAltTextPluginState } from '../pm-plugins/alt-text';
|
|
17
17
|
import { altTextButton, getAltTextToolbar } from './alt-text';
|
|
@@ -187,7 +187,7 @@ var generateMediaInlineFloatingToolbar = function generateMediaInlineFloatingToo
|
|
|
187
187
|
return items;
|
|
188
188
|
};
|
|
189
189
|
var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToolbar(state, intl, options, pluginState, mediaLinkingState, pluginInjectionApi, getEditorFeatureFlags) {
|
|
190
|
-
var _pluginInjectionApi$
|
|
190
|
+
var _pluginInjectionApi$d3;
|
|
191
191
|
var mediaSingle = state.schema.nodes.mediaSingle;
|
|
192
192
|
var allowResizing = options.allowResizing,
|
|
193
193
|
allowLinking = options.allowLinking,
|
|
@@ -224,7 +224,8 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
if (allowAdvancedToolBarOptions) {
|
|
227
|
-
|
|
227
|
+
var _pluginInjectionApi$d;
|
|
228
|
+
toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), _toConsumableArray(buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions, allowResizing, allowResizingInTables)));
|
|
228
229
|
if (toolbarButtons.length) {
|
|
229
230
|
toolbarButtons.push({
|
|
230
231
|
type: 'separator'
|
|
@@ -245,10 +246,10 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
245
246
|
};
|
|
246
247
|
var openLink = function openLink() {
|
|
247
248
|
if (editorView) {
|
|
248
|
-
var _pluginInjectionApi$
|
|
249
|
+
var _pluginInjectionApi$d2;
|
|
249
250
|
var tr = editorView.state.tr,
|
|
250
251
|
dispatch = editorView.dispatch;
|
|
251
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
252
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions.attachAnalyticsEvent({
|
|
252
253
|
eventType: EVENT_TYPE.TRACK,
|
|
253
254
|
action: ACTION.VISITED,
|
|
254
255
|
actionSubject: ACTION_SUBJECT.MEDIA,
|
|
@@ -278,7 +279,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
278
279
|
type: 'separator'
|
|
279
280
|
});
|
|
280
281
|
}
|
|
281
|
-
var _ref = (_pluginInjectionApi$
|
|
282
|
+
var _ref = (_pluginInjectionApi$d3 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.decorations.actions) !== null && _pluginInjectionApi$d3 !== void 0 ? _pluginInjectionApi$d3 : {},
|
|
282
283
|
hoverDecoration = _ref.hoverDecoration;
|
|
283
284
|
var removeButton = {
|
|
284
285
|
id: 'editor.media.delete',
|
|
@@ -307,7 +308,7 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
307
308
|
return items;
|
|
308
309
|
};
|
|
309
310
|
export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
310
|
-
var _pluginInjectionApi$
|
|
311
|
+
var _pluginInjectionApi$d4;
|
|
311
312
|
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
312
313
|
var pluginInjectionApi = arguments.length > 3 ? arguments[3] : undefined;
|
|
313
314
|
var _state$schema$nodes = state.schema.nodes,
|
|
@@ -323,7 +324,7 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
323
324
|
getEditorFeatureFlags = options.getEditorFeatureFlags;
|
|
324
325
|
var mediaPluginState = stateKey.getState(state);
|
|
325
326
|
var mediaLinkingState = getMediaLinkingState(state);
|
|
326
|
-
var _ref2 = (_pluginInjectionApi$
|
|
327
|
+
var _ref2 = (_pluginInjectionApi$d4 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.decorations.actions) !== null && _pluginInjectionApi$d4 !== void 0 ? _pluginInjectionApi$d4 : {},
|
|
327
328
|
hoverDecoration = _ref2.hoverDecoration;
|
|
328
329
|
if (!mediaPluginState) {
|
|
329
330
|
return;
|
|
@@ -10,7 +10,8 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
|
|
|
10
10
|
import { checkMediaType } from '../utils/check-media-type';
|
|
11
11
|
import { FloatingToolbarButton as ToolbarButton } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import Separator from '../../floating-toolbar/ui/Separator';
|
|
13
|
-
import {
|
|
13
|
+
import { linkMessages } from '../../../messages';
|
|
14
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
14
15
|
import { ToolTipContent, addLink } from '../../../keymaps';
|
|
15
16
|
import { stateKey } from '../pm-plugins/plugin-key';
|
|
16
17
|
import { currentMediaNode } from '../utils/current-media-node';
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { hideLinkingToolbar, setUrlToMedia, unlink } from '../commands/linking';
|
|
6
6
|
import { getMediaLinkingState } from '../pm-plugins/linking';
|
|
7
7
|
import MediaLinkingToolbar from '../ui/MediaLinkingToolbar';
|
|
8
|
-
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '
|
|
8
|
+
import { RECENT_SEARCH_HEIGHT_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { forceFocusSelector } from '../../floating-toolbar/pm-plugins/force-focus';
|
|
10
10
|
var FORCE_FOCUS_SELECTOR = '[data-testid="add-link-button"],[data-testid="edit-link-button"]';
|
|
11
11
|
export function shouldShowMediaLinkToolbar(editorState) {
|
|
@@ -22,7 +22,7 @@ import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
|
22
22
|
import Separator from '../../floating-toolbar/ui/Separator';
|
|
23
23
|
import { container, containerWithProvider, inputWrapper } from '../../../ui/LinkSearch/ToolbarComponents';
|
|
24
24
|
import RecentSearch from '../../../ui/LinkSearch';
|
|
25
|
-
import { linkToolbarMessages } from '
|
|
25
|
+
import { linkToolbarMessages } from '@atlaskit/editor-common/messages';
|
|
26
26
|
import { normalizeUrl } from '@atlaskit/editor-common/utils';
|
|
27
27
|
import { R400 } from '@atlaskit/theme/colors';
|
|
28
28
|
import { INPUT_METHOD } from '../../analytics/types/enums';
|
|
@@ -18,10 +18,8 @@ import { getMediaClient } from '@atlaskit/media-client';
|
|
|
18
18
|
import { calcPctFromPx, calcColumnsFromPx, wrappedLayouts } from '@atlaskit/editor-common/ui';
|
|
19
19
|
import { akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
20
20
|
import { wrapperStyle } from './styled';
|
|
21
|
-
import Resizer from '
|
|
22
|
-
import {
|
|
23
|
-
import { calcMediaPxWidth } from '@atlaskit/editor-common/ui';
|
|
24
|
-
import { calculateSnapPoints } from '../../../../utils/rich-media-utils';
|
|
21
|
+
import { Resizer, calcMediaPxWidth, snapTo, handleSides, imageAlignmentMap } from '@atlaskit/editor-common/ui';
|
|
22
|
+
import { calculateSnapPoints } from '@atlaskit/editor-common/utils';
|
|
25
23
|
var ResizableMediaSingle = /*#__PURE__*/function (_React$Component) {
|
|
26
24
|
_inherits(ResizableMediaSingle, _React$Component);
|
|
27
25
|
var _super = _createSuper(ResizableMediaSingle);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Fragment } from 'prosemirror-model';
|
|
2
|
-
import { setNodeSelection, setTextSelection, insideTableCell, isInListItem, findFarthestParentNode
|
|
2
|
+
import { setNodeSelection, setTextSelection, insideTableCell, isInListItem, findFarthestParentNode } from '../../../utils';
|
|
3
|
+
import { isInLayoutColumn, isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { posOfPrecedingMediaGroup, posOfMediaGroupNearby, posOfParentMediaGroup, isSelectionNonMediaBlockNode, isInsidePotentialEmptyParagraph, copyOptionalAttrsFromMediaState } from './media-common';
|
|
4
5
|
import { canInsert, safeInsert, hasParentNode } from 'prosemirror-utils';
|
|
5
6
|
import { atTheBeginningOfBlock, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, startPositionOfParent } from '../../../utils/prosemirror/position';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { addAnalytics } from '../../analytics';
|
|
8
9
|
export var canInsertMediaInline = function canInsertMediaInline(state) {
|
|
9
10
|
var node = state.schema.nodes.mediaInline.create({});
|
|
10
11
|
return canInsert(state.selection.$to, Fragment.from(node));
|
|
@@ -3,7 +3,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
3
3
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { SLI_EVENT_TYPE, SMART_EVENT_TYPE, buildSliPayload } from '@atlaskit/mention/resource';
|
|
6
|
-
import { getInlineNodeViewProducer } from '
|
|
6
|
+
import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
7
7
|
import { MentionNodeView } from '../nodeviews/mention';
|
|
8
8
|
import { mentionPluginKey } from './key';
|
|
9
9
|
var ACTIONS = {
|
|
@@ -2,7 +2,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { PluginKey } from 'prosemirror-state';
|
|
4
4
|
import { DecorationSet, Decoration } from 'prosemirror-view';
|
|
5
|
-
import { isEmptyDocument, bracketTyped } from '
|
|
5
|
+
import { isEmptyDocument, bracketTyped } from '@atlaskit/editor-common/utils';
|
|
6
6
|
export var pluginKey = new PluginKey('placeholderPlugin');
|
|
7
7
|
import { focusStateKey } from '../base/pm-plugins/focus-handler';
|
|
8
8
|
import { isTypeAheadOpen } from '../type-ahead/utils';
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
import { NodeSelection, TextSelection } from 'prosemirror-state';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
6
|
import { pmHistoryPluginKey } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { getInlineNodeViewProducer } from '
|
|
7
|
+
import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
8
8
|
import { StatusNodeView } from './nodeviews/status';
|
|
9
9
|
import { pluginKey } from './plugin-key';
|
|
10
10
|
import { isEmptyStatus, mayGetStatusAtSelection } from './utils';
|
|
@@ -4,7 +4,7 @@ import { confluenceUnsupportedBlock, confluenceUnsupportedInline, unsupportedBlo
|
|
|
4
4
|
import { UnsupportedBlock } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { UnsupportedInlineNodeView } from './unsupported-inline-node-view';
|
|
6
6
|
import { ReactNodeView } from '../../nodeviews';
|
|
7
|
-
import { getInlineNodeViewProducer } from '
|
|
7
|
+
import { getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
|
|
8
8
|
export var pluginKey = new PluginKey('unsupportedContentPlugin');
|
|
9
9
|
var createPlugin = function createPlugin(pmPluginFactoryParams) {
|
|
10
10
|
var hasIntlContext = true;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
|
-
|
|
5
|
-
export var RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX = 360;
|
|
6
|
-
export var RECENT_SEARCH_HEIGHT_IN_PX = 360;
|
|
7
|
-
export var LINKPICKER_HEIGHT_IN_PX = 570;
|
|
4
|
+
import { RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX, RECENT_SEARCH_WIDTH_IN_PX } from '@atlaskit/editor-common/ui';
|
|
8
5
|
export var inputWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n line-height: 0;\n padding: 5px 0;\n align-items: center;\n"])));
|
|
9
6
|
export var container = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n overflow: auto;\n padding: 0;\n\n width: ", "px;\n line-height: initial;\n"])), RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX);
|
|
10
7
|
export var containerWithProvider = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n"])), RECENT_SEARCH_WIDTH_IN_PX);
|