@atlaskit/editor-plugin-block-type 3.16.0 → 3.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-plugin-block-type
2
2
 
3
+ ## 3.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#152510](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152510)
8
+ [`dcf9edde7ac7b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dcf9edde7ac7b) -
9
+ bump adf-schema to 42.0.1
10
+ - Updated dependencies
11
+
12
+ ## 3.16.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#152019](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152019)
17
+ [`5f7f23dd0c612`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5f7f23dd0c612) -
18
+ [ux] ED-25082: Added editor custom font tokens and use them for normal texts and paragraph texts"
19
+ - Updated dependencies
20
+
3
21
  ## 3.16.0
4
22
 
5
23
  ### Minor Changes
@@ -9,8 +9,10 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
- var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
+ var _templateObject;
13
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
15
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Imports are not safe in an object syntax
14
- var blocktypeStyles = exports.blocktypeStyles = function blocktypeStyles() {
15
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n"])), _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(), (0, _experiments.editorExperiment)('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror blockquote {\n\t\tpadding-left: ".concat("var(--ds-space-250, 20px)", ";\n\t}\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t.ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote {\n\t\tpadding-left: ", "var(--ds-space-200, 16px)", ";\n\t}"));
16
+ var blocktypeStyles = exports.blocktypeStyles = function blocktypeStyles(typographyTheme) {
17
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n"])), _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(typographyTheme), (0, _experiments.editorExperiment)('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror blockquote {\n\t\tpadding-left: ".concat("var(--ds-space-250, 20px)", ";\n\t}\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t.ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote {\n\t\tpadding-left: ", "var(--ds-space-200, 16px)", ";\n\t}"));
16
18
  };
@@ -19,6 +19,7 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
19
19
  var _styles = require("@atlaskit/editor-common/styles");
20
20
  var _uiMenu = require("@atlaskit/editor-common/ui-menu");
21
21
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
+ var _tokens = require("@atlaskit/tokens");
22
23
  var _blocktypeButton = require("./blocktype-button");
23
24
  var _styled = require("./styled");
24
25
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -41,7 +42,9 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
41
42
  _this = _super.call.apply(_super, [this].concat(args));
42
43
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
43
44
  active: false,
44
- isOpenedByKeyboard: false
45
+ isOpenedByKeyboard: false,
46
+ typographyTheme: undefined,
47
+ observer: null
45
48
  });
46
49
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
50
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onOpenChange", function (attrs) {
@@ -79,7 +82,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
79
82
  content:
80
83
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
81
84
  (0, _react2.jsx)("div", {
82
- css: (0, _styled.blockTypeMenuItemStyle)(tagName, isActive)
85
+ css: (0, _styled.blockTypeMenuItemStyle)(tagName, isActive, _this.state.typographyTheme)
83
86
  }, (0, _react2.jsx)(Tag, null, formatMessage(blockType.title))),
84
87
  value: blockType,
85
88
  label: formatMessage(blockType.title),
@@ -113,9 +116,32 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
113
116
  return _this;
114
117
  }
115
118
  (0, _createClass2.default)(ToolbarBlockType, [{
119
+ key: "componentDidMount",
120
+ value: function componentDidMount() {
121
+ var _this2 = this;
122
+ var observer = new _tokens.ThemeMutationObserver(function (_ref2) {
123
+ var typography = _ref2.typography;
124
+ if (typography !== _this2.state.typographyTheme) {
125
+ _this2.setState({
126
+ typographyTheme: typography
127
+ });
128
+ }
129
+ });
130
+ this.setState({
131
+ observer: observer
132
+ });
133
+ observer.observe();
134
+ }
135
+ }, {
136
+ key: "componentWillUnmount",
137
+ value: function componentWillUnmount() {
138
+ var _this$state$observer;
139
+ (_this$state$observer = this.state.observer) === null || _this$state$observer === void 0 || _this$state$observer.disconnect();
140
+ }
141
+ }, {
116
142
  key: "render",
117
143
  value: function render() {
118
- var _this2 = this;
144
+ var _this3 = this;
119
145
  var _this$state = this.state,
120
146
  active = _this$state.active,
121
147
  isOpenedByKeyboard = _this$state.isOpenedByKeyboard;
@@ -164,7 +190,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
164
190
  shouldFocusFirstItem: function shouldFocusFirstItem() {
165
191
  if (isOpenedByKeyboard) {
166
192
  // eslint-disable-next-line @repo/internal/react/no-set-state-inside-render
167
- _this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {
193
+ _this3.setState(_objectSpread(_objectSpread({}, _this3.state), {}, {
168
194
  isOpenedByKeyboard: false
169
195
  }));
170
196
  }
@@ -14,13 +14,13 @@ var _colors = require("@atlaskit/theme/colors");
14
14
  */
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
16
 
17
- var blockTypeMenuItemStyle = exports.blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected) {
17
+ var blockTypeMenuItemStyle = exports.blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected, typographyTheme) {
18
18
  // TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
19
19
  var selectedStyle = selected ? "".concat(tagName, " { color: ", "var(--ds-text, white)", " !important; }") : '';
20
20
  return function () {
21
21
  return (0, _react.css)(
22
22
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
23
- (0, _styles.headingsSharedStyles)(), {
23
+ (0, _styles.headingsSharedStyles)(typographyTheme), {
24
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
25
  '>': {
26
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -1,12 +1,13 @@
1
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
1
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
3
  import { css } from '@emotion/react';
3
4
  import { blockquoteSharedStyles, headingsSharedStyles } from '@atlaskit/editor-common/styles';
4
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
6
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Imports are not safe in an object syntax
6
- export const blocktypeStyles = () => css`
7
+ export const blocktypeStyles = typographyTheme => css`
7
8
  .ProseMirror {
8
9
  ${blockquoteSharedStyles};
9
- ${headingsSharedStyles()};
10
+ ${headingsSharedStyles(typographyTheme)};
10
11
  }
11
12
 
12
13
  ${editorExperiment('nested-dnd', true) && `.ak-editor-content-area.appearance-full-page .ProseMirror blockquote {
@@ -12,6 +12,7 @@ import { findKeymapByDescription, getAriaKeyshortcuts, tooltip } from '@atlaskit
12
12
  import { separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
13
13
  import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
14
14
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
15
+ import { ThemeMutationObserver } from '@atlaskit/tokens';
15
16
  import { BlockTypeButton } from './blocktype-button';
16
17
  import { blockTypeMenuItemStyle, keyboardShortcut, keyboardShortcutSelect } from './styled';
17
18
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -20,7 +21,9 @@ class ToolbarBlockType extends React.PureComponent {
20
21
  super(...args);
21
22
  _defineProperty(this, "state", {
22
23
  active: false,
23
- isOpenedByKeyboard: false
24
+ isOpenedByKeyboard: false,
25
+ typographyTheme: undefined,
26
+ observer: null
24
27
  });
25
28
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
29
  _defineProperty(this, "onOpenChange", attrs => {
@@ -64,7 +67,7 @@ class ToolbarBlockType extends React.PureComponent {
64
67
  content:
65
68
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
66
69
  jsx("div", {
67
- css: blockTypeMenuItemStyle(tagName, isActive)
70
+ css: blockTypeMenuItemStyle(tagName, isActive, this.state.typographyTheme)
68
71
  }, jsx(Tag, null, formatMessage(blockType.title))),
69
72
  value: blockType,
70
73
  label: formatMessage(blockType.title),
@@ -97,6 +100,25 @@ class ToolbarBlockType extends React.PureComponent {
97
100
  }
98
101
  });
99
102
  }
103
+ componentDidMount() {
104
+ const observer = new ThemeMutationObserver(({
105
+ typography
106
+ }) => {
107
+ if (typography !== this.state.typographyTheme) {
108
+ this.setState({
109
+ typographyTheme: typography
110
+ });
111
+ }
112
+ });
113
+ this.setState({
114
+ observer
115
+ });
116
+ observer.observe();
117
+ }
118
+ componentWillUnmount() {
119
+ var _this$state$observer;
120
+ (_this$state$observer = this.state.observer) === null || _this$state$observer === void 0 ? void 0 : _this$state$observer.disconnect();
121
+ }
100
122
  render() {
101
123
  const {
102
124
  active,
@@ -7,12 +7,12 @@ import { css } from '@emotion/react';
7
7
  import { headingsSharedStyles } from '@atlaskit/editor-common/styles';
8
8
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
9
9
  import { N400 } from '@atlaskit/theme/colors';
10
- export const blockTypeMenuItemStyle = (tagName, selected) => {
10
+ export const blockTypeMenuItemStyle = (tagName, selected, typographyTheme) => {
11
11
  // TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
12
12
  const selectedStyle = selected ? `${tagName} { color: ${"var(--ds-text, white)"} !important; }` : '';
13
13
  return () => css(
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
- headingsSharedStyles(), {
15
+ headingsSharedStyles(typographyTheme), {
16
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
17
17
  '>': {
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -1,10 +1,11 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject;
3
+ /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
3
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { css } from '@emotion/react';
5
6
  import { blockquoteSharedStyles, headingsSharedStyles } from '@atlaskit/editor-common/styles';
6
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
8
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Imports are not safe in an object syntax
8
- export var blocktypeStyles = function blocktypeStyles() {
9
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n"])), blockquoteSharedStyles, headingsSharedStyles(), editorExperiment('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror blockquote {\n\t\tpadding-left: ".concat("var(--ds-space-250, 20px)", ";\n\t}\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t.ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote {\n\t\tpadding-left: ", "var(--ds-space-200, 16px)", ";\n\t}"));
9
+ export var blocktypeStyles = function blocktypeStyles(typographyTheme) {
10
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", ";\n\t\t", ";\n\t}\n\n\t", "\n"])), blockquoteSharedStyles, headingsSharedStyles(typographyTheme), editorExperiment('nested-dnd', true) && ".ak-editor-content-area.appearance-full-page .ProseMirror blockquote {\n\t\tpadding-left: ".concat("var(--ds-space-250, 20px)", ";\n\t}\n\n\t/* Don't want extra padding for inline editor (nested) */\n\t.ak-editor-content-area .ak-editor-content-area .ProseMirror blockquote {\n\t\tpadding-left: ", "var(--ds-space-200, 16px)", ";\n\t}"));
10
11
  };
@@ -22,6 +22,7 @@ import { findKeymapByDescription, getAriaKeyshortcuts, tooltip } from '@atlaskit
22
22
  import { separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
23
23
  import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
24
24
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
25
+ import { ThemeMutationObserver } from '@atlaskit/tokens';
25
26
  import { BlockTypeButton } from './blocktype-button';
26
27
  import { blockTypeMenuItemStyle, keyboardShortcut, keyboardShortcutSelect } from './styled';
27
28
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -37,7 +38,9 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
37
38
  _this = _super.call.apply(_super, [this].concat(args));
38
39
  _defineProperty(_assertThisInitialized(_this), "state", {
39
40
  active: false,
40
- isOpenedByKeyboard: false
41
+ isOpenedByKeyboard: false,
42
+ typographyTheme: undefined,
43
+ observer: null
41
44
  });
42
45
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
46
  _defineProperty(_assertThisInitialized(_this), "onOpenChange", function (attrs) {
@@ -75,7 +78,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
75
78
  content:
76
79
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
77
80
  jsx("div", {
78
- css: blockTypeMenuItemStyle(tagName, isActive)
81
+ css: blockTypeMenuItemStyle(tagName, isActive, _this.state.typographyTheme)
79
82
  }, jsx(Tag, null, formatMessage(blockType.title))),
80
83
  value: blockType,
81
84
  label: formatMessage(blockType.title),
@@ -109,9 +112,32 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
109
112
  return _this;
110
113
  }
111
114
  _createClass(ToolbarBlockType, [{
115
+ key: "componentDidMount",
116
+ value: function componentDidMount() {
117
+ var _this2 = this;
118
+ var observer = new ThemeMutationObserver(function (_ref2) {
119
+ var typography = _ref2.typography;
120
+ if (typography !== _this2.state.typographyTheme) {
121
+ _this2.setState({
122
+ typographyTheme: typography
123
+ });
124
+ }
125
+ });
126
+ this.setState({
127
+ observer: observer
128
+ });
129
+ observer.observe();
130
+ }
131
+ }, {
132
+ key: "componentWillUnmount",
133
+ value: function componentWillUnmount() {
134
+ var _this$state$observer;
135
+ (_this$state$observer = this.state.observer) === null || _this$state$observer === void 0 || _this$state$observer.disconnect();
136
+ }
137
+ }, {
112
138
  key: "render",
113
139
  value: function render() {
114
- var _this2 = this;
140
+ var _this3 = this;
115
141
  var _this$state = this.state,
116
142
  active = _this$state.active,
117
143
  isOpenedByKeyboard = _this$state.isOpenedByKeyboard;
@@ -160,7 +186,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
160
186
  shouldFocusFirstItem: function shouldFocusFirstItem() {
161
187
  if (isOpenedByKeyboard) {
162
188
  // eslint-disable-next-line @repo/internal/react/no-set-state-inside-render
163
- _this2.setState(_objectSpread(_objectSpread({}, _this2.state), {}, {
189
+ _this3.setState(_objectSpread(_objectSpread({}, _this3.state), {}, {
164
190
  isOpenedByKeyboard: false
165
191
  }));
166
192
  }
@@ -7,13 +7,13 @@ import { css } from '@emotion/react';
7
7
  import { headingsSharedStyles } from '@atlaskit/editor-common/styles';
8
8
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
9
9
  import { N400 } from '@atlaskit/theme/colors';
10
- export var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected) {
10
+ export var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected, typographyTheme) {
11
11
  // TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
12
12
  var selectedStyle = selected ? "".concat(tagName, " { color: ", "var(--ds-text, white)", " !important; }") : '';
13
13
  return function () {
14
14
  return css(
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
16
- headingsSharedStyles(), {
16
+ headingsSharedStyles(typographyTheme), {
17
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
18
18
  '>': {
19
19
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
@@ -1 +1 @@
1
- export declare const blocktypeStyles: () => import("@emotion/react").SerializedStyles;
1
+ export declare const blocktypeStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
@@ -7,6 +7,7 @@ import type { WrappedComponentProps } from 'react-intl-next';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
9
9
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
+ import { ThemeMutationObserver } from '@atlaskit/tokens';
10
11
  import type { TextBlockTypes } from '../../block-types';
11
12
  import type { BlockTypePlugin } from '../../index';
12
13
  import type { BlockTypeState } from '../../pm-plugins/main';
@@ -30,6 +31,8 @@ export interface Props {
30
31
  export interface State {
31
32
  active: boolean;
32
33
  isOpenedByKeyboard: boolean;
34
+ typographyTheme: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed' | undefined;
35
+ observer: ThemeMutationObserver | null;
33
36
  }
34
37
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
35
38
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
@@ -1,4 +1,4 @@
1
- export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean) => () => import("@emotion/react").SerializedStyles;
1
+ export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => () => import("@emotion/react").SerializedStyles;
2
2
  export declare const keyboardShortcut: import("@emotion/react").SerializedStyles;
3
3
  export declare const keyboardShortcutSelect: import("@emotion/react").SerializedStyles;
4
4
  export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
@@ -1 +1 @@
1
- export declare const blocktypeStyles: () => import("@emotion/react").SerializedStyles;
1
+ export declare const blocktypeStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
@@ -7,6 +7,7 @@ import type { WrappedComponentProps } from 'react-intl-next';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
8
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
9
9
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
+ import { ThemeMutationObserver } from '@atlaskit/tokens';
10
11
  import type { TextBlockTypes } from '../../block-types';
11
12
  import type { BlockTypePlugin } from '../../index';
12
13
  import type { BlockTypeState } from '../../pm-plugins/main';
@@ -30,6 +31,8 @@ export interface Props {
30
31
  export interface State {
31
32
  active: boolean;
32
33
  isOpenedByKeyboard: boolean;
34
+ typographyTheme: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed' | undefined;
35
+ observer: ThemeMutationObserver | null;
33
36
  }
34
37
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
35
38
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
@@ -1,4 +1,4 @@
1
- export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean) => () => import("@emotion/react").SerializedStyles;
1
+ export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => () => import("@emotion/react").SerializedStyles;
2
2
  export declare const keyboardShortcut: import("@emotion/react").SerializedStyles;
3
3
  export declare const keyboardShortcutSelect: import("@emotion/react").SerializedStyles;
4
4
  export declare const wrapperSmallStyle: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-type",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "description": "BlockType plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,9 +33,9 @@
33
33
  "./styles": "./src/styles.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/adf-schema": "^40.9.4",
37
- "@atlaskit/editor-common": "^93.3.0",
38
- "@atlaskit/editor-plugin-analytics": "^1.9.0",
36
+ "@atlaskit/adf-schema": "^42.0.2",
37
+ "@atlaskit/editor-common": "^93.5.0",
38
+ "@atlaskit/editor-plugin-analytics": "^1.10.0",
39
39
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
40
40
  "@atlaskit/editor-prosemirror": "6.0.0",
41
41
  "@atlaskit/editor-shared-styles": "^3.0.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/platform-feature-flags": "^0.3.0",
45
45
  "@atlaskit/primitives": "^12.2.0",
46
46
  "@atlaskit/prosemirror-input-rules": "^3.2.0",
47
- "@atlaskit/theme": "^13.0.0",
47
+ "@atlaskit/theme": "^13.1.0",
48
48
  "@atlaskit/tmp-editor-statsig": "*",
49
49
  "@atlaskit/tokens": "^2.0.0",
50
50
  "@babel/runtime": "^7.0.0",
@@ -58,7 +58,7 @@
58
58
  "@af/visual-regression": "*",
59
59
  "@atlaskit/analytics-next": "^10.1.0",
60
60
  "@atlaskit/editor-plugin-quick-insert": "^1.4.0",
61
- "@atlaskit/editor-plugin-type-ahead": "^1.9.0",
61
+ "@atlaskit/editor-plugin-type-ahead": "^1.10.0",
62
62
  "@atlaskit/ssr": "*",
63
63
  "@atlaskit/visual-regression": "*",
64
64
  "@testing-library/react": "^12.1.5",