@atlaskit/editor-plugin-metrics 17.0.11 → 17.0.13

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,17 @@
1
1
  # @atlaskit/editor-plugin-metrics
2
2
 
3
+ ## 17.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 17.0.12
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 17.0.11
4
16
 
5
17
  ### Patch Changes
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.checkTableColumnResized = void 0;
7
- var _steps = require("@atlaskit/adf-schema/steps");
7
+ var _batchAttrsStep = require("@atlaskit/adf-schema/steps/batch-attrs-step");
8
8
  var _transform = require("@atlaskit/editor-prosemirror/transform");
9
9
  var _types = require("../types");
10
10
  var checkTableColumnResized = exports.checkTableColumnResized = function checkTableColumnResized(tr) {
@@ -13,7 +13,7 @@ var checkTableColumnResized = exports.checkTableColumnResized = function checkTa
13
13
 
14
14
  // Find the step that is changing the column width
15
15
  var resizingColumnStep = steps.find(function (step) {
16
- return step instanceof _transform.AttrStep || step instanceof _steps.BatchAttrsStep;
16
+ return step instanceof _transform.AttrStep || step instanceof _batchAttrsStep.BatchAttrsStep;
17
17
  });
18
18
  if (!resizingColumnStep) {
19
19
  return undefined;
@@ -21,7 +21,7 @@ var checkTableColumnResized = exports.checkTableColumnResized = function checkTa
21
21
  var pos;
22
22
 
23
23
  // Find the position of the first column in the step that is being resized
24
- if (resizingColumnStep instanceof _steps.BatchAttrsStep) {
24
+ if (resizingColumnStep instanceof _batchAttrsStep.BatchAttrsStep) {
25
25
  if (resizingColumnStep.data.length === 0) {
26
26
  return undefined;
27
27
  }
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isTrWithDocChanges = void 0;
7
- var _steps = require("@atlaskit/adf-schema/steps");
7
+ var _batchAttrsStep = require("@atlaskit/adf-schema/steps/batch-attrs-step");
8
8
  var _transform = require("@atlaskit/editor-prosemirror/transform");
9
9
  var isTrWithDocChanges = exports.isTrWithDocChanges = function isTrWithDocChanges(tr) {
10
10
  var _tr$steps;
11
11
  return tr.steps.length > 0 && ((_tr$steps = tr.steps) === null || _tr$steps === void 0 ? void 0 : _tr$steps.some(function (step) {
12
- return step instanceof _transform.ReplaceStep || step instanceof _transform.ReplaceAroundStep || step instanceof _transform.AddMarkStep || step instanceof _transform.AttrStep || step instanceof _transform.RemoveMarkStep || step instanceof _steps.BatchAttrsStep;
12
+ return step instanceof _transform.ReplaceStep || step instanceof _transform.ReplaceAroundStep || step instanceof _transform.AddMarkStep || step instanceof _transform.AttrStep || step instanceof _transform.RemoveMarkStep || step instanceof _batchAttrsStep.BatchAttrsStep;
13
13
  }));
14
14
  };
@@ -4,18 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.shouldSkipTr = void 0;
7
- var _steps = require("@atlaskit/adf-schema/steps");
7
+ var _typeAhead = require("@atlaskit/adf-schema/steps/type-ahead");
8
+ var _linkMetaStep = require("@atlaskit/adf-schema/steps/link-meta-step");
8
9
  var _transform = require("@atlaskit/editor-prosemirror/transform");
9
10
  var isResolvingLink = function isResolvingLink(tr) {
10
11
  var _linkStep$getMetadata;
11
12
  // When links are added, there are two transactions that are fired and we want to ignore the last one where the link is resolved
12
13
  var linkStep = tr.steps.find(function (step) {
13
- return step instanceof _steps.LinkMetaStep;
14
+ return step instanceof _linkMetaStep.LinkMetaStep;
14
15
  });
15
16
  var hasReplaceStep = tr.steps.some(function (step) {
16
17
  return step instanceof _transform.ReplaceStep;
17
18
  });
18
- return Boolean(hasReplaceStep && linkStep instanceof _steps.LinkMetaStep && ((_linkStep$getMetadata = linkStep.getMetadata()) === null || _linkStep$getMetadata === void 0 ? void 0 : _linkStep$getMetadata.cardAction) === 'RESOLVE');
19
+ return Boolean(hasReplaceStep && linkStep instanceof _linkMetaStep.LinkMetaStep && ((_linkStep$getMetadata = linkStep.getMetadata()) === null || _linkStep$getMetadata === void 0 ? void 0 : _linkStep$getMetadata.cardAction) === 'RESOLVE');
19
20
  };
20
21
  var checkTypeAheadStepStage = function checkTypeAheadStepStage(tr) {
21
22
  var _tr$getMeta;
@@ -28,7 +29,7 @@ var checkTypeAheadStepStage = function checkTypeAheadStepStage(tr) {
28
29
  return false;
29
30
  }
30
31
  var insertTypeAheadStep = tr.steps.find(function (step) {
31
- return step instanceof _steps.InsertTypeAheadStep;
32
+ return step instanceof _typeAhead.InsertTypeAheadStep;
32
33
  });
33
34
  var replaceStep = tr.steps.find(function (step) {
34
35
  return step instanceof _transform.ReplaceStep;
@@ -36,7 +37,7 @@ var checkTypeAheadStepStage = function checkTypeAheadStepStage(tr) {
36
37
  if (!insertTypeAheadStep || !replaceStep) {
37
38
  return false;
38
39
  }
39
- return insertTypeAheadStep instanceof _steps.InsertTypeAheadStep && insertTypeAheadStep.stage;
40
+ return insertTypeAheadStep instanceof _typeAhead.InsertTypeAheadStep && insertTypeAheadStep.stage;
40
41
  };
41
42
  var shouldSkipTr = exports.shouldSkipTr = function shouldSkipTr(tr) {
42
43
  if (isResolvingLink(tr)) {
@@ -1,4 +1,4 @@
1
- import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
1
+ import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
2
2
  import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  import { ActionType } from '../types';
4
4
  export const checkTableColumnResized = tr => {
@@ -1,4 +1,4 @@
1
- import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
1
+ import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
2
2
  import { AddMarkStep, AttrStep, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  export const isTrWithDocChanges = tr => {
4
4
  var _tr$steps;
@@ -1,4 +1,5 @@
1
- import { InsertTypeAheadStep, LinkMetaStep } from '@atlaskit/adf-schema/steps';
1
+ import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps/type-ahead';
2
+ import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
2
3
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
4
  const isResolvingLink = tr => {
4
5
  var _linkStep$getMetadata;
@@ -1,4 +1,4 @@
1
- import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
1
+ import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
2
2
  import { AttrStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  import { ActionType } from '../types';
4
4
  export var checkTableColumnResized = function checkTableColumnResized(tr) {
@@ -1,4 +1,4 @@
1
- import { BatchAttrsStep } from '@atlaskit/adf-schema/steps';
1
+ import { BatchAttrsStep } from '@atlaskit/adf-schema/steps/batch-attrs-step';
2
2
  import { AddMarkStep, AttrStep, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  export var isTrWithDocChanges = function isTrWithDocChanges(tr) {
4
4
  var _tr$steps;
@@ -1,4 +1,5 @@
1
- import { InsertTypeAheadStep, LinkMetaStep } from '@atlaskit/adf-schema/steps';
1
+ import { InsertTypeAheadStep } from '@atlaskit/adf-schema/steps/type-ahead';
2
+ import { LinkMetaStep } from '@atlaskit/adf-schema/steps/link-meta-step';
2
3
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
3
4
  var isResolvingLink = function isResolvingLink(tr) {
4
5
  var _linkStep$getMetadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-metrics",
3
- "version": "17.0.11",
3
+ "version": "17.0.13",
4
4
  "description": "Metrics plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,49 +25,15 @@
25
25
  "@atlaskit/editor-plugin-user-preferences": "^14.0.0",
26
26
  "@atlaskit/editor-prosemirror": "^8.0.0",
27
27
  "@atlaskit/platform-feature-flags": "^2.2.0",
28
- "@atlaskit/tmp-editor-statsig": "^171.0.0",
28
+ "@atlaskit/tmp-editor-statsig": "^173.0.0",
29
29
  "@babel/runtime": "^7.0.0",
30
30
  "bind-event-listener": "^3.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@atlaskit/editor-common": "^120.10.0",
33
+ "@atlaskit/editor-common": "^120.11.0",
34
34
  "react": "^18.2.0 || ^19.2.0",
35
35
  "react-dom": "^18.2.0 || ^19.2.0"
36
36
  },
37
- "techstack": {
38
- "@atlassian/frontend": {
39
- "import-structure": [
40
- "atlassian-conventions"
41
- ],
42
- "circular-dependencies": [
43
- "file-and-folder-level"
44
- ],
45
- "code-structure": [
46
- "editor-plugin"
47
- ]
48
- },
49
- "@repo/internal": {
50
- "dom-events": "use-bind-event-listener",
51
- "analytics": [
52
- "analytics-next"
53
- ],
54
- "design-tokens": [
55
- "color"
56
- ],
57
- "theming": [
58
- "react-context"
59
- ],
60
- "ui-components": [
61
- "lite-mode"
62
- ],
63
- "deprecation": [
64
- "no-deprecated-imports"
65
- ],
66
- "styling": [
67
- "static"
68
- ]
69
- }
70
- },
71
37
  "platform-feature-flags": {
72
38
  "platform_editor_use_preferences_plugin": {
73
39
  "type": "boolean"