@atlaskit/editor-plugin-toolbar-lists-indentation 1.6.3 → 1.7.1

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-toolbar-lists-indentation
2
2
 
3
+ ## 1.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.7.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#120426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120426)
14
+ [`1cb3869ab1a96`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1cb3869ab1a96) -
15
+ [ED-23436] Use editor primary toolbar plugin to structure the primary toolbar
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 1.6.3
4
22
 
5
23
  ### Patch Changes
@@ -21,31 +21,39 @@ var toolbarListsIndentationPlugin = exports.toolbarListsIndentationPlugin = func
21
21
  _ref2$allowHeadingAnd = _ref2.allowHeadingAndParagraphIndentation,
22
22
  allowHeadingAndParagraphIndentation = _ref2$allowHeadingAnd === void 0 ? false : _ref2$allowHeadingAnd;
23
23
  var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
24
+ var primaryToolbarComponent = function primaryToolbarComponent(_ref3) {
25
+ var editorView = _ref3.editorView,
26
+ popupsMountPoint = _ref3.popupsMountPoint,
27
+ popupsBoundariesElement = _ref3.popupsBoundariesElement,
28
+ popupsScrollableElement = _ref3.popupsScrollableElement,
29
+ toolbarSize = _ref3.toolbarSize,
30
+ disabled = _ref3.disabled,
31
+ isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
32
+ var isSmall = toolbarSize < _types.ToolbarSize.L;
33
+ return /*#__PURE__*/_react.default.createElement(PrimaryToolbarComponent, {
34
+ featureFlags: featureFlags,
35
+ popupsMountPoint: popupsMountPoint,
36
+ popupsBoundariesElement: popupsBoundariesElement,
37
+ popupsScrollableElement: popupsScrollableElement,
38
+ isSmall: isSmall,
39
+ isToolbarReducedSpacing: isToolbarReducedSpacing,
40
+ disabled: disabled,
41
+ editorView: editorView,
42
+ showIndentationButtons: showIndentationButtons,
43
+ pluginInjectionApi: api,
44
+ allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
45
+ });
46
+ };
24
47
  return {
25
48
  name: 'toolbarListsIndentation',
26
- primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
27
- var editorView = _ref3.editorView,
28
- popupsMountPoint = _ref3.popupsMountPoint,
29
- popupsBoundariesElement = _ref3.popupsBoundariesElement,
30
- popupsScrollableElement = _ref3.popupsScrollableElement,
31
- toolbarSize = _ref3.toolbarSize,
32
- disabled = _ref3.disabled,
33
- isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
34
- var isSmall = toolbarSize < _types.ToolbarSize.L;
35
- return /*#__PURE__*/_react.default.createElement(PrimaryToolbarComponent, {
36
- featureFlags: featureFlags,
37
- popupsMountPoint: popupsMountPoint,
38
- popupsBoundariesElement: popupsBoundariesElement,
39
- popupsScrollableElement: popupsScrollableElement,
40
- isSmall: isSmall,
41
- isToolbarReducedSpacing: isToolbarReducedSpacing,
42
- disabled: disabled,
43
- editorView: editorView,
44
- showIndentationButtons: showIndentationButtons,
45
- pluginInjectionApi: api,
46
- allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
47
- });
48
- }
49
+ usePluginHook: function usePluginHook() {
50
+ var _api$core, _api$primaryToolbar;
51
+ api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
52
+ name: 'toolbarListsIndentation',
53
+ component: primaryToolbarComponent
54
+ }));
55
+ },
56
+ primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
49
57
  };
50
58
  };
51
59
  function PrimaryToolbarComponent(_ref4) {
@@ -34,7 +34,8 @@ function Toolbar(props) {
34
34
  showIndentationButtons = props.showIndentationButtons,
35
35
  indentDisabled = props.indentDisabled,
36
36
  outdentDisabled = props.outdentDisabled,
37
- onItemActivated = props.onItemActivated;
37
+ onItemActivated = props.onItemActivated,
38
+ pluginInjectionApi = props.pluginInjectionApi;
38
39
  var labelUnorderedList = formatMessage(_messages.listMessages.unorderedList);
39
40
  var labelOrderedList = formatMessage(_messages.listMessages.orderedList);
40
41
  var labelListsFormat = formatMessage(_messages.listMessages.listsFormat);
@@ -133,7 +134,9 @@ function Toolbar(props) {
133
134
  description: indentMessage,
134
135
  keymap: _keymaps.indent
135
136
  })
136
- })), (0, _react2.jsx)("span", {
137
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
138
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
139
+ (0, _react2.jsx)("span", {
137
140
  css: _styles.separatorStyles
138
141
  }))
139
142
  );
