@atlaskit/editor-plugin-card 13.1.0 → 13.1.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,21 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 13.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2116707c51d9b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2116707c51d9b) -
8
+ [ux] Add SmartLinkDraggable wrapping to BlockCard and EmbedCard. Add stopEvent to prevent
9
+ ProseMirror from intercepting drag events on smart-element-link. Remove double feature gating in
10
+ inlineCard.
11
+ - Updated dependencies
12
+
13
+ ## 13.1.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 13.1.0
4
20
 
5
21
  ### Minor Changes
@@ -19,6 +19,8 @@ var _browser = require("@atlaskit/editor-common/browser");
19
19
  var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/react-node-view"));
20
20
  var _ui = require("@atlaskit/editor-common/ui");
21
21
  var _utils = require("@atlaskit/editor-common/utils");
22
+ var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
23
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
22
24
  var _smartCard = require("@atlaskit/smart-card");
23
25
  var _ssr = require("@atlaskit/smart-card/ssr");
24
26
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -144,9 +146,13 @@ var BlockCardComponent = exports.BlockCardComponent = /*#__PURE__*/function (_Re
144
146
  }), this.gapCursorSpan());
145
147
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
146
148
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
147
- return /*#__PURE__*/_react.default.createElement("div", null, cardContext && cardContext.value ? /*#__PURE__*/_react.default.createElement(cardContext.Provider, {
149
+ return /*#__PURE__*/_react.default.createElement(_editorSmartLinkDraggable.SmartLinkDraggable, {
150
+ url: url,
151
+ appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.BLOCK,
152
+ source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.EDITOR
153
+ }, /*#__PURE__*/_react.default.createElement("div", null, cardContext && cardContext.value ? /*#__PURE__*/_react.default.createElement(cardContext.Provider, {
148
154
  value: cardContext.value
149
- }, cardInner) : data ? cardInner : null);
155
+ }, cardInner) : data ? cardInner : null));
150
156
  }
151
157
  }]);
152
158
  }(_react.default.PureComponent);
@@ -225,6 +231,23 @@ var BlockCard = exports.BlockCard = /*#__PURE__*/function (_ReactNodeView) {
225
231
  provider: provider
226
232
  });
227
233
  }
234
+
235
+ /**
236
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
237
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
238
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
239
+ */
240
+ }, {
241
+ key: "stopEvent",
242
+ value: function stopEvent(event) {
243
+ if (event.type === 'dragstart') {
244
+ var target = event.target;
245
+ if (target instanceof HTMLElement && target.closest('[data-smart-element-link]') && (0, _platformFeatureFlags.fg)('cc_drag_and_drop_smart_link_from_content_to_tree')) {
246
+ return true;
247
+ }
248
+ }
249
+ return false;
250
+ }
228
251
  }, {
229
252
  key: "destroy",
230
253
  value: function destroy() {
@@ -23,6 +23,8 @@ var _ui = require("@atlaskit/editor-common/ui");
23
23
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
24
24
  var _utils = require("@atlaskit/editor-common/utils");
25
25
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
26
+ var _editorSmartLinkDraggable = require("@atlaskit/editor-smart-link-draggable");
27
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
28
  var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
27
29
  var _smartCard = require("@atlaskit/smart-card");
28
30
  var _ssr = require("@atlaskit/smart-card/ssr");
@@ -379,7 +381,11 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
379
381
  actionOptions: actionOptions,
380
382
  CompetitorPrompt: CompetitorPrompt
381
383
  });
382
- return /*#__PURE__*/_react.default.createElement(_smartCard.EmbedResizeMessageListener, {
384
+ return /*#__PURE__*/_react.default.createElement(_editorSmartLinkDraggable.SmartLinkDraggable, {
385
+ url: url,
386
+ appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.EMBED,
387
+ source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.EDITOR
388
+ }, /*#__PURE__*/_react.default.createElement(_smartCard.EmbedResizeMessageListener, {
383
389
  embedIframeRef: this.embedIframeRef,
384
390
  onHeightUpdate: this.onHeightUpdate
385
391
  }, /*#__PURE__*/_react.default.createElement(CardInner, {
@@ -397,7 +403,7 @@ var EmbedCardComponent = exports.EmbedCardComponent = /*#__PURE__*/function (_Re
397
403
  heightAlone: heightAlone,
398
404
  cardProps: cardProps,
399
405
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
400
- }));
406
+ })));
401
407
  }
