@atlaskit/editor-core 190.1.23 → 190.1.25

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,23 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 190.1.25
4
+
5
+ ### Patch Changes
6
+
7
+ - [#63290](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63290) [`52ea8e908f57`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/52ea8e908f57) - ED-19613: Cleaned references for feature flag: platform.editor.table-remove-update-resize-handles_djvab.
8
+ - [#63303](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63303) [`db6946b29596`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/db6946b29596) - [ux] ED-18288 Adding right offset to color palette in config panel
9
+ - [#61531](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61531) [`e543bc778081`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e543bc778081) - [ux] add ff for delete button hover selection
10
+ - [#63306](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63306) [`61970079e90c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/61970079e90c) - ED-21651 : This PR fixes the bug where copy list-in-quote should paste as list in quote. Its working for bullet but not for ordered list.
11
+ - Updated dependencies
12
+
13
+ ## 190.1.24
14
+
15
+ ### Patch Changes
16
+
17
+ - [#63488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63488) [`8fbd518c208f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8fbd518c208f) - [ED-20569] Add tooling to help the extension plugin extraction on confluence
18
+ - [#63353](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63353) [`6e9371645615`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e9371645615) - Clean up of platform.linking-platform.smart-card.cross-join feature flag
19
+ - Updated dependencies
20
+
3
21
  ## 190.1.23
4
22
 
5
23
  ### Patch Changes
@@ -39,7 +39,17 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
39
39
  onEditorDestroyed = _ref.onEditorDestroyed,
40
40
  preset = _ref.preset;
41
41
  var Component = (0, _createEditor.getUiComponent)(props.appearance);
42
- var setEditorApi = (0, _context.useSetPresetContext)();
42
+ var _setInternalEditorApi = (0, _context.useSetPresetContext)();
43
+ var setEditorApi = (0, _react.useCallback)(function (api) {
44
+ if (_setInternalEditorApi) {
45
+ _setInternalEditorApi(api);
46
+ }
47
+
48
+ // This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
49
+ // We may clean up this code when EditorActions deprecation process starts
50
+ // @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
51
+ editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
52
+ }, [_setInternalEditorApi, editorActions]);
43
53
  var overriddenEditorProps = _objectSpread(_objectSpread({}, props), {}, {
44
54
  onSave: props.onSave ? handleSave : undefined,
45
55
  // noop all analytic events, even if a handler is still passed.
@@ -536,7 +536,12 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
536
536
  getEditorState: _this.getEditorState,
537
537
  getEditorView: _this.getEditorView
538
538
  });
539
- (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, _this.pluginInjectionAPI.api());
539
+ var api = _this.pluginInjectionAPI.api();
540
+ (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, api);
541
+ if (props.editorProps.editorActions) {
542
+ // @ts-expect-error
543
+ props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
544
+ }
540
545
  _this.eventDispatcher = new _eventDispatcher.EventDispatcher();
541
546
  _this.dispatch = (0, _eventDispatcher.createDispatch)(_this.eventDispatcher);
542
547
  _this.errorReporter = (0, _createEditor.createErrorReporter)(props.editorProps.errorReporterHandler);
@@ -849,8 +849,8 @@ function handleRichText(slice, queueCardsFromChangedTr) {
849
849
  schema: schema
850
850
  });
851
851
  } else if (noNeedForSafeInsert) {
852
- var _firstChildOfSlice$ty2, _firstChildOfSlice$co;
853
- if ((firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$ty2 = firstChildOfSlice.type) === null || _firstChildOfSlice$ty2 === void 0 ? void 0 : _firstChildOfSlice$ty2.name) === 'blockquote' && (firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$co = firstChildOfSlice.content.firstChild) === null || _firstChildOfSlice$co === void 0 ? void 0 : _firstChildOfSlice$co.type.name) === ('bulletList' || 'orderedList')) {
852
+ var _firstChildOfSlice$ty2, _firstChildOfSlice$co, _firstChildOfSlice$co2;
853
+ if ((firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$ty2 = firstChildOfSlice.type) === null || _firstChildOfSlice$ty2 === void 0 ? void 0 : _firstChildOfSlice$ty2.name) === 'blockquote' && firstChildOfSlice !== null && firstChildOfSlice !== void 0 && (_firstChildOfSlice$co = firstChildOfSlice.content.firstChild) !== null && _firstChildOfSlice$co !== void 0 && _firstChildOfSlice$co.type.name && ['bulletList', 'orderedList'].includes(firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$co2 = firstChildOfSlice.content.firstChild) === null || _firstChildOfSlice$co2 === void 0 ? void 0 : _firstChildOfSlice$co2.type.name)) {
854
854
  // checks if parent node is a blockquote and child node is either a bulletlist or orderedlist
855
855
  (0, _edgeCases.insertSliceForListsInsideBlockquote)({
856
856
  tr: tr,
@@ -354,6 +354,11 @@ var ColorPicker = function ColorPicker(props) {
354
354
  width: "var(--ds-space-300, 24px)",
355
355
  height: "var(--ds-space-300, 24px)"
356
356
  }
357
+ /* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
358
+ excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */,
359
+ absoluteOffset: {
360
+ right: Number(-1.5 * getCurrentRemSize() - 1)
361
+ }
357
362
  });
358
363
  };
359
364
  var ColorPickerField = function ColorPickerField(_ref) {
@@ -395,4 +400,12 @@ var ColorPickerField = function ColorPickerField(_ref) {
395
400
  }));
396
401
  });
