@atlaskit/editor-plugin-extension 32.0.3 → 32.0.5
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
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 32.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b3d3cec87b96b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b3d3cec87b96b) -
|
|
8
|
+
Remove the `platform_forge_inline_bodied_macro` feature gate and keep its enabled behavior. The
|
|
9
|
+
separate inline-bodied layout switch continues to control layout support.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 32.0.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 32.0.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.getEditInLegacyMacroBrowser = exports.createExtensionAPI = void 0;
|
|
8
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
10
|
var _validator = require("@atlaskit/adf-utils/validator");
|
|
11
11
|
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
12
12
|
var _autojoin = require("@atlaskit/editor-common/utils/autojoin");
|
|
@@ -15,7 +15,6 @@ var _JSONTransformer = require("@atlaskit/editor-json-transformer/JSONTransforme
|
|
|
15
15
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
16
16
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
17
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
18
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
18
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
19
|
var _commands = require("../editor-commands/commands");
|
|
21
20
|
var _actions = require("./macro/actions");
|
|
@@ -169,9 +168,6 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
|
|
|
169
168
|
dispatch(tr);
|
|
170
169
|
},
|
|
171
170
|
insertAtSelection: function insertAtSelection(adf) {
|
|
172
|
-
if (!(0, _fg.fg)('platform_forge_inline_bodied_macro')) {
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
171
|
try {
|
|
176
172
|
validate(adf);
|
|
177
173
|
} catch (_unused) {
|
|
@@ -231,9 +227,8 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
|
|
|
231
227
|
state = _options$editorView3.state;
|
|
232
228
|
var tr = state.tr,
|
|
233
229
|
schema = state.schema;
|
|
234
|
-
var changedValues = mutationCallback(
|
|
235
|
-
type: node.type.name
|
|
236
|
-
} : {}), {}, {
|
|
230
|
+
var changedValues = mutationCallback({
|
|
231
|
+
type: node.type.name,
|
|
237
232
|
content: (0, _nodes.nodeToJSON)(node).content,
|
|
238
233
|
attrs: node.attrs,
|
|
239
234
|
marks: node.marks.map(function (pmMark) {
|
|
@@ -242,7 +237,7 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
|
|
|
242
237
|
attrs: pmMark.attrs
|
|
243
238
|
};
|
|
244
239
|
})
|
|
245
|
-
})
|
|
240
|
+
});
|
|
246
241
|
var ensureValidMark = function ensureValidMark(mark) {
|
|
247
242
|
if ((0, _typeof2.default)(mark) !== 'object' || Array.isArray(mark)) {
|
|
248
243
|
throw new Error("update(): Invalid mark given.");
|
|
@@ -269,7 +264,7 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
|
|
|
269
264
|
}) : node.marks;
|
|
270
265
|
var newContent = changedValues.hasOwnProperty('content') ? _model.Fragment.fromJSON(schema, changedValues.content) : node.content;
|
|
271
266
|
var newType = node.type;
|
|
272
|
-
if (changedValues.hasOwnProperty('type') && changedValues.type !== node.type.name
|
|
267
|
+
if (changedValues.hasOwnProperty('type') && changedValues.type !== node.type.name) {
|
|
273
268
|
newType = changedValues.type ? schema.nodes[changedValues.type] : undefined;
|
|
274
269
|
}
|
|
275
270
|
if (!newType) {
|
|
@@ -6,7 +6,6 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransform
|
|
|
6
6
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { setEditingContextToContextPanel } from '../editor-commands/commands';
|
|
12
11
|
import { insertMacroFromMacroBrowser } from './macro/actions';
|
|
@@ -171,9 +170,6 @@ export const createExtensionAPI = options => {
|
|
|
171
170
|
dispatch(tr);
|
|
172
171
|
},
|
|
173
172
|
insertAtSelection: adf => {
|
|
174
|
-
if (!fg('platform_forge_inline_bodied_macro')) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
173
|
try {
|
|
178
174
|
validate(adf);
|
|
179
175
|
} catch {
|
|
@@ -246,9 +242,7 @@ export const createExtensionAPI = options => {
|
|
|
246
242
|
schema
|
|
247
243
|
} = state;
|
|
248
244
|
const changedValues = mutationCallback({
|
|
249
|
-
|
|
250
|
-
type: node.type.name
|
|
251
|
-
} : {}),
|
|
245
|
+
type: node.type.name,
|
|
252
246
|
content: nodeToJSON(node).content,
|
|
253
247
|
attrs: node.attrs,
|
|
254
248
|
marks: node.marks.map(pmMark => ({
|
|
@@ -282,7 +276,7 @@ export const createExtensionAPI = options => {
|
|
|
282
276
|
}) => mark.create(attrs)) : node.marks;
|
|
283
277
|
const newContent = changedValues.hasOwnProperty('content') ? Fragment.fromJSON(schema, changedValues.content) : node.content;
|
|
284
278
|
let newType = node.type;
|
|
285
|
-
if (changedValues.hasOwnProperty('type') && changedValues.type !== node.type.name
|
|
279
|
+
if (changedValues.hasOwnProperty('type') && changedValues.type !== node.type.name) {
|
|
286
280
|
newType = changedValues.type ? schema.nodes[changedValues.type] : undefined;
|
|
287
281
|
}
|
|
288
282
|
if (!newType) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
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 { validator } from '@atlaskit/adf-utils/validator';
|
|
@@ -10,7 +10,6 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransform
|
|
|
10
10
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import { setEditingContextToContextPanel } from '../editor-commands/commands';
|
|
16
15
|
import { insertMacroFromMacroBrowser } from './macro/actions';
|
|
@@ -162,9 +161,6 @@ export var createExtensionAPI = function createExtensionAPI(options) {
|
|
|
162
161
|
dispatch(tr);
|
|
163
162
|
},
|
|
164
163
|
insertAtSelection: function insertAtSelection(adf) {
|
|
165
|
-
if (!fg('platform_forge_inline_bodied_macro')) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
164
|
try {
|
|
169
165
|
validate(adf);
|
|
170
166
|
} catch (_unused) {
|
|
@@ -224,9 +220,8 @@ export var createExtensionAPI = function createExtensionAPI(options) {
|
|
|
224
220
|
state = _options$editorView3.state;
|
|
225
221
|
var tr = state.tr,
|
|
226
222
|
schema = state.schema;
|
|
227
|
-
var changedValues = mutationCallback(
|
|
228
|
-
type: node.type.name
|
|
229
|
-
} : {}), {}, {
|
|
223
|
+
var changedValues = mutationCallback({
|
|
224
|
+
type: node.type.name,
|
|
230
225
|
content: nodeToJSON(node).content,
|
|
231
226
|
attrs: node.attrs,
|
|
232
227
|
marks: node.marks.map(function (pmMark) {
|
|
@@ -235,7 +230,7 @@ export var createExtensionAPI = function createExtensionAPI(options) {
|
|
|
235
230
|
attrs: pmMark.attrs
|
|
236
231
|
};
|
|
237
232
|
})
|
|
238
|
-
})
|
|
233
|
+
});
|
|
239
234
|
var ensureValidMark = function ensureValidMark(mark) {
|
|
240
235
|
if (_typeof(mark) !== 'object' || Array.isArray(mark)) {
|
|
241
236
|
throw new Error("update(): Invalid mark given.");
|
|
@@ -262,7 +257,7 @@ export var createExtensionAPI = function createExtensionAPI(options) {
|
|
|
262
257
|
}) : node.marks;
|
|
263
258
|
var newContent = changedValues.hasOwnProperty('content') ? Fragment.fromJSON(schema, changedValues.content) : node.content;
|
|
264
259
|
var newType = node.type;
|
|
265
|
-
if (changedValues.hasOwnProperty('type') && changedValues.type !== node.type.name
|
|
260
|
+
if (changedValues.hasOwnProperty('type') && changedValues.type !== node.type.name) {
|
|
266
261
|
newType = changedValues.type ? schema.nodes[changedValues.type] : undefined;
|
|
267
262
|
}
|
|
268
263
|
if (!newType) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "32.0.
|
|
3
|
+
"version": "32.0.5",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/button": "^25.6.0",
|
|
35
35
|
"@atlaskit/checkbox": "^19.3.0",
|
|
36
36
|
"@atlaskit/code": "^20.0.0",
|
|
37
|
-
"@atlaskit/datetime-picker": "^19.
|
|
37
|
+
"@atlaskit/datetime-picker": "^19.4.0",
|
|
38
38
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^29.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-block-menu": "^28.0.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/editor-shared-styles": "^4.6.0",
|
|
52
52
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
53
53
|
"@atlaskit/empty-state": "^12.2.0",
|
|
54
|
-
"@atlaskit/form": "^18.
|
|
54
|
+
"@atlaskit/form": "^18.3.0",
|
|
55
55
|
"@atlaskit/heading": "^8.0.0",
|
|
56
56
|
"@atlaskit/icon": "^38.0.0",
|
|
57
57
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -64,14 +64,14 @@
|
|
|
64
64
|
"@atlaskit/react-select": "^4.12.0",
|
|
65
65
|
"@atlaskit/section-message": "^10.2.0",
|
|
66
66
|
"@atlaskit/select": "^23.1.0",
|
|
67
|
-
"@atlaskit/smart-user-picker": "^12.
|
|
67
|
+
"@atlaskit/smart-user-picker": "^12.7.0",
|
|
68
68
|
"@atlaskit/spinner": "^20.4.0",
|
|
69
69
|
"@atlaskit/tabs": "^21.3.0",
|
|
70
70
|
"@atlaskit/textarea": "^10.2.0",
|
|
71
71
|
"@atlaskit/textfield": "^10.2.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^246.1.0",
|
|
73
73
|
"@atlaskit/toggle": "^17.3.0",
|
|
74
|
-
"@atlaskit/tokens": "^20.
|
|
74
|
+
"@atlaskit/tokens": "^20.8.0",
|
|
75
75
|
"@atlaskit/tooltip": "^24.4.0",
|
|
76
76
|
"@atlaskit/user-picker": "^14.3.0",
|
|
77
77
|
"@babel/runtime": "^7.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"uuid": "^11.1.1"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"@atlaskit/editor-common": "^133.
|
|
88
|
+
"@atlaskit/editor-common": "^133.7.0",
|
|
89
89
|
"react": "^18.2.0 || ^19.2.0",
|
|
90
90
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
91
91
|
},
|
|
@@ -100,9 +100,6 @@
|
|
|
100
100
|
"cc_maui_annotations_on_extensions": {
|
|
101
101
|
"type": "boolean"
|
|
102
102
|
},
|
|
103
|
-
"platform_forge_inline_bodied_macro": {
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
103
|
"platform_editor_ai_object_sidebar_injection": {
|
|
107
104
|
"type": "boolean"
|
|
108
105
|
},
|