@@ -30,7 +30,8 @@ function ToolbarDropdown(props) {
30
30
  popupsMountPoint = props.popupsMountPoint,
31
31
  popupsBoundariesElement = props.popupsBoundariesElement,
32
32
  popupsScrollableElement = props.popupsScrollableElement,
33
- onItemActivated = props.onItemActivated;
33
+ onItemActivated = props.onItemActivated,
34
+ pluginInjectionApi = props.pluginInjectionApi;
34
35
  var _React$useState = _react.default.useState(false),
35
36
  _React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
36
37
  isDropdownOpen = _React$useState2[0],
@@ -108,7 +109,9 @@ function ToolbarDropdown(props) {
108
109
  }, (0, _react2.jsx)(_chevronDown.default, {
109
110
  label: ""
110
111
  })))
111
- })), (0, _react2.jsx)("span", {
112
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
114
+ (0, _react2.jsx)("span", {
112
115
  css: _styles.separatorStyles
113
116
  }))
114
117
  );
@@ -44,7 +44,8 @@ function ToolbarListsIndentation(props) {
44
44
  outdentDisabled: outdentDisabled,
45
45
  disabled: disabled,
46
46
  onItemActivated: (0, _onItemActivated.onItemActivated)(pluginInjectionApi, indentationStateNode),
47
- featureFlags: featureFlags
47
+ featureFlags: featureFlags,
48
+ pluginInjectionApi: pluginInjectionApi
48
49
  });
49
50
  }
50
51
  return (0, _react.jsx)(_Toolbar.Toolbar, {
@@ -59,6 +60,7 @@ function ToolbarListsIndentation(props) {
59
60
  outdentDisabled: outdentDisabled,
60
61
  disabled: disabled,
61
62
  onItemActivated: (0, _onItemActivated.onItemActivated)(pluginInjectionApi, indentationStateNode),
62
- featureFlags: featureFlags
63
+ featureFlags: featureFlags,
64
+ pluginInjectionApi: pluginInjectionApi
63
65
  });
64
66
  }
@@ -13,32 +13,40 @@ export const toolbarListsIndentationPlugin = ({
13
13
  allowHeadingAndParagraphIndentation = false
14
14
  } = config !== null && config !== void 0 ? config : {};
15
15
  const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
16
+ const primaryToolbarComponent = ({
17
+ editorView,
18
+ popupsMountPoint,
19
+ popupsBoundariesElement,
20
+ popupsScrollableElement,
21
+ toolbarSize,
22
+ disabled,
23
+ isToolbarReducedSpacing
24
+ }) => {
25
+ const isSmall = toolbarSize < ToolbarSize.L;
26
+ return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
27
+ featureFlags: featureFlags,
28
+ popupsMountPoint: popupsMountPoint,
29
+ popupsBoundariesElement: popupsBoundariesElement,
30
+ popupsScrollableElement: popupsScrollableElement,
31
+ isSmall: isSmall,
32
+ isToolbarReducedSpacing: isToolbarReducedSpacing,
33
+ disabled: disabled,
34
+ editorView: editorView,
35
+ showIndentationButtons: showIndentationButtons,
36
+ pluginInjectionApi: api,
37
+ allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
38
+ });
39
+ };
16
40
  return {
17
41
  name: 'toolbarListsIndentation',
18
- primaryToolbarComponent({
19
- editorView,
20
- popupsMountPoint,
21
- popupsBoundariesElement,
22
- popupsScrollableElement,
23
- toolbarSize,
24
- disabled,
25
- isToolbarReducedSpacing
26
- }) {
27
- const isSmall = toolbarSize < ToolbarSize.L;
28
- return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
29
- featureFlags: featureFlags,
30
- popupsMountPoint: popupsMountPoint,
31
- popupsBoundariesElement: popupsBoundariesElement,
32
- popupsScrollableElement: popupsScrollableElement,
33
- isSmall: isSmall,
34
- isToolbarReducedSpacing: isToolbarReducedSpacing,
35
- disabled: disabled,
36
- editorView: editorView,
37
- showIndentationButtons: showIndentationButtons,
38
- pluginInjectionApi: api,
39
- allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
40
- });
41
- }
42
+ usePluginHook: () => {
43
+ var _api$core, _api$primaryToolbar;
44
+ 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$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
45
+ name: 'toolbarListsIndentation',
46
+ component: primaryToolbarComponent
47
+ }));
48
+ },
49
+ primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
42
50
  };
