@atlaskit/editor-plugin-block-type 8.0.1 → 8.0.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,21 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 8.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6b9ea765dedda`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b9ea765dedda) -
8
+ Patches emotion CSS exports in various editor packages
9
+ - [`d7109317309cf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d7109317309cf) -
10
+ [ux] ED-29001 Add selected state to text styles menu
11
+ - Updated dependencies
12
+
13
+ ## 8.0.2
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 8.0.1
4
20
 
5
21
  ### Patch Changes
@@ -15,6 +15,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
15
15
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
16
16
  var _editorToolbar = require("@atlaskit/editor-toolbar");
17
17
  var _compiled = require("@atlaskit/primitives/compiled");
18
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
19
  var headingSizeStylesMap = {
19
20
  normal: "_11c82smr",
20
21
  heading1: "_11c81c04",
@@ -51,7 +52,8 @@ var HeadingButton = exports.HeadingButton = function HeadingButton(_ref) {
51
52
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$blockType = api.blockType) === null || _api$blockType === void 0 || (_api$blockType = _api$blockType.commands) === null || _api$blockType === void 0 ? void 0 : _api$blockType.setTextLevel(blockType.name, _analytics.INPUT_METHOD.TOOLBAR, fromBlockQuote));
52
53
  };
53
54
  var shortcut = (0, _keymaps.formatShortcut)(shortcuts[blockType.name]);
