@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 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/italic/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { toggleFormat } from '@wordpress/rich-text';\nimport {\n\tRichTextToolbarButton,\n\tRichTextShortcut,\n\t__unstableRichTextInputEvent,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { formatItalic } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\nconst { essentialFormatKey } = unlock( blockEditorPrivateApis );\n\nconst name = 'core/italic';\nconst title = __( 'Italic' );\n\nexport const italic = {\n\tname,\n\ttitle,\n\ttagName: 'em',\n\tclassName: null,\n\t[ essentialFormatKey ]: true,\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\tonChange( toggleFormat( value, { type: name } ) );\n\t\t\tonFocus();\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<RichTextShortcut\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\tcharacter=\"i\"\n\t\t\t\t\tonUse={ onToggle }\n\t\t\t\t/>\n\t\t\t\t<RichTextToolbarButton\n\t\t\t\t\tname=\"italic\"\n\t\t\t\t\ticon={ formatItalic }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\tisActive={ isActive }\n\t\t\t\t\tshortcutType=\"primary\"\n\t\t\t\t\tshortcutCharacter=\"i\"\n\t\t\t\t/>\n\t\t\t\t<__unstableRichTextInputEvent\n\t\t\t\t\tinputType=\"formatItalic\"\n\t\t\t\t\tonInput={ onToggle }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwCG;AArCH,kBAAmB;AACnB,uBAA6B;AAC7B,0BAKO;AACP,mBAA6B;AAK7B,yBAAuB;AAEvB,MAAM,EAAE,mBAAmB,QAAI,2BAAQ,oBAAAA,WAAuB;AAE9D,MAAM,OAAO;AACb,MAAM,YAAQ,gBAAI,QAAS;AAEpB,MAAM,SAAS;AAAA,EACrB;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AAAA,EACX,CAAE,kBAAmB,GAAG;AAAA,EACxB,KAAM,EAAE,UAAU,OAAO,UAAU,QAAQ,GAAI;AAC9C,aAAS,WAAW;AACnB,mBAAU,+BAAc,OAAO,EAAE,MAAM,MAAM,MAAM,CAAE,CAAE;AAAA,IACxD;AAEA,aAAS,UAAU;AAClB,mBAAU,+BAAc,OAAO,EAAE,MAAM,KAAK,CAAE,CAAE;AAChD,cAAQ;AAAA,IACT;AAEA,WACC,4EACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAU;AAAA,UACV,OAAQ;AAAA;AAAA,MACT;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACA,MAAK;AAAA,UACL,MAAO;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA,cAAa;AAAA,UACb,mBAAkB;AAAA;AAAA,MACnB;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UACV,SAAU;AAAA;AAAA,MACX;AAAA,OACD;AAAA,EAEF;AACD;",
|
|
6
|
+
"names": ["blockEditorPrivateApis"]
|
|
7
|
+
}
|
package/build/keyboard/index.js
CHANGED
|
@@ -1,48 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name2 in all)
|
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var keyboard_exports = {};
|
|
19
|
+
__export(keyboard_exports, {
|
|
20
|
+
keyboard: () => keyboard
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const name = 'core/keyboard';
|
|
17
|
-
const title = (0, _i18n.__)('Keyboard input');
|
|
18
|
-
const keyboard = exports.keyboard = {
|
|
22
|
+
module.exports = __toCommonJS(keyboard_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_rich_text = require("@wordpress/rich-text");
|
|
26
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
27
|
+
var import_icons = require("@wordpress/icons");
|
|
28
|
+
const name = "core/keyboard";
|
|
29
|
+
const title = (0, import_i18n.__)("Keyboard input");
|
|
30
|
+
const keyboard = {
|
|
19
31
|
name,
|
|
20
32
|
title,
|
|
21
|
-
tagName:
|
|
33
|
+
tagName: "kbd",
|
|
22
34
|
className: null,
|
|
23
|
-
edit({
|
|
24
|
-
isActive,
|
|
25
|
-
value,
|
|
26
|
-
onChange,
|
|
27
|
-
onFocus
|
|
28
|
-
}) {
|
|
35
|
+
edit({ isActive, value, onChange, onFocus }) {
|
|
29
36
|
function onToggle() {
|
|
30
|
-
onChange((0,
|
|
31
|
-
type: name,
|
|
32
|
-
title
|
|
33
|
-
}));
|
|
37
|
+
onChange((0, import_rich_text.toggleFormat)(value, { type: name, title }));
|
|
34
38
|
}
|
|
35
39
|
function onClick() {
|
|
36
40
|
onToggle();
|
|
37
41
|
onFocus();
|
|
38
42
|
}
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
+
import_block_editor.RichTextToolbarButton,
|
|
45
|
+
{
|
|
46
|
+
icon: import_icons.button,
|
|
47
|
+
title,
|
|
48
|
+
onClick,
|
|
49
|
+
isActive,
|
|
50
|
+
role: "menuitemcheckbox"
|
|
51
|
+
}
|
|
52
|
+
);
|
|
46
53
|
}
|
|
47
54
|
};
|
|
48
|
-
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
keyboard
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/keyboard/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 { button } from '@wordpress/icons';\n\nconst name = 'core/keyboard';\nconst title = __( 'Keyboard input' );\n\nexport const keyboard = {\n\tname,\n\ttitle,\n\ttagName: 'kbd',\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={ button }\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": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BG;AAxBH,kBAAmB;AACnB,uBAA6B;AAC7B,0BAAsC;AACtC,mBAAuB;AAEvB,MAAM,OAAO;AACb,MAAM,YAAQ,gBAAI,gBAAiB;AAE5B,MAAM,WAAW;AAAA,EACvB;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AAAA,EACX,KAAM,EAAE,UAAU,OAAO,UAAU,QAAQ,GAAI;AAC9C,aAAS,WAAW;AACnB,mBAAU,+BAAc,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
|
+
}
|
package/build/language/index.js
CHANGED
|
@@ -1,126 +1,158 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name2 in all)
|
|
7
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var language_exports = {};
|
|
19
|
+
__export(language_exports, {
|
|
20
|
+
language: () => language
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
const name = 'core/language';
|
|
23
|
-
const title = (0, _i18n.__)('Language');
|
|
24
|
-
const language = exports.language = {
|
|
22
|
+
module.exports = __toCommonJS(language_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
26
|
+
var import_components = require("@wordpress/components");
|
|
27
|
+
var import_element = require("@wordpress/element");
|
|
28
|
+
var import_rich_text = require("@wordpress/rich-text");
|
|
29
|
+
var import_icons = require("@wordpress/icons");
|
|
30
|
+
const name = "core/language";
|
|
31
|
+
const title = (0, import_i18n.__)("Language");
|
|
32
|
+
const language = {
|
|
25
33
|
name,
|
|
26
|
-
tagName:
|
|
34
|
+
tagName: "bdo",
|
|
27
35
|
className: null,
|
|
28
36
|
edit: Edit,
|
|
29
37
|
title
|
|
30
38
|
};
|
|
31
|
-
function Edit({
|
|
32
|
-
|
|
33
|
-
value,
|
|
34
|
-
onChange,
|
|
35
|
-
contentRef
|
|
36
|
-
}) {
|
|
37
|
-
const [isPopoverVisible, setIsPopoverVisible] = (0, _element.useState)(false);
|
|
39
|
+
function Edit({ isActive, value, onChange, contentRef }) {
|
|
40
|
+
const [isPopoverVisible, setIsPopoverVisible] = (0, import_element.useState)(false);
|
|
38
41
|
const togglePopover = () => {
|
|
39
|
-
setIsPopoverVisible(state => !state);
|
|
42
|
+
setIsPopoverVisible((state) => !state);
|
|
40
43
|
};
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
import_block_editor.RichTextToolbarButton,
|
|
47
|
+
{
|
|
48
|
+
icon: import_icons.language,
|
|
49
|
+
label: title,
|
|
50
|
+
title,
|
|
51
|
+
onClick: () => {
|
|
52
|
+
if (isActive) {
|
|
53
|
+
onChange((0, import_rich_text.removeFormat)(value, name));
|
|
54
|
+
} else {
|
|
55
|
+
togglePopover();
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
isActive,
|
|
59
|
+
role: "menuitemcheckbox"
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
isPopoverVisible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
63
|
+
InlineLanguageUI,
|
|
64
|
+
{
|
|
65
|
+
value,
|
|
66
|
+
onChange,
|
|
67
|
+
onClose: togglePopover,
|
|
68
|
+
contentRef
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
62
72
|
}
|
|
63
|
-
function InlineLanguageUI({
|
|
64
|
-
|
|
65
|
-
contentRef,
|
|
66
|
-
onChange,
|
|
67
|
-
onClose
|
|
68
|
-
}) {
|
|
69
|
-
const popoverAnchor = (0, _richText.useAnchor)({
|
|
73
|
+
function InlineLanguageUI({ value, contentRef, onChange, onClose }) {
|
|
74
|
+
const popoverAnchor = (0, import_rich_text.useAnchor)({
|
|
70
75
|
editableContentElement: contentRef.current,
|
|
71
76
|
settings: language
|
|
72
77
|
});
|
|
73
|
-
const [lang, setLang] = (0,
|
|
74
|
-
const [dir, setDir] = (0,
|
|
75
|
-
return
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
78
|
+
const [lang, setLang] = (0, import_element.useState)("");
|
|
79
|
+
const [dir, setDir] = (0, import_element.useState)("ltr");
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
import_components.Popover,
|
|
82
|
+
{
|
|
83
|
+
className: "block-editor-format-toolbar__language-popover",
|
|
84
|
+
anchor: popoverAnchor,
|
|
85
|
+
onClose,
|
|
86
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
87
|
+
import_components.__experimentalVStack,
|
|
88
|
+
{
|
|
89
|
+
as: "form",
|
|
90
|
+
spacing: 4,
|
|
91
|
+
className: "block-editor-format-toolbar__language-container-content",
|
|
92
|
+
onSubmit: (event) => {
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
onChange(
|
|
95
|
+
(0, import_rich_text.applyFormat)(value, {
|
|
96
|
+
type: name,
|
|
97
|
+
attributes: {
|
|
98
|
+
lang,
|
|
99
|
+
dir
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
onClose();
|
|
104
|
+
},
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
import_components.TextControl,
|
|
108
|
+
{
|
|
109
|
+
__next40pxDefaultSize: true,
|
|
110
|
+
__nextHasNoMarginBottom: true,
|
|
111
|
+
label: title,
|
|
112
|
+
value: lang,
|
|
113
|
+
onChange: (val) => setLang(val),
|
|
114
|
+
help: (0, import_i18n.__)(
|
|
115
|
+
'A valid language attribute, like "en" or "fr".'
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
+
import_components.SelectControl,
|
|
121
|
+
{
|
|
122
|
+
__next40pxDefaultSize: true,
|
|
123
|
+
__nextHasNoMarginBottom: true,
|
|
124
|
+
label: (0, import_i18n.__)("Text direction"),
|
|
125
|
+
value: dir,
|
|
126
|
+
options: [
|
|
127
|
+
{
|
|
128
|
+
label: (0, import_i18n.__)("Left to right"),
|
|
129
|
+
value: "ltr"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: (0, import_i18n.__)("Right to left"),
|
|
133
|
+
value: "rtl"
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
onChange: (val) => setDir(val)
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.__experimentalHStack, { alignment: "right", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
import_components.Button,
|
|
141
|
+
{
|
|
142
|
+
__next40pxDefaultSize: true,
|
|
143
|
+
variant: "primary",
|
|
144
|
+
type: "submit",
|
|
145
|
+
text: (0, import_i18n.__)("Apply")
|
|
146
|
+
}
|
|
147
|
+
) })
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
);
|
|
125
153
|
}
|
|
126
|
-
|
|
154
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
155
|
+
0 && (module.exports = {
|
|
156
|
+
language
|
|
157
|
+
});
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/language/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * WordPress dependencies\n */\nimport { RichTextToolbarButton } from '@wordpress/block-editor';\nimport {\n\tTextControl,\n\tSelectControl,\n\tButton,\n\tPopover,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { applyFormat, removeFormat, useAnchor } from '@wordpress/rich-text';\nimport { language as languageIcon } from '@wordpress/icons';\n\nconst name = 'core/language';\nconst title = __( 'Language' );\n\nexport const language = {\n\tname,\n\ttagName: 'bdo',\n\tclassName: null,\n\tedit: Edit,\n\ttitle,\n};\n\nfunction Edit( { isActive, value, onChange, contentRef } ) {\n\tconst [ isPopoverVisible, setIsPopoverVisible ] = useState( false );\n\tconst togglePopover = () => {\n\t\tsetIsPopoverVisible( ( state ) => ! state );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<RichTextToolbarButton\n\t\t\t\ticon={ languageIcon }\n\t\t\t\tlabel={ title }\n\t\t\t\ttitle={ title }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( isActive ) {\n\t\t\t\t\t\tonChange( removeFormat( value, name ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttogglePopover();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tisActive={ isActive }\n\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t/>\n\t\t\t{ isPopoverVisible && (\n\t\t\t\t<InlineLanguageUI\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tonClose={ togglePopover }\n\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction InlineLanguageUI( { value, contentRef, onChange, onClose } ) {\n\tconst popoverAnchor = useAnchor( {\n\t\teditableContentElement: contentRef.current,\n\t\tsettings: language,\n\t} );\n\n\tconst [ lang, setLang ] = useState( '' );\n\tconst [ dir, setDir ] = useState( 'ltr' );\n\n\treturn (\n\t\t<Popover\n\t\t\tclassName=\"block-editor-format-toolbar__language-popover\"\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ onClose }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tas=\"form\"\n\t\t\t\tspacing={ 4 }\n\t\t\t\tclassName=\"block-editor-format-toolbar__language-container-content\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tonChange(\n\t\t\t\t\t\tapplyFormat( value, {\n\t\t\t\t\t\t\ttype: name,\n\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\tlang,\n\t\t\t\t\t\t\t\tdir,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tvalue={ lang }\n\t\t\t\t\tonChange={ ( val ) => setLang( val ) }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'A valid language attribute, like \"en\" or \"fr\".'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Text direction' ) }\n\t\t\t\t\tvalue={ dir }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Left to right' ),\n\t\t\t\t\t\t\tvalue: 'ltr',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Right to left' ),\n\t\t\t\t\t\t\tvalue: 'rtl',\n\t\t\t\t\t\t},\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( val ) => setDir( val ) }\n\t\t\t\t/>\n\t\t\t\t<HStack alignment=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\ttext={ __( 'Apply' ) }\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</Popover>\n\t);\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["languageIcon", "VStack", "HStack"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var css_classes_setting_exports = {};
|
|
19
|
+
__export(css_classes_setting_exports, {
|
|
20
|
+
default: () => css_classes_setting_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(css_classes_setting_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_element = require("@wordpress/element");
|
|
25
|
+
var import_compose = require("@wordpress/compose");
|
|
26
|
+
var import_i18n = require("@wordpress/i18n");
|
|
27
|
+
var import_components = require("@wordpress/components");
|
|
28
|
+
const CSSClassesSettingComponent = ({ setting, value, onChange }) => {
|
|
29
|
+
const hasValue = value ? value?.cssClasses?.length > 0 : false;
|
|
30
|
+
const [isSettingActive, setIsSettingActive] = (0, import_element.useState)(hasValue);
|
|
31
|
+
const instanceId = (0, import_compose.useInstanceId)(CSSClassesSettingComponent);
|
|
32
|
+
const controlledRegionId = `css-classes-setting-${instanceId}`;
|
|
33
|
+
const handleSettingChange = (newValue) => {
|
|
34
|
+
const sanitizedValue = typeof newValue === "string" ? newValue.replace(/,/g, " ").replace(/\s+/g, " ").trim() : newValue;
|
|
35
|
+
onChange({
|
|
36
|
+
...value,
|
|
37
|
+
[setting.id]: sanitizedValue
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const handleCheckboxChange = () => {
|
|
41
|
+
if (isSettingActive) {
|
|
42
|
+
if (hasValue) {
|
|
43
|
+
handleSettingChange("");
|
|
44
|
+
}
|
|
45
|
+
setIsSettingActive(false);
|
|
46
|
+
} else {
|
|
47
|
+
setIsSettingActive(true);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("fieldset", { children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.VisuallyHidden, { as: "legend", children: setting.title }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 3, children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
import_components.CheckboxControl,
|
|
55
|
+
{
|
|
56
|
+
__nextHasNoMarginBottom: true,
|
|
57
|
+
label: setting.title,
|
|
58
|
+
onChange: handleCheckboxChange,
|
|
59
|
+
checked: isSettingActive || hasValue,
|
|
60
|
+
"aria-expanded": isSettingActive,
|
|
61
|
+
"aria-controls": isSettingActive ? controlledRegionId : void 0
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
isSettingActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id: controlledRegionId, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
+
import_components.__experimentalInputControl,
|
|
66
|
+
{
|
|
67
|
+
label: (0, import_i18n.__)("CSS classes"),
|
|
68
|
+
value: value?.cssClasses,
|
|
69
|
+
onChange: handleSettingChange,
|
|
70
|
+
help: (0, import_i18n.__)(
|
|
71
|
+
"Separate multiple classes with spaces."
|
|
72
|
+
),
|
|
73
|
+
__unstableInputWidth: "100%",
|
|
74
|
+
__next40pxDefaultSize: true
|
|
75
|
+
}
|
|
76
|
+
) })
|
|
77
|
+
] })
|
|
78
|
+
] });
|
|
79
|
+
};
|
|
80
|
+
var css_classes_setting_default = CSSClassesSettingComponent;
|
|
81
|
+
//# sourceMappingURL=css-classes-setting.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/link/css-classes-setting.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalInputControl as InputControl,\n\tCheckboxControl,\n\tVisuallyHidden,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * CSSClassesSettingComponent\n *\n * Presents a toggleable text input for editing link CSS classes. The input\n * is shown when the toggle is enabled or when there is already a value. When\n * toggled off and a value exists, it resets the value to an empty string.\n *\n * @param {Object} props - Component props.\n * @param {Object} props.setting - Setting configuration object.\n * @param {Object} props.value - Current link value object.\n * @param {Function} props.onChange - Callback when value changes.\n */\nconst CSSClassesSettingComponent = ( { setting, value, onChange } ) => {\n\tconst hasValue = value ? value?.cssClasses?.length > 0 : false;\n\tconst [ isSettingActive, setIsSettingActive ] = useState( hasValue );\n\tconst instanceId = useInstanceId( CSSClassesSettingComponent );\n\tconst controlledRegionId = `css-classes-setting-${ instanceId }`;\n\n\t// Sanitize user input: replace commas with spaces, collapse repeated spaces, and trim\n\tconst handleSettingChange = ( newValue ) => {\n\t\tconst sanitizedValue =\n\t\t\ttypeof newValue === 'string'\n\t\t\t\t? newValue.replace( /,/g, ' ' ).replace( /\\s+/g, ' ' ).trim()\n\t\t\t\t: newValue;\n\t\tonChange( {\n\t\t\t...value,\n\t\t\t[ setting.id ]: sanitizedValue,\n\t\t} );\n\t};\n\n\tconst handleCheckboxChange = () => {\n\t\tif ( isSettingActive ) {\n\t\t\tif ( hasValue ) {\n\t\t\t\t// Reset the value when hiding the input and a value exists.\n\t\t\t\thandleSettingChange( '' );\n\t\t\t}\n\t\t\tsetIsSettingActive( false );\n\t\t} else {\n\t\t\tsetIsSettingActive( true );\n\t\t}\n\t};\n\n\treturn (\n\t\t<fieldset>\n\t\t\t<VisuallyHidden as=\"legend\">{ setting.title }</VisuallyHidden>\n\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t<CheckboxControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ setting.title }\n\t\t\t\t\tonChange={ handleCheckboxChange }\n\t\t\t\t\tchecked={ isSettingActive || hasValue }\n\t\t\t\t\taria-expanded={ isSettingActive }\n\t\t\t\t\taria-controls={\n\t\t\t\t\t\tisSettingActive ? controlledRegionId : undefined\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ isSettingActive && (\n\t\t\t\t\t<div id={ controlledRegionId }>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tlabel={ __( 'CSS classes' ) }\n\t\t\t\t\t\t\tvalue={ value?.cssClasses }\n\t\t\t\t\t\t\tonChange={ handleSettingChange }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Separate multiple classes with spaces.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t__unstableInputWidth=\"100%\"\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</fieldset>\n\t);\n};\n\nexport default CSSClassesSettingComponent;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDG;AAtDH,qBAAyB;AACzB,qBAA8B;AAC9B,kBAAmB;AACnB,wBAKO;AAcP,MAAM,6BAA6B,CAAE,EAAE,SAAS,OAAO,SAAS,MAAO;AACtE,QAAM,WAAW,QAAQ,OAAO,YAAY,SAAS,IAAI;AACzD,QAAM,CAAE,iBAAiB,kBAAmB,QAAI,yBAAU,QAAS;AACnE,QAAM,iBAAa,8BAAe,0BAA2B;AAC7D,QAAM,qBAAqB,uBAAwB,UAAW;AAG9D,QAAM,sBAAsB,CAAE,aAAc;AAC3C,UAAM,iBACL,OAAO,aAAa,WACjB,SAAS,QAAS,MAAM,GAAI,EAAE,QAAS,QAAQ,GAAI,EAAE,KAAK,IAC1D;AACJ,aAAU;AAAA,MACT,GAAG;AAAA,MACH,CAAE,QAAQ,EAAG,GAAG;AAAA,IACjB,CAAE;AAAA,EACH;AAEA,QAAM,uBAAuB,MAAM;AAClC,QAAK,iBAAkB;AACtB,UAAK,UAAW;AAEf,4BAAqB,EAAG;AAAA,MACzB;AACA,yBAAoB,KAAM;AAAA,IAC3B,OAAO;AACN,yBAAoB,IAAK;AAAA,IAC1B;AAAA,EACD;AAEA,SACC,6CAAC,cACA;AAAA,gDAAC,oCAAe,IAAG,UAAW,kBAAQ,OAAO;AAAA,IAC7C,6CAAC,kBAAAA,sBAAA,EAAO,SAAU,GACjB;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,yBAAuB;AAAA,UACvB,OAAQ,QAAQ;AAAA,UAChB,UAAW;AAAA,UACX,SAAU,mBAAmB;AAAA,UAC7B,iBAAgB;AAAA,UAChB,iBACC,kBAAkB,qBAAqB;AAAA;AAAA,MAEzC;AAAA,MACE,mBACD,4CAAC,SAAI,IAAK,oBACT;AAAA,QAAC,kBAAAC;AAAA,QAAA;AAAA,UACA,WAAQ,gBAAI,aAAc;AAAA,UAC1B,OAAQ,OAAO;AAAA,UACf,UAAW;AAAA,UACX,UAAO;AAAA,YACN;AAAA,UACD;AAAA,UACA,sBAAqB;AAAA,UACrB,uBAAqB;AAAA;AAAA,MACtB,GACD;AAAA,OAEF;AAAA,KACD;AAEF;AAEA,IAAO,8BAAQ;",
|
|
6
|
+
"names": ["VStack", "InputControl"]
|
|
7
|
+
}
|