43
51
  };
44
52
  export function PrimaryToolbarComponent({
@@ -28,7 +28,8 @@ export function Toolbar(props) {
28
28
  showIndentationButtons,
29
29
  indentDisabled,
30
30
  outdentDisabled,
31
- onItemActivated
31
+ onItemActivated,
32
+ pluginInjectionApi
32
33
  } = props;
33
34
  const labelUnorderedList = formatMessage(messages.unorderedList);
34
35
  const labelOrderedList = formatMessage(messages.orderedList);
@@ -124,7 +125,9 @@ export function Toolbar(props) {
124
125
  description: indentMessage,
125
126
  keymap: toggleIndentKeymap
126
127
  })
127
- })), jsx("span", {
128
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
129
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
130
+ jsx("span", {
128
131
  css: separatorStyles
129
132
  }))
130
133
  );
@@ -23,7 +23,8 @@ export function ToolbarDropdown(props) {
23
23
  popupsMountPoint,
24
24
  popupsBoundariesElement,
25
25
  popupsScrollableElement,
26
- onItemActivated
26
+ onItemActivated,
27
+ pluginInjectionApi
27
28
  } = props;
28
29
  const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
29
30
  const [isOpenedByKeyboard, setOpenedByKeyboard] = React.useState(false);
@@ -96,7 +97,9 @@ export function ToolbarDropdown(props) {
96
97
  }, jsx(ExpandIcon, {
97
98
  label: ""
98
99
  })))
99
- })), jsx("span", {
100
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
102
+ jsx("span", {
100
103
  css: separatorStyles
101
104
  }))
102
105
  );
@@ -39,7 +39,8 @@ export default function ToolbarListsIndentation(props) {
39
39
  outdentDisabled: outdentDisabled,
40
40
  disabled: disabled,
41
41
  onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode),
42
- featureFlags: featureFlags
42
+ featureFlags: featureFlags,
43
+ pluginInjectionApi: pluginInjectionApi
43
44
  });
44
45
  }
45
46
  return jsx(Toolbar, {
@@ -54,6 +55,7 @@ export default function ToolbarListsIndentation(props) {
54
55
  outdentDisabled: outdentDisabled,
55
56
  disabled: disabled,
56
57
  onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode),
57
- featureFlags: featureFlags
58
+ featureFlags: featureFlags,
59
+ pluginInjectionApi: pluginInjectionApi
58
60
  });
59
61
  }
@@ -13,31 +13,39 @@ export var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugi
13
13
  _ref2$allowHeadingAnd = _ref2.allowHeadingAndParagraphIndentation,
14
14
  allowHeadingAndParagraphIndentation = _ref2$allowHeadingAnd === void 0 ? false : _ref2$allowHeadingAnd;
15
15
  var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
