@atlaskit/editor-plugin-card 12.4.3 → 13.0.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/nodeviews/datasource.js +1 -1
  3. package/dist/cjs/nodeviews/inlineCard.js +1 -3
  4. package/dist/cjs/pm-plugins/utils.js +3 -1
  5. package/dist/cjs/ui/AwarenessWrapper/index.js +1 -1
  6. package/dist/cjs/ui/ConfigureOverlay/index.js +1 -1
  7. package/dist/cjs/ui/DatasourceAppearanceButton.js +1 -1
  8. package/dist/cjs/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
  9. package/dist/cjs/ui/EditToolbarButton/index.js +1 -1
  10. package/dist/cjs/ui/InlineCardOverlay/index.js +1 -1
  11. package/dist/cjs/ui/LayoutButton/index.js +3 -2
  12. package/dist/cjs/ui/ResizableEmbedCard.js +1 -1
  13. package/dist/es2019/nodeviews/datasource.js +1 -1
  14. package/dist/es2019/nodeviews/inlineCard.js +3 -5
  15. package/dist/es2019/pm-plugins/utils.js +3 -1
  16. package/dist/es2019/ui/AwarenessWrapper/index.js +1 -1
  17. package/dist/es2019/ui/ConfigureOverlay/index.js +1 -1
  18. package/dist/es2019/ui/DatasourceAppearanceButton.js +1 -1
  19. package/dist/es2019/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
  20. package/dist/es2019/ui/EditToolbarButton/index.js +1 -1
  21. package/dist/es2019/ui/InlineCardOverlay/index.js +1 -1
  22. package/dist/es2019/ui/LayoutButton/index.js +3 -2
  23. package/dist/es2019/ui/ResizableEmbedCard.js +1 -1
  24. package/dist/esm/nodeviews/datasource.js +1 -1
  25. package/dist/esm/nodeviews/inlineCard.js +3 -5
  26. package/dist/esm/pm-plugins/utils.js +3 -1
  27. package/dist/esm/ui/AwarenessWrapper/index.js +1 -1
  28. package/dist/esm/ui/ConfigureOverlay/index.js +1 -1
  29. package/dist/esm/ui/DatasourceAppearanceButton.js +1 -1
  30. package/dist/esm/ui/EditToolbarButton/EditToolbarButtonPresentation.js +1 -1
  31. package/dist/esm/ui/EditToolbarButton/index.js +1 -1
  32. package/dist/esm/ui/InlineCardOverlay/index.js +1 -1
  33. package/dist/esm/ui/LayoutButton/index.js +3 -2
  34. package/dist/esm/ui/ResizableEmbedCard.js +1 -1
  35. package/dist/types/nodeviews/blockCard.d.ts +2 -2
  36. package/dist/types/nodeviews/inlineCard.d.ts +3 -3
  37. package/dist/types/nodeviews/lazy-inline-card.d.ts +2 -1
  38. package/dist/types/nodeviews/toDOM-fixes/blockCard.d.ts +18 -17
  39. package/dist/types/nodeviews/toDOM-fixes/embedCard.d.ts +18 -17
  40. package/dist/types/nodeviews/toDOM-fixes/inlineCard.d.ts +18 -17
  41. package/dist/types/pm-plugins/doc.d.ts +2 -2
  42. package/dist/types/pm-plugins/util/resolve.d.ts +2 -2
  43. package/dist/types/pm-plugins/util/state.d.ts +28 -20
  44. package/dist/types/ui/DatasourceDropdownOption.d.ts +8 -7
  45. package/dist/types/ui/LayoutButton/index.d.ts +9 -4
  46. package/dist/types/ui/LayoutButton/utils.d.ts +3 -2
  47. package/dist/types/ui/ResizableEmbedCard.d.ts +3 -2
  48. package/dist/types/ui/analytics/utils.d.ts +2 -1
  49. package/dist/types/ui/datasourceErrorBoundary.d.ts +1 -1
  50. package/dist/types-ts4.5/nodeviews/blockCard.d.ts +2 -2
  51. package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +3 -3
  52. package/dist/types-ts4.5/nodeviews/lazy-inline-card.d.ts +2 -1
  53. package/dist/types-ts4.5/nodeviews/toDOM-fixes/blockCard.d.ts +18 -17
  54. package/dist/types-ts4.5/nodeviews/toDOM-fixes/embedCard.d.ts +18 -17
  55. package/dist/types-ts4.5/nodeviews/toDOM-fixes/inlineCard.d.ts +18 -17
  56. package/dist/types-ts4.5/pm-plugins/doc.d.ts +2 -2
  57. package/dist/types-ts4.5/pm-plugins/util/resolve.d.ts +2 -2
  58. package/dist/types-ts4.5/pm-plugins/util/state.d.ts +28 -20
  59. package/dist/types-ts4.5/ui/DatasourceDropdownOption.d.ts +8 -7
  60. package/dist/types-ts4.5/ui/LayoutButton/index.d.ts +9 -4
  61. package/dist/types-ts4.5/ui/LayoutButton/utils.d.ts +3 -2
  62. package/dist/types-ts4.5/ui/ResizableEmbedCard.d.ts +3 -2
  63. package/dist/types-ts4.5/ui/analytics/utils.d.ts +2 -1
  64. package/dist/types-ts4.5/ui/datasourceErrorBoundary.d.ts +1 -1
  65. package/package.json +17 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 13.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.0.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`0fda7892b26bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fda7892b26bc) -
14
+ [ux] Remove useSmartCardReloadAfterCache hook
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 12.4.3
4
21
 
5
22
  ### Patch Changes
@@ -31,7 +31,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
31
31
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
32
32
  * @jsxRuntime classic
33
33
  * @jsx jsx
34
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
34
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
35
35
  var getPosSafely = function getPosSafely(pos) {
36
36
  if (!pos || typeof pos === 'boolean') {
37
37
  return;
@@ -52,8 +52,6 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
52
52
  var _ref2 = (cardContext === null || cardContext === void 0 || (_cardContext$value = cardContext.value) === null || _cardContext$value === void 0 ? void 0 : _cardContext$value.store) || {},
53
53
  getSmartlinkState = _ref2.getState;
54
54
  var cardState = getSmartlinkState === null || getSmartlinkState === void 0 ? void 0 : getSmartlinkState()[url || ''];
55
- var cardStatus = cardState === null || cardState === void 0 ? void 0 : cardState.status;
56
- (0, _hooks.useSmartCardReloadAfterCache)(url, cardStatus, isPageSSRed || false);
57
55
  (0, _react.useEffect)(function () {
58
56
  var id = refId.current;
59
57
  return function () {
@@ -210,7 +208,7 @@ function InlineCardNodeView(props) {
210
208
  }, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
211
209
  return (0, _expValEquals.expValEquals)('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_editorSmartLinkDraggable.SmartLinkDraggable, {
212
210
  url: url,
213
- appearance: _editorSmartLinkDraggable.SMART_LINK_APPERANCE.INLINE,
211
+ appearance: _editorSmartLinkDraggable.SMART_LINK_APPEARANCE.INLINE,
214
212
  source: _editorSmartLinkDraggable.SMART_LINK_DRAG_TYPES.EDITOR
215
213
  }, inlineCardContent) : inlineCardContent;
216
214
  }
@@ -68,7 +68,9 @@ var isEmbedSupportedAtPosition = exports.isEmbedSupportedAtPosition = function i
68
68
  var isBlockSupportedAtPosition = exports.isBlockSupportedAtPosition = function isBlockSupportedAtPosition(currentNodePosition, editorState, currentAppearance) {
69
69
  return isAppearanceSupportedInParent(currentNodePosition, editorState, _model.Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
70
70
  };
71
- var getResolvedAttributesFromStore = exports.getResolvedAttributesFromStore = function getResolvedAttributesFromStore(url, display, store) {
71
+ var getResolvedAttributesFromStore = exports.getResolvedAttributesFromStore = function getResolvedAttributesFromStore(url, display, store
72
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
73
+ ) {
72
74
  if (!store) {
73
75
  return {};
74
76
  }
@@ -20,7 +20,7 @@ var _Pulse = require("../Pulse");
20
20
  * @jsx jsx
21
21
  */
22
22
 
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
24
24
 
25
25
  // editor adds a standard line-height that is bigger than an inline smart link
26
26
  // due to that the link has a bit of white space around it, which doesn't look right when there is pulse around it
@@ -16,7 +16,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
16
  */
17
17
 
18
18
  // not permitted to migrate atlaskit packages to compiled yet, see https://hello.atlassian.net/wiki/spaces/UAF/pages/3006969423/Migrating+AFM+platform+components+to+Compiled+a+guide
19
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
20
20
 
21
21
  var ConfigureOverlayWrapperStyles = (0, _react2.css)({
22
22
  position: 'relative',
@@ -22,7 +22,7 @@ var _useFetchDatasourceInfo = require("./useFetchDatasourceInfo");
22
22
  * @jsx jsx
23
23
  */
24
24
 
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
26
26
 
27
27
  var buttonStyles = (0, _react2.css)({
28
28
  pointerEvents: 'auto'
@@ -23,7 +23,7 @@ var _editDatasourceAction = require("../editDatasourceAction");
23
23
  * @jsx jsx
24
24
  */
25
25
 
26
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
27
27
 
28
28
  var dropdownExpandContainer = (0, _react2.css)({
29
29
  margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
@@ -28,7 +28,7 @@ var _excluded = ["extensionKey"];
28
28
  * @jsxRuntime classic
29
29
  * @jsx jsx
30
30
  */
31
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
32
32
  var dropdownExpandContainer = (0, _react2.css)({
33
33
  margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
34
34
  });
@@ -26,7 +26,7 @@ var _excluded = ["children", "isSelected", "isVisible", "testId", "url"];
26
26
  * @jsxRuntime classic
27
27
  * @jsx jsx
28
28
  */
29
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
30
30
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
31
31
  var DEBOUNCE_IN_MS = 5;
32
32
  var ESTIMATED_MIN_WIDTH_IN_PX = 16;
@@ -24,7 +24,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
24
24
  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; } /**
25
25
  * @jsxRuntime classic
26
26
  * @jsx jsx
27
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
28
28
  var toolbarButtonWrapperStyles = (0, _react2.css)({
29
29
  background: "".concat("var(--ds-background-neutral, ".concat(_colors.N20A, ")")),
30
30
  color: "".concat("var(--ds-icon, ".concat(_colors.N300, ")")),
@@ -131,4 +131,5 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
131
131
  intl: intl
132
132
  });
133
133
  };
134
- var _default = exports.default = (0, _reactIntlNext.injectIntl)(LayoutButtonWrapper);
134
+ var _default_1 = (0, _reactIntlNext.injectIntl)(LayoutButtonWrapper);
135
+ var _default = exports.default = _default_1;
@@ -25,7 +25,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
25
25
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
26
26
  * @jsxRuntime classic
27
27
  * @jsx jsx
28
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
28
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
29
29
  // eslint-disable-next-line @repo/internal/react/no-class-components
30
30
  var ResizableEmbedCard = exports.default = /*#__PURE__*/function (_React$Component) {
31
31
  function ResizableEmbedCard() {
@@ -5,7 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  */
6
6
  import React from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { jsx } from '@emotion/react';
10
10
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
11
11
  import { DATASOURCE_INNER_CONTAINER_CLASSNAME, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
@@ -4,9 +4,9 @@ import rafSchedule from 'raf-schd';
4
4
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
5
  import uuid from 'uuid/v4';
6
6
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
- import { useSharedPluginStateWithSelector, useSmartCardReloadAfterCache } from '@atlaskit/editor-common/hooks';
7
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
8
8
  import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-common/ui';
9
- import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPERANCE } from '@atlaskit/editor-smart-link-draggable';
9
+ import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
10
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
11
  import { CardSSR } from '@atlaskit/smart-card/ssr';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -43,8 +43,6 @@ export const InlineCard = /*#__PURE__*/memo(({
43
43
  getState: getSmartlinkState
44
44
  } = (cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value = cardContext.value) === null || _cardContext$value === void 0 ? void 0 : _cardContext$value.store) || {};
45
45
  const cardState = getSmartlinkState === null || getSmartlinkState === void 0 ? void 0 : getSmartlinkState()[url || ''];
46
- const cardStatus = cardState === null || cardState === void 0 ? void 0 : cardState.status;
47
- useSmartCardReloadAfterCache(url, cardStatus, isPageSSRed || false);
48
46
  useEffect(() => {
49
47
  const id = refId.current;
50
48
  return () => {
@@ -209,7 +207,7 @@ export function InlineCardNodeView(props) {
209
207
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
210
208
  return expValEquals('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/React.createElement(SmartLinkDraggable, {
211
209
  url: url,
212
- appearance: SMART_LINK_APPERANCE.INLINE,
210
+ appearance: SMART_LINK_APPEARANCE.INLINE,
213
211
  source: SMART_LINK_DRAG_TYPES.EDITOR
214
212
  }, inlineCardContent) : inlineCardContent;
215
213
  }
@@ -54,7 +54,9 @@ const isAppearanceSupportedInParent = (currentNodePosition, editorState, fragmen
54
54
  };
55
55
  export const isEmbedSupportedAtPosition = (currentNodePosition, editorState, currentAppearance) => isAppearanceSupportedInParent(currentNodePosition, editorState, Fragment.from(editorState.schema.nodes.embedCard.createChecked({})), currentAppearance);
56
56
  export const isBlockSupportedAtPosition = (currentNodePosition, editorState, currentAppearance) => isAppearanceSupportedInParent(currentNodePosition, editorState, Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
57
- export const getResolvedAttributesFromStore = (url, display, store) => {
57
+ export const getResolvedAttributesFromStore = (url, display, store
58
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
59
+ ) => {
58
60
  if (!store) {
59
61
  return {};
60
62
  }
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback, useEffect, useMemo, useState } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { AnalyticsContext } from '@atlaskit/analytics-next';
10
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -5,7 +5,7 @@
5
5
  import { useCallback, useState } from 'react';
6
6
 
7
7
  // not permitted to migrate atlaskit packages to compiled yet, see https://hello.atlassian.net/wiki/spaces/UAF/pages/3006969423/Migrating+AFM+platform+components+to+Compiled+a+guide
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { OverlayButton } from '@atlaskit/editor-common/link';
11
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { cardMessages as messages } from '@atlaskit/editor-common/messages';
10
10
  import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback, useRef, useState } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { FormattedMessage } from 'react-intl-next';
10
10
  import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback, useMemo, useRef, useState } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { FormattedMessage } from 'react-intl-next';
10
10
  import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
@@ -7,7 +7,7 @@ import _extends from "@babel/runtime/helpers/extends";
7
7
  */
8
8
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
9
9
 
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import debounce from 'lodash/debounce';
13
13
  import { useIntl } from 'react-intl-next';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback, useMemo } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { injectIntl } from 'react-intl-next';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
@@ -130,4 +130,5 @@ const LayoutButtonWrapper = ({
130
130
  intl: intl
131
131
  });
132
132
  };
133
- export default injectIntl(LayoutButtonWrapper);
133
+ const _default_1 = injectIntl(LayoutButtonWrapper);
134
+ export default _default_1;
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  */
7
7
  import React from 'react';
8
8
 
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
10
  import { jsx } from '@emotion/react';
11
11
  import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, calcPxFromColumns, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts, wrapperStyle } from '@atlaskit/editor-common/ui';
12
12
  import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
@@ -17,7 +17,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
17
17
  */
18
18
  import React from 'react';
19
19
 
20
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
21
21
  import { jsx } from '@emotion/react';
22
22
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
23
23
  import { DATASOURCE_INNER_CONTAINER_CLASSNAME, SmartCardSharedCssClassName } from '@atlaskit/editor-common/styles';
@@ -4,9 +4,9 @@ import rafSchedule from 'raf-schd';
4
4
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
5
  import uuid from 'uuid/v4';
6
6
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
- import { useSharedPluginStateWithSelector, useSmartCardReloadAfterCache } from '@atlaskit/editor-common/hooks';
7
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
8
8
  import { UnsupportedInline, findOverflowScrollParent } from '@atlaskit/editor-common/ui';
9
- import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPERANCE } from '@atlaskit/editor-smart-link-draggable';
9
+ import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
10
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
11
  import { CardSSR } from '@atlaskit/smart-card/ssr';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -40,8 +40,6 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
40
40
  var _ref2 = (cardContext === null || cardContext === void 0 || (_cardContext$value = cardContext.value) === null || _cardContext$value === void 0 ? void 0 : _cardContext$value.store) || {},
41
41
  getSmartlinkState = _ref2.getState;
42
42
  var cardState = getSmartlinkState === null || getSmartlinkState === void 0 ? void 0 : getSmartlinkState()[url || ''];
43
- var cardStatus = cardState === null || cardState === void 0 ? void 0 : cardState.status;
44
- useSmartCardReloadAfterCache(url, cardStatus, isPageSSRed || false);
45
43
  useEffect(function () {
46
44
  var id = refId.current;
47
45
  return function () {
@@ -198,7 +196,7 @@ export function InlineCardNodeView(props) {
198
196
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, mode === 'view'))), CompetitorPromptComponent);
199
197
  return expValEquals('cc_drag_and_drop_smart_link_from_content_to_tree', 'isEnabled', true) ? /*#__PURE__*/React.createElement(SmartLinkDraggable, {
200
198
  url: url,
201
- appearance: SMART_LINK_APPERANCE.INLINE,
199
+ appearance: SMART_LINK_APPEARANCE.INLINE,
202
200
  source: SMART_LINK_DRAG_TYPES.EDITOR
203
201
  }, inlineCardContent) : inlineCardContent;
204
202
  }
@@ -61,7 +61,9 @@ export var isEmbedSupportedAtPosition = function isEmbedSupportedAtPosition(curr
61
61
  export var isBlockSupportedAtPosition = function isBlockSupportedAtPosition(currentNodePosition, editorState, currentAppearance) {
62
62
  return isAppearanceSupportedInParent(currentNodePosition, editorState, Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
63
63
  };
64
- export var getResolvedAttributesFromStore = function getResolvedAttributesFromStore(url, display, store) {
64
+ export var getResolvedAttributesFromStore = function getResolvedAttributesFromStore(url, display, store
65
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
66
+ ) {
65
67
  if (!store) {
66
68
  return {};
67
69
  }
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  */
6
6
  import { useCallback, useEffect, useMemo, useState } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { AnalyticsContext } from '@atlaskit/analytics-next';
11
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
6
  import { useCallback, useState } from 'react';
7
7
 
8
8
  // not permitted to migrate atlaskit packages to compiled yet, see https://hello.atlassian.net/wiki/spaces/UAF/pages/3006969423/Migrating+AFM+platform+components+to+Compiled+a+guide
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { OverlayButton } from '@atlaskit/editor-common/link';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { cardMessages as messages } from '@atlaskit/editor-common/messages';
10
10
  import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
@@ -5,7 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
  */
6
6
  import { useCallback, useRef, useState } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { FormattedMessage } from 'react-intl-next';
11
11
  import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
@@ -7,7 +7,7 @@ var _excluded = ["extensionKey"];
7
7
  */
8
8
  import { useCallback, useMemo, useRef, useState } from 'react';
9
9
 
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { FormattedMessage } from 'react-intl-next';
13
13
  import { linkToolbarMessages, cardMessages as messages } from '@atlaskit/editor-common/messages';
@@ -11,7 +11,7 @@ var _excluded = ["children", "isSelected", "isVisible", "testId", "url"];
11
11
  */
12
12
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
13
13
 
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
15
15
  import { css, jsx } from '@emotion/react';
16
16
  import debounce from 'lodash/debounce';
17
17
  import { useIntl } from 'react-intl-next';
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  */
8
8
  import { useCallback, useMemo } from 'react';
9
9
 
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { injectIntl } from 'react-intl-next';
13
13
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
@@ -127,4 +127,5 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
127
127
  intl: intl
128
128
  });
129
129
  };
130
- export default injectIntl(LayoutButtonWrapper);
130
+ var _default_1 = injectIntl(LayoutButtonWrapper);
131
+ export default _default_1;
@@ -15,7 +15,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
15
15
  */
16
16
  import React from 'react';
17
17
 
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
19
19
  import { jsx } from '@emotion/react';
20
20
  import { calcColumnsFromPx, calcMediaPxWidth, calcPctFromPx, calcPxFromColumns, handleSides, imageAlignmentMap, Resizer, snapTo, wrappedLayouts, wrapperStyle } from '@atlaskit/editor-common/ui';
21
21
  import { findParentNodeOfTypeClosestToPos, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import ReactNodeView, { type getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
3
3
  import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
4
4
  import type { Node } from '@atlaskit/editor-prosemirror/model';
5
- import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
5
+ import type { Decoration, DecorationSource, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
6
6
  import { Datasource } from '../nodeviews/datasource';
7
7
  import type { SmartCardProps } from './genericCard';
8
8
  export declare class BlockCardComponent extends React.PureComponent<SmartCardProps & {
@@ -50,4 +50,4 @@ export interface BlockCardNodeViewProperties {
50
50
  pmPluginFactoryParams: PMPluginFactoryParams;
51
51
  provider: BlockCardNodeViewProps['provider'];
52
52
  }
53
- export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, CompetitorPrompt, isPageSSRed, provider, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView | Datasource | BlockCard;
53
+ export declare const blockCardNodeView: ({ pmPluginFactoryParams, actionOptions, pluginInjectionApi, onClickCallback, allowDatasource, inlineCardViewProducer, CompetitorPrompt, isPageSSRed, provider, }: BlockCardNodeViewProperties) => (node: Node, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => BlockCard | Datasource | NodeView;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { InlineNodeViewComponentProps, getInlineNodeViewProducer } from '@atlaskit/editor-common/react-node-view';
3
3
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
4
+ import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { SmartCardProps } from './genericCard';
6
6
  import { type InlineCardWithAwarenessProps } from './inlineCardWithAwareness';
7
- export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick: propsOnClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, pluginInjectionApi, disablePreviewPanel, }: SmartCardProps) => React.JSX.Element | null>;
8
8
  export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | 'isPageSSRed' | 'CompetitorPrompt' | 'provider'>;
9
9
  /**
10
10
  *
@@ -16,4 +16,4 @@ export interface InlineCardNodeViewProperties {
16
16
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
17
17
  isPageSSRed: InlineCardNodeViewProps['isPageSSRed'];
18
18
  }
19
- export declare const inlineCardNodeView: ({ inlineCardViewProducer }: InlineCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView;
19
+ export declare const inlineCardNodeView: ({ inlineCardViewProducer }: InlineCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => NodeView;
@@ -1,2 +1,3 @@
1
+ import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
1
2
  import { type InlineCardNodeViewProperties } from './inlineCard';
2
- export declare const lazyInlineCardView: (props: InlineCardNodeViewProperties) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
3
+ export declare const lazyInlineCardView: (props: InlineCardNodeViewProperties) => NodeViewConstructor;
@@ -1,28 +1,29 @@
1
- import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
1
+ import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
3
  export declare const blockCardSpecWithFixedToDOM: () => {
3
- toDOM: (node: PMNode) => DOMOutputSpec;
4
- content?: string;
5
- marks?: string;
6
- group?: string;
7
- inline?: boolean;
8
4
  atom?: boolean;
9
5
  attrs?: {
10
- [name: string]: import("prosemirror-model").AttributeSpec;
6
+ [name: string]: AttributeSpec;
11
7
  };
12
- selectable?: boolean;
13
- draggable?: boolean;
14
8
  code?: boolean;
15
- whitespace?: "pre" | "normal";
9
+ content?: string;
10
+ defining?: boolean;
16
11
  definingAsContext?: boolean;
17
12
  definingForContent?: boolean;
18
- defining?: boolean;
13
+ disableDropCursor?: boolean | ((view: EditorView, pos: {
14
+ inside: number;
15
+ pos: number;
16
+ }, event: DragEvent) => boolean);
17
+ draggable?: boolean;
18
+ group?: string;
19
+ inline?: boolean;
19
20
  isolating?: boolean;
20
- parseDOM?: readonly import("prosemirror-model").TagParseRule[];
21
- toDebugString?: (node: PMNode) => string;
22
21
  leafText?: (node: PMNode) => string;
23
22
  linebreakReplacement?: boolean;
24
- disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
25
- pos: number;
26
- inside: number;
27
- }, event: DragEvent) => boolean);
23
+ marks?: string;
24
+ parseDOM?: readonly TagParseRule[];
25
+ selectable?: boolean;
26
+ toDebugString?: (node: PMNode) => string;
27
+ toDOM: (node: PMNode) => DOMOutputSpec;
28
+ whitespace?: "pre" | "normal";
28
29
  };
@@ -1,28 +1,29 @@
1
- import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
1
+ import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
3
  export declare const embedCardSpecWithFixedToDOM: () => {
3
- toDOM: (node: PMNode) => DOMOutputSpec;
4
- content?: string;
5
- marks?: string;
6
- group?: string;
7
- inline?: boolean;
8
4
  atom?: boolean;
9
5
  attrs?: {
10
- [name: string]: import("prosemirror-model").AttributeSpec;
6
+ [name: string]: AttributeSpec;
11
7
  };
12
- selectable?: boolean;
13
- draggable?: boolean;
14
8
  code?: boolean;
15
- whitespace?: "pre" | "normal";
9
+ content?: string;
10
+ defining?: boolean;
16
11
  definingAsContext?: boolean;
17
12
  definingForContent?: boolean;
18
- defining?: boolean;
13
+ disableDropCursor?: boolean | ((view: EditorView, pos: {
14
+ inside: number;
15
+ pos: number;
16
+ }, event: DragEvent) => boolean);
17
+ draggable?: boolean;
18
+ group?: string;
19
+ inline?: boolean;
19
20
  isolating?: boolean;
20
- parseDOM?: readonly import("prosemirror-model").TagParseRule[];
21
- toDebugString?: (node: PMNode) => string;
22
21
  leafText?: (node: PMNode) => string;
23
22
  linebreakReplacement?: boolean;
24
- disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
25
- pos: number;
26
- inside: number;
27
- }, event: DragEvent) => boolean);
23
+ marks?: string;
24
+ parseDOM?: readonly TagParseRule[];
25
+ selectable?: boolean;
26
+ toDebugString?: (node: PMNode) => string;
27
+ toDOM: (node: PMNode) => DOMOutputSpec;
28
+ whitespace?: "pre" | "normal";
28
29
  };