@wordpress/editor 13.30.0 → 13.32.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 +4 -0
- package/README.md +857 -0
- package/build/bindings/index.js +3 -1
- package/build/bindings/index.js.map +1 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +107 -0
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
- package/build/components/commands/index.js +1 -1
- package/build/components/commands/index.js.map +1 -1
- package/build/components/deprecated.js +158 -0
- package/build/components/deprecated.js.map +1 -1
- package/build/components/document-bar/index.js +7 -10
- package/build/components/document-bar/index.js.map +1 -1
- package/build/components/document-outline/index.js +1 -1
- package/build/components/document-outline/index.js.map +1 -1
- package/build/components/editor-canvas/edit-template-blocks-notification.js +2 -39
- package/build/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build/components/editor-canvas/index.js +3 -0
- package/build/components/editor-canvas/index.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +10 -16
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build/components/entities-saved-states/index.js +28 -88
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/error-boundary/index.native.js +133 -0
- package/build/components/error-boundary/index.native.js.map +1 -0
- package/build/components/index.js +33 -8
- package/build/components/index.js.map +1 -1
- package/build/components/index.native.js +9 -1
- package/build/components/index.native.js.map +1 -1
- package/build/components/inserter-sidebar/index.js +5 -1
- package/build/components/inserter-sidebar/index.js.map +1 -1
- package/build/components/list-view-sidebar/index.js +2 -1
- package/build/components/list-view-sidebar/index.js.map +1 -1
- package/build/components/pattern-overrides-panel/index.js +30 -0
- package/build/components/pattern-overrides-panel/index.js.map +1 -0
- package/build/components/plugin-document-setting-panel/index.js +123 -0
- package/build/components/plugin-document-setting-panel/index.js.map +1 -0
- package/build/components/plugin-post-publish-panel/index.js +68 -0
- package/build/components/plugin-post-publish-panel/index.js.map +1 -0
- package/build/components/plugin-pre-publish-panel/index.js +71 -0
- package/build/components/plugin-pre-publish-panel/index.js.map +1 -0
- package/build/components/post-actions/actions.js +455 -0
- package/build/components/post-actions/actions.js.map +1 -0
- package/build/components/post-card-panel/index.js +93 -0
- package/build/components/post-card-panel/index.js.map +1 -0
- package/build/components/post-featured-image/index.js +3 -8
- package/build/components/post-featured-image/index.js.map +1 -1
- package/build/components/post-featured-image/panel.js +7 -3
- package/build/components/post-featured-image/panel.js.map +1 -1
- package/build/components/post-sync-status/index.js +0 -72
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +7 -3
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-title/index.native.js +1 -1
- package/build/components/post-title/index.native.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +36 -20
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/index.js +1 -1
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +8 -9
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/use-hide-blocks-from-inserter.js +4 -3
- package/build/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
- package/build/components/template-areas/index.js +70 -0
- package/build/components/template-areas/index.js.map +1 -0
- package/build/hooks/use-select-nearest-editable-block.js +87 -0
- package/build/hooks/use-select-nearest-editable-block.js.map +1 -0
- package/build/private-apis.js +6 -2
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +46 -6
- package/build/store/actions.js.map +1 -1
- package/build/store/constants.js +3 -1
- package/build/store/constants.js.map +1 -1
- package/build/store/private-actions.js +80 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +56 -3
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +14 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +21 -11
- package/build/store/selectors.js.map +1 -1
- package/build/store/utils/get-filtered-template-parts.js +71 -0
- package/build/store/utils/get-filtered-template-parts.js.map +1 -0
- package/build-module/bindings/index.js +3 -1
- package/build-module/bindings/index.js.map +1 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +100 -0
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +1 -0
- package/build-module/components/commands/index.js +1 -1
- package/build-module/components/commands/index.js.map +1 -1
- package/build-module/components/deprecated.js +159 -0
- package/build-module/components/deprecated.js.map +1 -1
- package/build-module/components/document-bar/index.js +8 -11
- package/build-module/components/document-bar/index.js.map +1 -1
- package/build-module/components/document-outline/index.js +1 -1
- package/build-module/components/document-outline/index.js.map +1 -1
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js +4 -41
- package/build-module/components/editor-canvas/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/editor-canvas/index.js +3 -0
- package/build-module/components/editor-canvas/index.js.map +1 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +10 -16
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +29 -89
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/error-boundary/index.native.js +125 -0
- package/build-module/components/error-boundary/index.native.js.map +1 -0
- package/build-module/components/index.js +5 -1
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/index.native.js +1 -0
- package/build-module/components/index.native.js.map +1 -1
- package/build-module/components/inserter-sidebar/index.js +5 -1
- package/build-module/components/inserter-sidebar/index.js.map +1 -1
- package/build-module/components/list-view-sidebar/index.js +2 -1
- package/build-module/components/list-view-sidebar/index.js.map +1 -1
- package/build-module/components/pattern-overrides-panel/index.js +23 -0
- package/build-module/components/pattern-overrides-panel/index.js.map +1 -0
- package/build-module/components/plugin-document-setting-panel/index.js +115 -0
- package/build-module/components/plugin-document-setting-panel/index.js.map +1 -0
- package/build-module/components/plugin-post-publish-panel/index.js +61 -0
- package/build-module/components/plugin-post-publish-panel/index.js.map +1 -0
- package/build-module/components/plugin-pre-publish-panel/index.js +64 -0
- package/build-module/components/plugin-pre-publish-panel/index.js.map +1 -0
- package/build-module/components/post-actions/actions.js +444 -0
- package/build-module/components/post-actions/actions.js.map +1 -0
- package/build-module/components/post-card-panel/index.js +85 -0
- package/build-module/components/post-card-panel/index.js.map +1 -0
- package/build-module/components/post-featured-image/index.js +4 -9
- package/build-module/components/post-featured-image/index.js.map +1 -1
- package/build-module/components/post-featured-image/panel.js +6 -2
- package/build-module/components/post-featured-image/panel.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +2 -73
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +7 -3
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-title/index.native.js +1 -1
- package/build-module/components/post-title/index.native.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +36 -20
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/index.js +1 -1
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +9 -10
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/use-hide-blocks-from-inserter.js +4 -3
- package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +1 -1
- package/build-module/components/template-areas/index.js +63 -0
- package/build-module/components/template-areas/index.js.map +1 -0
- package/build-module/hooks/use-select-nearest-editable-block.js +80 -0
- package/build-module/hooks/use-select-nearest-editable-block.js.map +1 -0
- package/build-module/private-apis.js +6 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +37 -3
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/constants.js +2 -0
- package/build-module/store/constants.js.map +1 -1
- package/build-module/store/private-actions.js +78 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +54 -3
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +13 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +19 -10
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/store/utils/get-filtered-template-parts.js +64 -0
- package/build-module/store/utils/get-filtered-template-parts.js.map +1 -0
- package/build-style/style-rtl.css +76 -33
- package/build-style/style.css +76 -33
- package/package.json +35 -33
- package/src/bindings/index.js +4 -1
- package/src/components/block-settings-menu/plugin-block-settings-menu-item.js +108 -0
- package/src/components/commands/index.js +1 -1
- package/src/components/deprecated.js +157 -0
- package/src/components/document-bar/index.js +12 -17
- package/src/components/document-bar/style.scss +9 -12
- package/src/components/document-outline/index.js +2 -1
- package/src/components/document-tools/style.scss +4 -11
- package/src/components/editor-canvas/edit-template-blocks-notification.js +6 -56
- package/src/components/editor-canvas/index.js +4 -0
- package/src/components/entities-saved-states/hooks/use-is-dirty.js +18 -22
- package/src/components/entities-saved-states/index.js +45 -121
- package/src/components/entities-saved-states/test/use-is-dirty.js +3 -0
- package/src/components/error-boundary/index.native.js +192 -0
- package/src/components/error-boundary/style.native.scss +116 -0
- package/src/components/index.js +5 -4
- package/src/components/index.native.js +1 -0
- package/src/components/inserter-sidebar/index.js +7 -1
- package/src/components/list-view-sidebar/index.js +1 -0
- package/src/components/list-view-sidebar/style.scss +1 -1
- package/src/components/pattern-overrides-panel/index.js +26 -0
- package/src/components/plugin-document-setting-panel/index.js +121 -0
- package/src/components/plugin-post-publish-panel/index.js +64 -0
- package/src/components/plugin-post-publish-panel/test/__snapshots__/index.js.snap +39 -0
- package/src/components/plugin-post-publish-panel/test/index.js +33 -0
- package/src/components/plugin-pre-publish-panel/index.js +67 -0
- package/src/components/plugin-pre-publish-panel/test/index.js +33 -0
- package/src/components/post-actions/actions.js +582 -0
- package/src/components/post-card-panel/index.js +108 -0
- package/src/components/post-card-panel/style.scss +32 -0
- package/src/components/post-featured-image/index.js +6 -15
- package/src/components/post-featured-image/panel.js +9 -3
- package/src/components/post-featured-image/style.scss +9 -13
- package/src/components/post-sync-status/index.js +1 -94
- package/src/components/post-taxonomies/flat-term-selector.js +13 -8
- package/src/components/post-title/index.native.js +1 -1
- package/src/components/provider/disable-non-page-content-blocks.js +40 -20
- package/src/components/provider/index.js +1 -1
- package/src/components/provider/test/disable-non-page-content-blocks.js +35 -14
- package/src/components/provider/use-block-editor-settings.js +11 -11
- package/src/components/provider/use-hide-blocks-from-inserter.js +5 -3
- package/src/components/template-areas/index.js +85 -0
- package/src/components/template-areas/style.scss +23 -0
- package/src/hooks/use-select-nearest-editable-block.js +95 -0
- package/src/private-apis.js +6 -2
- package/src/store/actions.js +37 -3
- package/src/store/constants.js +2 -0
- package/src/store/private-actions.js +111 -0
- package/src/store/private-selectors.js +105 -17
- package/src/store/reducer.js +13 -0
- package/src/store/selectors.js +50 -40
- package/src/store/utils/get-filtered-template-parts.js +69 -0
- package/src/store/utils/test/get-filtered-template-parts.js +189 -0
- package/src/style.scss +2 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import memoize from 'memize';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { isTemplatePart } from '@wordpress/blocks';
|
|
10
|
+
|
|
11
|
+
const EMPTY_ARRAY = [];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Get a flattened and filtered list of template parts and the matching block for that template part.
|
|
15
|
+
*
|
|
16
|
+
* Takes a list of blocks defined within a template, and a list of template parts, and returns a
|
|
17
|
+
* flattened list of template parts and the matching block for that template part.
|
|
18
|
+
*
|
|
19
|
+
* @param {Array} blocks Blocks to flatten.
|
|
20
|
+
* @param {?Array} templateParts Available template parts.
|
|
21
|
+
* @return {Array} An array of template parts and their blocks.
|
|
22
|
+
*/
|
|
23
|
+
function getFilteredTemplatePartBlocks( blocks = EMPTY_ARRAY, templateParts ) {
|
|
24
|
+
const templatePartsById = templateParts
|
|
25
|
+
? // Key template parts by their ID.
|
|
26
|
+
templateParts.reduce(
|
|
27
|
+
( newTemplateParts, part ) => ( {
|
|
28
|
+
...newTemplateParts,
|
|
29
|
+
[ part.id ]: part,
|
|
30
|
+
} ),
|
|
31
|
+
{}
|
|
32
|
+
)
|
|
33
|
+
: {};
|
|
34
|
+
|
|
35
|
+
const result = [];
|
|
36
|
+
|
|
37
|
+
// Iterate over all blocks, recursing into inner blocks.
|
|
38
|
+
// Output will be based on a depth-first traversal.
|
|
39
|
+
const stack = [ ...blocks ];
|
|
40
|
+
while ( stack.length ) {
|
|
41
|
+
const { innerBlocks, ...block } = stack.shift();
|
|
42
|
+
// Place inner blocks at the beginning of the stack to preserve order.
|
|
43
|
+
stack.unshift( ...innerBlocks );
|
|
44
|
+
|
|
45
|
+
if ( isTemplatePart( block ) ) {
|
|
46
|
+
const {
|
|
47
|
+
attributes: { theme, slug },
|
|
48
|
+
} = block;
|
|
49
|
+
const templatePartId = `${ theme }//${ slug }`;
|
|
50
|
+
const templatePart = templatePartsById[ templatePartId ];
|
|
51
|
+
|
|
52
|
+
// Only add to output if the found template part block is in the list of available template parts.
|
|
53
|
+
if ( templatePart ) {
|
|
54
|
+
result.push( {
|
|
55
|
+
templatePart,
|
|
56
|
+
block,
|
|
57
|
+
} );
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const memoizedGetFilteredTemplatePartBlocks = memoize(
|
|
66
|
+
getFilteredTemplatePartBlocks
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
export { memoizedGetFilteredTemplatePartBlocks as getFilteredTemplatePartBlocks };
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { getFilteredTemplatePartBlocks } from '../get-filtered-template-parts';
|
|
5
|
+
|
|
6
|
+
const NESTED_BLOCKS = [
|
|
7
|
+
{
|
|
8
|
+
clientId: '1',
|
|
9
|
+
name: 'core/group',
|
|
10
|
+
innerBlocks: [
|
|
11
|
+
{
|
|
12
|
+
clientId: '2',
|
|
13
|
+
name: 'core/template-part',
|
|
14
|
+
attributes: {
|
|
15
|
+
slug: 'header',
|
|
16
|
+
theme: 'my-theme',
|
|
17
|
+
},
|
|
18
|
+
innerBlocks: [
|
|
19
|
+
{
|
|
20
|
+
clientId: '3',
|
|
21
|
+
name: 'core/group',
|
|
22
|
+
innerBlocks: [],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
clientId: '4',
|
|
28
|
+
name: 'core/template-part',
|
|
29
|
+
attributes: {
|
|
30
|
+
slug: 'aside',
|
|
31
|
+
theme: 'my-theme',
|
|
32
|
+
},
|
|
33
|
+
innerBlocks: [],
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
clientId: '5',
|
|
39
|
+
name: 'core/paragraph',
|
|
40
|
+
innerBlocks: [],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
clientId: '6',
|
|
44
|
+
name: 'core/template-part',
|
|
45
|
+
attributes: {
|
|
46
|
+
slug: 'footer',
|
|
47
|
+
theme: 'my-theme',
|
|
48
|
+
},
|
|
49
|
+
innerBlocks: [],
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
const FLATTENED_BLOCKS = [
|
|
54
|
+
{
|
|
55
|
+
block: {
|
|
56
|
+
clientId: '2',
|
|
57
|
+
name: 'core/template-part',
|
|
58
|
+
attributes: {
|
|
59
|
+
slug: 'header',
|
|
60
|
+
theme: 'my-theme',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
templatePart: {
|
|
64
|
+
id: 'my-theme//header',
|
|
65
|
+
slug: 'header',
|
|
66
|
+
theme: 'my-theme',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
block: {
|
|
71
|
+
clientId: '4',
|
|
72
|
+
name: 'core/template-part',
|
|
73
|
+
attributes: {
|
|
74
|
+
slug: 'aside',
|
|
75
|
+
theme: 'my-theme',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
templatePart: {
|
|
79
|
+
id: 'my-theme//aside',
|
|
80
|
+
slug: 'aside',
|
|
81
|
+
theme: 'my-theme',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
block: {
|
|
86
|
+
clientId: '6',
|
|
87
|
+
name: 'core/template-part',
|
|
88
|
+
attributes: {
|
|
89
|
+
slug: 'footer',
|
|
90
|
+
theme: 'my-theme',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
templatePart: {
|
|
94
|
+
id: 'my-theme//footer',
|
|
95
|
+
slug: 'footer',
|
|
96
|
+
theme: 'my-theme',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
];
|
|
100
|
+
|
|
101
|
+
const SINGLE_TEMPLATE_PART_BLOCK = {
|
|
102
|
+
clientId: '1',
|
|
103
|
+
name: 'core/template-part',
|
|
104
|
+
innerBlocks: [],
|
|
105
|
+
attributes: {
|
|
106
|
+
slug: 'aside',
|
|
107
|
+
theme: 'my-theme',
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const TEMPLATE_PARTS = [
|
|
112
|
+
{
|
|
113
|
+
id: 'my-theme//header',
|
|
114
|
+
slug: 'header',
|
|
115
|
+
theme: 'my-theme',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'my-theme//aside',
|
|
119
|
+
slug: 'aside',
|
|
120
|
+
theme: 'my-theme',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: 'my-theme//footer',
|
|
124
|
+
slug: 'footer',
|
|
125
|
+
theme: 'my-theme',
|
|
126
|
+
},
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
describe( 'getFilteredTemplatePartBlocks', () => {
|
|
130
|
+
it( 'returns a flattened list of filtered template parts preserving a depth-first order', () => {
|
|
131
|
+
const flattenedFilteredTemplateParts = getFilteredTemplatePartBlocks(
|
|
132
|
+
NESTED_BLOCKS,
|
|
133
|
+
TEMPLATE_PARTS
|
|
134
|
+
);
|
|
135
|
+
expect( flattenedFilteredTemplateParts ).toEqual( FLATTENED_BLOCKS );
|
|
136
|
+
} );
|
|
137
|
+
|
|
138
|
+
it( 'returns a cached result when passed the same params', () => {
|
|
139
|
+
// Clear the cache and call the function twice.
|
|
140
|
+
getFilteredTemplatePartBlocks.clear();
|
|
141
|
+
getFilteredTemplatePartBlocks( NESTED_BLOCKS, TEMPLATE_PARTS );
|
|
142
|
+
expect(
|
|
143
|
+
getFilteredTemplatePartBlocks( NESTED_BLOCKS, TEMPLATE_PARTS )
|
|
144
|
+
).toEqual( FLATTENED_BLOCKS );
|
|
145
|
+
|
|
146
|
+
// The function has been called twice with the same params, so the cache size should be 1.
|
|
147
|
+
/**
|
|
148
|
+
* TODO what should be done about this?
|
|
149
|
+
* Can it be tested another way?
|
|
150
|
+
* Is it necessary?
|
|
151
|
+
*/
|
|
152
|
+
// const [ , , originalSize ] =
|
|
153
|
+
// getFilteredTemplatePartBlocks.getCache();
|
|
154
|
+
// expect( originalSize ).toBe( 1 );
|
|
155
|
+
|
|
156
|
+
// Call the function again, with different params.
|
|
157
|
+
expect(
|
|
158
|
+
getFilteredTemplatePartBlocks(
|
|
159
|
+
[ SINGLE_TEMPLATE_PART_BLOCK ],
|
|
160
|
+
TEMPLATE_PARTS
|
|
161
|
+
)
|
|
162
|
+
).toEqual( [
|
|
163
|
+
{
|
|
164
|
+
block: {
|
|
165
|
+
clientId: '1',
|
|
166
|
+
name: 'core/template-part',
|
|
167
|
+
attributes: {
|
|
168
|
+
slug: 'aside',
|
|
169
|
+
theme: 'my-theme',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
templatePart: {
|
|
173
|
+
id: 'my-theme//aside',
|
|
174
|
+
slug: 'aside',
|
|
175
|
+
theme: 'my-theme',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
] );
|
|
179
|
+
|
|
180
|
+
// The function has been called with different params, so the cache size should now be 2.
|
|
181
|
+
/**
|
|
182
|
+
* TODO what should be done about this?
|
|
183
|
+
* Can it be tested another way?
|
|
184
|
+
* Is it necessary?
|
|
185
|
+
*/
|
|
186
|
+
// const [ , , finalSize ] = getFilteredTemplatePartBlocks.getCache();
|
|
187
|
+
// expect( finalSize ).toBe( 2 );
|
|
188
|
+
} );
|
|
189
|
+
} );
|
package/src/style.scss
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
@import "./components/inserter-sidebar/style.scss";
|
|
10
10
|
@import "./components/list-view-sidebar/style.scss";
|
|
11
11
|
@import "./components/post-author/style.scss";
|
|
12
|
+
@import "./components/post-card-panel/style.scss";
|
|
12
13
|
@import "./components/post-excerpt/style.scss";
|
|
13
14
|
@import "./components/post-featured-image/style.scss";
|
|
14
15
|
@import "./components/post-format/style.scss";
|
|
@@ -29,4 +30,5 @@
|
|
|
29
30
|
@import "./components/post-trash/style.scss";
|
|
30
31
|
@import "./components/preview-dropdown/style.scss";
|
|
31
32
|
@import "./components/table-of-contents/style.scss";
|
|
33
|
+
@import "./components/template-areas/style.scss";
|
|
32
34
|
@import "./components/template-validation-notice/style.scss";
|