16
+ var primaryToolbarComponent = function primaryToolbarComponent(_ref3) {
17
+ var editorView = _ref3.editorView,
18
+ popupsMountPoint = _ref3.popupsMountPoint,
19
+ popupsBoundariesElement = _ref3.popupsBoundariesElement,
20
+ popupsScrollableElement = _ref3.popupsScrollableElement,
21
+ toolbarSize = _ref3.toolbarSize,
22
+ disabled = _ref3.disabled,
23
+ isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
24
+ var isSmall = toolbarSize < ToolbarSize.L;
25
+ return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
26
+ featureFlags: featureFlags,
27
+ popupsMountPoint: popupsMountPoint,
28
+ popupsBoundariesElement: popupsBoundariesElement,
29
+ popupsScrollableElement: popupsScrollableElement,
30
+ isSmall: isSmall,
31
+ isToolbarReducedSpacing: isToolbarReducedSpacing,
32
+ disabled: disabled,
33
+ editorView: editorView,
34
+ showIndentationButtons: showIndentationButtons,
35
+ pluginInjectionApi: api,
36
+ allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
37
+ });
38
+ };
16
39
  return {
17
40
  name: 'toolbarListsIndentation',
18
- primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
19
- var editorView = _ref3.editorView,
20
- popupsMountPoint = _ref3.popupsMountPoint,
21
- popupsBoundariesElement = _ref3.popupsBoundariesElement,
22
- popupsScrollableElement = _ref3.popupsScrollableElement,
23
- toolbarSize = _ref3.toolbarSize,
24
- disabled = _ref3.disabled,
25
- isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
26
- var isSmall = toolbarSize < ToolbarSize.L;
27
- return /*#__PURE__*/React.createElement(PrimaryToolbarComponent, {
28
- featureFlags: featureFlags,
29
- popupsMountPoint: popupsMountPoint,
30
- popupsBoundariesElement: popupsBoundariesElement,
31
- popupsScrollableElement: popupsScrollableElement,
32
- isSmall: isSmall,
33
- isToolbarReducedSpacing: isToolbarReducedSpacing,
34
- disabled: disabled,
35
- editorView: editorView,
36
- showIndentationButtons: showIndentationButtons,
37
- pluginInjectionApi: api,
38
- allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
39
- });
40
- }
41
+ usePluginHook: function usePluginHook() {
42
+ var _api$core, _api$primaryToolbar;
43
+ api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
44
+ name: 'toolbarListsIndentation',
45
+ component: primaryToolbarComponent
46
+ }));
47
+ },
48
+ primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
41
49
  };
42
50
  };
43
51
  export function PrimaryToolbarComponent(_ref4) {
@@ -26,7 +26,8 @@ export function Toolbar(props) {
26
26
  showIndentationButtons = props.showIndentationButtons,
27
27
  indentDisabled = props.indentDisabled,
28
28
  outdentDisabled = props.outdentDisabled,
29
- onItemActivated = props.onItemActivated;
29
+ onItemActivated = props.onItemActivated,
30
+ pluginInjectionApi = props.pluginInjectionApi;
30
31
  var labelUnorderedList = formatMessage(messages.unorderedList);
31
32
  var labelOrderedList = formatMessage(messages.orderedList);
32
33
  var labelListsFormat = formatMessage(messages.listsFormat);
@@ -125,7 +126,9 @@ export function Toolbar(props) {
125
126
  description: indentMessage,
126
127
  keymap: toggleIndentKeymap
127
128
  })
128
- })), jsx("span", {
129
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
130
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
131
+ jsx("span", {
129
132
  css: separatorStyles
130
133
  }))
131
134
  );
@@ -22,7 +22,8 @@ export function ToolbarDropdown(props) {
22
22
  popupsMountPoint = props.popupsMountPoint,
23
23
  popupsBoundariesElement = props.popupsBoundariesElement,
24
24
  popupsScrollableElement = props.popupsScrollableElement,
25
- onItemActivated = props.onItemActivated;
25
+ onItemActivated = props.onItemActivated,
26
+ pluginInjectionApi = props.pluginInjectionApi;
26
27
  var _React$useState = React.useState(false),
27
28
  _React$useState2 = _slicedToArray(_React$useState, 2),
28
29
  isDropdownOpen = _React$useState2[0],
@@ -100,7 +101,9 @@ export function ToolbarDropdown(props) {
100
101
  }, jsx(ExpandIcon, {
101
102
  label: ""
102
103
  })))
103
- })), jsx("span", {
104
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
105
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
106
+ jsx("span", {
104
107
  css: separatorStyles
105
108
  }))
106
109
  );
@@ -37,7 +37,8 @@ export default function ToolbarListsIndentation(props) {
37
37
  outdentDisabled: outdentDisabled,
38
38
  disabled: disabled,
39
39
  onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode),
40
- featureFlags: featureFlags
40
+ featureFlags: featureFlags,
41
+ pluginInjectionApi: pluginInjectionApi
41
42
  });
42
43
  }
