@atlaskit/editor-plugin-selection-toolbar 12.0.14 → 12.0.15

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,11 @@
1
1
  # @atlaskit/editor-plugin-selection-toolbar
2
2
 
3
+ ## 12.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 12.0.14
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-toolbar",
3
- "version": "12.0.14",
3
+ "version": "12.0.15",
4
4
  "description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/icon-lab": "^6.14.0",
46
46
  "@atlaskit/menu": "^8.5.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
48
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
49
49
  "@atlaskit/tokens": "^13.4.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "bind-event-listener": "^3.0.0"
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/selection-toolbar-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/selection-toolbar-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/selection-toolbar-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/selection-toolbar-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/selection-toolbar-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/selection-toolbar-plugin-type.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1 +0,0 @@
1
- export type { SelectionToolbarPlugin, SelectionToolbarPluginOptions, } from '../selectionToolbarPluginType';
@@ -1 +0,0 @@
1
- export { selectionToolbarPlugin } from '../selectionToolbarPlugin';
@@ -1 +0,0 @@
1
- export type { ToolbarDocking } from '../types/index';
@@ -1,3 +0,0 @@
1
- export { selectionToolbarPlugin } from './selectionToolbarPlugin';
2
- export type { SelectionToolbarPlugin, SelectionToolbarPluginOptions, } from './selectionToolbarPluginType';
3
- export type { ToolbarDocking } from './types';
@@ -1,14 +0,0 @@
1
- /**
2
- * These functions are currently not used. They were added to provide more control
3
- * of the toolbar in different products, i.e confluence comments and annotations.
4
- * Work to add the toolbar to more products has been paused at the time of writing.
5
- */
6
- import type { PopupPosition as Position } from '@atlaskit/editor-common/ui';
7
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- export declare const calculateToolbarPositionTrackHead: (toolbarTitle: string) => (editorView: EditorView, nextPos: Position) => Position;
9
- export type CoordsAtPos = {
10
- bottom: number;
11
- left: number;
12
- right: number;
13
- top: number;
14
- };
@@ -1,18 +0,0 @@
1
- import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { EditorCommand, UserPreferencesProvider } from '@atlaskit/editor-common/types';
3
- import type { ToolbarDocking } from '../types';
4
- export declare const toggleToolbar: ({ hide }: {
5
- hide: boolean;
6
- }) => EditorCommand;
7
- export declare const updateToolbarDocking: ({ toolbarDocking }: {
8
- toolbarDocking: ToolbarDocking;
9
- }) => EditorCommand;
10
- export declare const setToolbarDocking: ({ toolbarDocking, userPreferencesProvider, editorAnalyticsApi, }: {
11
- editorAnalyticsApi?: EditorAnalyticsAPI | undefined;
12
- toolbarDocking: ToolbarDocking;
13
- userPreferencesProvider?: UserPreferencesProvider;
14
- }) => EditorCommand;
15
- export declare const forceToolbarDockingWithoutAnalytics: ({ toolbarDocking, userPreferencesProvider, }: {
16
- toolbarDocking: ToolbarDocking;
17
- userPreferencesProvider?: UserPreferencesProvider;
18
- }) => EditorCommand;
@@ -1,2 +0,0 @@
1
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
2
- export declare const selectionToolbarPluginKey: PluginKey;
@@ -1,2 +0,0 @@
1
- import type { SelectionToolbarPlugin } from './selectionToolbarPluginType';
2
- export declare const selectionToolbarPlugin: SelectionToolbarPlugin;
@@ -1,67 +0,0 @@
1
- import type { NextEditorPlugin, OptionalPlugin, UserPreferencesProvider } from '@atlaskit/editor-common/types';
2
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
- import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
4
- import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
5
- import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
6
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
7
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
8
- import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
9
- import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
10
- import type { ToolbarDocking } from './types';
11
- export type SelectionToolbarPluginOptions = {
12
- /**
13
- * Whether to enable floating toolbar for text selection.
14
- *
15
- * Warning: This option will be deprecated in the future, and instead will rely on options passed to `toolbarPlugin` which
16
- * allows more control over toolbar placement.
17
- */
18
- contextualFormattingEnabled?: boolean;
19
- /**
20
- * When true, hides the pin/unpin option from the toolbar menu.
21
- * Use this in contexts where toolbar docking should be permanently fixed
22
- * @defaults false
23
- */
24
- disablePin?: boolean;
25
- /** @defaults false */
26
- preferenceToolbarAboveSelection?: boolean;
27
- userPreferencesProvider?: UserPreferencesProvider;
28
- };
29
- export type SelectionToolbarPlugin = NextEditorPlugin<'selectionToolbar', {
30
- actions?: {
31
- /**
32
- * Clears the toolbar docking override and reverts to the current preference/state value.
33
- */
34
- clearToolbarDockingOverride?: () => boolean;
35
- forceToolbarDockingWithoutAnalytics?: (toolbarDocking: ToolbarDocking) => boolean;
36
- /**
37
- * Temporarily overrides the toolbar docking position without persisting to user preferences.
38
- */
39
- overrideToolbarDocking?: (toolbarDocking: ToolbarDocking) => boolean;
40
- /**
41
- * @private
42
- * @deprecated not in use
43
- */
44
- refreshToolbarDocking?: () => boolean;
45
- /**
46
- * @private
47
- * @deprecated use userPreference API to set toolbar docking instead
48
- */
49
- setToolbarDocking?: (toolbarDocking: ToolbarDocking) => boolean;
50
- suppressToolbar?: () => boolean;
51
- unsuppressToolbar?: () => boolean;
52
- };
53
- dependencies: [
54
- OptionalPlugin<EditorViewModePlugin>,
55
- OptionalPlugin<PrimaryToolbarPlugin>,
56
- OptionalPlugin<AnalyticsPlugin>,
57
- OptionalPlugin<BlockControlsPlugin>,
58
- OptionalPlugin<ConnectivityPlugin>,
59
- OptionalPlugin<UserPreferencesPlugin>,
60
- OptionalPlugin<ToolbarPlugin>,
61
- OptionalPlugin<UserIntentPlugin>
62
- ];
63
- pluginConfiguration: SelectionToolbarPluginOptions;
64
- sharedState: {
65
- toolbarDocking: ToolbarDocking;
66
- };
67
- }>;
@@ -1,8 +0,0 @@
1
- import type { UserPreferences } from '@atlaskit/editor-common/types';
2
- export type SelectionToolbarPluginOptions = {
3
- /**
4
- * When set to true, placing the toolbar above the selection will be preferenced.
5
- */
6
- preferenceToolbarAboveSelection?: boolean;
7
- };
8
- export type ToolbarDocking = NonNullable<UserPreferences['toolbarDockingInitialPosition']>;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
- type MenuSectionProps = {
5
- api: ExtractInjectionAPI<SelectionToolbarPlugin> | undefined;
6
- children: React.ReactNode;
7
- };
8
- export declare const MenuSection: ({ children, api }: MenuSectionProps) => React.JSX.Element | null;
9
- export {};
@@ -1,6 +0,0 @@
1
- import type { ExtractInjectionAPI, UserPreferencesProvider } from '@atlaskit/editor-common/types';
2
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
3
- export declare const PageVisibilityWatcher: ({ api, userPreferencesProvider, }: {
4
- api: ExtractInjectionAPI<SelectionToolbarPlugin> | undefined;
5
- userPreferencesProvider?: UserPreferencesProvider;
6
- }) => null;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
- export declare const PinButton: ({ api, }: {
5
- api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
6
- }) => React.JSX.Element | null;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
- type PinMenuItemProps = {
5
- api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
6
- disablePin?: boolean;
7
- };
8
- /**
9
- * The menu-item version of pin only appears in selection toolbar - the primary toolbar will have its own component
10
- */
11
- export declare const PinMenuItem: ({ api, disablePin }: PinMenuItemProps) => React.JSX.Element | null;
12
- export {};
@@ -1,12 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
3
- type PrimaryToolbarComponentProps = {
4
- api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
5
- disabled?: boolean;
6
- };
7
- /**
8
- * A component used to renderer a pin/unpin
9
- * button to the toolbar to the or make it in-line.
10
- */
11
- export declare const PrimaryToolbarComponent: ({ api, disabled, }: PrimaryToolbarComponentProps) => JSX.Element;
12
- export {};
@@ -1,18 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- * @jsxFrag
5
- */
6
- import type { IntlShape } from 'react-intl';
7
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
- import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
9
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
10
- type OverflowToobarConfigOptions = {
11
- api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
12
- intl: IntlShape;
13
- toolbarDocking?: 'top' | 'none';
14
- };
15
- export declare const getOverflowPrimaryToolbarConfig: ({ api, intl, }: OverflowToobarConfigOptions) => {
16
- items: MenuItem[];
17
- }[];
18
- export {};
@@ -1,11 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { Command, FloatingToolbarItem } from '@atlaskit/editor-common/types';
4
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
5
- type PinToobarConfig = {
6
- api?: ExtractInjectionAPI<SelectionToolbarPlugin>;
7
- intl: IntlShape;
8
- toolbarDocking?: 'top' | 'none';
9
- };
10
- export declare const getPinOptionToolbarConfig: ({ api, toolbarDocking, intl, }: PinToobarConfig) => FloatingToolbarItem<Command>[];
11
- export {};
@@ -1,4 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
- import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
4
- export declare const getToolbarComponents: (api?: ExtractInjectionAPI<SelectionToolbarPlugin>, contextualFormattingEnabled?: boolean, disablePin?: boolean) => RegisterComponent[];