Skip to content

Commit cc9cfab

Browse files
authored
Fix (style guide): move files to lazy loaded component (#3595)
* move block style generators * move meta separators to util --------- Co-authored-by: [email protected] <>
1 parent 573fbad commit cc9cfab

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

src/block/posts/util.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
getTypographyClasses,
1313
} from '~stackable/block-components'
1414
import { getBlockStyle } from '~stackable/hooks'
15+
import { META_SEPARATORS } from '~stackable/util'
1516

1617
/**
1718
* WordPress dependencies
@@ -27,14 +28,6 @@ import { Fragment } from '@wordpress/element'
2728
*/
2829
import variations from './variations'
2930

30-
export const META_SEPARATORS = {
31-
dot: '·',
32-
space: ' ',
33-
comma: ',',
34-
dash: '—',
35-
pipe: '|',
36-
}
37-
3831
export const CONTENTS = [
3932
{
4033
label: __( 'Featured Image', i18n ),

src/components/design-library-list/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import DEFAULT from './default.json'
44
import {
55
settings, isPro, cdnUrl,
66
} from 'stackable'
7+
import { META_SEPARATORS } from '~stackable/util'
78

89
import { parse, serialize } from '@wordpress/blocks'
910
import { select } from '@wordpress/data'
10-
import { META_SEPARATORS } from '~stackable/block/posts/util'
1111

1212
export const DEFAULT_CONTENT = { ...DEFAULT }
1313
const PARSER = new DOMParser()
File renamed without changes.

src/lazy-components/style-guide/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import heroBg from './images/hero-bg.webp'
22
import profile from './images/profile.webp'
3+
import { blockStyleGenerators } from './block-style-generators'
4+
35
import {
46
i18n, srcUrl, version as VERSION,
57
} from 'stackable'
@@ -8,7 +10,6 @@ import { CssSaveCompiler } from '../../components/block-css'
810
import {
911
cleanSerializedBlock,
1012
createUniqueClass,
11-
blockStyleGenerators,
1213
} from '~stackable/util'
1314
import { PLACEHOLDER_INNER_BLOCKS } from './block-templates'
1415

src/util/blocks.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,3 +619,11 @@ export const cleanSerializedBlock = ( serialized, cb, attributes = {} ) => {
619619

620620
return cleanSerialized
621621
}
622+
623+
export const META_SEPARATORS = {
624+
dot: '·',
625+
space: ' ',
626+
comma: ',',
627+
dash: '—',
628+
pipe: '|',
629+
}

src/util/styles/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { applyFilters } from '@wordpress/hooks'
1515
export { default as StyleObject } from './style-object'
1616
export { useStyles, getStyles } from './style-object'
1717
export { useQueryLoopInstanceId } from './style-object'
18-
export { blockStyleGenerators } from './block-style-generators'
1918

2019
export const isDarkColor = _color => {
2120
try {

0 commit comments

Comments
 (0)