@atlaskit/editor-plugin-block-type 5.0.0 → 5.0.2
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 +20 -0
- package/consts/package.json +3 -1
- package/dist/cjs/blockTypePlugin.js +0 -7
- package/dist/cjs/pm-plugins/ui/FloatingToolbarComponent.js +2 -1
- package/dist/es2019/blockTypePlugin.js +0 -7
- package/dist/es2019/pm-plugins/ui/FloatingToolbarComponent.js +2 -1
- package/dist/esm/blockTypePlugin.js +0 -7
- package/dist/esm/pm-plugins/ui/FloatingToolbarComponent.js +2 -1
- package/package.json +10 -8
- package/styles/package.json +3 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 5.0.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#120931](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120931)
|
8
|
+
[`624b97c021fea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/624b97c021fea) -
|
9
|
+
[ux] ED-26676 revert to existing primary toolbar components
|
10
|
+
|
11
|
+
## 5.0.1
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- [#120533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120533)
|
16
|
+
[`f1bec731e278f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1bec731e278f) -
|
17
|
+
Adds a `sideEffects` field to ensure this package does not have Compiled styles tree-shaken in the
|
18
|
+
future to avoid an accidental regression.
|
19
|
+
|
20
|
+
This is related to
|
21
|
+
https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
|
22
|
+
|
3
23
|
## 5.0.0
|
4
24
|
|
5
25
|
### Major Changes
|
package/consts/package.json
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
"main": "../dist/cjs/ui/consts.js",
|
4
4
|
"module": "../dist/esm/ui/consts.js",
|
5
5
|
"module:es2019": "../dist/es2019/ui/consts.js",
|
6
|
-
"sideEffects":
|
6
|
+
"sideEffects": [
|
7
|
+
"*.compiled.css"
|
8
|
+
],
|
7
9
|
"types": "../dist/types/ui/consts.d.ts",
|
8
10
|
"typesVersions": {
|
9
11
|
">=4.5 <5.4": {
|
@@ -107,13 +107,6 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
107
107
|
toolbarSize = _ref4.toolbarSize,
|
108
108
|
disabled = _ref4.disabled,
|
109
109
|
isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing;
|
110
|
-
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
111
|
-
exposure: true
|
112
|
-
})) {
|
113
|
-
return /*#__PURE__*/_react.default.createElement(_FloatingToolbarComponent.FloatingToolbarComponent, {
|
114
|
-
api: api
|
115
|
-
});
|
116
|
-
}
|
117
110
|
var isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < _types.ToolbarSize.XXL : toolbarSize < _types.ToolbarSize.XL;
|
118
111
|
if ((0, _platformFeatureFlags.fg)('platform_editor_toolbar_responsive_fixes')) {
|
119
112
|
isSmall = toolbarSize < _types.ToolbarSize.XXL;
|
@@ -9,6 +9,7 @@ exports.FloatingToolbarComponent = FloatingToolbarComponent;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
11
11
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
12
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
12
13
|
var _ToolbarBlockType = _interopRequireDefault(require("./ToolbarBlockType"));
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
@@ -37,7 +38,7 @@ function FloatingToolbarComponent(_ref) {
|
|
37
38
|
return /*#__PURE__*/_react.default.createElement(_ToolbarBlockType.default, {
|
38
39
|
isSmall: FloatingToolbarSettings.isSmall,
|
39
40
|
isDisabled: FloatingToolbarSettings.disabled,
|
40
|
-
isReducedSpacing: FloatingToolbarSettings.isToolbarReducedSpacing,
|
41
|
+
isReducedSpacing: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
|
41
42
|
setTextLevel: boundSetBlockType
|
42
43
|
// Ignored via go/ees005
|
43
44
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
@@ -99,13 +99,6 @@ const blockTypePlugin = ({
|
|
99
99
|
disabled,
|
100
100
|
isToolbarReducedSpacing
|
101
101
|
}) => {
|
102
|
-
if (editorExperiment('platform_editor_controls', 'variant1', {
|
103
|
-
exposure: true
|
104
|
-
})) {
|
105
|
-
return /*#__PURE__*/React.createElement(FloatingToolbarComponent, {
|
106
|
-
api: api
|
107
|
-
});
|
108
|
-
}
|
109
102
|
let isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
|
110
103
|
if (fg('platform_editor_toolbar_responsive_fixes')) {
|
111
104
|
isSmall = toolbarSize < ToolbarSize.XXL;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React, { useCallback } from 'react';
|
2
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
3
3
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
4
5
|
import ToolbarBlockType from './ToolbarBlockType';
|
5
6
|
const FloatingToolbarSettings = {
|
6
7
|
isSmall: true,
|
@@ -29,7 +30,7 @@ export function FloatingToolbarComponent({
|
|
29
30
|
return /*#__PURE__*/React.createElement(ToolbarBlockType, {
|
30
31
|
isSmall: FloatingToolbarSettings.isSmall,
|
31
32
|
isDisabled: FloatingToolbarSettings.disabled,
|
32
|
-
isReducedSpacing: FloatingToolbarSettings.isToolbarReducedSpacing,
|
33
|
+
isReducedSpacing: editorExperiment('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
|
33
34
|
setTextLevel: boundSetBlockType
|
34
35
|
// Ignored via go/ees005
|
35
36
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
@@ -100,13 +100,6 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
100
100
|
toolbarSize = _ref4.toolbarSize,
|
101
101
|
disabled = _ref4.disabled,
|
102
102
|
isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing;
|
103
|
-
if (editorExperiment('platform_editor_controls', 'variant1', {
|
104
|
-
exposure: true
|
105
|
-
})) {
|
106
|
-
return /*#__PURE__*/React.createElement(FloatingToolbarComponent, {
|
107
|
-
api: api
|
108
|
-
});
|
109
|
-
}
|
110
103
|
var isSmall = options && options.isUndoRedoButtonsEnabled ? toolbarSize < ToolbarSize.XXL : toolbarSize < ToolbarSize.XL;
|
111
104
|
if (fg('platform_editor_toolbar_responsive_fixes')) {
|
112
105
|
isSmall = toolbarSize < ToolbarSize.XXL;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React, { useCallback } from 'react';
|
2
2
|
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
3
3
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
4
5
|
import ToolbarBlockType from './ToolbarBlockType';
|
5
6
|
var FloatingToolbarSettings = {
|
6
7
|
isSmall: true,
|
@@ -27,7 +28,7 @@ export function FloatingToolbarComponent(_ref) {
|
|
27
28
|
return /*#__PURE__*/React.createElement(ToolbarBlockType, {
|
28
29
|
isSmall: FloatingToolbarSettings.isSmall,
|
29
30
|
isDisabled: FloatingToolbarSettings.disabled,
|
30
|
-
isReducedSpacing: FloatingToolbarSettings.isToolbarReducedSpacing,
|
31
|
+
isReducedSpacing: editorExperiment('platform_editor_controls', 'variant1') ? false : FloatingToolbarSettings.isToolbarReducedSpacing,
|
31
32
|
setTextLevel: boundSetBlockType
|
32
33
|
// Ignored via go/ees005
|
33
34
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "5.0.
|
3
|
+
"version": "5.0.2",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -25,7 +25,9 @@
|
|
25
25
|
]
|
26
26
|
}
|
27
27
|
},
|
28
|
-
"sideEffects":
|
28
|
+
"sideEffects": [
|
29
|
+
"*.compiled.css"
|
30
|
+
],
|
29
31
|
"atlaskit:src": "src/index.ts",
|
30
32
|
"af:exports": {
|
31
33
|
".": "./src/index.ts",
|
@@ -34,20 +36,20 @@
|
|
34
36
|
},
|
35
37
|
"dependencies": {
|
36
38
|
"@atlaskit/adf-schema": "^47.2.1",
|
37
|
-
"@atlaskit/editor-common": "^100.
|
39
|
+
"@atlaskit/editor-common": "^100.4.0",
|
38
40
|
"@atlaskit/editor-plugin-analytics": "^2.0.0",
|
39
41
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
|
40
42
|
"@atlaskit/editor-plugin-selection-toolbar": "^2.0.0",
|
41
43
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
42
|
-
"@atlaskit/editor-shared-styles": "^3.
|
44
|
+
"@atlaskit/editor-shared-styles": "^3.4.0",
|
43
45
|
"@atlaskit/editor-tables": "^2.9.0",
|
44
|
-
"@atlaskit/icon": "^24.
|
46
|
+
"@atlaskit/icon": "^24.1.0",
|
45
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
46
|
-
"@atlaskit/primitives": "^14.
|
48
|
+
"@atlaskit/primitives": "^14.1.0",
|
47
49
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
48
50
|
"@atlaskit/theme": "^17.0.0",
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
50
|
-
"@atlaskit/tokens": "^4.
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^3.3.0",
|
52
|
+
"@atlaskit/tokens": "^4.3.0",
|
51
53
|
"@babel/runtime": "^7.0.0",
|
52
54
|
"@emotion/react": "^11.7.1"
|
53
55
|
},
|
package/styles/package.json
CHANGED
@@ -3,7 +3,9 @@
|
|
3
3
|
"main": "../dist/cjs/ui/styles.js",
|
4
4
|
"module": "../dist/esm/ui/styles.js",
|
5
5
|
"module:es2019": "../dist/es2019/ui/styles.js",
|
6
|
-
"sideEffects":
|
6
|
+
"sideEffects": [
|
7
|
+
"*.compiled.css"
|
8
|
+
],
|
7
9
|
"types": "../dist/types/ui/styles.d.ts",
|
8
10
|
"typesVersions": {
|
9
11
|
">=4.5 <5.4": {
|