@wordpress/format-library 5.32.0 → 5.32.1-next.ff1cebbba.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/build/bold/index.js +69 -58
- package/build/bold/index.js.map +7 -1
- package/build/code/index.js +62 -54
- package/build/code/index.js.map +7 -1
- package/build/default-formats.js +52 -24
- package/build/default-formats.js.map +7 -1
- package/build/image/index.js +185 -153
- package/build/image/index.js.map +7 -1
- package/build/index.js +28 -18
- package/build/index.js.map +7 -1
- package/build/italic/index.js +69 -58
- package/build/italic/index.js.map +7 -1
- package/build/keyboard/index.js +47 -36
- package/build/keyboard/index.js.map +7 -1
- package/build/language/index.js +145 -113
- package/build/language/index.js.map +7 -1
- package/build/link/css-classes-setting.js +81 -0
- package/build/link/css-classes-setting.js.map +7 -0
- package/build/link/index.js +162 -167
- package/build/link/index.js.map +7 -1
- package/build/link/inline.js +186 -174
- package/build/link/inline.js.map +7 -1
- package/build/link/use-link-instance-key.js +25 -19
- package/build/link/use-link-instance-key.js.map +7 -1
- package/build/link/utils.js +66 -115
- package/build/link/utils.js.map +7 -1
- package/build/lock-unlock.js +31 -15
- package/build/lock-unlock.js.map +7 -1
- package/build/non-breaking-space/index.js +44 -28
- package/build/non-breaking-space/index.js.map +7 -1
- package/build/strikethrough/index.js +57 -42
- package/build/strikethrough/index.js.map +7 -1
- package/build/subscript/index.js +47 -36
- package/build/subscript/index.js.map +7 -1
- package/build/superscript/index.js +47 -36
- package/build/superscript/index.js.map +7 -1
- package/build/text-color/index.js +102 -70
- package/build/text-color/index.js.map +7 -1
- package/build/text-color/inline.js +118 -116
- package/build/text-color/inline.js.map +7 -1
- package/build/underline/index.js +62 -40
- package/build/underline/index.js.map +7 -1
- package/build/unknown/index.js +51 -37
- package/build/unknown/index.js.map +7 -1
- package/build-module/bold/index.js +52 -52
- package/build-module/bold/index.js.map +7 -1
- package/build-module/code/index.js +41 -46
- package/build-module/code/index.js.map +7 -1
- package/build-module/default-formats.js +34 -19
- package/build-module/default-formats.js.map +7 -1
- package/build-module/image/index.js +174 -144
- package/build-module/image/index.js.map +7 -1
- package/build-module/index.js +6 -14
- package/build-module/index.js.map +7 -1
- package/build-module/italic/index.js +52 -52
- package/build-module/italic/index.js.map +7 -1
- package/build-module/keyboard/index.js +25 -30
- package/build-module/keyboard/index.js.map +7 -1
- package/build-module/language/index.js +128 -105
- package/build-module/language/index.js.map +7 -1
- package/build-module/link/css-classes-setting.js +67 -0
- package/build-module/link/css-classes-setting.js.map +7 -0
- package/build-module/link/index.js +128 -146
- package/build-module/link/index.js.map +7 -1
- package/build-module/link/inline.js +158 -154
- package/build-module/link/inline.js.map +7 -1
- package/build-module/link/use-link-instance-key.js +7 -14
- package/build-module/link/use-link-instance-key.js.map +7 -1
- package/build-module/link/utils.js +46 -101
- package/build-module/link/utils.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/non-breaking-space/index.js +22 -22
- package/build-module/non-breaking-space/index.js.map +7 -1
- package/build-module/strikethrough/index.js +38 -36
- package/build-module/strikethrough/index.js.map +7 -1
- package/build-module/subscript/index.js +25 -30
- package/build-module/subscript/index.js.map +7 -1
- package/build-module/superscript/index.js +25 -30
- package/build-module/superscript/index.js.map +7 -1
- package/build-module/text-color/index.js +72 -61
- package/build-module/text-color/index.js.map +7 -1
- package/build-module/text-color/inline.js +107 -106
- package/build-module/text-color/inline.js.map +7 -1
- package/build-module/underline/index.js +43 -34
- package/build-module/underline/index.js.map +7 -1
- package/build-module/unknown/index.js +26 -28
- package/build-module/unknown/index.js.map +7 -1
- package/build-style/style-rtl.css +0 -194
- package/build-style/style.css +0 -194
- package/package.json +21 -15
- package/src/image/style.scss +3 -0
- package/src/link/css-classes-setting.js +89 -0
- package/src/link/index.js +1 -0
- package/src/link/inline.js +19 -0
- package/src/link/style.scss +3 -0
- package/src/link/test/css-classes-setting.js +144 -0
- package/src/link/utils.js +8 -0
- package/src/style.scss +4 -4
- package/src/text-color/style.scss +2 -0
- package/build/default-formats.native.js +0 -16
- package/build/default-formats.native.js.map +0 -1
- package/build/link/index.native.js +0 -174
- package/build/link/index.native.js.map +0 -1
- package/build/link/modal-screens/link-picker-screen.native.js +0 -67
- package/build/link/modal-screens/link-picker-screen.native.js.map +0 -1
- package/build/link/modal-screens/link-settings-screen.native.js +0 -226
- package/build/link/modal-screens/link-settings-screen.native.js.map +0 -1
- package/build/link/modal-screens/screens.native.js +0 -11
- package/build/link/modal-screens/screens.native.js.map +0 -1
- package/build/link/modal.native.js +0 -53
- package/build/link/modal.native.js.map +0 -1
- package/build/text-color/index.native.js +0 -134
- package/build/text-color/index.native.js.map +0 -1
- package/build/text-color/inline.native.js +0 -150
- package/build/text-color/inline.native.js.map +0 -1
- package/build-module/default-formats.native.js +0 -10
- package/build-module/default-formats.native.js.map +0 -1
- package/build-module/link/index.native.js +0 -166
- package/build-module/link/index.native.js.map +0 -1
- package/build-module/link/modal-screens/link-picker-screen.native.js +0 -59
- package/build-module/link/modal-screens/link-picker-screen.native.js.map +0 -1
- package/build-module/link/modal-screens/link-settings-screen.native.js +0 -218
- package/build-module/link/modal-screens/link-settings-screen.native.js.map +0 -1
- package/build-module/link/modal-screens/screens.native.js +0 -5
- package/build-module/link/modal-screens/screens.native.js.map +0 -1
- package/build-module/link/modal.native.js +0 -45
- package/build-module/link/modal.native.js.map +0 -1
- package/build-module/text-color/index.native.js +0 -126
- package/build-module/text-color/index.native.js.map +0 -1
- package/build-module/text-color/inline.native.js +0 -142
- package/build-module/text-color/inline.native.js.map +0 -1
|
@@ -1,41 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const name = 'core/superscript';
|
|
10
|
-
const title = __('Superscript');
|
|
11
|
-
export const superscript = {
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import { toggleFormat } from "@wordpress/rich-text";
|
|
4
|
+
import { RichTextToolbarButton } from "@wordpress/block-editor";
|
|
5
|
+
import { superscript as superscriptIcon } from "@wordpress/icons";
|
|
6
|
+
const name = "core/superscript";
|
|
7
|
+
const title = __("Superscript");
|
|
8
|
+
const superscript = {
|
|
12
9
|
name,
|
|
13
10
|
title,
|
|
14
|
-
tagName:
|
|
11
|
+
tagName: "sup",
|
|
15
12
|
className: null,
|
|
16
|
-
edit({
|
|
17
|
-
isActive,
|
|
18
|
-
value,
|
|
19
|
-
onChange,
|
|
20
|
-
onFocus
|
|
21
|
-
}) {
|
|
13
|
+
edit({ isActive, value, onChange, onFocus }) {
|
|
22
14
|
function onToggle() {
|
|
23
|
-
onChange(toggleFormat(value, {
|
|
24
|
-
type: name,
|
|
25
|
-
title
|
|
26
|
-
}));
|
|
15
|
+
onChange(toggleFormat(value, { type: name, title }));
|
|
27
16
|
}
|
|
28
17
|
function onClick() {
|
|
29
18
|
onToggle();
|
|
30
19
|
onFocus();
|
|
31
20
|
}
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
RichTextToolbarButton,
|
|
23
|
+
{
|
|
24
|
+
icon: superscriptIcon,
|
|
25
|
+
title,
|
|
26
|
+
onClick,
|
|
27
|
+
isActive,
|
|
28
|
+
role: "menuitemcheckbox"
|
|
29
|
+
}
|
|
30
|
+
);
|
|
39
31
|
}
|
|
40
32
|
};
|
|
41
|
-
|
|
33
|
+
export {
|
|
34
|
+
superscript
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/superscript/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { toggleFormat } from '@wordpress/rich-text';\nimport { RichTextToolbarButton } from '@wordpress/block-editor';\nimport { superscript as superscriptIcon } from '@wordpress/icons';\n\nconst name = 'core/superscript';\nconst title = __( 'Superscript' );\n\nexport const superscript = {\n\tname,\n\ttitle,\n\ttagName: 'sup',\n\tclassName: null,\n\tedit( { isActive, value, onChange, onFocus } ) {\n\t\tfunction onToggle() {\n\t\t\tonChange( toggleFormat( value, { type: name, title } ) );\n\t\t}\n\n\t\tfunction onClick() {\n\t\t\tonToggle();\n\t\t\tonFocus();\n\t\t}\n\n\t\treturn (\n\t\t\t<RichTextToolbarButton\n\t\t\t\ticon={ superscriptIcon }\n\t\t\t\ttitle={ title }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tisActive={ isActive }\n\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t/>\n\t\t);\n\t},\n};\n"],
|
|
5
|
+
"mappings": "AA2BG;AAxBH,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AACtC,SAAS,eAAe,uBAAuB;AAE/C,MAAM,OAAO;AACb,MAAM,QAAQ,GAAI,aAAc;AAEzB,MAAM,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AAAA,EACX,KAAM,EAAE,UAAU,OAAO,UAAU,QAAQ,GAAI;AAC9C,aAAS,WAAW;AACnB,eAAU,aAAc,OAAO,EAAE,MAAM,MAAM,MAAM,CAAE,CAAE;AAAA,IACxD;AAEA,aAAS,UAAU;AAClB,eAAS;AACT,cAAQ;AAAA,IACT;AAEA,WACC;AAAA,MAAC;AAAA;AAAA,QACA,MAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAK;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,45 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const transparentValue = 'rgba(0, 0, 0, 0)';
|
|
16
|
-
const name = 'core/text-color';
|
|
17
|
-
const title = __('Highlight');
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import { useMemo, useState } from "@wordpress/element";
|
|
4
|
+
import { RichTextToolbarButton, useSettings } from "@wordpress/block-editor";
|
|
5
|
+
import {
|
|
6
|
+
Icon,
|
|
7
|
+
color as colorIcon,
|
|
8
|
+
textColor as textColorIcon
|
|
9
|
+
} from "@wordpress/icons";
|
|
10
|
+
import { removeFormat } from "@wordpress/rich-text";
|
|
11
|
+
import { default as InlineColorUI, getActiveColors } from "./inline";
|
|
12
|
+
const transparentValue = "rgba(0, 0, 0, 0)";
|
|
13
|
+
const name = "core/text-color";
|
|
14
|
+
const title = __("Highlight");
|
|
18
15
|
const EMPTY_ARRAY = [];
|
|
19
16
|
function getComputedStyleProperty(element, property) {
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
} = element;
|
|
23
|
-
const {
|
|
24
|
-
defaultView
|
|
25
|
-
} = ownerDocument;
|
|
17
|
+
const { ownerDocument } = element;
|
|
18
|
+
const { defaultView } = ownerDocument;
|
|
26
19
|
const style = defaultView.getComputedStyle(element);
|
|
27
20
|
const value = style.getPropertyValue(property);
|
|
28
|
-
if (property ===
|
|
21
|
+
if (property === "background-color" && value === transparentValue && element.parentElement) {
|
|
29
22
|
return getComputedStyleProperty(element.parentElement, property);
|
|
30
23
|
}
|
|
31
24
|
return value;
|
|
32
25
|
}
|
|
33
|
-
function fillComputedColors(element, {
|
|
34
|
-
color,
|
|
35
|
-
backgroundColor
|
|
36
|
-
}) {
|
|
26
|
+
function fillComputedColors(element, { color, backgroundColor }) {
|
|
37
27
|
if (!color && !backgroundColor) {
|
|
38
28
|
return;
|
|
39
29
|
}
|
|
40
30
|
return {
|
|
41
|
-
color: color || getComputedStyleProperty(element,
|
|
42
|
-
backgroundColor: backgroundColor === transparentValue ? getComputedStyleProperty(element,
|
|
31
|
+
color: color || getComputedStyleProperty(element, "color"),
|
|
32
|
+
backgroundColor: backgroundColor === transparentValue ? getComputedStyleProperty(element, "background-color") : backgroundColor
|
|
43
33
|
};
|
|
44
34
|
}
|
|
45
35
|
function TextColorEdit({
|
|
@@ -49,46 +39,67 @@ function TextColorEdit({
|
|
|
49
39
|
activeAttributes,
|
|
50
40
|
contentRef
|
|
51
41
|
}) {
|
|
52
|
-
const [allowCustomControl, colors = EMPTY_ARRAY] = useSettings(
|
|
42
|
+
const [allowCustomControl, colors = EMPTY_ARRAY] = useSettings(
|
|
43
|
+
"color.custom",
|
|
44
|
+
"color.palette"
|
|
45
|
+
);
|
|
53
46
|
const [isAddingColor, setIsAddingColor] = useState(false);
|
|
54
|
-
const colorIndicatorStyle = useMemo(
|
|
47
|
+
const colorIndicatorStyle = useMemo(
|
|
48
|
+
() => fillComputedColors(
|
|
49
|
+
contentRef.current,
|
|
50
|
+
getActiveColors(value, name, colors)
|
|
51
|
+
),
|
|
52
|
+
[contentRef, value, colors]
|
|
53
|
+
);
|
|
55
54
|
const hasColorsToChoose = !!colors.length || allowCustomControl;
|
|
56
55
|
if (!hasColorsToChoose && !isActive) {
|
|
57
56
|
return null;
|
|
58
57
|
}
|
|
59
|
-
return
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
58
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
RichTextToolbarButton,
|
|
61
|
+
{
|
|
62
|
+
className: "format-library-text-color-button",
|
|
63
|
+
isActive,
|
|
64
|
+
icon: /* @__PURE__ */ jsx(
|
|
65
|
+
Icon,
|
|
66
|
+
{
|
|
67
|
+
icon: Object.keys(activeAttributes).length ? textColorIcon : colorIcon,
|
|
68
|
+
style: colorIndicatorStyle
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
title,
|
|
72
|
+
onClick: hasColorsToChoose ? () => setIsAddingColor(true) : () => onChange(removeFormat(value, name)),
|
|
73
|
+
role: "menuitemcheckbox"
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
isAddingColor && /* @__PURE__ */ jsx(
|
|
77
|
+
InlineColorUI,
|
|
78
|
+
{
|
|
79
|
+
name,
|
|
80
|
+
onClose: () => setIsAddingColor(false),
|
|
81
|
+
activeAttributes,
|
|
82
|
+
value,
|
|
83
|
+
onChange,
|
|
84
|
+
contentRef,
|
|
85
|
+
isActive
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] });
|
|
82
89
|
}
|
|
83
|
-
|
|
90
|
+
const textColor = {
|
|
84
91
|
name,
|
|
85
92
|
title,
|
|
86
|
-
tagName:
|
|
87
|
-
className:
|
|
93
|
+
tagName: "mark",
|
|
94
|
+
className: "has-inline-color",
|
|
88
95
|
attributes: {
|
|
89
|
-
style:
|
|
90
|
-
class:
|
|
96
|
+
style: "style",
|
|
97
|
+
class: "class"
|
|
91
98
|
},
|
|
92
99
|
edit: TextColorEdit
|
|
93
100
|
};
|
|
94
|
-
|
|
101
|
+
export {
|
|
102
|
+
textColor,
|
|
103
|
+
transparentValue
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/text-color/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { RichTextToolbarButton, useSettings } from '@wordpress/block-editor';\nimport {\n\tIcon,\n\tcolor as colorIcon,\n\ttextColor as textColorIcon,\n} from '@wordpress/icons';\nimport { removeFormat } from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { default as InlineColorUI, getActiveColors } from './inline';\n\nexport const transparentValue = 'rgba(0, 0, 0, 0)';\n\nconst name = 'core/text-color';\nconst title = __( 'Highlight' );\n\nconst EMPTY_ARRAY = [];\n\nfunction getComputedStyleProperty( element, property ) {\n\tconst { ownerDocument } = element;\n\tconst { defaultView } = ownerDocument;\n\tconst style = defaultView.getComputedStyle( element );\n\tconst value = style.getPropertyValue( property );\n\n\tif (\n\t\tproperty === 'background-color' &&\n\t\tvalue === transparentValue &&\n\t\telement.parentElement\n\t) {\n\t\treturn getComputedStyleProperty( element.parentElement, property );\n\t}\n\n\treturn value;\n}\n\nfunction fillComputedColors( element, { color, backgroundColor } ) {\n\tif ( ! color && ! backgroundColor ) {\n\t\treturn;\n\t}\n\n\treturn {\n\t\tcolor: color || getComputedStyleProperty( element, 'color' ),\n\t\tbackgroundColor:\n\t\t\tbackgroundColor === transparentValue\n\t\t\t\t? getComputedStyleProperty( element, 'background-color' )\n\t\t\t\t: backgroundColor,\n\t};\n}\n\nfunction TextColorEdit( {\n\tvalue,\n\tonChange,\n\tisActive,\n\tactiveAttributes,\n\tcontentRef,\n} ) {\n\tconst [ allowCustomControl, colors = EMPTY_ARRAY ] = useSettings(\n\t\t'color.custom',\n\t\t'color.palette'\n\t);\n\tconst [ isAddingColor, setIsAddingColor ] = useState( false );\n\tconst colorIndicatorStyle = useMemo(\n\t\t() =>\n\t\t\tfillComputedColors(\n\t\t\t\tcontentRef.current,\n\t\t\t\tgetActiveColors( value, name, colors )\n\t\t\t),\n\t\t[ contentRef, value, colors ]\n\t);\n\n\tconst hasColorsToChoose = !! colors.length || allowCustomControl;\n\tif ( ! hasColorsToChoose && ! isActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<RichTextToolbarButton\n\t\t\t\tclassName=\"format-library-text-color-button\"\n\t\t\t\tisActive={ isActive }\n\t\t\t\ticon={\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\tObject.keys( activeAttributes ).length\n\t\t\t\t\t\t\t\t? textColorIcon\n\t\t\t\t\t\t\t\t: colorIcon\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyle={ colorIndicatorStyle }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\ttitle={ title }\n\t\t\t\t// If has no colors to choose but a color is active remove the color onClick.\n\t\t\t\tonClick={\n\t\t\t\t\thasColorsToChoose\n\t\t\t\t\t\t? () => setIsAddingColor( true )\n\t\t\t\t\t\t: () => onChange( removeFormat( value, name ) )\n\t\t\t\t}\n\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t/>\n\t\t\t{ isAddingColor && (\n\t\t\t\t<InlineColorUI\n\t\t\t\t\tname={ name }\n\t\t\t\t\tonClose={ () => setIsAddingColor( false ) }\n\t\t\t\t\tactiveAttributes={ activeAttributes }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\tisActive={ isActive }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport const textColor = {\n\tname,\n\ttitle,\n\ttagName: 'mark',\n\tclassName: 'has-inline-color',\n\tattributes: {\n\t\tstyle: 'style',\n\t\tclass: 'class',\n\t},\n\tedit: TextColorEdit,\n};\n"],
|
|
5
|
+
"mappings": "AAmFE,mBAKG,KALH;AAhFF,SAAS,UAAU;AACnB,SAAS,SAAS,gBAAgB;AAClC,SAAS,uBAA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A,SACC,iCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACA,WAAU;AAAA,QACV;AAAA,QACA,MACC;AAAA,UAAC;AAAA;AAAA,YACA,MACC,OAAO,KAAM,gBAAiB,EAAE,SAC7B,gBACA;AAAA,YAEJ,OAAQ;AAAA;AAAA,QACT;AAAA,QAED;AAAA,QAEA,SACC,oBACG,MAAM,iBAAkB,IAAK,IAC7B,MAAM,SAAU,aAAc,OAAO,IAAK,CAAE;AAAA,QAEhD,MAAK;AAAA;AAAA,IACN;AAAA,IACE,iBACD;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,SAAU,MAAM,iBAAkB,KAAM;AAAA,QACxC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;AAEO,MAAM,YAAY;AAAA,EACxB;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,EACR;AAAA,EACA,MAAM;AACP;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,55 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "@wordpress/element";
|
|
3
|
+
import { useSelect } from "@wordpress/data";
|
|
4
|
+
import {
|
|
5
|
+
applyFormat,
|
|
6
|
+
removeFormat,
|
|
7
|
+
getActiveFormat,
|
|
8
|
+
useAnchor
|
|
9
|
+
} from "@wordpress/rich-text";
|
|
10
|
+
import {
|
|
11
|
+
ColorPalette,
|
|
12
|
+
getColorClassName,
|
|
13
|
+
getColorObjectByColorValue,
|
|
14
|
+
getColorObjectByAttributeValues,
|
|
15
|
+
store as blockEditorStore
|
|
16
|
+
} from "@wordpress/block-editor";
|
|
17
|
+
import {
|
|
18
|
+
Popover,
|
|
19
|
+
privateApis as componentsPrivateApis
|
|
20
|
+
} from "@wordpress/components";
|
|
21
|
+
import { __ } from "@wordpress/i18n";
|
|
22
|
+
import { textColor as settings, transparentValue } from "./index";
|
|
23
|
+
import { unlock } from "../lock-unlock";
|
|
24
|
+
const { Tabs } = unlock(componentsPrivateApis);
|
|
25
|
+
const TABS = [
|
|
26
|
+
{ name: "color", title: __("Text") },
|
|
27
|
+
{ name: "backgroundColor", title: __("Background") }
|
|
28
|
+
];
|
|
29
|
+
function parseCSS(css = "") {
|
|
30
|
+
return css.split(";").reduce((accumulator, rule) => {
|
|
29
31
|
if (rule) {
|
|
30
|
-
const [property, value] = rule.split(
|
|
31
|
-
if (property ===
|
|
32
|
+
const [property, value] = rule.split(":");
|
|
33
|
+
if (property === "color") {
|
|
32
34
|
accumulator.color = value;
|
|
33
35
|
}
|
|
34
|
-
if (property ===
|
|
36
|
+
if (property === "background-color" && value !== transparentValue) {
|
|
35
37
|
accumulator.backgroundColor = value;
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
return accumulator;
|
|
39
41
|
}, {});
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
return className.split(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
43
|
+
function parseClassName(className = "", colorSettings) {
|
|
44
|
+
return className.split(" ").reduce((accumulator, name) => {
|
|
45
|
+
if (name.startsWith("has-") && name.endsWith("-color")) {
|
|
46
|
+
const colorSlug = name.replace(/^has-/, "").replace(/-color$/, "");
|
|
47
|
+
const colorObject = getColorObjectByAttributeValues(
|
|
48
|
+
colorSettings,
|
|
49
|
+
colorSlug
|
|
50
|
+
);
|
|
47
51
|
accumulator.color = colorObject.color;
|
|
48
52
|
}
|
|
49
53
|
return accumulator;
|
|
50
54
|
}, {});
|
|
51
55
|
}
|
|
52
|
-
|
|
56
|
+
function getActiveColors(value, name, colorSettings) {
|
|
53
57
|
const activeColorFormat = getActiveFormat(value, name);
|
|
54
58
|
if (!activeColorFormat) {
|
|
55
59
|
return {};
|
|
@@ -60,10 +64,7 @@ export function getActiveColors(value, name, colorSettings) {
|
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
66
|
function setColors(value, name, colorSettings, colors) {
|
|
63
|
-
const {
|
|
64
|
-
color,
|
|
65
|
-
backgroundColor
|
|
66
|
-
} = {
|
|
67
|
+
const { color, backgroundColor } = {
|
|
67
68
|
...getActiveColors(value, name, colorSettings),
|
|
68
69
|
...colors
|
|
69
70
|
};
|
|
@@ -74,58 +75,50 @@ function setColors(value, name, colorSettings, colors) {
|
|
|
74
75
|
const classNames = [];
|
|
75
76
|
const attributes = {};
|
|
76
77
|
if (backgroundColor) {
|
|
77
|
-
styles.push([
|
|
78
|
+
styles.push(["background-color", backgroundColor].join(":"));
|
|
78
79
|
} else {
|
|
79
|
-
|
|
80
|
-
styles.push(['background-color', transparentValue].join(':'));
|
|
80
|
+
styles.push(["background-color", transparentValue].join(":"));
|
|
81
81
|
}
|
|
82
82
|
if (color) {
|
|
83
83
|
const colorObject = getColorObjectByColorValue(colorSettings, color);
|
|
84
84
|
if (colorObject) {
|
|
85
|
-
classNames.push(getColorClassName(
|
|
85
|
+
classNames.push(getColorClassName("color", colorObject.slug));
|
|
86
86
|
} else {
|
|
87
|
-
styles.push([
|
|
87
|
+
styles.push(["color", color].join(":"));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
if (styles.length) {
|
|
91
|
-
attributes.style = styles.join(
|
|
91
|
+
attributes.style = styles.join(";");
|
|
92
92
|
}
|
|
93
93
|
if (classNames.length) {
|
|
94
|
-
attributes.class = classNames.join(
|
|
94
|
+
attributes.class = classNames.join(" ");
|
|
95
95
|
}
|
|
96
|
-
return applyFormat(value, {
|
|
97
|
-
type: name,
|
|
98
|
-
attributes
|
|
99
|
-
});
|
|
96
|
+
return applyFormat(value, { type: name, attributes });
|
|
100
97
|
}
|
|
101
|
-
function ColorPicker({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
onChange
|
|
106
|
-
}) {
|
|
107
|
-
const colors = useSelect(select => {
|
|
108
|
-
var _getSettings$colors;
|
|
109
|
-
const {
|
|
110
|
-
getSettings
|
|
111
|
-
} = select(blockEditorStore);
|
|
112
|
-
return (_getSettings$colors = getSettings().colors) !== null && _getSettings$colors !== void 0 ? _getSettings$colors : [];
|
|
98
|
+
function ColorPicker({ name, property, value, onChange }) {
|
|
99
|
+
const colors = useSelect((select) => {
|
|
100
|
+
const { getSettings } = select(blockEditorStore);
|
|
101
|
+
return getSettings().colors ?? [];
|
|
113
102
|
}, []);
|
|
114
|
-
const activeColors = useMemo(
|
|
115
|
-
|
|
116
|
-
value
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
103
|
+
const activeColors = useMemo(
|
|
104
|
+
() => getActiveColors(value, name, colors),
|
|
105
|
+
[name, value, colors]
|
|
106
|
+
);
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
|
+
ColorPalette,
|
|
109
|
+
{
|
|
110
|
+
value: activeColors[property],
|
|
111
|
+
onChange: (color) => {
|
|
112
|
+
onChange(
|
|
113
|
+
setColors(value, name, colors, { [property]: color })
|
|
114
|
+
);
|
|
115
|
+
},
|
|
116
|
+
enableAlpha: true,
|
|
117
|
+
__experimentalIsRenderedInSidebar: true
|
|
118
|
+
}
|
|
119
|
+
);
|
|
127
120
|
}
|
|
128
|
-
|
|
121
|
+
function InlineColorUI({
|
|
129
122
|
name,
|
|
130
123
|
value,
|
|
131
124
|
onChange,
|
|
@@ -135,32 +128,40 @@ export default function InlineColorUI({
|
|
|
135
128
|
}) {
|
|
136
129
|
const popoverAnchor = useAnchor({
|
|
137
130
|
editableContentElement: contentRef.current,
|
|
138
|
-
settings: {
|
|
139
|
-
...settings,
|
|
140
|
-
isActive
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
return /*#__PURE__*/_jsx(Popover, {
|
|
144
|
-
onClose: onClose,
|
|
145
|
-
className: "format-library__inline-color-popover",
|
|
146
|
-
anchor: popoverAnchor,
|
|
147
|
-
children: /*#__PURE__*/_jsxs(Tabs, {
|
|
148
|
-
children: [/*#__PURE__*/_jsx(Tabs.TabList, {
|
|
149
|
-
children: TABS.map(tab => /*#__PURE__*/_jsx(Tabs.Tab, {
|
|
150
|
-
tabId: tab.name,
|
|
151
|
-
children: tab.title
|
|
152
|
-
}, tab.name))
|
|
153
|
-
}), TABS.map(tab => /*#__PURE__*/_jsx(Tabs.TabPanel, {
|
|
154
|
-
tabId: tab.name,
|
|
155
|
-
focusable: false,
|
|
156
|
-
children: /*#__PURE__*/_jsx(ColorPicker, {
|
|
157
|
-
name: name,
|
|
158
|
-
property: tab.name,
|
|
159
|
-
value: value,
|
|
160
|
-
onChange: onChange
|
|
161
|
-
})
|
|
162
|
-
}, tab.name))]
|
|
163
|
-
})
|
|
131
|
+
settings: { ...settings, isActive }
|
|
164
132
|
});
|
|
133
|
+
return /* @__PURE__ */ jsx(
|
|
134
|
+
Popover,
|
|
135
|
+
{
|
|
136
|
+
onClose,
|
|
137
|
+
className: "format-library__inline-color-popover",
|
|
138
|
+
anchor: popoverAnchor,
|
|
139
|
+
children: /* @__PURE__ */ jsxs(Tabs, { children: [
|
|
140
|
+
/* @__PURE__ */ jsx(Tabs.TabList, { children: TABS.map((tab) => /* @__PURE__ */ jsx(Tabs.Tab, { tabId: tab.name, children: tab.title }, tab.name)) }),
|
|
141
|
+
TABS.map((tab) => /* @__PURE__ */ jsx(
|
|
142
|
+
Tabs.TabPanel,
|
|
143
|
+
{
|
|
144
|
+
tabId: tab.name,
|
|
145
|
+
focusable: false,
|
|
146
|
+
children: /* @__PURE__ */ jsx(
|
|
147
|
+
ColorPicker,
|
|
148
|
+
{
|
|
149
|
+
name,
|
|
150
|
+
property: tab.name,
|
|
151
|
+
value,
|
|
152
|
+
onChange
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
},
|
|
156
|
+
tab.name
|
|
157
|
+
))
|
|
158
|
+
] })
|
|
159
|
+
}
|
|
160
|
+
);
|
|
165
161
|
}
|
|
166
|
-
|
|
162
|
+
export {
|
|
163
|
+
InlineColorUI as default,
|
|
164
|
+
getActiveColors,
|
|
165
|
+
parseClassName
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=inline.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useSelect","applyFormat","removeFormat","getActiveFormat","useAnchor","ColorPalette","getColorClassName","getColorObjectByColorValue","getColorObjectByAttributeValues","store","blockEditorStore","Popover","privateApis","componentsPrivateApis","__","textColor","settings","transparentValue","unlock","jsx","_jsx","jsxs","_jsxs","Tabs","TABS","name","title","parseCSS","css","split","reduce","accumulator","rule","property","value","color","backgroundColor","parseClassName","className","colorSettings","startsWith","endsWith","colorSlug","replace","colorObject","getActiveColors","activeColorFormat","attributes","style","class","setColors","colors","styles","classNames","push","join","slug","length","type","ColorPicker","onChange","select","_getSettings$colors","getSettings","activeColors","enableAlpha","__experimentalIsRenderedInSidebar","InlineColorUI","onClose","contentRef","isActive","popoverAnchor","editableContentElement","current","anchor","children","TabList","map","tab","Tab","tabId","TabPanel","focusable"],"sources":["@wordpress/format-library/src/text-color/inline.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tapplyFormat,\n\tremoveFormat,\n\tgetActiveFormat,\n\tuseAnchor,\n} from '@wordpress/rich-text';\nimport {\n\tColorPalette,\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tPopover,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { textColor as settings, transparentValue } from './index';\nimport { unlock } from '../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst TABS = [\n\t{ name: 'color', title: __( 'Text' ) },\n\t{ name: 'backgroundColor', title: __( 'Background' ) },\n];\n\nfunction parseCSS( css = '' ) {\n\treturn css.split( ';' ).reduce( ( accumulator, rule ) => {\n\t\tif ( rule ) {\n\t\t\tconst [ property, value ] = rule.split( ':' );\n\t\t\tif ( property === 'color' ) {\n\t\t\t\taccumulator.color = value;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tproperty === 'background-color' &&\n\t\t\t\tvalue !== transparentValue\n\t\t\t) {\n\t\t\t\taccumulator.backgroundColor = value;\n\t\t\t}\n\t\t}\n\t\treturn accumulator;\n\t}, {} );\n}\n\nexport function parseClassName( className = '', colorSettings ) {\n\treturn className.split( ' ' ).reduce( ( accumulator, name ) => {\n\t\t// `colorSlug` could contain dashes, so simply match the start and end.\n\t\tif ( name.startsWith( 'has-' ) && name.endsWith( '-color' ) ) {\n\t\t\tconst colorSlug = name\n\t\t\t\t.replace( /^has-/, '' )\n\t\t\t\t.replace( /-color$/, '' );\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolorSettings,\n\t\t\t\tcolorSlug\n\t\t\t);\n\t\t\taccumulator.color = colorObject.color;\n\t\t}\n\t\treturn accumulator;\n\t}, {} );\n}\n\nexport function getActiveColors( value, name, colorSettings ) {\n\tconst activeColorFormat = getActiveFormat( value, name );\n\n\tif ( ! activeColorFormat ) {\n\t\treturn {};\n\t}\n\n\treturn {\n\t\t...parseCSS( activeColorFormat.attributes.style ),\n\t\t...parseClassName( activeColorFormat.attributes.class, colorSettings ),\n\t};\n}\n\nfunction setColors( value, name, colorSettings, colors ) {\n\tconst { color, backgroundColor } = {\n\t\t...getActiveColors( value, name, colorSettings ),\n\t\t...colors,\n\t};\n\n\tif ( ! color && ! backgroundColor ) {\n\t\treturn removeFormat( value, name );\n\t}\n\n\tconst styles = [];\n\tconst classNames = [];\n\tconst attributes = {};\n\n\tif ( backgroundColor ) {\n\t\tstyles.push( [ 'background-color', backgroundColor ].join( ':' ) );\n\t} else {\n\t\t// Override default browser color for mark element.\n\t\tstyles.push( [ 'background-color', transparentValue ].join( ':' ) );\n\t}\n\n\tif ( color ) {\n\t\tconst colorObject = getColorObjectByColorValue( colorSettings, color );\n\n\t\tif ( colorObject ) {\n\t\t\tclassNames.push( getColorClassName( 'color', colorObject.slug ) );\n\t\t} else {\n\t\t\tstyles.push( [ 'color', color ].join( ':' ) );\n\t\t}\n\t}\n\n\tif ( styles.length ) {\n\t\tattributes.style = styles.join( ';' );\n\t}\n\tif ( classNames.length ) {\n\t\tattributes.class = classNames.join( ' ' );\n\t}\n\n\treturn applyFormat( value, { type: name, attributes } );\n}\n\nfunction ColorPicker( { name, property, value, onChange } ) {\n\tconst colors = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().colors ?? [];\n\t}, [] );\n\tconst activeColors = useMemo(\n\t\t() => getActiveColors( value, name, colors ),\n\t\t[ name, value, colors ]\n\t);\n\n\treturn (\n\t\t<ColorPalette\n\t\t\tvalue={ activeColors[ property ] }\n\t\t\tonChange={ ( color ) => {\n\t\t\t\tonChange(\n\t\t\t\t\tsetColors( value, name, colors, { [ property ]: color } )\n\t\t\t\t);\n\t\t\t} }\n\t\t\tenableAlpha\n\t\t\t// Prevent the text and color picker from overlapping.\n\t\t\t__experimentalIsRenderedInSidebar\n\t\t/>\n\t);\n}\n\nexport default function InlineColorUI( {\n\tname,\n\tvalue,\n\tonChange,\n\tonClose,\n\tcontentRef,\n\tisActive,\n} ) {\n\tconst popoverAnchor = useAnchor( {\n\t\teditableContentElement: contentRef.current,\n\t\tsettings: { ...settings, isActive },\n\t} );\n\n\treturn (\n\t\t<Popover\n\t\t\tonClose={ onClose }\n\t\t\tclassName=\"format-library__inline-color-popover\"\n\t\t\tanchor={ popoverAnchor }\n\t\t>\n\t\t\t<Tabs>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t{ TABS.map( ( tab ) => (\n\t\t\t\t\t\t<Tabs.Tab tabId={ tab.name } key={ tab.name }>\n\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t) ) }\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t{ TABS.map( ( tab ) => (\n\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\tproperty={ tab.name }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t) ) }\n\t\t\t</Tabs>\n\t\t</Popover>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,WAAW,EACXC,YAAY,EACZC,eAAe,EACfC,SAAS,QACH,sBAAsB;AAC7B,SACCC,YAAY,EACZC,iBAAiB,EACjBC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SACCC,OAAO,EACPC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,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,QAAQ;QACbD,KAAK,EAAGF,GAAG,CAACrD,IAAM;QAClByD,SAAS,EAAG,KAAO;QAAAP,QAAA,eAGnBvD,IAAA,CAACuC,WAAW;UACXlC,IAAI,EAAGA,IAAM;UACbQ,QAAQ,EAAG6C,GAAG,CAACrD,IAAM;UACrBS,KAAK,EAAGA,KAAO;UACf0B,QAAQ,EAAGA;QAAU,CACrB;MAAC,GAPIkB,GAAG,CAACrD,IAQI,CACd,CAAC;IAAA,CACE;EAAC,CACC,CAAC;AAEZ","ignoreList":[]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/text-color/inline.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tapplyFormat,\n\tremoveFormat,\n\tgetActiveFormat,\n\tuseAnchor,\n} from '@wordpress/rich-text';\nimport {\n\tColorPalette,\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\tPopover,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { textColor as settings, transparentValue } from './index';\nimport { unlock } from '../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst TABS = [\n\t{ name: 'color', title: __( 'Text' ) },\n\t{ name: 'backgroundColor', title: __( 'Background' ) },\n];\n\nfunction parseCSS( css = '' ) {\n\treturn css.split( ';' ).reduce( ( accumulator, rule ) => {\n\t\tif ( rule ) {\n\t\t\tconst [ property, value ] = rule.split( ':' );\n\t\t\tif ( property === 'color' ) {\n\t\t\t\taccumulator.color = value;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tproperty === 'background-color' &&\n\t\t\t\tvalue !== transparentValue\n\t\t\t) {\n\t\t\t\taccumulator.backgroundColor = value;\n\t\t\t}\n\t\t}\n\t\treturn accumulator;\n\t}, {} );\n}\n\nexport function parseClassName( className = '', colorSettings ) {\n\treturn className.split( ' ' ).reduce( ( accumulator, name ) => {\n\t\t// `colorSlug` could contain dashes, so simply match the start and end.\n\t\tif ( name.startsWith( 'has-' ) && name.endsWith( '-color' ) ) {\n\t\t\tconst colorSlug = name\n\t\t\t\t.replace( /^has-/, '' )\n\t\t\t\t.replace( /-color$/, '' );\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolorSettings,\n\t\t\t\tcolorSlug\n\t\t\t);\n\t\t\taccumulator.color = colorObject.color;\n\t\t}\n\t\treturn accumulator;\n\t}, {} );\n}\n\nexport function getActiveColors( value, name, colorSettings ) {\n\tconst activeColorFormat = getActiveFormat( value, name );\n\n\tif ( ! activeColorFormat ) {\n\t\treturn {};\n\t}\n\n\treturn {\n\t\t...parseCSS( activeColorFormat.attributes.style ),\n\t\t...parseClassName( activeColorFormat.attributes.class, colorSettings ),\n\t};\n}\n\nfunction setColors( value, name, colorSettings, colors ) {\n\tconst { color, backgroundColor } = {\n\t\t...getActiveColors( value, name, colorSettings ),\n\t\t...colors,\n\t};\n\n\tif ( ! color && ! backgroundColor ) {\n\t\treturn removeFormat( value, name );\n\t}\n\n\tconst styles = [];\n\tconst classNames = [];\n\tconst attributes = {};\n\n\tif ( backgroundColor ) {\n\t\tstyles.push( [ 'background-color', backgroundColor ].join( ':' ) );\n\t} else {\n\t\t// Override default browser color for mark element.\n\t\tstyles.push( [ 'background-color', transparentValue ].join( ':' ) );\n\t}\n\n\tif ( color ) {\n\t\tconst colorObject = getColorObjectByColorValue( colorSettings, color );\n\n\t\tif ( colorObject ) {\n\t\t\tclassNames.push( getColorClassName( 'color', colorObject.slug ) );\n\t\t} else {\n\t\t\tstyles.push( [ 'color', color ].join( ':' ) );\n\t\t}\n\t}\n\n\tif ( styles.length ) {\n\t\tattributes.style = styles.join( ';' );\n\t}\n\tif ( classNames.length ) {\n\t\tattributes.class = classNames.join( ' ' );\n\t}\n\n\treturn applyFormat( value, { type: name, attributes } );\n}\n\nfunction ColorPicker( { name, property, value, onChange } ) {\n\tconst colors = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().colors ?? [];\n\t}, [] );\n\tconst activeColors = useMemo(\n\t\t() => getActiveColors( value, name, colors ),\n\t\t[ name, value, colors ]\n\t);\n\n\treturn (\n\t\t<ColorPalette\n\t\t\tvalue={ activeColors[ property ] }\n\t\t\tonChange={ ( color ) => {\n\t\t\t\tonChange(\n\t\t\t\t\tsetColors( value, name, colors, { [ property ]: color } )\n\t\t\t\t);\n\t\t\t} }\n\t\t\tenableAlpha\n\t\t\t// Prevent the text and color picker from overlapping.\n\t\t\t__experimentalIsRenderedInSidebar\n\t\t/>\n\t);\n}\n\nexport default function InlineColorUI( {\n\tname,\n\tvalue,\n\tonChange,\n\tonClose,\n\tcontentRef,\n\tisActive,\n} ) {\n\tconst popoverAnchor = useAnchor( {\n\t\teditableContentElement: contentRef.current,\n\t\tsettings: { ...settings, isActive },\n\t} );\n\n\treturn (\n\t\t<Popover\n\t\t\tonClose={ onClose }\n\t\t\tclassName=\"format-library__inline-color-popover\"\n\t\t\tanchor={ popoverAnchor }\n\t\t>\n\t\t\t<Tabs>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t{ TABS.map( ( tab ) => (\n\t\t\t\t\t\t<Tabs.Tab tabId={ tab.name } key={ tab.name }>\n\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t) ) }\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t{ TABS.map( ( tab ) => (\n\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ColorPicker\n\t\t\t\t\t\t\tname={ name }\n\t\t\t\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