@atlaskit/editor-plugin-loom 9.0.4 → 9.1.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 +18 -0
- package/dist/cjs/ui/MenuSection.js +2 -15
- package/dist/cjs/ui/toolbar-components.js +2 -9
- package/dist/es2019/ui/MenuSection.js +2 -13
- package/dist/es2019/ui/toolbar-components.js +2 -9
- package/dist/esm/ui/MenuSection.js +2 -15
- package/dist/esm/ui/toolbar-components.js +2 -9
- package/dist/types/loomPluginType.d.ts +1 -3
- package/dist/types-ts4.5/loomPluginType.d.ts +1 -3
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-loom
|
|
2
2
|
|
|
3
|
+
## 9.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 9.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`6e8029473620b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e8029473620b) -
|
|
14
|
+
[EDITOR-4496] clean up experiment platform_editor_toolbar_aifc_patch_3 and remove view-mode plugin
|
|
15
|
+
dependency from loom plugin
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 9.0.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -7,27 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.MenuSection = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
10
|
-
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
11
10
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
12
|
-
var
|
|
13
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
|
-
/**
|
|
15
|
-
* !! When removing platform_editor_toolbar_aifc_patch_3 also remove package dependency on `@atlaskit/editor-plugin-view-mode`.
|
|
16
|
-
*/
|
|
17
|
-
var usePluginState = (0, _platformFeatureFlagsReact.conditionalHooksFactory)(function () {
|
|
18
|
-
return (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
19
|
-
}, function (api) {
|
|
11
|
+
var usePluginState = function usePluginState(_api) {
|
|
20
12
|
var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
|
|
21
13
|
editorViewMode = _useEditorToolbar.editorViewMode;
|
|
22
14
|
return {
|
|
23
15
|
editorViewMode: editorViewMode
|
|
24
16
|
};
|
|
25
|
-
}
|
|
26
|
-
var editorViewMode = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'editorViewMode.mode');
|
|
27
|
-
return {
|
|
28
|
-
editorViewMode: editorViewMode
|
|
29
|
-
};
|
|
30
|
-
});
|
|
17
|
+
};
|
|
31
18
|
var MenuSection = exports.MenuSection = function MenuSection(_ref) {
|
|
32
19
|
var children = _ref.children,
|
|
33
20
|
api = _ref.api;
|
|
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getToolbarComponents = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
10
|
-
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
11
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
10
|
var _LoomMenuItem = require("./LoomMenuItem");
|
|
13
11
|
var _MenuSection = require("./MenuSection");
|
|
14
12
|
var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(config, api) {
|
|
@@ -22,13 +20,8 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
22
20
|
}],
|
|
23
21
|
component: function component(_ref) {
|
|
24
22
|
var children = _ref.children;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
api: api
|
|
28
|
-
}, children);
|
|
29
|
-
}
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
|
|
31
|
-
hasSeparator: true
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_MenuSection.MenuSection, {
|
|
24
|
+
api: api
|
|
32
25
|
}, children);
|
|
33
26
|
}
|
|
34
27
|
}, {
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
3
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
5
|
-
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
-
/**
|
|
8
|
-
* !! When removing platform_editor_toolbar_aifc_patch_3 also remove package dependency on `@atlaskit/editor-plugin-view-mode`.
|
|
9
|
-
*/
|
|
10
|
-
const usePluginState = conditionalHooksFactory(() => expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true), api => {
|
|
4
|
+
const usePluginState = _api => {
|
|
11
5
|
const {
|
|
12
6
|
editorViewMode
|
|
13
7
|
} = useEditorToolbar();
|
|
14
8
|
return {
|
|
15
9
|
editorViewMode
|
|
16
10
|
};
|
|
17
|
-
}
|
|
18
|
-
const editorViewMode = useSharedPluginStateSelector(api, 'editorViewMode.mode');
|
|
19
|
-
return {
|
|
20
|
-
editorViewMode
|
|
21
|
-
};
|
|
22
|
-
});
|
|
11
|
+
};
|
|
23
12
|
export const MenuSection = ({
|
|
24
13
|
children,
|
|
25
14
|
api
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LOOM_MENU_SECTION, LOOM_MENU_ITEM, LOOM_MENU_SECTION_RANK, OVERFLOW_MENU_PRIMARY_TOOLBAR_RANK, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_EXTENSIONS_MENU_SECTION, OVERFLOW_EXTENSIONS_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
3
|
import { LoomMenuItem } from './LoomMenuItem';
|
|
6
4
|
import { MenuSection } from './MenuSection';
|
|
7
5
|
export const getToolbarComponents = (config, api) => {
|
|
@@ -16,13 +14,8 @@ export const getToolbarComponents = (config, api) => {
|
|
|
16
14
|
component: ({
|
|
17
15
|
children
|
|
18
16
|
}) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
api: api
|
|
22
|
-
}, children);
|
|
23
|
-
}
|
|
24
|
-
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
|
25
|
-
hasSeparator: true
|
|
17
|
+
return /*#__PURE__*/React.createElement(MenuSection, {
|
|
18
|
+
api: api
|
|
26
19
|
}, children);
|
|
27
20
|
}
|
|
28
21
|
}, {
|
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
3
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
5
|
-
|
|
6
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
-
/**
|
|
8
|
-
* !! When removing platform_editor_toolbar_aifc_patch_3 also remove package dependency on `@atlaskit/editor-plugin-view-mode`.
|
|
9
|
-
*/
|
|
10
|
-
var usePluginState = conditionalHooksFactory(function () {
|
|
11
|
-
return expValEquals('platform_editor_toolbar_aifc_patch_3', 'isEnabled', true);
|
|
12
|
-
}, function (api) {
|
|
4
|
+
var usePluginState = function usePluginState(_api) {
|
|
13
5
|
var _useEditorToolbar = useEditorToolbar(),
|
|
14
6
|
editorViewMode = _useEditorToolbar.editorViewMode;
|
|
15
7
|
return {
|
|
16
8
|
editorViewMode: editorViewMode
|
|
17
9
|
};
|
|
18
|
-
}
|
|
19
|
-
var editorViewMode = useSharedPluginStateSelector(api, 'editorViewMode.mode');
|
|
20
|
-
return {
|
|
21
|
-
editorViewMode: editorViewMode
|
|
22
|
-
};
|
|
23
|
-
});
|
|
10
|
+
};
|
|
24
11
|
export var MenuSection = function MenuSection(_ref) {
|
|
25
12
|
var children = _ref.children,
|
|
26
13
|
api = _ref.api;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LOOM_MENU_SECTION, LOOM_MENU_ITEM, LOOM_MENU_SECTION_RANK, OVERFLOW_MENU_PRIMARY_TOOLBAR_RANK, OVERFLOW_MENU_PRIMARY_TOOLBAR, OVERFLOW_EXTENSIONS_MENU_SECTION, OVERFLOW_EXTENSIONS_MENU_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
|
|
3
|
-
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
3
|
import { LoomMenuItem } from './LoomMenuItem';
|
|
6
4
|
import { MenuSection } from './MenuSection';
|
|
7
5
|
export var getToolbarComponents = function getToolbarComponents(config, api) {
|
|
@@ -15,13 +13,8 @@ export var getToolbarComponents = function getToolbarComponents(config, api) {
|
|
|
15
13
|
}],
|
|
16
14
|
component: function component(_ref) {
|
|
17
15
|
var children = _ref.children;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
api: api
|
|
21
|
-
}, children);
|
|
22
|
-
}
|
|
23
|
-
return /*#__PURE__*/React.createElement(ToolbarDropdownItemSection, {
|
|
24
|
-
hasSeparator: true
|
|
16
|
+
return /*#__PURE__*/React.createElement(MenuSection, {
|
|
17
|
+
api: api
|
|
25
18
|
}, children);
|
|
26
19
|
}
|
|
27
20
|
}, {
|
|
@@ -3,7 +3,6 @@ import { type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
6
|
-
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
7
6
|
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
8
7
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
9
8
|
import { type QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
@@ -42,8 +41,7 @@ export type LoomPlugin = NextEditorPlugin<'loom', {
|
|
|
42
41
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
43
42
|
OptionalPlugin<QuickInsertPlugin>,
|
|
44
43
|
OptionalPlugin<ConnectivityPlugin>,
|
|
45
|
-
OptionalPlugin<ToolbarPlugin
|
|
46
|
-
OptionalPlugin<EditorViewModePlugin>
|
|
44
|
+
OptionalPlugin<ToolbarPlugin>
|
|
47
45
|
];
|
|
48
46
|
pluginConfiguration: LoomPluginOptions;
|
|
49
47
|
sharedState: LoomPluginState | undefined;
|
|
@@ -3,7 +3,6 @@ import { type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
5
5
|
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
6
|
-
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
7
6
|
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
8
7
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
9
8
|
import { type QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
@@ -42,8 +41,7 @@ export type LoomPlugin = NextEditorPlugin<'loom', {
|
|
|
42
41
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
43
42
|
OptionalPlugin<QuickInsertPlugin>,
|
|
44
43
|
OptionalPlugin<ConnectivityPlugin>,
|
|
45
|
-
OptionalPlugin<ToolbarPlugin
|
|
46
|
-
OptionalPlugin<EditorViewModePlugin>
|
|
44
|
+
OptionalPlugin<ToolbarPlugin>
|
|
47
45
|
];
|
|
48
46
|
pluginConfiguration: LoomPluginOptions;
|
|
49
47
|
sharedState: LoomPluginState | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-loom",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "Loom plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,18 +35,15 @@
|
|
|
35
35
|
"@atlaskit/button": "^23.9.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-connectivity": "^7.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^9.0.0",
|
|
39
38
|
"@atlaskit/editor-plugin-hyperlink": "^9.0.0",
|
|
40
39
|
"@atlaskit/editor-plugin-primary-toolbar": "^8.0.0",
|
|
41
40
|
"@atlaskit/editor-plugin-quick-insert": "^7.1.0",
|
|
42
|
-
"@atlaskit/editor-plugin-toolbar": "^4.
|
|
41
|
+
"@atlaskit/editor-plugin-toolbar": "^4.1.0",
|
|
43
42
|
"@atlaskit/editor-plugin-width": "^8.0.0",
|
|
44
43
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
45
44
|
"@atlaskit/editor-toolbar": "^0.19.0",
|
|
46
|
-
"@atlaskit/icon": "^
|
|
45
|
+
"@atlaskit/icon": "^30.0.0",
|
|
47
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^16.28.0",
|
|
50
47
|
"@atlaskit/tokens": "^10.1.0",
|
|
51
48
|
"@babel/runtime": "^7.0.0",
|
|
52
49
|
"@emotion/react": "^11.7.1",
|