@atlaskit/editor-plugin-primary-toolbar 4.1.4 → 4.1.6

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,20 @@
1
1
  # @atlaskit/editor-plugin-primary-toolbar
2
2
 
3
+ ## 4.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
8
+ Sorted type and interface props to improve Atlaskit docs
9
+
10
+ ## 4.1.5
11
+
12
+ ### Patch Changes
13
+
14
+ - [`6ca68bbf39757`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6ca68bbf39757) -
15
+ Change all AIFC feature gates over to an experiment platform_editor_ai_aifc
16
+ - Updated dependencies
17
+
3
18
  ## 4.1.4
4
19
 
5
20
  ### Patch Changes
@@ -20,9 +20,7 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
20
20
  configuration = toolbarConfigurationV2(true, shouldShowUndoRedoGroup);
21
21
  } else {
22
22
  var shouldShowFindGroup = !!contextualFormattingEnabled;
23
- // platform_editor_ai_in_document_streaming is the feature flag for Confluence
24
- // editor-jira-undo-redo-show-diff-buttons is the feature flag for Jira
25
- if (((0, _platformFeatureFlags.fg)('platform_editor_ai_in_document_streaming') || (0, _platformFeatureFlags.fg)('editor-jira-undo-redo-show-diff-buttons')) && componentRegistry.has('trackChanges')) {
23
+ if (componentRegistry.has('trackChanges')) {
26
24
  configuration = toolbarConfigurationV3(shouldShowFindGroup);
27
25
  } else {
28
26
  configuration = toolbarConfiguration(shouldShowFindGroup);
@@ -13,9 +13,7 @@ export const getToolbarComponents = ({
13
13
  configuration = toolbarConfigurationV2(true, shouldShowUndoRedoGroup);
14
14
  } else {
15
15
  const shouldShowFindGroup = !!contextualFormattingEnabled;
16
- // platform_editor_ai_in_document_streaming is the feature flag for Confluence
17
- // editor-jira-undo-redo-show-diff-buttons is the feature flag for Jira
18
- if ((fg('platform_editor_ai_in_document_streaming') || fg('editor-jira-undo-redo-show-diff-buttons')) && componentRegistry.has('trackChanges')) {
16
+ if (componentRegistry.has('trackChanges')) {
19
17
  configuration = toolbarConfigurationV3(shouldShowFindGroup);
20
18
  } else {
21
19
  configuration = toolbarConfiguration(shouldShowFindGroup);
@@ -13,9 +13,7 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
13
13
  configuration = toolbarConfigurationV2(true, shouldShowUndoRedoGroup);
14
14
  } else {
15
15
  var shouldShowFindGroup = !!contextualFormattingEnabled;
16
- // platform_editor_ai_in_document_streaming is the feature flag for Confluence
17
- // editor-jira-undo-redo-show-diff-buttons is the feature flag for Jira
18
- if ((fg('platform_editor_ai_in_document_streaming') || fg('editor-jira-undo-redo-show-diff-buttons')) && componentRegistry.has('trackChanges')) {
16
+ if (componentRegistry.has('trackChanges')) {
19
17
  configuration = toolbarConfigurationV3(shouldShowFindGroup);
20
18
  } else {
21
19
  configuration = toolbarConfiguration(shouldShowFindGroup);
@@ -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.4",
3
+ "version": "4.1.6",
4
4
  "description": "Primary toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,12 +37,12 @@
37
37
  "dependencies": {
38
38
  "@atlaskit/editor-prosemirror": "7.0.0",
39
39
  "@atlaskit/platform-feature-flags": "^1.1.0",
40
- "@atlaskit/tmp-editor-statsig": "^10.0.0",
40
+ "@atlaskit/tmp-editor-statsig": "^11.5.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "@emotion/react": "^11.7.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@atlaskit/editor-common": "^107.25.0",
45
+ "@atlaskit/editor-common": "^107.28.0",
46
46
  "react": "^18.2.0"
47
47
  },
48
48
  "techstack": {
@@ -81,13 +81,6 @@
81
81
  }
82
82
  },
83
83
  "platform-feature-flags": {
84
- "platform_editor_ai_in_document_streaming": {
85
- "type": "boolean",
86
- "referenceOnly": true
87
- },
88
- "editor-jira-undo-redo-show-diff-buttons": {
89
- "type": "boolean"
90
- },
91
84
  "platform_editor_undo_redo_find_on_primary_toolbar": {
92
85
  "type": "boolean"
93
86
  }