402
408
  }]);
403
409
  }(_react.default.PureComponent);
@@ -521,6 +527,23 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
521
527
  provider: provider
522
528
  });
523
529
  }
530
+
531
+ /**
532
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
533
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
534
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
535
+ */
536
+ }, {
537
+ key: "stopEvent",
538
+ value: function stopEvent(event) {
539
+ if (event.type === 'dragstart') {
540
+ var target = event.target;
541
+ if (target instanceof HTMLElement && target.closest('[data-smart-element-link]') && (0, _platformFeatureFlags.fg)('cc_drag_and_drop_smart_link_from_content_to_tree')) {
542
+ return true;
543
+ }
544
+ }
545
+ return false;
546
+ }
524
547
  }, {
525
548
  key: "destroy",
526
549
  value: function destroy() {
@@ -222,11 +222,11 @@ function InlineCardNodeView(props) {
222
222
  // Ignored via go/ees005
223
223
  // eslint-disable-next-line react/jsx-props-no-spreading
224
224
  }, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
225
- return (0, _expValEquals.expValEquals)('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_editorSmartLinkDraggable.SmartLinkDraggable, {
225
+ return /*#__PURE__*/_react.default.createElement(_editorSmartLinkDraggable.SmartLinkDraggable, {
226
226
  url: url,
227
227
  appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.INLINE,
228
228
  source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.EDITOR
229
- }, inlineCardContent) : inlineCardContent;
229
+ }, inlineCardContent);
230
230
  }
231
231
  var inlineCardNodeView = exports.inlineCardNodeView = function inlineCardNodeView(_ref5) {
232
232
  var inlineCardViewProducer = _ref5.inlineCardViewProducer;
@@ -7,6 +7,8 @@ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-commo
7
7
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
8
8
  import { findOverflowScrollParent, UnsupportedBlock } from '@atlaskit/editor-common/ui';
9
9
  import { canRenderDatasource } from '@atlaskit/editor-common/utils';
10
+ import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
10
12
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
13
  import { CardSSR } from '@atlaskit/smart-card/ssr';
12
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -128,9 +130,13 @@ export class BlockCardComponent extends React.PureComponent {
128
130
  }), this.gapCursorSpan());
129
131
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
130
132
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
131
- return /*#__PURE__*/React.createElement("div", null, cardContext && cardContext.value ? /*#__PURE__*/React.createElement(cardContext.Provider, {
133
+ return /*#__PURE__*/React.createElement(SmartLinkDraggable, {
134
+ url: url,
135
+ appearance: SMART_LINK_APPEARANCE.BLOCK,
136
+ source: SMART_LINK_DRAG_TYPES.EDITOR
137
+ }, /*#__PURE__*/React.createElement("div", null, cardContext && cardContext.value ? /*#__PURE__*/React.createElement(cardContext.Provider, {
132
138
  value: cardContext.value
133
- }, cardInner) : data ? cardInner : null);
139
+ }, cardInner) : data ? cardInner : null));
134
140
  }
135
141
  }
136
142
  const WrappedBlockCard = Card(BlockCardComponent, UnsupportedBlock);
@@ -190,6 +196,21 @@ export class BlockCard extends ReactNodeView {
190
196
  provider: provider
191
197
  });
192
198
  }
