@atlaskit/editor-common 116.26.0 → 116.26.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 +18 -0
- package/dist/cjs/extensions/buildMenuItem.js +3 -5
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-color/ColorPalette/getHighlightColorInNonActiveTheme.js +35 -0
- package/dist/cjs/ui-color/ColorPalette/getTextColorInNonActiveTheme.js +26 -0
- package/dist/cjs/ui-color/ColorPalette/utils.js +1 -0
- package/dist/cjs/ui-color/index.js +14 -0
- package/dist/es2019/extensions/buildMenuItem.js +1 -4
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-color/ColorPalette/getHighlightColorInNonActiveTheme.js +31 -0
- package/dist/es2019/ui-color/ColorPalette/getTextColorInNonActiveTheme.js +21 -0
- package/dist/es2019/ui-color/ColorPalette/utils.js +1 -0
- package/dist/es2019/ui-color/index.js +2 -0
- package/dist/esm/extensions/buildMenuItem.js +3 -5
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-color/ColorPalette/getHighlightColorInNonActiveTheme.js +30 -0
- package/dist/esm/ui-color/ColorPalette/getTextColorInNonActiveTheme.js +21 -0
- package/dist/esm/ui-color/ColorPalette/utils.js +1 -0
- package/dist/esm/ui-color/index.js +2 -0
- package/dist/types/ui-color/ColorPalette/getHighlightColorInNonActiveTheme.d.ts +22 -0
- package/dist/types/ui-color/ColorPalette/getTextColorInNonActiveTheme.d.ts +12 -0
- package/dist/types/ui-color/index.d.ts +2 -0
- package/package.json +1 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 116.26.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4821d5874a821`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4821d5874a821) -
|
|
8
|
+
EDITOR-7869: Show worst accessibility status when selection spans multiple text or highlight
|
|
9
|
+
colors
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 116.26.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`dad5416e6deb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dad5416e6deb2) -
|
|
17
|
+
Clean up the fully launched `rovo_chat_enable_skills_ui_m1` and
|
|
18
|
+
`cc_fd_wb_create_priority_in_slash_menu_enabled` feature gates so extension priority is always
|
|
19
|
+
available in slash menus.
|
|
20
|
+
|
|
3
21
|
## 116.26.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.buildMenuItem = buildMenuItem;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
var _manifestHelpers = require("./manifest-helpers");
|
|
11
10
|
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; }
|
|
12
11
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -17,7 +16,7 @@ function buildMenuItem(manifest, extensionModule) {
|
|
|
17
16
|
if (!node) {
|
|
18
17
|
throw new Error("Couldn't find any action for ".concat(title, " (").concat(key, ")"));
|
|
19
18
|
}
|
|
20
|
-
return _objectSpread(_objectSpread(
|
|
19
|
+
return _objectSpread(_objectSpread({
|
|
21
20
|
key: key,
|
|
22
21
|
title: title,
|
|
23
22
|
extensionType: manifest.type,
|
|
@@ -27,10 +26,9 @@ function buildMenuItem(manifest, extensionModule) {
|
|
|
27
26
|
categories: extensionModule.categories || manifest.categories || [],
|
|
28
27
|
description: extensionModule.description || manifest.description,
|
|
29
28
|
summary: manifest.summary,
|
|
30
|
-
documentationUrl: manifest.documentationUrl
|
|
31
|
-
}, ((0, _platformFeatureFlags.fg)('cc_fd_wb_create_priority_in_slash_menu_enabled') || (0, _platformFeatureFlags.fg)('rovo_chat_enable_skills_ui_m1')) && {
|
|
29
|
+
documentationUrl: manifest.documentationUrl,
|
|
32
30
|
priority: extensionModule.priority
|
|
33
|
-
}
|
|
31
|
+
}, extensionModule.lozenge != null && {
|
|
34
32
|
lozenge: extensionModule.lozenge
|
|
35
33
|
}), {}, {
|
|
36
34
|
icon: extensionModule.icon || manifest.icons['48'],
|
|
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
28
28
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
29
29
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
30
30
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
31
|
-
var packageVersion = "116.
|
|
31
|
+
var packageVersion = "116.26.1";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "116.
|
|
27
|
+
var packageVersion = "116.26.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getHighlightColorInNonActiveTheme = void 0;
|
|
7
|
+
var _textBackgroundColor = require("@atlaskit/editor-palette/text-background-color");
|
|
8
|
+
var _utils = require("./utils");
|
|
9
|
+
/**
|
|
10
|
+
* Resolves a highlight (background) color to its equivalent value in the
|
|
11
|
+
* non-active theme.
|
|
12
|
+
*
|
|
13
|
+
* Shared between the highlight plugin state (`getActiveColorInNonActiveTheme`)
|
|
14
|
+
* and the color-accessibility selection walker.
|
|
15
|
+
*
|
|
16
|
+
* @param color - The raw highlight color mark (hex/token) or null for no
|
|
17
|
+
* highlight.
|
|
18
|
+
* @param options - Default background color and optional transparent sentinel.
|
|
19
|
+
* @param options.defaultBackgroundColor - Fallback value returned when the color
|
|
20
|
+
* cannot be resolved to a raw token (used for the default surface background).
|
|
21
|
+
* @param options.transparentColor - Optional sentinel representing an explicit
|
|
22
|
+
* transparent highlight. When provided, a color equal to this value is treated
|
|
23
|
+
* the same as no highlight (mapped to the surface elevation). The single-value
|
|
24
|
+
* plugin state never carries this sentinel, but the selection walker reads raw
|
|
25
|
+
* node marks that can, so callers walking the document should pass it.
|
|
26
|
+
*/
|
|
27
|
+
var getHighlightColorInNonActiveTheme = exports.getHighlightColorInNonActiveTheme = function getHighlightColorInNonActiveTheme(color, _ref) {
|
|
28
|
+
var defaultBackgroundColor = _ref.defaultBackgroundColor,
|
|
29
|
+
transparentColor = _ref.transparentColor;
|
|
30
|
+
if (!color || transparentColor !== undefined && color === transparentColor) {
|
|
31
|
+
return (0, _utils.getTokenCSSVariableValueForNonActiveTheme)("var(--ds-surface, #FFFFFF)", defaultBackgroundColor);
|
|
32
|
+
}
|
|
33
|
+
var colorValue = (0, _textBackgroundColor.hexToEditorTextBackgroundPaletteColor)(color) || color;
|
|
34
|
+
return (0, _utils.getTokenCSSVariableValueForNonActiveTheme)(colorValue, color);
|
|
35
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getTextColorInNonActiveTheme = void 0;
|
|
7
|
+
var _text = require("@atlaskit/editor-palette/text");
|
|
8
|
+
var _utils = require("./utils");
|
|
9
|
+
/**
|
|
10
|
+
* Resolves a text (foreground) color to its equivalent value in the non-active
|
|
11
|
+
* theme (i.e. dark when the editor is in light mode and vice versa).
|
|
12
|
+
*
|
|
13
|
+
* Shared between the text-color plugin state (`getColorInNonActiveTheme`) and the
|
|
14
|
+
* color-accessibility selection walker so both evaluate colors identically.
|
|
15
|
+
*
|
|
16
|
+
* @param color - The raw text color mark (hex/token) or null for the default.
|
|
17
|
+
* @param defaultColor - The plugin's default text color, used when `color` is
|
|
18
|
+
* absent or explicitly the default.
|
|
19
|
+
*/
|
|
20
|
+
var getTextColorInNonActiveTheme = exports.getTextColorInNonActiveTheme = function getTextColorInNonActiveTheme(color, defaultColor) {
|
|
21
|
+
if (!color || color === defaultColor) {
|
|
22
|
+
return (0, _utils.getTokenCSSVariableValueForNonActiveTheme)("var(--ds-text, #292A2E)", defaultColor);
|
|
23
|
+
}
|
|
24
|
+
var colorValue = (0, _text.hexToEditorTextPaletteColor)(color) || color;
|
|
25
|
+
return (0, _utils.getTokenCSSVariableValueForNonActiveTheme)(colorValue, color);
|
|
26
|
+
};
|
|
@@ -110,4 +110,5 @@ var getTokenCSSVariableValueForNonActiveTheme = exports.getTokenCSSVariableValue
|
|
|
110
110
|
}
|
|
111
111
|
return (cssVariableParts === null || cssVariableParts === void 0 ? void 0 : cssVariableParts.fallback) || fallback;
|
|
112
112
|
};
|
|
113
|
+
|
|
113
114
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
@@ -82,6 +82,12 @@ Object.defineProperty(exports, "getColorsPerRowFromPalette", {
|
|
|
82
82
|
return _utils.getColorsPerRowFromPalette;
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
+
Object.defineProperty(exports, "getHighlightColorInNonActiveTheme", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function get() {
|
|
88
|
+
return _getHighlightColorInNonActiveTheme.getHighlightColorInNonActiveTheme;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
85
91
|
Object.defineProperty(exports, "getSelectedRowAndColumn", {
|
|
86
92
|
enumerable: true,
|
|
87
93
|
get: function get() {
|
|
@@ -94,6 +100,12 @@ Object.defineProperty(exports, "getSelectedRowAndColumnFromPalette", {
|
|
|
94
100
|
return _utils.getSelectedRowAndColumnFromPalette;
|
|
95
101
|
}
|
|
96
102
|
});
|
|
103
|
+
Object.defineProperty(exports, "getTextColorInNonActiveTheme", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function get() {
|
|
106
|
+
return _getTextColorInNonActiveTheme.getTextColorInNonActiveTheme;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
97
109
|
Object.defineProperty(exports, "getTokenCSSVariableValue", {
|
|
98
110
|
enumerable: true,
|
|
99
111
|
get: function get() {
|
|
@@ -154,6 +166,8 @@ var _SelectedTextColorProvider = require("./ColorPalette/SelectedTextColorProvid
|
|
|
154
166
|
var _useSelectedTextColor = require("./ColorPalette/useSelectedTextColor");
|
|
155
167
|
var _getSelectedRowAndColumn = require("./ColorPalette/getSelectedRowAndColumn");
|
|
156
168
|
var _utils = require("./ColorPalette/utils");
|
|
169
|
+
var _getHighlightColorInNonActiveTheme = require("./ColorPalette/getHighlightColorInNonActiveTheme");
|
|
170
|
+
var _getTextColorInNonActiveTheme = require("./ColorPalette/getTextColorInNonActiveTheme");
|
|
157
171
|
var _cellBackgroundColorPalette = _interopRequireDefault(require("./ColorPalette/Palettes/cellBackgroundColorPalette"));
|
|
158
172
|
var _paletteMessages = _interopRequireDefault(require("./ColorPalette/Palettes/paletteMessages"));
|
|
159
173
|
var _panelBackgroundPalette = require("./ColorPalette/Palettes/panelBackgroundPalette");
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { buildAction } from './manifest-helpers';
|
|
3
2
|
export function buildMenuItem(manifest, extensionModule) {
|
|
4
3
|
const title = extensionModule.title || manifest.title;
|
|
@@ -18,9 +17,7 @@ export function buildMenuItem(manifest, extensionModule) {
|
|
|
18
17
|
description: extensionModule.description || manifest.description,
|
|
19
18
|
summary: manifest.summary,
|
|
20
19
|
documentationUrl: manifest.documentationUrl,
|
|
21
|
-
|
|
22
|
-
priority: extensionModule.priority
|
|
23
|
-
}),
|
|
20
|
+
priority: extensionModule.priority,
|
|
24
21
|
...(extensionModule.lozenge != null && {
|
|
25
22
|
lozenge: extensionModule.lozenge
|
|
26
23
|
}),
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "116.
|
|
17
|
+
const packageVersion = "116.26.1";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "116.
|
|
17
|
+
const packageVersion = "116.26.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
|
|
2
|
+
import { getTokenCSSVariableValueForNonActiveTheme } from './utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolves a highlight (background) color to its equivalent value in the
|
|
6
|
+
* non-active theme.
|
|
7
|
+
*
|
|
8
|
+
* Shared between the highlight plugin state (`getActiveColorInNonActiveTheme`)
|
|
9
|
+
* and the color-accessibility selection walker.
|
|
10
|
+
*
|
|
11
|
+
* @param color - The raw highlight color mark (hex/token) or null for no
|
|
12
|
+
* highlight.
|
|
13
|
+
* @param options - Default background color and optional transparent sentinel.
|
|
14
|
+
* @param options.defaultBackgroundColor - Fallback value returned when the color
|
|
15
|
+
* cannot be resolved to a raw token (used for the default surface background).
|
|
16
|
+
* @param options.transparentColor - Optional sentinel representing an explicit
|
|
17
|
+
* transparent highlight. When provided, a color equal to this value is treated
|
|
18
|
+
* the same as no highlight (mapped to the surface elevation). The single-value
|
|
19
|
+
* plugin state never carries this sentinel, but the selection walker reads raw
|
|
20
|
+
* node marks that can, so callers walking the document should pass it.
|
|
21
|
+
*/
|
|
22
|
+
export const getHighlightColorInNonActiveTheme = (color, {
|
|
23
|
+
defaultBackgroundColor,
|
|
24
|
+
transparentColor
|
|
25
|
+
}) => {
|
|
26
|
+
if (!color || transparentColor !== undefined && color === transparentColor) {
|
|
27
|
+
return getTokenCSSVariableValueForNonActiveTheme("var(--ds-surface, #FFFFFF)", defaultBackgroundColor);
|
|
28
|
+
}
|
|
29
|
+
const colorValue = hexToEditorTextBackgroundPaletteColor(color) || color;
|
|
30
|
+
return getTokenCSSVariableValueForNonActiveTheme(colorValue, color);
|
|
31
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
2
|
+
import { getTokenCSSVariableValueForNonActiveTheme } from './utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolves a text (foreground) color to its equivalent value in the non-active
|
|
6
|
+
* theme (i.e. dark when the editor is in light mode and vice versa).
|
|
7
|
+
*
|
|
8
|
+
* Shared between the text-color plugin state (`getColorInNonActiveTheme`) and the
|
|
9
|
+
* color-accessibility selection walker so both evaluate colors identically.
|
|
10
|
+
*
|
|
11
|
+
* @param color - The raw text color mark (hex/token) or null for the default.
|
|
12
|
+
* @param defaultColor - The plugin's default text color, used when `color` is
|
|
13
|
+
* absent or explicitly the default.
|
|
14
|
+
*/
|
|
15
|
+
export const getTextColorInNonActiveTheme = (color, defaultColor) => {
|
|
16
|
+
if (!color || color === defaultColor) {
|
|
17
|
+
return getTokenCSSVariableValueForNonActiveTheme("var(--ds-text, #292A2E)", defaultColor);
|
|
18
|
+
}
|
|
19
|
+
const colorValue = hexToEditorTextPaletteColor(color) || color;
|
|
20
|
+
return getTokenCSSVariableValueForNonActiveTheme(colorValue, color);
|
|
21
|
+
};
|
|
@@ -78,5 +78,6 @@ export const getTokenCSSVariableValueForNonActiveTheme = (variableExpression, fa
|
|
|
78
78
|
}
|
|
79
79
|
return (cssVariableParts === null || cssVariableParts === void 0 ? void 0 : cssVariableParts.fallback) || fallback;
|
|
80
80
|
};
|
|
81
|
+
|
|
81
82
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
82
83
|
export { getSelectedRowAndColumn } from './getSelectedRowAndColumn';
|
|
@@ -7,6 +7,8 @@ export { SelectedTextColorProvider } from './ColorPalette/SelectedTextColorProvi
|
|
|
7
7
|
export { useSelectedTextColor } from './ColorPalette/useSelectedTextColor';
|
|
8
8
|
export { getSelectedRowAndColumn } from './ColorPalette/getSelectedRowAndColumn';
|
|
9
9
|
export { DEFAULT_COLOR_PICKER_COLUMNS, getColorsPerRowFromPalette, getSelectedRowAndColumnFromPalette, getTokenCSSVariableValue, getTokenCSSVariableValueForNonActiveTheme } from './ColorPalette/utils';
|
|
10
|
+
export { getHighlightColorInNonActiveTheme } from './ColorPalette/getHighlightColorInNonActiveTheme';
|
|
11
|
+
export { getTextColorInNonActiveTheme } from './ColorPalette/getTextColorInNonActiveTheme';
|
|
10
12
|
export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/cellBackgroundColorPalette';
|
|
11
13
|
export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
|
|
12
14
|
export { panelBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { buildAction } from './manifest-helpers';
|
|
6
5
|
export function buildMenuItem(manifest, extensionModule) {
|
|
7
6
|
var title = extensionModule.title || manifest.title;
|
|
@@ -10,7 +9,7 @@ export function buildMenuItem(manifest, extensionModule) {
|
|
|
10
9
|
if (!node) {
|
|
11
10
|
throw new Error("Couldn't find any action for ".concat(title, " (").concat(key, ")"));
|
|
12
11
|
}
|
|
13
|
-
return _objectSpread(_objectSpread(
|
|
12
|
+
return _objectSpread(_objectSpread({
|
|
14
13
|
key: key,
|
|
15
14
|
title: title,
|
|
16
15
|
extensionType: manifest.type,
|
|
@@ -20,10 +19,9 @@ export function buildMenuItem(manifest, extensionModule) {
|
|
|
20
19
|
categories: extensionModule.categories || manifest.categories || [],
|
|
21
20
|
description: extensionModule.description || manifest.description,
|
|
22
21
|
summary: manifest.summary,
|
|
23
|
-
documentationUrl: manifest.documentationUrl
|
|
24
|
-
}, (fg('cc_fd_wb_create_priority_in_slash_menu_enabled') || fg('rovo_chat_enable_skills_ui_m1')) && {
|
|
22
|
+
documentationUrl: manifest.documentationUrl,
|
|
25
23
|
priority: extensionModule.priority
|
|
26
|
-
}
|
|
24
|
+
}, extensionModule.lozenge != null && {
|
|
27
25
|
lozenge: extensionModule.lozenge
|
|
28
26
|
}), {}, {
|
|
29
27
|
icon: extensionModule.icon || manifest.icons['48'],
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "116.
|
|
23
|
+
var packageVersion = "116.26.1";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "116.
|
|
24
|
+
var packageVersion = "116.26.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette/text-background-color';
|
|
2
|
+
import { getTokenCSSVariableValueForNonActiveTheme } from './utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolves a highlight (background) color to its equivalent value in the
|
|
6
|
+
* non-active theme.
|
|
7
|
+
*
|
|
8
|
+
* Shared between the highlight plugin state (`getActiveColorInNonActiveTheme`)
|
|
9
|
+
* and the color-accessibility selection walker.
|
|
10
|
+
*
|
|
11
|
+
* @param color - The raw highlight color mark (hex/token) or null for no
|
|
12
|
+
* highlight.
|
|
13
|
+
* @param options - Default background color and optional transparent sentinel.
|
|
14
|
+
* @param options.defaultBackgroundColor - Fallback value returned when the color
|
|
15
|
+
* cannot be resolved to a raw token (used for the default surface background).
|
|
16
|
+
* @param options.transparentColor - Optional sentinel representing an explicit
|
|
17
|
+
* transparent highlight. When provided, a color equal to this value is treated
|
|
18
|
+
* the same as no highlight (mapped to the surface elevation). The single-value
|
|
19
|
+
* plugin state never carries this sentinel, but the selection walker reads raw
|
|
20
|
+
* node marks that can, so callers walking the document should pass it.
|
|
21
|
+
*/
|
|
22
|
+
export var getHighlightColorInNonActiveTheme = function getHighlightColorInNonActiveTheme(color, _ref) {
|
|
23
|
+
var defaultBackgroundColor = _ref.defaultBackgroundColor,
|
|
24
|
+
transparentColor = _ref.transparentColor;
|
|
25
|
+
if (!color || transparentColor !== undefined && color === transparentColor) {
|
|
26
|
+
return getTokenCSSVariableValueForNonActiveTheme("var(--ds-surface, #FFFFFF)", defaultBackgroundColor);
|
|
27
|
+
}
|
|
28
|
+
var colorValue = hexToEditorTextBackgroundPaletteColor(color) || color;
|
|
29
|
+
return getTokenCSSVariableValueForNonActiveTheme(colorValue, color);
|
|
30
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette/text';
|
|
2
|
+
import { getTokenCSSVariableValueForNonActiveTheme } from './utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resolves a text (foreground) color to its equivalent value in the non-active
|
|
6
|
+
* theme (i.e. dark when the editor is in light mode and vice versa).
|
|
7
|
+
*
|
|
8
|
+
* Shared between the text-color plugin state (`getColorInNonActiveTheme`) and the
|
|
9
|
+
* color-accessibility selection walker so both evaluate colors identically.
|
|
10
|
+
*
|
|
11
|
+
* @param color - The raw text color mark (hex/token) or null for the default.
|
|
12
|
+
* @param defaultColor - The plugin's default text color, used when `color` is
|
|
13
|
+
* absent or explicitly the default.
|
|
14
|
+
*/
|
|
15
|
+
export var getTextColorInNonActiveTheme = function getTextColorInNonActiveTheme(color, defaultColor) {
|
|
16
|
+
if (!color || color === defaultColor) {
|
|
17
|
+
return getTokenCSSVariableValueForNonActiveTheme("var(--ds-text, #292A2E)", defaultColor);
|
|
18
|
+
}
|
|
19
|
+
var colorValue = hexToEditorTextPaletteColor(color) || color;
|
|
20
|
+
return getTokenCSSVariableValueForNonActiveTheme(colorValue, color);
|
|
21
|
+
};
|
|
@@ -94,5 +94,6 @@ export var getTokenCSSVariableValueForNonActiveTheme = function getTokenCSSVaria
|
|
|
94
94
|
}
|
|
95
95
|
return (cssVariableParts === null || cssVariableParts === void 0 ? void 0 : cssVariableParts.fallback) || fallback;
|
|
96
96
|
};
|
|
97
|
+
|
|
97
98
|
// eslint-disable-next-line @atlaskit/editor/no-re-export
|
|
98
99
|
export { getSelectedRowAndColumn } from './getSelectedRowAndColumn';
|
|
@@ -7,6 +7,8 @@ export { SelectedTextColorProvider } from './ColorPalette/SelectedTextColorProvi
|
|
|
7
7
|
export { useSelectedTextColor } from './ColorPalette/useSelectedTextColor';
|
|
8
8
|
export { getSelectedRowAndColumn } from './ColorPalette/getSelectedRowAndColumn';
|
|
9
9
|
export { DEFAULT_COLOR_PICKER_COLUMNS, getColorsPerRowFromPalette, getSelectedRowAndColumnFromPalette, getTokenCSSVariableValue, getTokenCSSVariableValueForNonActiveTheme } from './ColorPalette/utils';
|
|
10
|
+
export { getHighlightColorInNonActiveTheme } from './ColorPalette/getHighlightColorInNonActiveTheme';
|
|
11
|
+
export { getTextColorInNonActiveTheme } from './ColorPalette/getTextColorInNonActiveTheme';
|
|
10
12
|
export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/cellBackgroundColorPalette';
|
|
11
13
|
export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
|
|
12
14
|
export { panelBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a highlight (background) color to its equivalent value in the
|
|
3
|
+
* non-active theme.
|
|
4
|
+
*
|
|
5
|
+
* Shared between the highlight plugin state (`getActiveColorInNonActiveTheme`)
|
|
6
|
+
* and the color-accessibility selection walker.
|
|
7
|
+
*
|
|
8
|
+
* @param color - The raw highlight color mark (hex/token) or null for no
|
|
9
|
+
* highlight.
|
|
10
|
+
* @param options - Default background color and optional transparent sentinel.
|
|
11
|
+
* @param options.defaultBackgroundColor - Fallback value returned when the color
|
|
12
|
+
* cannot be resolved to a raw token (used for the default surface background).
|
|
13
|
+
* @param options.transparentColor - Optional sentinel representing an explicit
|
|
14
|
+
* transparent highlight. When provided, a color equal to this value is treated
|
|
15
|
+
* the same as no highlight (mapped to the surface elevation). The single-value
|
|
16
|
+
* plugin state never carries this sentinel, but the selection walker reads raw
|
|
17
|
+
* node marks that can, so callers walking the document should pass it.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getHighlightColorInNonActiveTheme: (color: string | null, { defaultBackgroundColor, transparentColor, }: {
|
|
20
|
+
defaultBackgroundColor: string;
|
|
21
|
+
transparentColor?: string;
|
|
22
|
+
}) => string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a text (foreground) color to its equivalent value in the non-active
|
|
3
|
+
* theme (i.e. dark when the editor is in light mode and vice versa).
|
|
4
|
+
*
|
|
5
|
+
* Shared between the text-color plugin state (`getColorInNonActiveTheme`) and the
|
|
6
|
+
* color-accessibility selection walker so both evaluate colors identically.
|
|
7
|
+
*
|
|
8
|
+
* @param color - The raw text color mark (hex/token) or null for the default.
|
|
9
|
+
* @param defaultColor - The plugin's default text color, used when `color` is
|
|
10
|
+
* absent or explicitly the default.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getTextColorInNonActiveTheme: (color: string | null, defaultColor: string) => string;
|
|
@@ -4,6 +4,8 @@ export { SelectedTextColorProvider } from './ColorPalette/SelectedTextColorProvi
|
|
|
4
4
|
export { useSelectedTextColor } from './ColorPalette/useSelectedTextColor';
|
|
5
5
|
export { getSelectedRowAndColumn } from './ColorPalette/getSelectedRowAndColumn';
|
|
6
6
|
export { DEFAULT_COLOR_PICKER_COLUMNS, getColorsPerRowFromPalette, getSelectedRowAndColumnFromPalette, getTokenCSSVariableValue, getTokenCSSVariableValueForNonActiveTheme, } from './ColorPalette/utils';
|
|
7
|
+
export { getHighlightColorInNonActiveTheme } from './ColorPalette/getHighlightColorInNonActiveTheme';
|
|
8
|
+
export { getTextColorInNonActiveTheme } from './ColorPalette/getTextColorInNonActiveTheme';
|
|
7
9
|
export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/cellBackgroundColorPalette';
|
|
8
10
|
export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
|
|
9
11
|
export { panelBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "116.26.
|
|
3
|
+
"version": "116.26.2",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -216,18 +216,12 @@
|
|
|
216
216
|
"platform_editor_fix_mixed_types_column_sort": {
|
|
217
217
|
"type": "boolean"
|
|
218
218
|
},
|
|
219
|
-
"cc_fd_wb_create_priority_in_slash_menu_enabled": {
|
|
220
|
-
"type": "boolean"
|
|
221
|
-
},
|
|
222
219
|
"draft_reply_contextual_pills_gate": {
|
|
223
220
|
"type": "boolean"
|
|
224
221
|
},
|
|
225
222
|
"platform_editor_sentry_breadcrumbs": {
|
|
226
223
|
"type": "boolean"
|
|
227
224
|
},
|
|
228
|
-
"rovo_chat_enable_skills_ui_m1": {
|
|
229
|
-
"type": "boolean"
|
|
230
|
-
},
|
|
231
225
|
"platform_fix_macro_renders_in_layouts": {
|
|
232
226
|
"type": "boolean"
|
|
233
227
|
},
|