@atlaskit/editor-toolbar 2.1.7 → 2.1.9
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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 2.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c2986ab2c7a01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c2986ab2c7a01) -
|
|
8
|
+
Cleans up prefer static regex violations and enables e18e rule
|
|
9
|
+
|
|
10
|
+
## 2.1.8
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 2.1.7
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/compass.yml
CHANGED
|
@@ -24,6 +24,9 @@ customFields:
|
|
|
24
24
|
- name: Department
|
|
25
25
|
type: text
|
|
26
26
|
value: Eng - Editor Autonomy - Jenga
|
|
27
|
+
- name: Trusted Reviewer Teams
|
|
28
|
+
type: text
|
|
29
|
+
value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
|
|
27
30
|
- name: Technical Owner
|
|
28
31
|
type: user
|
|
29
32
|
value: ari:cloud:identity::user/712020:8ef57ce4-d614-485e-8764-89301a16b906 # Casper Tiedemann
|
|
@@ -13,6 +13,10 @@ exports.getTokenCSSVariableValue = void 0;
|
|
|
13
13
|
*/
|
|
14
14
|
var DEFAULT_COLOR_PICKER_COLUMNS = exports.DEFAULT_COLOR_PICKER_COLUMNS = 7;
|
|
15
15
|
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
18
|
+
var CSS_VAR_REGEX = /var\(([^,\)]+)(,.*)?/;
|
|
19
|
+
|
|
16
20
|
/**
|
|
17
21
|
* Splits a palette array into rows based on the specified number of columns
|
|
18
22
|
* @param palette - Array of palette colors
|
|
@@ -74,9 +78,7 @@ function getSelectedRowAndColumnFromPalette(palette, selectedColor) {
|
|
|
74
78
|
*/
|
|
75
79
|
var getTokenCSSVariableValue = exports.getTokenCSSVariableValue = function getTokenCSSVariableValue(variableExpression) {
|
|
76
80
|
// Match CSS variable pattern: var(--variable-name, fallback)
|
|
77
|
-
|
|
78
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
79
|
-
var matcher = variableExpression.match(/var\(([^,\)]+)(,.*)?/);
|
|
81
|
+
var matcher = variableExpression.match(CSS_VAR_REGEX);
|
|
80
82
|
if (matcher) {
|
|
81
83
|
var variable = matcher[1].trim();
|
|
82
84
|
var fallback = matcher[2] ? matcher[2].replace(',', '').trim() : '';
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const DEFAULT_COLOR_PICKER_COLUMNS = 7;
|
|
5
5
|
|
|
6
|
+
// Ignored via go/ees005
|
|
7
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
8
|
+
const CSS_VAR_REGEX = /var\(([^,\)]+)(,.*)?/;
|
|
9
|
+
|
|
6
10
|
/**
|
|
7
11
|
* Splits a palette array into rows based on the specified number of columns
|
|
8
12
|
* @param palette - Array of palette colors
|
|
@@ -63,9 +67,7 @@ export function getSelectedRowAndColumnFromPalette(palette, selectedColor, cols
|
|
|
63
67
|
*/
|
|
64
68
|
export const getTokenCSSVariableValue = variableExpression => {
|
|
65
69
|
// Match CSS variable pattern: var(--variable-name, fallback)
|
|
66
|
-
|
|
67
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
68
|
-
const matcher = variableExpression.match(/var\(([^,\)]+)(,.*)?/);
|
|
70
|
+
const matcher = variableExpression.match(CSS_VAR_REGEX);
|
|
69
71
|
if (matcher) {
|
|
70
72
|
const variable = matcher[1].trim();
|
|
71
73
|
const fallback = matcher[2] ? matcher[2].replace(',', '').trim() : '';
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export var DEFAULT_COLOR_PICKER_COLUMNS = 7;
|
|
5
5
|
|
|
6
|
+
// Ignored via go/ees005
|
|
7
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
8
|
+
var CSS_VAR_REGEX = /var\(([^,\)]+)(,.*)?/;
|
|
9
|
+
|
|
6
10
|
/**
|
|
7
11
|
* Splits a palette array into rows based on the specified number of columns
|
|
8
12
|
* @param palette - Array of palette colors
|
|
@@ -64,9 +68,7 @@ export function getSelectedRowAndColumnFromPalette(palette, selectedColor) {
|
|
|
64
68
|
*/
|
|
65
69
|
export var getTokenCSSVariableValue = function getTokenCSSVariableValue(variableExpression) {
|
|
66
70
|
// Match CSS variable pattern: var(--variable-name, fallback)
|
|
67
|
-
|
|
68
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
69
|
-
var matcher = variableExpression.match(/var\(([^,\)]+)(,.*)?/);
|
|
71
|
+
var matcher = variableExpression.match(CSS_VAR_REGEX);
|
|
70
72
|
if (matcher) {
|
|
71
73
|
var variable = matcher[1].trim();
|
|
72
74
|
var fallback = matcher[2] ? matcher[2].replace(',', '').trim() : '';
|
|
@@ -17,8 +17,8 @@ export declare function getColorsPerRowFromPalette(palette: PaletteColor[], cols
|
|
|
17
17
|
* @returns Object containing row and column indices
|
|
18
18
|
*/
|
|
19
19
|
export declare function getSelectedRowAndColumn(colorsPerRow: PaletteColor[][], selectedColor: string | null): {
|
|
20
|
-
selectedRowIndex: number;
|
|
21
20
|
selectedColumnIndex: number;
|
|
21
|
+
selectedRowIndex: number;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Finds the row and column indices of a selected color in a flat palette array
|
|
@@ -28,8 +28,8 @@ export declare function getSelectedRowAndColumn(colorsPerRow: PaletteColor[][],
|
|
|
28
28
|
* @returns Object containing row and column indices
|
|
29
29
|
*/
|
|
30
30
|
export declare function getSelectedRowAndColumnFromPalette(palette: PaletteColor[], selectedColor: string | null, cols?: number): {
|
|
31
|
-
selectedRowIndex: number;
|
|
32
31
|
selectedColumnIndex: number;
|
|
32
|
+
selectedRowIndex: number;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Extracts the actual color value from a CSS variable expression
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.1.
|
|
6
|
+
"version": "2.1.9",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"react-compiler": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/popup": "^5.1.0",
|
|
39
39
|
"@atlaskit/primitives": "^20.3.0",
|
|
40
40
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^120.1.0",
|
|
42
42
|
"@atlaskit/tokens": "^15.3.0",
|
|
43
43
|
"@atlaskit/tooltip": "^23.1.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|