397
402
  };
403
+ var getCurrentRemSize = function getCurrentRemSize() {
404
+ var fallback = 16; // 16px is the default rem size for most browsers
405
+ if (typeof document === 'undefined' || typeof getComputedStyle === 'undefined') {
406
+ return fallback;
407
+ }
408
+ var value = parseFloat(getComputedStyle(document.documentElement).fontSize);
409
+ return value || fallback;
410
+ };
398
411
  var _default = exports.default = ColorPickerField;
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "190.1.23";
8
+ var version = exports.version = "190.1.25";
@@ -31,7 +31,17 @@ export const EditorInternal = /*#__PURE__*/memo(({
31
31
  }) => {
32
32
  var _props$performanceTra, _props$performanceTra2, _props$performanceTra3, _props$performanceTra4;
33
33
  const Component = getUiComponent(props.appearance);
34
- const setEditorApi = useSetPresetContext();
34
+ const _setInternalEditorApi = useSetPresetContext();
35
+ const setEditorApi = useCallback(api => {
36
+ if (_setInternalEditorApi) {
37
+ _setInternalEditorApi(api);
38
+ }
39
+
40
+ // This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
41
+ // We may clean up this code when EditorActions deprecation process starts
42
+ // @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
43
+ editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
44
+ }, [_setInternalEditorApi, editorActions]);
35
45
  const overriddenEditorProps = {
36
46
  ...props,
37
47
  onSave: props.onSave ? handleSave : undefined,
@@ -533,7 +533,12 @@ export class ReactEditorView extends React.Component {
533
533
  getEditorState: this.getEditorState,
534
534
  getEditorView: this.getEditorView
535
535
  });
536
- (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 ? void 0 : _props$setEditorApi.call(props, this.pluginInjectionAPI.api());
536
+ const api = this.pluginInjectionAPI.api();
537
+ (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 ? void 0 : _props$setEditorApi.call(props, api);
538
+ if (props.editorProps.editorActions) {
539
+ // @ts-expect-error
540
+ props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
541
+ }
537
542
  this.eventDispatcher = new EventDispatcher();
538
543
  this.dispatch = createDispatch(this.eventDispatcher);
539
544
  this.errorReporter = createErrorReporter(props.editorProps.errorReporterHandler);
@@ -831,8 +831,8 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
831
831
  schema
832
832
  });
833
833
  } else if (noNeedForSafeInsert) {
834
- var _firstChildOfSlice$ty2, _firstChildOfSlice$co;
835
- if ((firstChildOfSlice === null || firstChildOfSlice === void 0 ? void 0 : (_firstChildOfSlice$ty2 = firstChildOfSlice.type) === null || _firstChildOfSlice$ty2 === void 0 ? void 0 : _firstChildOfSlice$ty2.name) === 'blockquote' && (firstChildOfSlice === null || firstChildOfSlice === void 0 ? void 0 : (_firstChildOfSlice$co = firstChildOfSlice.content.firstChild) === null || _firstChildOfSlice$co === void 0 ? void 0 : _firstChildOfSlice$co.type.name) === ('bulletList' || 'orderedList')) {
834
+ var _firstChildOfSlice$ty2, _firstChildOfSlice$co, _firstChildOfSlice$co2;
835
+ if ((firstChildOfSlice === null || firstChildOfSlice === void 0 ? void 0 : (_firstChildOfSlice$ty2 = firstChildOfSlice.type) === null || _firstChildOfSlice$ty2 === void 0 ? void 0 : _firstChildOfSlice$ty2.name) === 'blockquote' && firstChildOfSlice !== null && firstChildOfSlice !== void 0 && (_firstChildOfSlice$co = firstChildOfSlice.content.firstChild) !== null && _firstChildOfSlice$co !== void 0 && _firstChildOfSlice$co.type.name && ['bulletList', 'orderedList'].includes(firstChildOfSlice === null || firstChildOfSlice === void 0 ? void 0 : (_firstChildOfSlice$co2 = firstChildOfSlice.content.firstChild) === null || _firstChildOfSlice$co2 === void 0 ? void 0 : _firstChildOfSlice$co2.type.name)) {
836
836
  // checks if parent node is a blockquote and child node is either a bulletlist or orderedlist
837
837
  insertSliceForListsInsideBlockquote({
838
838
  tr,
@@ -353,6 +353,11 @@ const ColorPicker = props => {
353
353
  width: "var(--ds-space-300, 24px)",
354
354
  height: "var(--ds-space-300, 24px)"
355
355
  }
356
+ /* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
357
+ excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */,
358
+ absoluteOffset: {
359
+ right: Number(-1.5 * getCurrentRemSize() - 1)
360
+ }
356
361
  });
357
362
  };
358
363
  const ColorPickerField = ({
@@ -394,4 +399,12 @@ const ColorPickerField = ({
394
399
  description: ""
395
400
  })));
396
401
  };
402
+ const getCurrentRemSize = () => {
403
+ const fallback = 16; // 16px is the default rem size for most browsers
404
+ if (typeof document === 'undefined' || typeof getComputedStyle === 'undefined') {
405
+ return fallback;
406
+ }
407
+ const value = parseFloat(getComputedStyle(document.documentElement).fontSize);
408
+ return value || fallback;
409
+ };
397
410
  export default ColorPickerField;
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "190.1.23";
2
+ export const version = "190.1.25";
@@ -33,7 +33,17 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
33
33
  onEditorDestroyed = _ref.onEditorDestroyed,
34
34
  preset = _ref.preset;
35
35
  var Component = getUiComponent(props.appearance);
36
- var setEditorApi = useSetPresetContext();
36
+ var _setInternalEditorApi = useSetPresetContext();
37
+ var setEditorApi = useCallback(function (api) {
38
+ if (_setInternalEditorApi) {
39
+ _setInternalEditorApi(api);
40
+ }
41
+
42
+ // This is an workaround to unblock Editor Lego Decoupling project, if you have questions ping us #cc-editor-lego
43
+ // We may clean up this code when EditorActions deprecation process starts
44
+ // @ts-expect-error 2339: Property '__EDITOR_INTERNALS_DO_NOT_USE__API' does not exist on type 'EditorActions<any>'.
45
+ editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
46
+ }, [_setInternalEditorApi, editorActions]);
37
47
  var overriddenEditorProps = _objectSpread(_objectSpread({}, props), {}, {
38
48
  onSave: props.onSave ? handleSave : undefined,
39
49
  // noop all analytic events, even if a handler is still passed.
@@ -530,7 +530,12 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
530
530
  getEditorState: _this.getEditorState,
531
531
  getEditorView: _this.getEditorView
532
532
  });
533
- (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, _this.pluginInjectionAPI.api());
533
+ var api = _this.pluginInjectionAPI.api();
534
+ (_props$setEditorApi = props.setEditorApi) === null || _props$setEditorApi === void 0 || _props$setEditorApi.call(props, api);
535
+ if (props.editorProps.editorActions) {
536
+ // @ts-expect-error
537
+ props.editorProps.editorActions.__EDITOR_INTERNALS_DO_NOT_USE__API = api;
538
+ }
534
539
  _this.eventDispatcher = new EventDispatcher();
535
540
  _this.dispatch = createDispatch(_this.eventDispatcher);
536
541
  _this.errorReporter = createErrorReporter(props.editorProps.errorReporterHandler);
@@ -828,8 +828,8 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
828
828
  schema: schema
829
829
  });
