@atlaskit/editor-plugin-card 35.1.1 → 35.1.3

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,20 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 35.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 35.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`7d0f2c4f8ded7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7d0f2c4f8ded7) -
14
+ Cache Smart Card lookups by URL during Find and Replace behind
15
+ `platform_editor_reduce_forced_layout_2`.
16
+ - Updated dependencies
17
+
3
18
  ## 35.1.1
4
19
 
5
20
  ### Patch Changes
@@ -208,7 +208,7 @@ var normalizeSelectionToLinkRangeForUrlAppearance = exports.normalizeSelectionTo
208
208
  editorView.dispatch(linkRangeSelectionTr);
209
209
  };
210
210
  // Remove with platform_editor_reduce_forced_layout_2 cleanup; call useCardRegistry(api?.card?.actions) directly.
211
- var useCardState = (0, _conditionalHooksFactory.conditionalHooksFactory)(function () {
211
+ var useCardStateWithRegistryExperiment = (0, _conditionalHooksFactory.conditionalHooksFactory)(function () {
212
212
  return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_reduce_forced_layout_2');
213
213
  }, function useRegisteredCardState(api) {
214
214
  var _api$card;
@@ -238,7 +238,8 @@ var PasteDisplayAsMenuHorizontalView = function PasteDisplayAsMenuHorizontalView
238
238
  pasteStartPos: pluginState.pasteStartPos
239
239
  } : undefined;
240
240
  });
241
- useCardState(api);
241
+ // platform_editor_reduce_forced_layout_2 selects the registry when enabled and shared state otherwise.
242
+ useCardStateWithRegistryExperiment(api);
242
243
  var pastedLinkUrlFromSlice = (0, _currentPastedSmartLink.getSingleSmartLinkUrlFromSlice)(getCurrentPastedSlice(api));
243
244
  var pastedLinkUrlFromCard = editorView && pasteRange ? getCardUrlAtPasteRange({
244
245
  editorView: editorView,
@@ -202,7 +202,7 @@ export const normalizeSelectionToLinkRangeForUrlAppearance = ({
202
202
  editorView.dispatch(linkRangeSelectionTr);
203
203
  };
204
204
  // Remove with platform_editor_reduce_forced_layout_2 cleanup; call useCardRegistry(api?.card?.actions) directly.
205
- const useCardState = conditionalHooksFactory(() => isExperimentEnabled('platform_editor_reduce_forced_layout_2'), function useRegisteredCardState(api) {
205
+ const useCardStateWithRegistryExperiment = conditionalHooksFactory(() => isExperimentEnabled('platform_editor_reduce_forced_layout_2'), function useRegisteredCardState(api) {
206
206
  var _api$card;
207
207
  return useCardRegistry(api === null || api === void 0 ? void 0 : (_api$card = api.card) === null || _api$card === void 0 ? void 0 : _api$card.actions);
208
208
  }, function useLegacyCardState(api) {
@@ -230,7 +230,8 @@ const PasteDisplayAsMenuHorizontalView = ({
230
230
  pasteStartPos: pluginState.pasteStartPos
231
231
  } : undefined;
232
232
  });
233
- useCardState(api);
233
+ // platform_editor_reduce_forced_layout_2 selects the registry when enabled and shared state otherwise.
234
+ useCardStateWithRegistryExperiment(api);
234
235
  const pastedLinkUrlFromSlice = getSingleSmartLinkUrlFromSlice(getCurrentPastedSlice(api));
235
236
  const pastedLinkUrlFromCard = editorView && pasteRange ? getCardUrlAtPasteRange({
236
237
  editorView,
@@ -199,7 +199,7 @@ export var normalizeSelectionToLinkRangeForUrlAppearance = function normalizeSel
199
199
  editorView.dispatch(linkRangeSelectionTr);
200
200
  };
201
201
  // Remove with platform_editor_reduce_forced_layout_2 cleanup; call useCardRegistry(api?.card?.actions) directly.
202
- var useCardState = conditionalHooksFactory(function () {
202
+ var useCardStateWithRegistryExperiment = conditionalHooksFactory(function () {
203
203
  return isExperimentEnabled('platform_editor_reduce_forced_layout_2');
204
204
  }, function useRegisteredCardState(api) {
205
205
  var _api$card;
@@ -229,7 +229,8 @@ var PasteDisplayAsMenuHorizontalView = function PasteDisplayAsMenuHorizontalView
229
229
  pasteStartPos: pluginState.pasteStartPos
230
230
  } : undefined;
231
231
  });
232
- useCardState(api);
232
+ // platform_editor_reduce_forced_layout_2 selects the registry when enabled and shared state otherwise.
233
+ useCardStateWithRegistryExperiment(api);
233
234
  var pastedLinkUrlFromSlice = getSingleSmartLinkUrlFromSlice(getCurrentPastedSlice(api));
234
235
  var pastedLinkUrlFromCard = editorView && pasteRange ? getCardUrlAtPasteRange({
235
236
  editorView: editorView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "35.1.1",
3
+ "version": "35.1.3",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -26,7 +26,7 @@
26
26
  "@atlaskit/button": "^25.6.0",
27
27
  "@atlaskit/css": "^1.1.0",
28
28
  "@atlaskit/custom-steps": "^1.1.0",
29
- "@atlaskit/editor-card-provider": "^8.1.0",
29
+ "@atlaskit/editor-card-provider": "^8.2.0",
30
30
  "@atlaskit/editor-plugin-analytics": "^29.0.0",
31
31
  "@atlaskit/editor-plugin-annotation": "^29.0.0",
32
32
  "@atlaskit/editor-plugin-base": "^30.0.0",
@@ -64,8 +64,8 @@
64
64
  "@atlaskit/primitives": "^22.6.0",
65
65
  "@atlaskit/prosemirror-history": "^1.3.0",
66
66
  "@atlaskit/smart-card": "^46.7.0",
67
- "@atlaskit/tmp-editor-statsig": "^244.0.0",
68
- "@atlaskit/tokens": "^20.6.0",
67
+ "@atlaskit/tmp-editor-statsig": "^246.0.0",
68
+ "@atlaskit/tokens": "^20.7.0",
69
69
  "@babel/runtime": "^7.0.0",
70
70
  "@emotion/react": "^11.7.1",
71
71
  "lodash": "^4.17.21",
@@ -74,7 +74,7 @@
74
74
  "uuid": "^11.1.1"
75
75
  },
76
76
  "peerDependencies": {
77
- "@atlaskit/editor-common": "^133.4.0",
77
+ "@atlaskit/editor-common": "^133.6.0",
78
78
  "@atlaskit/link-provider": "^6.0.0",
79
79
  "react": "^18.2.0 || ^19.2.0",
80
80
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"