@atlaskit/editor-plugin-synced-block 13.0.4 → 13.0.5

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,14 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 13.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`da4407c437f48`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da4407c437f48) -
8
+ Always register synced-block quick insert when enabled by the current slash-command and
9
+ source-creation controls.
10
+ - Updated dependencies
11
+
3
12
  ## 13.0.4
4
13
 
5
14
  ### Patch Changes
@@ -79,7 +79,7 @@ var syncedBlockPlugin = exports.syncedBlockPlugin = function syncedBlockPlugin(_
79
79
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents((0, _blockMenuComponents.getBlockMenuComponents)(api, (_config$enableSourceC = config === null || config === void 0 ? void 0 : config.enableSourceCreation) !== null && _config$enableSourceC !== void 0 ? _config$enableSourceC : false));
80
80
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api, (_config$enableSourceC2 = config === null || config === void 0 ? void 0 : config.enableSourceCreation) !== null && _config$enableSourceC2 !== void 0 ? _config$enableSourceC2 : false));
81
81
  var isRegisteredSlashCommandEnabled = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command');
82
- if (isRegisteredSlashCommandEnabled && (0, _isExperimentEnabled.isExperimentEnabled)('platform_synced_block') && config !== null && config !== void 0 && config.enableSourceCreation) {
82
+ if (isRegisteredSlashCommandEnabled && config !== null && config !== void 0 && config.enableSourceCreation) {
83
83
  var _api$uiControlRegistr;
84
84
  api === null || api === void 0 || (_api$uiControlRegistr = api.uiControlRegistry) === null || _api$uiControlRegistr === void 0 || _api$uiControlRegistr.actions.register((0, _getSyncedBlockQuickInsertComponents.getSyncedBlockQuickInsertComponents)({
85
85
  api: api,
@@ -152,7 +152,7 @@ var syncedBlockPlugin = exports.syncedBlockPlugin = function syncedBlockPlugin(_
152
152
  }), {}, {
153
153
  floatingToolbar: function floatingToolbar(state, intl) {
154
154
  var _syncedBlockPluginKey;
155
- // When the experiment is ON and the document has no synced blocks,
155
+ // When registered slash-command support is on and the document has no synced blocks,
156
156
  // skip the toolbar config entirely to avoid the per-selection-change
157
157
  // cost of findSyncBlockOrBodiedSyncBlock (EDITOR-6931).
158
158
  if (!((_syncedBlockPluginKey = _main.syncedBlockPluginKey.getState(state)) !== null && _syncedBlockPluginKey !== void 0 && _syncedBlockPluginKey.hasSyncedBlocks)) {
@@ -72,7 +72,7 @@ export const syncedBlockPlugin = ({
72
72
  api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents(getBlockMenuComponents(api, (_config$enableSourceC = config === null || config === void 0 ? void 0 : config.enableSourceCreation) !== null && _config$enableSourceC !== void 0 ? _config$enableSourceC : false));
73
73
  api === null || api === void 0 ? void 0 : (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.registerComponents(getToolbarComponents(api, (_config$enableSourceC2 = config === null || config === void 0 ? void 0 : config.enableSourceCreation) !== null && _config$enableSourceC2 !== void 0 ? _config$enableSourceC2 : false));
74
74
  const isRegisteredSlashCommandEnabled = isExperimentEnabled('platform_editor_slash_command');
75
- if (isRegisteredSlashCommandEnabled && isExperimentEnabled('platform_synced_block') && config !== null && config !== void 0 && config.enableSourceCreation) {
75
+ if (isRegisteredSlashCommandEnabled && config !== null && config !== void 0 && config.enableSourceCreation) {
76
76
  var _api$uiControlRegistr;
77
77
  api === null || api === void 0 ? void 0 : (_api$uiControlRegistr = api.uiControlRegistry) === null || _api$uiControlRegistr === void 0 ? void 0 : _api$uiControlRegistr.actions.register(getSyncedBlockQuickInsertComponents({
78
78
  api,
@@ -139,7 +139,7 @@ export const syncedBlockPlugin = ({
139
139
  }),
140
140
  floatingToolbar: (state, intl) => {
141
141
  var _syncedBlockPluginKey;
142
- // When the experiment is ON and the document has no synced blocks,
142
+ // When registered slash-command support is on and the document has no synced blocks,
143
143
  // skip the toolbar config entirely to avoid the per-selection-change
144
144
  // cost of findSyncBlockOrBodiedSyncBlock (EDITOR-6931).
145
145
  if (!((_syncedBlockPluginKey = syncedBlockPluginKey.getState(state)) !== null && _syncedBlockPluginKey !== void 0 && _syncedBlockPluginKey.hasSyncedBlocks)) {
@@ -73,7 +73,7 @@ export var syncedBlockPlugin = function syncedBlockPlugin(_ref2) {
73
73
  api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents(getBlockMenuComponents(api, (_config$enableSourceC = config === null || config === void 0 ? void 0 : config.enableSourceCreation) !== null && _config$enableSourceC !== void 0 ? _config$enableSourceC : false));
74
74
  api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 || _api$toolbar.actions.registerComponents(getToolbarComponents(api, (_config$enableSourceC2 = config === null || config === void 0 ? void 0 : config.enableSourceCreation) !== null && _config$enableSourceC2 !== void 0 ? _config$enableSourceC2 : false));
75
75
  var isRegisteredSlashCommandEnabled = isExperimentEnabled('platform_editor_slash_command');
76
- if (isRegisteredSlashCommandEnabled && isExperimentEnabled('platform_synced_block') && config !== null && config !== void 0 && config.enableSourceCreation) {
76
+ if (isRegisteredSlashCommandEnabled && config !== null && config !== void 0 && config.enableSourceCreation) {
77
77
  var _api$uiControlRegistr;
78
78
  api === null || api === void 0 || (_api$uiControlRegistr = api.uiControlRegistry) === null || _api$uiControlRegistr === void 0 || _api$uiControlRegistr.actions.register(getSyncedBlockQuickInsertComponents({
79
79
  api: api,
@@ -146,7 +146,7 @@ export var syncedBlockPlugin = function syncedBlockPlugin(_ref2) {
146
146
  }), {}, {
147
147
  floatingToolbar: function floatingToolbar(state, intl) {
148
148
  var _syncedBlockPluginKey;
149
- // When the experiment is ON and the document has no synced blocks,
149
+ // When registered slash-command support is on and the document has no synced blocks,
150
150
  // skip the toolbar config entirely to avoid the per-selection-change
151
151
  // cost of findSyncBlockOrBodiedSyncBlock (EDITOR-6931).
152
152
  if (!((_syncedBlockPluginKey = syncedBlockPluginKey.getState(state)) !== null && _syncedBlockPluginKey !== void 0 && _syncedBlockPluginKey.hasSyncedBlocks)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "13.0.4",
3
+ "version": "13.0.5",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,8 +21,8 @@
21
21
  "atlaskit:src": "src/index.ts",
22
22
  "dependencies": {
23
23
  "@atlaskit/adf-schema": "^57.0.0",
24
- "@atlaskit/button": "25.0.4",
25
- "@atlaskit/dropdown-menu": "18.0.4",
24
+ "@atlaskit/button": "25.1.0",
25
+ "@atlaskit/dropdown-menu": "18.0.5",
26
26
  "@atlaskit/editor-json-transformer": "^9.4.0",
27
27
  "@atlaskit/editor-plugin-analytics": "^15.0.0",
28
28
  "@atlaskit/editor-plugin-block-menu": "^14.0.0",
@@ -60,7 +60,7 @@
60
60
  "memoize-one": "^6.0.0"
61
61
  },
62
62
  "peerDependencies": {
63
- "@atlaskit/editor-common": "^119.7.0",
63
+ "@atlaskit/editor-common": "^119.8.0",
64
64
  "react": "^18.2.0 || ^19.2.0",
65
65
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
66
66
  },