@wordpress/style-engine 2.31.1-next.f56bd8138.0 → 2.32.1-next.47f435fc9.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/index.js +62 -69
- package/build/index.js.map +7 -1
- package/build/styles/background/index.js +76 -34
- package/build/styles/background/index.js.map +7 -1
- package/build/styles/border/index.js +61 -48
- package/build/styles/border/index.js.map +7 -1
- package/build/styles/color/background.js +31 -13
- package/build/styles/color/background.js.map +7 -1
- package/build/styles/color/gradient.js +31 -13
- package/build/styles/color/gradient.js.map +7 -1
- package/build/styles/color/index.js +36 -13
- package/build/styles/color/index.js.map +7 -1
- package/build/styles/color/text.js +26 -13
- package/build/styles/color/text.js.map +7 -1
- package/build/styles/constants.js +33 -8
- package/build/styles/constants.js.map +7 -1
- package/build/styles/dimensions/index.js +38 -15
- package/build/styles/dimensions/index.js.map +7 -1
- package/build/styles/index.js +54 -19
- package/build/styles/index.js.map +7 -1
- package/build/styles/outline/index.js +36 -23
- package/build/styles/outline/index.js.map +7 -1
- package/build/styles/shadow/index.js +26 -13
- package/build/styles/shadow/index.js.map +7 -1
- package/build/styles/spacing/index.js +35 -12
- package/build/styles/spacing/index.js.map +7 -1
- package/build/styles/spacing/margin.js +28 -15
- package/build/styles/spacing/margin.js.map +7 -1
- package/build/styles/spacing/padding.js +28 -15
- package/build/styles/spacing/padding.js.map +7 -1
- package/build/styles/typography/index.js +105 -31
- package/build/styles/typography/index.js.map +7 -1
- package/build/styles/utils.js +90 -132
- package/build/styles/utils.js.map +7 -1
- package/build/types.js +16 -5
- package/build/types.js.map +7 -1
- package/build-module/index.js +40 -61
- package/build-module/index.js.map +7 -1
- package/build-module/styles/background/index.js +58 -30
- package/build-module/styles/background/index.js.map +7 -1
- package/build-module/styles/border/index.js +42 -44
- package/build-module/styles/border/index.js.map +7 -1
- package/build-module/styles/color/background.js +13 -9
- package/build-module/styles/color/background.js.map +7 -1
- package/build-module/styles/color/gradient.js +13 -9
- package/build-module/styles/color/gradient.js.map +7 -1
- package/build-module/styles/color/index.js +8 -8
- package/build-module/styles/color/index.js.map +7 -1
- package/build-module/styles/color/text.js +8 -9
- package/build-module/styles/color/text.js.map +7 -1
- package/build-module/styles/constants.js +9 -4
- package/build-module/styles/constants.js.map +7 -1
- package/build-module/styles/dimensions/index.js +20 -11
- package/build-module/styles/dimensions/index.js.map +7 -1
- package/build-module/styles/index.js +22 -13
- package/build-module/styles/index.js.map +7 -1
- package/build-module/styles/outline/index.js +14 -15
- package/build-module/styles/outline/index.js.map +7 -1
- package/build-module/styles/shadow/index.js +8 -9
- package/build-module/styles/shadow/index.js.map +7 -1
- package/build-module/styles/spacing/index.js +7 -7
- package/build-module/styles/spacing/index.js.map +7 -1
- package/build-module/styles/spacing/margin.js +10 -11
- package/build-module/styles/spacing/margin.js.map +7 -1
- package/build-module/styles/spacing/padding.js +10 -11
- package/build-module/styles/spacing/padding.js.map +7 -1
- package/build-module/styles/typography/index.js +87 -27
- package/build-module/styles/typography/index.js.map +7 -1
- package/build-module/styles/utils.js +72 -128
- package/build-module/styles/utils.js.map +7 -1
- package/build-module/types.js +1 -2
- package/build-module/types.js.map +7 -1
- package/class-wp-style-engine-css-declarations.php +1 -1
- package/class-wp-style-engine-css-rule.php +1 -1
- package/class-wp-style-engine-css-rules-store.php +1 -1
- package/class-wp-style-engine-processor.php +1 -1
- package/class-wp-style-engine.php +1 -1
- package/package.json +10 -3
- package/style-engine.php +1 -1
package/CHANGELOG.md
CHANGED
package/build/index.js
CHANGED
|
@@ -1,87 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
15
|
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
__export(index_exports, {
|
|
21
|
+
compileCSS: () => compileCSS,
|
|
22
|
+
getCSSRules: () => getCSSRules,
|
|
23
|
+
getCSSValueFromRawStyle: () => import_utils.getCSSValueFromRawStyle
|
|
13
24
|
});
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
* External dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Internal dependencies
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Generates a stylesheet for a given style object and selector.
|
|
27
|
-
*
|
|
28
|
-
* @since 6.1.0 Introduced in WordPress core.
|
|
29
|
-
*
|
|
30
|
-
* @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
|
|
31
|
-
* @param options Options object with settings to adjust how the styles are generated.
|
|
32
|
-
*
|
|
33
|
-
* @return A generated stylesheet or inline style declarations.
|
|
34
|
-
*/
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
var import_change_case = require("change-case");
|
|
27
|
+
var import_styles = require("./styles");
|
|
28
|
+
var import_utils = require("./styles/utils");
|
|
35
29
|
function compileCSS(style, options = {}) {
|
|
36
30
|
const rules = getCSSRules(style, options);
|
|
37
|
-
|
|
38
|
-
// If no selector is provided, treat generated rules as inline styles to be returned as a single string.
|
|
39
31
|
if (!options?.selector) {
|
|
40
32
|
const inlineRules = [];
|
|
41
|
-
rules.forEach(rule => {
|
|
42
|
-
inlineRules.push(`${(0,
|
|
33
|
+
rules.forEach((rule) => {
|
|
34
|
+
inlineRules.push(`${(0, import_change_case.paramCase)(rule.key)}: ${rule.value};`);
|
|
43
35
|
});
|
|
44
|
-
return inlineRules.join(
|
|
36
|
+
return inlineRules.join(" ");
|
|
45
37
|
}
|
|
46
|
-
const groupedRules = rules.reduce(
|
|
47
|
-
|
|
48
|
-
selector
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
const groupedRules = rules.reduce(
|
|
39
|
+
(acc, rule) => {
|
|
40
|
+
const { selector } = rule;
|
|
41
|
+
if (!selector) {
|
|
42
|
+
return acc;
|
|
43
|
+
}
|
|
44
|
+
if (!acc[selector]) {
|
|
45
|
+
acc[selector] = [];
|
|
46
|
+
}
|
|
47
|
+
acc[selector].push(rule);
|
|
51
48
|
return acc;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
acc
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
49
|
+
},
|
|
50
|
+
{}
|
|
51
|
+
);
|
|
52
|
+
const selectorRules = Object.keys(groupedRules).reduce(
|
|
53
|
+
(acc, subSelector) => {
|
|
54
|
+
acc.push(
|
|
55
|
+
`${subSelector} { ${groupedRules[subSelector].map(
|
|
56
|
+
(rule) => `${(0, import_change_case.paramCase)(rule.key)}: ${rule.value};`
|
|
57
|
+
).join(" ")} }`
|
|
58
|
+
);
|
|
59
|
+
return acc;
|
|
60
|
+
},
|
|
61
|
+
[]
|
|
62
|
+
);
|
|
63
|
+
return selectorRules.join("\n");
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Returns a JSON representation of the generated CSS rules.
|
|
68
|
-
*
|
|
69
|
-
* @since 6.1.0 Introduced in WordPress core.
|
|
70
|
-
*
|
|
71
|
-
* @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json
|
|
72
|
-
* @param options Options object with settings to adjust how the styles are generated.
|
|
73
|
-
*
|
|
74
|
-
* @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.
|
|
75
|
-
*/
|
|
76
65
|
function getCSSRules(style, options = {}) {
|
|
77
66
|
const rules = [];
|
|
78
|
-
|
|
79
|
-
if (typeof definition.generate ===
|
|
67
|
+
import_styles.styleDefinitions.forEach((definition) => {
|
|
68
|
+
if (typeof definition.generate === "function") {
|
|
80
69
|
rules.push(...definition.generate(style, options));
|
|
81
70
|
}
|
|
82
71
|
});
|
|
83
72
|
return rules;
|
|
84
73
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
compileCSS,
|
|
77
|
+
getCSSRules,
|
|
78
|
+
getCSSValueFromRawStyle
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tStyle,\n\tStyleOptions,\n\tGeneratedCSSRule,\n\tStyleDefinition,\n} from './types';\nimport { styleDefinitions } from './styles';\n\n/**\n * Generates a stylesheet for a given style object and selector.\n *\n * @since 6.1.0 Introduced in WordPress core.\n *\n * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json\n * @param options Options object with settings to adjust how the styles are generated.\n *\n * @return A generated stylesheet or inline style declarations.\n */\nexport function compileCSS( style: Style, options: StyleOptions = {} ): string {\n\tconst rules = getCSSRules( style, options );\n\n\t// If no selector is provided, treat generated rules as inline styles to be returned as a single string.\n\tif ( ! options?.selector ) {\n\t\tconst inlineRules: string[] = [];\n\t\trules.forEach( ( rule ) => {\n\t\t\tinlineRules.push( `${ kebabCase( rule.key ) }: ${ rule.value };` );\n\t\t} );\n\t\treturn inlineRules.join( ' ' );\n\t}\n\n\tconst groupedRules = rules.reduce(\n\t\t( acc: Record< string, GeneratedCSSRule[] >, rule ) => {\n\t\t\tconst { selector } = rule;\n\t\t\tif ( ! selector ) {\n\t\t\t\treturn acc;\n\t\t\t}\n\t\t\tif ( ! acc[ selector ] ) {\n\t\t\t\tacc[ selector ] = [];\n\t\t\t}\n\t\t\tacc[ selector ].push( rule );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\tconst selectorRules = Object.keys( groupedRules ).reduce(\n\t\t( acc: string[], subSelector: string ) => {\n\t\t\tacc.push(\n\t\t\t\t`${ subSelector } { ${ groupedRules[ subSelector ]\n\t\t\t\t\t.map(\n\t\t\t\t\t\t( rule: GeneratedCSSRule ) =>\n\t\t\t\t\t\t\t`${ kebabCase( rule.key ) }: ${ rule.value };`\n\t\t\t\t\t)\n\t\t\t\t\t.join( ' ' ) } }`\n\t\t\t);\n\t\t\treturn acc;\n\t\t},\n\t\t[]\n\t);\n\n\treturn selectorRules.join( '\\n' );\n}\n\n/**\n * Returns a JSON representation of the generated CSS rules.\n *\n * @since 6.1.0 Introduced in WordPress core.\n *\n * @param style Style object, for example, the value of a block's attributes.style object or the top level styles in theme.json\n * @param options Options object with settings to adjust how the styles are generated.\n *\n * @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.\n */\nexport function getCSSRules(\n\tstyle: Style,\n\toptions: StyleOptions = {}\n): GeneratedCSSRule[] {\n\tconst rules: GeneratedCSSRule[] = [];\n\tstyleDefinitions.forEach( ( definition: StyleDefinition ) => {\n\t\tif ( typeof definition.generate === 'function' ) {\n\t\t\trules.push( ...definition.generate( style, options ) );\n\t\t}\n\t} );\n\n\treturn rules;\n}\n\n// Export style utils.\nexport { getCSSValueFromRawStyle } from './styles/utils';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,yBAAuC;AAWvC,oBAAiC;AAiFjC,mBAAwC;AArEjC,SAAS,WAAY,OAAc,UAAwB,CAAC,GAAY;AAC9E,QAAM,QAAQ,YAAa,OAAO,OAAQ;AAG1C,MAAK,CAAE,SAAS,UAAW;AAC1B,UAAM,cAAwB,CAAC;AAC/B,UAAM,QAAS,CAAE,SAAU;AAC1B,kBAAY,KAAM,OAAI,mBAAAA,WAAW,KAAK,GAAI,CAAE,KAAM,KAAK,KAAM,GAAI;AAAA,IAClE,CAAE;AACF,WAAO,YAAY,KAAM,GAAI;AAAA,EAC9B;AAEA,QAAM,eAAe,MAAM;AAAA,IAC1B,CAAE,KAA2C,SAAU;AACtD,YAAM,EAAE,SAAS,IAAI;AACrB,UAAK,CAAE,UAAW;AACjB,eAAO;AAAA,MACR;AACA,UAAK,CAAE,IAAK,QAAS,GAAI;AACxB,YAAK,QAAS,IAAI,CAAC;AAAA,MACpB;AACA,UAAK,QAAS,EAAE,KAAM,IAAK;AAC3B,aAAO;AAAA,IACR;AAAA,IACA,CAAC;AAAA,EACF;AACA,QAAM,gBAAgB,OAAO,KAAM,YAAa,EAAE;AAAA,IACjD,CAAE,KAAe,gBAAyB;AACzC,UAAI;AAAA,QACH,GAAI,WAAY,MAAO,aAAc,WAAY,EAC/C;AAAA,UACA,CAAE,SACD,OAAI,mBAAAA,WAAW,KAAK,GAAI,CAAE,KAAM,KAAK,KAAM;AAAA,QAC7C,EACC,KAAM,GAAI,CAAE;AAAA,MACf;AACA,aAAO;AAAA,IACR;AAAA,IACA,CAAC;AAAA,EACF;AAEA,SAAO,cAAc,KAAM,IAAK;AACjC;AAYO,SAAS,YACf,OACA,UAAwB,CAAC,GACJ;AACrB,QAAM,QAA4B,CAAC;AACnC,iCAAiB,QAAS,CAAE,eAAiC;AAC5D,QAAK,OAAO,WAAW,aAAa,YAAa;AAChD,YAAM,KAAM,GAAG,WAAW,SAAU,OAAO,OAAQ,CAAE;AAAA,IACtD;AAAA,EACD,CAAE;AAEF,SAAO;AACR;",
|
|
6
|
+
"names": ["kebabCase"]
|
|
7
|
+
}
|
|
@@ -1,58 +1,100 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var background_exports = {};
|
|
20
|
+
__export(background_exports, {
|
|
21
|
+
default: () => background_default
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(background_exports);
|
|
24
|
+
var import_utils = require("../utils");
|
|
12
25
|
const backgroundImage = {
|
|
13
|
-
name:
|
|
26
|
+
name: "backgroundImage",
|
|
14
27
|
generate: (style, options) => {
|
|
15
28
|
const _backgroundImage = style?.background?.backgroundImage;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
value: `url( '${encodeURI((0, _utils.safeDecodeURI)(_backgroundImage.url))}' )`
|
|
28
|
-
}];
|
|
29
|
+
if (typeof _backgroundImage === "object" && _backgroundImage?.url) {
|
|
30
|
+
return [
|
|
31
|
+
{
|
|
32
|
+
selector: options.selector,
|
|
33
|
+
key: "backgroundImage",
|
|
34
|
+
// Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.
|
|
35
|
+
value: `url( '${encodeURI(
|
|
36
|
+
(0, import_utils.safeDecodeURI)(_backgroundImage.url)
|
|
37
|
+
)}' )`
|
|
38
|
+
}
|
|
39
|
+
];
|
|
29
40
|
}
|
|
30
|
-
return (0,
|
|
41
|
+
return (0, import_utils.generateRule)(
|
|
42
|
+
style,
|
|
43
|
+
options,
|
|
44
|
+
["background", "backgroundImage"],
|
|
45
|
+
"backgroundImage"
|
|
46
|
+
);
|
|
31
47
|
}
|
|
32
48
|
};
|
|
33
49
|
const backgroundPosition = {
|
|
34
|
-
name:
|
|
50
|
+
name: "backgroundPosition",
|
|
35
51
|
generate: (style, options) => {
|
|
36
|
-
return (0,
|
|
52
|
+
return (0, import_utils.generateRule)(
|
|
53
|
+
style,
|
|
54
|
+
options,
|
|
55
|
+
["background", "backgroundPosition"],
|
|
56
|
+
"backgroundPosition"
|
|
57
|
+
);
|
|
37
58
|
}
|
|
38
59
|
};
|
|
39
60
|
const backgroundRepeat = {
|
|
40
|
-
name:
|
|
61
|
+
name: "backgroundRepeat",
|
|
41
62
|
generate: (style, options) => {
|
|
42
|
-
return (0,
|
|
63
|
+
return (0, import_utils.generateRule)(
|
|
64
|
+
style,
|
|
65
|
+
options,
|
|
66
|
+
["background", "backgroundRepeat"],
|
|
67
|
+
"backgroundRepeat"
|
|
68
|
+
);
|
|
43
69
|
}
|
|
44
70
|
};
|
|
45
71
|
const backgroundSize = {
|
|
46
|
-
name:
|
|
72
|
+
name: "backgroundSize",
|
|
47
73
|
generate: (style, options) => {
|
|
48
|
-
return (0,
|
|
74
|
+
return (0, import_utils.generateRule)(
|
|
75
|
+
style,
|
|
76
|
+
options,
|
|
77
|
+
["background", "backgroundSize"],
|
|
78
|
+
"backgroundSize"
|
|
79
|
+
);
|
|
49
80
|
}
|
|
50
81
|
};
|
|
51
82
|
const backgroundAttachment = {
|
|
52
|
-
name:
|
|
83
|
+
name: "backgroundAttachment",
|
|
53
84
|
generate: (style, options) => {
|
|
54
|
-
return (0,
|
|
85
|
+
return (0, import_utils.generateRule)(
|
|
86
|
+
style,
|
|
87
|
+
options,
|
|
88
|
+
["background", "backgroundAttachment"],
|
|
89
|
+
"backgroundAttachment"
|
|
90
|
+
);
|
|
55
91
|
}
|
|
56
92
|
};
|
|
57
|
-
var
|
|
58
|
-
|
|
93
|
+
var background_default = [
|
|
94
|
+
backgroundImage,
|
|
95
|
+
backgroundPosition,
|
|
96
|
+
backgroundRepeat,
|
|
97
|
+
backgroundSize,
|
|
98
|
+
backgroundAttachment
|
|
99
|
+
];
|
|
100
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/styles/background/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule, safeDecodeURI } from '../utils';\n\nconst backgroundImage = {\n\tname: 'backgroundImage',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\tconst _backgroundImage = style?.background?.backgroundImage;\n\n\t\t/*\n\t\t * The background image can be a string or an object.\n\t\t * If the background image is a string, it could already contain a url() function,\n\t\t * or have a linear-gradient value.\n\t\t */\n\t\tif ( typeof _backgroundImage === 'object' && _backgroundImage?.url ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tselector: options.selector,\n\t\t\t\t\tkey: 'backgroundImage',\n\t\t\t\t\t// Passed `url` may already be encoded. To prevent double encoding, decodeURI is executed to revert to the original string.\n\t\t\t\t\tvalue: `url( '${ encodeURI(\n\t\t\t\t\t\tsafeDecodeURI( _backgroundImage.url )\n\t\t\t\t\t) }' )`,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'background', 'backgroundImage' ],\n\t\t\t'backgroundImage'\n\t\t);\n\t},\n};\n\nconst backgroundPosition = {\n\tname: 'backgroundPosition',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'background', 'backgroundPosition' ],\n\t\t\t'backgroundPosition'\n\t\t);\n\t},\n};\n\nconst backgroundRepeat = {\n\tname: 'backgroundRepeat',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'background', 'backgroundRepeat' ],\n\t\t\t'backgroundRepeat'\n\t\t);\n\t},\n};\n\nconst backgroundSize = {\n\tname: 'backgroundSize',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'background', 'backgroundSize' ],\n\t\t\t'backgroundSize'\n\t\t);\n\t},\n};\n\nconst backgroundAttachment = {\n\tname: 'backgroundAttachment',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'background', 'backgroundAttachment' ],\n\t\t\t'backgroundAttachment'\n\t\t);\n\t},\n};\n\nexport default [\n\tbackgroundImage,\n\tbackgroundPosition,\n\tbackgroundRepeat,\n\tbackgroundSize,\n\tbackgroundAttachment,\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA4C;AAE5C,MAAM,kBAAkB;AAAA,EACvB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,UAAM,mBAAmB,OAAO,YAAY;AAO5C,QAAK,OAAO,qBAAqB,YAAY,kBAAkB,KAAM;AACpE,aAAO;AAAA,QACN;AAAA,UACC,UAAU,QAAQ;AAAA,UAClB,KAAK;AAAA;AAAA,UAEL,OAAO,SAAU;AAAA,gBAChB,4BAAe,iBAAiB,GAAI;AAAA,UACrC,CAAE;AAAA,QACH;AAAA,MACD;AAAA,IACD;AAEA,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,iBAAkB;AAAA,MAClC;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,qBAAqB;AAAA,EAC1B,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,oBAAqB;AAAA,MACrC;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,mBAAmB;AAAA,EACxB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,kBAAmB;AAAA,MACnC;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,gBAAiB;AAAA,MACjC;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,uBAAuB;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,sBAAuB;AAAA,MACvC;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAO,qBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,76 +1,89 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var border_exports = {};
|
|
20
|
+
__export(border_exports, {
|
|
21
|
+
default: () => border_default
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Creates a function for generating CSS rules when the style path is the same as the camelCase CSS property used in React.
|
|
14
|
-
*
|
|
15
|
-
* @param path An array of strings representing the path to the style value in the style object.
|
|
16
|
-
*
|
|
17
|
-
* @return A function that generates CSS rules.
|
|
18
|
-
*/
|
|
23
|
+
module.exports = __toCommonJS(border_exports);
|
|
24
|
+
var import_utils = require("../utils");
|
|
19
25
|
function createBorderGenerateFunction(path) {
|
|
20
|
-
return (style, options) => (0,
|
|
26
|
+
return (style, options) => (0, import_utils.generateRule)(style, options, path, (0, import_utils.camelCaseJoin)(path));
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Creates a function for generating border-{top,bottom,left,right}-{color,style,width} CSS rules.
|
|
25
|
-
*
|
|
26
|
-
* @param edge The edge to create CSS rules for.
|
|
27
|
-
*
|
|
28
|
-
* @return A function that generates CSS rules.
|
|
29
|
-
*/
|
|
30
28
|
function createBorderEdgeGenerateFunction(edge) {
|
|
31
29
|
return (style, options) => {
|
|
32
|
-
return [
|
|
33
|
-
const path = [
|
|
30
|
+
return ["color", "style", "width"].flatMap((key) => {
|
|
31
|
+
const path = ["border", edge, key];
|
|
34
32
|
return createBorderGenerateFunction(path)(style, options);
|
|
35
33
|
});
|
|
36
34
|
};
|
|
37
35
|
}
|
|
38
36
|
const color = {
|
|
39
|
-
name:
|
|
40
|
-
generate: createBorderGenerateFunction([
|
|
37
|
+
name: "color",
|
|
38
|
+
generate: createBorderGenerateFunction(["border", "color"])
|
|
41
39
|
};
|
|
42
40
|
const radius = {
|
|
43
|
-
name:
|
|
41
|
+
name: "radius",
|
|
44
42
|
generate: (style, options) => {
|
|
45
|
-
return (0,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
return (0, import_utils.generateBoxRules)(
|
|
44
|
+
style,
|
|
45
|
+
options,
|
|
46
|
+
["border", "radius"],
|
|
47
|
+
{
|
|
48
|
+
default: "borderRadius",
|
|
49
|
+
individual: "border%sRadius"
|
|
50
|
+
},
|
|
51
|
+
["topLeft", "topRight", "bottomLeft", "bottomRight"]
|
|
52
|
+
);
|
|
49
53
|
}
|
|
50
54
|
};
|
|
51
55
|
const borderStyle = {
|
|
52
|
-
name:
|
|
53
|
-
generate: createBorderGenerateFunction([
|
|
56
|
+
name: "style",
|
|
57
|
+
generate: createBorderGenerateFunction(["border", "style"])
|
|
54
58
|
};
|
|
55
59
|
const width = {
|
|
56
|
-
name:
|
|
57
|
-
generate: createBorderGenerateFunction([
|
|
60
|
+
name: "width",
|
|
61
|
+
generate: createBorderGenerateFunction(["border", "width"])
|
|
58
62
|
};
|
|
59
63
|
const borderTop = {
|
|
60
|
-
name:
|
|
61
|
-
generate: createBorderEdgeGenerateFunction(
|
|
64
|
+
name: "borderTop",
|
|
65
|
+
generate: createBorderEdgeGenerateFunction("top")
|
|
62
66
|
};
|
|
63
67
|
const borderRight = {
|
|
64
|
-
name:
|
|
65
|
-
generate: createBorderEdgeGenerateFunction(
|
|
68
|
+
name: "borderRight",
|
|
69
|
+
generate: createBorderEdgeGenerateFunction("right")
|
|
66
70
|
};
|
|
67
71
|
const borderBottom = {
|
|
68
|
-
name:
|
|
69
|
-
generate: createBorderEdgeGenerateFunction(
|
|
72
|
+
name: "borderBottom",
|
|
73
|
+
generate: createBorderEdgeGenerateFunction("bottom")
|
|
70
74
|
};
|
|
71
75
|
const borderLeft = {
|
|
72
|
-
name:
|
|
73
|
-
generate: createBorderEdgeGenerateFunction(
|
|
76
|
+
name: "borderLeft",
|
|
77
|
+
generate: createBorderEdgeGenerateFunction("left")
|
|
74
78
|
};
|
|
75
|
-
var
|
|
76
|
-
|
|
79
|
+
var border_default = [
|
|
80
|
+
color,
|
|
81
|
+
borderStyle,
|
|
82
|
+
width,
|
|
83
|
+
radius,
|
|
84
|
+
borderTop,
|
|
85
|
+
borderRight,
|
|
86
|
+
borderBottom,
|
|
87
|
+
borderLeft
|
|
88
|
+
];
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/styles/border/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { BoxEdge, GenerateFunction, StyleDefinition } from '../../types';\nimport { generateRule, generateBoxRules, camelCaseJoin } from '../utils';\n\n/**\n * Creates a function for generating CSS rules when the style path is the same as the camelCase CSS property used in React.\n *\n * @param path An array of strings representing the path to the style value in the style object.\n *\n * @return A function that generates CSS rules.\n */\nfunction createBorderGenerateFunction( path: string[] ): GenerateFunction {\n\treturn ( style, options ) =>\n\t\tgenerateRule( style, options, path, camelCaseJoin( path ) );\n}\n\n/**\n * Creates a function for generating border-{top,bottom,left,right}-{color,style,width} CSS rules.\n *\n * @param edge The edge to create CSS rules for.\n *\n * @return A function that generates CSS rules.\n */\nfunction createBorderEdgeGenerateFunction( edge: BoxEdge ): GenerateFunction {\n\treturn ( style, options ) => {\n\t\treturn [ 'color', 'style', 'width' ].flatMap( ( key ) => {\n\t\t\tconst path = [ 'border', edge, key ];\n\t\t\treturn createBorderGenerateFunction( path )( style, options );\n\t\t} );\n\t};\n}\n\nconst color: StyleDefinition = {\n\tname: 'color',\n\tgenerate: createBorderGenerateFunction( [ 'border', 'color' ] ),\n};\n\nconst radius: StyleDefinition = {\n\tname: 'radius',\n\tgenerate: ( style, options ) => {\n\t\treturn generateBoxRules(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'border', 'radius' ],\n\t\t\t{\n\t\t\t\tdefault: 'borderRadius',\n\t\t\t\tindividual: 'border%sRadius',\n\t\t\t},\n\t\t\t[ 'topLeft', 'topRight', 'bottomLeft', 'bottomRight' ]\n\t\t);\n\t},\n};\n\nconst borderStyle: StyleDefinition = {\n\tname: 'style',\n\tgenerate: createBorderGenerateFunction( [ 'border', 'style' ] ),\n};\n\nconst width: StyleDefinition = {\n\tname: 'width',\n\tgenerate: createBorderGenerateFunction( [ 'border', 'width' ] ),\n};\n\nconst borderTop: StyleDefinition = {\n\tname: 'borderTop',\n\tgenerate: createBorderEdgeGenerateFunction( 'top' ),\n};\n\nconst borderRight: StyleDefinition = {\n\tname: 'borderRight',\n\tgenerate: createBorderEdgeGenerateFunction( 'right' ),\n};\n\nconst borderBottom: StyleDefinition = {\n\tname: 'borderBottom',\n\tgenerate: createBorderEdgeGenerateFunction( 'bottom' ),\n};\n\nconst borderLeft: StyleDefinition = {\n\tname: 'borderLeft',\n\tgenerate: createBorderEdgeGenerateFunction( 'left' ),\n};\n\nexport default [\n\tcolor,\n\tborderStyle,\n\twidth,\n\tradius,\n\tborderTop,\n\tborderRight,\n\tborderBottom,\n\tborderLeft,\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA8D;AAS9D,SAAS,6BAA8B,MAAmC;AACzE,SAAO,CAAE,OAAO,gBACf,2BAAc,OAAO,SAAS,UAAM,4BAAe,IAAK,CAAE;AAC5D;AASA,SAAS,iCAAkC,MAAkC;AAC5E,SAAO,CAAE,OAAO,YAAa;AAC5B,WAAO,CAAE,SAAS,SAAS,OAAQ,EAAE,QAAS,CAAE,QAAS;AACxD,YAAM,OAAO,CAAE,UAAU,MAAM,GAAI;AACnC,aAAO,6BAA8B,IAAK,EAAG,OAAO,OAAQ;AAAA,IAC7D,CAAE;AAAA,EACH;AACD;AAEA,MAAM,QAAyB;AAAA,EAC9B,MAAM;AAAA,EACN,UAAU,6BAA8B,CAAE,UAAU,OAAQ,CAAE;AAC/D;AAEA,MAAM,SAA0B;AAAA,EAC/B,MAAM;AAAA,EACN,UAAU,CAAE,OAAO,YAAa;AAC/B,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,UAAU,QAAS;AAAA,MACrB;AAAA,QACC,SAAS;AAAA,QACT,YAAY;AAAA,MACb;AAAA,MACA,CAAE,WAAW,YAAY,cAAc,aAAc;AAAA,IACtD;AAAA,EACD;AACD;AAEA,MAAM,cAA+B;AAAA,EACpC,MAAM;AAAA,EACN,UAAU,6BAA8B,CAAE,UAAU,OAAQ,CAAE;AAC/D;AAEA,MAAM,QAAyB;AAAA,EAC9B,MAAM;AAAA,EACN,UAAU,6BAA8B,CAAE,UAAU,OAAQ,CAAE;AAC/D;AAEA,MAAM,YAA6B;AAAA,EAClC,MAAM;AAAA,EACN,UAAU,iCAAkC,KAAM;AACnD;AAEA,MAAM,cAA+B;AAAA,EACpC,MAAM;AAAA,EACN,UAAU,iCAAkC,OAAQ;AACrD;AAEA,MAAM,eAAgC;AAAA,EACrC,MAAM;AAAA,EACN,UAAU,iCAAkC,QAAS;AACtD;AAEA,MAAM,aAA8B;AAAA,EACnC,MAAM;AAAA,EACN,UAAU,iCAAkC,MAAO;AACpD;AAEA,IAAO,iBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var background_exports = {};
|
|
20
|
+
__export(background_exports, {
|
|
21
|
+
default: () => background_default
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(background_exports);
|
|
24
|
+
var import_utils = require("../utils");
|
|
12
25
|
const background = {
|
|
13
|
-
name:
|
|
26
|
+
name: "background",
|
|
14
27
|
generate: (style, options) => {
|
|
15
|
-
return (0,
|
|
28
|
+
return (0, import_utils.generateRule)(
|
|
29
|
+
style,
|
|
30
|
+
options,
|
|
31
|
+
["color", "background"],
|
|
32
|
+
"backgroundColor"
|
|
33
|
+
);
|
|
16
34
|
}
|
|
17
35
|
};
|
|
18
|
-
var
|
|
19
|
-
//# sourceMappingURL=background.js.map
|
|
36
|
+
var background_default = background;
|
|
37
|
+
//# sourceMappingURL=background.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/styles/color/background.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst background = {\n\tname: 'background',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'color', 'background' ],\n\t\t\t'backgroundColor'\n\t\t);\n\t},\n};\n\nexport default background;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,MAAM,aAAa;AAAA,EAClB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,SAAS,YAAa;AAAA,MACxB;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAO,qBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var gradient_exports = {};
|
|
20
|
+
__export(gradient_exports, {
|
|
21
|
+
default: () => gradient_default
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
/**
|
|
9
|
-
* Internal dependencies
|
|
10
|
-
*/
|
|
11
|
-
|
|
23
|
+
module.exports = __toCommonJS(gradient_exports);
|
|
24
|
+
var import_utils = require("../utils");
|
|
12
25
|
const gradient = {
|
|
13
|
-
name:
|
|
26
|
+
name: "gradient",
|
|
14
27
|
generate: (style, options) => {
|
|
15
|
-
return (0,
|
|
28
|
+
return (0, import_utils.generateRule)(
|
|
29
|
+
style,
|
|
30
|
+
options,
|
|
31
|
+
["color", "gradient"],
|
|
32
|
+
"background"
|
|
33
|
+
);
|
|
16
34
|
}
|
|
17
35
|
};
|
|
18
|
-
var
|
|
19
|
-
//# sourceMappingURL=gradient.js.map
|
|
36
|
+
var gradient_default = gradient;
|
|
37
|
+
//# sourceMappingURL=gradient.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/styles/color/gradient.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst gradient = {\n\tname: 'gradient',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'color', 'gradient' ],\n\t\t\t'background'\n\t\t);\n\t},\n};\n\nexport default gradient;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,MAAM,WAAW;AAAA,EAChB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,SAAS,UAAW;AAAA,MACtB;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAO,mBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|