43
44
  return jsx(Toolbar, {
@@ -52,6 +53,7 @@ export default function ToolbarListsIndentation(props) {
52
53
  outdentDisabled: outdentDisabled,
53
54
  disabled: disabled,
54
55
  onItemActivated: onItemActivated(pluginInjectionApi, indentationStateNode),
55
- featureFlags: featureFlags
56
+ featureFlags: featureFlags,
57
+ pluginInjectionApi: pluginInjectionApi
56
58
  });
57
59
  }
@@ -4,6 +4,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
6
6
  import type { ListPlugin } from '@atlaskit/editor-plugin-list';
7
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
8
  import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
8
9
  type Config = {
9
10
  showIndentationButtons: boolean;
@@ -16,7 +17,8 @@ export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndent
16
17
  ListPlugin,
17
18
  OptionalPlugin<IndentationPlugin>,
18
19
  OptionalPlugin<TasksAndDecisionsPlugin>,
19
- OptionalPlugin<AnalyticsPlugin>
20
+ OptionalPlugin<AnalyticsPlugin>,
21
+ OptionalPlugin<PrimaryToolbarPlugin>
20
22
  ];
21
23
  }>;
22
24
  export declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
@@ -1,5 +1,6 @@
1
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
1
+ import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
+ import type { ToolbarListsIndentationPlugin } from './plugin';
3
4
  import type { onItemActivated } from './ui/onItemActivated';
4
5
  export type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
5
6
  export interface ToolbarProps {
@@ -17,4 +18,5 @@ export interface ToolbarProps {
17
18
  indentDisabled?: boolean;
18
19
  outdentDisabled?: boolean;
19
20
  onItemActivated: ReturnType<typeof onItemActivated>;
21
+ pluginInjectionApi?: ExtractInjectionAPI<ToolbarListsIndentationPlugin> | undefined;
20
22
  }
@@ -4,6 +4,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import type { IndentationPlugin } from '@atlaskit/editor-plugin-indentation';
6
6
  import type { ListPlugin } from '@atlaskit/editor-plugin-list';
7
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
8
  import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
8
9
  type Config = {
9
10
  showIndentationButtons: boolean;
@@ -16,7 +17,8 @@ export type ToolbarListsIndentationPlugin = NextEditorPlugin<'toolbarListsIndent
16
17
  ListPlugin,
17
18
  OptionalPlugin<IndentationPlugin>,
18
19
  OptionalPlugin<TasksAndDecisionsPlugin>,
19
- OptionalPlugin<AnalyticsPlugin>
20
+ OptionalPlugin<AnalyticsPlugin>,
21
+ OptionalPlugin<PrimaryToolbarPlugin>
20
22
  ];
21
23
  }>;
22
24
  export declare const toolbarListsIndentationPlugin: ToolbarListsIndentationPlugin;
@@ -1,5 +1,6 @@
1
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
1
+ import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
+ import type { ToolbarListsIndentationPlugin } from './plugin';
3
4
  import type { onItemActivated } from './ui/onItemActivated';
4
5
  export type ButtonName = 'bullet_list' | 'ordered_list' | 'indent' | 'outdent';
5
6
  export interface ToolbarProps {
@@ -17,4 +18,5 @@ export interface ToolbarProps {
17
18
  indentDisabled?: boolean;
18
19
  outdentDisabled?: boolean;
19
20
  onItemActivated: ReturnType<typeof onItemActivated>;
21
+ pluginInjectionApi?: ExtractInjectionAPI<ToolbarListsIndentationPlugin> | undefined;
20
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
3
- "version": "1.6.3",
3
+ "version": "1.7.1",
4
4
  "description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,12 +33,13 @@
33
33
  ".": "./src/index.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/editor-common": "^85.0.0",
36
+ "@atlaskit/editor-common": "^86.0.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.4.0",
38
38
  "@atlaskit/editor-plugin-block-type": "^3.8.0",
39
39
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
40
40
  "@atlaskit/editor-plugin-indentation": "^1.4.0",
41
41
  "@atlaskit/editor-plugin-list": "^3.5.0",
42
+ "@atlaskit/editor-plugin-primary-toolbar": "^1.2.0",
42
43
  "@atlaskit/editor-plugin-tasks-and-decisions": "^2.1.0",
43
44
  "@atlaskit/editor-prosemirror": "4.0.1",
44
45
  "@atlaskit/editor-shared-styles": "^2.13.0",