@atlaskit/editor-plugin-toolbar 5.1.22 → 5.1.24

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,19 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 5.1.24
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9ff7d1c1aa288`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ff7d1c1aa288) -
8
+ Update README.md and 0-intro.tsx
9
+ - Updated dependencies
10
+
11
+ ## 5.1.23
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 5.1.22
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -1 +1,44 @@
1
- # Editor plugin toolbar
1
+ # Editor Plugin Toolbar
2
+
3
+ Toolbar plugin for @atlaskit/editor-core
4
+
5
+ **Note:** This component is designed for internal Atlassian development.
6
+ External contributors will be able to use this component but will not be able to submit issues.
7
+
8
+ ## Overview
9
+
10
+ The Toolbar plugin provides a comprehensive toolbar interface for the Atlassian Editor. It manages both primary (top) and contextual (inline) toolbars, enabling flexible formatting control options. The plugin integrates with various editor plugins to provide contextual formatting capabilities and supports customizable toolbar layouts based on viewport size.
11
+
12
+ ## Key features
13
+
14
+ - **Primary toolbar** - Always-visible toolbar mounted at the top of the editor
15
+ - **Inline text toolbar** - Optional floating toolbar that appears near selected text for quick formatting
16
+ - **Flexible toolbar modes** - Configure formatting toolbar placement with `always-inline`, `always-pinned`, or `controlled` modes
17
+ - **Component registration** - Register custom toolbar components dynamically
18
+ - **Responsive design** - Support for breakpoint presets to adapt toolbar layout to different viewport sizes
19
+ - **Selection tracking** - Track selected nodes and formatting state for contextual toolbar updates
20
+
21
+ ## Install
22
+ ---
23
+ - **Install** - *yarn add @atlaskit/editor-plugin-toolbar*
24
+ - **npm** - [@atlaskit/editor-plugin-toolbar](https://www.npmjs.com/package/@atlaskit/editor-plugin-toolbar)
25
+ - **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-toolbar)
26
+ - **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-toolbar/dist/)
27
+
28
+ ## Usage
29
+ ---
30
+ **Internal use only**
31
+
32
+ @atlaskit/editor-plugin-toolbar is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
33
+
34
+ Direct use of this component is not supported.
35
+
36
+ Please see [Atlaskit - Editor plugin toolbar](https://atlaskit.atlassian.com/packages/editor/editor-plugin-toolbar) for documentation and examples for this package.
37
+
38
+ ## Support
39
+ ---
40
+ For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
41
+
42
+ ## License
43
+ ---
44
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
package/docs/0-intro.tsx CHANGED
@@ -31,7 +31,37 @@ The \`dependencies\`, \`configuration\`, \`state\`, \`actions\`, and \`commands\
31
31
  below:
32
32
 
33
33
  ${code`
34
- type ToolbarPlugin = NextEditorPlugin<'toolbar'>
34
+ type EditorToolbarPluginState = {
35
+ selectedNode?: {
36
+ marks: string[];
37
+ node: PMNode;
38
+ nodeType: string;
39
+ pos: number;
40
+ };
41
+ shouldShowToolbar: boolean;
42
+ };
43
+
44
+ type ToolbarPlugin = NextEditorPlugin<
45
+ 'toolbar',
46
+ {
47
+ actions: {
48
+ contextualFormattingMode: () => ContextualFormattingEnabledOptions;
49
+ getBreakpointPreset: () => BreakpointPreset | undefined;
50
+ getComponents: () => Array<RegisterComponent>;
51
+ registerComponents: RegisterComponentsAction;
52
+ };
53
+ dependencies: [
54
+ OptionalPlugin<UserIntentPlugin>,
55
+ OptionalPlugin<SelectionPlugin>,
56
+ OptionalPlugin<UserPreferencesPlugin>,
57
+ OptionalPlugin<EditorViewModePlugin>,
58
+ OptionalPlugin<ConnectivityPlugin>,
59
+ OptionalPlugin<AnalyticsPlugin>,
60
+ ];
61
+ pluginConfiguration?: ToolbarPluginOptions;
62
+ sharedState: EditorToolbarPluginState;
63
+ }
64
+ >;
35
65
  `}
36
66
 
37
67
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "5.1.22",
3
+ "version": "5.1.24",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,13 +40,13 @@
40
40
  "@atlaskit/editor-toolbar": "^0.20.0",
41
41
  "@atlaskit/editor-toolbar-model": "^0.4.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
- "@atlaskit/tmp-editor-statsig": "^56.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^58.0.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "bind-event-listener": "^3.0.0",
46
46
  "react-intl-next": "npm:react-intl@^5.18.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@atlaskit/editor-common": "^112.18.0",
49
+ "@atlaskit/editor-common": "^112.19.0",
50
50
  "react": "^18.2.0"
51
51
  },
52
52
  "platform-feature-flags": {