199
+
200
+ /**
201
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
202
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
203
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
204
+ */
205
+ stopEvent(event) {
206
+ if (event.type === 'dragstart') {
207
+ const target = event.target;
208
+ if (target instanceof HTMLElement && target.closest('[data-smart-element-link]') && fg('cc_drag_and_drop_smart_link_from_content_to_tree')) {
209
+ return true;
210
+ }
211
+ }
212
+ return false;
213
+ }
193
214
  destroy() {
194
215
  var _this$unsubscribe;
195
216
  (_this$unsubscribe = this.unsubscribe) === null || _this$unsubscribe === void 0 ? void 0 : _this$unsubscribe.call(this);
@@ -11,6 +11,8 @@ import { findOverflowScrollParent, MediaSingle as RichMediaWrapper, UnsupportedB
11
11
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
12
12
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
13
13
  import { akEditorFullPageNarrowBreakout, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
14
+ import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
14
16
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
15
17
  import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
16
18
  import { CardSSR } from '@atlaskit/smart-card/ssr';
@@ -371,7 +373,11 @@ export class EmbedCardComponent extends React.PureComponent {
371
373
  actionOptions: actionOptions,
372
374
  CompetitorPrompt: CompetitorPrompt
373
375
  });
374
- return /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
376
+ return /*#__PURE__*/React.createElement(SmartLinkDraggable, {
377
+ url: url,
378
+ appearance: SMART_LINK_APPEARANCE.EMBED,
379
+ source: SMART_LINK_DRAG_TYPES.EDITOR
380
+ }, /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
375
381
  embedIframeRef: this.embedIframeRef,
376
382
  onHeightUpdate: this.onHeightUpdate
377
383
  }, /*#__PURE__*/React.createElement(CardInner, {
@@ -389,7 +395,7 @@ export class EmbedCardComponent extends React.PureComponent {
389
395
  heightAlone: heightAlone,
390
396
  cardProps: cardProps,
391
397
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
392
- }));
398
+ })));
393
399
  }
394
400
  }
395
401
  export const EmbedOrBlockCardComponent = props => {
@@ -495,6 +501,21 @@ export class EmbedCard extends ReactNodeView {
495
501
  provider: provider
496
502
  });
497
503
  }
504
+
505
+ /**
506
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
507
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
508
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
509
+ */
510
+ stopEvent(event) {
511
+ if (event.type === 'dragstart') {
512
+ const target = event.target;
513
+ if (target instanceof HTMLElement && target.closest('[data-smart-element-link]') && fg('cc_drag_and_drop_smart_link_from_content_to_tree')) {
514
+ return true;
515
+ }
516
+ }
517
+ return false;
518
+ }
498
519
  destroy() {
499
520
  var _this$unsubscribe;
500
521
  (_this$unsubscribe = this.unsubscribe) === null || _this$unsubscribe === void 0 ? void 0 : _this$unsubscribe.call(this);
@@ -221,11 +221,11 @@ export function InlineCardNodeView(props) {
221
221
  // Ignored via go/ees005
222
222
  // eslint-disable-next-line react/jsx-props-no-spreading
223
223
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
224
- return expValEquals('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/React.createElement(SmartLinkDraggable, {
224
+ return /*#__PURE__*/React.createElement(SmartLinkDraggable, {
225
225
  url: url,
226
226
  appearance: SMART_LINK_APPEARANCE.INLINE,
227
227
  source: SMART_LINK_DRAG_TYPES.EDITOR
228
- }, inlineCardContent) : inlineCardContent;
228
+ }, inlineCardContent);
229
229
  }
230
230
  export const inlineCardNodeView = ({
231
231
  inlineCardViewProducer
@@ -16,6 +16,8 @@ import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-commo
16
16
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
17
17
  import { findOverflowScrollParent, UnsupportedBlock } from '@atlaskit/editor-common/ui';
18
18
  import { canRenderDatasource } from '@atlaskit/editor-common/utils';
19
+ import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
20
+ import { fg } from '@atlaskit/platform-feature-flags';
19
21
  import { Card as SmartCard } from '@atlaskit/smart-card';
20
22
  import { CardSSR } from '@atlaskit/smart-card/ssr';
21
23
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -139,9 +141,13 @@ export var BlockCardComponent = /*#__PURE__*/function (_React$PureComponent) {
139
141
  }), this.gapCursorSpan());
