@atlaskit/editor-plugin-toolbar 23.0.4 → 23.0.5
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 +6 -0
- package/dist/cjs/pm-plugins/experiences/selection-toolbar-open-experience.js +9 -5
- package/dist/cjs/toolbarPlugin.js +2 -2
- package/dist/cjs/ui/OverflowMenu.js +8 -6
- package/dist/cjs/ui/OverflowMenuSection.js +4 -4
- package/dist/cjs/ui/OverflowSection.js +4 -4
- package/dist/cjs/ui/PrimaryToolbar.js +4 -4
- package/dist/cjs/ui/Section.js +10 -9
- package/dist/cjs/ui/SelectionToolbar/index.js +35 -29
- package/dist/cjs/ui/SelectionToolbar/keyboard-config.js +7 -7
- package/dist/cjs/ui/SelectionToolbar/utils.js +7 -7
- package/dist/cjs/ui/TextCollapsedMenu.js +9 -7
- package/dist/cjs/ui/toolbar-components.js +85 -83
- package/dist/es2019/pm-plugins/experiences/selection-toolbar-open-experience.js +6 -2
- package/dist/es2019/toolbarPlugin.js +1 -1
- package/dist/es2019/ui/OverflowMenu.js +4 -2
- package/dist/es2019/ui/OverflowMenuSection.js +2 -2
- package/dist/es2019/ui/OverflowSection.js +2 -2
- package/dist/es2019/ui/PrimaryToolbar.js +2 -2
- package/dist/es2019/ui/Section.js +4 -3
- package/dist/es2019/ui/SelectionToolbar/index.js +16 -11
- package/dist/es2019/ui/SelectionToolbar/keyboard-config.js +3 -3
- package/dist/es2019/ui/SelectionToolbar/utils.js +2 -2
- package/dist/es2019/ui/TextCollapsedMenu.js +4 -2
- package/dist/es2019/ui/toolbar-components.js +5 -3
- package/dist/esm/pm-plugins/experiences/selection-toolbar-open-experience.js +6 -2
- package/dist/esm/toolbarPlugin.js +1 -1
- package/dist/esm/ui/OverflowMenu.js +4 -2
- package/dist/esm/ui/OverflowMenuSection.js +2 -2
- package/dist/esm/ui/OverflowSection.js +2 -2
- package/dist/esm/ui/PrimaryToolbar.js +2 -2
- package/dist/esm/ui/Section.js +4 -3
- package/dist/esm/ui/SelectionToolbar/index.js +16 -11
- package/dist/esm/ui/SelectionToolbar/keyboard-config.js +3 -3
- package/dist/esm/ui/SelectionToolbar/utils.js +2 -2
- package/dist/esm/ui/TextCollapsedMenu.js +4 -2
- package/dist/esm/ui/toolbar-components.js +5 -3
- package/dist/types/pm-plugins/experiences/selection-toolbar-open-experience.d.ts +1 -1
- package/dist/types/toolbarPluginType.d.ts +11 -10
- package/dist/types/types/index.d.ts +3 -3
- package/dist/types/ui/OverflowSection.d.ts +1 -1
- package/dist/types/ui/PrimaryToolbar.d.ts +1 -1
- package/dist/types/ui/Section.d.ts +2 -2
- package/dist/types/ui/SelectionToolbar/index.d.ts +1 -1
- package/dist/types/ui/SelectionToolbar/keyboard-config.d.ts +2 -2
- package/dist/types/ui/SelectionToolbar/utils.d.ts +1 -1
- package/dist/types/ui/toolbar-components.d.ts +4 -4
- package/docs/0-intro.tsx +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, CONTENT_COMPONENT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, CONTENT_COMPONENT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { logException } from '@atlaskit/editor-common/monitoring/error';
|
|
3
3
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
4
4
|
export var getDomRefFromSelection = function getDomRefFromSelection(view, dispatchAnalyticsEvent) {
|
|
5
5
|
try {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
|
4
|
-
import {
|
|
3
|
+
import { toolbarMessages } from '@atlaskit/editor-common/messages/toolbar';
|
|
4
|
+
import { TextIcon } from '@atlaskit/editor-toolbar/text-icon';
|
|
5
|
+
import { ToolbarDropdownMenu } from '@atlaskit/editor-toolbar/toolbar-dropdown-menu';
|
|
6
|
+
import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
|
|
5
7
|
/**
|
|
6
8
|
* Basic version of existing 'Text Styles' Menu - which doesn't dynamically change icon
|
|
7
9
|
* and is also placeholder to render all other menus in the collapsed state.
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR,
|
|
5
|
-
import {
|
|
3
|
+
import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
4
|
+
import { INSERT_BLOCK_SECTION, LINKING_SECTION, OVERFLOW_GROUP, OVERFLOW_GROUP_PRIMARY_TOOLBAR, OVERFLOW_MENU, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_SECTION, OVERFLOW_SECTION_PRIMARY_TOOLBAR, PIN_SECTION, TEXT_COLLAPSED_GROUP, TEXT_SECTION, TEXT_SECTION_PRIMARY_TOOLBAR, TEXT_SECTION_COLLAPSED, TEXT_COLLAPSED_MENU, TOOLBARS, TRACK_CHANGES_SECTION, OVERFLOW_EXTENSIONS_MENU_SECTION } from '@atlaskit/editor-common/toolbar/keys';
|
|
5
|
+
import { OVERFLOW_GROUP_PRIMARY_TOOLBAR_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_SECTION_PRIMARY_TOOLBAR_RANK, OVERFLOW_SECTION_RANK, TOOLBAR_RANK, OVERFLOW_MENU_RANK } from '@atlaskit/editor-common/toolbar/rank';
|
|
6
|
+
import { Show } from '@atlaskit/editor-toolbar/show';
|
|
7
|
+
import { Toolbar } from '@atlaskit/editor-toolbar/toolbar';
|
|
6
8
|
import { SELECTION_TOOLBAR_LABEL } from './consts';
|
|
7
9
|
import { OverflowMenu } from './OverflowMenu';
|
|
8
10
|
import { OverflowMenuSection } from './OverflowMenuSection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { UserIntent } from '@atlaskit/editor-plugin-user-intent/types';
|
|
4
4
|
type SelectionToolbarOpenExperienceOptions = {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar';
|
|
2
|
-
import type { EditorCommand
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
1
|
+
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar/types';
|
|
2
|
+
import type { EditorCommand } from '@atlaskit/editor-common/types/editor-command';
|
|
3
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
4
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
|
|
5
|
+
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity/connectivityPluginType';
|
|
6
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
|
|
7
|
+
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection/selection-plugin-type';
|
|
8
|
+
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent/user-intent-plugin-type';
|
|
9
|
+
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences/user-preferences-plugin-type';
|
|
9
10
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
11
|
+
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model/types';
|
|
12
|
+
import type { BreakpointPreset } from '@atlaskit/editor-toolbar/responsive-container';
|
|
12
13
|
import type { RegisterComponentsAction, ToolbarPluginOptions } from './types';
|
|
13
14
|
export type EditorToolbarPluginState = {
|
|
14
15
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar/types';
|
|
2
|
+
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model/types';
|
|
3
|
+
import type { BreakpointPreset } from '@atlaskit/editor-toolbar/responsive-container';
|
|
4
4
|
export type ToolbarPluginOptions = {
|
|
5
5
|
/**
|
|
6
6
|
* Option to set the breakpoint preset for the toolbar.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SeparatorPosition } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import type { SeparatorPosition } from '@atlaskit/editor-toolbar/toolbar-section';
|
|
3
3
|
export declare const OverflowSection: ({ children, hasSeparator, testId, }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
hasSeparator?: boolean | SeparatorPosition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { BreakpointPreset } from '@atlaskit/editor-toolbar';
|
|
2
|
+
import type { BreakpointPreset } from '@atlaskit/editor-toolbar/responsive-container';
|
|
3
3
|
type PrimaryToolbarProps = {
|
|
4
4
|
breakpointPreset?: BreakpointPreset;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model/types';
|
|
4
4
|
import type { ToolbarPlugin } from '../toolbarPluginType';
|
|
5
5
|
type SectionProps = {
|
|
6
6
|
api?: ExtractInjectionAPI<ToolbarPlugin>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { ToolbarPlugin } from '../../toolbarPluginType';
|
|
5
5
|
type SelectionToolbarProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ToolbarKeyboardNavigationProviderConfig } from '@atlaskit/editor-toolbar';
|
|
4
|
+
import type { ToolbarKeyboardNavigationProviderConfig } from '@atlaskit/editor-toolbar/types';
|
|
5
5
|
import type { ToolbarPlugin } from '../../toolbarPluginType';
|
|
6
6
|
export declare const getKeyboardNavigationConfig: (editorView: EditorView, intl: IntlShape, api?: ExtractInjectionAPI<ToolbarPlugin>) => ToolbarKeyboardNavigationProviderConfig | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
|
|
2
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export declare const getDomRefFromSelection: (view: EditorView, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => HTMLElement | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
1
|
+
import type { ContextualFormattingEnabledOptions } from '@atlaskit/editor-common/toolbar/types';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model/types';
|
|
4
|
+
import type { BreakpointPreset } from '@atlaskit/editor-toolbar/responsive-container';
|
|
5
5
|
import type { ToolbarPlugin } from '../toolbarPluginType';
|
|
6
6
|
export declare const getToolbarComponents: (contextualFormattingEnabled: ContextualFormattingEnabledOptions, api?: ExtractInjectionAPI<ToolbarPlugin>, breakpointPreset?: BreakpointPreset) => RegisterComponent[];
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { AtlassianInternalWarning, code, md } from '@atlaskit/docs';
|
|
4
|
-
import { createEditorUseOnlyNotice } from '@atlaskit/editor-common/doc-utils';
|
|
4
|
+
import { createEditorUseOnlyNotice } from '@atlaskit/editor-common/doc-utils/editor-use-only';
|
|
5
5
|
import { token } from '@atlaskit/tokens';
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- md template from @atlaskit/docs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.5",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
33
33
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
34
34
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
35
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
35
|
+
"@atlaskit/tmp-editor-statsig": "^232.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"bind-event-listener": "^3.0.0"
|
|
38
38
|
},
|