@atlaskit/editor-toolbar-model 0.0.4 → 0.1.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 +23 -0
- package/README.md +1 -1
- package/dist/cjs/ui/toolbar-model-renderer/index.js +0 -6
- package/dist/es2019/ui/toolbar-model-renderer/index.js +0 -6
- package/dist/esm/ui/toolbar-model-renderer/index.js +0 -6
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +28 -33
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +28 -33
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar-model
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3145f278b1f7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3145f278b1f7a) -
|
|
8
|
+
[ux] [ED-28473] minor UI updates for editor-toolbar
|
|
9
|
+
|
|
10
|
+
- Use ADS ButtonGroup for ToolbarButtonGroup
|
|
11
|
+
- Remove groupLocation prop and use CSS instead
|
|
12
|
+
- Use DropdownItemGroup for ToolbarDropdownItemSection and expand props for section separator and
|
|
13
|
+
title
|
|
14
|
+
- Support ReactNode as content for ToolbarTooltip and add missing shortcuts in tooltips
|
|
15
|
+
- Center Icons for split buttons and make chevron icon 24px wide
|
|
16
|
+
- Align dropdown menu UI with current editor design
|
|
17
|
+
|
|
18
|
+
## 0.1.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [#199487](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199487)
|
|
23
|
+
[`54098ba4cc83c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/54098ba4cc83c) -
|
|
24
|
+
Add new PrimaryToolbar export which removes box shadows, export toolbar types
|
|
25
|
+
|
|
3
26
|
## 0.0.4
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -55,7 +55,6 @@ var ToolbarModelRenderer = exports.ToolbarModelRenderer = function ToolbarModelR
|
|
|
55
55
|
var renderToolbarItem = function renderToolbarItem(_ref2) {
|
|
56
56
|
var item = _ref2.item,
|
|
57
57
|
index = _ref2.index,
|
|
58
|
-
groupLocation = _ref2.groupLocation,
|
|
59
58
|
parents = _ref2.parents;
|
|
60
59
|
if (item.type === 'menu') {
|
|
61
60
|
var menuComponents = getSortedChildren(menuSections, item.key);
|
|
@@ -65,7 +64,6 @@ var ToolbarModelRenderer = exports.ToolbarModelRenderer = function ToolbarModelR
|
|
|
65
64
|
var Menu = item.component || NoOp;
|
|
66
65
|
return /*#__PURE__*/_react.default.createElement(Menu, {
|
|
67
66
|
key: item.key,
|
|
68
|
-
groupLocation: groupLocation,
|
|
69
67
|
parents: parents
|
|
70
68
|
}, menuComponents.map(function (menuSection) {
|
|
71
69
|
var menuItemsInSection = getSortedChildren(menuItemsAndNestedMenus, menuSection.key);
|
|
@@ -142,7 +140,6 @@ var ToolbarModelRenderer = exports.ToolbarModelRenderer = function ToolbarModelR
|
|
|
142
140
|
var Button = item.component || NoOp;
|
|
143
141
|
return /*#__PURE__*/_react.default.createElement(Button, {
|
|
144
142
|
key: item.key,
|
|
145
|
-
groupLocation: groupLocation,
|
|
146
143
|
parents: parents
|
|
147
144
|
});
|
|
148
145
|
};
|
|
@@ -156,12 +153,9 @@ var ToolbarModelRenderer = exports.ToolbarModelRenderer = function ToolbarModelR
|
|
|
156
153
|
key: group.key,
|
|
157
154
|
parents: parents
|
|
158
155
|
}, groupItems.map(function (item, index) {
|
|
159
|
-
var isSingleItem = groupItems.length === 1;
|
|
160
|
-
var groupLocation = isSingleItem ? undefined : index === 0 ? 'start' : index === groupItems.length - 1 ? 'end' : 'middle';
|
|
161
156
|
return renderToolbarItem({
|
|
162
157
|
item: item,
|
|
163
158
|
index: index,
|
|
164
|
-
groupLocation: groupLocation,
|
|
165
159
|
parents: [].concat((0, _toConsumableArray2.default)(parents), [{
|
|
166
160
|
key: group.key,
|
|
167
161
|
type: group.type
|
|
@@ -36,7 +36,6 @@ export const ToolbarModelRenderer = ({
|
|
|
36
36
|
const renderToolbarItem = ({
|
|
37
37
|
item,
|
|
38
38
|
index,
|
|
39
|
-
groupLocation,
|
|
40
39
|
parents
|
|
41
40
|
}) => {
|
|
42
41
|
if (item.type === 'menu') {
|
|
@@ -47,7 +46,6 @@ export const ToolbarModelRenderer = ({
|
|
|
47
46
|
const Menu = item.component || NoOp;
|
|
48
47
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
49
48
|
key: item.key,
|
|
50
|
-
groupLocation: groupLocation,
|
|
51
49
|
parents: parents
|
|
52
50
|
}, menuComponents.map(menuSection => {
|
|
53
51
|
const menuItemsInSection = getSortedChildren(menuItemsAndNestedMenus, menuSection.key);
|
|
@@ -124,7 +122,6 @@ export const ToolbarModelRenderer = ({
|
|
|
124
122
|
const Button = item.component || NoOp;
|
|
125
123
|
return /*#__PURE__*/React.createElement(Button, {
|
|
126
124
|
key: item.key,
|
|
127
|
-
groupLocation: groupLocation,
|
|
128
125
|
parents: parents
|
|
129
126
|
});
|
|
130
127
|
};
|
|
@@ -138,12 +135,9 @@ export const ToolbarModelRenderer = ({
|
|
|
138
135
|
key: group.key,
|
|
139
136
|
parents: parents
|
|
140
137
|
}, groupItems.map((item, index) => {
|
|
141
|
-
const isSingleItem = groupItems.length === 1;
|
|
142
|
-
const groupLocation = isSingleItem ? undefined : index === 0 ? 'start' : index === groupItems.length - 1 ? 'end' : 'middle';
|
|
143
138
|
return renderToolbarItem({
|
|
144
139
|
item,
|
|
145
140
|
index,
|
|
146
|
-
groupLocation,
|
|
147
141
|
parents: [...parents, {
|
|
148
142
|
key: group.key,
|
|
149
143
|
type: group.type
|
|
@@ -48,7 +48,6 @@ export var ToolbarModelRenderer = function ToolbarModelRenderer(_ref) {
|
|
|
48
48
|
var renderToolbarItem = function renderToolbarItem(_ref2) {
|
|
49
49
|
var item = _ref2.item,
|
|
50
50
|
index = _ref2.index,
|
|
51
|
-
groupLocation = _ref2.groupLocation,
|
|
52
51
|
parents = _ref2.parents;
|
|
53
52
|
if (item.type === 'menu') {
|
|
54
53
|
var menuComponents = getSortedChildren(menuSections, item.key);
|
|
@@ -58,7 +57,6 @@ export var ToolbarModelRenderer = function ToolbarModelRenderer(_ref) {
|
|
|
58
57
|
var Menu = item.component || NoOp;
|
|
59
58
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
60
59
|
key: item.key,
|
|
61
|
-
groupLocation: groupLocation,
|
|
62
60
|
parents: parents
|
|
63
61
|
}, menuComponents.map(function (menuSection) {
|
|
64
62
|
var menuItemsInSection = getSortedChildren(menuItemsAndNestedMenus, menuSection.key);
|
|
@@ -135,7 +133,6 @@ export var ToolbarModelRenderer = function ToolbarModelRenderer(_ref) {
|
|
|
135
133
|
var Button = item.component || NoOp;
|
|
136
134
|
return /*#__PURE__*/React.createElement(Button, {
|
|
137
135
|
key: item.key,
|
|
138
|
-
groupLocation: groupLocation,
|
|
139
136
|
parents: parents
|
|
140
137
|
});
|
|
141
138
|
};
|
|
@@ -149,12 +146,9 @@ export var ToolbarModelRenderer = function ToolbarModelRenderer(_ref) {
|
|
|
149
146
|
key: group.key,
|
|
150
147
|
parents: parents
|
|
151
148
|
}, groupItems.map(function (item, index) {
|
|
152
|
-
var isSingleItem = groupItems.length === 1;
|
|
153
|
-
var groupLocation = isSingleItem ? undefined : index === 0 ? 'start' : index === groupItems.length - 1 ? 'end' : 'middle';
|
|
154
149
|
return renderToolbarItem({
|
|
155
150
|
item: item,
|
|
156
151
|
index: index,
|
|
157
|
-
groupLocation: groupLocation,
|
|
158
152
|
parents: [].concat(_toConsumableArray(parents), [{
|
|
159
153
|
key: group.key,
|
|
160
154
|
type: group.type
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ToolbarModelRenderer } from './ui/toolbar-model-renderer';
|
|
2
|
-
export type { ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent,
|
|
2
|
+
export type { ToolbarComponentType, ToolbarComponentTypes, ToolbarType, ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent, } from './types';
|
|
3
3
|
export { createComponentRegistry } from './create-registry';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type WithRank<T> = T & {
|
|
3
2
|
rank: number;
|
|
4
3
|
};
|
|
5
4
|
type Parents<T> = Array<WithRank<T>>;
|
|
6
|
-
type
|
|
7
|
-
export type
|
|
5
|
+
export type ToolbarComponentType = ToolbarType | ToolbarSectionType | ToolbarGroupType | ToolbarButtonType | ToolbarMenuType | ToolbarNestedMenuType | ToolbarMenuSectionType | ToolbarMenuItemType;
|
|
6
|
+
export type ToolbarComponentTypes = Array<ToolbarComponentType>;
|
|
8
7
|
type CommonComponentProps = {
|
|
9
8
|
/**
|
|
10
9
|
* Array of parent information including both keys and types
|
|
11
10
|
* Ordered from immediate parent to root parent
|
|
12
11
|
*/
|
|
13
|
-
parents:
|
|
12
|
+
parents: ToolbarComponentTypes;
|
|
14
13
|
};
|
|
15
|
-
export type ToolbarButtonGroupLocation = 'start' | 'middle' | 'end';
|
|
16
14
|
export type ToolbarComponent = (props: {
|
|
17
15
|
children: React.ReactNode;
|
|
18
16
|
}) => React.ReactNode;
|
|
@@ -23,80 +21,77 @@ export type ToolbarGroupComponent = (props: {
|
|
|
23
21
|
children: React.ReactNode;
|
|
24
22
|
} & CommonComponentProps) => React.ReactNode;
|
|
25
23
|
export type ToolbarMenuComponent = (props: {
|
|
26
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
27
24
|
children: React.ReactNode;
|
|
28
25
|
} & CommonComponentProps) => React.ReactNode;
|
|
29
26
|
export type ToolbarNestedMenuComponent = (props: {
|
|
30
27
|
children: React.ReactNode;
|
|
31
28
|
} & CommonComponentProps) => React.ReactNode;
|
|
32
|
-
export type ToolbarButtonComponent = (props: {
|
|
33
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
34
|
-
} & CommonComponentProps) => React.ReactNode;
|
|
29
|
+
export type ToolbarButtonComponent = (props: {} & CommonComponentProps) => React.ReactNode;
|
|
35
30
|
export type ToolbarMenuSectionComponent = (props: {
|
|
36
31
|
children: React.ReactNode;
|
|
37
32
|
} & CommonComponentProps) => React.ReactNode;
|
|
38
33
|
export type ToolbarMenuItemComponent = (props: {} & CommonComponentProps) => React.ReactNode;
|
|
39
|
-
type
|
|
40
|
-
type: 'toolbar';
|
|
34
|
+
export type ToolbarType = {
|
|
41
35
|
key: string;
|
|
36
|
+
type: 'toolbar';
|
|
42
37
|
};
|
|
43
|
-
type
|
|
38
|
+
type ToolbarSectionType = {
|
|
44
39
|
key: string;
|
|
45
40
|
type: 'section';
|
|
46
41
|
};
|
|
47
|
-
type
|
|
42
|
+
type ToolbarGroupType = {
|
|
48
43
|
key: string;
|
|
49
44
|
type: 'group';
|
|
50
45
|
};
|
|
51
|
-
type
|
|
46
|
+
type ToolbarButtonType = {
|
|
52
47
|
key: string;
|
|
53
48
|
type: 'button';
|
|
54
49
|
};
|
|
55
|
-
type
|
|
50
|
+
type ToolbarMenuItemType = {
|
|
56
51
|
key: string;
|
|
57
52
|
type: 'menu-item';
|
|
58
53
|
};
|
|
59
|
-
type
|
|
54
|
+
type ToolbarMenuSectionType = {
|
|
60
55
|
key: string;
|
|
61
56
|
type: 'menu-section';
|
|
62
57
|
};
|
|
63
|
-
type
|
|
58
|
+
type ToolbarMenuType = {
|
|
64
59
|
key: string;
|
|
65
60
|
type: 'menu';
|
|
66
61
|
};
|
|
67
|
-
type
|
|
62
|
+
type ToolbarNestedMenuType = {
|
|
68
63
|
key: string;
|
|
69
64
|
type: 'nested-menu';
|
|
70
65
|
};
|
|
71
|
-
export type RegisterToolbar =
|
|
66
|
+
export type RegisterToolbar = ToolbarType & {
|
|
72
67
|
component?: ToolbarComponent;
|
|
73
68
|
};
|
|
74
|
-
export type RegisterToolbarSection =
|
|
75
|
-
parents: Parents<
|
|
69
|
+
export type RegisterToolbarSection = ToolbarSectionType & {
|
|
70
|
+
parents: Parents<ToolbarType>;
|
|
76
71
|
component?: ToolbarSectionComponent;
|
|
77
72
|
};
|
|
78
|
-
export type RegisterToolbarGroup =
|
|
79
|
-
parents: Parents<
|
|
73
|
+
export type RegisterToolbarGroup = ToolbarGroupType & {
|
|
74
|
+
parents: Parents<ToolbarSectionType>;
|
|
80
75
|
component?: ToolbarGroupComponent;
|
|
81
76
|
};
|
|
82
|
-
export type RegisterToolbarButton =
|
|
83
|
-
parents: Parents<
|
|
77
|
+
export type RegisterToolbarButton = ToolbarButtonType & {
|
|
78
|
+
parents: Parents<ToolbarGroupType>;
|
|
84
79
|
component?: ToolbarButtonComponent;
|
|
85
80
|
};
|
|
86
|
-
export type RegisterToolbarMenu =
|
|
87
|
-
parents: Parents<
|
|
81
|
+
export type RegisterToolbarMenu = ToolbarMenuType & {
|
|
82
|
+
parents: Parents<ToolbarGroupType>;
|
|
88
83
|
component?: ToolbarMenuComponent;
|
|
89
84
|
};
|
|
90
|
-
export type RegisterToolbarNestedMenu =
|
|
91
|
-
parents: Parents<
|
|
85
|
+
export type RegisterToolbarNestedMenu = ToolbarNestedMenuType & {
|
|
86
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
92
87
|
component: ToolbarNestedMenuComponent;
|
|
93
88
|
};
|
|
94
|
-
export type RegisterToolbarMenuSection =
|
|
95
|
-
parents: Parents<
|
|
89
|
+
export type RegisterToolbarMenuSection = ToolbarMenuSectionType & {
|
|
90
|
+
parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
|
|
96
91
|
component?: ToolbarMenuSectionComponent;
|
|
97
92
|
};
|
|
98
|
-
export type RegisterToolbarMenuItem =
|
|
99
|
-
parents: Parents<
|
|
93
|
+
export type RegisterToolbarMenuItem = ToolbarMenuItemType & {
|
|
94
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
100
95
|
component?: ToolbarMenuItemComponent;
|
|
101
96
|
};
|
|
102
97
|
export type RegisterComponent = RegisterToolbar | RegisterToolbarSection | RegisterToolbarGroup | RegisterToolbarButton | RegisterToolbarMenu | RegisterToolbarNestedMenu | RegisterToolbarMenuSection | RegisterToolbarMenuItem;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ToolbarModelRenderer } from './ui/toolbar-model-renderer';
|
|
2
|
-
export type { ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent,
|
|
2
|
+
export type { ToolbarComponentType, ToolbarComponentTypes, ToolbarType, ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent, } from './types';
|
|
3
3
|
export { createComponentRegistry } from './create-registry';
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type WithRank<T> = T & {
|
|
3
2
|
rank: number;
|
|
4
3
|
};
|
|
5
4
|
type Parents<T> = Array<WithRank<T>>;
|
|
6
|
-
type
|
|
7
|
-
export type
|
|
5
|
+
export type ToolbarComponentType = ToolbarType | ToolbarSectionType | ToolbarGroupType | ToolbarButtonType | ToolbarMenuType | ToolbarNestedMenuType | ToolbarMenuSectionType | ToolbarMenuItemType;
|
|
6
|
+
export type ToolbarComponentTypes = Array<ToolbarComponentType>;
|
|
8
7
|
type CommonComponentProps = {
|
|
9
8
|
/**
|
|
10
9
|
* Array of parent information including both keys and types
|
|
11
10
|
* Ordered from immediate parent to root parent
|
|
12
11
|
*/
|
|
13
|
-
parents:
|
|
12
|
+
parents: ToolbarComponentTypes;
|
|
14
13
|
};
|
|
15
|
-
export type ToolbarButtonGroupLocation = 'start' | 'middle' | 'end';
|
|
16
14
|
export type ToolbarComponent = (props: {
|
|
17
15
|
children: React.ReactNode;
|
|
18
16
|
}) => React.ReactNode;
|
|
@@ -23,80 +21,77 @@ export type ToolbarGroupComponent = (props: {
|
|
|
23
21
|
children: React.ReactNode;
|
|
24
22
|
} & CommonComponentProps) => React.ReactNode;
|
|
25
23
|
export type ToolbarMenuComponent = (props: {
|
|
26
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
27
24
|
children: React.ReactNode;
|
|
28
25
|
} & CommonComponentProps) => React.ReactNode;
|
|
29
26
|
export type ToolbarNestedMenuComponent = (props: {
|
|
30
27
|
children: React.ReactNode;
|
|
31
28
|
} & CommonComponentProps) => React.ReactNode;
|
|
32
|
-
export type ToolbarButtonComponent = (props: {
|
|
33
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
34
|
-
} & CommonComponentProps) => React.ReactNode;
|
|
29
|
+
export type ToolbarButtonComponent = (props: {} & CommonComponentProps) => React.ReactNode;
|
|
35
30
|
export type ToolbarMenuSectionComponent = (props: {
|
|
36
31
|
children: React.ReactNode;
|
|
37
32
|
} & CommonComponentProps) => React.ReactNode;
|
|
38
33
|
export type ToolbarMenuItemComponent = (props: {} & CommonComponentProps) => React.ReactNode;
|
|
39
|
-
type
|
|
40
|
-
type: 'toolbar';
|
|
34
|
+
export type ToolbarType = {
|
|
41
35
|
key: string;
|
|
36
|
+
type: 'toolbar';
|
|
42
37
|
};
|
|
43
|
-
type
|
|
38
|
+
type ToolbarSectionType = {
|
|
44
39
|
key: string;
|
|
45
40
|
type: 'section';
|
|
46
41
|
};
|
|
47
|
-
type
|
|
42
|
+
type ToolbarGroupType = {
|
|
48
43
|
key: string;
|
|
49
44
|
type: 'group';
|
|
50
45
|
};
|
|
51
|
-
type
|
|
46
|
+
type ToolbarButtonType = {
|
|
52
47
|
key: string;
|
|
53
48
|
type: 'button';
|
|
54
49
|
};
|
|
55
|
-
type
|
|
50
|
+
type ToolbarMenuItemType = {
|
|
56
51
|
key: string;
|
|
57
52
|
type: 'menu-item';
|
|
58
53
|
};
|
|
59
|
-
type
|
|
54
|
+
type ToolbarMenuSectionType = {
|
|
60
55
|
key: string;
|
|
61
56
|
type: 'menu-section';
|
|
62
57
|
};
|
|
63
|
-
type
|
|
58
|
+
type ToolbarMenuType = {
|
|
64
59
|
key: string;
|
|
65
60
|
type: 'menu';
|
|
66
61
|
};
|
|
67
|
-
type
|
|
62
|
+
type ToolbarNestedMenuType = {
|
|
68
63
|
key: string;
|
|
69
64
|
type: 'nested-menu';
|
|
70
65
|
};
|
|
71
|
-
export type RegisterToolbar =
|
|
66
|
+
export type RegisterToolbar = ToolbarType & {
|
|
72
67
|
component?: ToolbarComponent;
|
|
73
68
|
};
|
|
74
|
-
export type RegisterToolbarSection =
|
|
75
|
-
parents: Parents<
|
|
69
|
+
export type RegisterToolbarSection = ToolbarSectionType & {
|
|
70
|
+
parents: Parents<ToolbarType>;
|
|
76
71
|
component?: ToolbarSectionComponent;
|
|
77
72
|
};
|
|
78
|
-
export type RegisterToolbarGroup =
|
|
79
|
-
parents: Parents<
|
|
73
|
+
export type RegisterToolbarGroup = ToolbarGroupType & {
|
|
74
|
+
parents: Parents<ToolbarSectionType>;
|
|
80
75
|
component?: ToolbarGroupComponent;
|
|
81
76
|
};
|
|
82
|
-
export type RegisterToolbarButton =
|
|
83
|
-
parents: Parents<
|
|
77
|
+
export type RegisterToolbarButton = ToolbarButtonType & {
|
|
78
|
+
parents: Parents<ToolbarGroupType>;
|
|
84
79
|
component?: ToolbarButtonComponent;
|
|
85
80
|
};
|
|
86
|
-
export type RegisterToolbarMenu =
|
|
87
|
-
parents: Parents<
|
|
81
|
+
export type RegisterToolbarMenu = ToolbarMenuType & {
|
|
82
|
+
parents: Parents<ToolbarGroupType>;
|
|
88
83
|
component?: ToolbarMenuComponent;
|
|
89
84
|
};
|
|
90
|
-
export type RegisterToolbarNestedMenu =
|
|
91
|
-
parents: Parents<
|
|
85
|
+
export type RegisterToolbarNestedMenu = ToolbarNestedMenuType & {
|
|
86
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
92
87
|
component: ToolbarNestedMenuComponent;
|
|
93
88
|
};
|
|
94
|
-
export type RegisterToolbarMenuSection =
|
|
95
|
-
parents: Parents<
|
|
89
|
+
export type RegisterToolbarMenuSection = ToolbarMenuSectionType & {
|
|
90
|
+
parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
|
|
96
91
|
component?: ToolbarMenuSectionComponent;
|
|
97
92
|
};
|
|
98
|
-
export type RegisterToolbarMenuItem =
|
|
99
|
-
parents: Parents<
|
|
93
|
+
export type RegisterToolbarMenuItem = ToolbarMenuItemType & {
|
|
94
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
100
95
|
component?: ToolbarMenuItemComponent;
|
|
101
96
|
};
|
|
102
97
|
export type RegisterComponent = RegisterToolbar | RegisterToolbarSection | RegisterToolbarGroup | RegisterToolbarButton | RegisterToolbarMenu | RegisterToolbarNestedMenu | RegisterToolbarMenuSection | RegisterToolbarMenuItem;
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@af/integration-testing": "workspace:^",
|
|
38
38
|
"@af/visual-regression": "workspace:^",
|
|
39
|
-
"@atlaskit/editor-toolbar": "^0.0
|
|
39
|
+
"@atlaskit/editor-toolbar": "^0.3.0",
|
|
40
40
|
"@atlaskit/ssr": "workspace:^",
|
|
41
41
|
"@atlaskit/visual-regression": "workspace:^",
|
|
42
42
|
"@testing-library/react": "^13.4.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"name": "@atlaskit/editor-toolbar-model",
|
|
81
|
-
"version": "0.
|
|
81
|
+
"version": "0.1.1",
|
|
82
82
|
"description": "register and render toolbar component",
|
|
83
83
|
"author": "Atlassian Pty Ltd",
|
|
84
84
|
"license": "Apache-2.0",
|