@atlaskit/editor-plugin-floating-toolbar 8.2.0 → 8.2.1

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,13 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 8.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5292689cffab1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5292689cffab1) -
8
+ fix/ignore minor eslint issues ahead of bug fix for confirming the removal of tables
9
+ - Updated dependencies
10
+
3
11
  ## 8.2.0
4
12
 
5
13
  ### Minor Changes
@@ -209,6 +209,24 @@ var floatingToolbarPlugin = exports.floatingToolbarPlugin = function floatingToo
209
209
  }
210
210
  };
211
211
  };
212
+
213
+ /**
214
+ * React component that renders the floating toolbar UI for the editor.
215
+ *
216
+ * This component manages the display of floating toolbars based on the current editor state,
217
+ * selection, and configuration. It handles visibility conditions, positioning, toolbar items
218
+ * consolidation, and confirmation dialogs.
219
+ *
220
+ * @param props - Component properties
221
+ * @param props.pluginInjectionApi - Plugin injection API for accessing other plugin states
222
+ * @param props.editorView - ProseMirror EditorView instance
223
+ * @param props.popupsMountPoint - DOM element where popups should be mounted
224
+ * @param props.popupsBoundariesElement - Element that defines popup boundaries
225
+ * @param props.popupsScrollableElement - Scrollable container element for popups
226
+ * @param props.providerFactory - Factory for creating various providers
227
+ * @param props.dispatchAnalyticsEvent - Function to dispatch analytics events
228
+ * @returns JSX element representing the floating toolbar or null if not visible
229
+ */
212
230
  function ContentComponent(_ref5) {
213
231
  var _configWithNodeInfo$c, _configWithNodeInfo$c2, _items, _pluginInjectionApi$c, _pluginInjectionApi$d;
214
232
  var pluginInjectionApi = _ref5.pluginInjectionApi,
@@ -489,6 +507,20 @@ function sanitizeFloatingToolbarConfig(config) {
489
507
  }
490
508
  return config;
491
509
  }
