@atlaskit/editor-plugin-card 5.4.1 → 5.4.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/nodeviews/inlineCard.js +27 -5
  3. package/dist/cjs/nodeviews/inlineCardWithAwareness.js +8 -4
  4. package/dist/cjs/nodeviews/lazy-inline-card.js +2 -1
  5. package/dist/cjs/pm-plugins/main.js +6 -3
  6. package/dist/cjs/ui/AwarenessWrapper/index.js +6 -3
  7. package/dist/cjs/ui/Pulse/index.js +4 -2
  8. package/dist/es2019/nodeviews/inlineCard.js +42 -18
  9. package/dist/es2019/nodeviews/inlineCardWithAwareness.js +8 -4
  10. package/dist/es2019/nodeviews/lazy-inline-card.js +2 -1
  11. package/dist/es2019/pm-plugins/main.js +6 -3
  12. package/dist/es2019/ui/AwarenessWrapper/index.js +6 -3
  13. package/dist/es2019/ui/Pulse/index.js +4 -2
  14. package/dist/esm/nodeviews/inlineCard.js +27 -5
  15. package/dist/esm/nodeviews/inlineCardWithAwareness.js +8 -4
  16. package/dist/esm/nodeviews/lazy-inline-card.js +2 -1
  17. package/dist/esm/pm-plugins/main.js +6 -3
  18. package/dist/esm/ui/AwarenessWrapper/index.js +6 -3
  19. package/dist/esm/ui/Pulse/index.js +4 -2
  20. package/dist/types/nodeviews/genericCard.d.ts +1 -0
  21. package/dist/types/nodeviews/inlineCard.d.ts +3 -2
  22. package/dist/types/nodeviews/inlineCardWithAwareness.d.ts +1 -1
  23. package/dist/types/types/index.d.ts +1 -0
  24. package/dist/types/ui/AwarenessWrapper/index.d.ts +1 -1
  25. package/dist/types/ui/Pulse/index.d.ts +2 -1
  26. package/dist/types-ts4.5/nodeviews/genericCard.d.ts +1 -0
  27. package/dist/types-ts4.5/nodeviews/inlineCard.d.ts +3 -2
  28. package/dist/types-ts4.5/nodeviews/inlineCardWithAwareness.d.ts +1 -1
  29. package/dist/types-ts4.5/types/index.d.ts +1 -0
  30. package/dist/types-ts4.5/ui/AwarenessWrapper/index.d.ts +1 -1
  31. package/dist/types-ts4.5/ui/Pulse/index.d.ts +2 -1
  32. package/package.json +5 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 5.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#129138](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129138)
