@atlaskit/editor-common 107.31.1 → 107.32.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,26 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 107.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`cd499bc159c22`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cd499bc159c22) -
8
+ fix initial resizer width in SSR
9
+
10
+ ### Patch Changes
11
+
12
+ - [`1eba43a7b680d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1eba43a7b680d) -
13
+ [ux] ED-29000 - Address paper cut issues in ColorPalette
14
+ - Updated dependencies
15
+
16
+ ## 107.31.2
17
+
18
+ ### Patch Changes
19
+
20
+ - [`d8c6e41f4ac25`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d8c6e41f4ac25) -
21
+ EDITOR-1223 - Read nodeSize of undefined when run IW on large page with various nodes
22
+ - Updated dependencies
23
+
3
24
  ## 107.31.1
4
25
 
5
26
  ### Patch Changes
@@ -15,5 +15,10 @@ var textColorMessages = exports.textColorMessages = (0, _reactIntlNext.defineMes
15
15
  id: 'fabric.editor.textColorTooltip',
16
16
  defaultMessage: 'Text color',
17
17
  description: 'Toolip of menu that provides access to various colors of text.'
18
+ },
19
+ textColorHighlightTooltip: {
20
+ id: 'fabric.editor.textColorHighlightTooltip',
21
+ defaultMessage: 'Text and Highlight color',
22
+ description: 'Tooltip of menu that provides access to various colors of highlight.'
18
23
  }
19
24
  });
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "107.31.0";
19
+ var packageVersion = "107.31.2";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // 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 = "107.31.0";
27
+ var packageVersion = "107.31.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -15,6 +15,7 @@ var _react = _interopRequireDefault(require("react"));
15
15
  var _classnames = _interopRequireDefault(require("classnames"));
16
16
  var _reResizable = require("re-resizable");
17
17
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
18
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
19
  var _analytics = require("../../analytics");
19
20
  var _styles = require("../../styles");
20
21
  var _utils = require("../../utils");
@@ -189,13 +190,15 @@ var Resizer = exports.default = /*#__PURE__*/function (_React$Component) {
189
190
  pointerEvents: 'none'
190
191
  };
191
192
  }
193
+ var nonZeroWidth = (0, _expValEquals.expValEquals)('platform_editor_smart_card_otp', 'isEnabled', true) ? width || '100%' // In SSR width could be 0 initially
194
+ : width;
192
195
 
193
196
  // Ideally, Resizable would let you pass in the component rather than
194
197
  // the div. For now, we just apply the same styles using CSS
195
198
  return /*#__PURE__*/_react.default.createElement(_reResizable.Resizable, {
196
199
  ref: this.resizable,
197
200
  size: {
198
- width: width,
201
+ width: nonZeroWidth,
199
202
  // just content itself (no paddings)
200
203
  height: 'auto'
201
204
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -11,7 +12,9 @@ exports.hasVisibleContent = hasVisibleContent;
11
12
  exports.isEmptyDocument = isEmptyDocument;
12
13
  exports.isSelectionEndOfParagraph = exports.isReplaceDocOperation = void 0;
13
14
  exports.nodesBetweenChanged = nodesBetweenChanged;
15
+ var _clamp = _interopRequireDefault(require("lodash/clamp"));
14
16
  var _transform = require("@atlaskit/editor-prosemirror/transform");
17
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
18
  var _editorCoreUtils = require("./editor-core-utils");
16
19
  var getStepRange = exports.getStepRange = function getStepRange(transaction) {
17
20
  var from = -1;
@@ -22,6 +25,15 @@ var getStepRange = exports.getStepRange = function getStepRange(transaction) {
22
25
  var newEnd = transaction.mapping.slice(index).map(oldEnd);
23
26
  from = newStart < from || from === -1 ? newStart : from;
24
27
  to = newEnd > to || to === -1 ? newEnd : to;
28
+
29
+ // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
30
+ // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
31
+ // to see why use clamp here
32
+ if ((0, _experiments.editorExperiment)('platform_editor_ai_aifc', true)) {
33
+ var docSize = transaction.doc.content.size;
34
+ from = (0, _clamp.default)(from, 0, docSize);
35
+ to = (0, _clamp.default)(to, 0, docSize);
36
+ }
25
37
  });
26
38
  });
27
39
  if (from !== -1) {
@@ -9,5 +9,10 @@ export const textColorMessages = defineMessages({
9
9
  id: 'fabric.editor.textColorTooltip',
10
10
  defaultMessage: 'Text color',
11
11
  description: 'Toolip of menu that provides access to various colors of text.'
12
+ },
13
+ textColorHighlightTooltip: {
14
+ id: 'fabric.editor.textColorHighlightTooltip',
15
+ defaultMessage: 'Text and Highlight color',
16
+ description: 'Tooltip of menu that provides access to various colors of highlight.'
12
17
  }
13
18
  });
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "107.31.0";
4
+ const packageVersion = "107.31.2";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // 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 = "107.31.0";
17
+ const packageVersion = "107.31.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import classnames from 'classnames';
4
4
  import { Resizable } from 're-resizable';
5
5
  import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
6
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
7
8
  import { richMediaClassName } from '../../styles';
8
9
  import { gridTypeForLayout } from '../../utils';
@@ -180,13 +181,15 @@ export default class Resizer extends React.Component {
180
181
  pointerEvents: 'none'
181
182
  };
182
183
  }
184
+ const nonZeroWidth = expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) ? width || '100%' // In SSR width could be 0 initially
185
+ : width;
183
186
 
184
187
  // Ideally, Resizable would let you pass in the component rather than
185
188
  // the div. For now, we just apply the same styles using CSS
186
189
  return /*#__PURE__*/React.createElement(Resizable, {
187
190
  ref: this.resizable,
188
191
  size: {
189
- width,
192
+ width: nonZeroWidth,
190
193
  // just content itself (no paddings)
191
194
  height: 'auto'
192
195
  }
@@ -1,4 +1,6 @@
1
+ import clamp from 'lodash/clamp';
1
2
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
2
4
  import { isEmptyParagraph } from './editor-core-utils';
3
5
  export const getStepRange = transaction => {
4
6
  let from = -1;
@@ -9,6 +11,15 @@ export const getStepRange = transaction => {
9
11
  const newEnd = transaction.mapping.slice(index).map(oldEnd);
10
12
  from = newStart < from || from === -1 ? newStart : from;
11
13
  to = newEnd > to || to === -1 ? newEnd : to;
14
+
15
+ // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
16
+ // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
17
+ // to see why use clamp here
18
+ if (editorExperiment('platform_editor_ai_aifc', true)) {
19
+ const docSize = transaction.doc.content.size;
20
+ from = clamp(from, 0, docSize);
21
+ to = clamp(to, 0, docSize);
22
+ }
12
23
  });
13
24
  });
14
25
  if (from !== -1) {
@@ -9,5 +9,10 @@ export var textColorMessages = defineMessages({
9
9
  id: 'fabric.editor.textColorTooltip',
10
10
  defaultMessage: 'Text color',
11
11
  description: 'Toolip of menu that provides access to various colors of text.'
12
+ },
13
+ textColorHighlightTooltip: {
14
+ id: 'fabric.editor.textColorHighlightTooltip',
15
+ defaultMessage: 'Text and Highlight color',
16
+ description: 'Tooltip of menu that provides access to various colors of highlight.'
12
17
  }
13
18
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "107.31.0";
10
+ var packageVersion = "107.31.2";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // 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 = "107.31.0";
24
+ var packageVersion = "107.31.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -12,6 +12,7 @@ import React from 'react';
12
12
  import classnames from 'classnames';
13
13
  import { Resizable } from 're-resizable';
14
14
  import { akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
15
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
16
17
  import { richMediaClassName } from '../../styles';
17
18
  import { gridTypeForLayout } from '../../utils';
@@ -182,13 +183,15 @@ var Resizer = /*#__PURE__*/function (_React$Component) {
182
183
  pointerEvents: 'none'
183
184
  };
184
185
  }
186
+ var nonZeroWidth = expValEquals('platform_editor_smart_card_otp', 'isEnabled', true) ? width || '100%' // In SSR width could be 0 initially
187
+ : width;
185
188
 
186
189
  // Ideally, Resizable would let you pass in the component rather than
187
190
  // the div. For now, we just apply the same styles using CSS
188
191
  return /*#__PURE__*/React.createElement(Resizable, {
189
192
  ref: this.resizable,
190
193
  size: {
191
- width: width,
194
+ width: nonZeroWidth,
192
195
  // just content itself (no paddings)
193
196
  height: 'auto'
194
197
  }
@@ -1,4 +1,6 @@
1
+ import clamp from 'lodash/clamp';
1
2
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
2
4
  import { isEmptyParagraph } from './editor-core-utils';
3
5
  export var getStepRange = function getStepRange(transaction) {
4
6
  var from = -1;
@@ -9,6 +11,15 @@ export var getStepRange = function getStepRange(transaction) {
9
11
  var newEnd = transaction.mapping.slice(index).map(oldEnd);
10
12
  from = newStart < from || from === -1 ? newStart : from;
11
13
  to = newEnd > to || to === -1 ? newEnd : to;
14
+
15
+ // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
16
+ // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
17
+ // to see why use clamp here
18
+ if (editorExperiment('platform_editor_ai_aifc', true)) {
19
+ var docSize = transaction.doc.content.size;
20
+ from = clamp(from, 0, docSize);
21
+ to = clamp(to, 0, docSize);
22
+ }
12
23
  });
13
24
  });
14
25
  if (from !== -1) {
@@ -9,4 +9,9 @@ export declare const textColorMessages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ textColorHighlightTooltip: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  };
@@ -1,4 +1,4 @@
1
- import type { ResolvedPos, Node } from '@atlaskit/editor-prosemirror/model';
1
+ import type { Node, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  type ChangedFn = (node: Node, pos: number, parent: Node | null, index: number) => boolean | void;
4
4
  export declare const getStepRange: (transaction: Transaction | ReadonlyTransaction) => {
@@ -9,4 +9,9 @@ export declare const textColorMessages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ textColorHighlightTooltip: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  };
@@ -1,4 +1,4 @@
1
- import type { ResolvedPos, Node } from '@atlaskit/editor-prosemirror/model';
1
+ import type { Node, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { EditorState, ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
3
3
  type ChangedFn = (node: Node, pos: number, parent: Node | null, index: number) => boolean | void;
4
4
  export declare const getStepRange: (transaction: Transaction | ReadonlyTransaction) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.31.1",
3
+ "version": "107.32.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/"
@@ -143,7 +143,7 @@
143
143
  "@atlaskit/editor-prosemirror": "7.0.0",
144
144
  "@atlaskit/editor-shared-styles": "^3.6.0",
145
145
  "@atlaskit/editor-tables": "^2.9.0",
146
- "@atlaskit/editor-toolbar": "^0.3.0",
146
+ "@atlaskit/editor-toolbar": "^0.4.0",
147
147
  "@atlaskit/editor-toolbar-model": "^0.1.0",
148
148
  "@atlaskit/emoji": "^69.5.0",
149
149
  "@atlaskit/icon": "^28.1.0",
@@ -165,7 +165,7 @@
165
165
  "@atlaskit/platform-feature-flags": "^1.1.0",
166
166
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
167
167
  "@atlaskit/popper": "^7.1.0",
168
- "@atlaskit/primitives": "^14.11.0",
168
+ "@atlaskit/primitives": "^14.12.0",
169
169
  "@atlaskit/profilecard": "^24.7.0",
170
170
  "@atlaskit/react-ufo": "^4.5.0",
171
171
  "@atlaskit/section-message": "^8.6.0",
@@ -175,9 +175,9 @@
175
175
  "@atlaskit/status": "^3.0.0",
176
176
  "@atlaskit/task-decision": "^19.2.0",
177
177
  "@atlaskit/textfield": "^8.0.0",
178
- "@atlaskit/theme": "^19.0.0",
178
+ "@atlaskit/theme": "^20.0.0",
179
179
  "@atlaskit/tmp-editor-statsig": "^11.8.0",
180
- "@atlaskit/tokens": "^6.0.0",
180
+ "@atlaskit/tokens": "^6.1.0",
181
181
  "@atlaskit/tooltip": "^20.4.0",
182
182
  "@atlaskit/width-detector": "^5.0.0",
183
183
  "@babel/runtime": "^7.0.0",