@wordpress/style-engine 2.33.1 → 2.34.1-next.2f1c7c01b.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 +2 -0
- package/build/index.js.map +1 -1
- package/build/styles/background/index.js +7 -5
- package/build/styles/background/index.js.map +1 -1
- package/build/styles/border/index.js +10 -8
- package/build/styles/border/index.js.map +1 -1
- package/build/styles/color/background.js +3 -1
- package/build/styles/color/background.js.map +1 -1
- package/build/styles/color/gradient.js +3 -1
- package/build/styles/color/gradient.js.map +1 -1
- package/build/styles/color/index.js +2 -0
- package/build/styles/color/index.js.map +1 -1
- package/build/styles/color/text.js +3 -1
- package/build/styles/color/text.js.map +1 -1
- package/build/styles/constants.js +5 -3
- package/build/styles/constants.js.map +1 -1
- package/build/styles/dimensions/index.js +4 -2
- package/build/styles/dimensions/index.js.map +1 -1
- package/build/styles/index.js +3 -1
- package/build/styles/index.js.map +1 -1
- package/build/styles/outline/index.js +6 -4
- package/build/styles/outline/index.js.map +1 -1
- package/build/styles/shadow/index.js +3 -1
- package/build/styles/shadow/index.js.map +1 -1
- package/build/styles/spacing/index.js +2 -0
- package/build/styles/spacing/index.js.map +1 -1
- package/build/styles/spacing/margin.js +3 -1
- package/build/styles/spacing/margin.js.map +1 -1
- package/build/styles/spacing/padding.js +3 -1
- package/build/styles/spacing/padding.js.map +1 -1
- package/build/styles/typography/index.js +12 -10
- package/build/styles/typography/index.js.map +1 -1
- package/build/styles/utils.js +3 -1
- package/build/styles/utils.js.map +1 -1
- package/build/types.js +2 -0
- package/build/types.js.map +1 -1
- package/build-module/index.js +2 -1
- package/build-module/index.js.map +1 -1
- package/build-module/styles/background/index.js +6 -5
- package/build-module/styles/background/index.js.map +1 -1
- package/build-module/styles/border/index.js +9 -8
- package/build-module/styles/border/index.js.map +1 -1
- package/build-module/styles/color/background.js +2 -1
- package/build-module/styles/color/background.js.map +1 -1
- package/build-module/styles/color/gradient.js +2 -1
- package/build-module/styles/color/gradient.js.map +1 -1
- package/build-module/styles/color/index.js +1 -0
- package/build-module/styles/color/index.js.map +1 -1
- package/build-module/styles/color/text.js +2 -1
- package/build-module/styles/color/text.js.map +1 -1
- package/build-module/styles/constants.js +4 -3
- package/build-module/styles/constants.js.map +1 -1
- package/build-module/styles/dimensions/index.js +3 -2
- package/build-module/styles/dimensions/index.js.map +1 -1
- package/build-module/styles/index.js +2 -1
- package/build-module/styles/index.js.map +1 -1
- package/build-module/styles/outline/index.js +5 -4
- package/build-module/styles/outline/index.js.map +1 -1
- package/build-module/styles/shadow/index.js +2 -1
- package/build-module/styles/shadow/index.js.map +1 -1
- package/build-module/styles/spacing/index.js +1 -0
- package/build-module/styles/spacing/index.js.map +1 -1
- package/build-module/styles/spacing/margin.js +2 -1
- package/build-module/styles/spacing/margin.js.map +1 -1
- package/build-module/styles/spacing/padding.js +2 -1
- package/build-module/styles/spacing/padding.js.map +1 -1
- package/build-module/styles/typography/index.js +11 -10
- package/build-module/styles/typography/index.js.map +1 -1
- package/build-module/styles/utils.js +2 -1
- package/build-module/styles/utils.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/build/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/index.ts
|
|
19
21
|
var index_exports = {};
|
|
20
22
|
__export(index_exports, {
|
|
21
23
|
compileCSS: () => compileCSS,
|
package/build/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
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": "
|
|
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
6
|
"names": ["kebabCase"]
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/background/index.ts
|
|
19
21
|
var background_exports = {};
|
|
20
22
|
__export(background_exports, {
|
|
21
23
|
default: () => background_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(background_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var backgroundImage = {
|
|
26
28
|
name: "backgroundImage",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
const _backgroundImage = style?.background?.backgroundImage;
|
|
@@ -46,7 +48,7 @@ const backgroundImage = {
|
|
|
46
48
|
);
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
|
-
|
|
51
|
+
var backgroundPosition = {
|
|
50
52
|
name: "backgroundPosition",
|
|
51
53
|
generate: (style, options) => {
|
|
52
54
|
return (0, import_utils.generateRule)(
|
|
@@ -57,7 +59,7 @@ const backgroundPosition = {
|
|
|
57
59
|
);
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
|
-
|
|
62
|
+
var backgroundRepeat = {
|
|
61
63
|
name: "backgroundRepeat",
|
|
62
64
|
generate: (style, options) => {
|
|
63
65
|
return (0, import_utils.generateRule)(
|
|
@@ -68,7 +70,7 @@ const backgroundRepeat = {
|
|
|
68
70
|
);
|
|
69
71
|
}
|
|
70
72
|
};
|
|
71
|
-
|
|
73
|
+
var backgroundSize = {
|
|
72
74
|
name: "backgroundSize",
|
|
73
75
|
generate: (style, options) => {
|
|
74
76
|
return (0, import_utils.generateRule)(
|
|
@@ -79,7 +81,7 @@ const backgroundSize = {
|
|
|
79
81
|
);
|
|
80
82
|
}
|
|
81
83
|
};
|
|
82
|
-
|
|
84
|
+
var backgroundAttachment = {
|
|
83
85
|
name: "backgroundAttachment",
|
|
84
86
|
generate: (style, options) => {
|
|
85
87
|
return (0, import_utils.generateRule)(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/background/index.ts"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA4C;AAE5C,IAAM,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,IAAM,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,IAAM,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,IAAM,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,IAAM,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/border/index.ts
|
|
19
21
|
var border_exports = {};
|
|
20
22
|
__export(border_exports, {
|
|
21
23
|
default: () => border_default
|
|
@@ -33,11 +35,11 @@ function createBorderEdgeGenerateFunction(edge) {
|
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
var color = {
|
|
37
39
|
name: "color",
|
|
38
40
|
generate: createBorderGenerateFunction(["border", "color"])
|
|
39
41
|
};
|
|
40
|
-
|
|
42
|
+
var radius = {
|
|
41
43
|
name: "radius",
|
|
42
44
|
generate: (style, options) => {
|
|
43
45
|
return (0, import_utils.generateBoxRules)(
|
|
@@ -52,27 +54,27 @@ const radius = {
|
|
|
52
54
|
);
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
|
-
|
|
57
|
+
var borderStyle = {
|
|
56
58
|
name: "style",
|
|
57
59
|
generate: createBorderGenerateFunction(["border", "style"])
|
|
58
60
|
};
|
|
59
|
-
|
|
61
|
+
var width = {
|
|
60
62
|
name: "width",
|
|
61
63
|
generate: createBorderGenerateFunction(["border", "width"])
|
|
62
64
|
};
|
|
63
|
-
|
|
65
|
+
var borderTop = {
|
|
64
66
|
name: "borderTop",
|
|
65
67
|
generate: createBorderEdgeGenerateFunction("top")
|
|
66
68
|
};
|
|
67
|
-
|
|
69
|
+
var borderRight = {
|
|
68
70
|
name: "borderRight",
|
|
69
71
|
generate: createBorderEdgeGenerateFunction("right")
|
|
70
72
|
};
|
|
71
|
-
|
|
73
|
+
var borderBottom = {
|
|
72
74
|
name: "borderBottom",
|
|
73
75
|
generate: createBorderEdgeGenerateFunction("bottom")
|
|
74
76
|
};
|
|
75
|
-
|
|
77
|
+
var borderLeft = {
|
|
76
78
|
name: "borderLeft",
|
|
77
79
|
generate: createBorderEdgeGenerateFunction("left")
|
|
78
80
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/border/index.ts"],
|
|
4
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": "
|
|
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,IAAM,QAAyB;AAAA,EAC9B,MAAM;AAAA,EACN,UAAU,6BAA8B,CAAE,UAAU,OAAQ,CAAE;AAC/D;AAEA,IAAM,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,IAAM,cAA+B;AAAA,EACpC,MAAM;AAAA,EACN,UAAU,6BAA8B,CAAE,UAAU,OAAQ,CAAE;AAC/D;AAEA,IAAM,QAAyB;AAAA,EAC9B,MAAM;AAAA,EACN,UAAU,6BAA8B,CAAE,UAAU,OAAQ,CAAE;AAC/D;AAEA,IAAM,YAA6B;AAAA,EAClC,MAAM;AAAA,EACN,UAAU,iCAAkC,KAAM;AACnD;AAEA,IAAM,cAA+B;AAAA,EACpC,MAAM;AAAA,EACN,UAAU,iCAAkC,OAAQ;AACrD;AAEA,IAAM,eAAgC;AAAA,EACrC,MAAM;AAAA,EACN,UAAU,iCAAkC,QAAS;AACtD;AAEA,IAAM,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/color/background.ts
|
|
19
21
|
var background_exports = {};
|
|
20
22
|
__export(background_exports, {
|
|
21
23
|
default: () => background_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(background_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var background = {
|
|
26
28
|
name: "background",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateRule)(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/color/background.ts"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,IAAM,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/color/gradient.ts
|
|
19
21
|
var gradient_exports = {};
|
|
20
22
|
__export(gradient_exports, {
|
|
21
23
|
default: () => gradient_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(gradient_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var gradient = {
|
|
26
28
|
name: "gradient",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateRule)(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/color/gradient.ts"],
|
|
4
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": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,IAAM,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
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/style-engine/src/styles/color/index.ts
|
|
29
31
|
var color_exports = {};
|
|
30
32
|
__export(color_exports, {
|
|
31
33
|
default: () => color_default
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/color/index.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport background from './background';\nimport gradient from './gradient';\nimport text from './text';\n\nexport default [ text, gradient, background ];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,sBAAqB;AACrB,kBAAiB;AAEjB,IAAO,gBAAQ,CAAE,YAAAA,SAAM,gBAAAC,SAAU,kBAAAC,OAAW;",
|
|
6
6
|
"names": ["text", "gradient", "background"]
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/color/text.ts
|
|
19
21
|
var text_exports = {};
|
|
20
22
|
__export(text_exports, {
|
|
21
23
|
default: () => text_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(text_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var text = {
|
|
26
28
|
name: "text",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateRule)(style, options, ["color", "text"], "color");
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/color/text.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst text = {\n\tname: 'text',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule( style, options, [ 'color', 'text' ], 'color' );\n\t},\n};\n\nexport default text;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,IAAM,OAAO;AAAA,EACZ,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO,2BAAc,OAAO,SAAS,CAAE,SAAS,MAAO,GAAG,OAAQ;AAAA,EACnE;AACD;AAEA,IAAO,eAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,6 +16,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/constants.ts
|
|
19
21
|
var constants_exports = {};
|
|
20
22
|
__export(constants_exports, {
|
|
21
23
|
VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE: () => VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE,
|
|
@@ -23,9 +25,9 @@ __export(constants_exports, {
|
|
|
23
25
|
VARIABLE_REFERENCE_PREFIX: () => VARIABLE_REFERENCE_PREFIX
|
|
24
26
|
});
|
|
25
27
|
module.exports = __toCommonJS(constants_exports);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
var VARIABLE_REFERENCE_PREFIX = "var:";
|
|
29
|
+
var VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = "|";
|
|
30
|
+
var VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = "--";
|
|
29
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
32
|
0 && (module.exports = {
|
|
31
33
|
VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styles/constants.ts"],
|
|
4
4
|
"sourcesContent": ["export const VARIABLE_REFERENCE_PREFIX = 'var:';\nexport const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';\nexport const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,4BAA4B;AAClC,IAAM,0CAA0C;AAChD,IAAM,sCAAsC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/dimensions/index.ts
|
|
19
21
|
var dimensions_exports = {};
|
|
20
22
|
__export(dimensions_exports, {
|
|
21
23
|
default: () => dimensions_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(dimensions_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var minHeight = {
|
|
26
28
|
name: "minHeight",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateRule)(
|
|
@@ -33,7 +35,7 @@ const minHeight = {
|
|
|
33
35
|
);
|
|
34
36
|
}
|
|
35
37
|
};
|
|
36
|
-
|
|
38
|
+
var aspectRatio = {
|
|
37
39
|
name: "aspectRatio",
|
|
38
40
|
generate: (style, options) => {
|
|
39
41
|
return (0, import_utils.generateRule)(
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/dimensions/index.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst minHeight = {\n\tname: 'minHeight',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'dimensions', 'minHeight' ],\n\t\t\t'minHeight'\n\t\t);\n\t},\n};\n\nconst aspectRatio = {\n\tname: 'aspectRatio',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\t'aspectRatio'\n\t\t);\n\t},\n};\n\nexport default [ minHeight, aspectRatio ];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,IAAM,YAAY;AAAA,EACjB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,WAAY;AAAA,MAC5B;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAM,cAAc;AAAA,EACnB,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,CAAE,cAAc,aAAc;AAAA,MAC9B;AAAA,IACD;AAAA,EACD;AACD;AAEA,IAAO,qBAAQ,CAAE,WAAW,WAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/styles/index.js
CHANGED
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/style-engine/src/styles/index.ts
|
|
29
31
|
var styles_exports = {};
|
|
30
32
|
__export(styles_exports, {
|
|
31
33
|
styleDefinitions: () => styleDefinitions
|
|
@@ -39,7 +41,7 @@ var import_shadow = __toESM(require("./shadow"));
|
|
|
39
41
|
var import_outline = __toESM(require("./outline"));
|
|
40
42
|
var import_spacing = __toESM(require("./spacing"));
|
|
41
43
|
var import_typography = __toESM(require("./typography"));
|
|
42
|
-
|
|
44
|
+
var styleDefinitions = [
|
|
43
45
|
...import_border.default,
|
|
44
46
|
...import_color.default,
|
|
45
47
|
...import_dimensions.default,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/styles/index.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport border from './border';\nimport color from './color';\nimport dimensions from './dimensions';\nimport background from './background';\nimport shadow from './shadow';\nimport outline from './outline';\nimport spacing from './spacing';\nimport typography from './typography';\n\nexport const styleDefinitions = [\n\t...border,\n\t...color,\n\t...dimensions,\n\t...outline,\n\t...spacing,\n\t...typography,\n\t...shadow,\n\t...background,\n];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAmB;AACnB,mBAAkB;AAClB,wBAAuB;AACvB,wBAAuB;AACvB,oBAAmB;AACnB,qBAAoB;AACpB,qBAAoB;AACpB,wBAAuB;AAEhB,IAAM,mBAAmB;AAAA,EAC/B,GAAG,cAAAA;AAAA,EACH,GAAG,aAAAC;AAAA,EACH,GAAG,kBAAAC;AAAA,EACH,GAAG,eAAAC;AAAA,EACH,GAAG,eAAAC;AAAA,EACH,GAAG,kBAAAC;AAAA,EACH,GAAG,cAAAC;AAAA,EACH,GAAG,kBAAAC;AACJ;",
|
|
6
6
|
"names": ["border", "color", "dimensions", "outline", "spacing", "typography", "shadow", "background"]
|
|
7
7
|
}
|
|
@@ -16,31 +16,33 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/outline/index.ts
|
|
19
21
|
var outline_exports = {};
|
|
20
22
|
__export(outline_exports, {
|
|
21
23
|
default: () => outline_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(outline_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var color = {
|
|
26
28
|
name: "color",
|
|
27
29
|
generate: (style, options, path = ["outline", "color"], ruleKey = "outlineColor") => {
|
|
28
30
|
return (0, import_utils.generateRule)(style, options, path, ruleKey);
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
|
-
|
|
33
|
+
var offset = {
|
|
32
34
|
name: "offset",
|
|
33
35
|
generate: (style, options, path = ["outline", "offset"], ruleKey = "outlineOffset") => {
|
|
34
36
|
return (0, import_utils.generateRule)(style, options, path, ruleKey);
|
|
35
37
|
}
|
|
36
38
|
};
|
|
37
|
-
|
|
39
|
+
var outlineStyle = {
|
|
38
40
|
name: "style",
|
|
39
41
|
generate: (style, options, path = ["outline", "style"], ruleKey = "outlineStyle") => {
|
|
40
42
|
return (0, import_utils.generateRule)(style, options, path, ruleKey);
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
|
-
|
|
45
|
+
var width = {
|
|
44
46
|
name: "width",
|
|
45
47
|
generate: (style, options, path = ["outline", "width"], ruleKey = "outlineWidth") => {
|
|
46
48
|
return (0, import_utils.generateRule)(style, options, path, ruleKey);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/outline/index.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { GeneratedCSSRule, Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst color = {\n\tname: 'color',\n\tgenerate: (\n\t\tstyle: Style,\n\t\toptions: StyleOptions,\n\t\tpath: string[] = [ 'outline', 'color' ],\n\t\truleKey: string = 'outlineColor'\n\t): GeneratedCSSRule[] => {\n\t\treturn generateRule( style, options, path, ruleKey );\n\t},\n};\n\nconst offset = {\n\tname: 'offset',\n\tgenerate: (\n\t\tstyle: Style,\n\t\toptions: StyleOptions,\n\t\tpath: string[] = [ 'outline', 'offset' ],\n\t\truleKey: string = 'outlineOffset'\n\t): GeneratedCSSRule[] => {\n\t\treturn generateRule( style, options, path, ruleKey );\n\t},\n};\n\nconst outlineStyle = {\n\tname: 'style',\n\tgenerate: (\n\t\tstyle: Style,\n\t\toptions: StyleOptions,\n\t\tpath: string[] = [ 'outline', 'style' ],\n\t\truleKey: string = 'outlineStyle'\n\t): GeneratedCSSRule[] => {\n\t\treturn generateRule( style, options, path, ruleKey );\n\t},\n};\n\nconst width = {\n\tname: 'width',\n\tgenerate: (\n\t\tstyle: Style,\n\t\toptions: StyleOptions,\n\t\tpath: string[] = [ 'outline', 'width' ],\n\t\truleKey: string = 'outlineWidth'\n\t): GeneratedCSSRule[] => {\n\t\treturn generateRule( style, options, path, ruleKey );\n\t},\n};\n\nexport default [ color, outlineStyle, offset, width ];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,IAAM,QAAQ;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CACT,OACA,SACA,OAAiB,CAAE,WAAW,OAAQ,GACtC,UAAkB,mBACM;AACxB,eAAO,2BAAc,OAAO,SAAS,MAAM,OAAQ;AAAA,EACpD;AACD;AAEA,IAAM,SAAS;AAAA,EACd,MAAM;AAAA,EACN,UAAU,CACT,OACA,SACA,OAAiB,CAAE,WAAW,QAAS,GACvC,UAAkB,oBACM;AACxB,eAAO,2BAAc,OAAO,SAAS,MAAM,OAAQ;AAAA,EACpD;AACD;AAEA,IAAM,eAAe;AAAA,EACpB,MAAM;AAAA,EACN,UAAU,CACT,OACA,SACA,OAAiB,CAAE,WAAW,OAAQ,GACtC,UAAkB,mBACM;AACxB,eAAO,2BAAc,OAAO,SAAS,MAAM,OAAQ;AAAA,EACpD;AACD;AAEA,IAAM,QAAQ;AAAA,EACb,MAAM;AAAA,EACN,UAAU,CACT,OACA,SACA,OAAiB,CAAE,WAAW,OAAQ,GACtC,UAAkB,mBACM;AACxB,eAAO,2BAAc,OAAO,SAAS,MAAM,OAAQ;AAAA,EACpD;AACD;AAEA,IAAO,kBAAQ,CAAE,OAAO,cAAc,QAAQ,KAAM;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/shadow/index.ts
|
|
19
21
|
var shadow_exports = {};
|
|
20
22
|
__export(shadow_exports, {
|
|
21
23
|
default: () => shadow_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(shadow_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var shadow = {
|
|
26
28
|
name: "shadow",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateRule)(style, options, ["shadow"], "boxShadow");
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/shadow/index.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst shadow = {\n\tname: 'shadow',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule( style, options, [ 'shadow' ], 'boxShadow' );\n\t},\n};\n\nexport default [ shadow ];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAA6B;AAE7B,IAAM,SAAS;AAAA,EACd,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO,2BAAc,OAAO,SAAS,CAAE,QAAS,GAAG,WAAY;AAAA,EAChE;AACD;AAEA,IAAO,iBAAQ,CAAE,MAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -26,6 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/style-engine/src/styles/spacing/index.ts
|
|
29
31
|
var spacing_exports = {};
|
|
30
32
|
__export(spacing_exports, {
|
|
31
33
|
default: () => spacing_default
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/spacing/index.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport padding from './padding';\nimport margin from './margin';\n\nexport default [ margin, padding ];\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAoB;AACpB,oBAAmB;AAEnB,IAAO,kBAAQ,CAAE,cAAAA,SAAQ,eAAAC,OAAQ;",
|
|
6
6
|
"names": ["margin", "padding"]
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/spacing/margin.ts
|
|
19
21
|
var margin_exports = {};
|
|
20
22
|
__export(margin_exports, {
|
|
21
23
|
default: () => margin_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(margin_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var margin = {
|
|
26
28
|
name: "margin",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateBoxRules)(style, options, ["spacing", "margin"], {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/spacing/margin.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateBoxRules } from '../utils';\n\nconst margin = {\n\tname: 'margin',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateBoxRules( style, options, [ 'spacing', 'margin' ], {\n\t\t\tdefault: 'margin',\n\t\t\tindividual: 'margin%s',\n\t\t} );\n\t},\n};\n\nexport default margin;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAAiC;AAEjC,IAAM,SAAS;AAAA,EACd,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO,+BAAkB,OAAO,SAAS,CAAE,WAAW,QAAS,GAAG;AAAA,MACjE,SAAS;AAAA,MACT,YAAY;AAAA,IACb,CAAE;AAAA,EACH;AACD;AAEA,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,13 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// packages/style-engine/src/styles/spacing/padding.ts
|
|
19
21
|
var padding_exports = {};
|
|
20
22
|
__export(padding_exports, {
|
|
21
23
|
default: () => padding_default
|
|
22
24
|
});
|
|
23
25
|
module.exports = __toCommonJS(padding_exports);
|
|
24
26
|
var import_utils = require("../utils");
|
|
25
|
-
|
|
27
|
+
var padding = {
|
|
26
28
|
name: "padding",
|
|
27
29
|
generate: (style, options) => {
|
|
28
30
|
return (0, import_utils.generateBoxRules)(style, options, ["spacing", "padding"], {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styles/spacing/padding.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateBoxRules } from '../utils';\n\nconst padding = {\n\tname: 'padding',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateBoxRules( style, options, [ 'spacing', 'padding' ], {\n\t\t\tdefault: 'padding',\n\t\t\tindividual: 'padding%s',\n\t\t} );\n\t},\n};\n\nexport default padding;\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,mBAAiC;AAEjC,IAAM,UAAU;AAAA,EACf,MAAM;AAAA,EACN,UAAU,CAAE,OAAc,YAA2B;AACpD,eAAO,+BAAkB,OAAO,SAAS,CAAE,WAAW,SAAU,GAAG;AAAA,MAClE,SAAS;AAAA,MACT,YAAY;AAAA,IACb,CAAE;AAAA,EACH;AACD;AAEA,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|