@atlaskit/editor-common 80.4.2 → 80.5.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,24 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 80.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#99680](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99680)
8
+ [`7d60ce0e7fb1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7d60ce0e7fb1) -
9
+ Add an option to inline NodeView producer factory to allow stopEvents prop to be passed through
10
+ to node view
11
+
12
+ ## 80.4.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#98647](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98647)
17
+ [`19eb20751225`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/19eb20751225) -
18
+ [ED-23248] **@af/editor-libra:** Added profilecardPopupName locator to Mention Model
19
+ **@atlaskit/editor-test-helpers:** Added optional profilecard provider mock for examples
20
+ **@atlaskit/editor-common:** Exporting mention with profile card component
21
+
3
22
  ## 80.4.2
4
23
 
5
24
  ### Patch Changes
@@ -130,13 +130,32 @@ var copyHTMLToClipboard = exports.copyHTMLToClipboard = /*#__PURE__*/function ()
130
130
 
131
131
  // At the time of development, Firefox doesn't support ClipboardItem API
132
132
  // Hence of use of this polyfill
133
- var copyHTMLToClipboardPolyfill = exports.copyHTMLToClipboardPolyfill = function copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy) {
134
- var Clipboard = clipboard;
135
- var dt = new Clipboard.DT();
136
- dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
137
- dt.setData('text/html', elementToCopy.innerHTML);
138
- Clipboard.write(dt);
139
- };
133
+ var copyHTMLToClipboardPolyfill = exports.copyHTMLToClipboardPolyfill = /*#__PURE__*/function () {
134
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(elementToCopy, plainTextToCopy) {
135
+ var dt;
136
+ return _regenerator.default.wrap(function _callee3$(_context3) {
137
+ while (1) switch (_context3.prev = _context3.next) {
138
+ case 0:
139
+ dt = new clipboard.ClipboardItem({
140
+ "text/html": new Blob([elementToCopy.innerHTML], {
141
+ type: "text/html"
142
+ }),
143
+ "text/plain": new Blob([plainTextToCopy || elementToCopy.innerText], {
144
+ type: "text/plain"
145
+ })
146
+ });
147
+ _context3.next = 3;
148
+ return clipboard.write([dt]);
149
+ case 3:
150
+ case "end":
151
+ return _context3.stop();
152
+ }
153
+ }, _callee3);
154
+ }));
155
+ return function copyHTMLToClipboardPolyfill(_x4, _x5) {
156
+ return _ref3.apply(this, arguments);
157
+ };
158
+ }();
140
159
  var getAnalyticsPayload = exports.getAnalyticsPayload = function getAnalyticsPayload(state, action) {
141
160
  var selection = state.selection,
142
161
  doc = state.doc;
@@ -166,8 +185,8 @@ var getAnalyticsPayload = exports.getAnalyticsPayload = function getAnalyticsPay
166
185
  break;
167
186
  case _analytics.ACTION_SUBJECT_ID.CELL:
168
187
  {
169
- var _ref3 = selectionAnalyticsPayload.attributes,
170
- selectedCells = _ref3.selectedCells;
188
+ var _ref4 = selectionAnalyticsPayload.attributes,
189
+ selectedCells = _ref4.selectedCells;
171
190
  content.push.apply(content, (0, _toConsumableArray2.default)(Array(selectedCells).fill('tableCell')));
172
191
  break;
173
192
  }
@@ -16,5 +16,12 @@ Object.defineProperty(exports, "MentionSharedCssClassName", {
16
16
  return _mention.MentionSharedCssClassName;
17
17
  }
18
18
  });
19
+ Object.defineProperty(exports, "MentionWithProfileCard", {
20
+ enumerable: true,
21
+ get: function get() {
22
+ return _mentionWithProfilecard.default;
23
+ }
24
+ });
19
25
  var _Mention = _interopRequireDefault(require("./ui/Mention"));
20
- var _mention = require("./styles/shared/mention");
26
+ var _mention = require("./styles/shared/mention");
27
+ var _mentionWithProfilecard = _interopRequireDefault(require("./ui/Mention/mention-with-profilecard"));
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
16
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
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 = "80.4.2";
19
+ var packageVersion = "80.5.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -7,20 +7,22 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getInlineNodeViewProducer = getInlineNodeViewProducer;
8
8
  exports.inlineNodeViewClassname = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _react = _interopRequireDefault(require("react"));
11
12
  var _react2 = require("@emotion/react");
12
13
  var _analytics = require("../analytics");
13
14
  var _ErrorBoundary = require("../ui/ErrorBoundary");
14
15
  var _utils = require("../utils");
15
16
  var _generateUniqueNodeKey = require("./generateUniqueNodeKey");
16
- /** @jsx jsx */
17
-
17
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
+ 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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
18
19
  var inlineNodeViewClassname = exports.inlineNodeViewClassname = 'inlineNodeView';
19
20
  function createNodeView(_ref) {
20
21
  var nodeViewParams = _ref.nodeViewParams,
21
22
  pmPluginFactoryParams = _ref.pmPluginFactoryParams,
22
23
  Component = _ref.Component,
23
- extraComponentProps = _ref.extraComponentProps;
24
+ extraComponentProps = _ref.extraComponentProps,
25
+ extraNodeViewProps = _ref.extraNodeViewProps;
24
26
  // We set a variable for the current node which is
25
27
  // used for comparisions when doing updates, before being
26
28
  // overwritten to the updated node.
@@ -84,7 +86,7 @@ function createNodeView(_ref) {
84
86
  });
85
87
 
86
88
  // https://prosemirror.net/docs/ref/#view.NodeView
87
- var nodeView = {
89
+ var nodeView = _objectSpread({
88
90
  get dom() {
89
91
  return domRef;
90
92
  },
@@ -126,7 +128,7 @@ function createNodeView(_ref) {
126
128
  // been destroyed no other consumers should still be using it.
127
129
  domRef = undefined;
128
130
  }
129
- };
131
+ }, extraNodeViewProps);
130
132
  return nodeView;
131
133
  }
132
134
 
@@ -212,7 +214,8 @@ function getPortalChildren(_ref2) {
212
214
  function getInlineNodeViewProducer(_ref3) {
213
215
  var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
214
216
  Component = _ref3.Component,
215
- extraComponentProps = _ref3.extraComponentProps;
217
+ extraComponentProps = _ref3.extraComponentProps,
218
+ extraNodeViewProps = _ref3.extraNodeViewProps;
216
219
  function nodeViewProducer() {
217
220
  var nodeView = createNodeView({
218
221
  nodeViewParams: {
@@ -223,7 +226,8 @@ function getInlineNodeViewProducer(_ref3) {
223
226
  },
224
227
  pmPluginFactoryParams: pmPluginFactoryParams,
225
228
  Component: Component,
226
- extraComponentProps: extraComponentProps
229
+ extraComponentProps: extraComponentProps,
230
+ extraNodeViewProps: extraNodeViewProps
227
231
  });
228
232
  return nodeView;
229
233
  }
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "80.4.2";
23
+ var packageVersion = "80.5.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -53,12 +53,16 @@ export const copyHTMLToClipboard = async (elementToCopy, plainTextToCopy) => {
53
53
 
54
54
  // At the time of development, Firefox doesn't support ClipboardItem API
55
55
  // Hence of use of this polyfill
56
- export const copyHTMLToClipboardPolyfill = (elementToCopy, plainTextToCopy) => {
57
- const Clipboard = clipboard;
58
- const dt = new Clipboard.DT();
59
- dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
60
- dt.setData('text/html', elementToCopy.innerHTML);
61
- Clipboard.write(dt);
56
+ export const copyHTMLToClipboardPolyfill = async (elementToCopy, plainTextToCopy) => {
57
+ const dt = new clipboard.ClipboardItem({
58
+ "text/html": new Blob([elementToCopy.innerHTML], {
59
+ type: "text/html"
60
+ }),
61
+ "text/plain": new Blob([plainTextToCopy || elementToCopy.innerText], {
62
+ type: "text/plain"
63
+ })
64
+ });
65
+ await clipboard.write([dt]);
62
66
  };
63
67
  export const getAnalyticsPayload = (state, action) => {
64
68
  const {
@@ -1,2 +1,3 @@
1
1
  export { default as Mention } from './ui/Mention';
2
- export { MentionSharedCssClassName } from './styles/shared/mention';
2
+ export { MentionSharedCssClassName } from './styles/shared/mention';
3
+ export { default as MentionWithProfileCard } from './ui/Mention/mention-with-profilecard';
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "80.4.2";
3
+ const packageVersion = "80.5.0";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -4,15 +4,15 @@ import React from 'react';
4
4
  import { jsx } from '@emotion/react';
5
5
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
6
6
  import { ErrorBoundary } from '../ui/ErrorBoundary';
7
- import { browser } from '../utils';
8
- import { analyticsEventKey, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
7
+ import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
9
8
  import { generateUniqueNodeKey } from './generateUniqueNodeKey';
10
9
  export const inlineNodeViewClassname = 'inlineNodeView';
11
10
  function createNodeView({
12
11
  nodeViewParams,
13
12
  pmPluginFactoryParams,
14
13
  Component,
15
- extraComponentProps
14
+ extraComponentProps,
15
+ extraNodeViewProps
16
16
  }) {
17
17
  // We set a variable for the current node which is
18
18
  // used for comparisions when doing updates, before being
@@ -119,7 +119,8 @@ function createNodeView({
119
119
  // of HTMLSpanElement type however once the node view has
120
120
  // been destroyed no other consumers should still be using it.
121
121
  domRef = undefined;
122
- }
122
+ },
123
+ ...extraNodeViewProps
123
124
  };
124
125
  return nodeView;
125
126
  }
@@ -207,7 +208,8 @@ function getPortalChildren({
207
208
  export function getInlineNodeViewProducer({
208
209
  pmPluginFactoryParams,
209
210
  Component,
210
- extraComponentProps
211
+ extraComponentProps,
212
+ extraNodeViewProps
211
213
  }) {
212
214
  function nodeViewProducer(...nodeViewProducerParameters) {
213
215
  const nodeView = createNodeView({
@@ -219,7 +221,8 @@ export function getInlineNodeViewProducer({
219
221
  },
220
222
  pmPluginFactoryParams,
221
223
  Component,
222
- extraComponentProps
224
+ extraComponentProps,
225
+ extraNodeViewProps
223
226
  });
224
227
  return nodeView;
225
228
  }
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "80.4.2";
10
+ const packageVersion = "80.5.0";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -120,13 +120,32 @@ export var copyHTMLToClipboard = /*#__PURE__*/function () {
120
120
 
121
121
  // At the time of development, Firefox doesn't support ClipboardItem API
122
122
  // Hence of use of this polyfill
123
- export var copyHTMLToClipboardPolyfill = function copyHTMLToClipboardPolyfill(elementToCopy, plainTextToCopy) {
124
- var Clipboard = clipboard;
125
- var dt = new Clipboard.DT();
126
- dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
127
- dt.setData('text/html', elementToCopy.innerHTML);
128
- Clipboard.write(dt);
129
- };
123
+ export var copyHTMLToClipboardPolyfill = /*#__PURE__*/function () {
124
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(elementToCopy, plainTextToCopy) {
125
+ var dt;
126
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
127
+ while (1) switch (_context3.prev = _context3.next) {
128
+ case 0:
129
+ dt = new clipboard.ClipboardItem({
130
+ "text/html": new Blob([elementToCopy.innerHTML], {
131
+ type: "text/html"
132
+ }),
133
+ "text/plain": new Blob([plainTextToCopy || elementToCopy.innerText], {
134
+ type: "text/plain"
135
+ })
136
+ });
137
+ _context3.next = 3;
138
+ return clipboard.write([dt]);
139
+ case 3:
140
+ case "end":
141
+ return _context3.stop();
142
+ }
143
+ }, _callee3);
144
+ }));
145
+ return function copyHTMLToClipboardPolyfill(_x4, _x5) {
146
+ return _ref3.apply(this, arguments);
147
+ };
148
+ }();
130
149
  export var getAnalyticsPayload = function getAnalyticsPayload(state, action) {
131
150
  var selection = state.selection,
132
151
  doc = state.doc;
@@ -156,8 +175,8 @@ export var getAnalyticsPayload = function getAnalyticsPayload(state, action) {
156
175
  break;
157
176
  case ACTION_SUBJECT_ID.CELL:
158
177
  {
159
- var _ref3 = selectionAnalyticsPayload.attributes,
160
- selectedCells = _ref3.selectedCells;
178
+ var _ref4 = selectionAnalyticsPayload.attributes,
179
+ selectedCells = _ref4.selectedCells;
161
180
  content.push.apply(content, _toConsumableArray(Array(selectedCells).fill('tableCell')));
162
181
  break;
163
182
  }
@@ -1,2 +1,3 @@
1
1
  export { default as Mention } from './ui/Mention';
2
- export { MentionSharedCssClassName } from './styles/shared/mention';
2
+ export { MentionSharedCssClassName } from './styles/shared/mention';
3
+ export { default as MentionWithProfileCard } from './ui/Mention/mention-with-profilecard';
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "80.4.2";
9
+ var packageVersion = "80.5.0";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -1,18 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ 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; }
2
5
  /** @jsx jsx */
3
6
  import React from 'react';
4
7
  import { jsx } from '@emotion/react';
5
8
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
6
9
  import { ErrorBoundary } from '../ui/ErrorBoundary';
7
- import { browser } from '../utils';
8
- import { analyticsEventKey, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
10
+ import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
9
11
  import { generateUniqueNodeKey } from './generateUniqueNodeKey';
10
12
  export var inlineNodeViewClassname = 'inlineNodeView';
11
13
  function createNodeView(_ref) {
12
14
  var nodeViewParams = _ref.nodeViewParams,
13
15
  pmPluginFactoryParams = _ref.pmPluginFactoryParams,
14
16
  Component = _ref.Component,
15
- extraComponentProps = _ref.extraComponentProps;
17
+ extraComponentProps = _ref.extraComponentProps,
18
+ extraNodeViewProps = _ref.extraNodeViewProps;
16
19
  // We set a variable for the current node which is
17
20
  // used for comparisions when doing updates, before being
18
21
  // overwritten to the updated node.
@@ -76,7 +79,7 @@ function createNodeView(_ref) {
76
79
  });
77
80
 
78
81
  // https://prosemirror.net/docs/ref/#view.NodeView
79
- var nodeView = {
82
+ var nodeView = _objectSpread({
80
83
  get dom() {
81
84
  return domRef;
82
85
  },
@@ -118,7 +121,7 @@ function createNodeView(_ref) {
118
121
  // been destroyed no other consumers should still be using it.
119
122
  domRef = undefined;
120
123
  }
121
- };
124
+ }, extraNodeViewProps);
122
125
  return nodeView;
123
126
  }
124
127
 
@@ -204,7 +207,8 @@ function getPortalChildren(_ref2) {
204
207
  export function getInlineNodeViewProducer(_ref3) {
205
208
  var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
206
209
  Component = _ref3.Component,
207
- extraComponentProps = _ref3.extraComponentProps;
210
+ extraComponentProps = _ref3.extraComponentProps,
211
+ extraNodeViewProps = _ref3.extraNodeViewProps;
208
212
  function nodeViewProducer() {
209
213
  var nodeView = createNodeView({
210
214
  nodeViewParams: {
@@ -215,7 +219,8 @@ export function getInlineNodeViewProducer(_ref3) {
215
219
  },
216
220
  pmPluginFactoryParams: pmPluginFactoryParams,
217
221
  Component: Component,
218
- extraComponentProps: extraComponentProps
222
+ extraComponentProps: extraComponentProps,
223
+ extraNodeViewProps: extraNodeViewProps
219
224
  });
220
225
  return nodeView;
221
226
  }
@@ -15,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
15
15
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
16
16
  import Layer from '../Layer';
17
17
  var packageName = "@atlaskit/editor-common";
18
- var packageVersion = "80.4.2";
18
+ var packageVersion = "80.5.0";
19
19
  var halfFocusRing = 1;
20
20
  var dropOffset = '0, 8';
21
21
  var DropList = /*#__PURE__*/function (_Component) {
@@ -2,5 +2,5 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { ACTION, AnalyticsEventPayload } from '../analytics';
3
3
  export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
4
4
  export declare const copyHTMLToClipboard: (elementToCopy: HTMLElement, plainTextToCopy?: string) => Promise<void>;
5
- export declare const copyHTMLToClipboardPolyfill: (elementToCopy: HTMLElement, plainTextToCopy?: string) => void;
5
+ export declare const copyHTMLToClipboardPolyfill: (elementToCopy: HTMLElement, plainTextToCopy?: string) => Promise<void>;
6
6
  export declare const getAnalyticsPayload: (state: EditorState, action: ACTION.CUT | ACTION.COPIED) => AnalyticsEventPayload | undefined;
@@ -1,2 +1,3 @@
1
1
  export { default as Mention } from './ui/Mention';
2
2
  export { MentionSharedCssClassName } from './styles/shared/mention';
3
+ export { default as MentionWithProfileCard } from './ui/Mention/mention-with-profilecard';
@@ -12,9 +12,10 @@ type InlineNodeViewComponent<ExtraComponentProps> = React.ComponentType<React.Pr
12
12
  export declare const inlineNodeViewClassname = "inlineNodeView";
13
13
  type NodeViewProducer = (node: PMNode, view: EditorView, getPos: () => GetPosReturn, decorations: readonly Decoration[]) => NodeView;
14
14
  type GetPosReturn = number | undefined;
15
- export declare function getInlineNodeViewProducer<ExtraComponentProps>({ pmPluginFactoryParams, Component, extraComponentProps, }: {
15
+ export declare function getInlineNodeViewProducer<ExtraComponentProps>({ pmPluginFactoryParams, Component, extraComponentProps, extraNodeViewProps, }: {
16
16
  pmPluginFactoryParams: PMPluginFactoryParams;
17
17
  Component: InlineNodeViewComponent<ExtraComponentProps>;
18
18
  extraComponentProps?: ExtraComponentProps;
19
+ extraNodeViewProps?: Pick<NodeView, 'stopEvent'>;
19
20
  }): NodeViewProducer;
20
21
  export {};
@@ -2,5 +2,5 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { ACTION, AnalyticsEventPayload } from '../analytics';
3
3
  export declare const copyToClipboard: (textToCopy: string) => Promise<void>;
4
4
  export declare const copyHTMLToClipboard: (elementToCopy: HTMLElement, plainTextToCopy?: string) => Promise<void>;
5
- export declare const copyHTMLToClipboardPolyfill: (elementToCopy: HTMLElement, plainTextToCopy?: string) => void;
5
+ export declare const copyHTMLToClipboardPolyfill: (elementToCopy: HTMLElement, plainTextToCopy?: string) => Promise<void>;
6
6
  export declare const getAnalyticsPayload: (state: EditorState, action: ACTION.CUT | ACTION.COPIED) => AnalyticsEventPayload | undefined;
@@ -1,2 +1,3 @@
1
1
  export { default as Mention } from './ui/Mention';
2
2
  export { MentionSharedCssClassName } from './styles/shared/mention';
3
+ export { default as MentionWithProfileCard } from './ui/Mention/mention-with-profilecard';
@@ -12,9 +12,10 @@ type InlineNodeViewComponent<ExtraComponentProps> = React.ComponentType<React.Pr
12
12
  export declare const inlineNodeViewClassname = "inlineNodeView";
13
13
  type NodeViewProducer = (node: PMNode, view: EditorView, getPos: () => GetPosReturn, decorations: readonly Decoration[]) => NodeView;
14
14
  type GetPosReturn = number | undefined;
15
- export declare function getInlineNodeViewProducer<ExtraComponentProps>({ pmPluginFactoryParams, Component, extraComponentProps, }: {
15
+ export declare function getInlineNodeViewProducer<ExtraComponentProps>({ pmPluginFactoryParams, Component, extraComponentProps, extraNodeViewProps, }: {
16
16
  pmPluginFactoryParams: PMPluginFactoryParams;
17
17
  Component: InlineNodeViewComponent<ExtraComponentProps>;
18
18
  extraComponentProps?: ExtraComponentProps;
19
+ extraNodeViewProps?: Pick<NodeView, 'stopEvent'>;
19
20
  }): NodeViewProducer;
20
21
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "80.4.2",
3
+ "version": "80.5.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/"
@@ -149,7 +149,7 @@
149
149
  "@sentry/types": "^6.18.2",
150
150
  "chromatism": "^2.6.0",
151
151
  "classnames": "^2.2.5",
152
- "clipboard-polyfill": "2.4.3",
152
+ "clipboard-polyfill": "4.0.1",
153
153
  "date-fns": "^2.17.0",
154
154
  "focus-trap": "^2.4.5",
155
155
  "fuse.js": "^6.6.2",