@atlaskit/editor-plugin-annotation 1.26.0 → 1.26.1

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,15 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 1.26.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#175552](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175552)
8
+ [`b29361001f720`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b29361001f720) -
9
+ refactor: remediate re-exports in editor-plugin-ai-definitions, editor-plugin-alignment,
10
+ editor-plugin-analytics, editor-plugin-annotation
11
+ - Updated dependencies
12
+
3
13
  ## 1.26.0
4
14
 
5
15
  ### Minor Changes
@@ -4,17 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "AnnotationUpdateEmitter", {
8
- enumerable: true,
9
- get: function get() {
10
- return _annotation.AnnotationUpdateEmitter;
11
- }
12
- });
13
7
  exports.annotationPlugin = void 0;
14
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
9
  var _react = _interopRequireDefault(require("react"));
16
10
  var _adfSchema = require("@atlaskit/adf-schema");
17
- var _annotation = require("@atlaskit/editor-common/annotation");
18
11
  var _hooks = require("@atlaskit/editor-common/hooks");
19
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
13
  var _editorCommands = require("./editor-commands");
@@ -5,20 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.addDraftDecoration = void 0;
7
7
  exports.annotationExists = annotationExists;
8
- Object.defineProperty(exports, "containsAnyAnnotations", {
9
- enumerable: true,
10
- get: function get() {
11
- return _utils.containsAnyAnnotations;
12
- }
13
- });
14
8
  exports.getPluginState = exports.getDraftCommandAnalyticsPayload = exports.getAnnotationViewKey = exports.getAllAnnotations = exports.findAnnotationsInSelection = exports.decorationKey = void 0;
15
9
  exports.getSelectionPositions = getSelectionPositions;
16
- Object.defineProperty(exports, "hasAnnotationMark", {
17
- enumerable: true,
18
- get: function get() {
19
- return _utils.hasAnnotationMark;
20
- }
21
- });
22
10
  exports.hasInvalidNodes = void 0;
23
11
  exports.hasInvalidWhitespaceNode = hasInvalidWhitespaceNode;
24
12
  exports.isCurrentBlockNodeSelected = exports.isBlockNodeAnnotationsSelected = exports.inlineCommentPluginKey = void 0;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { annotation } from '@atlaskit/adf-schema';
3
- import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
4
3
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
@@ -133,5 +132,4 @@ function AnnotationContentComponent({
133
132
  editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions,
134
133
  editorAPI: api
135
134
  }));
136
- }
137
- export { AnnotationUpdateEmitter };
135
+ }
@@ -1 +1,4 @@
1
+ // Disable no-re-export rule for entry point files
2
+ /* eslint-disable @atlaskit/editor/no-re-export */
3
+
1
4
  export { annotationPlugin } from './annotationPlugin';
@@ -2,12 +2,11 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
3
3
  import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
4
4
  import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
5
- import { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection, isParagraph, isText } from '@atlaskit/editor-common/utils';
5
+ import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection, isParagraph, isText } from '@atlaskit/editor-common/utils';
6
6
  import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { AnnotationSelectionType } from '../types';
10
- export { hasAnnotationMark, containsAnyAnnotations };
11
10
  function sum(arr, f) {
12
11
  return arr.reduce((val, x) => val + f(x), 0);
13
12
  }
@@ -3,7 +3,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import React from 'react';
5
5
  import { annotation } from '@atlaskit/adf-schema';
6
- import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
7
6
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
8
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { setInlineCommentDraftState, showInlineCommentForBlockNode } from './editor-commands';
@@ -130,5 +129,4 @@ function AnnotationContentComponent(_ref4) {
130
129
  editorAnalyticsAPI: api === null || api === void 0 || (_api$analytics5 = api.analytics) === null || _api$analytics5 === void 0 ? void 0 : _api$analytics5.actions,
131
130
  editorAPI: api
132
131
  }));
133
- }
134
- export { AnnotationUpdateEmitter };
132
+ }
package/dist/esm/index.js CHANGED
@@ -1 +1,4 @@
1
+ // Disable no-re-export rule for entry point files
2
+ /* eslint-disable @atlaskit/editor/no-re-export */
3
+
1
4
  export { annotationPlugin } from './annotationPlugin';
@@ -2,12 +2,11 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
2
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
3
3
  import { currentMediaNodeWithPos } from '@atlaskit/editor-common/media-single';
