@atlaskit/editor-plugin-extension 0.5.0 → 0.5.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 +12 -0
- package/dist/cjs/plugin.js +2 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +4 -1
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +3 -1
- package/dist/es2019/plugin.js +2 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +4 -1
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +3 -1
- package/dist/esm/plugin.js +2 -2
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +4 -1
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 0.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#66759](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66759) [`906578f1ea5d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/906578f1ea5d) - [ux] ED-21787: Migrating few CSS entries to space and color tokens
|
|
8
|
+
|
|
9
|
+
## 0.5.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238) [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) - [ED-21835] Change EditorAPI type to always union with undefined
|
|
14
|
+
|
|
3
15
|
## 0.5.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -19,7 +19,7 @@ var _main = require("./pm-plugins/main");
|
|
|
19
19
|
var _uniqueId = require("./pm-plugins/unique-id");
|
|
20
20
|
var _toolbar = require("./toolbar");
|
|
21
21
|
var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
|
|
22
|
-
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
22
|
+
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$decorations, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
23
23
|
var _ref$config = _ref.config,
|
|
24
24
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
25
25
|
_api = _ref.api;
|
|
@@ -134,7 +134,7 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
|
|
|
134
134
|
pluginsOptions: {
|
|
135
135
|
floatingToolbar: (0, _toolbar.getToolbarConfig)({
|
|
136
136
|
breakoutEnabled: options.breakoutEnabled,
|
|
137
|
-
hoverDecoration: _api === null || _api === void 0 ? void 0 : _api
|
|
137
|
+
hoverDecoration: _api === null || _api === void 0 || (_api$decorations = _api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration,
|
|
138
138
|
applyChangeToContextPanel: _api === null || _api === void 0 || (_api$contextPanel3 = _api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
139
139
|
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics4 = _api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions
|
|
140
140
|
}),
|
|
@@ -26,7 +26,7 @@ var toggleFieldWrapperStyles = (0, _react2.css)({
|
|
|
26
26
|
});
|
|
27
27
|
var toggleLabelStyles = (0, _react2.css)({
|
|
28
28
|
display: 'flex',
|
|
29
|
-
padding:
|
|
29
|
+
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-0, 0px)"),
|
|
30
30
|
flexGrow: 1
|
|
31
31
|
});
|
|
32
32
|
function _validate(value, isRequired) {
|
|
@@ -362,7 +362,10 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
362
362
|
height: "var(--ds-space-300, 24px)"
|
|
363
363
|
}
|
|
364
364
|
/* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
|
|
365
|
-
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar.
|
|
365
|
+
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */
|
|
366
|
+
// Disabling design token check as this is a calculated value
|
|
367
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
368
|
+
,
|
|
366
369
|
absoluteOffset: {
|
|
367
370
|
right: Number(-1.5 * getCurrentRemSize() - 1)
|
|
368
371
|
}
|
|
@@ -22,9 +22,11 @@ var itemWrapperStyles = (0, _react.css)({
|
|
|
22
22
|
var iconWrapperStyles = (0, _react.css)({
|
|
23
23
|
lineHeight: 1
|
|
24
24
|
});
|
|
25
|
+
|
|
26
|
+
// Adding 4px instead of 3px, since Design tokens supports space sizes in 2 multiples only Ref: https://atlassian.design/components/tokens/all-tokens
|
|
25
27
|
var iconWrapperMenuStyles = (0, _react.css)({
|
|
26
28
|
alignSelf: 'flex-start',
|
|
27
|
-
marginTop:
|
|
29
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
28
30
|
});
|
|
29
31
|
var getIconSize = function getIconSize(context, description) {
|
|
30
32
|
if (context === 'value' || !description) {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -15,7 +15,7 @@ export const extensionPlugin = ({
|
|
|
15
15
|
config: options = {},
|
|
16
16
|
api
|
|
17
17
|
}) => {
|
|
18
|
-
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
18
|
+
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$decorations, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
19
19
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
20
20
|
//Note: This is a hack to get the editor view reference in the plugin. Copied from table plugin.
|
|
21
21
|
//This is needed to get the current selection in the editor
|
|
@@ -125,7 +125,7 @@ export const extensionPlugin = ({
|
|
|
125
125
|
pluginsOptions: {
|
|
126
126
|
floatingToolbar: getToolbarConfig({
|
|
127
127
|
breakoutEnabled: options.breakoutEnabled,
|
|
128
|
-
hoverDecoration: api === null || api === void 0 ? void 0 : api.decorations.actions.hoverDecoration,
|
|
128
|
+
hoverDecoration: api === null || api === void 0 ? void 0 : (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration,
|
|
129
129
|
applyChangeToContextPanel: api === null || api === void 0 ? void 0 : (_api$contextPanel3 = api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
130
130
|
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions
|
|
131
131
|
}),
|
|
@@ -13,7 +13,7 @@ const toggleFieldWrapperStyles = css({
|
|
|
13
13
|
});
|
|
14
14
|
const toggleLabelStyles = css({
|
|
15
15
|
display: 'flex',
|
|
16
|
-
padding:
|
|
16
|
+
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-0, 0px)"}`,
|
|
17
17
|
flexGrow: 1
|
|
18
18
|
});
|
|
19
19
|
function validate(value, isRequired) {
|
|
@@ -353,7 +353,10 @@ const ColorPicker = props => {
|
|
|
353
353
|
height: "var(--ds-space-300, 24px)"
|
|
354
354
|
}
|
|
355
355
|
/* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
|
|
356
|
-
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar.
|
|
356
|
+
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */
|
|
357
|
+
// Disabling design token check as this is a calculated value
|
|
358
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
359
|
+
,
|
|
357
360
|
absoluteOffset: {
|
|
358
361
|
right: Number(-1.5 * getCurrentRemSize() - 1)
|
|
359
362
|
}
|
|
@@ -14,9 +14,11 @@ const itemWrapperStyles = css({
|
|
|
14
14
|
const iconWrapperStyles = css({
|
|
15
15
|
lineHeight: 1
|
|
16
16
|
});
|
|
17
|
+
|
|
18
|
+
// Adding 4px instead of 3px, since Design tokens supports space sizes in 2 multiples only Ref: https://atlassian.design/components/tokens/all-tokens
|
|
17
19
|
const iconWrapperMenuStyles = css({
|
|
18
20
|
alignSelf: 'flex-start',
|
|
19
|
-
marginTop:
|
|
21
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
20
22
|
});
|
|
21
23
|
const getIconSize = (context, description) => {
|
|
22
24
|
if (context === 'value' || !description) {
|
package/dist/esm/plugin.js
CHANGED
|
@@ -12,7 +12,7 @@ import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
|
12
12
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
13
13
|
import { getToolbarConfig } from './toolbar';
|
|
14
14
|
export var extensionPlugin = function extensionPlugin(_ref) {
|
|
15
|
-
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
15
|
+
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$decorations, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
16
16
|
var _ref$config = _ref.config,
|
|
17
17
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
18
18
|
_api = _ref.api;
|
|
@@ -127,7 +127,7 @@ export var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
127
127
|
pluginsOptions: {
|
|
128
128
|
floatingToolbar: getToolbarConfig({
|
|
129
129
|
breakoutEnabled: options.breakoutEnabled,
|
|
130
|
-
hoverDecoration: _api === null || _api === void 0 ? void 0 : _api
|
|
130
|
+
hoverDecoration: _api === null || _api === void 0 || (_api$decorations = _api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration,
|
|
131
131
|
applyChangeToContextPanel: _api === null || _api === void 0 || (_api$contextPanel3 = _api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
132
132
|
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics4 = _api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions
|
|
133
133
|
}),
|
|
@@ -16,7 +16,7 @@ var toggleFieldWrapperStyles = css({
|
|
|
16
16
|
});
|
|
17
17
|
var toggleLabelStyles = css({
|
|
18
18
|
display: 'flex',
|
|
19
|
-
padding:
|
|
19
|
+
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-0, 0px)"),
|
|
20
20
|
flexGrow: 1
|
|
21
21
|
});
|
|
22
22
|
function _validate(value, isRequired) {
|
|
@@ -356,7 +356,10 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
356
356
|
height: "var(--ds-space-300, 24px)"
|
|
357
357
|
}
|
|
358
358
|
/* ED-18288 We align the palette to the right edge which is 1.5rem spacing away to avoid
|
|
359
|
-
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar.
|
|
359
|
+
excess overflow on left. Additional 1 is to mitigate 1px added by floating toolbar. */
|
|
360
|
+
// Disabling design token check as this is a calculated value
|
|
361
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
362
|
+
,
|
|
360
363
|
absoluteOffset: {
|
|
361
364
|
right: Number(-1.5 * getCurrentRemSize() - 1)
|
|
362
365
|
}
|
|
@@ -14,9 +14,11 @@ var itemWrapperStyles = css({
|
|
|
14
14
|
var iconWrapperStyles = css({
|
|
15
15
|
lineHeight: 1
|
|
16
16
|
});
|
|
17
|
+
|
|
18
|
+
// Adding 4px instead of 3px, since Design tokens supports space sizes in 2 multiples only Ref: https://atlassian.design/components/tokens/all-tokens
|
|
17
19
|
var iconWrapperMenuStyles = css({
|
|
18
20
|
alignSelf: 'flex-start',
|
|
19
|
-
marginTop:
|
|
21
|
+
marginTop: "var(--ds-space-050, 4px)"
|
|
20
22
|
});
|
|
21
23
|
var getIconSize = function getIconSize(context, description) {
|
|
22
24
|
if (context === 'value' || !description) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"releaseModel": "continuous",
|
|
14
14
|
"runReact18": false
|
|
15
15
|
},
|
|
16
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
16
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
17
17
|
"main": "dist/cjs/index.js",
|
|
18
18
|
"module": "dist/esm/index.js",
|
|
19
19
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/button": "^17.2.0",
|
|
32
32
|
"@atlaskit/checkbox": "^13.0.0",
|
|
33
33
|
"@atlaskit/datetime-picker": "^13.0.3",
|
|
34
|
-
"@atlaskit/editor-common": "^76.
|
|
34
|
+
"@atlaskit/editor-common": "^76.39.0",
|
|
35
35
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-context-panel": "^0.2.0",
|