@wordpress/style-engine 1.21.0 → 1.23.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -1
  3. package/build/index.js +3 -12
  4. package/build/index.js.map +1 -1
  5. package/build/styles/border/index.js +1 -5
  6. package/build/styles/border/index.js.map +1 -1
  7. package/build/styles/color/background.js +1 -2
  8. package/build/styles/color/background.js.map +1 -1
  9. package/build/styles/color/gradient.js +1 -2
  10. package/build/styles/color/gradient.js.map +1 -1
  11. package/build/styles/color/index.js +0 -5
  12. package/build/styles/color/index.js.map +1 -1
  13. package/build/styles/color/text.js +1 -2
  14. package/build/styles/color/text.js.map +1 -1
  15. package/build/styles/constants.js.map +1 -1
  16. package/build/styles/dimensions/index.js +1 -2
  17. package/build/styles/dimensions/index.js.map +1 -1
  18. package/build/styles/index.js +1 -9
  19. package/build/styles/index.js.map +1 -1
  20. package/build/styles/outline/index.js +1 -2
  21. package/build/styles/outline/index.js.map +1 -1
  22. package/build/styles/shadow/index.js +1 -2
  23. package/build/styles/shadow/index.js.map +1 -1
  24. package/build/styles/spacing/index.js +0 -4
  25. package/build/styles/spacing/index.js.map +1 -1
  26. package/build/styles/spacing/margin.js +1 -2
  27. package/build/styles/spacing/margin.js.map +1 -1
  28. package/build/styles/spacing/padding.js +1 -2
  29. package/build/styles/spacing/padding.js.map +1 -1
  30. package/build/styles/typography/index.js +1 -2
  31. package/build/styles/typography/index.js.map +1 -1
  32. package/build/styles/utils.js +11 -24
  33. package/build/styles/utils.js.map +1 -1
  34. package/build/types.js.map +1 -1
  35. package/build-module/index.js +5 -7
  36. package/build-module/index.js.map +1 -1
  37. package/build-module/styles/border/index.js +3 -4
  38. package/build-module/styles/border/index.js.map +1 -1
  39. package/build-module/styles/color/background.js +1 -0
  40. package/build-module/styles/color/background.js.map +1 -1
  41. package/build-module/styles/color/gradient.js +1 -0
  42. package/build-module/styles/color/gradient.js.map +1 -1
  43. package/build-module/styles/color/index.js.map +1 -1
  44. package/build-module/styles/color/text.js +1 -0
  45. package/build-module/styles/color/text.js.map +1 -1
  46. package/build-module/styles/constants.js.map +1 -1
  47. package/build-module/styles/dimensions/index.js +1 -0
  48. package/build-module/styles/dimensions/index.js.map +1 -1
  49. package/build-module/styles/index.js.map +1 -1
  50. package/build-module/styles/outline/index.js +1 -0
  51. package/build-module/styles/outline/index.js.map +1 -1
  52. package/build-module/styles/shadow/index.js +1 -0
  53. package/build-module/styles/shadow/index.js.map +1 -1
  54. package/build-module/styles/spacing/index.js.map +1 -1
  55. package/build-module/styles/spacing/margin.js +1 -0
  56. package/build-module/styles/spacing/margin.js.map +1 -1
  57. package/build-module/styles/spacing/padding.js +1 -0
  58. package/build-module/styles/spacing/padding.js.map +1 -1
  59. package/build-module/styles/typography/index.js +1 -0
  60. package/build-module/styles/typography/index.js.map +1 -1
  61. package/build-module/styles/utils.js +13 -16
  62. package/build-module/styles/utils.js.map +1 -1
  63. package/build-module/types.js.map +1 -1
  64. package/class-wp-style-engine-processor.php +3 -1
  65. package/class-wp-style-engine.php +6 -4
  66. package/package.json +2 -2
  67. package/tsconfig.tsbuildinfo +1 -1
@@ -9,11 +9,8 @@ exports.generateRule = generateRule;
9
9
  exports.getCSSVarFromStyleValue = getCSSVarFromStyleValue;
10
10
  exports.getStyleValueByPath = void 0;
11
11
  exports.upperFirst = upperFirst;
12
-
13
12
  var _changeCase = require("change-case");
14
-
15
13
  var _constants = require("./constants");
16
-
17
14
  /**
18
15
  * External dependencies
19
16
  */
@@ -33,6 +30,7 @@ const getStyleValueByPath = (object, path) => {
33
30
  });
34
31
  return value;
35
32
  };
33
+
36
34
  /**
37
35
  * Returns a JSON representation of the generated CSS rules.
38
36
  *
@@ -43,10 +41,7 @@ const getStyleValueByPath = (object, path) => {
43
41
  *
44
42
  * @return GeneratedCSSRule[] CSS rules.
45
43
  */
46
-
47
-
48
44
  exports.getStyleValueByPath = getStyleValueByPath;
