@secretstache/wordpress-gutenberg 0.4.8 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/styles.css +194 -194
- package/package.json +1 -1
- package/src/styles/styles.scss +66 -72
- package/src/utils/attributes.js +37 -1
- package/src/utils/rootBlock/setRootBlock.js +1 -1
package/src/utils/attributes.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* @deprecated since 0.4.9
|
3
|
+
* @type {{linkLabel: {default: string, type: string}, linkIsOpenInNewTab: {default: boolean, type: string}, linkSource: {default: string, type: string}}}
|
4
|
+
*/
|
1
5
|
export const linkControlAttribute = {
|
2
6
|
linkLabel: {
|
3
7
|
type: 'string',
|
@@ -13,6 +17,10 @@ export const linkControlAttribute = {
|
|
13
17
|
},
|
14
18
|
};
|
15
19
|
|
20
|
+
/**
|
21
|
+
* @param name
|
22
|
+
* @returns {{[p: string]: {default: {filename: null, mime: null, alt: null, name: null, id: null, url: null}, type: string}}}
|
23
|
+
*/
|
16
24
|
export const getMediaAttribute = (name = 'media') => ({
|
17
25
|
[`${name}`]: {
|
18
26
|
type: 'object',
|
@@ -27,6 +35,10 @@ export const getMediaAttribute = (name = 'media') => ({
|
|
27
35
|
},
|
28
36
|
});
|
29
37
|
|
38
|
+
/**
|
39
|
+
* @deprecated since 0.4.9
|
40
|
+
* @type {{description: {default: string, type: string}, title: {default: string, type: string}}}
|
41
|
+
*/
|
30
42
|
export const contentAttribute = {
|
31
43
|
title: {
|
32
44
|
type: 'string',
|
@@ -38,6 +50,10 @@ export const contentAttribute = {
|
|
38
50
|
},
|
39
51
|
};
|
40
52
|
|
53
|
+
/**
|
54
|
+
* @param name
|
55
|
+
* @returns {{[p: string]: {default: {filename: null, mime: null, alt: null, name: null, id: null, url: null}, type: string}, isAnimationLooped: {default: boolean, type: string}}}
|
56
|
+
*/
|
41
57
|
export const getAnimationAttribute = (name = 'animationFile') => ({
|
42
58
|
...getMediaAttribute(name),
|
43
59
|
isAnimationLooped: {
|
@@ -134,7 +150,7 @@ export const getDataQueryAttributes = (
|
|
134
150
|
* @param {string} [options.mediaAttributeName='media'] - Background media attribute name.
|
135
151
|
* @param {boolean} [options.hasOverlay=false] - Flag to determine if overlay attributes should be included.
|
136
152
|
*
|
137
|
-
* @returns {
|
153
|
+
* @returns {{[p: string]: {default: {filename: null, mime: null, alt: null, name: null, id: null, url: null}, type: string}, backgroundMediaType?: {type: string}, backgroundColor: {type: string}, isIncludeBackgroundMedia?: {type: string}, isIncludeOverlay?: {type: string}, overlayColor?: {type: string}}}
|
138
154
|
*/
|
139
155
|
export const getBaseBackgroundAttributes = ({
|
140
156
|
hasBackgroundMedia = false,
|
@@ -214,3 +230,23 @@ export const responsiveSpacingAttribute = {
|
|
214
230
|
}
|
215
231
|
}
|
216
232
|
}
|
233
|
+
|
234
|
+
/**
|
235
|
+
* @since 0.4.9
|
236
|
+
* @param prefix
|
237
|
+
* @returns {{[p: string]: {default: string, type: string}|{default: string, type: string}|{default: boolean, type: string}}}
|
238
|
+
*/
|
239
|
+
export const getLinkAttributes = (prefix = 'link') => ({
|
240
|
+
[`${prefix}Label`]: {
|
241
|
+
type: 'string',
|
242
|
+
default: '',
|
243
|
+
},
|
244
|
+
[`${prefix}Source`]: {
|
245
|
+
type: 'string',
|
246
|
+
default: '',
|
247
|
+
},
|
248
|
+
[`${prefix}IsOpenInNewTab`]: {
|
249
|
+
type: 'boolean',
|
250
|
+
default: false,
|
251
|
+
},
|
252
|
+
});
|
@@ -61,7 +61,7 @@ export const addUnsetRootBlockFilter = (rootBlockName) => {
|
|
61
61
|
* @param {Function} [matchPostTypeCallback=null] - Callback function when the post type matches.
|
62
62
|
* @param {Function} [notMatchPostTypeCallback=null] - Callback function when the post type does not match.
|
63
63
|
*/
|
64
|
-
export const setRootBlock = (
|
64
|
+
export const setRootBlock = (
|
65
65
|
rootBlockName,
|
66
66
|
postTypes = ['page', 'ssm_design_system'],
|
67
67
|
initAppender = true,
|