@atlaskit/editor-common 107.31.1 → 107.31.2

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,13 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 107.31.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d8c6e41f4ac25`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d8c6e41f4ac25) -
8
+ EDITOR-1223 - Read nodeSize of undefined when run IW on large page with various nodes
9
+ - Updated dependencies
10
+
3
11
  ## 107.31.1
4
12
 
5
13
  ### Patch Changes
@@ -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.1";
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.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -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) {
@@ -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.1";
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.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -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) {
@@ -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.1";
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.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -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) {
@@ -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) => {
@@ -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.31.2",
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/"
@@ -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",