@atlaskit/editor-plugin-media 4.1.5 → 5.0.0
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 +49 -0
- package/dist/cjs/nodeviews/mediaSingle.js +1 -2
- package/dist/cjs/nodeviews/toDOM-fixes/toDOMAttrs.js +2 -1
- package/dist/es2019/nodeviews/mediaSingle.js +1 -2
- package/dist/es2019/nodeviews/toDOM-fixes/toDOMAttrs.js +2 -1
- package/dist/esm/nodeviews/mediaSingle.js +1 -2
- package/dist/esm/nodeviews/toDOM-fixes/toDOMAttrs.js +2 -1
- package/dist/types/nodeviews/toDOM-fixes/toDOMAttrs.d.ts +1 -0
- package/dist/types/pm-plugins/pixel-resizing/commands.d.ts +1 -1
- package/dist/types/ui/toolbar/alt-text.d.ts +1 -1
- package/dist/types/ui/toolbar/pixel-resizing.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/toDOMAttrs.d.ts +1 -0
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/commands.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/alt-text.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/pixel-resizing.d.ts +2 -2
- package/package.json +16 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#181024](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181024)
|
|
8
|
+
[`8e80c487ca307`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e80c487ca307) - ##
|
|
9
|
+
Make `@atlaskit/editor-common` a peer dependency
|
|
10
|
+
|
|
11
|
+
**WHAT:** `@atlaskit/editor-common` has been moved from `dependencies` to `peerDependencies` in
|
|
12
|
+
all editor plugin packages.
|
|
13
|
+
|
|
14
|
+
**WHY:** This change ensures that only a single version of `@atlaskit/editor-common` is used in
|
|
15
|
+
consuming applications, preventing issues caused by multiple versions of singleton libraries (such
|
|
16
|
+
as context mismatches or duplicated state). This is especially important for packages that rely on
|
|
17
|
+
shared context or singletons.
|
|
18
|
+
|
|
19
|
+
**HOW TO ADJUST:**
|
|
20
|
+
|
|
21
|
+
- Consumers must now explicitly install `@atlaskit/editor-common` in their own project if they use
|
|
22
|
+
any of these editor plugins.
|
|
23
|
+
- Ensure the version you install matches the version required by the plugins.
|
|
24
|
+
- You can use the
|
|
25
|
+
[`check-peer-dependencies`](https://www.npmjs.com/package/check-peer-dependencies) package to
|
|
26
|
+
verify that all required peer dependencies are installed and compatible.
|
|
27
|
+
- Example install command:
|
|
28
|
+
```
|
|
29
|
+
npm install @atlaskit/editor-common
|
|
30
|
+
```
|
|
31
|
+
or
|
|
32
|
+
```
|
|
33
|
+
yarn add @atlaskit/editor-common
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Note:** This is a breaking change. If `@atlaskit/editor-common` is not installed at the
|
|
37
|
+
application level, you may see errors or unexpected behavior.
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
|
|
43
|
+
## 4.1.6
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
|
|
48
|
+
[`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
|
|
49
|
+
ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
|
|
50
|
+
- Updated dependencies
|
|
51
|
+
|
|
3
52
|
## 4.1.5
|
|
4
53
|
|
|
5
54
|
### Patch Changes
|
|
@@ -19,7 +19,6 @@ var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
|
19
19
|
var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
|
|
20
20
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
21
21
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
22
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
23
|
var _main = require("../pm-plugins/main");
|
|
25
24
|
var _mediaSingleNext = require("./mediaSingleNext");
|
|
@@ -106,7 +105,7 @@ var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref) {
|
|
|
106
105
|
mediaOptions: mediaOptions,
|
|
107
106
|
view: view,
|
|
108
107
|
fullWidthMode: fullWidthMode,
|
|
109
|
-
selected:
|
|
108
|
+
selected: isSelectedAndInteracted,
|
|
110
109
|
eventDispatcher: eventDispatcher,
|
|
111
110
|
addPendingTask: addPendingTask,
|
|
112
111
|
isDrafting: isDrafting,
|
|
@@ -75,6 +75,7 @@ var getAttrsFromNodeMediaSingle = exports.getAttrsFromNodeMediaSingle = function
|
|
|
75
75
|
}
|
|
76
76
|
var widthType = node.attrs.widthType;
|
|
77
77
|
return _objectSpread(_objectSpread({}, attrs), {}, {
|
|
78
|
-
'data-width-type': widthType || 'percentage'
|
|
78
|
+
'data-width-type': widthType || 'percentage',
|
|
79
|
+
'data-media-vc-wrapper': 'true'
|
|
79
80
|
});
|
|
80
81
|
};
|
|
@@ -13,7 +13,6 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
|
13
13
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
14
14
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
15
15
|
import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
17
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
19
18
|
import { MediaSingleNodeNext } from './mediaSingleNext';
|
|
@@ -92,7 +91,7 @@ const MediaSingleNodeWrapper = ({
|
|
|
92
91
|
mediaOptions: mediaOptions,
|
|
93
92
|
view: view,
|
|
94
93
|
fullWidthMode: fullWidthMode,
|
|
95
|
-
selected:
|
|
94
|
+
selected: isSelectedAndInteracted,
|
|
96
95
|
eventDispatcher: eventDispatcher,
|
|
97
96
|
addPendingTask: addPendingTask,
|
|
98
97
|
isDrafting: isDrafting,
|
|
@@ -63,6 +63,7 @@ export const getAttrsFromNodeMediaSingle = (withExtendedWidthTypes, node) => {
|
|
|
63
63
|
} = node.attrs;
|
|
64
64
|
return {
|
|
65
65
|
...attrs,
|
|
66
|
-
'data-width-type': widthType || 'percentage'
|
|
66
|
+
'data-width-type': widthType || 'percentage',
|
|
67
|
+
'data-media-vc-wrapper': 'true'
|
|
67
68
|
};
|
|
68
69
|
};
|
|
@@ -22,7 +22,6 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
|
22
22
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
23
23
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
24
24
|
import { isNodeSelectedOrInRange } from '@atlaskit/editor-common/utils';
|
|
25
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
25
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
26
|
import { MEDIA_CONTENT_WRAP_CLASS_NAME } from '../pm-plugins/main';
|
|
28
27
|
import { MediaSingleNodeNext } from './mediaSingleNext';
|
|
@@ -102,7 +101,7 @@ var MediaSingleNodeWrapper = function MediaSingleNodeWrapper(_ref) {
|
|
|
102
101
|
mediaOptions: mediaOptions,
|
|
103
102
|
view: view,
|
|
104
103
|
fullWidthMode: fullWidthMode,
|
|
105
|
-
selected:
|
|
104
|
+
selected: isSelectedAndInteracted,
|
|
106
105
|
eventDispatcher: eventDispatcher,
|
|
107
106
|
addPendingTask: addPendingTask,
|
|
108
107
|
isDrafting: isDrafting,
|
|
@@ -69,6 +69,7 @@ export var getAttrsFromNodeMediaSingle = function getAttrsFromNodeMediaSingle(wi
|
|
|
69
69
|
}
|
|
70
70
|
var widthType = node.attrs.widthType;
|
|
71
71
|
return _objectSpread(_objectSpread({}, attrs), {}, {
|
|
72
|
-
'data-width-type': widthType || 'percentage'
|
|
72
|
+
'data-width-type': widthType || 'percentage',
|
|
73
|
+
'data-media-vc-wrapper': 'true'
|
|
73
74
|
});
|
|
74
75
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import { type Transaction, type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
export declare const openPixelEditor: () => import("@atlaskit/editor-common/types").Command;
|
|
3
3
|
export declare const closePixelEditor: () => import("@atlaskit/editor-common/types").Command;
|
|
4
4
|
export declare const closePixelEditorAndSave: (saveTransform: (tr: Transaction, state: EditorState) => Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -2,7 +2,7 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Command, FloatingToolbarButton, FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
5
|
-
import { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
import { type NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { MediaToolbarBaseConfig } from '../../types';
|
|
8
8
|
export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IntlShape } from 'react-intl-next';
|
|
2
2
|
import { type FloatingToolbarConfig, type FloatingToolbarOverflowDropdownOptions, type Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import { type NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type Props } from '../../pm-plugins/pixel-resizing/ui';
|
|
6
6
|
import type { MediaOptions, MediaToolbarBaseConfig } from '../../types';
|
|
7
7
|
export declare const getPixelResizingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, { pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Omit<Props, 'editorView' | 'selectedMediaSingleNode'>) => FloatingToolbarConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
1
|
+
import { type Transaction, type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
export declare const openPixelEditor: () => import("@atlaskit/editor-common/types").Command;
|
|
3
3
|
export declare const closePixelEditor: () => import("@atlaskit/editor-common/types").Command;
|
|
4
4
|
export declare const closePixelEditorAndSave: (saveTransform: (tr: Transaction, state: EditorState) => Transaction) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -2,7 +2,7 @@ import type { IntlShape } from 'react-intl-next';
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Command, FloatingToolbarButton, FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
5
|
-
import { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
import { type NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import type { MediaToolbarBaseConfig } from '../../types';
|
|
8
8
|
export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IntlShape } from 'react-intl-next';
|
|
2
2
|
import { type FloatingToolbarConfig, type FloatingToolbarOverflowDropdownOptions, type Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import { type NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type Props } from '../../pm-plugins/pixel-resizing/ui';
|
|
6
6
|
import type { MediaOptions, MediaToolbarBaseConfig } from '../../types';
|
|
7
7
|
export declare const getPixelResizingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, { pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Omit<Props, 'editorView' | 'selectedMediaSingleNode'>) => FloatingToolbarConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,21 +37,20 @@
|
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
39
39
|
"@atlaskit/button": "^23.2.0",
|
|
40
|
-
"@atlaskit/editor-common": "^107.4.0",
|
|
41
40
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
42
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
43
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
44
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
45
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
46
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
47
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
48
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
49
|
-
"@atlaskit/editor-plugin-focus": "^
|
|
50
|
-
"@atlaskit/editor-plugin-grid": "^
|
|
51
|
-
"@atlaskit/editor-plugin-guideline": "^
|
|
52
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
53
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
54
|
-
"@atlaskit/editor-plugin-width": "^
|
|
41
|
+
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-annotation": "^3.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-connectivity": "^3.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-decorations": "^3.0.0",
|
|
45
|
+
"@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
|
|
46
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
47
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^5.0.0",
|
|
48
|
+
"@atlaskit/editor-plugin-focus": "^2.0.0",
|
|
49
|
+
"@atlaskit/editor-plugin-grid": "^3.0.0",
|
|
50
|
+
"@atlaskit/editor-plugin-guideline": "^3.0.0",
|
|
51
|
+
"@atlaskit/editor-plugin-interaction": "^4.0.0",
|
|
52
|
+
"@atlaskit/editor-plugin-selection": "^3.0.0",
|
|
53
|
+
"@atlaskit/editor-plugin-width": "^4.0.0",
|
|
55
54
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
56
55
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
57
56
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
"@atlaskit/primitives": "^14.10.0",
|
|
71
70
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
71
|
"@atlaskit/theme": "^18.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^8.7.0",
|
|
74
73
|
"@atlaskit/tokens": "^5.4.0",
|
|
75
74
|
"@atlaskit/tooltip": "^20.3.0",
|
|
76
75
|
"@babel/runtime": "^7.0.0",
|
|
@@ -85,6 +84,7 @@
|
|
|
85
84
|
"typescript": "~5.4.2"
|
|
86
85
|
},
|
|
87
86
|
"peerDependencies": {
|
|
87
|
+
"@atlaskit/editor-common": "^107.6.0",
|
|
88
88
|
"@atlaskit/media-core": "^37.0.0",
|
|
89
89
|
"react": "^18.2.0",
|
|
90
90
|
"react-dom": "^18.2.0",
|
|
@@ -175,9 +175,6 @@
|
|
|
175
175
|
"platform_editor_fix_image_size_diff_during_ssr": {
|
|
176
176
|
"type": "boolean"
|
|
177
177
|
},
|
|
178
|
-
"platform_editor_no_cursor_on_live_doc_init": {
|
|
179
|
-
"type": "boolean"
|
|
180
|
-
},
|
|
181
178
|
"platform_editor_track_media_fail_to_insert": {
|
|
182
179
|
"type": "boolean"
|
|
183
180
|
},
|