830
830
  } else if (noNeedForSafeInsert) {
831
- var _firstChildOfSlice$ty2, _firstChildOfSlice$co;
832
- if ((firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$ty2 = firstChildOfSlice.type) === null || _firstChildOfSlice$ty2 === void 0 ? void 0 : _firstChildOfSlice$ty2.name) === 'blockquote' && (firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$co = firstChildOfSlice.content.firstChild) === null || _firstChildOfSlice$co === void 0 ? void 0 : _firstChildOfSlice$co.type.name) === ('bulletList' || 'orderedList')) {
831
+ var _firstChildOfSlice$ty2, _firstChildOfSlice$co, _firstChildOfSlice$co2;
832
+ if ((firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$ty2 = firstChildOfSlice.type) === null || _firstChildOfSlice$ty2 === void 0 ? void 0 : _firstChildOfSlice$ty2.name) === 'blockquote' && firstChildOfSlice !== null && firstChildOfSlice !== void 0 && (_firstChildOfSlice$co = firstChildOfSlice.content.firstChild) !== null && _firstChildOfSlice$co !== void 0 && _firstChildOfSlice$co.type.name && ['bulletList', 'orderedList'].includes(firstChildOfSlice === null || firstChildOfSlice === void 0 || (_firstChildOfSlice$co2 = firstChildOfSlice.content.firstChild) === null || _firstChildOfSlice$co2 === void 0 ? void 0 : _firstChildOfSlice$co2.type.name)) {
833
833
  // checks if parent node is a blockquote and child node is either a bulletlist or orderedlist
834
834
  insertSliceForListsInsideBlockquote({
835
835
  tr: tr,
@@ -349,6 +349,11 @@ var ColorPicker = function ColorPicker(props) {
349
349
  width: "var(--ds-space-300, 24px)",
350
350
  height: "var(--ds-space-300, 24px)"
351
351
  }
352
+ /* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
353
+ excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */,
354
+ absoluteOffset: {
355
+ right: Number(-1.5 * getCurrentRemSize() - 1)
356
+ }
352
357
  });
353
358
  };
