@atlaskit/editor-plugin-annotation 1.26.0 → 1.26.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,23 @@
1
1
  # @atlaskit/editor-plugin-annotation
2
2
 
3
+ ## 1.26.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#175810](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175810)
8
+ [`f7a9d71722c78`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f7a9d71722c78) -
9
+ ED-25989 adding analytic event for date inline node
10
+
11
+ ## 1.26.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#175552](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175552)
16
+ [`b29361001f720`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b29361001f720) -
17
+ refactor: remediate re-exports in editor-plugin-ai-definitions, editor-plugin-alignment,
18
+ editor-plugin-analytics, editor-plugin-annotation
19
+ - Updated dependencies
20
+
3
21
  ## 1.26.0
4
22
 
5
23
  ### 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");
@@ -134,8 +134,6 @@ var buildToolbar = exports.buildToolbar = function buildToolbar(editorAnalyticsA
134
134
  eventType: _analytics.EVENT_TYPE.UI,
135
135
  attributes: {
136
136
  source: 'highlightActionsMenu',
137
- // @ts-expect-error - Object literal may only specify known properties, and 'pageMode' does not exist in type
138
- // This error was introduced after upgrading to TypeScript 5
139
137
  pageMode: 'edit'
140
138
  }
141
139
  });
@@ -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';
@@ -124,8 +124,6 @@ export const buildToolbar = editorAnalyticsAPI => ({
124
124
  eventType: EVENT_TYPE.UI,
125
125
  attributes: {
126
126
  source: 'highlightActionsMenu',
127
- // @ts-expect-error - Object literal may only specify known properties, and 'pageMode' does not exist in type
128
- // This error was introduced after upgrading to TypeScript 5
129
127
  pageMode: 'edit'
130
128
  }
131
129
  });
@@ -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';
@@ -127,8 +127,6 @@ export var buildToolbar = function buildToolbar(editorAnalyticsAPI) {
127
127
  eventType: EVENT_TYPE.UI,
128
128
  attributes: {
129
129
  source: 'highlightActionsMenu',
130
- // @ts-expect-error - Object literal may only specify known properties, and 'pageMode' does not exist in type
131
- // This error was introduced after upgrading to TypeScript 5
132
130
  pageMode: 'edit'
133
131
  }
134
132
  });
@@ -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.2",
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",
42
- "@atlaskit/onboarding": "^12.1.0",
41
+ "@atlaskit/icon": "^23.1.0",
42
+ "@atlaskit/onboarding": "^12.2.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": {