@wordpress/block-library 9.12.0 → 9.13.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/CHANGELOG.md +2 -0
- package/build/block-keyboard-shortcuts/index.js +7 -7
- package/build/block-keyboard-shortcuts/index.js.map +1 -1
- package/build/cover/edit/index.js +1 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/index.js +10 -10
- package/build/cover/index.js.map +1 -1
- package/build/cover/shared.js +6 -7
- package/build/cover/shared.js.map +1 -1
- package/build/details/index.js +19 -0
- package/build/details/index.js.map +1 -1
- package/build/file/edit.js +7 -3
- package/build/file/edit.js.map +1 -1
- package/build/freeform/modal.js +1 -1
- package/build/freeform/modal.js.map +1 -1
- package/build/heading/index.js +1 -7
- package/build/heading/index.js.map +1 -1
- package/build/home-link/edit.js +20 -36
- package/build/home-link/edit.js.map +1 -1
- package/build/navigation/use-template-part-area-label.js +6 -8
- package/build/navigation/use-template-part-area-label.js.map +1 -1
- package/build/page-list/index.js +14 -0
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +26 -25
- package/build/paragraph/edit.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +1 -11
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/utils.js +6 -8
- package/build/query/utils.js.map +1 -1
- package/build/social-link/edit.js +57 -10
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +4 -2
- package/build/social-link/index.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js +2 -7
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/utils/get-template-part-icon.js +23 -0
- package/build/template-part/edit/utils/get-template-part-icon.js.map +1 -0
- package/build/template-part/edit/utils/hooks.js +1 -6
- package/build/template-part/edit/utils/hooks.js.map +1 -1
- package/build/template-part/variations.js +6 -12
- package/build/template-part/variations.js.map +1 -1
- package/build/video/tracks-editor.js +135 -121
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/block-keyboard-shortcuts/index.js +7 -7
- package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
- package/build-module/cover/edit/index.js +1 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/index.js +10 -10
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/shared.js +6 -7
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/details/index.js +20 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/file/edit.js +7 -3
- package/build-module/file/edit.js.map +1 -1
- package/build-module/freeform/modal.js +1 -1
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/heading/index.js +1 -7
- package/build-module/heading/index.js.map +1 -1
- package/build-module/home-link/edit.js +23 -39
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/navigation/use-template-part-area-label.js +6 -8
- package/build-module/navigation/use-template-part-area-label.js.map +1 -1
- package/build-module/page-list/index.js +14 -0
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +26 -25
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +1 -11
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/utils.js +6 -8
- package/build-module/query/utils.js.map +1 -1
- package/build-module/social-link/edit.js +61 -14
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +4 -2
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js +3 -8
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/utils/get-template-part-icon.js +15 -0
- package/build-module/template-part/edit/utils/get-template-part-icon.js.map +1 -0
- package/build-module/template-part/edit/utils/hooks.js +1 -6
- package/build-module/template-part/edit/utils/hooks.js.map +1 -1
- package/build-module/template-part/variations.js +5 -11
- package/build-module/template-part/variations.js.map +1 -1
- package/build-module/video/tracks-editor.js +136 -122
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/editor-rtl.css +16 -8
- package/build-style/editor.css +16 -8
- package/build-style/navigation/style-rtl.css +1 -1
- package/build-style/navigation/style.css +1 -1
- package/build-style/page-list/style-rtl.css +4 -0
- package/build-style/page-list/style.css +4 -0
- package/build-style/query/editor-rtl.css +0 -4
- package/build-style/query/editor.css +0 -4
- package/build-style/search/style-rtl.css +3 -3
- package/build-style/search/style.css +3 -3
- package/build-style/social-link/editor-rtl.css +8 -4
- package/build-style/social-link/editor.css +8 -4
- package/build-style/style-rtl.css +8 -4
- package/build-style/style.css +8 -4
- package/build-style/video/editor-rtl.css +8 -0
- package/build-style/video/editor.css +8 -0
- package/package.json +2 -2
- package/src/block-keyboard-shortcuts/index.js +25 -11
- package/src/cover/edit/index.js +1 -1
- package/src/cover/index.js +8 -8
- package/src/cover/shared.js +10 -10
- package/src/cover/test/edit.js +2 -2
- package/src/details/index.js +23 -1
- package/src/file/edit.js +8 -2
- package/src/freeform/modal.js +1 -1
- package/src/heading/block.json +1 -7
- package/src/home-link/edit.js +27 -45
- package/src/home-link/index.php +0 -3
- package/src/navigation/index.php +4 -150
- package/src/navigation/style.scss +1 -1
- package/src/navigation/use-template-part-area-label.js +10 -10
- package/src/page-list/block.json +14 -0
- package/src/page-list/style.scss +4 -0
- package/src/paragraph/edit.js +20 -17
- package/src/pattern/index.php +0 -7
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -5
- package/src/query/edit/inspector-controls/index.js +0 -10
- package/src/query/editor.scss +0 -4
- package/src/query/index.php +1 -1
- package/src/query/utils.js +14 -15
- package/src/rss/index.php +11 -8
- package/src/search/style.scss +3 -5
- package/src/social-link/block.json +4 -2
- package/src/social-link/edit.js +87 -19
- package/src/social-link/editor.scss +11 -7
- package/src/template-part/edit/advanced-controls.js +13 -13
- package/src/template-part/edit/utils/get-template-part-icon.js +20 -0
- package/src/template-part/edit/utils/hooks.js +2 -7
- package/src/template-part/variations.js +4 -16
- package/src/video/editor.scss +9 -0
- package/src/video/tracks-editor.js +157 -139
- package/build/query/edit/inspector-controls/create-new-post-link.js +0 -40
- package/build/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
- package/build-module/query/edit/inspector-controls/create-new-post-link.js +0 -33
- package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
- package/src/query/edit/inspector-controls/create-new-post-link.js +0 -32
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _element = require("@wordpress/element");
|
|
8
|
-
var _url = require("@wordpress/url");
|
|
9
|
-
var _coreData = require("@wordpress/core-data");
|
|
10
|
-
var _data = require("@wordpress/data");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
/**
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
const CreateNewPostLink = ({
|
|
17
|
-
postType
|
|
18
|
-
}) => {
|
|
19
|
-
const newPostUrl = (0, _url.addQueryArgs)('post-new.php', {
|
|
20
|
-
post_type: postType
|
|
21
|
-
});
|
|
22
|
-
const addNewItemLabel = (0, _data.useSelect)(select => {
|
|
23
|
-
const {
|
|
24
|
-
getPostType
|
|
25
|
-
} = select(_coreData.store);
|
|
26
|
-
return getPostType(postType)?.labels?.add_new_item;
|
|
27
|
-
}, [postType]);
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29
|
-
className: "wp-block-query__create-new-link",
|
|
30
|
-
children: (0, _element.createInterpolateElement)('<a>' + addNewItemLabel + '</a>',
|
|
31
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
32
|
-
{
|
|
33
|
-
a: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
34
|
-
href: newPostUrl
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
var _default = exports.default = CreateNewPostLink;
|
|
40
|
-
//# sourceMappingURL=create-new-post-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_url","_coreData","_data","_jsxRuntime","CreateNewPostLink","postType","newPostUrl","addQueryArgs","post_type","addNewItemLabel","useSelect","select","getPostType","coreStore","labels","add_new_item","jsx","className","children","createInterpolateElement","a","href","_default","exports","default"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/create-new-post-link.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nconst CreateNewPostLink = ( { postType } ) => {\n\tconst newPostUrl = addQueryArgs( 'post-new.php', {\n\t\tpost_type: postType,\n\t} );\n\n\tconst addNewItemLabel = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( postType )?.labels?.add_new_item;\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn (\n\t\t<div className=\"wp-block-query__create-new-link\">\n\t\t\t{ createInterpolateElement(\n\t\t\t\t'<a>' + addNewItemLabel + '</a>',\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t{ a: <a href={ newPostUrl } /> }\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport default CreateNewPostLink;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAA4C,IAAAI,WAAA,GAAAJ,OAAA;AAN5C;AACA;AACA;;AAMA,MAAMK,iBAAiB,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC7C,MAAMC,UAAU,GAAG,IAAAC,iBAAY,EAAE,cAAc,EAAE;IAChDC,SAAS,EAAEH;EACZ,CAAE,CAAC;EAEH,MAAMI,eAAe,GAAG,IAAAC,eAAS,EAC9BC,MAAM,IAAM;IACb,MAAM;MAAEC;IAAY,CAAC,GAAGD,MAAM,CAAEE,eAAU,CAAC;IAC3C,OAAOD,WAAW,CAAEP,QAAS,CAAC,EAAES,MAAM,EAAEC,YAAY;EACrD,CAAC,EACD,CAAEV,QAAQ,CACX,CAAC;EACD,oBACC,IAAAF,WAAA,CAAAa,GAAA;IAAKC,SAAS,EAAC,iCAAiC;IAAAC,QAAA,EAC7C,IAAAC,iCAAwB,EACzB,KAAK,GAAGV,eAAe,GAAG,MAAM;IAChC;IACA;MAAEW,CAAC,eAAE,IAAAjB,WAAA,CAAAa,GAAA;QAAGK,IAAI,EAAGf;MAAY,CAAE;IAAE,CAChC;EAAC,CACG,CAAC;AAER,CAAC;AAAC,IAAAgB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEapB,iBAAiB","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { createInterpolateElement } from '@wordpress/element';
|
|
5
|
-
import { addQueryArgs } from '@wordpress/url';
|
|
6
|
-
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
-
import { useSelect } from '@wordpress/data';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const CreateNewPostLink = ({
|
|
10
|
-
postType
|
|
11
|
-
}) => {
|
|
12
|
-
const newPostUrl = addQueryArgs('post-new.php', {
|
|
13
|
-
post_type: postType
|
|
14
|
-
});
|
|
15
|
-
const addNewItemLabel = useSelect(select => {
|
|
16
|
-
const {
|
|
17
|
-
getPostType
|
|
18
|
-
} = select(coreStore);
|
|
19
|
-
return getPostType(postType)?.labels?.add_new_item;
|
|
20
|
-
}, [postType]);
|
|
21
|
-
return /*#__PURE__*/_jsx("div", {
|
|
22
|
-
className: "wp-block-query__create-new-link",
|
|
23
|
-
children: createInterpolateElement('<a>' + addNewItemLabel + '</a>',
|
|
24
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
25
|
-
{
|
|
26
|
-
a: /*#__PURE__*/_jsx("a", {
|
|
27
|
-
href: newPostUrl
|
|
28
|
-
})
|
|
29
|
-
})
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
export default CreateNewPostLink;
|
|
33
|
-
//# sourceMappingURL=create-new-post-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["createInterpolateElement","addQueryArgs","store","coreStore","useSelect","jsx","_jsx","CreateNewPostLink","postType","newPostUrl","post_type","addNewItemLabel","select","getPostType","labels","add_new_item","className","children","a","href"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/create-new-post-link.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nconst CreateNewPostLink = ( { postType } ) => {\n\tconst newPostUrl = addQueryArgs( 'post-new.php', {\n\t\tpost_type: postType,\n\t} );\n\n\tconst addNewItemLabel = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( postType )?.labels?.add_new_item;\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn (\n\t\t<div className=\"wp-block-query__create-new-link\">\n\t\t\t{ createInterpolateElement(\n\t\t\t\t'<a>' + addNewItemLabel + '</a>',\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t{ a: <a href={ newPostUrl } /> }\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport default CreateNewPostLink;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5C,MAAMC,iBAAiB,GAAGA,CAAE;EAAEC;AAAS,CAAC,KAAM;EAC7C,MAAMC,UAAU,GAAGR,YAAY,CAAE,cAAc,EAAE;IAChDS,SAAS,EAAEF;EACZ,CAAE,CAAC;EAEH,MAAMG,eAAe,GAAGP,SAAS,CAC9BQ,MAAM,IAAM;IACb,MAAM;MAAEC;IAAY,CAAC,GAAGD,MAAM,CAAET,SAAU,CAAC;IAC3C,OAAOU,WAAW,CAAEL,QAAS,CAAC,EAAEM,MAAM,EAAEC,YAAY;EACrD,CAAC,EACD,CAAEP,QAAQ,CACX,CAAC;EACD,oBACCF,IAAA;IAAKU,SAAS,EAAC,iCAAiC;IAAAC,QAAA,EAC7CjB,wBAAwB,CACzB,KAAK,GAAGW,eAAe,GAAG,MAAM;IAChC;IACA;MAAEO,CAAC,eAAEZ,IAAA;QAAGa,IAAI,EAAGV;MAAY,CAAE;IAAE,CAChC;EAAC,CACG,CAAC;AAER,CAAC;AAED,eAAeF,iBAAiB","ignoreList":[]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { createInterpolateElement } from '@wordpress/element';
|
|
5
|
-
import { addQueryArgs } from '@wordpress/url';
|
|
6
|
-
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
-
import { useSelect } from '@wordpress/data';
|
|
8
|
-
|
|
9
|
-
const CreateNewPostLink = ( { postType } ) => {
|
|
10
|
-
const newPostUrl = addQueryArgs( 'post-new.php', {
|
|
11
|
-
post_type: postType,
|
|
12
|
-
} );
|
|
13
|
-
|
|
14
|
-
const addNewItemLabel = useSelect(
|
|
15
|
-
( select ) => {
|
|
16
|
-
const { getPostType } = select( coreStore );
|
|
17
|
-
return getPostType( postType )?.labels?.add_new_item;
|
|
18
|
-
},
|
|
19
|
-
[ postType ]
|
|
20
|
-
);
|
|
21
|
-
return (
|
|
22
|
-
<div className="wp-block-query__create-new-link">
|
|
23
|
-
{ createInterpolateElement(
|
|
24
|
-
'<a>' + addNewItemLabel + '</a>',
|
|
25
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
26
|
-
{ a: <a href={ newPostUrl } /> }
|
|
27
|
-
) }
|
|
28
|
-
</div>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default CreateNewPostLink;
|