4
4
  import { AnnotationSharedClassNames, BlockAnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
5
- import { canApplyAnnotationOnRange, containsAnyAnnotations, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection, isParagraph, isText } from '@atlaskit/editor-common/utils';
5
+ import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getRangeInlineNodeNames, hasAnnotationMark, isEmptyTextSelection, isParagraph, isText } from '@atlaskit/editor-common/utils';
6
6
  import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { AnnotationSelectionType } from '../types';
10
- export { hasAnnotationMark, containsAnyAnnotations };
11
10
  function sum(arr, f) {
12
11
  return arr.reduce(function (val, x) {
13
12
  return val + f(x);
@@ -1,7 +1,2 @@
1
- import type { UpdateEvent } from '@atlaskit/editor-common/annotation';
2
- import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
3
1
  import type { AnnotationPlugin } from './annotationPluginType';
4
- import type { AnnotationInfo, AnnotationProviders, AnnotationState, AnnotationTypeProvider, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentState, InlineCommentViewComponentProps } from './types';
5
2
  export declare const annotationPlugin: AnnotationPlugin;
6
- export { AnnotationUpdateEmitter };
7
- export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationTypeProvider, AnnotationInfo, AnnotationState, InlineCommentState, UpdateEvent, };
@@ -1,5 +1,4 @@
1
1
  import type { AnalyticsEventPayloadCallback } from '@atlaskit/editor-common/analytics';
2
- import { containsAnyAnnotations, hasAnnotationMark } from '@atlaskit/editor-common/utils';
3
2
  import type { Mark, Node, ResolvedPos, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
4
3
  import type { EditorState, Selection, SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
5
4
  import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
@@ -7,7 +6,6 @@ import { Decoration } from '@atlaskit/editor-prosemirror/view';
7
6
  import type { AnnotationInfo, DraftBookmark, InlineCommentInputMethod, TargetType } from '../types';
8
7
  import { AnnotationSelectionType } from '../types';
9
8
  import type { InlineCommentPluginState } from './types';
10
- export { hasAnnotationMark, containsAnyAnnotations };
11
9
  /**
12
10
  * Finds the marks in the nodes to the left and right.
13
11
  * @param $pos Position to center search around
@@ -1,7 +1,2 @@
1
- import type { UpdateEvent } from '@atlaskit/editor-common/annotation';
2
- import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
3
1
  import type { AnnotationPlugin } from './annotationPluginType';
4
- import type { AnnotationInfo, AnnotationProviders, AnnotationState, AnnotationTypeProvider, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentState, InlineCommentViewComponentProps } from './types';
5
2
  export declare const annotationPlugin: AnnotationPlugin;
6
- export { AnnotationUpdateEmitter };
7
- export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationTypeProvider, AnnotationInfo, AnnotationState, InlineCommentState, UpdateEvent, };
@@ -1,5 +1,4 @@
1
1
  import type { AnalyticsEventPayloadCallback } from '@atlaskit/editor-common/analytics';
2
- import { containsAnyAnnotations, hasAnnotationMark } from '@atlaskit/editor-common/utils';
3
2
  import type { Mark, Node, ResolvedPos, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
4
3
  import type { EditorState, Selection, SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
5
4
  import { AllSelection, NodeSelection, PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
@@ -7,7 +6,6 @@ import { Decoration } from '@atlaskit/editor-prosemirror/view';
7
6
  import type { AnnotationInfo, DraftBookmark, InlineCommentInputMethod, TargetType } from '../types';
8
7
  import { AnnotationSelectionType } from '../types';
9
8
  import type { InlineCommentPluginState } from './types';
10
- export { hasAnnotationMark, containsAnyAnnotations };
11
9
  /**
12
10
  * Finds the marks in the nodes to the left and right.
13
11
  * @param $pos Position to center search around
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-annotation",
3
- "version": "1.26.0",
3
+ "version": "1.26.1",
4
4
  "description": "Annotation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,16 +32,16 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^96.1.0",
35
+ "@atlaskit/editor-common": "^96.3.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
37
37
  "@atlaskit/editor-plugin-editor-viewmode-effects": "^1.1.0",
38
38
  "@atlaskit/editor-plugin-engagement-platform": "^2.1.0",
39
39
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
40
40
  "@atlaskit/editor-prosemirror": "6.2.1",
41
- "@atlaskit/icon": "^23.0.0",
41
+ "@atlaskit/icon": "^23.1.0",
42
42
  "@atlaskit/onboarding": "^12.1.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
- "@atlaskit/tmp-editor-statsig": "^2.22.0",
44
+ "@atlaskit/tmp-editor-statsig": "^2.23.0",
45
45
  "@babel/runtime": "^7.0.0"
46
46
  },
47
47
  "peerDependencies": {