49
-
50
45
  function generateRule(style, options, path, ruleKey) {
51
46
  const styleValue = getStyleValueByPath(style, path);
52
47
  return styleValue ? [{
@@ -55,6 +50,7 @@ function generateRule(style, options, path, ruleKey) {
55
50
  value: getCSSVarFromStyleValue(styleValue)
56
51
  }] : [];
57
52
  }
53
+
58
54
  /**
59
55
  * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left.
60
56
  *
@@ -66,17 +62,12 @@ function generateRule(style, options, path, ruleKey) {
66
62
  *
67
63
  * @return GeneratedCSSRule[] CSS rules.
68
64
  */
69
-
70
-
71
65
  function generateBoxRules(style, options, path, ruleKeys, individualProperties = ['top', 'right', 'bottom', 'left']) {
72
66
  const boxStyle = getStyleValueByPath(style, path);
73
-
74
67
  if (!boxStyle) {
75
68
  return [];
76
69
  }
77
-
78
70
  const rules = [];
79
-
80
71
  if (typeof boxStyle === 'string') {
81
72
  rules.push({
82
73
  selector: options?.selector,
@@ -86,7 +77,6 @@ function generateBoxRules(style, options, path, ruleKeys, individualProperties =
86
77
  } else {
87
78
  const sideRules = individualProperties.reduce((acc, side) => {
88
79
  const value = getCSSVarFromStyleValue(getStyleValueByPath(boxStyle, [side]));
89
-
90
80
  if (value) {
91
81
  acc.push({
92
82
  selector: options?.selector,
@@ -94,14 +84,13 @@ function generateBoxRules(style, options, path, ruleKeys, individualProperties =
94
84
  value
95
85
  });
96
86
  }
97
-
98
87
  return acc;
99
88
  }, []);
100
89
  rules.push(...sideRules);
101
90
  }
102
-
103
91
  return rules;
104
92
  }
93
+
105
94
  /**
106
95
  * Returns a CSS var value from incoming style value following the pattern `var:description|context|slug`.
107
96
  *
@@ -109,22 +98,23 @@ function generateBoxRules(style, options, path, ruleKeys, individualProperties =
109
98
  *
110
99
  * @return string A CSS var value.
111
100
  */
112
-
113
-
114
101
  function getCSSVarFromStyleValue(styleValue) {
115
102
  if (typeof styleValue === 'string' && styleValue.startsWith(_constants.VARIABLE_REFERENCE_PREFIX)) {
116
103
  const variable = styleValue.slice(_constants.VARIABLE_REFERENCE_PREFIX.length).split(_constants.VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE).map(presetVariable => (0, _changeCase.paramCase)(presetVariable, {
117
- splitRegexp: [/([a-z0-9])([A-Z])/g, // fooBar => foo-bar, 3Bar => 3-bar
118
- /([0-9])([a-z])/g, // 3bar => 3-bar
119
- /([A-Za-z])([0-9])/g, // Foo3 => foo-3, foo3 => foo-3
104
+ splitRegexp: [/([a-z0-9])([A-Z])/g,
105
+ // fooBar => foo-bar, 3Bar => 3-bar
106
+ /([0-9])([a-z])/g,
107
+ // 3bar => 3-bar
108
+ /([A-Za-z])([0-9])/g,
109
+ // Foo3 => foo-3, foo3 => foo-3
120
110
  /([A-Z])([A-Z][a-z])/g // FOOBar => foo-bar
121
111
  ]
122
112
  })).join(_constants.VARIABLE_PATH_SEPARATOR_TOKEN_STYLE);
123
113
  return `var(--wp--${variable})`;
124
114
  }
125
-
126
115
  return styleValue;
127
116
  }
117
+
128
118
  /**
129
119
  * Capitalizes the first letter in a string.
130
120
  *
@@ -132,12 +122,11 @@ function getCSSVarFromStyleValue(styleValue) {
132
122
  *
133
123
  * @return String with the first letter capitalized.
134
124
  */
135
-
136
-
137
125
  function upperFirst(string) {
138
126
  const [firstLetter, ...rest] = string;
139
127
  return firstLetter.toUpperCase() + rest.join('');
140
128
  }
129
+
141
130
  /**
142
131
  * Converts an array of strings into a camelCase string.
143
132
  *
@@ -145,8 +134,6 @@ function upperFirst(string) {
145
134
  *
146
135
  * @return camelCase string.
147
136
  */
148
-
149
-
150
137
  function camelCaseJoin(strings) {
151
138
  const [firstItem, ...rest] = strings;
152
139
  return firstItem.toLowerCase() + rest.map(upperFirst).join('');
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/utils.ts"],"names":["getStyleValueByPath","object","path","value","forEach","fieldName","generateRule","style","options","ruleKey","styleValue","selector","key","getCSSVarFromStyleValue","generateBoxRules","ruleKeys","individualProperties","boxStyle","rules","push","default","sideRules","reduce","acc","side","individual","replace","upperFirst","startsWith","VARIABLE_REFERENCE_PREFIX","variable","slice","length","split","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","map","presetVariable","splitRegexp","join","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE","string","firstLetter","rest","toUpperCase","camelCaseJoin","strings","firstItem","toLowerCase"],"mappings":";;;;;;;;;;;;AAGA;;AAYA;;AAfA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,mBAAmB,GAAG,CAClCC,MADkC,EAElCC,IAFkC,KAG9B;AACJ,MAAIC,KAAU,GAAGF,MAAjB;AACAC,EAAAA,IAAI,CAACE,OAAL,CAAgBC,SAAF,IAAyB;AACtCF,IAAAA,KAAK,GAAGA,KAAK,GAAIE,SAAJ,CAAb;AACA,GAFD;AAGA,SAAOF,KAAP;AACA,CATM;AAWP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,SAASG,YAAT,CACNC,KADM,EAENC,OAFM,EAGNN,IAHM,EAINO,OAJM,EAKe;AACrB,QAAMC,UAA8B,GAAGV,mBAAmB,CAAEO,KAAF,EAASL,IAAT,CAA1D;AAEA,SAAOQ,UAAU,GACd,CACA;AACCC,IAAAA,QAAQ,EAAEH,OAAO,EAAEG,QADpB;AAECC,IAAAA,GAAG,EAAEH,OAFN;AAGCN,IAAAA,KAAK,EAAEU,uBAAuB,CAAEH,UAAF;AAH/B,GADA,CADc,GAQd,EARH;AASA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASI,gBAAT,CACNP,KADM,EAENC,OAFM,EAGNN,IAHM,EAINa,QAJM,EAKNC,oBAA8B,GAAG,CAAE,KAAF,EAAS,OAAT,EAAkB,QAAlB,EAA4B,MAA5B,CAL3B,EAMe;AACrB,QAAMC,QAAkC,GAAGjB,mBAAmB,CAC7DO,KAD6D,EAE7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ACL,2BAAWA,cAAX,EAA2B;AAC1BC,MAAAA,WAAW,EAAE,CACZ,oBADY,EACU;AACtB,uBAFY,EAEO;AACnB,0BAHY,EAGU;AACtB,4BAJY,CAIY;AAJZ;AADa,KAA3B,CAJe,EAafC,IAbe,CAaTC,8CAbS,CAAjB;AAcA,WAAQ,aAAaT,QAAU,GAA/B;AACA;;AACD,SAAOpB,UAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASiB,UAAT,CAAqBa,MAArB,EAA8C;AACpD,QAAM,CAAEC,WAAF,EAAe,GAAGC,IAAlB,IAA2BF,MAAjC;AACA,SAAOC,WAAW,CAACE,WAAZ,KAA4BD,IAAI,CAACJ,IAAL,CAAW,EAAX,CAAnC;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASM,aAAT,CAAwBC,OAAxB,EAAoD;AAC1D,QAAM,CAAEC,SAAF,EAAa,GAAGJ,IAAhB,IAAyBG,OAA/B;AACA,SAAOC,SAAS,CAACC,WAAV,KAA0BL,IAAI,CAACP,GAAL,CAAUR,UAAV,EAAuBW,IAAvB,CAA6B,EAA7B,CAAjC;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tCssRulesKeys,\n\tGeneratedCSSRule,\n\tStyle,\n\tBox,\n\tStyleOptions,\n} from '../types';\nimport {\n\tVARIABLE_REFERENCE_PREFIX,\n\tVARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE,\n\tVARIABLE_PATH_SEPARATOR_TOKEN_STYLE,\n} from './constants';\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as an array of properties, like `[ 'x', 'y' ]`.\n *\n * @param object Input object.\n * @param path Path to the object property.\n * @return Value of the object property at the specified path.\n */\nexport const getStyleValueByPath = (\n\tobject: Record< any, any >,\n\tpath: string[]\n) => {\n\tlet value: any = object;\n\tpath.forEach( ( fieldName: string ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Returns a JSON representation of the generated CSS rules.\n *\n * @param style Style object.\n * @param options Options object with settings to adjust how the styles are generated.\n * @param path An array of strings representing the path to the style value in the style object.\n * @param ruleKey A CSS property key.\n *\n * @return GeneratedCSSRule[] CSS rules.\n */\nexport function generateRule(\n\tstyle: Style,\n\toptions: StyleOptions,\n\tpath: string[],\n\truleKey: string\n): GeneratedCSSRule[] {\n\tconst styleValue: string | undefined = getStyleValueByPath( style, path );\n\n\treturn styleValue\n\t\t? [\n\t\t\t\t{\n\t\t\t\t\tselector: options?.selector,\n\t\t\t\t\tkey: ruleKey,\n\t\t\t\t\tvalue: getCSSVarFromStyleValue( styleValue ),\n\t\t\t\t},\n\t\t ]\n\t\t: [];\n}\n\n/**\n * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left.\n *\n * @param style Style object.\n * @param options Options object with settings to adjust how the styles are generated.\n * @param path An array of strings representing the path to the style value in the style object.\n * @param ruleKeys An array of CSS property keys and patterns.\n * @param individualProperties The \"sides\" or individual properties for which to generate rules.\n *\n * @return GeneratedCSSRule[] CSS rules.\n */\nexport function generateBoxRules(\n\tstyle: Style,\n\toptions: StyleOptions,\n\tpath: string[],\n\truleKeys: CssRulesKeys,\n\tindividualProperties: string[] = [ 'top', 'right', 'bottom', 'left' ]\n): GeneratedCSSRule[] {\n\tconst boxStyle: Box | string | undefined = getStyleValueByPath(\n\t\tstyle,\n\t\tpath\n\t);\n\tif ( ! boxStyle ) {\n\t\treturn [];\n\t}\n\n\tconst rules: GeneratedCSSRule[] = [];\n\tif ( typeof boxStyle === 'string' ) {\n\t\trules.push( {\n\t\t\tselector: options?.selector,\n\t\t\tkey: ruleKeys.default,\n\t\t\tvalue: boxStyle,\n\t\t} );\n\t} else {\n\t\tconst sideRules = individualProperties.reduce(\n\t\t\t( acc: GeneratedCSSRule[], side: string ) => {\n\t\t\t\tconst value: string | undefined = getCSSVarFromStyleValue(\n\t\t\t\t\tgetStyleValueByPath( boxStyle, [ side ] )\n\t\t\t\t);\n\t\t\t\tif ( value ) {\n\t\t\t\t\tacc.push( {\n\t\t\t\t\t\tselector: options?.selector,\n\t\t\t\t\t\tkey: ruleKeys?.individual.replace(\n\t\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t\tupperFirst( side )\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t[]\n\t\t);\n\t\trules.push( ...sideRules );\n\t}\n\n\treturn rules;\n}\n\n/**\n * Returns a CSS var value from incoming style value following the pattern `var:description|context|slug`.\n *\n * @param styleValue A raw style value.\n *\n * @return string A CSS var value.\n */\nexport function getCSSVarFromStyleValue( styleValue: string ): string {\n\tif (\n\t\ttypeof styleValue === 'string' &&\n\t\tstyleValue.startsWith( VARIABLE_REFERENCE_PREFIX )\n\t) {\n\t\tconst variable = styleValue\n\t\t\t.slice( VARIABLE_REFERENCE_PREFIX.length )\n\t\t\t.split( VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE )\n\t\t\t.map( ( presetVariable ) =>\n\t\t\t\tkebabCase( presetVariable, {\n\t\t\t\t\tsplitRegexp: [\n\t\t\t\t\t\t/([a-z0-9])([A-Z])/g, // fooBar => foo-bar, 3Bar => 3-bar\n\t\t\t\t\t\t/([0-9])([a-z])/g, // 3bar => 3-bar\n\t\t\t\t\t\t/([A-Za-z])([0-9])/g, // Foo3 => foo-3, foo3 => foo-3\n\t\t\t\t\t\t/([A-Z])([A-Z][a-z])/g, // FOOBar => foo-bar\n\t\t\t\t\t],\n\t\t\t\t} )\n\t\t\t)\n\t\t\t.join( VARIABLE_PATH_SEPARATOR_TOKEN_STYLE );\n\t\treturn `var(--wp--${ variable })`;\n\t}\n\treturn styleValue;\n}\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param string The string whose first letter the function will capitalize.\n *\n * @return String with the first letter capitalized.\n */\nexport function upperFirst( string: string ): string {\n\tconst [ firstLetter, ...rest ] = string;\n\treturn firstLetter.toUpperCase() + rest.join( '' );\n}\n\n/**\n * Converts an array of strings into a camelCase string.\n *\n * @param strings The strings to join into a camelCase string.\n *\n * @return camelCase string.\n */\nexport function camelCaseJoin( strings: string[] ): string {\n\tconst [ firstItem, ...rest ] = strings;\n\treturn firstItem.toLowerCase() + rest.map( upperFirst ).join( '' );\n}\n"]}
1
+ {"version":3,"names":["_changeCase","require","_constants","getStyleValueByPath","object","path","value","forEach","fieldName","exports","generateRule","style","options","ruleKey","styleValue","selector","key","getCSSVarFromStyleValue","generateBoxRules","ruleKeys","individualProperties","boxStyle","rules","push","default","sideRules","reduce","acc","side","individual","replace","upperFirst","startsWith","VARIABLE_REFERENCE_PREFIX","variable","slice","length","split","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","map","presetVariable","kebabCase","splitRegexp","join","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE","string","firstLetter","rest","toUpperCase","camelCaseJoin","strings","firstItem","toLowerCase"],"sources":["@wordpress/style-engine/src/styles/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tCssRulesKeys,\n\tGeneratedCSSRule,\n\tStyle,\n\tBox,\n\tStyleOptions,\n} from '../types';\nimport {\n\tVARIABLE_REFERENCE_PREFIX,\n\tVARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE,\n\tVARIABLE_PATH_SEPARATOR_TOKEN_STYLE,\n} from './constants';\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as an array of properties, like `[ 'x', 'y' ]`.\n *\n * @param object Input object.\n * @param path Path to the object property.\n * @return Value of the object property at the specified path.\n */\nexport const getStyleValueByPath = (\n\tobject: Record< any, any >,\n\tpath: string[]\n) => {\n\tlet value: any = object;\n\tpath.forEach( ( fieldName: string ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Returns a JSON representation of the generated CSS rules.\n *\n * @param style Style object.\n * @param options Options object with settings to adjust how the styles are generated.\n * @param path An array of strings representing the path to the style value in the style object.\n * @param ruleKey A CSS property key.\n *\n * @return GeneratedCSSRule[] CSS rules.\n */\nexport function generateRule(\n\tstyle: Style,\n\toptions: StyleOptions,\n\tpath: string[],\n\truleKey: string\n): GeneratedCSSRule[] {\n\tconst styleValue: string | undefined = getStyleValueByPath( style, path );\n\n\treturn styleValue\n\t\t? [\n\t\t\t\t{\n\t\t\t\t\tselector: options?.selector,\n\t\t\t\t\tkey: ruleKey,\n\t\t\t\t\tvalue: getCSSVarFromStyleValue( styleValue ),\n\t\t\t\t},\n\t\t ]\n\t\t: [];\n}\n\n/**\n * Returns a JSON representation of the generated CSS rules taking into account box model properties, top, right, bottom, left.\n *\n * @param style Style object.\n * @param options Options object with settings to adjust how the styles are generated.\n * @param path An array of strings representing the path to the style value in the style object.\n * @param ruleKeys An array of CSS property keys and patterns.\n * @param individualProperties The \"sides\" or individual properties for which to generate rules.\n *\n * @return GeneratedCSSRule[] CSS rules.\n */\nexport function generateBoxRules(\n\tstyle: Style,\n\toptions: StyleOptions,\n\tpath: string[],\n\truleKeys: CssRulesKeys,\n\tindividualProperties: string[] = [ 'top', 'right', 'bottom', 'left' ]\n): GeneratedCSSRule[] {\n\tconst boxStyle: Box | string | undefined = getStyleValueByPath(\n\t\tstyle,\n\t\tpath\n\t);\n\tif ( ! boxStyle ) {\n\t\treturn [];\n\t}\n\n\tconst rules: GeneratedCSSRule[] = [];\n\tif ( typeof boxStyle === 'string' ) {\n\t\trules.push( {\n\t\t\tselector: options?.selector,\n\t\t\tkey: ruleKeys.default,\n\t\t\tvalue: boxStyle,\n\t\t} );\n\t} else {\n\t\tconst sideRules = individualProperties.reduce(\n\t\t\t( acc: GeneratedCSSRule[], side: string ) => {\n\t\t\t\tconst value: string | undefined = getCSSVarFromStyleValue(\n\t\t\t\t\tgetStyleValueByPath( boxStyle, [ side ] )\n\t\t\t\t);\n\t\t\t\tif ( value ) {\n\t\t\t\t\tacc.push( {\n\t\t\t\t\t\tselector: options?.selector,\n\t\t\t\t\t\tkey: ruleKeys?.individual.replace(\n\t\t\t\t\t\t\t'%s',\n\t\t\t\t\t\t\tupperFirst( side )\n\t\t\t\t\t\t),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn acc;\n\t\t\t},\n\t\t\t[]\n\t\t);\n\t\trules.push( ...sideRules );\n\t}\n\n\treturn rules;\n}\n\n/**\n * Returns a CSS var value from incoming style value following the pattern `var:description|context|slug`.\n *\n * @param styleValue A raw style value.\n *\n * @return string A CSS var value.\n */\nexport function getCSSVarFromStyleValue( styleValue: string ): string {\n\tif (\n\t\ttypeof styleValue === 'string' &&\n\t\tstyleValue.startsWith( VARIABLE_REFERENCE_PREFIX )\n\t) {\n\t\tconst variable = styleValue\n\t\t\t.slice( VARIABLE_REFERENCE_PREFIX.length )\n\t\t\t.split( VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE )\n\t\t\t.map( ( presetVariable ) =>\n\t\t\t\tkebabCase( presetVariable, {\n\t\t\t\t\tsplitRegexp: [\n\t\t\t\t\t\t/([a-z0-9])([A-Z])/g, // fooBar => foo-bar, 3Bar => 3-bar\n\t\t\t\t\t\t/([0-9])([a-z])/g, // 3bar => 3-bar\n\t\t\t\t\t\t/([A-Za-z])([0-9])/g, // Foo3 => foo-3, foo3 => foo-3\n\t\t\t\t\t\t/([A-Z])([A-Z][a-z])/g, // FOOBar => foo-bar\n\t\t\t\t\t],\n\t\t\t\t} )\n\t\t\t)\n\t\t\t.join( VARIABLE_PATH_SEPARATOR_TOKEN_STYLE );\n\t\treturn `var(--wp--${ variable })`;\n\t}\n\treturn styleValue;\n}\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param string The string whose first letter the function will capitalize.\n *\n * @return String with the first letter capitalized.\n */\nexport function upperFirst( string: string ): string {\n\tconst [ firstLetter, ...rest ] = string;\n\treturn firstLetter.toUpperCase() + rest.join( '' );\n}\n\n/**\n * Converts an array of strings into a camelCase string.\n *\n * @param strings The strings to join into a camelCase string.\n *\n * @return camelCase string.\n */\nexport function camelCaseJoin( strings: string[] ): string {\n\tconst [ firstItem, ...rest ] = strings;\n\treturn firstItem.toLowerCase() + rest.map( upperFirst ).join( '' );\n}\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAYA,IAAAC,UAAA,GAAAD,OAAA;AAfA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,mBAAmB,GAAGA,CAClCC,MAA0B,EAC1BC,IAAc,KACV;EACJ,IAAIC,KAAU,GAAGF,MAAM;EACvBC,IAAI,CAACE,OAAO,CAAIC,SAAiB,IAAM;IACtCF,KAAK,GAAGA,KAAK,GAAIE,SAAS,CAAE;EAC7B,CAAE,CAAC;EACH,OAAOF,KAAK;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATAG,OAAA,CAAAN,mBAAA,GAAAA,mBAAA;AAUO,SAASO,YAAYA,CAC3BC,KAAY,EACZC,OAAqB,EACrBP,IAAc,EACdQ,OAAe,EACM;EACrB,MAAMC,UAA8B,GAAGX,mBAAmB,CAAEQ,KAAK,EAAEN,IAAK,CAAC;EAEzE,OAAOS,UAAU,GACd,CACA;IACCC,QAAQ,EAAEH,OAAO,EAAEG,QAAQ;IAC3BC,GAAG,EAAEH,OAAO;IACZP,KAAK,EAAEW,uBAAuB,CAAEH,UAAW;EAC5C,CAAC,CACA,GACD,EAAE;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,gBAAgBA,CAC/BP,KAAY,EACZC,OAAqB,EACrBP,IAAc,EACdc,QAAsB,EACtBC,oBAA8B,GAAG,CAAE,KAAK,EAAE,OAAO,EAA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DAAwC,CAAC,CAChDC,GAAG,CAAIC,cAAc,IACrB,IAAAC,qBAAS,EAAED,cAAc,EAAE;MAC1BE,WAAW,EAAE,CACZ,oBAAoB;MAAE;MACtB,iBAAiB;MAAE;MACnB,oBAAoB;MAAE;MACtB,sBAAsB,CAAE;MAAA;IAE1B,CAAE,CACH,CAAC,CACAC,IAAI,CAAEC,8CAAoC,CAAC;IAC7C,OAAQ,aAAaV,QAAU,GAAE;EAClC;EACA,OAAOpB,UAAU;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASiB,UAAUA,CAAEc,MAAc,EAAW;EACpD,MAAM,CAAEC,WAAW,EAAE,GAAGC,IAAI,CAAE,GAAGF,MAAM;EACvC,OAAOC,WAAW,CAACE,WAAW,CAAC,CAAC,GAAGD,IAAI,CAACJ,IAAI,CAAE,EAAG,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,aAAaA,CAAEC,OAAiB,EAAW;EAC1D,MAAM,CAAEC,SAAS,EAAE,GAAGJ,IAAI,CAAE,GAAGG,OAAO;EACtC,OAAOC,SAAS,CAACC,WAAW,CAAC,CAAC,GAAGL,IAAI,CAACR,GAAG,CAAER,UAAW,CAAC,CAACY,IAAI,CAAE,EAAG,CAAC;AACnE"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/style-engine/src/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\ntype BoxVariant = 'margin' | 'padding';\nexport interface Box< T extends BoxVariant | undefined = undefined > {\n\ttop?: CSSProperties[ T extends undefined ? 'top' : `${ T }Top` ];\n\tright?: CSSProperties[ T extends undefined ? 'right' : `${ T }Right` ];\n\tbottom?: CSSProperties[ T extends undefined ? 'bottom' : `${ T }Bottom` ];\n\tleft?: CSSProperties[ T extends undefined ? 'left' : `${ T }Left` ];\n}\n\nexport type BoxEdge = 'top' | 'right' | 'bottom' | 'left';\n\n// `T` is one of the values in `BorderIndividualProperty`. The expected CSSProperties key is something like `borderTopColor`.\nexport interface BorderIndividualStyles< T extends BoxEdge > {\n\tcolor?: CSSProperties[ `border${ Capitalize< T > }Color` ];\n\tstyle?: CSSProperties[ `border${ Capitalize< T > }Style` ];\n\twidth?: CSSProperties[ `border${ Capitalize< T > }Width` ];\n}\n\nexport interface Style {\n\tborder?: {\n\t\tcolor?: CSSProperties[ 'borderColor' ];\n\t\tradius?:\n\t\t\t| CSSProperties[ 'borderRadius' ]\n\t\t\t| {\n\t\t\t\t\ttopLeft?: CSSProperties[ 'borderTopLeftRadius' ];\n\t\t\t\t\ttopRight?: CSSProperties[ 'borderTopRightRadius' ];\n\t\t\t\t\tbottomLeft?: CSSProperties[ 'borderBottomLeftRadius' ];\n\t\t\t\t\tbottomRight?: CSSProperties[ 'borderBottomLeftRadius' ];\n\t\t\t };\n\t\tstyle?: CSSProperties[ 'borderStyle' ];\n\t\twidth?: CSSProperties[ 'borderWidth' ];\n\t\ttop?: BorderIndividualStyles< 'top' >;\n\t\tright?: BorderIndividualStyles< 'right' >;\n\t\tbottom?: BorderIndividualStyles< 'bottom' >;\n\t\tleft?: BorderIndividualStyles< 'left' >;\n\t};\n\tdimensions?: {\n\t\tminHeight?: CSSProperties[ 'minHeight' ];\n\t};\n\tspacing?: {\n\t\tmargin?: CSSProperties[ 'margin' ] | Box< 'margin' >;\n\t\tpadding?: CSSProperties[ 'padding' ] | Box< 'padding' >;\n\t};\n\ttypography?: {\n\t\tfontSize?: CSSProperties[ 'fontSize' ];\n\t\tfontFamily?: CSSProperties[ 'fontFamily' ];\n\t\tfontWeight?: CSSProperties[ 'fontWeight' ];\n\t\tfontStyle?: CSSProperties[ 'fontStyle' ];\n\t\tletterSpacing?: CSSProperties[ 'letterSpacing' ];\n\t\tlineHeight?: CSSProperties[ 'lineHeight' ];\n\t\ttextColumns?: CSSProperties[ 'columnCount' ];\n\t\ttextDecoration?: CSSProperties[ 'textDecoration' ];\n\t\ttextTransform?: CSSProperties[ 'textTransform' ];\n\t\twritingMode?: CSSProperties[ 'writingMode' ];\n\t};\n\tcolor?: {\n\t\ttext?: CSSProperties[ 'color' ];\n\t\tbackground?: CSSProperties[ 'backgroundColor' ];\n\t\tgradient?: CSSProperties[ 'background' ];\n\t};\n\telements?: {\n\t\tlink?: {\n\t\t\tcolor?: {\n\t\t\t\ttext?: CSSProperties[ 'color' ];\n\t\t\t};\n\t\t};\n\t};\n}\n\nexport interface CssRulesKeys {\n\tdefault: string;\n\tindividual: string;\n}\n\nexport interface StyleOptions {\n\t/**\n\t * CSS selector for the generated style.\n\t */\n\tselector?: string;\n}\n\nexport interface GeneratedCSSRule {\n\tselector?: string;\n\tvalue: string;\n\t/**\n\t * The CSS key in JS style attribute format, compatible with React.\n\t * E.g. `paddingTop` instead of `padding-top`.\n\t */\n\tkey: string;\n}\n\nexport interface GenerateFunction {\n\t( style: Style, options: StyleOptions ): GeneratedCSSRule[];\n}\n\nexport interface StyleDefinition {\n\tname: string;\n\tgenerate?: GenerateFunction;\n}\n"],"mappings":""}
@@ -2,11 +2,13 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { paramCase as kebabCase } from 'change-case';
5
+
5
6
  /**
6
7
  * Internal dependencies
7
8
  */
8
9
 
9
10
  import { styleDefinitions } from './styles';
11
+
10
12
  /**
11
13
  * Generates a stylesheet for a given style object and selector.
12
14
  *
@@ -17,10 +19,10 @@ import { styleDefinitions } from './styles';
17
19
  *
18
20
  * @return A generated stylesheet or inline style declarations.
19
21
  */
20
-
21
22
  export function compileCSS(style, options = {}) {
22
- const rules = getCSSRules(style, options); // If no selector is provided, treat generated rules as inline styles to be returned as a single string.
23
+ const rules = getCSSRules(style, options);
23
24
 
25
+ // If no selector is provided, treat generated rules as inline styles to be returned as a single string.
24
26
  if (!options?.selector) {
25
27
  const inlineRules = [];
26
28
  rules.forEach(rule => {
@@ -28,20 +30,16 @@ export function compileCSS(style, options = {}) {
28
30
  });
29
31
  return inlineRules.join(' ');
30
32
  }
31
-
32
33
  const groupedRules = rules.reduce((acc, rule) => {
33
34
  const {
34
35
  selector
35
36
  } = rule;
36
-
37
37
  if (!selector) {
38
38
  return acc;
39
39
  }
40
-
41
40
  if (!acc[selector]) {
42
41
  acc[selector] = [];
43
42
  }
44
-
45
43
  acc[selector].push(rule);
46
44
  return acc;
47
45
  }, {});
@@ -51,6 +49,7 @@ export function compileCSS(style, options = {}) {
51
49
  }, []);
52
50
  return selectorRules.join('\n');
53
51
  }
52
+
54
53
  /**
55
54
  * Returns a JSON representation of the generated CSS rules.
56
55
  *
@@ -61,7 +60,6 @@ export function compileCSS(style, options = {}) {
61
60
  *
62
61
  * @return A collection of objects containing the selector, if any, the CSS property key (camelcase) and parsed CSS value.
63
62
  */
64
-
65
63
  export function getCSSRules(style, options = {}) {
66
64
  const rules = [];
67
65
  styleDefinitions.forEach(definition => {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/index.ts"],"names":["paramCase","kebabCase","styleDefinitions","compileCSS","style","options","rules","getCSSRules","selector","inlineRules","forEach","rule","push","key","value","join","groupedRules","reduce","acc","selectorRules","Object","keys","subSelector","map","definition","generate"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,IAAIC,SAAtB,QAAuC,aAAvC;AAEA;AACA;AACA;;AAOA,SAASC,gBAAT,QAAiC,UAAjC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,UAAT,CAAqBC,KAArB,EAAmCC,OAAqB,GAAG,EAA3D,EAAwE;AAC9E,QAAMC,KAAK,GAAGC,WAAW,CAAEH,KAAF,EAASC,OAAT,CAAzB,CAD8E,CAG9E;;AACA,MAAK,CAAEA,OAAO,EAAEG,QAAhB,EAA2B;AAC1B,UAAMC,WAAqB,GAAG,EAA9B;AACAH,IAAAA,KAAK,CAACI,OAAN,CAAiBC,IAAF,IAAY;AAC1BF,MA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ACQ,OAAjB,CAA4Bc,UAAF,IAAmC;AAC5D,QAAK,OAAOA,UAAU,CAACC,QAAlB,KAA+B,UAApC,EAAiD;AAChDnB,MAAAA,KAAK,CAACM,IAAN,CAAY,GAAGY,UAAU,CAACC,QAAX,CAAqBrB,KAArB,EAA4BC,OAA5B,CAAf;AACA;AACD,GAJD;AAMA,SAAOC,KAAP;AACA","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"]}
1
+ {"version":3,"names":["paramCase","kebabCase","styleDefinitions","compileCSS","style","options","rules","getCSSRules","selector","inlineRules","forEach","rule","push","key","value","join","groupedRules","reduce","acc","selectorRules","Object","keys","subSelector","map","definition","generate"],"sources":["@wordpress/style-engine/src/index.ts"],"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}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AAY,CAAEM,WAAW,CAAE,CAChDC,GAAG,CACDZ,IAAsB,IACtB,GAAGV,SAAS,CAAEU,IAAI,CAACE,GAAI,CAAG,KAAKF,IAAI,CAACG,KAAO,GAC9C,CAAC,CACAC,IAAI,CAAE,GAAI,CAAG,IAChB,CAAC;IACD,OAAOG,GAAG;EACX,CAAC,EACD,EACD,CAAC;EAED,OAAOC,aAAa,CAACJ,IAAI,CAAE,IAAK,CAAC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASR,WAAWA,CAC1BH,KAAY,EACZC,OAAqB,GAAG,CAAC,CAAC,EACL;EACrB,MAAMC,KAAyB,GAAG,EAAE;EACpCJ,gBAAgB,CAACQ,OAAO,CAAIc,UAA2B,IAAM;IAC5D,IAAK,OAAOA,UAAU,CAACC,QAAQ,KAAK,UAAU,EAAG;MAChDnB,KAAK,CAACM,IAAI,CAAE,GAAGY,UAAU,CAACC,QAAQ,CAAErB,KAAK,EAAEC,OAAQ,CAAE,CAAC;IACvD;EACD,CAAE,CAAC;EAEH,OAAOC,KAAK;AACb"}
@@ -1,7 +1,9 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule, generateBoxRules, camelCaseJoin } from '../utils';
6
+
5
7
  /**
6
8
  * Creates a function for generating CSS rules when the style path is the same as the camelCase CSS property used in React.
7
9
  *
@@ -9,10 +11,10 @@ import { generateRule, generateBoxRules, camelCaseJoin } from '../utils';
9
11
  *
10
12
  * @return A function that generates CSS rules.
11
13
  */
12
-
13
14
  function createBorderGenerateFunction(path) {
14
15
  return (style, options) => generateRule(style, options, path, camelCaseJoin(path));
15
16
  }
17
+
16
18
  /**
17
19
  * Creates a function for generating border-{top,bottom,left,right}-{color,style,width} CSS rules.
18
20
  *
@@ -20,8 +22,6 @@ function createBorderGenerateFunction(path) {
20
22
  *
21
23
  * @return A function that generates CSS rules.
22
24
  */
23
-
24
-
25
25
  function createBorderEdgeGenerateFunction(edge) {
26
26
  return (style, options) => {
27
27
  return ['color', 'style', 'width'].flatMap(key => {
@@ -30,7 +30,6 @@ function createBorderEdgeGenerateFunction(edge) {
30
30
  });
31
31
  };
32
32
  }
33
-
34
33
  const color = {
35
34
  name: 'color',
36
35
  generate: createBorderGenerateFunction(['border', 'color'])
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/border/index.ts"],"names":["generateRule","generateBoxRules","camelCaseJoin","createBorderGenerateFunction","path","style","options","createBorderEdgeGenerateFunction","edge","flatMap","key","color","name","generate","radius","default","individual","borderStyle","width","borderTop","borderRight","borderBottom","borderLeft"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,EAAuBC,gBAAvB,EAAyCC,aAAzC,QAA8D,UAA9D;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,4BAAT,CAAuCC,IAAvC,EAA0E;AACzE,SAAO,CAAEC,KAAF,EAASC,OAAT,KACNN,YAAY,CAAEK,KAAF,EAASC,OAAT,EAAkBF,IAAlB,EAAwBF,aAAa,CAAEE,IAAF,CAArC,CADb;AAEA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASG,gCAAT,CAA2CC,IAA3C,EAA6E;AAC5E,SAAO,CAAEH,KAAF,EAASC,OAAT,KAAsB;AAC5B,WAAO,CAAE,OAAF,EAAW,OAAX,EAAoB,OAApB,EAA8BG,OAA9B,CAAyCC,GAAF,IAAW;AACxD,YAAMN,IAAI,GAAG,CAAE,QAAF,EAAYI,IAAZ,EAAkBE,GAAlB,CAAb;AACA,aAAOP,4BAA4B,CAAEC,IAAF,CAA5B,CAAsCC,KAAtC,EAA6CC,OAA7C,CAAP;AACA,KAHM,CAAP;AAIA,GALD;AAMA;;AAED,MAAMK,KAAsB,GAAG;AAC9BC,EAAAA,IAAI,EAAE,OADwB;AAE9BC,EAAAA,QAAQ,EAAEV,4BAA4B,CAAE,CAAE,QAAF,EAAY,OAAZ,CAAF;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,EAIdJ,MAJc,EAKdK,SALc,EAMdC,WANc,EAOdC,YAPc,EAQdC,UARc,CAAf","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"]}
1
+ {"version":3,"names":["generateRule","generateBoxRules","camelCaseJoin","createBorderGenerateFunction","path","style","options","createBorderEdgeGenerateFunction","edge","flatMap","key","color","name","generate","radius","default","individual","borderStyle","width","borderTop","borderRight","borderBottom","borderLeft"],"sources":["@wordpress/style-engine/src/styles/border/index.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,UAAU;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,4BAA4BA,CAAEC,IAAc,EAAqB;EACzE,OAAO,CAAEC,KAAK,EAAEC,OAAO,KACtBN,YAAY,CAAEK,KAAK,EAAEC,OAAO,EAAEF,IAAI,EAAEF,aAAa,CAAEE,IAAK,CAAE,CAAC;AAC7D;;AAEA;AACA;A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;EACpCR,IAAI,EAAE,aAAa;EACnBC,QAAQ,EAAEN,gCAAgC,CAAE,OAAQ;AACrD,CAAC;AAED,MAAMc,YAA6B,GAAG;EACrCT,IAAI,EAAE,cAAc;EACpBC,QAAQ,EAAEN,gCAAgC,CAAE,QAAS;AACtD,CAAC;AAED,MAAMe,UAA2B,GAAG;EACnCV,IAAI,EAAE,YAAY;EAClBC,QAAQ,EAAEN,gCAAgC,CAAE,MAAO;AACpD,CAAC;AAED,eAAe,CACdI,KAAK,EACLM,WAAW,EACXC,KAAK,EACLJ,MAAM,EACNK,SAAS,EACTC,WAAW,EACXC,YAAY,EACZC,UAAU,CACV"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const background = {
6
7
  name: 'background',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/color/background.ts"],"names":["generateRule","background","name","generate","style","options"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,YADY;AAElBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,OAAF,EAAW,YAAX,CAHkB,EAIlB,iBAJkB,CAAnB;AAMA;AATiB,CAAnB;AAYA,eAAeJ,UAAf","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"]}
1
+ {"version":3,"names":["generateRule","background","name","generate","style","options"],"sources":["@wordpress/style-engine/src/styles/color/background.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,UAAU;AAEvC,MAAMC,UAAU,GAAG;EAClBC,IAAI,EAAE,YAAY;EAClBC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,YAAY,CAClBI,KAAK,EACLC,OAAO,EACP,CAAE,OAAO,EAAE,YAAY,CAAE,EACzB,iBACD,CAAC;EACF;AACD,CAAC;AAED,eAAeJ,UAAU"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const gradient = {
6
7
  name: 'gradient',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/color/gradient.ts"],"names":["generateRule","gradient","name","generate","style","options"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,UADU;AAEhBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,OAAF,EAAW,UAAX,CAHkB,EAIlB,YAJkB,CAAnB;AAMA;AATe,CAAjB;AAYA,eAAeJ,QAAf","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"]}
1
+ {"version":3,"names":["generateRule","gradient","name","generate","style","options"],"sources":["@wordpress/style-engine/src/styles/color/gradient.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,UAAU;AAEvC,MAAMC,QAAQ,GAAG;EAChBC,IAAI,EAAE,UAAU;EAChBC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,YAAY,CAClBI,KAAK,EACLC,OAAO,EACP,CAAE,OAAO,EAAE,UAAU,CAAE,EACvB,YACD,CAAC;EACF;AACD,CAAC;AAED,eAAeJ,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/color/index.ts"],"names":["background","gradient","text"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,cAAvB;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,eAAe,CAAEA,IAAF,EAAQD,QAAR,EAAkBD,UAAlB,CAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport background from './background';\nimport gradient from './gradient';\nimport text from './text';\n\nexport default [ text, gradient, background ];\n"]}
1
+ {"version":3,"names":["background","gradient","text"],"sources":["@wordpress/style-engine/src/styles/color/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport background from './background';\nimport gradient from './gradient';\nimport text from './text';\n\nexport default [ text, gradient, background ];\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,cAAc;AACrC,OAAOC,QAAQ,MAAM,YAAY;AACjC,OAAOC,IAAI,MAAM,QAAQ;AAEzB,eAAe,CAAEA,IAAI,EAAED,QAAQ,EAAED,UAAU,CAAE"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const text = {
6
7
  name: 'text',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/color/text.ts"],"names":["generateRule","text","name","generate","style","options"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,IAAI,GAAG;AACZC,EAAAA,IAAI,EAAE,MADM;AAEZC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAAEI,KAAF,EAASC,OAAT,EAAkB,CAAE,OAAF,EAAW,MAAX,CAAlB,EAAuC,OAAvC,CAAnB;AACA;AAJW,CAAb;AAOA,eAAeJ,IAAf","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"]}
1
+ {"version":3,"names":["generateRule","text","name","generate","style","options"],"sources":["@wordpress/style-engine/src/styles/color/text.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,UAAU;AAEvC,MAAMC,IAAI,GAAG;EACZC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,YAAY,CAAEI,KAAK,EAAEC,OAAO,EAAE,CAAE,OAAO,EAAE,MAAM,CAAE,EAAE,OAAQ,CAAC;EACpE;AACD,CAAC;AAED,eAAeJ,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/constants.ts"],"names":["VARIABLE_REFERENCE_PREFIX","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE"],"mappings":"AAAA,OAAO,MAAMA,yBAAyB,GAAG,MAAlC;AACP,OAAO,MAAMC,uCAAuC,GAAG,GAAhD;AACP,OAAO,MAAMC,mCAAmC,GAAG,IAA5C","sourcesContent":["export const VARIABLE_REFERENCE_PREFIX = 'var:';\nexport const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';\nexport const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';\n"]}
1
+ {"version":3,"names":["VARIABLE_REFERENCE_PREFIX","VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE","VARIABLE_PATH_SEPARATOR_TOKEN_STYLE"],"sources":["@wordpress/style-engine/src/styles/constants.ts"],"sourcesContent":["export const VARIABLE_REFERENCE_PREFIX = 'var:';\nexport const VARIABLE_PATH_SEPARATOR_TOKEN_ATTRIBUTE = '|';\nexport const VARIABLE_PATH_SEPARATOR_TOKEN_STYLE = '--';\n"],"mappings":"AAAA,OAAO,MAAMA,yBAAyB,GAAG,MAAM;AAC/C,OAAO,MAAMC,uCAAuC,GAAG,GAAG;AAC1D,OAAO,MAAMC,mCAAmC,GAAG,IAAI"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const minHeight = {
6
7
  name: 'minHeight',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/dimensions/index.ts"],"names":["generateRule","minHeight","name","generate","style","options"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,SAAS,GAAG;AACjBC,EAAAA,IAAI,EAAE,WADW;AAEjBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,YAAF,EAAgB,WAAhB,CAHkB,EAIlB,WAJkB,CAAnB;AAMA;AATgB,CAAlB;AAYA,eAAe,CAAEJ,SAAF,CAAf","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\nexport default [ minHeight ];\n"]}
1
+ {"version":3,"names":["generateRule","minHeight","name","generate","style","options"],"sources":["@wordpress/style-engine/src/styles/dimensions/index.ts"],"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\nexport default [ minHeight ];\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,UAAU;AAEvC,MAAMC,SAAS,GAAG;EACjBC,IAAI,EAAE,WAAW;EACjBC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,YAAY,CAClBI,KAAK,EACLC,OAAO,EACP,CAAE,YAAY,EAAE,WAAW,CAAE,EAC7B,WACD,CAAC;EACF;AACD,CAAC;AAED,eAAe,CAAEJ,SAAS,CAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/index.ts"],"names":["border","color","dimensions","shadow","outline","spacing","typography","styleDefinitions"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAP,MAAmB,UAAnB;AACA,OAAOC,KAAP,MAAkB,SAAlB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,OAAO,MAAMC,gBAAgB,GAAG,CAC/B,GAAGP,MAD4B,EAE/B,GAAGC,KAF4B,EAG/B,GAAGC,UAH4B,EAI/B,GAAGE,OAJ4B,EAK/B,GAAGC,OAL4B,EAM/B,GAAGC,UAN4B,EAO/B,GAAGH,MAP4B,CAAzB","sourcesContent":["/**\n * Internal dependencies\n */\nimport border from './border';\nimport color from './color';\nimport dimensions from './dimensions';\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];\n"]}
1
+ {"version":3,"names":["border","color","dimensions","shadow","outline","spacing","typography","styleDefinitions"],"sources":["@wordpress/style-engine/src/styles/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport border from './border';\nimport color from './color';\nimport dimensions from './dimensions';\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];\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,UAAU;AAC7B,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,UAAU,MAAM,cAAc;AAErC,OAAO,MAAMC,gBAAgB,GAAG,CAC/B,GAAGP,MAAM,EACT,GAAGC,KAAK,EACR,GAAGC,UAAU,EACb,GAAGE,OAAO,EACV,GAAGC,OAAO,EACV,GAAGC,UAAU,EACb,GAAGH,MAAM,CACT"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const color = {
6
7
  name: 'color',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/outline/index.ts"],"names":["generateRule","color","name","generate","style","options","path","ruleKey","offset","outlineStyle","width"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,KAAK,GAAG;AACbC,EAAAA,IAAI,EAAE,OADO;AAEbC,EAAAA,QAAQ,EAAE,CACTC,KADS,EAETC,OAFS,EAGTC,IAAc,GAAG,CAAE,SAAF,EAAa,OAAb,CAHR,EAITC,OAAe,GAAG,cAJT,KAKe;AACxB,WAAOP,YAAY,CAAEI,KAAF,EAASC,OAAT,EAAkBC,IAAlB,EAAwBC,OAAxB,CAAnB;AACA;AATY,CAAd;AAYA,MAAMC,MAAM,GAAG;AACdN,EAAAA,IAAI,EAAE,QADQ;AAEdC,EAAAA,QAAQ,EAAE,CACTC,KADS,EAETC,OAFS,EAGTC,IAAc,GAAG,CAAE,SAAF,EAAa,QAAb,CAHR,EAITC,OAAe,GAAG,eAJT,KAKe;AACxB,WAAOP,YAAY,CAAEI,KAAF,EAASC,OAAT,EAAkBC,IAAlB,EAAwBC,OAAxB,CAAnB;AACA;AATa,CAAf;AAYA,MAAME,YAAY,GAAG;AACpBP,EAAAA,IAAI,EAAE,OADc;AAEpBC,EAAAA,QAAQ,EAAE,CACTC,KADS,EAETC,OAFS,EAGTC,IAAc,GAAG,CAAE,SAAF,EAAa,OAAb,CAHR,EAITC,OAAe,GAAG,cAJT,KAKe;AACxB,WAAOP,YAAY,CAAEI,KAAF,EAASC,OAAT,EAAkBC,IAAlB,EAAwBC,OAAxB,CAAnB;AACA;AATmB,CAArB;AAYA,MAAMG,KAAK,GAAG;AACbR,EAAAA,IAAI,EAAE,OADO;AAEbC,EAAAA,QAAQ,EAAE,CACTC,KADS,EAETC,OAFS,EAGTC,IAAc,GAAG,CAAE,SAAF,EAAa,OAAb,CAHR,EAITC,OAAe,GAAG,cAJT,KAKe;AACxB,WAAOP,YAAY,CAAEI,KAAF,EAASC,OAAT,EAAkBC,IAAlB,EAAwBC,OAAxB,CAAnB;AACA;AATY,CAAd;AAYA,eAAe,CAAEN,KAAF,EAASQ,YAAT,EAAuBD,MAAvB,EAA+BE,KAA/B,CAAf","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"]}
1
+ {"version":3,"names":["generateRule","color","name","generate","style","options","path","ruleKey","offset","outlineStyle","width"],"sources":["@wordpress/style-engine/src/styles/outline/index.ts"],"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,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EAAED,MAAM,EAAEE,KAAK,CAAE"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const shadow = {
6
7
  name: 'shadow',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/shadow/index.ts"],"names":["generateRule","shadow","name","generate","style","options"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,MAAM,GAAG;AACdC,EAAAA,IAAI,EAAE,QADQ;AAEdC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAAEI,KAAF,EAASC,OAAT,EAAkB,CAAE,QAAF,CAAlB,EAAgC,WAAhC,CAAnB;AACA;AAJa,CAAf;AAOA,eAAe,CAAEJ,MAAF,CAAf","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"]}
1
+ {"version":3,"names":["generateRule","shadow","name","generate","style","options"],"sources":["@wordpress/style-engine/src/styles/shadow/index.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,UAAU;AAEvC,MAAMC,MAAM,GAAG;EACdC,IAAI,EAAE,QAAQ;EACdC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,YAAY,CAAEI,KAAK,EAAEC,OAAO,EAAE,CAAE,QAAQ,CAAE,EAAE,WAAY,CAAC;EACjE;AACD,CAAC;AAED,eAAe,CAAEJ,MAAM,CAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/spacing/index.ts"],"names":["padding","margin"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAP,MAAoB,WAApB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA,eAAe,CAAEA,MAAF,EAAUD,OAAV,CAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport padding from './padding';\nimport margin from './margin';\n\nexport default [ margin, padding ];\n"]}
1
+ {"version":3,"names":["padding","margin"],"sources":["@wordpress/style-engine/src/styles/spacing/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport padding from './padding';\nimport margin from './margin';\n\nexport default [ margin, padding ];\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,OAAO,MAAM,WAAW;AAC/B,OAAOC,MAAM,MAAM,UAAU;AAE7B,eAAe,CAAEA,MAAM,EAAED,OAAO,CAAE"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateBoxRules } from '../utils';
5
6
  const margin = {
6
7
  name: 'margin',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/spacing/margin.ts"],"names":["generateBoxRules","margin","name","generate","style","options","default","individual"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,gBAAT,QAAiC,UAAjC;AAEA,MAAMC,MAAM,GAAG;AACdC,EAAAA,IAAI,EAAE,QADQ;AAEdC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,gBAAgB,CAAEI,KAAF,EAASC,OAAT,EAAkB,CAAE,SAAF,EAAa,QAAb,CAAlB,EAA2C;AACjEC,MAAAA,OAAO,EAAE,QADwD;AAEjEC,MAAAA,UAAU,EAAE;AAFqD,KAA3C,CAAvB;AAIA;AAPa,CAAf;AAUA,eAAeN,MAAf","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"]}
1
+ {"version":3,"names":["generateBoxRules","margin","name","generate","style","options","default","individual"],"sources":["@wordpress/style-engine/src/styles/spacing/margin.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,UAAU;AAE3C,MAAMC,MAAM,GAAG;EACdC,IAAI,EAAE,QAAQ;EACdC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,gBAAgB,CAAEI,KAAK,EAAEC,OAAO,EAAE,CAAE,SAAS,EAAE,QAAQ,CAAE,EAAE;MACjEC,OAAO,EAAE,QAAQ;MACjBC,UAAU,EAAE;IACb,CAAE,CAAC;EACJ;AACD,CAAC;AAED,eAAeN,MAAM"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateBoxRules } from '../utils';
5
6
  const padding = {
6
7
  name: 'padding',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/spacing/padding.ts"],"names":["generateBoxRules","padding","name","generate","style","options","default","individual"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,gBAAT,QAAiC,UAAjC;AAEA,MAAMC,OAAO,GAAG;AACfC,EAAAA,IAAI,EAAE,SADS;AAEfC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,gBAAgB,CAAEI,KAAF,EAASC,OAAT,EAAkB,CAAE,SAAF,EAAa,SAAb,CAAlB,EAA4C;AAClEC,MAAAA,OAAO,EAAE,SADyD;AAElEC,MAAAA,UAAU,EAAE;AAFsD,KAA5C,CAAvB;AAIA;AAPc,CAAhB;AAUA,eAAeN,OAAf","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"]}
1
+ {"version":3,"names":["generateBoxRules","padding","name","generate","style","options","default","individual"],"sources":["@wordpress/style-engine/src/styles/spacing/padding.ts"],"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"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,gBAAgB,QAAQ,UAAU;AAE3C,MAAMC,OAAO,GAAG;EACfC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,gBAAgB,CAAEI,KAAK,EAAEC,OAAO,EAAE,CAAE,SAAS,EAAE,SAAS,CAAE,EAAE;MAClEC,OAAO,EAAE,SAAS;MAClBC,UAAU,EAAE;IACb,CAAE,CAAC;EACJ;AACD,CAAC;AAED,eAAeN,OAAO"}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Internal dependencies
3
3
  */
4
+
4
5
  import { generateRule } from '../utils';
5
6
  const fontSize = {
6
7
  name: 'fontSize',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/style-engine/src/styles/typography/index.ts"],"names":["generateRule","fontSize","name","generate","style","options","fontStyle","fontWeight","fontFamily","letterSpacing","lineHeight","textColumns","textDecoration","textTransform","writingMode"],"mappings":"AAAA;AACA;AACA;AAEA,SAASA,YAAT,QAA6B,UAA7B;AAEA,MAAMC,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,UADU;AAEhBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,YAAF,EAAgB,UAAhB,CAHkB,EAIlB,UAJkB,CAAnB;AAMA;AATe,CAAjB;AAYA,MAAMC,SAAS,GAAG;AACjBJ,EAAAA,IAAI,EAAE,WADW;AAEjBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,YAAF,EAAgB,WAAhB,CAHkB,EAIlB,WAJkB,CAAnB;AAMA;AATgB,CAAlB;AAYA,MAAME,UAAU,GAAG;AAClBL,EAAAA,IAAI,EAAE,YADY;AAElBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,YAAF,EAAgB,YAAhB,CAHkB,EAIlB,YAJkB,CAAnB;AAMA;AATiB,CAAnB;AAYA,MAAMG,UAAU,GAAG;AAClBN,EAAAA,IAAI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;AACrBX,EAAAA,IAAI,EAAE,eADe;AAErBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,YAAF,EAAgB,eAAhB,CAHkB,EAIlB,eAJkB,CAAnB;AAMA;AAToB,CAAtB;AAYA,MAAMS,WAAW,GAAG;AACnBZ,EAAAA,IAAI,EAAE,aADa;AAEnBC,EAAAA,QAAQ,EAAE,CAAEC,KAAF,EAAgBC,OAAhB,KAA2C;AACpD,WAAOL,YAAY,CAClBI,KADkB,EAElBC,OAFkB,EAGlB,CAAE,YAAF,EAAgB,aAAhB,CAHkB,EAIlB,aAJkB,CAAnB;AAMA;AATkB,CAApB;AAYA,eAAe,CACdG,UADc,EAEdP,QAFc,EAGdK,SAHc,EAIdC,UAJc,EAKdE,aALc,EAMdC,UANc,EAOdC,WAPc,EAQdC,cARc,EASdC,aATc,EAUdC,WAVc,CAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst fontSize = {\n\tname: 'fontSize',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontSize' ],\n\t\t\t'fontSize'\n\t\t);\n\t},\n};\n\nconst fontStyle = {\n\tname: 'fontStyle',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontStyle' ],\n\t\t\t'fontStyle'\n\t\t);\n\t},\n};\n\nconst fontWeight = {\n\tname: 'fontWeight',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontWeight' ],\n\t\t\t'fontWeight'\n\t\t);\n\t},\n};\n\nconst fontFamily = {\n\tname: 'fontFamily',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontFamily' ],\n\t\t\t'fontFamily'\n\t\t);\n\t},\n};\n\nconst letterSpacing = {\n\tname: 'letterSpacing',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'letterSpacing' ],\n\t\t\t'letterSpacing'\n\t\t);\n\t},\n};\n\nconst lineHeight = {\n\tname: 'lineHeight',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'lineHeight' ],\n\t\t\t'lineHeight'\n\t\t);\n\t},\n};\n\nconst textColumns = {\n\tname: 'textColumns',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'textColumns' ],\n\t\t\t'columnCount'\n\t\t);\n\t},\n};\n\nconst textDecoration = {\n\tname: 'textDecoration',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'textDecoration' ],\n\t\t\t'textDecoration'\n\t\t);\n\t},\n};\n\nconst textTransform = {\n\tname: 'textTransform',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'textTransform' ],\n\t\t\t'textTransform'\n\t\t);\n\t},\n};\n\nconst writingMode = {\n\tname: 'writingMode',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'writingMode' ],\n\t\t\t'writingMode'\n\t\t);\n\t},\n};\n\nexport default [\n\tfontFamily,\n\tfontSize,\n\tfontStyle,\n\tfontWeight,\n\tletterSpacing,\n\tlineHeight,\n\ttextColumns,\n\ttextDecoration,\n\ttextTransform,\n\twritingMode,\n];\n"]}
1
+ {"version":3,"names":["generateRule","fontSize","name","generate","style","options","fontStyle","fontWeight","fontFamily","letterSpacing","lineHeight","textColumns","textDecoration","textTransform","writingMode"],"sources":["@wordpress/style-engine/src/styles/typography/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { Style, StyleOptions } from '../../types';\nimport { generateRule } from '../utils';\n\nconst fontSize = {\n\tname: 'fontSize',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontSize' ],\n\t\t\t'fontSize'\n\t\t);\n\t},\n};\n\nconst fontStyle = {\n\tname: 'fontStyle',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontStyle' ],\n\t\t\t'fontStyle'\n\t\t);\n\t},\n};\n\nconst fontWeight = {\n\tname: 'fontWeight',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontWeight' ],\n\t\t\t'fontWeight'\n\t\t);\n\t},\n};\n\nconst fontFamily = {\n\tname: 'fontFamily',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'fontFamily' ],\n\t\t\t'fontFamily'\n\t\t);\n\t},\n};\n\nconst letterSpacing = {\n\tname: 'letterSpacing',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'letterSpacing' ],\n\t\t\t'letterSpacing'\n\t\t);\n\t},\n};\n\nconst lineHeight = {\n\tname: 'lineHeight',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'lineHeight' ],\n\t\t\t'lineHeight'\n\t\t);\n\t},\n};\n\nconst textColumns = {\n\tname: 'textColumns',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'textColumns' ],\n\t\t\t'columnCount'\n\t\t);\n\t},\n};\n\nconst textDecoration = {\n\tname: 'textDecoration',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'textDecoration' ],\n\t\t\t'textDecoration'\n\t\t);\n\t},\n};\n\nconst textTransform = {\n\tname: 'textTransform',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'textTransform' ],\n\t\t\t'textTransform'\n\t\t);\n\t},\n};\n\nconst writingMode = {\n\tname: 'writingMode',\n\tgenerate: ( style: Style, options: StyleOptions ) => {\n\t\treturn generateRule(\n\t\t\tstyle,\n\t\t\toptions,\n\t\t\t[ 'typography', 'writingMode' ],\n\t\t\t'writingMode'\n\t\t);\n\t},\n};\n\nexport default [\n\tfontFamily,\n\tfontSize,\n\tfontStyle,\n\tfontWeight,\n\tletterSpacing,\n\tlineHeight,\n\ttextColumns,\n\ttextDecoration,\n\ttextTransform,\n\twritingMode,\n];\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,UAAU;AAEvC,MAAMC,QAAQ,GAAG;EAChBC,IAAI,EAAE,UAAU;EAChBC,QAAQ,EAAEA,CAAEC,KAAY,EAAEC,OAAqB,KAAM;IACpD,OAAOL,YAAY,CAClBI,KAAK,EACLC,OAAO,EACP,CAAE,YAAY,EAAE,UAAU,CAAE,EAC5B,UACD,CAAC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