@atlaskit/editor-toolbar-model 0.0.4 → 0.1.0
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 +8 -0
- package/README.md +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types/index.d.ts +27 -28
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types/index.d.ts +27 -28
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar-model
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#199487](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199487)
|
|
8
|
+
[`54098ba4cc83c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/54098ba4cc83c) -
|
|
9
|
+
Add new PrimaryToolbar export which removes box shadows, export toolbar types
|
|
10
|
+
|
|
3
11
|
## 0.0.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/README.md
CHANGED
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,16 +1,15 @@
|
|
|
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
14
|
export type ToolbarButtonGroupLocation = 'start' | 'middle' | 'end';
|
|
16
15
|
export type ToolbarComponent = (props: {
|
|
@@ -36,67 +35,67 @@ export type ToolbarMenuSectionComponent = (props: {
|
|
|
36
35
|
children: React.ReactNode;
|
|
37
36
|
} & CommonComponentProps) => React.ReactNode;
|
|
38
37
|
export type ToolbarMenuItemComponent = (props: {} & CommonComponentProps) => React.ReactNode;
|
|
39
|
-
type
|
|
40
|
-
type: 'toolbar';
|
|
38
|
+
export type ToolbarType = {
|
|
41
39
|
key: string;
|
|
40
|
+
type: 'toolbar';
|
|
42
41
|
};
|
|
43
|
-
type
|
|
42
|
+
type ToolbarSectionType = {
|
|
44
43
|
key: string;
|
|
45
44
|
type: 'section';
|
|
46
45
|
};
|
|
47
|
-
type
|
|
46
|
+
type ToolbarGroupType = {
|
|
48
47
|
key: string;
|
|
49
48
|
type: 'group';
|
|
50
49
|
};
|
|
51
|
-
type
|
|
50
|
+
type ToolbarButtonType = {
|
|
52
51
|
key: string;
|
|
53
52
|
type: 'button';
|
|
54
53
|
};
|
|
55
|
-
type
|
|
54
|
+
type ToolbarMenuItemType = {
|
|
56
55
|
key: string;
|
|
57
56
|
type: 'menu-item';
|
|
58
57
|
};
|
|
59
|
-
type
|
|
58
|
+
type ToolbarMenuSectionType = {
|
|
60
59
|
key: string;
|
|
61
60
|
type: 'menu-section';
|
|
62
61
|
};
|
|
63
|
-
type
|
|
62
|
+
type ToolbarMenuType = {
|
|
64
63
|
key: string;
|
|
65
64
|
type: 'menu';
|
|
66
65
|
};
|
|
67
|
-
type
|
|
66
|
+
type ToolbarNestedMenuType = {
|
|
68
67
|
key: string;
|
|
69
68
|
type: 'nested-menu';
|
|
70
69
|
};
|
|
71
|
-
export type RegisterToolbar =
|
|
70
|
+
export type RegisterToolbar = ToolbarType & {
|
|
72
71
|
component?: ToolbarComponent;
|
|
73
72
|
};
|
|
74
|
-
export type RegisterToolbarSection =
|
|
75
|
-
parents: Parents<
|
|
73
|
+
export type RegisterToolbarSection = ToolbarSectionType & {
|
|
74
|
+
parents: Parents<ToolbarType>;
|
|
76
75
|
component?: ToolbarSectionComponent;
|
|
77
76
|
};
|
|
78
|
-
export type RegisterToolbarGroup =
|
|
79
|
-
parents: Parents<
|
|
77
|
+
export type RegisterToolbarGroup = ToolbarGroupType & {
|
|
78
|
+
parents: Parents<ToolbarSectionType>;
|
|
80
79
|
component?: ToolbarGroupComponent;
|
|
81
80
|
};
|
|
82
|
-
export type RegisterToolbarButton =
|
|
83
|
-
parents: Parents<
|
|
81
|
+
export type RegisterToolbarButton = ToolbarButtonType & {
|
|
82
|
+
parents: Parents<ToolbarGroupType>;
|
|
84
83
|
component?: ToolbarButtonComponent;
|
|
85
84
|
};
|
|
86
|
-
export type RegisterToolbarMenu =
|
|
87
|
-
parents: Parents<
|
|
85
|
+
export type RegisterToolbarMenu = ToolbarMenuType & {
|
|
86
|
+
parents: Parents<ToolbarGroupType>;
|
|
88
87
|
component?: ToolbarMenuComponent;
|
|
89
88
|
};
|
|
90
|
-
export type RegisterToolbarNestedMenu =
|
|
91
|
-
parents: Parents<
|
|
89
|
+
export type RegisterToolbarNestedMenu = ToolbarNestedMenuType & {
|
|
90
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
92
91
|
component: ToolbarNestedMenuComponent;
|
|
93
92
|
};
|
|
94
|
-
export type RegisterToolbarMenuSection =
|
|
95
|
-
parents: Parents<
|
|
93
|
+
export type RegisterToolbarMenuSection = ToolbarMenuSectionType & {
|
|
94
|
+
parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
|
|
96
95
|
component?: ToolbarMenuSectionComponent;
|
|
97
96
|
};
|
|
98
|
-
export type RegisterToolbarMenuItem =
|
|
99
|
-
parents: Parents<
|
|
97
|
+
export type RegisterToolbarMenuItem = ToolbarMenuItemType & {
|
|
98
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
100
99
|
component?: ToolbarMenuItemComponent;
|
|
101
100
|
};
|
|
102
101
|
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,16 +1,15 @@
|
|
|
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
14
|
export type ToolbarButtonGroupLocation = 'start' | 'middle' | 'end';
|
|
16
15
|
export type ToolbarComponent = (props: {
|
|
@@ -36,67 +35,67 @@ export type ToolbarMenuSectionComponent = (props: {
|
|
|
36
35
|
children: React.ReactNode;
|
|
37
36
|
} & CommonComponentProps) => React.ReactNode;
|
|
38
37
|
export type ToolbarMenuItemComponent = (props: {} & CommonComponentProps) => React.ReactNode;
|
|
39
|
-
type
|
|
40
|
-
type: 'toolbar';
|
|
38
|
+
export type ToolbarType = {
|
|
41
39
|
key: string;
|
|
40
|
+
type: 'toolbar';
|
|
42
41
|
};
|
|
43
|
-
type
|
|
42
|
+
type ToolbarSectionType = {
|
|
44
43
|
key: string;
|
|
45
44
|
type: 'section';
|
|
46
45
|
};
|
|
47
|
-
type
|
|
46
|
+
type ToolbarGroupType = {
|
|
48
47
|
key: string;
|
|
49
48
|
type: 'group';
|
|
50
49
|
};
|
|
51
|
-
type
|
|
50
|
+
type ToolbarButtonType = {
|
|
52
51
|
key: string;
|
|
53
52
|
type: 'button';
|
|
54
53
|
};
|
|
55
|
-
type
|
|
54
|
+
type ToolbarMenuItemType = {
|
|
56
55
|
key: string;
|
|
57
56
|
type: 'menu-item';
|
|
58
57
|
};
|
|
59
|
-
type
|
|
58
|
+
type ToolbarMenuSectionType = {
|
|
60
59
|
key: string;
|
|
61
60
|
type: 'menu-section';
|
|
62
61
|
};
|
|
63
|
-
type
|
|
62
|
+
type ToolbarMenuType = {
|
|
64
63
|
key: string;
|
|
65
64
|
type: 'menu';
|
|
66
65
|
};
|
|
67
|
-
type
|
|
66
|
+
type ToolbarNestedMenuType = {
|
|
68
67
|
key: string;
|
|
69
68
|
type: 'nested-menu';
|
|
70
69
|
};
|
|
71
|
-
export type RegisterToolbar =
|
|
70
|
+
export type RegisterToolbar = ToolbarType & {
|
|
72
71
|
component?: ToolbarComponent;
|
|
73
72
|
};
|
|
74
|
-
export type RegisterToolbarSection =
|
|
75
|
-
parents: Parents<
|
|
73
|
+
export type RegisterToolbarSection = ToolbarSectionType & {
|
|
74
|
+
parents: Parents<ToolbarType>;
|
|
76
75
|
component?: ToolbarSectionComponent;
|
|
77
76
|
};
|
|
78
|
-
export type RegisterToolbarGroup =
|
|
79
|
-
parents: Parents<
|
|
77
|
+
export type RegisterToolbarGroup = ToolbarGroupType & {
|
|
78
|
+
parents: Parents<ToolbarSectionType>;
|
|
80
79
|
component?: ToolbarGroupComponent;
|
|
81
80
|
};
|
|
82
|
-
export type RegisterToolbarButton =
|
|
83
|
-
parents: Parents<
|
|
81
|
+
export type RegisterToolbarButton = ToolbarButtonType & {
|
|
82
|
+
parents: Parents<ToolbarGroupType>;
|
|
84
83
|
component?: ToolbarButtonComponent;
|
|
85
84
|
};
|
|
86
|
-
export type RegisterToolbarMenu =
|
|
87
|
-
parents: Parents<
|
|
85
|
+
export type RegisterToolbarMenu = ToolbarMenuType & {
|
|
86
|
+
parents: Parents<ToolbarGroupType>;
|
|
88
87
|
component?: ToolbarMenuComponent;
|
|
89
88
|
};
|
|
90
|
-
export type RegisterToolbarNestedMenu =
|
|
91
|
-
parents: Parents<
|
|
89
|
+
export type RegisterToolbarNestedMenu = ToolbarNestedMenuType & {
|
|
90
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
92
91
|
component: ToolbarNestedMenuComponent;
|
|
93
92
|
};
|
|
94
|
-
export type RegisterToolbarMenuSection =
|
|
95
|
-
parents: Parents<
|
|
93
|
+
export type RegisterToolbarMenuSection = ToolbarMenuSectionType & {
|
|
94
|
+
parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
|
|
96
95
|
component?: ToolbarMenuSectionComponent;
|
|
97
96
|
};
|
|
98
|
-
export type RegisterToolbarMenuItem =
|
|
99
|
-
parents: Parents<
|
|
97
|
+
export type RegisterToolbarMenuItem = ToolbarMenuItemType & {
|
|
98
|
+
parents: Parents<ToolbarMenuSectionType>;
|
|
100
99
|
component?: ToolbarMenuItemComponent;
|
|
101
100
|
};
|
|
102
101
|
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.2.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.0
|
|
81
|
+
"version": "0.1.0",
|
|
82
82
|
"description": "register and render toolbar component",
|
|
83
83
|
"author": "Atlassian Pty Ltd",
|
|
84
84
|
"license": "Apache-2.0",
|