354
359
  var ColorPickerField = function ColorPickerField(_ref) {
@@ -390,4 +395,12 @@ var ColorPickerField = function ColorPickerField(_ref) {
390
395
  }));
391
396
  });
392
397
  };
398
+ var getCurrentRemSize = function getCurrentRemSize() {
399
+ var fallback = 16; // 16px is the default rem size for most browsers
400
+ if (typeof document === 'undefined' || typeof getComputedStyle === 'undefined') {
401
+ return fallback;
402
+ }
403
+ var value = parseFloat(getComputedStyle(document.documentElement).fontSize);
404
+ return value || fallback;
405
+ };
393
406
  export default ColorPickerField;
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "190.1.23";
2
+ export var version = "190.1.25";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "190.1.23",
3
+ "version": "190.1.25",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,13 +52,13 @@
52
52
  "@atlaskit/checkbox": "^13.0.0",
53
53
  "@atlaskit/date": "^0.10.0",
54
54
  "@atlaskit/datetime-picker": "^13.0.3",
55
- "@atlaskit/editor-common": "^76.29.0",
55
+ "@atlaskit/editor-common": "^76.30.0",
56
56
  "@atlaskit/editor-json-transformer": "^8.10.0",
57
57
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
58
58
  "@atlaskit/editor-plugin-alignment": "^0.1.0",
59
59
  "@atlaskit/editor-plugin-analytics": "^0.4.0",
60
60
  "@atlaskit/editor-plugin-annotation": "^0.1.0",
61
- "@atlaskit/editor-plugin-base": "^0.2.0",
61
+ "@atlaskit/editor-plugin-base": "^0.3.0",
62
62
  "@atlaskit/editor-plugin-better-type-history": "^0.1.0",
63
63
  "@atlaskit/editor-plugin-block-type": "^3.0.0",
64
64
  "@atlaskit/editor-plugin-border": "^0.1.0",
@@ -178,7 +178,7 @@
178
178
  "@af/visual-regression": "*",
179
179
  "@atlaskit/analytics-listeners": "^8.7.0",
180
180
  "@atlaskit/code": "^15.1.0",
181
- "@atlaskit/collab-provider": "9.20.6",
181
+ "@atlaskit/collab-provider": "9.20.7",
182
182
  "@atlaskit/dropdown-menu": "^12.1.0",
183
183
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
184
184
  "@atlaskit/editor-palette": "1.5.2",
@@ -258,10 +258,6 @@
258
258
  "type": "boolean",
259
259
  "referenceOnly": "true"
260
260
  },
261
- "platform.editor.table-remove-update-resize-handles_djvab": {
262
- "type": "boolean",
263
- "referenceOnly": "true"
264
- },
265
261
  "platform.editor.media.extended-resize-experience": {
266
262
  "type": "boolean"
267
263
  },
@@ -377,6 +373,10 @@
377
373
  "platform.editor.annotation.decouple-inline-comment-closed_flmox": {
378
374
  "type": "boolean",
379
375
  "referenceOnly": "true"
376
+ },
377
+ "platform.editor.table.in-danger-hover-merged-cells-fix": {
378
+ "type": "boolean",
379
+ "referenceOnly": "true"
380
380
  }
381
381
  }
382
382
  }