54
- var isSelected = currentBlockType === blockType;
55
+ (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
56
+ var isSelected = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) ? (currentBlockType === null || currentBlockType === void 0 ? void 0 : currentBlockType.name) === blockType.name : currentBlockType === blockType;
55
57
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItem, {
56
58
  elemBefore: blockType.icon,
57
59
  elemAfter: shortcut ? /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarKeyboardShortcutHint, {
@@ -8,6 +8,7 @@ import { formatShortcut, setNormalText, toggleHeading1, toggleHeading2, toggleHe
8
8
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
9
9
  import { ToolbarDropdownItem, ToolbarKeyboardShortcutHint } from '@atlaskit/editor-toolbar';
10
10
  import { Box } from '@atlaskit/primitives/compiled';
11
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  const headingSizeStylesMap = {
12
13
  normal: "_11c82smr",
13
14
  heading1: "_11c81c04",
@@ -44,7 +45,8 @@ export const HeadingButton = ({
44
45
  api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$blockType = api.blockType) === null || _api$blockType === void 0 ? void 0 : (_api$blockType$comman = _api$blockType.commands) === null || _api$blockType$comman === void 0 ? void 0 : _api$blockType$comman.setTextLevel(blockType.name, INPUT_METHOD.TOOLBAR, fromBlockQuote));
45
46
  };
46
47
  const shortcut = formatShortcut(shortcuts[blockType.name]);
47
- const isSelected = currentBlockType === blockType;
48
+ expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
49
+ const isSelected = expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) ? (currentBlockType === null || currentBlockType === void 0 ? void 0 : currentBlockType.name) === blockType.name : currentBlockType === blockType;
48
50
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
49
51
  elemBefore: blockType.icon,
50
52
  elemAfter: shortcut ? /*#__PURE__*/React.createElement(ToolbarKeyboardShortcutHint, {
@@ -8,6 +8,7 @@ import { formatShortcut, setNormalText, toggleHeading1, toggleHeading2, toggleHe
8
8
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
9
9
  import { ToolbarDropdownItem, ToolbarKeyboardShortcutHint } from '@atlaskit/editor-toolbar';
10
10
  import { Box } from '@atlaskit/primitives/compiled';
11
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
12
  var headingSizeStylesMap = {
12
13
  normal: "_11c82smr",
13
14
  heading1: "_11c81c04",
@@ -44,7 +45,8 @@ export var HeadingButton = function HeadingButton(_ref) {
44
45
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$blockType = api.blockType) === null || _api$blockType === void 0 || (_api$blockType = _api$blockType.commands) === null || _api$blockType === void 0 ? void 0 : _api$blockType.setTextLevel(blockType.name, INPUT_METHOD.TOOLBAR, fromBlockQuote));
45
46
  };
46
47
  var shortcut = formatShortcut(shortcuts[blockType.name]);
47
- var isSelected = currentBlockType === blockType;
48
+ expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
49
+ var isSelected = expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true) ? (currentBlockType === null || currentBlockType === void 0 ? void 0 : currentBlockType.name) === blockType.name : currentBlockType === blockType;
48
50
  return /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
49
51
  elemBefore: blockType.icon,
50
52
  elemAfter: shortcut ? /*#__PURE__*/React.createElement(ToolbarKeyboardShortcutHint, {
@@ -1,6 +1,11 @@
1
- export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: "typography" | "typography-adg3" | "typography-modernized" | "typography-refreshed") => () => import("@emotion/react").SerializedStyles;
2
- export declare const keyboardShortcut: import("@emotion/react").SerializedStyles;
3
- export declare const keyboardShortcutSelect: import("@emotion/react").SerializedStyles;
4
- export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
5
- export declare const expandIconWrapperStyle: import("@emotion/react").SerializedStyles;
6
- export declare const floatingToolbarWrapperStyle: import("@emotion/react").SerializedStyles;
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type SerializedStyles } from '@emotion/react';
6
+ export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: "typography" | "typography-adg3" | "typography-modernized" | "typography-refreshed") => () => SerializedStyles;
7
+ export declare const keyboardShortcut: SerializedStyles;
8
+ export declare const keyboardShortcutSelect: SerializedStyles;
9
+ export declare const wrapperSmallStyle: SerializedStyles;
10
+ export declare const expandIconWrapperStyle: SerializedStyles;
11
+ export declare const floatingToolbarWrapperStyle: SerializedStyles;
@@ -1,6 +1,11 @@
1
- export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: "typography" | "typography-adg3" | "typography-modernized" | "typography-refreshed") => () => import("@emotion/react").SerializedStyles;
2
- export declare const keyboardShortcut: import("@emotion/react").SerializedStyles;
3
- export declare const keyboardShortcutSelect: import("@emotion/react").SerializedStyles;
4
- export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
5
- export declare const expandIconWrapperStyle: import("@emotion/react").SerializedStyles;
6
- export declare const floatingToolbarWrapperStyle: import("@emotion/react").SerializedStyles;
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type SerializedStyles } from '@emotion/react';
6
+ export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: "typography" | "typography-adg3" | "typography-modernized" | "typography-refreshed") => () => SerializedStyles;
7
+ export declare const keyboardShortcut: SerializedStyles;
8
+ export declare const keyboardShortcutSelect: SerializedStyles;
9
+ export declare const wrapperSmallStyle: SerializedStyles;
10
+ export declare const expandIconWrapperStyle: SerializedStyles;
11
+ export declare const floatingToolbarWrapperStyle: SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/adf-schema": "^51.0.0",
33
33
  "@atlaskit/css": "^0.14.0",
34
34
  "@atlaskit/editor-plugin-analytics": "^5.0.0",
35
- "@atlaskit/editor-plugin-block-menu": "^2.0.0",
35
+ "@atlaskit/editor-plugin-block-menu": "^3.0.0",
36
36
  "@atlaskit/editor-plugin-list": "^7.0.0",
37
37
  "@atlaskit/editor-plugin-primary-toolbar": "^6.0.0",
38
38
  "@atlaskit/editor-plugin-selection": "^5.0.0",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/primitives": "^14.14.0",
51
51
  "@atlaskit/prosemirror-input-rules": "^3.4.0",
52
52
  "@atlaskit/theme": "^21.0.0",
53
- "@atlaskit/tmp-editor-statsig": "^12.10.0",
53
+ "@atlaskit/tmp-editor-statsig": "^12.12.0",
54
54
  "@atlaskit/tokens": "^6.3.0",
55
55
  "@babel/runtime": "^7.0.0",
56
56
  "@emotion/react": "^11.7.1"