@atlaskit/editor-plugin-block-type 26.0.5 → 26.0.7

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,19 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 26.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 26.0.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`064f989853cf0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/064f989853cf0) -
14
+ Clean up experiment `platform_editor_default_toolbar_state`
15
+ - Updated dependencies
16
+
3
17
  ## 26.0.5
4
18
 
5
19
  ### Patch Changes
@@ -11,19 +11,18 @@ var _hooks = require("@atlaskit/editor-common/hooks");
11
11
  var _messages = require("@atlaskit/editor-common/messages");
12
12
  var _toolbar = require("@atlaskit/editor-common/toolbar");
13
13
  var _editorToolbar = require("@atlaskit/editor-toolbar");
14
- var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
15
14
  var _fg = require("@atlaskit/platform-feature-flags/fg");
16
15
  var _blockTypes = require("../../block-types");
17
16
  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); }
18
17
  var selectPluginState = function selectPluginState(state) {
19
- var _state$blockTypeState, _state$interactionSta, _state$blockTypeState2;
18
+ var _state$blockTypeState, _state$blockTypeState2;
20
19
  return {
21
20
  blockTypesDisabled: (_state$blockTypeState = state.blockTypeState) === null || _state$blockTypeState === void 0 ? void 0 : _state$blockTypeState.blockTypesDisabled,
22
- currentBlockType: ((_state$interactionSta = state.interactionState) === null || _state$interactionSta === void 0 ? void 0 : _state$interactionSta.interactionState) === 'hasNotHadInteraction' && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_default_toolbar_state') ? undefined : (_state$blockTypeState2 = state.blockTypeState) === null || _state$blockTypeState2 === void 0 ? void 0 : _state$blockTypeState2.currentBlockType
21
+ currentBlockType: (_state$blockTypeState2 = state.blockTypeState) === null || _state$blockTypeState2 === void 0 ? void 0 : _state$blockTypeState2.currentBlockType
23
22
  };
24
23
  };
25
24
  var usePluginState = function usePluginState(api) {
26
- return (0, _hooks.useSharedPluginStateWithSelector)(api, ['blockType', 'interaction'], selectPluginState);
25
+ return (0, _hooks.useSharedPluginStateWithSelector)(api, ['blockType'], selectPluginState);
27
26
  };
28
27
  var TextStylesMenuButton = exports.TextStylesMenuButton = function TextStylesMenuButton(_ref) {
29
28
  var _Object$values$find;
@@ -4,17 +4,16 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
4
4
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
5
5
  import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
6
6
  import { ToolbarDropdownMenu, ToolbarTooltip, TextIcon } from '@atlaskit/editor-toolbar';
7
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
7
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
8
  import { toolbarBlockTypesWithRank } from '../../block-types';
10
9
  const selectPluginState = state => {
11
- var _state$blockTypeState, _state$interactionSta, _state$blockTypeState2;
10
+ var _state$blockTypeState, _state$blockTypeState2;
12
11
  return {
13
12
  blockTypesDisabled: (_state$blockTypeState = state.blockTypeState) === null || _state$blockTypeState === void 0 ? void 0 : _state$blockTypeState.blockTypesDisabled,
14
- currentBlockType: ((_state$interactionSta = state.interactionState) === null || _state$interactionSta === void 0 ? void 0 : _state$interactionSta.interactionState) === 'hasNotHadInteraction' && isExperimentEnabled('platform_editor_default_toolbar_state') ? undefined : (_state$blockTypeState2 = state.blockTypeState) === null || _state$blockTypeState2 === void 0 ? void 0 : _state$blockTypeState2.currentBlockType
13
+ currentBlockType: (_state$blockTypeState2 = state.blockTypeState) === null || _state$blockTypeState2 === void 0 ? void 0 : _state$blockTypeState2.currentBlockType
15
14
  };
16
15
  };
17
- const usePluginState = api => useSharedPluginStateWithSelector(api, ['blockType', 'interaction'], selectPluginState);
16
+ const usePluginState = api => useSharedPluginStateWithSelector(api, ['blockType'], selectPluginState);
18
17
  export const TextStylesMenuButton = ({
19
18
  allowFontSize,
20
19
  api,
@@ -4,18 +4,17 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
4
4
  import { toolbarMessages } from '@atlaskit/editor-common/messages';
5
5
  import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
6
6
  import { ToolbarDropdownMenu, ToolbarTooltip, TextIcon } from '@atlaskit/editor-toolbar';
7
- import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
7
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
8
  import { toolbarBlockTypesWithRank } from '../../block-types';
10
9
  var selectPluginState = function selectPluginState(state) {
11
- var _state$blockTypeState, _state$interactionSta, _state$blockTypeState2;
10
+ var _state$blockTypeState, _state$blockTypeState2;
12
11
  return {
13
12
  blockTypesDisabled: (_state$blockTypeState = state.blockTypeState) === null || _state$blockTypeState === void 0 ? void 0 : _state$blockTypeState.blockTypesDisabled,
14
- currentBlockType: ((_state$interactionSta = state.interactionState) === null || _state$interactionSta === void 0 ? void 0 : _state$interactionSta.interactionState) === 'hasNotHadInteraction' && isExperimentEnabled('platform_editor_default_toolbar_state') ? undefined : (_state$blockTypeState2 = state.blockTypeState) === null || _state$blockTypeState2 === void 0 ? void 0 : _state$blockTypeState2.currentBlockType
13
+ currentBlockType: (_state$blockTypeState2 = state.blockTypeState) === null || _state$blockTypeState2 === void 0 ? void 0 : _state$blockTypeState2.currentBlockType
15
14
  };
16
15
  };
17
16
  var usePluginState = function usePluginState(api) {
18
- return useSharedPluginStateWithSelector(api, ['blockType', 'interaction'], selectPluginState);
17
+ return useSharedPluginStateWithSelector(api, ['blockType'], selectPluginState);
19
18
  };
20
19
  export var TextStylesMenuButton = function TextStylesMenuButton(_ref) {
21
20
  var _Object$values$find;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "26.0.5",
3
+ "version": "26.0.7",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -43,14 +43,14 @@
43
43
  "@atlaskit/primitives": "^22.5.0",
44
44
  "@atlaskit/prosemirror-history": "^1.3.0",
45
45
  "@atlaskit/prosemirror-input-rules": "^4.1.0",
46
- "@atlaskit/tmp-editor-statsig": "^214.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^216.0.0",
47
47
  "@atlaskit/tokens": "^20.1.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@compiled/react": "^1.0.2",
50
50
  "@emotion/react": "^11.7.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "@atlaskit/editor-common": "^126.2.0",
53
+ "@atlaskit/editor-common": "^126.4.0",
54
54
  "react": "^18.2.0 || ^19.2.0",
55
55
  "react-dom": "^18.2.0 || ^19.2.0",
56
56
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"