140
142
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
141
143
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
142
- return /*#__PURE__*/React.createElement("div", null, cardContext && cardContext.value ? /*#__PURE__*/React.createElement(cardContext.Provider, {
144
+ return /*#__PURE__*/React.createElement(SmartLinkDraggable, {
145
+ url: url,
146
+ appearance: SMART_LINK_APPEARANCE.BLOCK,
147
+ source: SMART_LINK_DRAG_TYPES.EDITOR
148
+ }, /*#__PURE__*/React.createElement("div", null, cardContext && cardContext.value ? /*#__PURE__*/React.createElement(cardContext.Provider, {
143
149
  value: cardContext.value
144
- }, cardInner) : data ? cardInner : null);
150
+ }, cardInner) : data ? cardInner : null));
145
151
  }
146
152
  }]);
147
153
  }(React.PureComponent);
@@ -220,6 +226,23 @@ export var BlockCard = /*#__PURE__*/function (_ReactNodeView) {
220
226
  provider: provider
221
227
  });
222
228
  }
229
+
230
+ /**
231
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
232
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
233
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
234
+ */
235
+ }, {
236
+ key: "stopEvent",
237
+ value: function stopEvent(event) {
238
+ if (event.type === 'dragstart') {
239
+ var target = event.target;
240
+ if (target instanceof HTMLElement && target.closest('[data-smart-element-link]') && fg('cc_drag_and_drop_smart_link_from_content_to_tree')) {
241
+ return true;
242
+ }
243
+ }
244
+ return false;
245
+ }
223
246
  }, {
224
247
  key: "destroy",
225
248
  value: function destroy() {
@@ -22,6 +22,8 @@ import { findOverflowScrollParent, MediaSingle as RichMediaWrapper, UnsupportedB
22
22
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
23
23
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '@atlaskit/editor-common/utils';
24
24
  import { akEditorFullPageNarrowBreakout, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
25
+ import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
26
+ import { fg } from '@atlaskit/platform-feature-flags';
25
27
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
26
28
  import { EmbedResizeMessageListener, Card as SmartCard } from '@atlaskit/smart-card';
27
29
  import { CardSSR } from '@atlaskit/smart-card/ssr';
@@ -373,7 +375,11 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
373
375
  actionOptions: actionOptions,
374
376
  CompetitorPrompt: CompetitorPrompt
375
377
  });
376
- return /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
378
+ return /*#__PURE__*/React.createElement(SmartLinkDraggable, {
379
+ url: url,
380
+ appearance: SMART_LINK_APPEARANCE.EMBED,
381
+ source: SMART_LINK_DRAG_TYPES.EDITOR
382
+ }, /*#__PURE__*/React.createElement(EmbedResizeMessageListener, {
377
383
  embedIframeRef: this.embedIframeRef,
378
384
  onHeightUpdate: this.onHeightUpdate
379
385
  }, /*#__PURE__*/React.createElement(CardInner, {
@@ -391,7 +397,7 @@ export var EmbedCardComponent = /*#__PURE__*/function (_React$PureComponent) {
391
397
  heightAlone: heightAlone,
392
398
  cardProps: cardProps,
393
399
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
394
- }));
400
+ })));
395
401
  }
396
402
  }]);
397
403
  }(React.PureComponent);
@@ -515,6 +521,23 @@ export var EmbedCard = /*#__PURE__*/function (_ReactNodeView) {
515
521
  provider: provider
516
522
  });
517
523
  }
