@atlaskit/editor-plugin-block-type 11.2.30 → 11.3.0
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/blockTypePlugin.js +10 -0
- package/dist/cjs/pm-plugins/ui/ToolbarBlockType/HeadingButton.js +1 -1
- package/dist/cjs/ui/QuoteBlockMenuItem.js +1 -1
- package/dist/es2019/blockTypePlugin.js +11 -1
- package/dist/es2019/pm-plugins/ui/ToolbarBlockType/HeadingButton.js +1 -1
- package/dist/es2019/ui/QuoteBlockMenuItem.js +1 -1
- package/dist/esm/blockTypePlugin.js +11 -1
- package/dist/esm/pm-plugins/ui/ToolbarBlockType/HeadingButton.js +1 -1
- package/dist/esm/ui/QuoteBlockMenuItem.js +1 -1
- package/dist/types/pm-plugins/types.d.ts +7 -0
- package/dist/types-ts4.5/pm-plugins/types.d.ts +7 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 11.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1e58c64552ef8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1e58c64552ef8) -
|
|
8
|
+
Add new 'allowFontSize' plugin option to blockTypePlugin which enables new 'small' text feature to
|
|
9
|
+
be added, it's behind an experiment platform_editor_small_font_size.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 11.2.31
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 11.2.30
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
15
15
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
16
16
|
var _types = require("@atlaskit/editor-common/types");
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
19
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
19
20
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
21
|
var _blockType = require("./pm-plugins/commands/block-type");
|
|
@@ -163,6 +164,15 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
|
163
164
|
}
|
|
164
165
|
return nodes;
|
|
165
166
|
},
|
|
167
|
+
marks: function marks() {
|
|
168
|
+
if (options !== null && options !== void 0 && options.allowFontSize && (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true)) {
|
|
169
|
+
return [{
|
|
170
|
+
name: 'fontSize',
|
|
171
|
+
mark: _adfSchema.fontSize
|
|
172
|
+
}];
|
|
173
|
+
}
|
|
174
|
+
return [];
|
|
175
|
+
},
|
|
166
176
|
pmPlugins: function pmPlugins() {
|
|
167
177
|
return [{
|
|
168
178
|
name: 'blockType',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* HeadingButton.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* HeadingButton.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
4
4
|
"use strict";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { extendedBlockquote, extendedBlockquoteWithLocalId, hardBreak, heading } from '@atlaskit/adf-schema';
|
|
2
|
+
import { extendedBlockquote, extendedBlockquoteWithLocalId, fontSize, hardBreak, heading } from '@atlaskit/adf-schema';
|
|
3
3
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { keymap, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
5
5
|
import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconHeading, IconQuote } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
10
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
12
|
import { clearFormatting, insertBlockQuoteWithAnalytics, insertBlockQuoteWithAnalyticsCommand, setBlockTypeWithAnalytics } from './pm-plugins/commands/block-type';
|
|
@@ -150,6 +151,15 @@ const blockTypePlugin = ({
|
|
|
150
151
|
}
|
|
151
152
|
return nodes;
|
|
152
153
|
},
|
|
154
|
+
marks() {
|
|
155
|
+
if (options !== null && options !== void 0 && options.allowFontSize && expValEquals('platform_editor_small_font_size', 'isEnabled', true)) {
|
|
156
|
+
return [{
|
|
157
|
+
name: 'fontSize',
|
|
158
|
+
mark: fontSize
|
|
159
|
+
}];
|
|
160
|
+
}
|
|
161
|
+
return [];
|
|
162
|
+
},
|
|
153
163
|
pmPlugins() {
|
|
154
164
|
return [{
|
|
155
165
|
name: 'blockType',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* HeadingButton.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* HeadingButton.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
4
4
|
import "./HeadingButton.compiled.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* QuoteBlockMenuItem.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* QuoteBlockMenuItem.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./QuoteBlockMenuItem.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
@@ -3,13 +3,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { extendedBlockquote, extendedBlockquoteWithLocalId, hardBreak, heading } from '@atlaskit/adf-schema';
|
|
6
|
+
import { extendedBlockquote, extendedBlockquoteWithLocalId, fontSize, hardBreak, heading } from '@atlaskit/adf-schema';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { keymap, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
9
9
|
import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages';
|
|
10
10
|
import { IconHeading, IconQuote } from '@atlaskit/editor-common/quick-insert';
|
|
11
11
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
14
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
16
|
import { clearFormatting as _clearFormatting, insertBlockQuoteWithAnalytics, insertBlockQuoteWithAnalyticsCommand, setBlockTypeWithAnalytics } from './pm-plugins/commands/block-type';
|
|
@@ -156,6 +157,15 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
|
156
157
|
}
|
|
157
158
|
return nodes;
|
|
158
159
|
},
|
|
160
|
+
marks: function marks() {
|
|
161
|
+
if (options !== null && options !== void 0 && options.allowFontSize && expValEquals('platform_editor_small_font_size', 'isEnabled', true)) {
|
|
162
|
+
return [{
|
|
163
|
+
name: 'fontSize',
|
|
164
|
+
mark: fontSize
|
|
165
|
+
}];
|
|
166
|
+
}
|
|
167
|
+
return [];
|
|
168
|
+
},
|
|
159
169
|
pmPlugins: function pmPlugins() {
|
|
160
170
|
return [{
|
|
161
171
|
name: 'blockType',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* HeadingButton.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* HeadingButton.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
4
4
|
import "./HeadingButton.compiled.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* QuoteBlockMenuItem.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* QuoteBlockMenuItem.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import "./QuoteBlockMenuItem.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
@@ -24,6 +24,13 @@ export interface BlockTypePluginOptions {
|
|
|
24
24
|
allowBlockType?: {
|
|
25
25
|
exclude?: Array<AllowedBlockTypes>;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Add ability to enable/disable the font size feature which. Currently only 'small text' is supported.
|
|
29
|
+
*
|
|
30
|
+
* Note: Feature is in development and logic is under an experiment.
|
|
31
|
+
* Note: `fontSize` mark must be supported in the ADF schema for this feature to work.
|
|
32
|
+
*/
|
|
33
|
+
allowFontSize?: boolean;
|
|
27
34
|
includeBlockQuoteAsTextstyleOption?: boolean;
|
|
28
35
|
isUndoRedoButtonsEnabled?: boolean;
|
|
29
36
|
lastNodeMustBeParagraph?: boolean;
|
|
@@ -24,6 +24,13 @@ export interface BlockTypePluginOptions {
|
|
|
24
24
|
allowBlockType?: {
|
|
25
25
|
exclude?: Array<AllowedBlockTypes>;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Add ability to enable/disable the font size feature which. Currently only 'small text' is supported.
|
|
29
|
+
*
|
|
30
|
+
* Note: Feature is in development and logic is under an experiment.
|
|
31
|
+
* Note: `fontSize` mark must be supported in the ADF schema for this feature to work.
|
|
32
|
+
*/
|
|
33
|
+
allowFontSize?: boolean;
|
|
27
34
|
includeBlockQuoteAsTextstyleOption?: boolean;
|
|
28
35
|
isUndoRedoButtonsEnabled?: boolean;
|
|
29
36
|
lastNodeMustBeParagraph?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-block-menu": "^6.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-list": "^9.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-primary-toolbar": "^8.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-selection": "^7.
|
|
38
|
+
"@atlaskit/editor-plugin-selection": "^7.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^8.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-toolbar": "^4.1.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
51
51
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
52
52
|
"@atlaskit/theme": "^22.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
-
"@atlaskit/tokens": "^11.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^35.7.0",
|
|
54
|
+
"@atlaskit/tokens": "^11.1.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
56
56
|
"@compiled/react": "^0.20.0",
|
|
57
57
|
"@emotion/react": "^11.7.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^111.
|
|
60
|
+
"@atlaskit/editor-common": "^111.34.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
63
|
"react-intl-next": "npm:react-intl@^5.18.1"
|