@atlaskit/editor-plugin-primary-toolbar 4.1.5 → 5.0.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,18 @@
1
1
  # @atlaskit/editor-plugin-primary-toolbar
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
14
+ Sorted type and interface props to improve Atlaskit docs
15
+
3
16
  ## 4.1.5
4
17
 
5
18
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import type { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
2
2
  import type { ComponentRegistry, ToolbarElementNames } from '../primaryToolbarPluginType';
3
3
  export declare const registerComponent: (componentRegistry: ComponentRegistry) => ({ name, component, }: {
4
- name: ToolbarElementNames;
5
4
  component: ToolbarUIComponentFactory;
5
+ name: ToolbarElementNames;
6
6
  }) => void;
@@ -3,8 +3,8 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { ComponentRegistry } from '../primaryToolbarPluginType';
4
4
  type GetToolbarComponentsOptions = {
5
5
  componentRegistry: ComponentRegistry;
6
- editorState: EditorState;
7
6
  contextualFormattingEnabled?: boolean;
7
+ editorState: EditorState;
8
8
  };
9
9
  export declare const getToolbarComponents: ({ componentRegistry, editorState, contextualFormattingEnabled, }: GetToolbarComponentsOptions) => ToolbarUIComponentFactory[];
10
10
  export {};
@@ -4,20 +4,20 @@ export interface PrimaryToolbarPluginOptions {
4
4
  contextualFormattingEnabled?: boolean;
5
5
  }
6
6
  export type PrimaryToolbarPlugin = NextEditorPlugin<'primaryToolbar', {
7
- sharedState: PrimaryToolbarPluginState | undefined;
8
7
  actions: {
9
8
  registerComponent: ({ name, component, }: {
10
- name: ToolbarElementNames;
11
9
  component: ToolbarUIComponentFactory;
10
+ name: ToolbarElementNames;
12
11
  }) => void;
13
12
  };
14
13
  pluginConfiguration?: PrimaryToolbarPluginOptions;
14
+ sharedState: PrimaryToolbarPluginState | undefined;
15
15
  }>;
16
16
  export type ComponentRegistry = Map<string, ToolbarUIComponentFactory>;
17
17
  export type ToolbarElementNames = 'aiExperience' | 'aiSimplified' | 'alignment' | 'avatarGroup' | 'beforePrimaryToolbar' | 'blockType' | 'findReplace' | 'highlight' | 'hyperlink' | 'insertBlock' | 'loom' | 'overflowMenu' | 'pinToolbar' | 'selectionExtension' | 'separator' | 'spellCheck' | 'textColor' | 'textFormatting' | 'toolbarListsIndentation' | 'trackChanges' | 'undoRedoPlugin';
18
18
  export type ToolbarElementConfig = {
19
- name: ToolbarElementNames;
20
19
  enabled?: (componentRegistry: ComponentRegistry, editorState: EditorState) => boolean;
20
+ name: ToolbarElementNames;
21
21
  };
22
22
  export type PrimaryToolbarPluginState = {
23
23
  components: ToolbarUIComponentFactory[];
@@ -1,6 +1,6 @@
1
1
  import type { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
2
2
  import type { ComponentRegistry, ToolbarElementNames } from '../primaryToolbarPluginType';
3
3
  export declare const registerComponent: (componentRegistry: ComponentRegistry) => ({ name, component, }: {
4
- name: ToolbarElementNames;
5
4
  component: ToolbarUIComponentFactory;
5
+ name: ToolbarElementNames;
6
6
  }) => void;
@@ -3,8 +3,8 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { ComponentRegistry } from '../primaryToolbarPluginType';
4
4
  type GetToolbarComponentsOptions = {
5
5
  componentRegistry: ComponentRegistry;
6
- editorState: EditorState;
7
6
  contextualFormattingEnabled?: boolean;
7
+ editorState: EditorState;
8
8
  };
9
9
  export declare const getToolbarComponents: ({ componentRegistry, editorState, contextualFormattingEnabled, }: GetToolbarComponentsOptions) => ToolbarUIComponentFactory[];
10
10
  export {};
@@ -4,20 +4,20 @@ export interface PrimaryToolbarPluginOptions {
4
4
  contextualFormattingEnabled?: boolean;
5
5
  }
6
6
  export type PrimaryToolbarPlugin = NextEditorPlugin<'primaryToolbar', {
7
- sharedState: PrimaryToolbarPluginState | undefined;
8
7
  actions: {
9
8
  registerComponent: ({ name, component, }: {
10
- name: ToolbarElementNames;
11
9
  component: ToolbarUIComponentFactory;
10
+ name: ToolbarElementNames;
12
11
  }) => void;
13
12
  };
14
13
  pluginConfiguration?: PrimaryToolbarPluginOptions;
14
+ sharedState: PrimaryToolbarPluginState | undefined;
15
15
  }>;
16
16
  export type ComponentRegistry = Map<string, ToolbarUIComponentFactory>;
17
17
  export type ToolbarElementNames = 'aiExperience' | 'aiSimplified' | 'alignment' | 'avatarGroup' | 'beforePrimaryToolbar' | 'blockType' | 'findReplace' | 'highlight' | 'hyperlink' | 'insertBlock' | 'loom' | 'overflowMenu' | 'pinToolbar' | 'selectionExtension' | 'separator' | 'spellCheck' | 'textColor' | 'textFormatting' | 'toolbarListsIndentation' | 'trackChanges' | 'undoRedoPlugin';
18
18
  export type ToolbarElementConfig = {
19
- name: ToolbarElementNames;
20
19
  enabled?: (componentRegistry: ComponentRegistry, editorState: EditorState) => boolean;
20
+ name: ToolbarElementNames;
21
21
  };
22
22
  export type PrimaryToolbarPluginState = {
23
23
  components: ToolbarUIComponentFactory[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-primary-toolbar",
3
- "version": "4.1.5",
3
+ "version": "5.0.0",
4
4
  "description": "Primary toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,18 +31,15 @@
31
31
  "*.compiled.css"
32
32
  ],
33
33
  "atlaskit:src": "src/index.ts",
34
- "af:exports": {
35
- ".": "./src/index.ts"
36
- },
37
34
  "dependencies": {
38
35
  "@atlaskit/editor-prosemirror": "7.0.0",
39
36
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
- "@atlaskit/tmp-editor-statsig": "^11.0.0",
37
+ "@atlaskit/tmp-editor-statsig": "^12.0.0",
41
38
  "@babel/runtime": "^7.0.0",
42
39
  "@emotion/react": "^11.7.1"
43
40
  },
44
41
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^107.25.0",
42
+ "@atlaskit/editor-common": "^108.0.0",
46
43
  "react": "^18.2.0"
47
44
  },
48
45
  "techstack": {