524
+
525
+ /**
526
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
527
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
528
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
529
+ */
530
+ }, {
531
+ key: "stopEvent",
532
+ value: function stopEvent(event) {
533
+ if (event.type === 'dragstart') {
534
+ var target = event.target;
535
+ if (target instanceof HTMLElement && target.closest('[data-smart-element-link]') && fg('cc_drag_and_drop_smart_link_from_content_to_tree')) {
536
+ return true;
537
+ }
538
+ }
539
+ return false;
540
+ }
518
541
  }, {
519
542
  key: "destroy",
520
543
  value: function destroy() {
@@ -210,11 +210,11 @@ export function InlineCardNodeView(props) {
210
210
  // Ignored via go/ees005
211
211
  // eslint-disable-next-line react/jsx-props-no-spreading
212
212
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
213
- return expValEquals('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/React.createElement(SmartLinkDraggable, {
213
+ return /*#__PURE__*/React.createElement(SmartLinkDraggable, {
214
214
  url: url,
215
215
  appearance: SMART_LINK_APPEARANCE.INLINE,
216
216
  source: SMART_LINK_DRAG_TYPES.EDITOR
217
- }, inlineCardContent) : inlineCardContent;
217
+ }, inlineCardContent);
218
218
  }
219
219
  export var inlineCardNodeView = function inlineCardNodeView(_ref5) {
220
220
  var inlineCardViewProducer = _ref5.inlineCardViewProducer;
@@ -34,6 +34,12 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
34
34
  validUpdate(currentNode: Node, newNode: Node): boolean;
35
35
  update(node: Node, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource): boolean;
36
36
  render(): React.JSX.Element;
37
+ /**
38
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
39
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
40
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
41
+ */
42
+ stopEvent(event: Event): boolean;
37
43
  destroy(): void;
38
44
  }
39
45
  export interface BlockCardNodeViewProperties {
@@ -63,6 +63,12 @@ export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
63
63
  createDomRef(): HTMLElement;
64
64
  private updateContentEditable;
65
65
  render(): React.JSX.Element;
66
+ /**
67
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
68
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
69
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
70
+ */
71
+ stopEvent(event: Event): boolean;
66
72
  destroy(): void;
67
73
  }
68
74
  export interface EmbedCardNodeViewProperties {
@@ -34,6 +34,12 @@ export declare class BlockCard extends ReactNodeView<BlockCardNodeViewProps> {
34
34
  validUpdate(currentNode: Node, newNode: Node): boolean;
35
35
  update(node: Node, decorations: ReadonlyArray<Decoration>, _innerDecorations?: DecorationSource): boolean;
36
36
  render(): React.JSX.Element;
37
+ /**
38
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
39
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
40
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
41
+ */
42
+ stopEvent(event: Event): boolean;
37
43
  destroy(): void;
38
44
  }
39
45
  export interface BlockCardNodeViewProperties {
@@ -63,6 +63,12 @@ export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
63
63
  createDomRef(): HTMLElement;
64
64
  private updateContentEditable;
65
65
  render(): React.JSX.Element;
66
+ /**
67
+ * Prevent ProseMirror from handling drag events on the smart-element-link,
68
+ * allowing native drag to work so SmartLinkDraggable can intercept it.
69
+ * @see {@link https://prosemirror.net/docs/ref/#view.NodeView.stopEvent}
70
+ */
71
+ stopEvent(event: Event): boolean;
66
72
  destroy(): void;
67
73
  }
68
74
  export interface EmbedCardNodeViewProperties {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "13.1.0",
3
+ "version": "13.1.2",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/prosemirror-history": "^0.2.0",
63
63
  "@atlaskit/smart-card": "^43.26.0",
64
64
  "@atlaskit/theme": "^22.0.0",
65
- "@atlaskit/tmp-editor-statsig": "^42.0.0",
65
+ "@atlaskit/tmp-editor-statsig": "^43.0.0",
66
66
  "@atlaskit/tokens": "^11.1.0",
67
67
  "@babel/runtime": "^7.0.0",
68
68
  "@emotion/react": "^11.7.1",
@@ -111,6 +111,9 @@
111
111
  }
112
112
  },
113
113
  "platform-feature-flags": {
114
+ "cc_drag_and_drop_smart_link_from_content_to_tree": {
115
+ "type": "boolean"
116
+ },
114
117
  "confluence-issue-terminology-refresh": {
115
118
  "type": "boolean"
116
119
  },