@atlaskit/editor-plugin-block-type 5.0.0 → 5.0.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 +12 -0
- package/consts/package.json +3 -1
- package/dist/cjs/pm-plugins/ui/FloatingToolbarComponent.js +2 -1
- package/dist/es2019/pm-plugins/ui/FloatingToolbarComponent.js +2 -1
- 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,17 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 5.0.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#120533](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/120533)
|
8
|
+
[`f1bec731e278f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1bec731e278f) -
|
9
|
+
Adds a `sideEffects` field to ensure this package does not have Compiled styles tree-shaken in the
|
10
|
+
future to avoid an accidental regression.
|
11
|
+
|
12
|
+
This is related to
|
13
|
+
https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
|
14
|
+
|
3
15
|
## 5.0.0
|
4
16
|
|
5
17
|
### 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": {
|
@@ -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
|
@@ -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
|
@@ -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.1",
|
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.2.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": {
|