@atlaskit/editor-common 112.5.1 → 112.6.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 112.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3107f7675ae5f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3107f7675ae5f) -
8
+ MAUI-80 Infographics insert as media node
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 112.5.2
15
+
16
+ ### Patch Changes
17
+
18
+ - [`70e3625a8ae3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/70e3625a8ae3f) -
19
+ [EDITOR-5880] updated prop name for consistency and used view.dom for stable editor reference
20
+
3
21
  ## 112.5.1
4
22
 
5
23
  ### Patch Changes
@@ -1,7 +1,10 @@
1
- import { createTransformer } from '@atlaskit/codemod-utils';
1
+ import { createTransformer, type API, type FileInfo, type Options } from '@atlaskit/codemod-utils';
2
2
 
3
3
  import { validatorExports, validatorTypes } from './migrates/entry-points';
4
4
 
5
- const transformer = createTransformer([...validatorTypes, ...validatorExports]);
5
+ const transformer: (fileInfo: FileInfo, _api: API, options: Options) => string = createTransformer([
6
+ ...validatorTypes,
7
+ ...validatorExports,
8
+ ]);
6
9
 
7
10
  export default transformer;
@@ -1,8 +1,8 @@
1
- import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
1
+ import { changeImportEntryPoint, type Collection, type JSCodeshift } from '@atlaskit/codemod-utils';
2
2
 
3
3
  const PACKAGE_NAME = '@atlaskit/editor-common';
4
4
 
5
- export const validatorExports = [
5
+ export const validatorExports: ((j: JSCodeshift, root: Collection<Node>) => void)[] = [
6
6
  'getMarksByOrder',
7
7
  'getValidContent',
8
8
  'getValidDocument',
@@ -15,7 +15,7 @@ export const validatorExports = [
15
15
  'ADFStages',
16
16
  ].map((name) => changeImportEntryPoint(`${PACKAGE_NAME}/utils`, name, `${PACKAGE_NAME}/validator`));
17
17
 
18
- export const validatorTypes = ['ADDoc', 'ADFStage', 'ADMark', 'ADMarkSimple', 'ADNode'].map(
18
+ export const validatorTypes: ((j: JSCodeshift, root: Collection<Node>) => void)[] = ['ADDoc', 'ADFStage', 'ADMark', 'ADMarkSimple', 'ADNode'].map(
19
19
  (name) =>
20
20
  changeImportEntryPoint(`${PACKAGE_NAME}/utils`, name, `${PACKAGE_NAME}/validator`, true),
21
21
  );
@@ -269,6 +269,7 @@ var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
269
269
  INPUT_METHOD["BLOCK_MENU"] = "blockMenu";
270
270
  INPUT_METHOD["SMART_LINK"] = "smartLink";
271
271
  INPUT_METHOD["ELEMENT_BROWSER"] = "elementBrowser";
272
+ INPUT_METHOD["REMIX"] = "remix";
272
273
  return INPUT_METHOD;
273
274
  }({});
274
275
  var INSERT_MEDIA_VIA = exports.INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "0.0.0-development";
22
+ var packageVersion = "112.5.2";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "0.0.0-development";
27
+ var packageVersion = "112.5.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -130,13 +130,13 @@ var calculateHorizontalPlacement = function calculateHorizontalPlacement(_ref) {
130
130
  return position;
131
131
  };
132
132
  var getPopupXInsideParent = function getPopupXInsideParent(x, popupClientWidth, popupOffsetParentClientWidth) {
133
- var minMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
133
+ var minPopupMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
134
134
  // prevent going too far right
135
135
  if (popupOffsetParentClientWidth < x + popupClientWidth) {
136
- x = popupOffsetParentClientWidth - popupClientWidth - minMargin;
136
+ x = popupOffsetParentClientWidth - popupClientWidth - minPopupMargin;
137
137
  }
138
138
  // prevent going too far left
139
- return Math.max(minMargin, x);
139
+ return Math.max(minPopupMargin, x);
140
140
  };
141
141
  var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2) {
142
142
  var target = _ref2.target,
@@ -263,6 +263,7 @@ export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
263
263
  INPUT_METHOD["BLOCK_MENU"] = "blockMenu";
264
264
  INPUT_METHOD["SMART_LINK"] = "smartLink";
265
265
  INPUT_METHOD["ELEMENT_BROWSER"] = "elementBrowser";
266
+ INPUT_METHOD["REMIX"] = "remix";
266
267
  return INPUT_METHOD;
267
268
  }({});
268
269
  export let INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "0.0.0-development";
7
+ const packageVersion = "112.5.2";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "0.0.0-development";
17
+ const packageVersion = "112.5.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -116,13 +116,13 @@ const calculateHorizontalPlacement = ({
116
116
  }
117
117
  return position;
118
118
  };
119
- const getPopupXInsideParent = (x, popupClientWidth, popupOffsetParentClientWidth, minMargin = 1) => {
119
+ const getPopupXInsideParent = (x, popupClientWidth, popupOffsetParentClientWidth, minPopupMargin = 1) => {
120
120
  // prevent going too far right
121
121
  if (popupOffsetParentClientWidth < x + popupClientWidth) {
122
- x = popupOffsetParentClientWidth - popupClientWidth - minMargin;
122
+ x = popupOffsetParentClientWidth - popupClientWidth - minPopupMargin;
123
123
  }
124
124
  // prevent going too far left
125
- return Math.max(minMargin, x);
125
+ return Math.max(minPopupMargin, x);
126
126
  };
127
127
  const calculateVerticalStickBottom = ({
128
128
  target,
@@ -263,6 +263,7 @@ export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
263
263
  INPUT_METHOD["BLOCK_MENU"] = "blockMenu";
264
264
  INPUT_METHOD["SMART_LINK"] = "smartLink";
265
265
  INPUT_METHOD["ELEMENT_BROWSER"] = "elementBrowser";
266
+ INPUT_METHOD["REMIX"] = "remix";
266
267
  return INPUT_METHOD;
267
268
  }({});
268
269
  export var INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "0.0.0-development";
13
+ var packageVersion = "112.5.2";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "0.0.0-development";
24
+ var packageVersion = "112.5.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -116,13 +116,13 @@ var calculateHorizontalPlacement = function calculateHorizontalPlacement(_ref) {
116
116
  return position;
117
117
  };
118
118
  var getPopupXInsideParent = function getPopupXInsideParent(x, popupClientWidth, popupOffsetParentClientWidth) {
119
- var minMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
119
+ var minPopupMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
120
120
  // prevent going too far right
121
121
  if (popupOffsetParentClientWidth < x + popupClientWidth) {
122
- x = popupOffsetParentClientWidth - popupClientWidth - minMargin;
122
+ x = popupOffsetParentClientWidth - popupClientWidth - minPopupMargin;
123
123
  }
124
124
  // prevent going too far left
125
- return Math.max(minMargin, x);
125
+ return Math.max(minPopupMargin, x);
126
126
  };
127
127
  var calculateVerticalStickBottom = function calculateVerticalStickBottom(_ref2) {
128
128
  var target = _ref2.target,
@@ -259,7 +259,8 @@ export declare enum INPUT_METHOD {
259
259
  SYNCED_BLOCK_TB = "syncedBlockToolbar",
260
260
  BLOCK_MENU = "blockMenu",
261
261
  SMART_LINK = "smartLink",
262
- ELEMENT_BROWSER = "elementBrowser"
262
+ ELEMENT_BROWSER = "elementBrowser",
263
+ REMIX = "remix"
263
264
  }
264
265
  export declare enum INSERT_MEDIA_VIA {
265
266
  LOCAL_UPLOAD = "localUpload",
@@ -68,7 +68,7 @@ type InsertEmojiAEP = InsertAEP<ACTION_SUBJECT_ID.EMOJI, {
68
68
  type InsertStatusAEP = InsertAEP<ACTION_SUBJECT_ID.STATUS, {
69
69
  inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.ELEMENT_BROWSER;
70
70
  }, undefined>;
71
- export type InputMethodInsertMedia = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.PICKER_CLOUD | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.BROWSER | INPUT_METHOD.MEDIA_PICKER;
71
+ export type InputMethodInsertMedia = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.PICKER_CLOUD | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.BROWSER | INPUT_METHOD.MEDIA_PICKER | INPUT_METHOD.REMIX;
72
72
  export type InsertMediaVia = INSERT_MEDIA_VIA.EXTERNAL_UPLOAD | INSERT_MEDIA_VIA.EXTERNAL_URL | INSERT_MEDIA_VIA.LOCAL_UPLOAD;
73
73
  type InsertMediaSingleAEP = InsertAEP<ACTION_SUBJECT_ID.MEDIA, {
74
74
  fileExtension?: string;
@@ -259,7 +259,8 @@ export declare enum INPUT_METHOD {
259
259
  SYNCED_BLOCK_TB = "syncedBlockToolbar",
260
260
  BLOCK_MENU = "blockMenu",
261
261
  SMART_LINK = "smartLink",
262
- ELEMENT_BROWSER = "elementBrowser"
262
+ ELEMENT_BROWSER = "elementBrowser",
263
+ REMIX = "remix"
263
264
  }
264
265
  export declare enum INSERT_MEDIA_VIA {
265
266
  LOCAL_UPLOAD = "localUpload",
@@ -68,7 +68,7 @@ type InsertEmojiAEP = InsertAEP<ACTION_SUBJECT_ID.EMOJI, {
68
68
  type InsertStatusAEP = InsertAEP<ACTION_SUBJECT_ID.STATUS, {
69
69
  inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.ELEMENT_BROWSER;
70
70
  }, undefined>;
71
- export type InputMethodInsertMedia = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.PICKER_CLOUD | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.BROWSER | INPUT_METHOD.MEDIA_PICKER;
71
+ export type InputMethodInsertMedia = INPUT_METHOD.CLIPBOARD | INPUT_METHOD.PICKER_CLOUD | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.BROWSER | INPUT_METHOD.MEDIA_PICKER | INPUT_METHOD.REMIX;
72
72
  export type InsertMediaVia = INSERT_MEDIA_VIA.EXTERNAL_UPLOAD | INSERT_MEDIA_VIA.EXTERNAL_URL | INSERT_MEDIA_VIA.LOCAL_UPLOAD;
73
73
  type InsertMediaSingleAEP = InsertAEP<ACTION_SUBJECT_ID.MEDIA, {
74
74
  fileExtension?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "112.5.1",
3
+ "version": "112.6.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -82,9 +82,9 @@
82
82
  "@atlaskit/task-decision": "^19.3.0",
83
83
  "@atlaskit/textfield": "^8.2.0",
84
84
  "@atlaskit/theme": "^22.0.0",
85
- "@atlaskit/tmp-editor-statsig": "^40.5.0",
85
+ "@atlaskit/tmp-editor-statsig": "^40.6.0",
86
86
  "@atlaskit/tokens": "^11.1.0",
87
- "@atlaskit/tooltip": "^20.14.0",
87
+ "@atlaskit/tooltip": "^21.0.0",
88
88
  "@atlaskit/width-detector": "^5.0.0",
89
89
  "@babel/runtime": "^7.0.0",
90
90
  "@compiled/react": "^0.20.0",