@atlaskit/editor-plugin-text-formatting 3.0.25 → 3.0.27
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 +17 -0
- package/dist/cjs/ui/FloatingToolbarComponent.js +27 -105
- package/dist/cjs/ui/PrimaryToolbarComponent.js +30 -109
- package/dist/cjs/ui/Toolbar/components/Component.js +13 -1
- package/dist/cjs/ui/toolbar-components.js +12 -2
- package/dist/es2019/ui/FloatingToolbarComponent.js +28 -108
- package/dist/es2019/ui/PrimaryToolbarComponent.js +31 -111
- package/dist/es2019/ui/Toolbar/components/Component.js +13 -2
- package/dist/es2019/ui/toolbar-components.js +14 -4
- package/dist/esm/ui/FloatingToolbarComponent.js +28 -106
- package/dist/esm/ui/PrimaryToolbarComponent.js +30 -108
- package/dist/esm/ui/Toolbar/components/Component.js +14 -2
- package/dist/esm/ui/toolbar-components.js +14 -4
- package/dist/types/ui/PrimaryToolbarComponent.d.ts +2 -2
- package/dist/types/ui/Toolbar/components/Component.d.ts +6 -0
- package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/components/Component.d.ts +6 -0
- package/package.json +5 -5
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_SECTION, TEXT_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
4
|
+
import { CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_SECTION, TEXT_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLLAPSED_MENU_RANK, TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar';
|
|
5
5
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
6
|
-
import {
|
|
6
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
+
import { FormatMenuItem, FormatButton, ClearFormatMenuItem, MoreFormattingMenu, MenuSection } from './Toolbar/components/Component';
|
|
7
8
|
import { formatOptions } from './Toolbar/components/utils';
|
|
8
9
|
import { FormatOptions } from './Toolbar/types';
|
|
9
10
|
var getFormatMenuItems = function getFormatMenuItems(api) {
|
|
@@ -93,7 +94,12 @@ export var getToolbarComponents = function getToolbarComponents(api) {
|
|
|
93
94
|
type: TEXT_FORMATTING_MENU.type,
|
|
94
95
|
key: TEXT_FORMATTING_MENU.key,
|
|
95
96
|
rank: TEXT_FORMAT_MENU_RANK[TEXT_FORMATTING_MENU_SECTION.key]
|
|
96
|
-
}]
|
|
97
|
+
}].concat(_toConsumableArray(expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? [{
|
|
98
|
+
type: TEXT_COLLAPSED_MENU.type,
|
|
99
|
+
key: TEXT_COLLAPSED_MENU.key,
|
|
100
|
+
rank: TEXT_COLLAPSED_MENU_RANK[TEXT_FORMATTING_MENU_SECTION.key]
|
|
101
|
+
}] : [])),
|
|
102
|
+
component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? MenuSection : undefined
|
|
97
103
|
}].concat(_toConsumableArray(getFormatMenuItems(api)), [{
|
|
98
104
|
type: CLEAR_FORMARTTING_MENU_SECTION.type,
|
|
99
105
|
key: CLEAR_FORMARTTING_MENU_SECTION.key,
|
|
@@ -101,7 +107,11 @@ export var getToolbarComponents = function getToolbarComponents(api) {
|
|
|
101
107
|
type: TEXT_FORMATTING_MENU.type,
|
|
102
108
|
key: TEXT_FORMATTING_MENU.key,
|
|
103
109
|
rank: TEXT_FORMAT_MENU_RANK[CLEAR_FORMARTTING_MENU_SECTION.key]
|
|
104
|
-
}],
|
|
110
|
+
}].concat(_toConsumableArray(expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? [{
|
|
111
|
+
type: TEXT_COLLAPSED_MENU.type,
|
|
112
|
+
key: TEXT_COLLAPSED_MENU.key,
|
|
113
|
+
rank: TEXT_COLLAPSED_MENU_RANK[CLEAR_FORMARTTING_MENU_SECTION.key]
|
|
114
|
+
}] : [])),
|
|
105
115
|
component: function component(_ref6) {
|
|
106
116
|
var children = _ref6.children;
|
|
107
117
|
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
|
@@ -12,6 +12,6 @@ interface PrimaryToolbarComponentProps {
|
|
|
12
12
|
shouldUseResponsiveToolbar: boolean;
|
|
13
13
|
toolbarSize: ToolbarSize;
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
16
|
-
export declare const PrimaryToolbarComponentMemoized: React.MemoExoticComponent<
|
|
15
|
+
export declare const PrimaryToolbarComponent: ({ api, popupsMountPoint, popupsScrollableElement, toolbarSize, editorView, disabled, isReducedSpacing, shouldUseResponsiveToolbar, }: PrimaryToolbarComponentProps) => React.JSX.Element;
|
|
16
|
+
export declare const PrimaryToolbarComponentMemoized: React.MemoExoticComponent<({ api, popupsMountPoint, popupsScrollableElement, toolbarSize, editorView, disabled, isReducedSpacing, shouldUseResponsiveToolbar, }: PrimaryToolbarComponentProps) => React.JSX.Element>;
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { CommonComponentProps } from '@atlaskit/editor-toolbar-model';
|
|
3
4
|
import type { FormatComponentProps } from './utils';
|
|
4
5
|
export declare const FormatMenuItem: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element | null;
|
|
5
6
|
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element;
|
|
@@ -7,3 +8,8 @@ export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatCompone
|
|
|
7
8
|
export declare const MoreFormattingMenu: ({ children }: {
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
}) => React.JSX.Element;
|
|
11
|
+
export declare const MenuSection: ({ children, title, parents, }: {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
parents: CommonComponentProps["parents"];
|
|
14
|
+
title?: string;
|
|
15
|
+
}) => React.JSX.Element;
|
|
@@ -12,6 +12,6 @@ interface PrimaryToolbarComponentProps {
|
|
|
12
12
|
shouldUseResponsiveToolbar: boolean;
|
|
13
13
|
toolbarSize: ToolbarSize;
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
16
|
-
export declare const PrimaryToolbarComponentMemoized: React.MemoExoticComponent<
|
|
15
|
+
export declare const PrimaryToolbarComponent: ({ api, popupsMountPoint, popupsScrollableElement, toolbarSize, editorView, disabled, isReducedSpacing, shouldUseResponsiveToolbar, }: PrimaryToolbarComponentProps) => React.JSX.Element;
|
|
16
|
+
export declare const PrimaryToolbarComponentMemoized: React.MemoExoticComponent<({ api, popupsMountPoint, popupsScrollableElement, toolbarSize, editorView, disabled, isReducedSpacing, shouldUseResponsiveToolbar, }: PrimaryToolbarComponentProps) => React.JSX.Element>;
|
|
17
17
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { CommonComponentProps } from '@atlaskit/editor-toolbar-model';
|
|
3
4
|
import type { FormatComponentProps } from './utils';
|
|
4
5
|
export declare const FormatMenuItem: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element | null;
|
|
5
6
|
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element;
|
|
@@ -7,3 +8,8 @@ export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatCompone
|
|
|
7
8
|
export declare const MoreFormattingMenu: ({ children }: {
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
}) => React.JSX.Element;
|
|
11
|
+
export declare const MenuSection: ({ children, title, parents, }: {
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
parents: CommonComponentProps["parents"];
|
|
14
|
+
title?: string;
|
|
15
|
+
}) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.27",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
39
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
40
40
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
41
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
42
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
41
|
+
"@atlaskit/editor-toolbar": "^0.6.0",
|
|
42
|
+
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
43
43
|
"@atlaskit/icon": "^28.1.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^3.4.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^11.11.0",
|
|
47
47
|
"@atlaskit/tokens": "^6.1.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
50
50
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^107.
|
|
53
|
+
"@atlaskit/editor-common": "^107.34.0",
|
|
54
54
|
"react": "^18.2.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|