510
+
511
+ /**
512
+ * Creates a floating toolbar plugin for the ProseMirror editor.
513
+ *
514
+ * This factory function creates a SafePlugin that manages floating toolbars in the editor.
515
+ * It processes an array of floating toolbar handlers and determines which toolbar configuration
516
+ * should be active based on the current editor state and selection.
517
+ *
518
+ * @param options - Configuration object for the floating toolbar plugin
519
+ * @param options.floatingToolbarHandlers - Array of handlers that return toolbar configurations
520
+ * @param options.getIntl - Function that returns the IntlShape instance for internationalization
521
+ * @param options.providerFactory - Factory for creating various providers used by the editor
522
+ * @returns A SafePlugin instance that manages floating toolbar state and behavior
523
+ */
492
524
  function floatingToolbarPluginFactory(options) {
493
525
  var floatingToolbarHandlers = options.floatingToolbarHandlers,
494
526
  providerFactory = options.providerFactory,
@@ -43,6 +43,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
43
43
  * @jsxRuntime classic
44
44
  * @jsx jsx
45
45
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
46
+ // eslint-disable-next-line jsdoc/require-jsdoc
46
47
  function groupItems(items, areAnyNewToolbarFlagsEnabled) {
47
48
  var groupItems = items.reduce(function (accumulator, item, i) {
48
49
  var finalOutput = accumulator.finalOutput,
@@ -195,6 +195,24 @@ export const floatingToolbarPlugin = ({
195
195
  }
196
196
  };
197
197
  };
198
+
199
+ /**
200
+ * React component that renders the floating toolbar UI for the editor.
201
+ *
202
+ * This component manages the display of floating toolbars based on the current editor state,
203
+ * selection, and configuration. It handles visibility conditions, positioning, toolbar items
204
+ * consolidation, and confirmation dialogs.
205
+ *
206
+ * @param props - Component properties
207
+ * @param props.pluginInjectionApi - Plugin injection API for accessing other plugin states
208
+ * @param props.editorView - ProseMirror EditorView instance
209
+ * @param props.popupsMountPoint - DOM element where popups should be mounted
210
+ * @param props.popupsBoundariesElement - Element that defines popup boundaries
211
+ * @param props.popupsScrollableElement - Scrollable container element for popups
212
+ * @param props.providerFactory - Factory for creating various providers
213
+ * @param props.dispatchAnalyticsEvent - Function to dispatch analytics events
214
+ * @returns JSX element representing the floating toolbar or null if not visible
215
+ */
198
216
  export function ContentComponent({
199
217
  pluginInjectionApi,
200
218
  editorView,
@@ -472,6 +490,20 @@ function sanitizeFloatingToolbarConfig(config) {
472
490
  }
473
491
  return config;
474
492
  }
493
+
494
+ /**
495
+ * Creates a floating toolbar plugin for the ProseMirror editor.
496
+ *
497
+ * This factory function creates a SafePlugin that manages floating toolbars in the editor.
498
+ * It processes an array of floating toolbar handlers and determines which toolbar configuration
499
+ * should be active based on the current editor state and selection.
500
+ *
501
+ * @param options - Configuration object for the floating toolbar plugin
502
+ * @param options.floatingToolbarHandlers - Array of handlers that return toolbar configurations
503
+ * @param options.getIntl - Function that returns the IntlShape instance for internationalization
504
+ * @param options.providerFactory - Factory for creating various providers used by the editor
505
+ * @returns A SafePlugin instance that manages floating toolbar state and behavior
506
+ */
475
507
  export function floatingToolbarPluginFactory(options) {
476
508
  const {
477
509
  floatingToolbarHandlers,
@@ -30,6 +30,7 @@ import { Input } from './Input';
30
30
  import { ScrollButton } from './ScrollButton';
31
31
  import { ScrollButtons } from './ScrollButtons';
32
32
  import Select from './Select';
33
+ // eslint-disable-next-line jsdoc/require-jsdoc
33
34
  export function groupItems(items, areAnyNewToolbarFlagsEnabled) {
34
35
  const groupItems = items.reduce((accumulator, item, i) => {
35
36
  const {
@@ -200,6 +200,24 @@ export var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
200
200
  }
201
201
  };
202
202
  };
203
+
204
+ /**
205
+ * React component that renders the floating toolbar UI for the editor.
206
+ *
207
+ * This component manages the display of floating toolbars based on the current editor state,
208
+ * selection, and configuration. It handles visibility conditions, positioning, toolbar items
209
+ * consolidation, and confirmation dialogs.
210
+ *
211
+ * @param props - Component properties
212
+ * @param props.pluginInjectionApi - Plugin injection API for accessing other plugin states
213
+ * @param props.editorView - ProseMirror EditorView instance
214
+ * @param props.popupsMountPoint - DOM element where popups should be mounted
215
+ * @param props.popupsBoundariesElement - Element that defines popup boundaries
216
+ * @param props.popupsScrollableElement - Scrollable container element for popups
217
+ * @param props.providerFactory - Factory for creating various providers
218
+ * @param props.dispatchAnalyticsEvent - Function to dispatch analytics events
219
+ * @returns JSX element representing the floating toolbar or null if not visible
220
+ */
203
221
  export function ContentComponent(_ref5) {
204
222
  var _configWithNodeInfo$c, _configWithNodeInfo$c2, _items, _pluginInjectionApi$c, _pluginInjectionApi$d;
205
223
  var pluginInjectionApi = _ref5.pluginInjectionApi,
@@ -480,6 +498,20 @@ function sanitizeFloatingToolbarConfig(config) {
480
498
  }
481
499
  return config;
482
500
  }
501
+
502
+ /**
503
+ * Creates a floating toolbar plugin for the ProseMirror editor.
504
+ *
505
+ * This factory function creates a SafePlugin that manages floating toolbars in the editor.
506
+ * It processes an array of floating toolbar handlers and determines which toolbar configuration
507
+ * should be active based on the current editor state and selection.
508
+ *
509
+ * @param options - Configuration object for the floating toolbar plugin
510
+ * @param options.floatingToolbarHandlers - Array of handlers that return toolbar configurations
511
+ * @param options.getIntl - Function that returns the IntlShape instance for internationalization
512
+ * @param options.providerFactory - Factory for creating various providers used by the editor
513
+ * @returns A SafePlugin instance that manages floating toolbar state and behavior
514
+ */
483
515
  export function floatingToolbarPluginFactory(options) {
484
516
  var floatingToolbarHandlers = options.floatingToolbarHandlers,
485
517
  providerFactory = options.providerFactory,
@@ -37,6 +37,7 @@ import { Input } from './Input';
37
37
  import { ScrollButton } from './ScrollButton';
38
38
  import { ScrollButtons } from './ScrollButtons';
39
39
  import Select from './Select';
40
+ // eslint-disable-next-line jsdoc/require-jsdoc
40
41
  export function groupItems(items, areAnyNewToolbarFlagsEnabled) {
41
42
  var groupItems = items.reduce(function (accumulator, item, i) {
42
43
  var finalOutput = accumulator.finalOutput,
@@ -9,6 +9,23 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { ConfigWithNodeInfo, FloatingToolbarPlugin, FloatingToolbarPluginState } from './floatingToolbarPluginType';
10
10
  export declare const getRelevantConfig: (selection: Selection, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
11
11
  export declare const floatingToolbarPlugin: FloatingToolbarPlugin;
12
+ /**
13
+ * React component that renders the floating toolbar UI for the editor.
14
+ *
15
+ * This component manages the display of floating toolbars based on the current editor state,
16
+ * selection, and configuration. It handles visibility conditions, positioning, toolbar items
17
+ * consolidation, and confirmation dialogs.
18
+ *
19
+ * @param props - Component properties
20
+ * @param props.pluginInjectionApi - Plugin injection API for accessing other plugin states
21
+ * @param props.editorView - ProseMirror EditorView instance
22
+ * @param props.popupsMountPoint - DOM element where popups should be mounted
23
+ * @param props.popupsBoundariesElement - Element that defines popup boundaries
24
+ * @param props.popupsScrollableElement - Scrollable container element for popups
25
+ * @param props.providerFactory - Factory for creating various providers
26
+ * @param props.dispatchAnalyticsEvent - Function to dispatch analytics events
27
+ * @returns JSX element representing the floating toolbar or null if not visible
28
+ */
12
29
  export declare function ContentComponent({ pluginInjectionApi, editorView, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, providerFactory, dispatchAnalyticsEvent, }: Pick<UiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'providerFactory' | 'dispatchAnalyticsEvent' | 'popupsScrollableElement'> & {
13
30
  pluginInjectionApi: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
14
31
  } & {
@@ -20,6 +37,19 @@ export declare function ContentComponent({ pluginInjectionApi, editorView, popup
20
37
  *
21
38
  */
22
39
  export declare const pluginKey: PluginKey<FloatingToolbarPluginState>;
40
+ /**
41
+ * Creates a floating toolbar plugin for the ProseMirror editor.
42
+ *
43
+ * This factory function creates a SafePlugin that manages floating toolbars in the editor.
44
+ * It processes an array of floating toolbar handlers and determines which toolbar configuration
45
+ * should be active based on the current editor state and selection.
46
+ *
47
+ * @param options - Configuration object for the floating toolbar plugin
48
+ * @param options.floatingToolbarHandlers - Array of handlers that return toolbar configurations
49
+ * @param options.getIntl - Function that returns the IntlShape instance for internationalization
50
+ * @param options.providerFactory - Factory for creating various providers used by the editor
51
+ * @returns A SafePlugin instance that manages floating toolbar state and behavior
52
+ */
23
53
  export declare function floatingToolbarPluginFactory(options: {
24
54
  floatingToolbarHandlers: Array<FloatingToolbarHandler>;
25
55
  getIntl: () => IntlShape;
@@ -9,6 +9,23 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
9
  import type { ConfigWithNodeInfo, FloatingToolbarPlugin, FloatingToolbarPluginState } from './floatingToolbarPluginType';
10
10
  export declare const getRelevantConfig: (selection: Selection, configs: Array<FloatingToolbarConfig>) => ConfigWithNodeInfo | undefined;
11
11
  export declare const floatingToolbarPlugin: FloatingToolbarPlugin;
12
+ /**
13
+ * React component that renders the floating toolbar UI for the editor.
14
+ *
15
+ * This component manages the display of floating toolbars based on the current editor state,
16
+ * selection, and configuration. It handles visibility conditions, positioning, toolbar items
17
+ * consolidation, and confirmation dialogs.
18
+ *
19
+ * @param props - Component properties
20
+ * @param props.pluginInjectionApi - Plugin injection API for accessing other plugin states
21
+ * @param props.editorView - ProseMirror EditorView instance
22
+ * @param props.popupsMountPoint - DOM element where popups should be mounted
23
+ * @param props.popupsBoundariesElement - Element that defines popup boundaries
24
+ * @param props.popupsScrollableElement - Scrollable container element for popups
25
+ * @param props.providerFactory - Factory for creating various providers
26
+ * @param props.dispatchAnalyticsEvent - Function to dispatch analytics events
27
+ * @returns JSX element representing the floating toolbar or null if not visible
28
+ */
12
29
  export declare function ContentComponent({ pluginInjectionApi, editorView, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, providerFactory, dispatchAnalyticsEvent, }: Pick<UiComponentFactoryParams, 'editorView' | 'popupsMountPoint' | 'popupsBoundariesElement' | 'providerFactory' | 'dispatchAnalyticsEvent' | 'popupsScrollableElement'> & {
13
30
  pluginInjectionApi: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
14
31
  } & {
@@ -20,6 +37,19 @@ export declare function ContentComponent({ pluginInjectionApi, editorView, popup
20
37
  *
21
38
  */
22
39
  export declare const pluginKey: PluginKey<FloatingToolbarPluginState>;
40
+ /**
41
+ * Creates a floating toolbar plugin for the ProseMirror editor.
42
+ *
43
+ * This factory function creates a SafePlugin that manages floating toolbars in the editor.
44
+ * It processes an array of floating toolbar handlers and determines which toolbar configuration
45
+ * should be active based on the current editor state and selection.
46
+ *
47
+ * @param options - Configuration object for the floating toolbar plugin
48
+ * @param options.floatingToolbarHandlers - Array of handlers that return toolbar configurations
49
+ * @param options.getIntl - Function that returns the IntlShape instance for internationalization
50
+ * @param options.providerFactory - Factory for creating various providers used by the editor
51
+ * @returns A SafePlugin instance that manages floating toolbar state and behavior
52
+ */
23
53
  export declare function floatingToolbarPluginFactory(options: {
24
54
  floatingToolbarHandlers: Array<FloatingToolbarHandler>;
25
55
  getIntl: () => IntlShape;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",