8
+ [`9f003b1dbcdb5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9f003b1dbcdb5) -
9
+ Render ssred smartlink for editor under feature gate 'platform_ssr_smartlinks_editor'
10
+
3
11
  ## 5.4.1
4
12
 
5
13
  ### Patch Changes
@@ -19,6 +19,7 @@ var _ui = require("@atlaskit/editor-common/ui");
19
19
  var _state = require("@atlaskit/editor-prosemirror/state");
20
20
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
21
  var _smartCard = require("@atlaskit/smart-card");
22
+ var _ssr = require("@atlaskit/smart-card/ssr");
22
23
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
23
24
  var _actions = require("../pm-plugins/actions");
24
25
  var _utils = require("../pm-plugins/utils");
@@ -38,7 +39,8 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
38
39
  onRes = _ref.onResolve,
39
40
  isHovered = _ref.isHovered,
40
41
  showHoverPreview = _ref.showHoverPreview,
41
- hoverPreviewOptions = _ref.hoverPreviewOptions;
42
+ hoverPreviewOptions = _ref.hoverPreviewOptions,
43
+ isPageSSRed = _ref.isPageSSRed;
42
44
  var _node$attrs = node.attrs,
43
45
  url = _node$attrs.url,
44
46
  data = _node$attrs.data;
@@ -97,6 +99,22 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
97
99
  });
98
100
  }, [onResolve]);
99
101
  var card = (0, _react.useMemo)(function () {
102
+ if (isPageSSRed && url && (0, _platformFeatureFlags.fg)('platform_ssr_smartlinks_editor')) {
103
+ return /*#__PURE__*/_react.default.createElement(_ssr.CardSSR, {
104
+ key: url,
105
+ url: url,
106
+ appearance: "inline",
107
+ onClick: onClick,
108
+ container: scrollContainer,
109
+ onResolve: onResolve,
110
+ onError: onError,
111
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
112
+ actionOptions: actionOptions,
113
+ isHovered: isHovered,
114
+ showHoverPreview: showHoverPreview,
115
+ hoverPreviewOptions: hoverPreviewOptions
116
+ });
117
+ }
100
118
  return /*#__PURE__*/_react.default.createElement(_smartCard.Card, {
101
119
  key: url,
102
120
  url: url !== null && url !== void 0 ? url : data.url,
@@ -111,7 +129,7 @@ var InlineCard = exports.InlineCard = /*#__PURE__*/(0, _react.memo)(function (_r
111
129
  showHoverPreview: showHoverPreview,
112
130
  hoverPreviewOptions: hoverPreviewOptions
113
131
  });
114
- }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions]);
132
+ }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed]);
115
133
 
116
134
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
117
135
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -132,7 +150,8 @@ function InlineCardNodeView(props) {
132
150
  enableInlineUpgradeFeatures = props.enableInlineUpgradeFeatures,
133
151
  pluginInjectionApi = props.pluginInjectionApi,
134
152
  onClickCallback = props.onClickCallback,
135
- __livePage = props.__livePage;
153
+ __livePage = props.__livePage,
154
+ isPageSSRed = props.isPageSSRed;
136
155
  var _useState = (0, _react.useState)(false),
137
156
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
138
157
  isOverlayHovered = _useState2[0],
@@ -155,7 +174,8 @@ function InlineCardNodeView(props) {
155
174
  showHoverPreview: showHoverPreview,
156
175
  hoverPreviewOptions: {
157
176
  fadeInDelay: livePagesHoverCardFadeInDelay
158
- }
177
+ },
178
+ isPageSSRed: isPageSSRed
159
179
  });
160
180
  return (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view' ? inlineCard : /*#__PURE__*/_react.default.createElement(_ConfigureOverlay.default, {
161
181
  targetElementPos: getPos(),
@@ -179,7 +199,9 @@ function InlineCardNodeView(props) {
179
199
  actionOptions: actionOptions,
180
200
  useAlternativePreloader: useAlternativePreloader,
181
201
  pluginInjectionApi: pluginInjectionApi,
182
- onClickCallback: onClickCallback
202
+ onClickCallback: onClickCallback,
203
+ isPageSSRed: isPageSSRed,
204
+ appearance: "inline"
183
205
  // Ignored via go/ees005
184
206
  // eslint-disable-next-line react/jsx-props-no-spreading
185
207
  }, enableInlineUpgradeFeatures && (0, _utils.getAwarenessProps)(view.state, getPos, allowEmbeds, allowBlockCards, !(0, _experiments.editorExperiment)('live_pages_graceful_edit', 'control') ? true : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
@@ -26,7 +26,9 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
26
26
  onClick = _ref.onClick,
27
27
  isPulseEnabled = _ref.isPulseEnabled,
28
28
  isOverlayEnabled = _ref.isOverlayEnabled,
29
- isSelected = _ref.isSelected;
29
+ isSelected = _ref.isSelected,
30
+ isPageSSRed = _ref.isPageSSRed,
31
+ appearance = _ref.appearance;
30
32
  var _useState = (0, _react.useState)(false),
31
33
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
32
34
  isHovered = _useState2[0],
@@ -80,9 +82,10 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
80
82
  onResolve: onResolve,
81
83
  onClick: onClick,
82
84
  cardContext: cardContext,
83
- isHovered: isHovered
85
+ isHovered: isHovered,
86
+ isPageSSRed: isPageSSRed
84
87
  });
85
- }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view]);
88
+ }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
86
89
  return isOverlayEnabled || isPulseEnabled ? /*#__PURE__*/_react.default.createElement(_AwarenessWrapper.AwarenessWrapper, {
87
90
  isOverlayEnabled: isOverlayEnabled,
88
91
  isPulseEnabled: isPulseEnabled,
@@ -95,7 +98,8 @@ var InlineCardWithAwareness = exports.InlineCardWithAwareness = /*#__PURE__*/(0,
95
98
  isResolvedViewRendered: isResolvedViewRendered,
96
99
  markMostRecentlyInsertedLink: markMostRecentlyInsertedLink,
97
100
  pluginInjectionApi: pluginInjectionApi,
98
- setOverlayHoveredStyles: setOverlayHoveredStyles
101
+ setOverlayHoveredStyles: setOverlayHoveredStyles,
102
+ appearance: appearance
99
103
  }, innerCard) :
100
104
  /*#__PURE__*/
101
105
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -13,7 +13,8 @@ var _inlineCard = require("./inlineCard");
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
14
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(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 && {}.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; }
15
15
  var lazyInlineCardView = exports.lazyInlineCardView = function lazyInlineCardView(props) {
16
- if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || !(0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_smartlinks')) {
16
+ var isPageSSRed = props.isPageSSRed || false;
17
+ if ((0, _experiments.editorExperiment)('platform_editor_exp_lazy_node_views', false) || !(0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_smartlinks') || isPageSSRed && (0, _platformFeatureFlags.fg)('platform_ssr_smartlinks_editor')) {
17
18
  return (0, _inlineCard.inlineCardNodeView)(props);
18
19
  }
19
20
  return (0, _lazyNodeView.withLazyLoading)({
@@ -67,7 +67,8 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
67
67
  allowEmbeds = options.allowEmbeds,
68
68
  allowBlockCards = options.allowBlockCards,
69
69
  onClickCallback = options.onClickCallback,
70
- __livePage = options.__livePage;
70
+ __livePage = options.__livePage,
71
+ isPageSSRed = options.isPageSSRed;
71
72
  var enableInlineUpgradeFeatures = !!showUpgradeDiscoverability;
72
73
  var inlineCardViewProducer = (0, _reactNodeView.getInlineNodeViewProducer)(_objectSpread({
73
74
  pmPluginFactoryParams: pmPluginFactoryParams,
@@ -80,7 +81,8 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
80
81
  allowBlockCards: allowBlockCards,
81
82
  pluginInjectionApi: pluginInjectionApi,
82
83
  onClickCallback: onClickCallback,
83
- __livePage: __livePage
84
+ __livePage: __livePage,
85
+ isPageSSRed: isPageSSRed
84
86
  }
85
87
  }, __livePage && (0, _platformFeatureFlags.fg)('linking_platform_smart_links_in_live_pages') && {
86
88
  extraNodeViewProps: {
@@ -254,7 +256,8 @@ var createPlugin = exports.createPlugin = function createPlugin(options, pluginI
254
256
  props: _objectSpread({
255
257
  nodeViews: {
256
258
  inlineCard: (0, _lazyInlineCard.lazyInlineCardView)({
257
- inlineCardViewProducer: inlineCardViewProducer
259
+ inlineCardViewProducer: inlineCardViewProducer,
260
+ isPageSSRed: isPageSSRed
258
261
  }),
259
262
  blockCard: (0, _lazyBlockCard.lazyBlockCardView)({
260
263
  pmPluginFactoryParams: pmPluginFactoryParams,
@@ -45,7 +45,8 @@ var AwarenessWrapper = exports.AwarenessWrapper = function AwarenessWrapper(_ref
45
45
  markMostRecentlyInsertedLink = _ref.markMostRecentlyInsertedLink,
46
46
  pluginInjectionApi = _ref.pluginInjectionApi,
47
47
  setOverlayHoveredStyles = _ref.setOverlayHoveredStyles,
48
- url = _ref.url;
48
+ url = _ref.url,
49
+ appearance = _ref.appearance;
49
50
  var _useState = (0, _react.useState)(false),
50
51
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
51
52
  isHovered = _useState2[0],
@@ -112,6 +113,7 @@ var AwarenessWrapper = exports.AwarenessWrapper = function AwarenessWrapper(_ref
112
113
  url: url
113
114
  }, children);
114
115
  }, [children, isHovered, url, handleOverlayChange, isResolvedViewRendered]);
116
+ var isInline = appearance === 'inline';
115
117
  return (0, _react.useMemo)(function () {
116
118
  var _cardContext$value;
117
119
  return (
@@ -128,8 +130,9 @@ var AwarenessWrapper = exports.AwarenessWrapper = function AwarenessWrapper(_ref
128
130
  localStorageKeyExpirationInMs: _localStorage.ONE_DAY_IN_MILLISECONDS,
129
131
  discoveryMode: "start",
130
132
  shouldShowPulse: isResolvedViewRendered && shouldShowLinkPulse,
131
- testId: "link-discovery-pulse"
133
+ testId: "link-discovery-pulse",
134
+ isInline: isInline
132
135
  }, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? cardWithOpenButtonOverlay : cardWithOverlay)))
133
136
  );
134
- }, [shouldShowLinkPulse, url, cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.store, isResolvedViewRendered, cardWithOverlay, cardWithOpenButtonOverlay]);
137
+ }, [shouldShowLinkPulse, url, cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.store, isResolvedViewRendered, cardWithOverlay, cardWithOpenButtonOverlay, isInline]);
135
138
  };
@@ -18,7 +18,8 @@ var DiscoveryPulse = exports.DiscoveryPulse = function DiscoveryPulse(_ref) {
18
18
  _ref$discoveryMode = _ref.discoveryMode,
19
19
  discoveryMode = _ref$discoveryMode === void 0 ? 'iteration' : _ref$discoveryMode,
20
20
  shouldShowPulse = _ref.shouldShowPulse,
21
- testId = _ref.testId;
21
+ testId = _ref.testId,
22
+ isInline = _ref.isInline;
22
23
  var discovered = (0, _localStorage.isLocalStorageKeyDiscovered)(localStorageKey);
23
24
  var showPulse = shouldShowPulse !== null && shouldShowPulse !== void 0 ? shouldShowPulse : !discovered;
24
25
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
@@ -44,6 +45,7 @@ var DiscoveryPulse = exports.DiscoveryPulse = function DiscoveryPulse(_ref) {
44
45
  onAnimationIteration: discoveryMode === 'iteration' ? onDiscovery : undefined,
45
46
  onAnimationStart: discoveryMode === 'start' ? onDiscovery : undefined,
46
47
  showPulse: showPulse,
47
- testId: testId
48
+ testId: testId,
49
+ isInline: isInline
48
50
  }, children);
49
51
  };
@@ -8,6 +8,7 @@ import { findOverflowScrollParent, UnsupportedInline } from '@atlaskit/editor-co
8
8
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
9
9
  import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { Card as SmartCard } from '@atlaskit/smart-card';
11
+ import { CardSSR } from '@atlaskit/smart-card/ssr';
11
12
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
13
  import { registerCard, removeCard } from '../pm-plugins/actions';
13
14
  import { getAwarenessProps } from '../pm-plugins/utils';
@@ -25,7 +26,8 @@ export const InlineCard = /*#__PURE__*/memo(({
25
26
  onResolve: onRes,
26
27
  isHovered,
27
28
  showHoverPreview,
28
- hoverPreviewOptions
29
+ hoverPreviewOptions,
30
+ isPageSSRed
29
31
  }) => {
30
32
  const {
31
33
  url,
@@ -89,20 +91,38 @@ export const InlineCard = /*#__PURE__*/memo(({
89
91
  url
90
92
  });
91
93
  }, [onResolve]);
92
- const card = useMemo(() => /*#__PURE__*/React.createElement(SmartCard, {
93
- key: url,
94
- url: url !== null && url !== void 0 ? url : data.url,
95
- appearance: "inline",
96
- onClick: onClick,
97
- container: scrollContainer,
98
- onResolve: onResolve,
99
- onError: onError,
100
- inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
101
- actionOptions: actionOptions,
102
- isHovered: isHovered,
103
- showHoverPreview: showHoverPreview,
104
- hoverPreviewOptions: hoverPreviewOptions
105
- }), [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions]);
94
+ const card = useMemo(() => {
95
+ if (isPageSSRed && url && fg('platform_ssr_smartlinks_editor')) {
96
+ return /*#__PURE__*/React.createElement(CardSSR, {
97
+ key: url,
98
+ url: url,
99
+ appearance: "inline",
100
+ onClick: onClick,
101
+ container: scrollContainer,
102
+ onResolve: onResolve,
103
+ onError: onError,
104
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
105
+ actionOptions: actionOptions,
106
+ isHovered: isHovered,
107
+ showHoverPreview: showHoverPreview,
108
+ hoverPreviewOptions: hoverPreviewOptions
109
+ });
110
+ }
111
+ return /*#__PURE__*/React.createElement(SmartCard, {
112
+ key: url,
113
+ url: url !== null && url !== void 0 ? url : data.url,
114
+ appearance: "inline",
115
+ onClick: onClick,
116
+ container: scrollContainer,
117
+ onResolve: onResolve,
118
+ onError: onError,
119
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
120
+ actionOptions: actionOptions,
121
+ isHovered: isHovered,
122
+ showHoverPreview: showHoverPreview,
123
+ hoverPreviewOptions: hoverPreviewOptions
124
+ });
125
+ }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed]);
106
126
 
107
127
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
108
128
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -124,7 +144,8 @@ export function InlineCardNodeView(props) {
124
144
  enableInlineUpgradeFeatures,
125
145
  pluginInjectionApi,
126
146
  onClickCallback,
127
- __livePage
147
+ __livePage,
148
+ isPageSSRed
128
149
  } = props;
129
150
  const [isOverlayHovered, setIsOverlayHovered] = useState(false);
130
151
  const {
@@ -146,7 +167,8 @@ export function InlineCardNodeView(props) {
146
167
  showHoverPreview: showHoverPreview,
147
168
  hoverPreviewOptions: {
148
169
  fadeInDelay: livePagesHoverCardFadeInDelay
149
- }
170
+ },
171
+ isPageSSRed: isPageSSRed
150
172
  });
151
173
  return (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view' ? inlineCard : /*#__PURE__*/React.createElement(OverlayWrapper, {
152
174
  targetElementPos: getPos(),
@@ -170,7 +192,9 @@ export function InlineCardNodeView(props) {
170
192
  actionOptions: actionOptions,
171
193
  useAlternativePreloader: useAlternativePreloader,
172
194
  pluginInjectionApi: pluginInjectionApi,
173
- onClickCallback: onClickCallback
195
+ onClickCallback: onClickCallback,
196
+ isPageSSRed: isPageSSRed,
197
+ appearance: "inline"
174
198
  // Ignored via go/ees005
175
199
  // eslint-disable-next-line react/jsx-props-no-spreading
176
200
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, !editorExperiment('live_pages_graceful_edit', 'control') ? true : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
@@ -15,7 +15,9 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
15
15
  onClick,
16
16
  isPulseEnabled,
17
17
  isOverlayEnabled,
18
- isSelected
18
+ isSelected,
19
+ isPageSSRed,
20
+ appearance
19
21
  }) => {
20
22
  const [isHovered, setIsHovered] = useState(false);
21
23
  const [isInserted, setIsInserted] = useState(false);
@@ -54,8 +56,9 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
54
56
  onResolve: onResolve,
55
57
  onClick: onClick,
56
58
  cardContext: cardContext,
57
- isHovered: isHovered
58
- }), [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view]);
59
+ isHovered: isHovered,
60
+ isPageSSRed: isPageSSRed
61
+ }), [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
59
62
  return isOverlayEnabled || isPulseEnabled ? /*#__PURE__*/React.createElement(AwarenessWrapper, {
60
63
  isOverlayEnabled: isOverlayEnabled,
61
64
  isPulseEnabled: isPulseEnabled,
@@ -68,7 +71,8 @@ export const InlineCardWithAwareness = /*#__PURE__*/memo(({
68
71
  isResolvedViewRendered: isResolvedViewRendered,
69
72
  markMostRecentlyInsertedLink: markMostRecentlyInsertedLink,
70
73
  pluginInjectionApi: pluginInjectionApi,
71
- setOverlayHoveredStyles: setOverlayHoveredStyles
74
+ setOverlayHoveredStyles: setOverlayHoveredStyles,
75
+ appearance: appearance
72
76
  }, innerCard) :
73
77
  /*#__PURE__*/
74
78
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -3,7 +3,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { inlineCardNodeView } from './inlineCard';
5
5
  export const lazyInlineCardView = props => {
6
- if (editorExperiment('platform_editor_exp_lazy_node_views', false) || !fg('platform_editor_ssr_fix_smartlinks')) {
6
+ const isPageSSRed = props.isPageSSRed || false;
7
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false) || !fg('platform_editor_ssr_fix_smartlinks') || isPageSSRed && fg('platform_ssr_smartlinks_editor')) {
7
8
  return inlineCardNodeView(props);
8
9
  }
9
10
  return withLazyLoading({
@@ -57,7 +57,8 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
57
57
  allowBlockCards,
58
58
  onClickCallback,
59
59
  // @ts-ignore Temporary solution to check for Live Page editor.
60
- __livePage
60
+ __livePage,
61
+ isPageSSRed
61
62
  } = options;
62
63
  const enableInlineUpgradeFeatures = !!showUpgradeDiscoverability;
63
64
  const inlineCardViewProducer = getInlineNodeViewProducer({
@@ -71,7 +72,8 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
71
72
  allowBlockCards,
72
73
  pluginInjectionApi,
73
74
  onClickCallback,
74
- __livePage
75
+ __livePage,
76
+ isPageSSRed
75
77
  },
76
78
  ...(__livePage && fg('linking_platform_smart_links_in_live_pages') && {
77
79
  extraNodeViewProps: {
@@ -253,7 +255,8 @@ export const createPlugin = (options, pluginInjectionApi) => pmPluginFactoryPara
253
255
  props: {
254
256
  nodeViews: {
255
257
  inlineCard: lazyInlineCardView({
256
- inlineCardViewProducer
258
+ inlineCardViewProducer,
259
+ isPageSSRed
257
260
  }),
258
261
  blockCard: lazyBlockCardView({
259
262
  pmPluginFactoryParams,
@@ -35,7 +35,8 @@ export const AwarenessWrapper = ({
35
35
  markMostRecentlyInsertedLink,
36
36
  pluginInjectionApi,
37
37
  setOverlayHoveredStyles,
38
- url
38
+ url,
39
+ appearance
39
40
  }) => {
40
41
  var _cardContext$value2;
41
42
  const [isHovered, setIsHovered] = useState(false);
@@ -94,6 +95,7 @@ export const AwarenessWrapper = ({
94
95
  url: url
95
96
  }, children);
96
97
  }, [children, isHovered, url, handleOverlayChange, isResolvedViewRendered]);
98
+ const isInline = appearance === 'inline';
97
99
  return useMemo(() => {
98
100
  var _cardContext$value;
99
101
  return (
@@ -110,8 +112,9 @@ export const AwarenessWrapper = ({
110
112
  localStorageKeyExpirationInMs: ONE_DAY_IN_MILLISECONDS,
111
113
  discoveryMode: "start",
112
114
  shouldShowPulse: isResolvedViewRendered && shouldShowLinkPulse,
113
- testId: "link-discovery-pulse"
115
+ testId: "link-discovery-pulse",
116
+ isInline: isInline
114
117
  }, editorExperiment('platform_editor_controls', 'variant1') ? cardWithOpenButtonOverlay : cardWithOverlay)))
115
118
  );
116
- }, [shouldShowLinkPulse, url, cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.store, isResolvedViewRendered, cardWithOverlay, cardWithOpenButtonOverlay]);
119
+ }, [shouldShowLinkPulse, url, cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.store, isResolvedViewRendered, cardWithOverlay, cardWithOpenButtonOverlay, isInline]);
117
120
  };
@@ -8,7 +8,8 @@ export const DiscoveryPulse = ({
8
8
  localStorageKeyExpirationInMs,
9
9
  discoveryMode = 'iteration',
10
10
  shouldShowPulse,
11
- testId
11
+ testId,
12
+ isInline
12
13
  }) => {
13
14
  const discovered = isLocalStorageKeyDiscovered(localStorageKey);
14
15
  const showPulse = shouldShowPulse !== null && shouldShowPulse !== void 0 ? shouldShowPulse : !discovered;
@@ -36,6 +37,7 @@ export const DiscoveryPulse = ({
36
37
  onAnimationIteration: discoveryMode === 'iteration' ? onDiscovery : undefined,
37
38
  onAnimationStart: discoveryMode === 'start' ? onDiscovery : undefined,
38
39
  showPulse: showPulse,
39
- testId: testId
40
+ testId: testId,
41
+ isInline: isInline
40
42
  }, children);
41
43
  };
@@ -9,6 +9,7 @@ import { findOverflowScrollParent, UnsupportedInline } from '@atlaskit/editor-co
9
9
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
10
10
  import { fg } from '@atlaskit/platform-feature-flags';
11
11
  import { Card as SmartCard } from '@atlaskit/smart-card';
12
+ import { CardSSR } from '@atlaskit/smart-card/ssr';
12
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import { registerCard, removeCard } from '../pm-plugins/actions';
14
15
  import { getAwarenessProps } from '../pm-plugins/utils';
@@ -26,7 +27,8 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
26
27
  onRes = _ref.onResolve,
27
28
  isHovered = _ref.isHovered,
28
29
  showHoverPreview = _ref.showHoverPreview,
29
- hoverPreviewOptions = _ref.hoverPreviewOptions;
30
+ hoverPreviewOptions = _ref.hoverPreviewOptions,
31
+ isPageSSRed = _ref.isPageSSRed;
30
32
  var _node$attrs = node.attrs,
31
33
  url = _node$attrs.url,
32
34
  data = _node$attrs.data;
@@ -85,6 +87,22 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
85
87
  });
86
88
  }, [onResolve]);
87
89
  var card = useMemo(function () {
90
+ if (isPageSSRed && url && fg('platform_ssr_smartlinks_editor')) {
91
+ return /*#__PURE__*/React.createElement(CardSSR, {
92
+ key: url,
93
+ url: url,
94
+ appearance: "inline",
95
+ onClick: onClick,
96
+ container: scrollContainer,
97
+ onResolve: onResolve,
98
+ onError: onError,
99
+ inlinePreloaderStyle: useAlternativePreloader ? 'on-right-without-skeleton' : undefined,
100
+ actionOptions: actionOptions,
101
+ isHovered: isHovered,
102
+ showHoverPreview: showHoverPreview,
103
+ hoverPreviewOptions: hoverPreviewOptions
104
+ });
105
+ }
88
106
  return /*#__PURE__*/React.createElement(SmartCard, {
89
107
  key: url,
90
108
  url: url !== null && url !== void 0 ? url : data.url,
@@ -99,7 +117,7 @@ export var InlineCard = /*#__PURE__*/memo(function (_ref) {
99
117
  showHoverPreview: showHoverPreview,
100
118
  hoverPreviewOptions: hoverPreviewOptions
101
119
  });
102
- }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions]);
120
+ }, [url, data, onClick, scrollContainer, onResolve, onError, useAlternativePreloader, actionOptions, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed]);
103
121
 
104
122
  // [WS-2307]: we only render card wrapped into a Provider when the value is ready,
105
123
  // otherwise if we got data, we can render the card directly since it doesn't need the Provider
@@ -120,7 +138,8 @@ export function InlineCardNodeView(props) {
120
138
  enableInlineUpgradeFeatures = props.enableInlineUpgradeFeatures,
121
139
  pluginInjectionApi = props.pluginInjectionApi,
122
140
  onClickCallback = props.onClickCallback,
123
- __livePage = props.__livePage;
141
+ __livePage = props.__livePage,
142
+ isPageSSRed = props.isPageSSRed;
124
143
  var _useState = useState(false),
125
144
  _useState2 = _slicedToArray(_useState, 2),
126
145
  isOverlayHovered = _useState2[0],
@@ -143,7 +162,8 @@ export function InlineCardNodeView(props) {
143
162
  showHoverPreview: showHoverPreview,
144
163
  hoverPreviewOptions: {
145
164
  fadeInDelay: livePagesHoverCardFadeInDelay
146
- }
165
+ },
166
+ isPageSSRed: isPageSSRed
147
167
  });
148
168
  return (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view' ? inlineCard : /*#__PURE__*/React.createElement(OverlayWrapper, {
149
169
  targetElementPos: getPos(),
@@ -167,7 +187,9 @@ export function InlineCardNodeView(props) {
167
187
  actionOptions: actionOptions,
168
188
  useAlternativePreloader: useAlternativePreloader,
169
189
  pluginInjectionApi: pluginInjectionApi,
170
- onClickCallback: onClickCallback
190
+ onClickCallback: onClickCallback,
191
+ isPageSSRed: isPageSSRed,
192
+ appearance: "inline"
171
193
  // Ignored via go/ees005
172
194
  // eslint-disable-next-line react/jsx-props-no-spreading
173
195
  }, enableInlineUpgradeFeatures && getAwarenessProps(view.state, getPos, allowEmbeds, allowBlockCards, !editorExperiment('live_pages_graceful_edit', 'control') ? true : (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view')));
@@ -16,7 +16,9 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
16
16
  onClick = _ref.onClick,
17
17
  isPulseEnabled = _ref.isPulseEnabled,
18
18
  isOverlayEnabled = _ref.isOverlayEnabled,
19
- isSelected = _ref.isSelected;
19
+ isSelected = _ref.isSelected,
20
+ isPageSSRed = _ref.isPageSSRed,
21
+ appearance = _ref.appearance;
20
22
  var _useState = useState(false),
21
23
  _useState2 = _slicedToArray(_useState, 2),
22
24
  isHovered = _useState2[0],
@@ -70,9 +72,10 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
70
72
  onResolve: onResolve,
71
73
  onClick: onClick,
72
74
  cardContext: cardContext,
73
- isHovered: isHovered
75
+ isHovered: isHovered,
76
+ isPageSSRed: isPageSSRed
74
77
  });
75
- }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view]);
78
+ }, [actionOptions, cardContext, getPos, isHovered, node, onClick, onResolve, useAlternativePreloader, view, isPageSSRed]);
76
79
  return isOverlayEnabled || isPulseEnabled ? /*#__PURE__*/React.createElement(AwarenessWrapper, {
77
80
  isOverlayEnabled: isOverlayEnabled,
78
81
  isPulseEnabled: isPulseEnabled,
@@ -85,7 +88,8 @@ export var InlineCardWithAwareness = /*#__PURE__*/memo(function (_ref) {
85
88
  isResolvedViewRendered: isResolvedViewRendered,
86
89
  markMostRecentlyInsertedLink: markMostRecentlyInsertedLink,
87
90
  pluginInjectionApi: pluginInjectionApi,
88
- setOverlayHoveredStyles: setOverlayHoveredStyles
91
+ setOverlayHoveredStyles: setOverlayHoveredStyles,
92
+ appearance: appearance
89
93
  }, innerCard) :
90
94
  /*#__PURE__*/
91
95
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -3,7 +3,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { inlineCardNodeView } from './inlineCard';
5
5
  export var lazyInlineCardView = function lazyInlineCardView(props) {
6
- if (editorExperiment('platform_editor_exp_lazy_node_views', false) || !fg('platform_editor_ssr_fix_smartlinks')) {
6
+ var isPageSSRed = props.isPageSSRed || false;
7
+ if (editorExperiment('platform_editor_exp_lazy_node_views', false) || !fg('platform_editor_ssr_fix_smartlinks') || isPageSSRed && fg('platform_ssr_smartlinks_editor')) {
7
8
  return inlineCardNodeView(props);
8
9
  }
9
10
  return withLazyLoading({
@@ -60,7 +60,8 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
60
60
  allowEmbeds = options.allowEmbeds,
61
61
  allowBlockCards = options.allowBlockCards,
62
62
  onClickCallback = options.onClickCallback,
63
- __livePage = options.__livePage;
63
+ __livePage = options.__livePage,
64
+ isPageSSRed = options.isPageSSRed;
64
65
  var enableInlineUpgradeFeatures = !!showUpgradeDiscoverability;
65
66
  var inlineCardViewProducer = getInlineNodeViewProducer(_objectSpread({
66
67
  pmPluginFactoryParams: pmPluginFactoryParams,
@@ -73,7 +74,8 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
73
74
  allowBlockCards: allowBlockCards,
74
75
  pluginInjectionApi: pluginInjectionApi,
75
76
  onClickCallback: onClickCallback,
76
- __livePage: __livePage
77
+ __livePage: __livePage,
78
+ isPageSSRed: isPageSSRed
77
79
  }
78
80
  }, __livePage && fg('linking_platform_smart_links_in_live_pages') && {
79
81
  extraNodeViewProps: {
@@ -247,7 +249,8 @@ export var createPlugin = function createPlugin(options, pluginInjectionApi) {
247
249
  props: _objectSpread({
248
250
  nodeViews: {
249
251
  inlineCard: lazyInlineCardView({
250
- inlineCardViewProducer: inlineCardViewProducer
252
+ inlineCardViewProducer: inlineCardViewProducer,
253
+ isPageSSRed: isPageSSRed
251
254
  }),
252
255
  blockCard: lazyBlockCardView({
253
256
  pmPluginFactoryParams: pmPluginFactoryParams,
@@ -37,7 +37,8 @@ export var AwarenessWrapper = function AwarenessWrapper(_ref) {
37
37
  markMostRecentlyInsertedLink = _ref.markMostRecentlyInsertedLink,
38
38
  pluginInjectionApi = _ref.pluginInjectionApi,
39
39
  setOverlayHoveredStyles = _ref.setOverlayHoveredStyles,
40
- url = _ref.url;
40
+ url = _ref.url,
41
+ appearance = _ref.appearance;
41
42
  var _useState = useState(false),
42
43
  _useState2 = _slicedToArray(_useState, 2),
43
44
  isHovered = _useState2[0],
@@ -104,6 +105,7 @@ export var AwarenessWrapper = function AwarenessWrapper(_ref) {
104
105
  url: url
105
106
  }, children);
106
107
  }, [children, isHovered, url, handleOverlayChange, isResolvedViewRendered]);
108
+ var isInline = appearance === 'inline';
107
109
  return useMemo(function () {
108
110
  var _cardContext$value;
109
111
  return (
@@ -120,8 +122,9 @@ export var AwarenessWrapper = function AwarenessWrapper(_ref) {
120
122
  localStorageKeyExpirationInMs: ONE_DAY_IN_MILLISECONDS,
121
123
  discoveryMode: "start",
122
124
  shouldShowPulse: isResolvedViewRendered && shouldShowLinkPulse,
123
- testId: "link-discovery-pulse"
125
+ testId: "link-discovery-pulse",
126
+ isInline: isInline
124
127
  }, editorExperiment('platform_editor_controls', 'variant1') ? cardWithOpenButtonOverlay : cardWithOverlay)))
125
128
  );
126
- }, [shouldShowLinkPulse, url, cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.store, isResolvedViewRendered, cardWithOverlay, cardWithOpenButtonOverlay]);
129
+ }, [shouldShowLinkPulse, url, cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : _cardContext$value2.store, isResolvedViewRendered, cardWithOverlay, cardWithOpenButtonOverlay, isInline]);
127
130
  };
@@ -9,7 +9,8 @@ export var DiscoveryPulse = function DiscoveryPulse(_ref) {
9
9
  _ref$discoveryMode = _ref.discoveryMode,
10
10
  discoveryMode = _ref$discoveryMode === void 0 ? 'iteration' : _ref$discoveryMode,
11
11
  shouldShowPulse = _ref.shouldShowPulse,
12
- testId = _ref.testId;
12
+ testId = _ref.testId,
13
+ isInline = _ref.isInline;
13
14
  var discovered = isLocalStorageKeyDiscovered(localStorageKey);
14
15
  var showPulse = shouldShowPulse !== null && shouldShowPulse !== void 0 ? shouldShowPulse : !discovered;
15
16
  var _useAnalyticsEvents = useAnalyticsEvents(),
@@ -35,6 +36,7 @@ export var DiscoveryPulse = function DiscoveryPulse(_ref) {
35
36
  onAnimationIteration: discoveryMode === 'iteration' ? onDiscovery : undefined,
36
37
  onAnimationStart: discoveryMode === 'start' ? onDiscovery : undefined,
37
38
  showPulse: showPulse,
38
- testId: testId
39
+ testId: testId,
40
+ isInline: isInline
39
41
  }, children);
40
42
  };
@@ -45,6 +45,7 @@ export interface SmartCardProps extends CardProps {
45
45
  allowEmbeds?: boolean;
46
46
  allowBlockCards?: boolean;
47
47
  enableInlineUpgradeFeatures?: boolean;
48
+ isPageSSRed?: boolean;
48
49
  }
49
50
  export declare function Card(SmartCardComponent: React.ComponentType<React.PropsWithChildren<SmartCardProps & {
50
51
  id?: string;
@@ -4,10 +4,11 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Decoration, EditorView } 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, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => React.JSX.Element | null>;
8
- export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, }: SmartCardProps) => React.JSX.Element | null>;
8
+ export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage' | 'isPageSSRed'>;
9
9
  export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): React.JSX.Element;
10
10
  export interface InlineCardNodeViewProperties {
11
11
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
12
+ isPageSSRed?: boolean;
12
13
  }
13
14
  export declare const inlineCardNodeView: ({ inlineCardViewProducer }: InlineCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView;
@@ -5,4 +5,4 @@ export type InlineCardWithAwarenessProps = {
5
5
  isOverlayEnabled?: boolean;
6
6
  isSelected?: boolean;
7
7
  };
8
- export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
8
+ export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, isPageSSRed, appearance, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
@@ -107,6 +107,7 @@ export type CardPluginOptions = CardOptions & {
107
107
  lpLinkPicker?: boolean;
108
108
  disableFloatingToolbar?: boolean;
109
109
  onClickCallback?: OnClickCallback;
110
+ isPageSSRed?: boolean;
110
111
  };
111
112
  export type SetProvider = {
112
113
  type: 'SET_PROVIDER';
@@ -12,5 +12,5 @@ type AwarenessWrapperProps = {
12
12
  isPulseEnabled?: boolean;
13
13
  isSelected?: boolean;
14
14
  } & Partial<SmartCardProps>;
15
- export declare const AwarenessWrapper: ({ cardContext, children, getPos, isInserted, isOverlayEnabled, isSelected, isResolvedViewRendered, isPulseEnabled, markMostRecentlyInsertedLink, pluginInjectionApi, setOverlayHoveredStyles, url, }: AwarenessWrapperProps) => jsx.JSX.Element;
15
+ export declare const AwarenessWrapper: ({ cardContext, children, getPos, isInserted, isOverlayEnabled, isSelected, isResolvedViewRendered, isPulseEnabled, markMostRecentlyInsertedLink, pluginInjectionApi, setOverlayHoveredStyles, url, appearance, }: AwarenessWrapperProps) => jsx.JSX.Element;
16
16
  export {};
@@ -20,5 +20,6 @@ export interface PulseProps {
20
20
  discoveryMode?: PulseDiscoveryMode;
21
21
  shouldShowPulse?: boolean;
22
22
  testId?: string;
23
+ isInline?: boolean;
23
24
  }
24
- export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, }: PulseProps) => React.JSX.Element;
25
+ export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, isInline, }: PulseProps) => React.JSX.Element;
@@ -45,6 +45,7 @@ export interface SmartCardProps extends CardProps {
45
45
  allowEmbeds?: boolean;
46
46
  allowBlockCards?: boolean;
47
47
  enableInlineUpgradeFeatures?: boolean;
48
+ isPageSSRed?: boolean;
48
49
  }
49
50
  export declare function Card(SmartCardComponent: React.ComponentType<React.PropsWithChildren<SmartCardProps & {
50
51
  id?: string;
@@ -4,10 +4,11 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Decoration, EditorView } 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, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, }: SmartCardProps) => React.JSX.Element | null>;
8
- export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage'>;
7
+ export declare const InlineCard: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, onClick, onResolve: onRes, isHovered, showHoverPreview, hoverPreviewOptions, isPageSSRed, }: SmartCardProps) => React.JSX.Element | null>;
8
+ export type InlineCardNodeViewProps = Pick<SmartCardProps, 'useAlternativePreloader' | 'actionOptions' | 'allowEmbeds' | 'allowBlockCards' | 'enableInlineUpgradeFeatures' | 'pluginInjectionApi' | 'onClickCallback' | '__livePage' | 'isPageSSRed'>;
9
9
  export declare function InlineCardNodeView(props: InlineNodeViewComponentProps & InlineCardNodeViewProps & InlineCardWithAwarenessProps): React.JSX.Element;
10
10
  export interface InlineCardNodeViewProperties {
11
11
  inlineCardViewProducer: ReturnType<typeof getInlineNodeViewProducer>;
12
+ isPageSSRed?: boolean;
12
13
  }
13
14
  export declare const inlineCardNodeView: ({ inlineCardViewProducer }: InlineCardNodeViewProperties) => (node: PMNode, view: EditorView, getPos: () => number | undefined, decorations: readonly Decoration[]) => import("prosemirror-view").NodeView;
@@ -5,4 +5,4 @@ export type InlineCardWithAwarenessProps = {
5
5
  isOverlayEnabled?: boolean;
6
6
  isSelected?: boolean;
7
7
  };
8
- export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
8
+ export declare const InlineCardWithAwareness: React.MemoExoticComponent<({ node, cardContext, actionOptions, useAlternativePreloader, view, getPos, pluginInjectionApi, onClick, isPulseEnabled, isOverlayEnabled, isSelected, isPageSSRed, appearance, }: SmartCardProps & InlineCardWithAwarenessProps) => React.JSX.Element>;
@@ -107,6 +107,7 @@ export type CardPluginOptions = CardOptions & {
107
107
  lpLinkPicker?: boolean;
108
108
  disableFloatingToolbar?: boolean;
109
109
  onClickCallback?: OnClickCallback;
110
+ isPageSSRed?: boolean;
110
111
  };
111
112
  export type SetProvider = {
112
113
  type: 'SET_PROVIDER';
@@ -12,5 +12,5 @@ type AwarenessWrapperProps = {
12
12
  isPulseEnabled?: boolean;
13
13
  isSelected?: boolean;
14
14
  } & Partial<SmartCardProps>;
15
- export declare const AwarenessWrapper: ({ cardContext, children, getPos, isInserted, isOverlayEnabled, isSelected, isResolvedViewRendered, isPulseEnabled, markMostRecentlyInsertedLink, pluginInjectionApi, setOverlayHoveredStyles, url, }: AwarenessWrapperProps) => jsx.JSX.Element;
15
+ export declare const AwarenessWrapper: ({ cardContext, children, getPos, isInserted, isOverlayEnabled, isSelected, isResolvedViewRendered, isPulseEnabled, markMostRecentlyInsertedLink, pluginInjectionApi, setOverlayHoveredStyles, url, appearance, }: AwarenessWrapperProps) => jsx.JSX.Element;
16
16
  export {};
@@ -20,5 +20,6 @@ export interface PulseProps {
20
20
  discoveryMode?: PulseDiscoveryMode;
21
21
  shouldShowPulse?: boolean;
22
22
  testId?: string;
23
+ isInline?: boolean;
23
24
  }
24
- export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, }: PulseProps) => React.JSX.Element;
25
+ export declare const DiscoveryPulse: ({ children, localStorageKey, localStorageKeyExpirationInMs, discoveryMode, shouldShowPulse, testId, isInline, }: PulseProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "5.4.1",
3
+ "version": "5.4.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/primitives": "^14.2.0",
63
63
  "@atlaskit/smart-card": "^36.0.0",
64
64
  "@atlaskit/theme": "^18.0.0",
65
- "@atlaskit/tmp-editor-statsig": "^4.3.0",
65
+ "@atlaskit/tmp-editor-statsig": "^4.4.0",
66
66
  "@atlaskit/tokens": "^4.5.0",
67
67
  "@babel/runtime": "^7.0.0",
68
68
  "@emotion/react": "^11.7.1",
@@ -145,6 +145,9 @@
145
145
  },
146
146
  "confluence-issue-terminology-refresh": {
147
147
  "type": "boolean"
148
+ },
149
+ "platform_ssr_smartlinks_editor": {
150
+ "type": "boolean"
148
151
  }
149
152
  },
150
153
  "stricter": {