@atlaskit/editor-plugin-media 12.9.4 → 13.1.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 +17 -0
- package/dist/cjs/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/cjs/pm-plugins/ai-generating-decoration.js +3 -3
- package/dist/es2019/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/es2019/pm-plugins/ai-generating-decoration.js +3 -3
- package/dist/esm/nodeviews/mediaNodeView/media.js +1 -1
- package/dist/esm/pm-plugins/ai-generating-decoration.js +3 -3
- package/package.json +22 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 13.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`e52fe1a335508`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e52fe1a335508) -
|
|
8
|
+
[ux] Fixed evaluating experiment as FG instead of experiment
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 13.0.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 12.9.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -113,7 +113,7 @@ var MediaNode = exports.MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
113
113
|
};
|
|
114
114
|
}));
|
|
115
115
|
(0, _defineProperty2.default)(_this, "onPreviewRender", function (fileId) {
|
|
116
|
-
if ((0,
|
|
116
|
+
if ((0, _expValEquals.expValEquals)('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true)) {
|
|
117
117
|
var _this$props$pluginInj2;
|
|
118
118
|
(_this$props$pluginInj2 = _this.props.pluginInjectionApi) === null || _this$props$pluginInj2 === void 0 || (_this$props$pluginInj2 = _this$props$pluginInj2.core) === null || _this$props$pluginInj2 === void 0 || _this$props$pluginInj2.actions.execute(function (_ref3) {
|
|
119
119
|
var tr = _ref3.tr;
|
|
@@ -134,7 +134,7 @@ function createAIGeneratingDecorationPlugin() {
|
|
|
134
134
|
var _meta$source;
|
|
135
135
|
var ids = new Map(pluginState.generatingMediaIds);
|
|
136
136
|
ids.set(meta.mediaId, (_meta$source = meta.source) !== null && _meta$source !== void 0 ? _meta$source : 'maui');
|
|
137
|
-
var _hasCwrIds = (0,
|
|
137
|
+
var _hasCwrIds = (0, _expValEquals.expValEquals)('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && (0, _toConsumableArray2.default)(ids.values()).some(function (s) {
|
|
138
138
|
return s === 'cwr';
|
|
139
139
|
});
|
|
140
140
|
var newDecoSet = buildDecorationSet(newState.doc, ids);
|
|
@@ -154,7 +154,7 @@ function createAIGeneratingDecorationPlugin() {
|
|
|
154
154
|
{
|
|
155
155
|
var _ids = new Map(pluginState.generatingMediaIds);
|
|
156
156
|
_ids.delete(meta.mediaId);
|
|
157
|
-
var _hasCwrIds2 = (0,
|
|
157
|
+
var _hasCwrIds2 = (0, _expValEquals.expValEquals)('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && (0, _toConsumableArray2.default)(_ids.values()).some(function (s) {
|
|
158
158
|
return s === 'cwr';
|
|
159
159
|
});
|
|
160
160
|
var _newDecoSet = buildDecorationSet(newState.doc, _ids);
|
|
@@ -182,7 +182,7 @@ function createAIGeneratingDecorationPlugin() {
|
|
|
182
182
|
// Rebuild decorations from scratch because CWR streaming replaces the
|
|
183
183
|
// entire document on every chunk and map() drops decorations whose
|
|
184
184
|
// positions can't be mapped.
|
|
185
|
-
var hasCwrIds = (0,
|
|
185
|
+
var hasCwrIds = (0, _expValEquals.expValEquals)('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && (0, _toConsumableArray2.default)(pluginState.generatingMediaIds.values()).some(function (s) {
|
|
186
186
|
return s === 'cwr';
|
|
187
187
|
});
|
|
188
188
|
if (tr.docChanged && hasCwrIds) {
|
|
@@ -85,7 +85,7 @@ export class MediaNode extends Component {
|
|
|
85
85
|
canUpdateVideoCaptions: fg('platform_media_video_captions') ? !!viewAndUploadMediaClientConfig : false
|
|
86
86
|
})));
|
|
87
87
|
_defineProperty(this, "onPreviewRender", fileId => {
|
|
88
|
-
if (
|
|
88
|
+
if (expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true)) {
|
|
89
89
|
var _this$props$pluginInj2, _this$props$pluginInj3;
|
|
90
90
|
(_this$props$pluginInj2 = this.props.pluginInjectionApi) === null || _this$props$pluginInj2 === void 0 ? void 0 : (_this$props$pluginInj3 = _this$props$pluginInj2.core) === null || _this$props$pluginInj3 === void 0 ? void 0 : _this$props$pluginInj3.actions.execute(({
|
|
91
91
|
tr
|
|
@@ -118,7 +118,7 @@ export function createAIGeneratingDecorationPlugin() {
|
|
|
118
118
|
var _meta$source;
|
|
119
119
|
const ids = new Map(pluginState.generatingMediaIds);
|
|
120
120
|
ids.set(meta.mediaId, (_meta$source = meta.source) !== null && _meta$source !== void 0 ? _meta$source : 'maui');
|
|
121
|
-
const hasCwrIds =
|
|
121
|
+
const hasCwrIds = expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && [...ids.values()].some(s => s === 'cwr');
|
|
122
122
|
const newDecoSet = buildDecorationSet(newState.doc, ids);
|
|
123
123
|
if (hasCwrIds && newDecoSet.find().length === 0 && ids.size > 0) {
|
|
124
124
|
// CWR fallback — keep existing decorations during transient doc absence
|
|
@@ -136,7 +136,7 @@ export function createAIGeneratingDecorationPlugin() {
|
|
|
136
136
|
{
|
|
137
137
|
const ids = new Map(pluginState.generatingMediaIds);
|
|
138
138
|
ids.delete(meta.mediaId);
|
|
139
|
-
const hasCwrIds =
|
|
139
|
+
const hasCwrIds = expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && [...ids.values()].some(s => s === 'cwr');
|
|
140
140
|
const newDecoSet = buildDecorationSet(newState.doc, ids);
|
|
141
141
|
if (hasCwrIds && newDecoSet.find().length === 0) {
|
|
142
142
|
// CWR fallback — keep existing decorations during transient doc absence
|
|
@@ -162,7 +162,7 @@ export function createAIGeneratingDecorationPlugin() {
|
|
|
162
162
|
// Rebuild decorations from scratch because CWR streaming replaces the
|
|
163
163
|
// entire document on every chunk and map() drops decorations whose
|
|
164
164
|
// positions can't be mapped.
|
|
165
|
-
const hasCwrIds =
|
|
165
|
+
const hasCwrIds = expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && [...pluginState.generatingMediaIds.values()].some(s => s === 'cwr');
|
|
166
166
|
if (tr.docChanged && hasCwrIds) {
|
|
167
167
|
const rebuilt = buildDecorationSet(newState.doc, pluginState.generatingMediaIds);
|
|
168
168
|
const prevCount = pluginState.decorationSet.find().length;
|
|
@@ -105,7 +105,7 @@ export var MediaNode = /*#__PURE__*/function (_Component) {
|
|
|
105
105
|
};
|
|
106
106
|
}));
|
|
107
107
|
_defineProperty(_this, "onPreviewRender", function (fileId) {
|
|
108
|
-
if (
|
|
108
|
+
if (expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true)) {
|
|
109
109
|
var _this$props$pluginInj2;
|
|
110
110
|
(_this$props$pluginInj2 = _this.props.pluginInjectionApi) === null || _this$props$pluginInj2 === void 0 || (_this$props$pluginInj2 = _this$props$pluginInj2.core) === null || _this$props$pluginInj2 === void 0 || _this$props$pluginInj2.actions.execute(function (_ref3) {
|
|
111
111
|
var tr = _ref3.tr;
|
|
@@ -124,7 +124,7 @@ export function createAIGeneratingDecorationPlugin() {
|
|
|
124
124
|
var _meta$source;
|
|
125
125
|
var ids = new Map(pluginState.generatingMediaIds);
|
|
126
126
|
ids.set(meta.mediaId, (_meta$source = meta.source) !== null && _meta$source !== void 0 ? _meta$source : 'maui');
|
|
127
|
-
var _hasCwrIds =
|
|
127
|
+
var _hasCwrIds = expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && _toConsumableArray(ids.values()).some(function (s) {
|
|
128
128
|
return s === 'cwr';
|
|
129
129
|
});
|
|
130
130
|
var newDecoSet = buildDecorationSet(newState.doc, ids);
|
|
@@ -144,7 +144,7 @@ export function createAIGeneratingDecorationPlugin() {
|
|
|
144
144
|
{
|
|
145
145
|
var _ids = new Map(pluginState.generatingMediaIds);
|
|
146
146
|
_ids.delete(meta.mediaId);
|
|
147
|
-
var _hasCwrIds2 =
|
|
147
|
+
var _hasCwrIds2 = expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && _toConsumableArray(_ids.values()).some(function (s) {
|
|
148
148
|
return s === 'cwr';
|
|
149
149
|
});
|
|
150
150
|
var _newDecoSet = buildDecorationSet(newState.doc, _ids);
|
|
@@ -172,7 +172,7 @@ export function createAIGeneratingDecorationPlugin() {
|
|
|
172
172
|
// Rebuild decorations from scratch because CWR streaming replaces the
|
|
173
173
|
// entire document on every chunk and map() drops decorations whose
|
|
174
174
|
// positions can't be mapped.
|
|
175
|
-
var hasCwrIds =
|
|
175
|
+
var hasCwrIds = expValEquals('aifc_page_create_with_rovo_include_infographics', 'isEnabled', true) && _toConsumableArray(pluginState.generatingMediaIds.values()).some(function (s) {
|
|
176
176
|
return s === 'cwr';
|
|
177
177
|
});
|
|
178
178
|
if (tr.docChanged && hasCwrIds) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.1.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,31 +29,31 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.16.0",
|
|
33
33
|
"@atlaskit/analytics-namespaced-context": "^7.3.0",
|
|
34
|
-
"@atlaskit/analytics-next": "^11.
|
|
34
|
+
"@atlaskit/analytics-next": "^11.3.0",
|
|
35
35
|
"@atlaskit/button": "^23.11.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.2.0",
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
38
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
39
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
40
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
41
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
42
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
43
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
44
|
-
"@atlaskit/editor-plugin-focus": "^
|
|
45
|
-
"@atlaskit/editor-plugin-grid": "^
|
|
46
|
-
"@atlaskit/editor-plugin-guideline": "^
|
|
47
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
48
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
49
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
50
|
-
"@atlaskit/editor-plugin-width": "^
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^11.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-annotation": "^11.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-connectivity": "^11.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-decorations": "^11.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-editor-disabled": "^11.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^13.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-floating-toolbar": "^13.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-focus": "^10.0.0",
|
|
45
|
+
"@atlaskit/editor-plugin-grid": "^11.0.0",
|
|
46
|
+
"@atlaskit/editor-plugin-guideline": "^11.0.0",
|
|
47
|
+
"@atlaskit/editor-plugin-interaction": "^20.0.0",
|
|
48
|
+
"@atlaskit/editor-plugin-selection": "^11.0.0",
|
|
49
|
+
"@atlaskit/editor-plugin-toolbar": "^8.0.0",
|
|
50
|
+
"@atlaskit/editor-plugin-width": "^12.0.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
52
52
|
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
53
53
|
"@atlaskit/editor-tables": "^2.10.0",
|
|
54
54
|
"@atlaskit/form": "^15.5.0",
|
|
55
|
-
"@atlaskit/icon": "^35.
|
|
56
|
-
"@atlaskit/icon-lab": "^6.
|
|
55
|
+
"@atlaskit/icon": "^35.4.0",
|
|
56
|
+
"@atlaskit/icon-lab": "^6.13.0",
|
|
57
57
|
"@atlaskit/media-card": "^80.7.0",
|
|
58
58
|
"@atlaskit/media-client": "^36.3.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^5.2.0",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
66
66
|
"@atlaskit/primitives": "^19.0.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.3.0",
|
|
68
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
68
|
+
"@atlaskit/tmp-editor-statsig": "^88.5.0",
|
|
69
69
|
"@atlaskit/tokens": "^13.1.0",
|
|
70
|
-
"@atlaskit/tooltip": "^22.
|
|
70
|
+
"@atlaskit/tooltip": "^22.6.0",
|
|
71
71
|
"@babel/runtime": "^7.0.0",
|
|
72
72
|
"@emotion/react": "^11.7.1",
|
|
73
73
|
"bind-event-listener": "^3.0.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"uuid": "^3.1.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@atlaskit/editor-common": "^
|
|
80
|
+
"@atlaskit/editor-common": "^115.1.0",
|
|
81
81
|
"@atlaskit/media-core": "^37.1.0",
|
|
82
82
|
"react": "^18.2.0",
|
|
83
83
|
"react-dom": "^18.2.0",
|
|
@@ -120,9 +120,6 @@
|
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
"platform-feature-flags": {
|
|
123
|
-
"aifc_page_create_with_rovo_include_infographics": {
|
|
124
|
-
"type": "boolean"
|
|
125
|
-
},
|
|
126
123
|
"platform_media_cross_client_copy": {
|
|
127
124
|
"type": "boolean"
|
|
128
125
|
},
|