@atlaskit/editor-toolbar-model 0.1.1 → 0.2.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-toolbar-model
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`51f3f2db61f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/51f3f2db61f6e) -
8
+ Add ranks and keys for new collapsed text section component, add responsive container to
9
+ PrimaryToolbar export with new query selectors to hide empty elements, export types
10
+
11
+ ## 0.1.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`0fdcb6f2f96fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fdcb6f2f96fd) -
16
+ Sorted type and interface props to improve Atlaskit docs
17
+ - Updated dependencies
18
+
3
19
  ## 0.1.1
4
20
 
5
21
  ### Patch Changes
@@ -1,3 +1,3 @@
1
1
  export { ToolbarModelRenderer } from './ui/toolbar-model-renderer';
2
- export type { ToolbarComponentType, ToolbarComponentTypes, ToolbarType, ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent, } from './types';
2
+ export type { ToolbarComponentType, ToolbarComponentTypes, CommonComponentProps, ToolbarType, ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent, } from './types';
3
3
  export { createComponentRegistry } from './create-registry';
@@ -4,7 +4,7 @@ type WithRank<T> = T & {
4
4
  type Parents<T> = Array<WithRank<T>>;
5
5
  export type ToolbarComponentType = ToolbarType | ToolbarSectionType | ToolbarGroupType | ToolbarButtonType | ToolbarMenuType | ToolbarNestedMenuType | ToolbarMenuSectionType | ToolbarMenuItemType;
6
6
  export type ToolbarComponentTypes = Array<ToolbarComponentType>;
7
- type CommonComponentProps = {
7
+ export type CommonComponentProps = {
8
8
  /**
9
9
  * Array of parent information including both keys and types
10
10
  * Ordered from immediate parent to root parent
@@ -67,32 +67,32 @@ export type RegisterToolbar = ToolbarType & {
67
67
  component?: ToolbarComponent;
68
68
  };
69
69
  export type RegisterToolbarSection = ToolbarSectionType & {
70
- parents: Parents<ToolbarType>;
71
70
  component?: ToolbarSectionComponent;
71
+ parents: Parents<ToolbarType>;
72
72
  };
73
73
  export type RegisterToolbarGroup = ToolbarGroupType & {
74
- parents: Parents<ToolbarSectionType>;
75
74
  component?: ToolbarGroupComponent;
75
+ parents: Parents<ToolbarSectionType>;
76
76
  };
77
77
  export type RegisterToolbarButton = ToolbarButtonType & {
78
- parents: Parents<ToolbarGroupType>;
79
78
  component?: ToolbarButtonComponent;
79
+ parents: Parents<ToolbarGroupType>;
80
80
  };
81
81
  export type RegisterToolbarMenu = ToolbarMenuType & {
82
- parents: Parents<ToolbarGroupType>;
83
82
  component?: ToolbarMenuComponent;
83
+ parents: Parents<ToolbarGroupType>;
84
84
  };
85
85
  export type RegisterToolbarNestedMenu = ToolbarNestedMenuType & {
86
- parents: Parents<ToolbarMenuSectionType>;
87
86
  component: ToolbarNestedMenuComponent;
87
+ parents: Parents<ToolbarMenuSectionType>;
88
88
  };
89
89
  export type RegisterToolbarMenuSection = ToolbarMenuSectionType & {
90
- parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
91
90
  component?: ToolbarMenuSectionComponent;
91
+ parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
92
92
  };
93
93
  export type RegisterToolbarMenuItem = ToolbarMenuItemType & {
94
- parents: Parents<ToolbarMenuSectionType>;
95
94
  component?: ToolbarMenuItemComponent;
95
+ parents: Parents<ToolbarMenuSectionType>;
96
96
  };
97
97
  export type RegisterComponent = RegisterToolbar | RegisterToolbarSection | RegisterToolbarGroup | RegisterToolbarButton | RegisterToolbarMenu | RegisterToolbarNestedMenu | RegisterToolbarMenuSection | RegisterToolbarMenuItem;
98
98
  export {};
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RegisterToolbar, RegisterComponent, ToolbarGroupComponent, ToolbarMenuSectionComponent, ToolbarSectionComponent } from '../../types';
3
3
  type ToolbarProps = {
4
- /**
5
- * Toolbar component
6
- */
7
- toolbar: RegisterToolbar;
8
4
  /**
9
5
  * Every registered toolbar component
10
6
  */
@@ -14,9 +10,13 @@ type ToolbarProps = {
14
10
  */
15
11
  fallbacks: {
16
12
  group: ToolbarGroupComponent;
17
- section: ToolbarSectionComponent;
18
13
  menuSection: ToolbarMenuSectionComponent;
14
+ section: ToolbarSectionComponent;
19
15
  };
16
+ /**
17
+ * Toolbar component
18
+ */
19
+ toolbar: RegisterToolbar;
20
20
  };
21
21
  export declare const ToolbarModelRenderer: ({ toolbar, components, fallbacks }: ToolbarProps) => React.JSX.Element;
22
22
  export {};
@@ -1,3 +1,3 @@
1
1
  export { ToolbarModelRenderer } from './ui/toolbar-model-renderer';
2
- export type { ToolbarComponentType, ToolbarComponentTypes, ToolbarType, ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent, } from './types';
2
+ export type { ToolbarComponentType, ToolbarComponentTypes, CommonComponentProps, ToolbarType, ToolbarMenuComponent, ToolbarButtonComponent, ToolbarMenuItemComponent, ToolbarGroupComponent, RegisterToolbar, RegisterToolbarSection, RegisterToolbarGroup, RegisterToolbarButton, RegisterToolbarMenu, RegisterToolbarNestedMenu, RegisterToolbarMenuSection, RegisterToolbarMenuItem, RegisterComponent, } from './types';
3
3
  export { createComponentRegistry } from './create-registry';
@@ -4,7 +4,7 @@ type WithRank<T> = T & {
4
4
  type Parents<T> = Array<WithRank<T>>;
5
5
  export type ToolbarComponentType = ToolbarType | ToolbarSectionType | ToolbarGroupType | ToolbarButtonType | ToolbarMenuType | ToolbarNestedMenuType | ToolbarMenuSectionType | ToolbarMenuItemType;
6
6
  export type ToolbarComponentTypes = Array<ToolbarComponentType>;
7
- type CommonComponentProps = {
7
+ export type CommonComponentProps = {
8
8
  /**
9
9
  * Array of parent information including both keys and types
10
10
  * Ordered from immediate parent to root parent
@@ -67,32 +67,32 @@ export type RegisterToolbar = ToolbarType & {
67
67
  component?: ToolbarComponent;
68
68
  };
69
69
  export type RegisterToolbarSection = ToolbarSectionType & {
70
- parents: Parents<ToolbarType>;
71
70
  component?: ToolbarSectionComponent;
71
+ parents: Parents<ToolbarType>;
72
72
  };
73
73
  export type RegisterToolbarGroup = ToolbarGroupType & {
74
- parents: Parents<ToolbarSectionType>;
75
74
  component?: ToolbarGroupComponent;
75
+ parents: Parents<ToolbarSectionType>;
76
76
  };
77
77
  export type RegisterToolbarButton = ToolbarButtonType & {
78
- parents: Parents<ToolbarGroupType>;
79
78
  component?: ToolbarButtonComponent;
79
+ parents: Parents<ToolbarGroupType>;
80
80
  };
81
81
  export type RegisterToolbarMenu = ToolbarMenuType & {
82
- parents: Parents<ToolbarGroupType>;
83
82
  component?: ToolbarMenuComponent;
83
+ parents: Parents<ToolbarGroupType>;
84
84
  };
85
85
  export type RegisterToolbarNestedMenu = ToolbarNestedMenuType & {
86
- parents: Parents<ToolbarMenuSectionType>;
87
86
  component: ToolbarNestedMenuComponent;
87
+ parents: Parents<ToolbarMenuSectionType>;
88
88
  };
89
89
  export type RegisterToolbarMenuSection = ToolbarMenuSectionType & {
90
- parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
91
90
  component?: ToolbarMenuSectionComponent;
91
+ parents: Parents<ToolbarMenuType | ToolbarNestedMenuType>;
92
92
  };
93
93
  export type RegisterToolbarMenuItem = ToolbarMenuItemType & {
94
- parents: Parents<ToolbarMenuSectionType>;
95
94
  component?: ToolbarMenuItemComponent;
95
+ parents: Parents<ToolbarMenuSectionType>;
96
96
  };
97
97
  export type RegisterComponent = RegisterToolbar | RegisterToolbarSection | RegisterToolbarGroup | RegisterToolbarButton | RegisterToolbarMenu | RegisterToolbarNestedMenu | RegisterToolbarMenuSection | RegisterToolbarMenuItem;
98
98
  export {};
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { RegisterToolbar, RegisterComponent, ToolbarGroupComponent, ToolbarMenuSectionComponent, ToolbarSectionComponent } from '../../types';
3
3
  type ToolbarProps = {
4
- /**
5
- * Toolbar component
6
- */
7
- toolbar: RegisterToolbar;
8
4
  /**
9
5
  * Every registered toolbar component
10
6
  */
@@ -14,9 +10,13 @@ type ToolbarProps = {
14
10
  */
15
11
  fallbacks: {
16
12
  group: ToolbarGroupComponent;
17
- section: ToolbarSectionComponent;
18
13
  menuSection: ToolbarMenuSectionComponent;
14
+ section: ToolbarSectionComponent;
19
15
  };
16
+ /**
17
+ * Toolbar component
18
+ */
19
+ toolbar: RegisterToolbar;
20
20
  };
21
21
  export declare const ToolbarModelRenderer: ({ toolbar, components, fallbacks }: ToolbarProps) => React.JSX.Element;
22
22
  export {};
package/package.json CHANGED
@@ -20,13 +20,10 @@
20
20
  "*.compiled.css"
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
- "af:exports": {
24
- ".": "./src/index.ts"
25
- },
26
23
  "dependencies": {
27
24
  "@atlaskit/css": "^0.12.0",
28
- "@atlaskit/primitives": "^14.11.0",
29
- "@atlaskit/tokens": "^6.0.0",
25
+ "@atlaskit/primitives": "^14.12.0",
26
+ "@atlaskit/tokens": "^6.1.0",
30
27
  "@babel/runtime": "^7.0.0",
31
28
  "@compiled/react": "^0.18.3"
32
29
  },
@@ -36,9 +33,8 @@
36
33
  "devDependencies": {
37
34
  "@af/integration-testing": "workspace:^",
38
35
  "@af/visual-regression": "workspace:^",
39
- "@atlaskit/editor-toolbar": "^0.3.0",
36
+ "@atlaskit/editor-toolbar": "^0.6.0",
40
37
  "@atlaskit/ssr": "workspace:^",
41
- "@atlaskit/visual-regression": "workspace:^",
42
38
  "@testing-library/react": "^13.4.0",
43
39
  "react-dom": "^18.2.0"
44
40
  },
@@ -78,7 +74,7 @@
78
74
  }
79
75
  },
80
76
  "name": "@atlaskit/editor-toolbar-model",
81
- "version": "0.1.1",
77
+ "version": "0.2.0",
82
78
  "description": "register and render toolbar component",
83
79
  "author": "Atlassian Pty Ltd",
84
80
  "license": "Apache-2.0",